Commit Graph

6585 Commits

Author SHA1 Message Date
can1357 cdca5cf93d test(coding-agent): updated steer idle drain tests for queued streaming behavior
- Removed the obsolete non-resumable idle-steer test and updated comments to reflect immediate continue scheduling for idle steering.
- Added a real-timer streaming scenario with a mock model to verify queued image steering is surfaced through clearQueue as normalized text/images while the session is streaming.
2026-06-17 00:52:36 +02:00
can1357 e5975373c3 Merge remote-tracking branch 'origin/farm/cced21e6/hooks-pre-discovery' 2026-06-17 00:22:51 +02:00
can1357 84f8d127dc Merge remote-tracking branch 'origin/farm/41a13455/skip-empty-sessions' 2026-06-17 00:22:34 +02:00
can1357 ef5e5fd27c fix(coding-agent): fixed parked subagent restoration from persisted sessions
- Fixed cold revival flow so parked subagents are restored from persisted sessions at startup.
- Fixed session-init persistence to include spawns and readSummarize fields for replay accuracy.
- Fixed latest-session lookup by adding peekSessionInit for lock-free persisted contract access.
- Added lifecycle and session tests for cold-revive success, decline, and retry paths.
2026-06-17 00:21:20 +02:00
can1357 d6e390c1ca fix(coding-agent): reclaimed stranded advisor cards when interrupted runs settle
- Queued advisor concern cards now get reclaimed as visible advice during settle when auto-resume suppression is active and the session is idle.
- Preserve logic was narrowed to keep advisor cards hidden only during abort teardown, allowing steers during resumed streaming turns.
- A regression test was added to verify stranded advisor steers are persisted as visible advice without triggering an advisor-only resume turn.
2026-06-16 23:14:54 +02:00
can1357 1fa4f2eee8 fix(subagent-session-spawning): resolved subagent parent id propagation
- Forwarded `parentAgentId` through task and eval launch paths when spawning subagents.
- Mapped `parentAgentId` to `parentId` in `createAgentSession`.
- Passed each caller's session `getAgentId` (or `MAIN_AGENT_ID`) as the parent for spawned agents.
2026-06-16 23:03:54 +02:00
can1357 3225e6b4be fix(agent-hub-ui): corrected agent hub render flow in editorContainer
- Fixed Agent Hub display to render in editorContainer instead of floating ui overlay.
- Fixed close flow to clear editorContainer, re-add the editor, and restore editor focus.
- Updated Agent Hub activation tests and removed the probe test fixture.
2026-06-16 23:03:11 +02:00
roboomp e3f48b44bd fix(cli): preserved explicit session rewrites
Kept shutdown flushes lazy while allowing explicit atomic rewrites to materialize pre-assistant session entries.

Added regression coverage for rewriteEntries before the first assistant message.

Fixes #2800
2026-06-16 21:00:25 +00:00
can1357 3459371724 fix(coding-agent/advisor): fixed advisor concern/blocker notes being stranded after interrupts
- Added resolveAdvisorDeliveryChannel in advisor tooling to map each note to aside, steer, or preserve using severity, auto-resume suppression, core-streaming, and abort state.
- Updated AgentSession advice enqueuing to route concern/blocker notes through that resolver, preserving them only when the interrupted turn is idle or tearing down and steering them during active resumed turns.
- Added regression tests for resolveAdvisorDeliveryChannel covering nit versus interrupting severities across streaming, aborting, and suppression combinations.
2026-06-16 22:53:39 +02:00
can1357 d30bec5126 feat(tui): added stacked math rendering through latexToBlock
- Added latexToBlock module that renders stacked fraction math with baseline-aware rows.
- Updated markdown rendering to route display math through latexToBlock with sole-display handling.
- Exported latexToBlock from the package entrypoint and updated changelog docs accordingly.
- Added advisor resume and suppression repro tests in coding-agent for interrupted turn recovery.
2026-06-16 22:53:29 +02:00
roboomp 54e79162b4 fix(cli): skipped empty session persistence
Prevented shutdown flushes from materializing sessions that never produced assistant output, and kept close from marking a non-existent session file current.

Added regression coverage for opening omp and exiting before any prompt or assistant turn reaches history.

Fixes #2800
2026-06-16 20:50:51 +00:00
roboomp 205413860b fix(coding-agent): preserved hook disabled filters
Preserved Settings.disabledExtensions fallback when extension discovery is called without an explicit disabled list and kept hookCapability paths out of extension-module basename filtering.

