Commit Graph

10732 Commits

Author SHA1 Message Date
roboomp e6cdfd6187 fix(session): cleared session-scoped tool state
Cleared queued tool-choice directives and ACP always decisions after successful logical session transitions.

Added new-session and cross-session regression coverage for staged resolves and both ACP always decisions.

Fixes #4093
2026-07-24 02:23:15 +02:00
can1357 3d64910bb0 feat(coding-agent/live): added realtime voice interaction with Codex Live sessions (experimental)
- Added `src/live/` subsystem with WebRTC transport, protocol parser, session controller, and headless Chromium audio injection.
- Added `LiveVisualizer` component with phase states, transcript display, and animated waveform rendering.
- Added `/live` slash command and `LiveCommandController` to toggle live voice sessions.
- Suppressed local TTS via `vocalizer.suspend()` during live mode to prevent audio conflicts.
- Added live-instructions and agent-final-message prompts for agent messaging context.
- Added `protocol.test.ts` covering event parsing, chunking, and context message construction.
2026-07-24 02:20:43 +02:00
can1357 9a2639e507 refactor(session): converted PERMISSION_OPTIONS_BY_ID from object to Map
- Changed lookup from bracket notation to Map.get() to safely fail closed on unknown permission IDs.
2026-07-24 01:42:25 +02:00
can1357 f5a4c5fe2a fix(coding-agent): exported advisor stats types and update move command test
- Export specific advisor stats types instead of re-exporting all session advisors.
- Update move command tests to mock session-level move actions.
2026-07-24 01:37:41 +02:00
can1357 505af4188f fix(coding-agent/modes): pinned displaceable transcript snapshots to viewport
- Pinned displaceable snapshots like hub waiting polls and todo lists to the viewport during active execution.
- Prevented unpinned spinner ticks from repeatedly committing mutating rows to native scrollback and force-sealing blocks.
2026-07-24 01:25:29 +02:00
can1357 7eeaba0471 refactor(coding-agent/session): restructured monolithic agent session
- Extracted internal handlers and logic from AgentSession into dedicated runner, guard, and coordinator modules.
- Created standalone modules for bash execution, evaluation runners, IRC bridging, and prewalk coordination.
- Established dedicated session components for tracking stats, todos, streams, and retry fallback chains.
- Preserved existing session behavior while significantly reducing monolithic class size and complexity.
2026-07-24 01:24:44 +02:00
can1357 126765c020 docs: add Vibe mode and /fresh session-reset documentation
Closes #6440
2026-07-23 23:16:16 +02:00
can1357 e23359fd1a fix(prompts): restored JS spread operator mangled into Unicode ellipsis by reformat
- 24e2a52615 turned ...f into …f inside the workflow-notice parallel example, making the copyable snippet a syntax error.
2026-07-23 23:15:31 +02:00
roboomp 48be4674e9 docs: document /vibe mode and /fresh command
/vibe (a full director/worker orchestration mode) had no user-facing
documentation, and /fresh appeared only as a matrix row in the
session-operations doc whose title already promised a "fresh" section.
Neither was mentioned in the README.

- Add docs/vibe-mode.md: enable/disable, fast/good worker tiers, the five
  vibe_* control tools, and the director workflow.
- Add a "## Fresh" section to the session-operations doc describing the
  provider-stream/session-state reset and its contrast with /new and /drop.
- Add a "Session controls" subsection to the README linking both docs.

Fixes #6440
2026-07-23 21:12:08 +00:00
can1357 46d2b7d864 Merge PR #6439: fix(compaction): stop feeding reasoning back to Claude summarizer (@roboomp) 2026-07-23 23:05:47 +02:00
can1357 8cab2b7cd5 fix(session): run prompts issued while disposing instead of dropping them
- The memory-backend transition await added in PR #6428 guarded with #isDisposed, which beginDispose() sets immediately; prompts issued in the disposing window were silently dropped instead of running their final turn and settling via the dispose abort.
- Guard now only drops the prompt when disposal began during the transition await.
2026-07-23 22:42:34 +02:00
roboomp 5a70eda7d7 fix(compaction): stop feeding reasoning back to Claude summarizer
Both compaction serializers reproduced prior assistant reasoning as text
bound for a Claude target, tripping Anthropic's reasoning_extraction
refusal and wedging Fable 5 sessions:

