Commit Graph

6615 Commits

Author SHA1 Message Date
can1357 0b04fda921 fix(coding-agent): added vision fallback for text-only model image attachments
- Added `images.describeForTextModels` configuration defaulting to true for text models.
- Added `describeAttachedImagesForTextModel` to persist images and generate local:// descriptions.
- Added image-description notices to session flow with hidden typing and pre-user insertion.
- Added fallback behavior that returns notes when vision is unavailable or output is empty.
2026-06-17 12:24:18 +02:00
Can Bölük ec73cbb53e Merge pull request #2813 from usr-bin-roygbiv/agent/json-mode-stdout-hygiene
Keep JSON mode stdout clean during startup
2026-06-17 11:35:04 +02:00
can1357 94a813788f chore: bump version to 16.0.4 2026-06-17 09:44:33 +02:00
can1357 8443a42d25 ux(coding-agent/modes): added troubleshooting tip for PI_DIALECT tool-calling fallback
- Updated the coding-agent modes tips to mention PI_DIALECT for providers that mis-handle native tool calls.
- Clarified a troubleshooting option for restoring behavior when inference providers cannot parse tool-call payloads.
2026-06-17 09:43:45 +02:00
can1357 fb3534740f feat(catalog): added GLM-5.2 reasoning support for ZAI and zhipu completions
- Added ZAI GLM-5.2 reasoning-effort mapping, translating minimal to none and xhigh to max.
- Enabled ZAI and zhipu GLM-5.2 completion requests to send reasoning_effort and tool_stream.
- Added provider token clamping so GLM-5.2 completion requests use capped max_tokens.
- Updated catalog policies to route GLM-5.2 max-token and reasoning support through ZAI/zhipu hosts.
- Removed synthetic HF model entries and aligned GLM-5.2 catalog specs with real providers.

Fixes #2833
2026-06-17 09:38:43 +02:00
can1357 22bd89912d Merge remote-tracking branch 'origin/farm/d2160078/respect-skills-automatically' 2026-06-17 09:37:41 +02:00
can1357 66f0f85d9d Merge remote-tracking branch 'origin/farm/7793113a/fix-rpc-todo-injection' 2026-06-17 09:24:50 +02:00
can1357 882a5e0bf0 Merge remote-tracking branch 'origin/farm/4cf935c9/fix-hashline-ins-post-visible-line' 2026-06-17 09:24:37 +02:00
can1357 2ccbd0bbea fix: skipped oversized spans while continuing BFS summary unfolding
- Changed `select_folded_spans` to skip an unfold candidate that exceeded `unfold_limit` and continue processing the remaining BFS queue instead of breaking.
- Added a regression test in `summary.rs` proving a large `<style>` raw-text span no longer starves sibling HTML sections from unfolding.
- Updated the summary unfold-ceiling setting description to document that overflowed candidates stay folded while BFS continues.
2026-06-17 09:24:19 +02:00
roboomp b112a7d381 fix(prompting): instructed agents to load matching skills
- Added default system-prompt guidance to scan skill descriptions and read applicable skill:// content before work.
- Covered the rendered prompt contract with a frontend-design skill regression test.

Fixes #2829
2026-06-17 04:28:03 +00:00
roboomp 75d8d97220 fix(session): persisted todo reminder injections
Recorded todo reminder developer messages in the session log so JSONL transcripts match model-visible context when reminders are enabled.\n\nFixes #2824
2026-06-17 03:49:55 +00:00
roboomp 80cfc4737c fix(rpc): honored todo setting opt-outs
Preserved project-level todo.enabled, todo.reminders, and todo.eager settings in protocol hosts instead of forcing host defaults.\n\nFixes #2824
2026-06-17 03:30:40 +00:00
roboomp e42353a79b fix(hashline): recorded acp read lines
Merge displayed bridge-backed range and multi-range read lines into the existing hashline snapshot provenance so INS.POST anchors pass visible-line validation after ACP reads.

Fixes #2773
2026-06-17 02:54:26 +00:00
can1357 d5b3c78132 chore: update docs 2026-06-17 04:37:39 +02:00
can1357 ce9db56066 feat(coding-agent): added advisor CLI flag for runtime advisor enabling
- Added a new `--advisor` flag to argument parsing and launch flag definitions.
- Applied the parsed `advisor` flag as a runtime-only override of `advisor.enabled` during startup.
- Updated advisor-related docs and added parseArgs tests for `--advisor` behavior and position handling.
2026-06-17 02:14:11 +02:00
can1357 8eeb707387 chore: bump version to 16.0.3 2026-06-17 01:58:36 +02:00
can1357 467ffb92d6 chore: update changelogs 2026-06-17 01:57:27 +02:00
can1357 b1878bdbe4 Merge remote-tracking branch 'origin/farm/8c67833b/local-auto-thinking-classifier' 2026-06-17 01:57:21 +02:00
can1357 37646a4a14 fix(coding-agent): refined STT warmup and mechanical space-hold handling
- Reworked space-bar hold detection to require sustained mechanical gaps.
- Implemented per-model STT dependency tracking with background warmup and deferred setup.
- Tightened Whisper cache validation to require both encoder and decoder models.
- Caught STT request promise rejections to avoid unhandled rejection noise.
2026-06-17 01:57:14 +02:00
can1357 eaba315cbd security(coding-agent): sanitized artifact names and wrapped extension and MCP tools
- Sanitized artifact filenames by normalizing tool names before composing spill paths.
- Applied `wrapToolWithMetaNotice` to custom tool adapters and RPC-host tools in agent-session setup.
- Wrapped SDK-registered extension/custom tools with the same meta-notice adapter during session creation.
2026-06-17 01:53:24 +02:00
usr_bin_roygbiv 3ea7e4f077 Keep JSON mode stdout clean during startup 2026-06-16 18:51:18 -05:00
roboomp 648f41c710 fix(coding-agent): expanded local auto-thinking budget
- Gave reasoning-capable local auto-thinking classifiers the safe 1024-token answer budget used by online reasoning classifiers.
- Raised the non-reasoning local classifier floor to 16 tokens and allowed tiny completions to honor larger explicit budgets.
- Added regression coverage for qwen3-1.7b and qwen2.5-1.5b local classifier budgets.

