Commit Graph
545 Commits
Author SHA1 Message Date
Julius Marminge 3681d6f757 Document Cursor ACP mapping in canonical runtime event spec
- Add Cursor ACP raw source types to `RuntimeEventRaw.source`
- Define canonical mappings for ACP lifecycle, updates, permissions, and errors
- Expand cross-provider equivalence table to include Cursor ACP and renumber sections
2026-02-28 19:10:08 -08:00
Julius Marminge 1d59c411d2 Revise Cursor provider plan for ACP JSON-RPC integration
- Switch plan from `agent -p` stream-json to `agent acp` JSON-RPC transport
- Document ACP session, permission, event-mapping, and interrupt/recovery behavior
- Update implementation phases, tests, and delivery checklist for ACP-first design
2026-02-28 18:30:45 -08:00
Julius Marminge 9e6732b563 Add Cursor ACP probe script and captured session logs
- add `scripts/cursor-acp-probe.mjs` to run ACP protocol probing scenarios
- update `package.json` scripts for probe execution
- include generated probe summaries/transcripts under `.tmp/acp-probe/`
2026-02-28 18:30:45 -08:00
Julius Marminge 2737fb3a08 Add Cursor provider support across backend, contracts, and UI
- Accept `cursor` as a first-class provider in orchestration, persistence, and session directory flows
- Update model/provider inference and normalization to handle Cursor model aliases
- Revamp chat provider/model picker with Cursor-specific trait controls and add coverage in tests
2026-02-28 18:30:45 -08:00
Julius Marmingeandcodex b25442f610 Add Cursor CLI stream event schemas and decoding tests
- define `CursorAdapter` service contract and Cursor stream-json schema types
- add `CursorCliStreamEvent` decoding tests for system/thinking/tool/result/retry events
- add implementation plan for Cursor provider integration