- context-full: serializeConversation rendered thinking verbatim inside
  <thinking> tags via the anthropic dialect renderer. Now drops thinking
  blocks when the summary target dialect is anthropic; other dialects
  (e.g. Harmony) keep native reasoning.
- snapcompact: emitted ¶think sections baked into replayed archive
  frames. Added an includeThinking serialize option (default true) and
  wired the agent session to disable it for Anthropic-dialect models.

Fixes #6093
2026-07-23 20:38:27 +00:00
can1357 83e0e4cdac Merge PR #6435: fix(session): resume resolved tool stalls (@roboomp) 2026-07-23 22:38:05 +02:00
can1357 b326e79e6e chore: applied formatter and dropped unused catch binding from merged lsp fix 2026-07-23 22:27:08 +02:00
can1357 69056ac7f2 chore(changelog): restored released sections and added missing tui entry
- Rebuilt coding-agent released sections verbatim from main after the changelog union driver relocated a released webSearch entry during the merges.
- Added the missing tui [Unreleased] entry for the cursor-key/keypad teardown fix from PR #6398.
2026-07-23 22:25:29 +02:00
can1357 9c44ad185c fix(read): restored untilAborted import dropped by merge overlap of #6404 and #6417
- #6417 moved findUniqueSuffixMatch (the only prior untilAborted user) out of read.ts and removed the import; #6404 added new untilAborted callsites in regions git auto-merged without conflict.
2026-07-23 22:19:37 +02:00
roboomp 055a0ce0af fix(session): resumed resolved tool stalls
- Preserved stalled assistant turns when every emitted tool call had a result, including synthetic unexecuted results.

- Kept unresolved and non-stall tool errors replay-safe and covered terminal error agent_end delivery.