Fixes #2808
2026-06-16 23:36:29 +00:00
can1357 abe4453234 fix(coding-agent): stopped coercing explicit provider-id models to Codex
- Removed the Codex-preferred canonical remapping path for exact `provider/id` model matches.
- Resolved explicit `openai/gpt-5.5` references as `openai` provider without redirecting to `openai-codex`.
- Added regression tests to confirm explicit provider/id and enabled-model patterns are not coalesced to Codex.
2026-06-17 01:28:10 +02:00
can1357 d588a7e092 Merge remote-tracking branch 'origin/farm/3fd81e96/codex-default-provider-auth' 2026-06-17 01:24:19 +02:00
can1357 0e049b9a1a test(ai): dropped chdir and env mutation from request-debug recording test
- Replaced `process.chdir(tempDir)` plus `PI_REQ_DEBUG=1` auto-naming with explicit `setNextRequestDebugPath` targets, removing the `previousCwd` save/restore and the `debugFiles` directory-scan helper.
- The PI_REQ_DEBUG recording assertions now read each request/response from the path they set, so the test no longer mutates `process.cwd()` or the global debug env flag.
2026-06-17 01:22:31 +02:00
can1357 ab66280ea6 refactor(coding-agent): removed process.chdir from install and package-dir tests
- Added an optional `cwd` parameter to `looksLikeLocalPath` so bare-name local-directory detection resolves against an explicit path; the install-command test now passes a temp dir instead of `process.chdir`-ing into it.
- Removed `issue-1423-repro.test.ts`, whose package-dir-lookup repro relied on `process.chdir` to stage an isolated project.
2026-06-17 01:22:06 +02:00
can1357 db58a163b2 fix(coding-agent): isolated JS eval runtime globals across runtime lifetimes
- Made `JsRuntime` track the realm globals it installs (`#globalOwner`, `#ownedGlobalKeys`, `PRELUDE_GLOBAL_KEYS`) and reclaim them in `dispose()`, re-binding ownership through `#activateGlobals()` on cwd/run-scope/run; disposing an older inline/direct runtime no longer deletes a newer runtime's helper globals, and overlapping same-realm runs are serialized via `enterGlobalRun`.
- Added `WorkerCore.dispose()` (rejects pending tool calls with `ToolError` and disposes the runtime) and invoked it from `spawnInlineWorker` teardown in `context-manager.ts`.
- Updated the `js-static-import-rewrite` test to snapshot and restore any pre-existing `__omp_import__` global instead of unconditionally deleting it.
- Added `runtime-global-dispose.test.ts` covering newer-runtime global survival, older-runtime reactivation, and cross-runtime mutation rejection.
- Clarified the `runWorkerEntrypoint` comment in `cli.ts` about `parentPort` sync-prefix buffering for tab/eval workers.
2026-06-17 01:21:33 +02:00
can1357 48766eb88a fix(tui): kept ProcessTerminal and window-title writes headless under the test runtime
- `ProcessTerminal` now captures a per-instance `#headless` from `isTerminalHeadless()` at construction and re-reads it in `start()`; when set, `#safeWrite`, `start`, `stop`, `drainInput`, and `setProgress` short-circuit, so frame paints, `start()` probes (OSC 11 / DA1 / kitty), the progress keepalive, stdin raw mode, SIGWINCH, and teardown escapes no longer reach a real terminal during `bun test` (previously `#safeWrite` only skipped on `!isTTY`, so an interactive terminal leaked stray boxes and probe queries).
- Gated the `emergencyTerminalRestore()` blind-restore branch and `TerminalInfo.sendNotification` on the headless flag, and guarded `setTerminalTitle`/`pushTerminalTitle`/`popTerminalTitle` in `title-generator.ts`.
- Opted the terminal-contract suites (terminal-appearance, notifications, emergency-restore-altscreen, issue-2034 write gate, process-terminal-render-harness, render-stress-harness) back into real I/O with `setTerminalHeadless(false)`, restoring on teardown.
- Added `process-terminal-headless.test.ts` asserting zero writes under a forced TTY when headless and real frame/probe output after opt-out.
2026-06-17 01:21:03 +02:00
roboomp 49259311d5 fix(coding-agent): preserve fallback provider order
Limit provider-priority ranking to provider defaults that share the first fallback default id, preserving mixed-provider startup precedence while keeping the OpenAI/Codex tie fix.\n\nFixes #2807
2026-06-16 23:12:39 +00:00
roboomp aec9355b26 fix(coding-agent): prefer codex default auth
Route stale OpenAI GPT default roles through canonical Codex selection when the catalog prefers the Codex OAuth transport, and rank shared provider defaults by canonical provider priority.\n\nFixes #2807
2026-06-16 23:01:57 +00:00
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