Commit Graph

6563 Commits

Author SHA1 Message Date
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
oldschoola 251d7dbb86 fix umans gateway websearch handling 2026-06-16 01:14:43 -07:00
roboomp 3cdb867d28 fix(agent): preserved routed subagent fallbacks
Kept OpenRouter and Vercel upstream routing suffixes in subagent retry fallback selectors so same-base routed candidates stay distinct.

Resolved retry fallback candidates from the raw selector before model switching so routed fallback models keep their requested upstream route.
2026-06-16 07:47:48 +00:00
roboomp 3742e07791 fix(agent): prioritized subagent fallback chains
Placed subagent-scoped fallback chains ahead of inherited retry chains so overlapping primary selectors prefer the explicit subagent model order.

Expanded the regression to pin fallback chain insertion order when a global chain shares the same primary selector.
2026-06-16 07:09:14 +00:00
roboomp 8c9910318d fix(agent): retried subagent model fallbacks
Installed subagent-scoped retry fallback chains from ordered task model candidates so provider failures can advance to the next configured worker model.

Updated task result tracking to surface the fallback-applied final model and added focused regression coverage for the executor wiring.

Fixes #2750
2026-06-16 06:48:55 +00:00
roboomp 4c336543d5 fix(cli): preserved linked plugin doctor state
Taught plugin doctor to treat lockfile-only plugins with node_modules entries as installed instead of orphaned.

Added coverage for plugin doctor --fix after linking a local plugin without package dependencies.

Fixes #2742
2026-06-16 05:17:24 +00:00
roboomp 7244e21b73 fix(cli): listed linked local plugins
Included lockfile-only linked plugins when building plugin list output so local symlink installs are visible after successful link operations.

Added regression coverage for plugin link followed by plugin list --json.

Fixes #2742
2026-06-16 05:02:20 +00:00
roboomp df510d3b1d fix(cli): sped up exit shutdown handlers
Run session_shutdown extension handlers concurrently under the existing shutdown cap so /exit and /quit do not wait one full timeout per hanging extension.

Fixes #2736
2026-06-16 04:49:58 +00:00
roboomp 063ce1ba00 fix(coding-agent): loaded github instruction rules
Added GitHub Copilot instruction-file discovery to the github rule provider path, mapping applyTo frontmatter into always-apply or glob-scoped rules and avoiding duplicate always-apply prompt content when context imports the same file.\n\nFixes #2731
2026-06-16 02:30:58 +00:00
ryjm c2a14a0afc fix(ast): infer extensionless Emacs init files 2026-06-15 18:58:55 -07:00
ryjm 18f11f5bfc feat(ast): add Emacs Lisp tree-sitter support
Register tree-sitter-elisp in the shared AST language registry so
.el files infer the emacs-lisp grammar across blockRangeAt,
summarizeCode, astGrep/astEdit, and native aliases.

This fixes edit-tool block operations on top-level Emacs Lisp forms
instead of returning unsupported-language block errors.

- Add canonical emacs-lisp aliases and .el extension inference.
- Teach summaries to fold Lisp forms without grouping arbitrary lists.
- Map .el rendering and highlighting aliases through coding-agent/native.
- Cover defun, ERT, use-package, with-eval-after-load, pcase,
  summary, astMatch, astEdit, and edit-tool insertion paths.
- Document the language and update package changelogs.
2026-06-15 18:41:24 -07:00
Asaf Mahlev a392798f59 test(plugins): isolate discovery test from real ~/.omp on all platforms
plugin-extensions-discovery.test.ts redirected XDG_DATA_HOME to a temp dir to isolate the plugins directory, but XDG is gated to Linux/macOS in dirs.ts, so on Windows getPluginsDir() still resolved to the real ~/.omp/plugins. The suite then wrote fixtures into -- and fs.rmSync'd the node_modules of -- the developer's real plugins directory, wiping installed plugins (green on Linux CI, destructive on Windows local).

Isolate the whole config root cross-platform: mock os.homedir() so configRoot = <tempHome>/.omp, AND clear the XDG_* vars in beforeEach (restored in afterEach). Clearing XDG is required because on Linux/macOS the resolver prefers $XDG_DATA_HOME/omp over the home config root when that dir exists, so an XDG-migrated environment would otherwise still resolve -- and these tests would rm -r -- the real plugins dir. Test-only; no production change.

