Commit History
-
Remove ~900 lines of dead code across agent, backend, and frontend (#318)
Unverified signature* Remove dead code across agent, backend, and frontend A vulture/knip audit with manual repo-wide verification found ~900 lines of dead code: - Delete agent/tools/private_hf_repo_tools.py (650 lines): disabled when hf_repo_files/hf_repo_git replaced it, never imported since. - Drop orphaned functions, constants, and type aliases across agent/ and backend/ (record_jobs_access_blocked, last_fetch_error, update_local_save_status, verify_session_access, OperationType aliases, OpType.INTERRUPT in both enums, etc.). - Trim unused Sandbox client surface (pause/restart/to_dict/ tool_definitions and unused constants); keep Sandbox.connect, which the live auth integration test uses. - Remove production code only its own tests kept alive: _needs_approval (tests retargeted to _base_needs_approval / production path), fetch_hf_user_plan, _cleanup_user_orphan_sandboxes (superseded by scripts/sweep_orphan_sandboxes.py), DEFAULT_MODEL_ID alias. - Drop unused boto3 dependency (still …7943555 -
Enforce YOLO cap across session usage (#313)
Unverified signature* Enforce YOLO cap across session usage Co-authored-by: OpenAI Codex <codex@openai.com> * Address YOLO budget review feedback Co-authored-by: OpenAI Codex <codex@openai.com> * Switch YOLO LLM cap checks to post-call warnings Co-authored-by: OpenAI Codex <codex@openai.com> * Improve YOLO cap reached CTA Co-authored-by: OpenAI Codex <codex@openai.com> * Fix YOLO blocked approval flow Show cap extension controls for pre-execution budget blocks and preserve approved tool parts during approval continuation streams. Co-authored-by: OpenAI Codex <codex@openai.com> * Sync usage meter with YOLO ledger Co-authored-by: OpenAI Codex <codex@openai.com> * Fix YOLO usage accounting drift Co-authored-by: OpenAI Codex <codex@openai.com> * Emit YOLO updates for observed spend Co-authored-by: OpenAI Codex <codex@openai.com> * Handle YOLO updates in active chat stream Co-authored-by: OpenAI Codex <codex@openai.com> * Reconcile YOLO ledger from usage fetches Co-authored-by: OpenAI Codex…d76b37c
-
Add sandbox costs to usage meter (#311)
Unverified signature* Add sandbox costs to usage meter Co-authored-by: OpenAI Codex <codex@openai.com> * Remove usage rollup buckets Co-authored-by: OpenAI Codex <codex@openai.com> * Remove obsolete usage rollup assertions Co-authored-by: OpenAI Codex <codex@openai.com> * Remove unused usage window aggregation Co-authored-by: OpenAI Codex <codex@openai.com> * Update usage event sort test Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>1b98491
-
Reset usage billing window on session activation (#296)
Unverified signature* Reset usage billing window on session activation Co-authored-by: OpenAI Codex <codex@openai.com> * Avoid resetting usage on browser refresh Co-authored-by: OpenAI Codex <codex@openai.com> * Use billing baselines for session usage resets Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>1a8fb0c -
Add app-attributed usage display (#292)
Unverified signature* Add app-attributed usage display Co-authored-by: OpenAI Codex <codex@openai.com> * Fix usage windows for local timestamps Co-authored-by: OpenAI Codex <codex@openai.com> * Add HF billing usage to usage display Co-authored-by: OpenAI Codex <codex@openai.com> * Simplify usage popover Co-authored-by: OpenAI Codex <codex@openai.com> * Remove token row from usage popover Co-authored-by: OpenAI Codex <codex@openai.com> * Move session billing note to usage header Co-authored-by: OpenAI Codex <codex@openai.com> * Optimize usage popover rollup loading Co-authored-by: OpenAI Codex <codex@openai.com> * Round usage costs to cents Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>7d506e1
-
Implement user-billed model policy (#289)
Unverified signature* Implement user-billed model policy - bill hosted inference to user tokens and remove subsidy quota state - switch web and CLI defaults and remove Sonnet from model lists - add plan-aware inference credit CTAs Co-authored-by: OpenAI Codex <codex@openai.com> * Recommend Opus in model picker Co-authored-by: OpenAI Codex <codex@openai.com> * Remove minimum plan from model config Co-authored-by: OpenAI Codex <codex@openai.com> * Link message failures to Space discussions Co-authored-by: OpenAI Codex <codex@openai.com> * Remove compatibility quota endpoint Co-authored-by: OpenAI Codex <codex@openai.com> * Remove obsolete bill_to_user argument Co-authored-by: OpenAI Codex <codex@openai.com> * Remove model tier metadata Co-authored-by: OpenAI Codex <codex@openai.com> * Remove model picker provider subtitles Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>ded9881
-
Enable FAL endpoint to lift limits (#278)
Unverified signature* Bill premium models through the HF router on the user's HF account Route Claude Opus 4.6 and GPT-5.5 off Bedrock/native APIs onto the HF Inference Router (huggingface/anthropic/claude-opus-4.6:fal-ai and huggingface/openai/gpt-5.5:fal-ai). The same daily allowance as before (free=1, pro=20) stays company-subsidized via INFERENCE_TOKEN; once a user is past it, the session's premium_user_billed flag flips and the call bills the user's own HF OAuth token (no X-HF-Bill-To) instead of returning the old 429 cap. - llm_params: bill_to_user routes premium (anthropic/ + openai/) router calls to the user's token; free models stay subsidized. - premium_user_billed is persisted/restored and threaded through the main loop, context compaction, the research sub-agent (now downgraded to router Sonnet 4.6), and effort probes. - Frontend: per-session BillingBanner (dismissible daily); remove the now unreachable ClaudeCapDialog + 429 quota-exhausted plumbing; the model chip shows "Billed" p…c9a83ae -
Reclaim idle sessions to fix session-capacity overshoot (#277)
Unverified signature* Reclaim idle sessions and fix session-capacity overshoot Users hit "Server is at capacity (379/200)" and couldn't create sessions: idle/forgotten runtimes never left the global pool, the frontend reactivated every historical session on load, and concurrent creates could overshoot the cap. Backend: - Idle-session reaper (2h): releases the sandbox + RAM of inactive sessions and evicts them from the live pool, leaving them resumable from Mongo (persisted resumable, never "ended"). Teardown uses asyncio.wait so a shutdown cancel can't be swallowed; submit() enqueues under the lock and refuses sessions being reaped. Reaping is skipped when persistence is disabled and aborts if the resumable snapshot (incl. the message bulk_write, via save_snapshot strict mode) can't be durably written. - Global create-slot reservation closes the check-then-create race that let concurrent creates exceed MAX_SESSIONS. - last_active_at drives the reaper, stamped on genuine activity only. - Re…6cf406a
-
Fallback to free model for gated defaults (#208)
Unverified signature* Fallback to free model for gated defaults Co-authored-by: OpenAI Codex <codex@openai.com> * Cover explicit gated model access for HF users Co-authored-by: OpenAI Codex <codex@openai.com> * Seed model picker from created session Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>092f909 -
Add session YOLO auto-approval budget (#201)
Unverified signature* Add session YOLO auto-approval budget Co-authored-by: Codex <codex@openai.com> * Address YOLO approval review feedback Co-authored-by: Codex <codex@openai.com> --------- Co-authored-by: Codex <codex@openai.com>77324b8
-
Bill HF Jobs by namespace credits, drop Pro and org-join gating (#172)
Aksel Joonas ReediUnverified signature* Bill HF Jobs by namespace credits, drop Pro and org-join gating - Drop the Pro/Team subscription pre-check on hf_jobs. Any namespace the caller belongs to is eligible; HF returns a billing error at job creation time if the wallet is empty, which the agent surfaces as a "top up to launch" dialog pointing at /settings/billing. - Remove the "Join ML Agent Explorers" onboarding step. The org-join hook, /auth/org-membership endpoint, and the OAuth orgIds suggestion are gone. - Rework JobsUpgradeDialog: namespace picker shows all eligible accounts/orgs with avatars + select rings; billing mode opens the HF billing page; "Skip this tool call" stays available for both. - Backend pre-flight only forces the picker when the caller has multiple eligible namespaces; single-namespace users default to their personal account silently. - jobs_tool now catches HfHubHTTPError, detects billing failures by pattern + 402 status, emits a tool_state_change(state=billing_required) so t…bed4e38 -
Persist Space sessions in MongoDB (#170)
Aksel Joonas ReediUnverified signature* Persist Space sessions across backend restarts The hosted Space lost active conversations because sessions, approval state, event streams, and Claude quotas only lived in process memory. This adds a shared optional Mongo store for frontend sessions while keeping local and CLI runs on the no-op/local path when Mongo is absent. Constraint: Space deployment needs durable state without making PyPI/local CLI users configure Mongo. Constraint: Frontend deletes must hide sessions with a visibility tag, not erase traces needed for recovery or SFT export. Rejected: Restore every active session at startup | large user counts would create a thundering herd after deploys. Rejected: Store one giant session document | Mongo document limits make per-message snapshot docs safer. Confidence: medium Scope-risk: broad Directive: Keep session_messages as compactable runtime snapshots and session_trace_messages/session_events as append-only raw traces; do not collapse them into one collection wit…d9d9785
-
Run jobs under user or org accounts with upgrade / org-pick UX (#132)
Aksel Joonas ReediUnverified signature* agent/core/agent_loop.py: jobs access rewiring * agent/core/telemetry.py: jobs access rewiring * agent/tools/jobs_tool.py: jobs access rewiring * backend/dependencies.py: jobs access rewiring * backend/models.py: jobs access rewiring * backend/routes/agent.py: jobs access rewiring * frontend/src/components/Chat/ChatInput.tsx: jobs access rewiring * frontend/src/components/ClaudeCapDialog.tsx: jobs access rewiring * frontend/src/components/SessionChat.tsx: jobs access rewiring * frontend/src/hooks/useAgentChat.ts: jobs access rewiring * frontend/src/lib/sse-chat-transport.ts: jobs access rewiring * frontend/src/store/agentStore.ts: jobs access rewiring * frontend/src/types/agent.ts: jobs access rewiring * scripts/build_kpis.py: jobs access rewiring * tests/unit/test_build_kpis.py: jobs access rewiring * agent/core/hf_access.py: jobs access rewiring * frontend/src/components/JobsUpgradeDialog.tsx: jobs access rewiring * tests/unit/test_hf_access.py: jobs access rewirin…ff8c636
-
Restore expired sessions via summary-based catch-up (#52)
Aksel Joonas ReediUnverified signatureWhen the backend loses a session (typically: HF Space restarted), the chat now shows a small inline banner instead of silently erroring: Where were we? Let me skim the conversation so far and pick up right where we left off — or we can start something new. [ Catch me up ] [ Start fresh ] Flow, in one pass: * Frontend stashes the raw backend messages in localStorage on every mount-hydrate and turn_complete. When the backend 404s for the session id, the SSE transport and the mount effect both fire onSessionDead → the session is flagged `expired` in sessionStore; the sidebar marks it "needs a catch-up". * Catch me up → POST /api/session/restore-summary with the cached messages. Backend creates a fresh session, runs the existing summarizer (factored into summarize_messages() and shared with in-session compaction) with a restore-specific prompt that preserves the tool-call trail, and seeds the new session with that summary wrapped in a [SYS…962191f
-
Replace multi-screen onboarding with single checklist view
Replaces the 4 separate onboarding screens with a unified checklist showing all steps (sign in, join org, start session) with live status. Adds org membership polling via new GET /auth/org-membership endpoint that reuses existing check_org_membership(). Join link opens as popup and auto-closes when membership is detected.6d7f53f
-
feat: per-session WebSocket architecture for parallel chat sessions
Each session now owns its own useAgentChat + WebSocket transport instead of sharing a single instance. Background sessions process all events (including approval_required) continuously, fixing the bug where approvals from non-active sessions were silently dropped. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>27da720
-
feat: merge HF Space improvements
79b2fcc
-
frontend update
463e470
-
making docker run build work
73b1ed7
-
improved tool calling, push to hub, etc.
Henri Bonamy72af187 -
logs have a button to see, improved rejection/approved flow, trying to handle tqdm
Henri Bonamy35dc01a
-
plan tool bottom right
Henri Bonamy2523e77 -
log streaming
Henri Bonamyb7bfe6f
-
added code panel, tool approval, tool calls logging
Henri Bonamy3ce798d
-
Add web frontend infrastructure for HF Agent
- Backend: FastAPI server with WebSocket support - Session manager for multi-session handling - Agent API routes (create, submit, approve, interrupt, undo, compact) - HF OAuth authentication routes - WebSocket connection manager for real-time events - Frontend: React + Vite + MUI + TypeScript - Zustand stores for agent state and session management - Chat UI with markdown rendering - Tool approval modal for batch approvals - Session sidebar for multi-session support - WebSocket hook with auto-reconnection - Docker: Multi-stage build with uv for Python deps - Updated pyproject.toml with web backend dependencies - Added HF Space metadata to README.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>67b16c6