Fixes #2796
2026-06-16 20:11:09 +00:00
can1357 bfe574443a feat(tui): added LaTeX color and display-math rendering support in TUI output
- Added own-line display-math tokenizers for `$$...$$` and `\[...]` markdown blocks.
- Added delimiter-free `\begin...\end` math parsing in text conversion with multiline row preservation.
- Added ANSI rendering for `\textcolor`, `\color`, `\colorbox`, and `\fcolorbox` with scoped color resets.
- Added tests for LaTeX color and math parsing edge cases, including inline code and nested scopes.
2026-06-16 22:09:32 +02:00
can1357 2d0b80ed51 Merge remote-tracking branch 'origin/farm/d563ece8/fix-always-ask-settings-focus' 2026-06-16 21:46:24 +02:00
can1357 0f013b455e feat: added LaTeX math rendering support for terminal and TUI outputs
- Added LaTeX math and Mermaid allowances in terminal and final-chat prompts.
- Added inline math tokenization in TUI for $, $$, \(\), and \[\].
- Added LaTeX-to-Unicode conversion helpers and exports for math rendering.
- Fixed inline math detection to skip escaped dollars and currency-like spans.
2026-06-16 21:45:10 +02:00
roboomp 20f78c4693 fix(coding-agent): loaded discovered hook factories
Included JS and TS hookCapability results in extension path discovery so hooks under hooks/pre and hooks/post bind to the extension runner without explicit settings entries.

Fixes #2796
2026-06-16 19:44:28 +00:00
can1357 508a9f543e feat: removed render_mermaid tool and added width-aware Mermaid clipping
- Removed render_mermaid from tool discovery, task definitions, and registries.
- Removed renderMermaid setting and prompt/docs references tied to the deleted tool.
- Added maxWidth and theme color options to Mermaid ASCII resolution in markdown flow.
- Re-rendered Mermaid ASCII in both directions and clipped output to available width.
2026-06-16 21:32:39 +02:00
roboomp 27f0b922c7 fix(tui): preserved overlay-owned prompt focus
Overlay roots can now declare nested focus targets they own so visible overlays keep their active child focused while background prompt focus steals remain blocked.

Updated the setup wizard to register scene prompt focus targets and covered the nested prompt path in the overlay focus regression test.