Verified on Windows: real ~/.omp/plugins/package.json sha256 is unchanged across a full run; with XDG_DATA_HOME set to a sentinel containing an omp/ dir, no plugins dir is created there. 9/9 tests pass.
2026-06-16 03:04:21 +03:00
Asaf Mahlev b740faf6ce fix(plugins): resolve directory extension manifest entries one level deep
Installed pi packages declare their entry as `pi.extensions: ["./extensions"]` with the real module at `extensions/<name>/index.ts`, but the plugin manifest resolver only matched a file or a directory containing a direct index.{ts,js,mjs,cjs}. A directory whose entry sits one level below resolved to null, so `omp plugin install` rejected it ("declared extension entry not found on disk") and runtime load silently skipped it.

For the extensions key, resolveManifestEntryFiles now resolves a directory like OMP's configured-directory (-e) scanner: the directory's own package.json omp/pi extensions (authoritative -- a declared-but-missing entry is reported, not replaced by a decoy index), then a direct index.{ts,js,mjs,cjs}, then a one-level scan where each child directory is itself resolved manifest-first plus direct *.{ts,js,mjs,cjs} files. The directory expansion is gated to the extensions key; tools/hooks/commands keep direct-index resolution so a directory entry like `tools: "."` is unaffected.

Adds CHANGELOG Unreleased entry and regression tests for subdir-index, nested-manifest-over-index, missing-declared-entry, and key-aware (tools vs extensions) resolution. Verified: omp plugin install @zosmaai/pi-llm-wiki registers all 14 wiki_* tools; pi-mcp-adapter loads.
2026-06-16 03:01:07 +03:00
roboomp 8b17764e08 fix(providers): preserved openrouter upstream routing
Prevented provider-scoped fuzzy matching from consuming OpenRouter @upstream selectors whose slug also appears in the model id.

Added resolver coverage for openrouter/deepseek/deepseek-v4-pro@deepseek:high so the upstream routing block and thinking level are both preserved.

Fixes #2708
2026-06-15 22:09:13 +00:00
roboomp 7dda4441e1 fix(tool): respected windows lc locale env
Treat inherited LC_* category locale variables as ownership of the locale group before adding LANG or LC_ALL defaults.

Fixes #2701
2026-06-15 21:38:32 +00:00
roboomp 6ad2b0cd2f fix(tool): preserved windows utf-8 env groups
Skipped UTF-8 defaults for an entire Windows locale or Python encoding group when inherited or per-command env already defines one variable in that group.

Fixes #2701
2026-06-15 21:27:46 +00:00
roboomp e4ab780345 fix(tool): defaulted windows bash children to utf-8
Added Windows-only UTF-8 defaults for non-interactive bash child process environments when the inherited env does not already define encoding or locale values.

Added regression coverage for missing, inherited, per-command, and non-Windows env behavior.

Fixes #2701
2026-06-15 21:18:46 +00:00
roboomp e904585060 fix(ai): preserved sibling thinking envelopes
Parsed literal thinking envelopes independently before transcript rendering so interleaved thinking blocks do not collapse into one malformed wrapper. Added advisor raw dump regression coverage for sibling literal thinking blocks.\n\nFixes #2700
2026-06-15 21:05:08 +00:00
roboomp a0481ac070 fix(ai): unwrapped thinking envelopes in raw dumps
Normalized dialect thinking rendering so stored thinking content that already carries literal thinking tags is unwrapped before transcript serialization. Added advisor raw dump regression coverage.\n\nFixes #2700
2026-06-15 20:44:39 +00:00
can1357 e24f789de4 chore: bump version to 16.0.1 2026-06-15 21:30:30 +02:00
roboomp 4a55e0c784 fix(ai): cleared rewritten thinking signatures
Cleared Anthropic thinking signatures when literal thinking-envelope normalization changes provider bytes, preventing same-model replay from pairing stale signatures with rewritten text.

Extended the wrapped-thinking regression test to verify replay demotes the rewritten block instead of sending an invalid signed thinking block.

Fixes #2695
2026-06-15 21:30:08 +02:00
can1357 8c4561cd82 fix: remove verification requirement from task 2026-06-15 21:26:15 +02:00
can1357 3c5e32f21b fix(coding-agent): made advisor toggle session-local and refreshed the status line
- SetAdvisorEnabled now used settings.override for advisor.enabled when enabling or disabling, keeping advisor toggles session-local.
- /advisor on|off handlers now called refreshStatusLine after each toggle, and the status line updates immediately in the UI.
- A regression test was added to assert setAdvisorEnabled invokes override with both values and does not call set.
2026-06-15 21:20:07 +02:00