Commit graph

106 commits

Author SHA1 Message Date
Nathan Flurry
ec8e816d0d Refactor Foundry GitHub and sandbox flows 2026-03-12 11:20:46 -07:00
Nathan Flurry
d75e8c31d1
Rename Foundry handoffs to tasks (#239)
* Restore foundry onboarding stack

* Consolidate foundry rename

* Create foundry tasks without prompts

* Rename Foundry handoffs to tasks
2026-03-11 13:23:54 -07:00
Nicholas Kissel
32008797da
Foundry UI polish: real org data, project icons, model picker (#233)
* feat: modernize chat UI and rename handoff to task

- Remove agent message bubbles, keep user bubbles (right-aligned)
- Rename "Handoffs" to "Tasks" with ListChecks icon in sidebar
- Move model picker inside composer, add renderFooter to ChatComposer SDK
- Make project sections collapsible with hover-only chevrons
- Remove divider between chat and composer
- Update model picker chevron to flip on open/close
- Replace all user-visible "handoff" strings with "task" across frontend

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: real org mock data, model picker styling, project icons, task minutes indicator

- Replace fake acme/* mock data with real rivet-dev GitHub org repos and PRs
- Fix model picker popover: dark gray surface with backdrop blur instead of pure black
- Add colored letter icons to project section headers (swap to chevron on hover)
- Add "847 min used" indicator in transcript header
- Rename browser tab title from OpenHandoff to Foundry
- Reduce transcript header title font weight to 500

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:49:48 -07:00
Nathan Flurry
d2346bafb3
Configure lefthook formatter checks (#231)
* Add lefthook formatter checks

* Fix SDK mode hydration

* Stabilize SDK mode integration test
2026-03-10 23:03:11 -07:00
Nathan Flurry
0471214d65
Share chat UI components in @sandbox-agent/react (#228)
* Extract shared chat UI components

* chore(release): update version to 0.3.1

* Use shared chat UI in Foundry
2026-03-10 22:31:36 -07:00
Nathan Flurry
76586f409f
Add ACP permission mode support to the SDK (#224)
* chore: recover hamburg workspace state

* chore: drop workspace context files

* refactor: generalize permissions example

* refactor: parse permissions example flags

* docs: clarify why fs and terminal stay native

* feat: add interactive permission prompt UI to Inspector

Add permission request handling to the Inspector UI so users can
Allow, Always Allow, or Reject tool calls that require permissions
instead of having them auto-cancelled. Wires up SDK
onPermissionRequest/respondPermission through App → ChatPanel →
ChatMessages with proper toolCallId-to-pendingId mapping.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: prevent permission reply from silently escalating "once" to "always"

Remove allow_always from the fallback chain when the user replies "once",
aligning with the ACP spec which says "map by option kind first" with no
fallback for allow_once. Also fix Inspector to use rawSend, revert
hydration guard to accept empty configOptions, and handle respondPermission
errors by rejecting the pending promise.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:52:43 -07:00
Nathan Flurry
3d9476ed0b chore(release): update version to 0.3.0 2026-03-07 18:54:35 -08:00
Nathan Flurry
cd29dd57c4 chore(release): update version to 0.3.0 2026-03-07 18:01:57 -08:00
Nathan Flurry
febe8601f6
feat: add process management support (#207)
* feat: improve inspector UI for processes and fix PTY terminal

- Simplify ProcessRunTab layout: compact form with collapsible Advanced section for timeout/maxOutputBytes
- Rewrite ProcessesTab: collapsible create form, lightweight list items with status dots, clean detail panel with tabs
- Extract error details: use problem.detail instead of generic "Stream Error" title for better error messages
- Fix GhosttyTerminal binary frame parsing: handle server's binary ArrayBuffer control frames (ready/exit/error)
- Enable WebSocket proxying in Vite dev server with ws: true
- Set TERM=xterm-256color default for TTY processes so tools like tmux, vim, htop work out of the box
- Remove orange gradient background from terminal container for cleaner look
- Remove orange left border from selected process list items
- Update inspector CSS with new process/terminal styles

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* fix: address review issues and add processes documentation

- Fix unstable onExit callback in ProcessesTab (useCallback)
- Fix SSE follow stream race condition (subscribe before history read)
- Update inspector.mdx with new process management features
- Change observability icon to avoid conflict with processes
- Add docs/processes.mdx covering the full process management API

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: simplify processes doc — rename sections, remove low-level protocol

- Rename "Interactive terminals" to "Terminals" with "Connect to a terminal" sub-heading
- Add TTY process creation step at top of Terminals section
- Remove low-level WebSocket protocol table and raw WebSocket example
- Keep browser terminal emulator reference with Ghostty link

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update GhosttyTerminal permalink to latest commit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: use main branch permalink for GhosttyTerminal reference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: refine process API — WebSocket binary protocol, SDK terminal session, updated tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update GhosttyTerminal permalink to 636eefb

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* inspector: use websocket terminal API

* sdk: restore high-level terminal session

* docs: update inspector terminal permalink

* inspector: update run once placeholder

* Fix lazy install v1 API test fixture

* Add reusable React terminal component

* Fix terminal WebSocket ready state checks

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-07 17:58:31 -08:00
Nathan Flurry
c91791f88d
feat: add configuration for model, mode, and thought level (#205)
* feat: add configuration for model, mode, and thought level

* docs: document Claude effort-level filesystem config

* fix: prevent panic on empty modes/thoughtLevels in parse_agent_config

Use `.first()` with safe fallback instead of direct `[0]` index access,
which would panic if the Vec is empty and no default is set.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: harden session lifecycle and align cli.mdx example with claude.json

- destroySession: wrap session/cancel RPC in try/catch so local cleanup
  always succeeds even when the agent is unreachable
- createSession/resumeOrCreateSession: clean up the remote session if
  post-creation config calls (setMode/setModel/setThoughtLevel) fail,
  preventing leaked orphan sessions
- cli.mdx: fix example output to match current claude.json (model name,
  model order, and populated modes)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: harden session lifecycle and align config persistence logic

- resumeOrCreateSession: Remove destroy-on-error for the resume path. Config
  errors now propagate without destroying a pre-existing session. The destroy
  pattern remains in createSession (where the session is newly created and has
  no prior state to preserve).

- setSessionMode fallback: When session/set_mode returns -32601 and the
  fallback uses session/set_config_option, now keep modes.currentModeId
  in sync with the updated currentValue. Prevents stale cached state in
  getModes() when the fallback path is used.

- persistSessionStateFromMethod: Re-read the record from persistence instead
  of using a stale pre-await snapshot. Prevents race conditions where
  concurrent session/update events (processed by persistSessionStateFromEvent)
  are silently overwritten by optimistic updates.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* fix: correct doc examples with valid Codex modes and update stable API list

- Replace invalid Codex mode values ("plan", "build") with valid ones
  ("auto", "full-access") in agent-sessions.mdx and sdk-overview.mdx
- Update CLAUDE.md stable method enumerations to include new session
  config methods (setSessionMode, setSessionModel, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add OpenAPI annotations for process endpoints and fix config persistence race

Add summary/description to all process management endpoint specs and the
not_found error type. Fix hydrateSessionConfigOptions to re-read from
persistence after the network call, and sync mode-category configOptions
on session/update current_mode_update events.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 00:24:32 -08:00
Nathan Flurry
e7343e14bd
Add SDK health wait gate (#206)
* Add SDK health wait gate

* Default connect to waiting for health

* Document connect health wait default

* Add abort signal to connect health wait

* Refactor SDK health probe helper

* Update quickstart health wait note

* Remove example health polling

* Fix docker example codex startup
2026-03-06 00:05:06 -08:00
Nathan Flurry
4335ef6af6
feat: add process management API (#203)
* feat: add process management API

Introduces a complete Process Management API for Sandbox Agent with process lifecycle management (start, stop, kill, delete), one-shot command execution, log streaming via SSE and WebSocket, stdin input, and PTY/terminal support. Includes new process_runtime module for managing process state, HTTP route handlers, OpenAPI documentation, and integration tests.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* fix: address review issues in process management API

- Add doc comments to all 13 new #[utoipa::path] handlers (CLAUDE.md compliance)
- Fix send_signal ESRCH check: use raw_os_error() == Some(libc::ESRCH) instead of ErrorKind::NotFound
- Add max_input_bytes_per_request enforcement in WebSocket terminal handler
- URL-decode access_token query parameter for WebSocket auth
- Replace fragile string prefix matching with proper SandboxError::NotFound variant

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* feat: add TypeScript SDK support for process management

Add process CRUD operations (create, get, list, update, delete) and
event streaming to the TypeScript SDK. Includes integration tests,
mock agent updates, and test environment fixes for cross-platform
home directory handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: provide WebSocket impl for process terminal test on Node 20

Node 20 lacks globalThis.WebSocket. Add ws as a devDependency and
pass it to connectProcessTerminalWebSocket in the integration test
so CI no longer fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-05 18:20:20 -08:00
Nathan Flurry
c3a95c3611 chore: add boxlite 2026-02-25 02:18:16 -08:00
Nathan Flurry
a3fe0cc764 fix(cloudflare): fix streaming responses 2026-02-25 01:39:27 -08:00
NathanFlurry
4201bd204b
chore: simplify cloudflare compatibility (#191) 2026-02-23 19:31:54 +00:00
Nathan Flurry
03e06e956d
Merge pull request #177 from akalitenya/docs-fix-e2b-timeout
fix timeout for e2b (docs)
2026-02-17 23:45:32 -08:00
NicholasKissel
d4d7c66c05 feat(inspector): improve contrast and add collapsible debug panel (#182) 2026-02-13 07:15:40 +00:00
NicholasKissel
a897fbcb7c feat(inspector): markdown support and image update (#181) 2026-02-13 06:23:40 +00:00
akalitenya
c68c614a57 fix timeout for e2b (docs) 2026-02-13 05:01:18 +05:00
akalitenya
80feb7fa41 fix host for docs 2026-02-13 04:53:53 +05:00
Nathan Flurry
783ea1086a chore: remove old sdk docs 2026-02-12 15:11:17 -08:00
Nathan Flurry
24fe22f42a fix: remove outdated skill file 2026-02-12 15:06:48 -08:00
Nathan Flurry
ee9ad25069 chore(release): update version to 0.2.1 2026-02-11 20:51:01 -08:00
Nathan Flurry
64d1324628 docs: fix bun trust command 2026-02-11 18:52:32 -08:00
Nathan Flurry
89933c5f80 fix: use correct provider home dirs and make SSE failures non-fatal
- E2B: /home/user, Daytona: /home/daytona, Vercel: /home/vercel-sandbox, ComputeSDK: /home
- Docker-based examples keep /root (correct)
- Add missing install-agent steps to Daytona example and doc
- Make SSE loop failure non-fatal in acp-http-client transport
2026-02-11 09:29:14 -08:00
Nathan Flurry
94353f7696 chore: fix bad merge 2026-02-11 07:57:02 -08:00
Nathan Flurry
b9efe971ff chore: fix bad merge 2026-02-11 07:33:19 -08:00
NathanFlurry
e72eb9f611
acp spec (#155) 2026-02-11 14:47:41 +00:00
Nathan Flurry
4c6c5983c0 Merge branch 'main' into feat/support-pi 2026-02-10 22:27:03 -08:00
Franklin
11950d2a39 adding compute example 2026-02-10 22:14:56 -08:00
Nathan Flurry
8ecd27bc24 chore(release): update version to 0.1.12-rc.1 2026-02-09 16:57:01 -08:00
Nathan Flurry
76b56b0c15 docs: rename skills.mdx to skills-config.mdx and mcp.mdx to mcp-config.mdx 2026-02-09 02:20:38 -08:00
NathanFlurry
4c8d93e077
docs: add mcp and skill session config (#106) 2026-02-09 10:13:25 +00:00
Nathan Flurry
d236edf35c fix: update lockfile and openapi version for 0.1.10 2026-02-08 14:09:34 -08:00
Anirudh
3e40145ffa
fix: use actual opencode url (#147)
* fix: use actual opencode url

* docs(opencode): install the packages first
2026-02-08 13:13:43 -08:00
Nathan Flurry
3ba4c54c0c chore: commit remaining workspace updates 2026-02-08 11:51:47 -08:00
Nathan Flurry
91cac052b8 fix: add native turn lifecycle and stabilize opencode session flow 2026-02-07 20:24:21 -08:00
Nathan Flurry
783e2d6692 feat(opencode): add SSE event replay with Last-Event-ID support 2026-02-07 12:58:20 -08:00
Nathan Flurry
80c9364c4c chore(release): update version to 0.1.8 2026-02-07 03:09:47 -08:00
Nathan Flurry
63625ee48f fix: wire gigacode --yolo through opencode session permissionMode 2026-02-07 03:08:07 -08:00
NathanFlurry
54d537fb23
refactor: improve build ID generation with consistent timestamp format (#130)
refactor: improve build ID generation with consistent timestamp format

fix: lazy-start native opencode and simplify binary resolution
2026-02-07 07:56:07 +00:00
NathanFlurry
77f741ff62
feat: add native OpenCode proxy for TUI/config endpoints (#129) 2026-02-07 07:56:06 +00:00
NathanFlurry
c54f83e1a6
fix: credential detection and provider auth status (#120)
## Summary

Fix credential detection bugs and add credential availability status to the API. Consolidate Claude fallback models and add `sonnet` alias.

Builds on #109 (OAuth token support).

Related issues:
- Fixes #117 (Claude, Codex not showing up in gigacode)
- Related to #113 (Default agent should be Claude Code)

## Changes

### Credential detection fixes
- **`agent-credentials/src/lib.rs`**: Fix `?` operator bug in `extract_claude_credentials` - now continues to next config path if one is missing instead of returning early

### API credential status
- **`sandbox-agent/src/router.rs`**: Add `credentialsAvailable` field to `AgentInfo` struct
- **`/v1/agents`** endpoint now reports whether each agent has valid credentials

### OpenCode provider improvements
- **`sandbox-agent/src/opencode_compat.rs`**: Build `connected` array based on actual credential availability, not just model presence
- Check provider-specific credentials for OpenCode groups (e.g., `opencode:anthropic` only connected if Anthropic creds available)
- Add logging when credential extraction fails in model cache building

### Fallback model consolidation
- Renamed `claude_oauth_fallback_models()` → `claude_fallback_models()` (used for all fallback cases, not just OAuth)
- Added `sonnet` to fallback models (confirmed working via headless CLI test)
- Added `codex_fallback_models()` for Codex when credentials missing
- Added comment explaining aliases work for both API and OAuth users

### Documentation
- **`docs/credentials.mdx`**: New reference doc covering credential sources, extraction behavior, and error handling
- Documents that extraction failures are silent (not errors)
- Documents that agents spawn without credential pre-validation

### Inspector UI
- **`AgentsTab.tsx`**: Added credential status pill showing "Authenticated" or "No Credentials"

## Error Handling Philosophy

- **Extraction failures are silent**: Missing/malformed config files don't error, just continue to next source
- **Agents spawn without credential validation**: No pre-flight auth check; agent's native error surfaces if credentials are missing
- **Fallback models for UI**: When credentials missing, show alias-based models so users can still configure sessions

## Validation

- Tested Claude Code model aliases via headless CLI:
  - `claude --model default --print "say hi"` ✓
  - `claude --model sonnet --print "say hi"` ✓
  - `claude --model haiku --print "say hi"` ✓
- Build passes
- TypeScript types regenerated with `credentialsAvailable` field
2026-02-07 07:56:06 +00:00
Franklin
e2e7f11b9a pi working 2026-02-06 18:18:43 -05:00
Franklin
9a26604001 wip: pi working with variatns 2026-02-06 17:17:00 -05:00
Franklin
bef2e84d0c wip: pi working 2026-02-06 16:54:53 -05:00
Franklin
a6064e7027 wip: pi working 2026-02-06 16:54:43 -05:00
Nathan Flurry
a7b3881099 chore(release): update version to 0.1.7 2026-02-06 04:31:24 -08:00
Nathan Flurry
4320e5d1e7 chore(release): update version to 0.1.7-rc.1 2026-02-06 03:29:14 -08:00
Nathan Flurry
dc2a2b1687
chore: update readme (#98) 2026-02-06 03:03:24 -08:00