Fixes #6414
2026-07-23 20:18:03 +00:00
can1357 9c35eb225a chore(changelog): normalized unreleased sections after merges 2026-07-23 22:17:17 +02:00
can1357 29c2bd2595 Merge PR #6415: fix(compaction): judge remote-preserve reuse against the active model (@roboomp)
# Conflicts:
#	packages/coding-agent/src/session/agent-session.ts
2026-07-23 22:16:11 +02:00
can1357 72ff07ff84 Merge PR #6428: fix(memory): synchronize live backend lifecycle (@roboomp) 2026-07-23 22:15:25 +02:00
can1357 c6e8ff5494 Merge PR #6409: fix(bedrock): validate prompt cache checkpoints (@riverpilot) 2026-07-23 22:15:24 +02:00
can1357 eaa3002b9d fix(tts): cap replay retention so long utterances stay bounded in memory
Streamed PCM kept for the nonzero-exit replay is now dropped once the
utterance exceeds 60s (~5.8 MB at 24 kHz mono f32): the recovered failure
is a short clip that fits the pipe buffer before a broken backend dies,
while replaying a long already-played utterance would duplicate audio and
unbounded retention would defeat streaming for long input.
2026-07-23 22:15:24 +02:00
can1357 46ae99cea8 Merge PR #6421: fix(tts): play buffered audio when streaming backend exits nonzero (@roboomp) 2026-07-23 22:15:24 +02:00
can1357 2ecba08e2a Merge PR #6407: fix(browser): bound open timeout and lease browser across tab acquisition (@roboomp) 2026-07-23 22:15:24 +02:00
can1357 ad1713632b Merge PR #6405: fix(eval): coalesce dead Python kernel replacement (@roboomp) 2026-07-23 22:15:23 +02:00
can1357 bbf0402990 fix(coding-agent): surface JSON-RPC error code so -32601 method-not-found is recognized regardless of message text
Codex P2 on #6403: sendRequest rejected with only the server's error
message; a server answering rust-analyzer/reloadWorkspace with code
-32601 but nonstandard text (e.g. "Unknown request") would fail
isMethodNotFoundError and turn lsp reload into a hard error instead of
falling back to the generic reload. Include the code in the rejection
message so the existing -32601 substring check matches. Adds a
regression test with a -32601/"Unknown request" response.
2026-07-23 22:15:23 +02:00
can1357 221c93c88b Merge PR #6403: fix(coding-agent): propagate cancellation from lsp reload instead of false restart (@roboomp) 2026-07-23 22:15:23 +02:00
can1357 418076e44a fix: treat escaped quotes inside double-quoted backticks as inner quoting
Bash treats \" inside a backtick substitution nested in double quotes as
a quote delimiter for the inner command; the generic backslash-skip made
isInsideShellQuote report such quoted literals as unquoted, wrongly
expanding internal URLs inside them (Codex P2 review finding).
2026-07-23 22:15:23 +02:00
can1357 5ac3094d88 Merge PR #6418: fix(tool): expand internal urls inside backtick substitutions (@roboomp) 2026-07-23 22:15:23 +02:00
can1357 cf886d8d8a fix(edit): reuse resolved workspace target across apply_patch hunks for the same authored path 2026-07-23 22:15:23 +02:00
can1357 a5e59a4e56 Merge PR #6417: fix(edit): align relative path resolution (@roboomp) 2026-07-23 22:15:22 +02:00
can1357 c991270145 Merge PR #6404: fix(coding-agent): make PDF image cache content-aware (@roboomp) 2026-07-23 22:15:22 +02:00
can1357 a6072d0013 Merge PR #6427: fix(session): validate blob refs before path join (@roboomp) 2026-07-23 22:15:22 +02:00
can1357 449762b0e9 Merge PR #6426: fix(session): serialize ArtifactManager first-use init (@roboomp) 2026-07-23 22:15:22 +02:00
can1357 3e445dccd9 test(mcp): use Promise.withResolvers in hanging-fetch helper per AGENTS.md 2026-07-23 22:15:21 +02:00
can1357 e8502806ff fix(mcp): retry smithery poll timeouts until the authorization deadline
A single hung/slow poll now aborts with TimeoutError after 30s; without
this, that one timeout escaped #waitForSmitheryCliApiKey and dropped the
browser login to the manual API-key fallback instead of retrying until
the 5-minute deadline. Catch isTimeoutError in the poll loop and
continue; export SmitheryCliPollResponse to type the retried response.
2026-07-23 22:15:21 +02:00
can1357 db2601eaff Merge PR #6425: fix(mcp): bound oauth discovery and smithery poll fetches with abort timeouts (@roboomp) 2026-07-23 22:15:21 +02:00
can1357 a18956ded9 Merge PR #6424: fix(mcp): serialize mcp.json config writes and use unique temp path (@roboomp) 2026-07-23 22:15:21 +02:00
can1357 ef39fe18b9 Merge PR #6420: fix(tui): re-resolve transient status colors on theme swap (@roboomp) 2026-07-23 22:15:21 +02:00
can1357 7158dcd9b3 fix(coding-agent): deferred hub tool renderer access to avoid temporal dead zone
- Convert the hub tool renderer to a lazy getter to prevent initialization-order temporal dead zone issues.
- Add session move support to the fake ACP builtin session runtime.
2026-07-23 21:54:35 +02:00
roboomp 5a1f227a6b fix(memory): synchronized live backend lifecycle
- Serialized backend transitions across runtime state, tools, and prompts.
- Rehydrated Mnemopi listeners after clear and enqueue maintenance.
- Made memory.backend the sole post-migration local runtime gate.

Fixes #5638
2026-07-23 19:52:09 +00:00
roboomp 5f47afba16 fix(session): validate blob refs before path join
parseBlobRef sliced the blob:sha256: suffix and returned it unvalidated;
get/getSync then fed it into path.join(this.dir, hash), so a crafted ref
like blob:sha256:../../../etc/passwd escaped the blob directory and read
arbitrary files into resolved image history (base64, raw UTF-8, and the ACP
sync path).

Reject any suffix that is not a canonical 64-char lowercase hex hash in
parseBlobRef, the single choke point for every resolution entry point. Reuse
the shared BLOB_HASH_RE in gc-cli instead of its duplicate HASH_RE.

Fixes #4088
2026-07-23 19:51:53 +00:00
roboomp 34fef55d25 fix(session): serialize ArtifactManager first-use init
#ensureDir checked #initialized then set it across an await
#scanExistingIds() gap, so two concurrent first-use save/allocatePath
callers both re-seeded #nextId=maxId+1 and allocateId() handed both the
same id — silently overwriting the first artifact (same toolType) or
making artifact:// resolution ambiguous (different toolTypes).

Memoize the initial scan as a single in-flight #initPromise so all
concurrent callers share one initialization and receive distinct ids.