Co-authored-by: codex <[email protected]>
2026-02-28 18:29:14 -08:00
Julius Marminge 2c631e8725 Track runtime event sequence and order thread activities by sequence
- add per-session `sessionSequence` on provider runtime events and persist activity `sequence`
- migrate `projection_thread_activities` with nullable `sequence` column + index
- sort server/web activity projections by sequence fallback to timestamp/id
- allow provider sessions/turns to start before a real threadId is emitted
2026-02-28 12:27:45 -08:00
Julius Marminge d75ca11981 Align Claude permissions and provider-specific reasoning effort
- Default Claude sessions to bypass permissions when approval policy is `never`, while preserving explicit `permissionMode`
- Hide/send reasoning effort only for providers that support it in ChatView
- Add coverage for Claude permission-mode derivation and precedence, and update runtime event model docs
2026-02-28 11:28:54 -08:00
Julius Marminge 02c89a5af6 Stabilize Claude turn event ordering and native event logging
- Preserve active turn state when `session.started`/`thread.started` arrive mid-turn
- Emit `message.delta` from assistant text when stream deltas are missing, then complete the message
- Add Claude native SDK NDJSON observability logging and wire its log path in server layers
- Expand ingestion/adapter tests to cover mid-turn lifecycle and delta fallback behavior
2026-02-27 23:53:47 -08:00
Julius Marmingeandcodex 870096b8a3 Fix ProviderService sendTurn recovery expectation after rebase
Co-authored-by: codex <[email protected]>
2026-02-27 21:38:23 -08:00
Julius Marminge 8d23276aff Ignore stale resume cursors and Claude placeholder thread IDs
- Do not pass `resumeCursor` when restarting a session after changing providers
- Treat synthetic Claude thread IDs (`claude-thread-*`) as unscoped during runtime ingestion
- Add tests covering provider-switch restart behavior and Claude turn lifecycle acceptance
2026-02-27 21:35:57 -08:00
Julius Marmingeandcodex 21130006b9 Align orchestration integration tests with latestTurn metadata
Co-authored-by: codex <[email protected]>
2026-02-27 21:35:57 -08:00
Julius Marminge 3e6ac44156 Fix Claude resume cursor to only persist valid session UUIDs
- Stop synthesizing `resume` from generated thread IDs
- Persist resume session ID from query messages when available
- Validate resume/sessionId values as UUIDs before reuse
- Add tests for valid UUID resume passthrough and no synthesized resume
2026-02-27 21:35:57 -08:00
Julius Marminge 6ff39f9097 Refactor ClaudeCodeAdapter session flow and stream handling
- Replace manual prompt async iterator with `Stream.fromQueue(...).toAsyncIterable`
- Use `Ref` for shared session context in tool approval callbacks
- Simplify timestamp/ID generation and close sessions via queue shutdown
2026-02-27 21:35:57 -08:00
Julius Marminge e5f12e6507 Integrate Claude agent SDK into server provider adapter
- add `@anthropic-ai/claude-agent-sdk` dependency for `apps/server`
- replace placeholder Claude adapter with live session/query/event handling
- add comprehensive adapter tests for runtime events, approvals, resume, rollback, and model overrides
2026-02-27 21:35:57 -08:00
Julius Marmingeandcodex f00d414983 Include all provider models in /model slash command
Co-authored-by: codex <[email protected]>
2026-02-27 21:35:57 -08:00
Julius Marmingeandcodex 67eef99b43 Fix Claude model fallback in web store sync
Co-authored-by: codex <[email protected]>
2026-02-27 21:35:57 -08:00
Julius Marmingeandcodex b6f93eaf5b Update Claude model catalog to latest 4.6/4.5 gen
Co-authored-by: codex <[email protected]>
2026-02-27 21:35:28 -08:00
Julius Marmingeandcodex 600cfaf6b2 Show provider logos in composer model trigger
Co-authored-by: codex <[email protected]>
2026-02-27 21:35:28 -08:00
Julius Marmingeandcodex 8be8fcb415 Use grouped provider/model select in chat composer
Co-authored-by: codex <[email protected]>
2026-02-27 21:35:28 -08:00
Julius Marmingeandcodex e45cd8fec1 Inline Claude adapter behavior into live layer
Co-authored-by: codex <[email protected]>
2026-02-27 21:35:28 -08:00
Julius Marminge fb1e7c18b2 unnecessary catch 2026-02-27 21:35:28 -08:00
Julius Marmingeandcodex b03287ebea Use typed errors for unavailable Claude runtime path
Co-authored-by: codex <[email protected]>
2026-02-27 21:35:28 -08:00
Julius Marmingeandcodex 344d9b46f0 Make Claude runtime boundary Effect-native
Co-authored-by: codex <[email protected]>
2026-02-27 21:35:28 -08:00
Julius Marmingeandcodex 83b72000d2 Add Claude integration coverage across orchestration flows
Co-authored-by: codex <[email protected]>
2026-02-27 21:35:28 -08:00
Julius Marmingeandcodex fb62d21c05 Add Claude checkpoint and revert reactor coverage
Co-authored-by: codex <[email protected]>
2026-02-27 21:35:28 -08:00
Julius Marmingeandcodex b8069d2c4d Enable Claude provider selection in chat composer
Add provider-aware model options and include provider in turn-start dispatch.

Co-authored-by: codex <[email protected]>
2026-02-27 21:35:28 -08:00
Julius Marmingeandcodex 1fb357419e Support provider-aware session selection in reactor
Add restart semantics when requested provider changes and cover with tests.

Co-authored-by: codex <[email protected]>
2026-02-27 21:35:28 -08:00
Julius Marmingeandcodex b8e3b4623d Wire Claude adapter into registry and server provider layer
Add provider-service routing coverage for explicit claudeCode sessions.