Fixes #2789
2026-06-16 19:06:18 +00:00
can1357 712e859022 feat(coding-agent): restored the verbose /dump and /advisor dump raw output
- Rewrote `formatSessionDumpText` in `session-dump-format.ts` to emit the pre-16.x full dump: system-prompt prelude, model/thinking config, tool inventory with parameters, and the transcript as markdown role headings (`## User`, `## Assistant`, `### Tool Call`/`### Tool Result`), reusing `renderDelimitedThinking` for `<thinking>` blocks.
- Dropped the compact default and the `[raw]` flag from `/dump`: removed the `isRaw` parameter from `handleDumpCommand` in `command-controller.ts`, `interactive-mode.ts`, and `types.ts`, and removed the `inlineHint: "[raw]"`/`compact` plumbing in `builtin-registry.ts`.
- Updated the `formatSessionAsText` doc comment in `agent-session.ts` to describe the verbose dump shape.
- Removed the obsolete `formatSessionDumpText raw thinking` suite from `advisor.test.ts` and refreshed `session-dump-format.test.ts` to assert the verbose dump output.
- Recorded the revert in the coding-agent changelog and trimmed `/dump` from the compact transcript tool-intent-prefix entry.
2026-06-16 20:53:05 +02:00
can1357 5bce7ed6df feat: added advisory transcript formatting and one-shot benchmark metrics
- Introduced advisory note output as `<advisory>` tags with optional severity and guidance.
- Updated session transcript formatting to `### Session update` and inline watched role labels.
- Added shared `escapeXmlText` utility and escaped XML-sensitive text in advisor outputs.
- Added one-shot success run token metrics and one-shot statistics reporting.
2026-06-16 18:34:50 +02:00
can1357 9cb0b4b643 fix(coding-agent): fixed session magic-keyword ordering and stranded queue handling issues
- Fixed magic-keyword notices to preserve ordering in agent-session processing.
- Fixed stranded queue behavior during queued steer/skill delivery in session logic.
- Updated agent-session and input-controller tests covering suppression, keywords, and queues.
- Updated unreleased changelog notes describing the magic-keyword and queue fixes.
2026-06-16 17:59:15 +02:00
can1357 1e3909a151 fix(coding-agent/session): split queued-message editor restore between dequeue and interrupt
- Generalized `isUserQueuedMessage` to a user-attribution predicate (`role === "user"` or custom `attribution === "user"` and not display-suppressed) so visible agent-authored steers (advisor cards, IRC/extension asides) and hidden goal/plan/budget steers are all excluded from editor restore, not just advisor cards.
- Gave `AgentSession.clearQueue` a `{ forInterrupt }` option: plain Alt+Up dequeue restores user messages and preserves every other queued message for the continuing stream, while Esc+abort keeps only advisor cards (for `abort()`'s `#extractQueuedAdvisorCards` preservation) and drops other internal steers so the post-abort `#drainStrandedQueuedMessages` can't auto-resume the interrupted run.
- Threaded `forInterrupt: options?.abort` from `InputController.restoreQueuedMessagesToEditor` and kept `queuedMessageCount` on actual displayable-queue semantics so `hasPendingMessages()`/RPC and the empty-submit abort gate stay accurate.
- Updated skill-queue tests to cover both policies (hidden and visible agent-authored steers preserved on dequeue, dropped on interrupt) and refreshed the changelog entry.
2026-06-16 16:27:53 +02:00
can1357 6bbc573c6f fix(coding-agent/session): suppressed subagent breadcrumbs so --continue resumes the parent session
- Added a `suppressBreadcrumb` option to `SessionManager.open()` so headless opens skip writing the per-TTY `--continue` breadcrumb, and passed it from the subagent opens in `task/executor.ts` and the HTML export open in `export/html/index.ts`, which run in the parent's terminal and were clobbering the breadcrumb with their own artifact-dir session file.
- Added `resolveBreadcrumbToInteractiveRoot()` and applied it in `continueRecent()` so already-poisoned breadcrumbs pointing inside a parent's artifacts dir (`<parent>/<agentId>.jsonl`) resolve back up to the top-level interactive session.
- Added `subagent-breadcrumb.test.ts` covering both that a subagent open keeps `--continue` on the parent and that a stale subagent-pointing breadcrumb is recovered.
2026-06-16 16:05:50 +02:00
can1357 623e9d3710 fix(coding-agent/session): restricted queued-message editor restore to user-authored messages
- Added `isUserQueuedMessage()` to `agent-session.ts`, treating only plain user turns and visible `attribution: "user"` custom messages (e.g. `/skill`) as restorable, so advisor concern/blocker notes, hidden goal/plan/budget steers, and IRC/extension asides no longer leak into the editor on Esc/Alt+Up.
- Reworked `clearQueue()` to return only user-authored messages while re-queuing advisor cards via `replaceQueues()` (so the user-interrupt abort path still re-records them as advice) and dropping other agent-authored steers to prevent a silent auto-resume on leftover internal context.
- Filtered `getQueuedMessages()` chips and rewrote `popLastQueuedMessage()` to skip agent-authored cards and pull the last user-authored entry, while `queuedMessageCount` still counts all displayable queued work.
- Extended `input-controller-skill-queue.test.ts` with a `queueAdvisorSteer` helper and cases asserting advisor/IRC cards count as pending work but stay out of chips, restore, and `popLastQueuedMessage`, and survive `clearQueue()`.
2026-06-16 16:05:36 +02:00
can1357 bbb41a3c93 fix(coding-agent/modes): started orphaned idle submits as real prompts instead of steering them
- Changed `InputController`'s no-input-waiter submit path to call `session.prompt(text, { streamingBehavior: "steer", images })` instead of `session.steer(text, images)`, so a submission made while the loop is idle between turns starts a real prompt rather than queueing behind a non-resumable transcript; the steer streaming behavior still preserves queueing if a background turn races in.
- Updated the failure-recovery comment to reference prompt dispatch rejection.
- Rewrote `input-controller-orphan-submit.test.ts` to assert the `prompt` dispatch path and added a real-session case proving an orphaned idle submit starts via `agent.prompt` (not `continue`) and leaves no queued messages.
- Added the `### Fixed` CHANGELOG block under `[Unreleased]`; its three entries are adjacent lines forming one indivisible run, so this commit also carries the changelog text for the queued-restore and breadcrumb fixes that follow.
2026-06-16 16:05:23 +02:00
can1357 dc14689fc1 chore: bump version to 16.0.2 2026-06-16 15:33:47 +02:00
can1357 97a8c2186b fix(coding-agent/session): excluded streaming-edit guard aborts from reasonless retry
- Updated #isRetryableReasonlessAbort to reject reasonless aborts when the streaming-edit guard flag is set.
- This prevented routing those aborts through retry logic and avoided prompt hangs or unintended guard bypasses during edit-stream recovery.
2026-06-16 15:32:59 +02:00
can1357 fba72680ed chore: update changelogs 2026-06-16 15:22:43 +02:00
can1357 5d875e9574 Merge PR #2753: fix(agent): retry subagent model fallback chains
Install a subagent's ordered model candidates as child-session retry fallback chains so a retryable provider failure advances to the next candidate instead of killing the worker (issue #2750).
2026-06-16 15:22:16 +02:00
can1357 a31fbf0683 Merge PR #2710: fix(providers): preserve OpenRouter upstream routing
Preserve OpenRouter @upstream routing (issue #2708). Includes review fix 6b6e9aaffc: gate the @upstream fuzzy bypass to aggregator providers, fixing a non-aggregator Vertex @default regression.
2026-06-16 14:53:40 +02:00
can1357 3aea0bfb38 Merge PR #2714: fix(plugins): resolve directory extension manifest entries one level deep
Resolve directory extension manifest entries one level deep with manifest-first precedence (issue #2713). Supersedes #2723.
2026-06-16 14:53:39 +02:00
can1357 10a9d4734c Merge PR #2722: test(plugins): isolate discovery test from real ~/.omp on all platforms
Isolate the plugin-discovery test from the real ~/.omp on all platforms via an os.homedir mock, cleared XDG vars, and a pre-write guard (issue #2721). Supersedes #2724 (Windows-only).
2026-06-16 14:53:39 +02:00
can1357 89d4dfae46 Merge PR #2751: fix(providers): handle Umans Kimi output caps and web search
Clamp Umans Kimi output caps, forward the gateway web-search header on per-request options, and escape builtin tool names for Umans. NOTE: bundle regen pulled incidental, benign models.dev drift.
2026-06-16 14:53:39 +02:00
can1357 13bcefd414 Merge PR #2689: fix(session): retry empty reasonless aborts
Auto-retry empty/reasonless provider aborts without model fallback (issue #2685). Includes review fix b7a3d01439: skip the retry while the session is disposing to avoid a shutdown hang.
2026-06-16 14:52:42 +02:00
can1357 cdc9970d9e Merge PR #2682: feat(coding-agent): re-inject eager task/todo nudges after compaction
Re-inject eager task/todo reminders after compaction (reminder-only, no forced tool_choice; issue #2681). Supersedes #2686. Known follow-up: shake-strategy compaction may duplicate a surviving prelude.
2026-06-16 14:52:42 +02:00
can1357 aa848034c6 Merge PR #2702: fix(ai): unwrap thinking envelopes in raw dumps
Unwrap literal <thinking> envelopes in the render-layer raw dumps (issue #2700). Includes review test 222562ecb2 (render-layer regression coverage). Orthogonal to #2698 (provider-source layer).
2026-06-16 14:52:42 +02:00
can1357 c68e84bec8 Merge PR #2704: fix(tool): default Windows bash children to UTF-8
Default Windows bash child processes to a UTF-8 locale; win32-gated so POSIX behavior is byte-identical, and existing user LANG/LC_* values are preserved.
2026-06-16 14:52:41 +02:00
can1357 0c3154039b Merge PR #2734: fix(coding-agent): load GitHub Copilot instruction rules
Load .github/instructions/*.instructions.md as rules. Includes review fix c509a5d59c: split comma-separated applyTo via parseCSV and treat **/* as an always-apply glob.
2026-06-16 14:52:40 +02:00
can1357 9e6f6b2862 Merge PR #2745: fix(cli): speed up exit shutdown handlers
Run session_shutdown extension handlers concurrently under one shared cap instead of serially; each handler keeps its full per-handler timeout budget.
2026-06-16 14:52:40 +02:00
can1357 ef13d40854 Merge PR #2746: fix(cli): list linked local plugins
Union plugins/package.json dependencies with the lockfile so linked local plugins appear in list() and are not treated as orphans by doctor() (issue #2742). Supersedes #2743 (which left doctor() deleting linked entries).
2026-06-16 14:52:40 +02:00
can1357 90e6b7d91f Merge PR #2772: fix(coding-agent): route MuPDF warnings to logger
Route MuPDF WASM print/printErr warnings to logger.debug instead of console.error/the TUI (issue #2766). NOTE: duplicates #2768 for the same issue; merged as the more complete fix (ships an end-to-end regression test) - close #2768.
2026-06-16 14:52:40 +02:00
can1357 b7a3d01439 fix(session): skip reasonless-abort retry while disposing
A dispose-driven bare abort() yields the same empty/reason-less aborted turn as a transient provider abort, but with #isDisposed set and #abortInProgress unset. #isRetryableReasonlessAbort matched it and routed it through #handleRetryableError, which created #retryPromise and scheduled a continuation the disposed guard then skipped without resolving the promise — hanging the in-flight prompt() in #waitForPostPromptRecovery during shutdown.

Guard the predicate on !#isDisposed so lifecycle aborts settle the turn, and add a regression test. Addresses review feedback on #2689.
2026-06-16 14:37:02 +02:00
roboomp eca8d120dd fix(session): retried reasonless empty aborts
Empty provider-side aborted turns now enter the existing auto-retry path without switching retry model fallback, while aborted turns with partial content still settle normally.\n\nFixes #2685
2026-06-16 14:31:15 +02:00
can1357 6b6e9aaffc fix(coding-agent): limit @upstream fuzzy bypass to aggregators
The routing bypass in matchModel() returned early for any provider whose
post-slash id contained a valid @slug, so fuzzy provider-qualified patterns
over non-aggregator ids that legitimately end in @ (e.g. google-vertex/opus@default
-> claude-opus-4-8@default) resolved to nothing. Gate the bypass on
providerModels.some(supportsUpstreamRouting) so only OpenRouter / Vercel Gateway
short-circuit to the routing fallback. Addresses Codex review feedback on #2710.
2026-06-16 14:25:53 +02:00
can1357 c509a5d59c fix(coding-agent): honor comma-separated and **/* Copilot applyTo globs
GitHub documents applyTo as a single comma-separated string (e.g.
"**/*.ts,**/*.tsx") and treats both ** and **/* as all-files. The rule
loader kept the whole CSV value as one glob and missed **/* for
always-apply. Split applyTo via parseCSV and include **/* as all-files.

Addresses review feedback on #2734.
2026-06-16 14:23:50 +02:00
metaphorics c0ceef7af2 feat(coding-agent): re-inject eager task/todo nudges after compaction
The first-message eager-task / eager-todo preludes are the oldest messages in a
session, so auto-compaction summarizes them away and the agent silently loses the
delegate-via-tasks / phased-todo guidance mid-work. Re-assert those reminders on
the auto-continuation turn that follows a compaction.

- Widen #createEagerTaskPrelude / #createEagerTodoPrelude to accept
  `string | undefined`; `undefined` (post-compaction) skips only the
  first-message and prompt-suffix gates, keeping the mode / agent-kind /
  plan-mode / surviving-todo / active-tool gates intact.
- Reminder-only post-compaction: the todo nudge never attaches a forced `todo`
  tool_choice on the resumed turn (forcing a tool after a mid-turn compaction
  would override the agent's in-flight action).
- Add #buildPostCompactionEagerNudges() and prepend its output on the single
  #scheduleAutoContinuePrompt continuation hook. All three call sites are
  willRetry-safe, so overflow/incomplete retry recoveries never carry the nudge.

Op: extend
2026-06-16 14:22:51 +02:00
roboomp 9b2ec0fa74 fix(coding-agent): routed mupdf warnings to logger
Installed the MuPDF WASM print hooks before markit-ai can import mupdf, preserving recoverable PDF warnings in the file logger instead of terminal stderr.\n\nAdded a regression test with a tagged PDF Screen annotation that previously reached console.error while conversion still succeeded.\n\nFixes #2766
2026-06-16 11:30:54 +00:00
roboomp 7b62bffb34 fix(agent): matched routed retry primaries
Matched retry fallback roles against the plain model selector as well as the routed in-flight selector, preserving configured chains for compat-routed OpenRouter and Vercel models.

Added regression coverage for a compat-routed OpenRouter primary using a plain role selector.
2026-06-16 09:01:58 +00:00
roboomp 3d3cdb42d4 fix(agent): kept at-suffixed fallback ids
Stopped retry fallback selector parsing from treating every @ suffix as upstream routing, preserving exact model ids like google-vertex Claude @default variants.

Resolved fallback candidates from raw selectors during preflight so routed selectors still work without corrupting exact at-suffixed ids.
2026-06-16 08:37:49 +00:00
roboomp ad58175946 fix(agent): restored routed retry primaries
Resolved retry fallback primaries from the raw selector during cooldown restore so OpenRouter and Vercel upstream pins survive fallback recovery.

Added regression coverage for routed OpenRouter primaries reverting after cooldown expiry.
2026-06-16 08:16:49 +00:00