Fixes #4091
2026-07-23 19:46:30 +00:00
roboomp af3883c052 fix(mcp): bound oauth discovery and smithery poll fetches with abort timeouts
MCP OAuth endpoint discovery ran metadata, well-known, and recursive
authorization-server fetches with no AbortSignal, and the Smithery
browser-login poll received a never-aborting signal. An endpoint that
accepts the TCP connection but never responds stalled /mcp add,
/mcp reauth, the add wizard, or /mcp smithery-login indefinitely; the
5-minute login/poll deadlines run only after discovery resolves or
between polls, so a hung fetch never reached them.

- discoverOAuthEndpoints and fetchResourceMetadataScopes gain an optional
  signal and wrap every fetch in withTimeoutSignal(DISCOVERY_FETCH_TIMEOUT_MS,
  opts?.signal), threaded through the recursive authorization_servers call.
- pollSmitheryCliAuthSession wraps its fetch in
  withTimeoutSignal(SMITHERY_POLL_TIMEOUT_MS, signal) so a hung poll aborts
  and the loop reaches its 5-minute deadline.

Fixes #4103
2026-07-23 19:45:41 +00:00
roboomp 15577406f8 fix(mcp): serialize mcp.json config writes and use unique temp path
Every exported read-modify-write on mcp.json (add/update/remove server, disabled/force-enabled lists) now runs under a per-file withFileLock, so overlapping in-process or cross-process mutations no longer lose updates. writeMCPConfigFile writes to a pid+uuid temp file instead of a shared ${filePath}.tmp, so concurrent writers cannot rename each other's temp out from under them (ENOENT / clobber).

Fixes #4104
2026-07-23 19:40:13 +00:00
roboomp 06661566dd fix(tts): played buffered audio when streaming backend exits nonzero
`omp say` for a short single-segment clip printed `spoke` but produced no
sound on hosts where the first streaming backend (bundled ffmpeg without a
pulse/alsa output device) spawns then exits nonzero. The single pipe write
succeeds into the OS buffer before the backend dies, so the drain's
broken-pipe replay never fires, and `player.end()` sets `#inputClosed`
before the exit lands, so the early-exit handler short-circuits and never
advances to paplay/aplay. The end-of-stream cleanup awaited the exit but
ignored its code.

StreamingAudioPlayer now retains the utterance PCM and, when the streaming
backend exits nonzero, replays it through per-file playback so short clips
still reach the speakers. Added injectable backend/file-playback seams and a
regression test exercising the nonzero-exit, clean-exit, and no-backend
paths.

Fixes #5875
2026-07-23 19:21:39 +00:00
roboomp 93d032a144 fix(tui): re-resolve transient status colors on theme swap
Status presenters (showWarning/showError/showStatus and extension/tool
error presenters) baked theme.fg() into Text at construction, so a
warning shown while the auto-theme default guess was dark kept the
dark-mode color after async appearance detection switched the active
theme to light — dark-catppuccin Mocha yellow on the light Latte
background (1.12:1 contrast, effectively invisible).

Add Text.setStyleFn(), a foreground styler evaluated at render time, and
route the transient status presenters through it. Because the coding
agent invalidates status components on onThemeChange, a theme swap now
re-shapes them against the live theme instead of replaying the palette
active when they were constructed.

Fixes #6337
2026-07-23 19:20:53 +00:00
roboomp 70e92d32a6 fix(tool): expand internal urls inside backtick substitutions
isInsideShellQuote opened an expansion context for $() command
substitution but never tracked legacy backtick substitution, so an
unquoted skill:// (or other supported scheme) nested directly inside a
backtick pair within double quotes kept the outer quote active and was
left literal. Treat an unescaped backtick as an expansion-context
boundary on the same substitution stack, restoring the outer quote when
the pair closes, matching $() behavior including nesting in either
order. Single-quoted and escaped-backtick text stay literal.

Fixes #5645
2026-07-23 19:20:08 +00:00
Alexander Kirilin 1fa847dfdf feat(catalog): model Bedrock prompt cache limits 2026-07-23 15:18:37 -04:00
roboomp 662e4392da fix(edit): aligned relative path resolution
- Shared unique workspace suffix resolution between read and direct edit modes.

- Preserved create destinations and ambiguous-path failures while resolving existing update targets.

- Added direct replace, patch, and apply_patch regression coverage.

Fixes #6359
2026-07-23 19:14:09 +00:00