Co-authored-by: codex <[email protected]>
2026-02-27 21:35:28 -08:00
Julius Marminge f2e087cba4 Add Claude Code adapter live layer with error mapping tests
- introduce `ClaudeCodeAdapter` service and live layer wiring
- map runtime/session/request failures into provider adapter error types
- add coverage for validation, session-not-found mapping, lifecycle forwarding, and event passthrough
2026-02-27 21:35:28 -08:00
Julius Marminge 310c763ed2 revised plan 2026-02-27 21:35:28 -08:00
Julius Marminge 2ed16e5e2f redo contracts a bit 2026-02-27 21:35:28 -08:00
Julius Marminge 37eb492d95 Add provider-specific model resolution and defaults
- Add per-provider model options, defaults, and slug aliases
- Add provider-aware model normalization/resolution helpers
- Preserve Codex-only constants/functions for backward compatibility
- Extend tests to cover Claude aliases and provider-specific fallback behavior
2026-02-27 21:33:43 -08:00
Julius Marminge d48b42c017 fix type 2026-02-27 21:32:15 -08:00
Julius Marminge fb45896588 simplify layers 2026-02-27 21:30:46 -08:00
Julius Marminge b52518f85f Flatten attachment paths with message-prefixed filenames
- Write projected attachments under the thread directory using `messageSegment-fileName`
- Avoid nested per-message folders while preserving unique, deterministic file paths
- Update projection pipeline tests to match new attachment URLs and on-disk paths
2026-02-27 21:30:46 -08:00
Julius Marminge 3e99019af8 Serve attachments using URL-encoded relative paths
- Read attachment route paths without URI decoding before normalization
- Align test fixture paths with encoded thread/message/file names
2026-02-27 21:30:46 -08:00
Julius Marminge 7d4b02689e Overwrite attachment bytes for repeated message attachment index
- Make projection attachment writes use last-write-wins per file path
- Always write attachment files so updated message attachments replace stale bytes
- Add regression test covering same message/attachment index update behavior
2026-02-27 21:30:46 -08:00
Julius Marminge 9962f57ad0 Preserve empty attachment updates in projection pipeline
- Treat `attachments: []` as an explicit update instead of dropping the field
- Add regression test covering attachment clearing for an existing thread message
2026-02-27 21:30:46 -08:00
Julius Marminge 8b538e2802 dedupe 2026-02-27 21:30:46 -08:00
Julius Marminge a6c57e169a nit 2026-02-27 21:30:46 -08:00
Julius Marminge 6f92f0a668 kewl 2026-02-27 21:30:46 -08:00
Julius Marminge 35817601ff fixxx 2026-02-27 21:30:46 -08:00
Julius Marminge 2b154db938 Add gallery navigation to expanded chat image previews
- Open preview from the full image set instead of a single image
- Add previous/next controls with ArrowLeft/ArrowRight keyboard support
- Keep Escape-to-close behavior and show current image position
2026-02-27 21:30:46 -08:00
Julius Marminge b9ff7aa5cd Make attachment writes transactional and decode attachment URLs
- Stage attachment file writes until projector transactions commit, then apply write/prune/delete side effects
- Remove orphaned attachment files on thread revert and delete thread attachment dirs on thread deletion
- Serve URL-encoded attachment paths in `wsServer` and stream file responses
- Add regression tests for rollback safety, revert/delete cleanup, and encoded attachment URLs
2026-02-27 21:30:46 -08:00
Julius Marminge b5188e8cea Harden attachment materialization and static file path handling
- Materialize only valid image data URLs and restrict inferred file extensions to a safe whitelist
- Preserve existing message attachments on upsert unless explicitly replaced or cleared
- Serve static `/` via `index.html` and block traversal attempts in static file requests
2026-02-27 21:30:46 -08:00
Julius Marminge 992db16586 Persist and serve projected message image attachments
- Store message attachments in `projection_thread_messages.attachments_json`
- Materialize base64 image attachments to `stateDir/attachments` during projection
- Serve `/attachments/*` from the server and resolve preview URLs from WebSocket origin
- Add migration and tests for projection materialization and attachment serving
2026-02-27 21:30:46 -08:00
Julius Marminge 2aad749e24 Reuse persisted cwd when recovering stale provider sessions
- Read and validate `cwd` from persisted runtime payload when restarting sessions
- Apply persisted `cwd` during stale-session recovery paths, including `sendTurn`
- Add tests to verify resumed sessions preserve the original working directory
2026-02-27 20:58:21 -08:00
Julius Marminge aa267ebb05 clamp 2026-02-27 19:27:05 -08:00
Cursor AgentandJulius Marminge 1a33f25970 web: keep active turn out of virtualization
Co-authored-by: Julius Marminge <[email protected]>
2026-02-27 19:27:05 -08:00
Julius Marminge 21c823ecdc Guard delayed terminal exit callback
- Skip `onSessionExited` if exit handling was reset before timeout runs
- Prevent stale async exit callbacks from firing in terminal drawer
2026-02-27 18:08:18 -08:00