Commit Graph

17416 Commits

Author SHA1 Message Date
Anatoli Tsinovoy 16ad301117 fix(stats): restore configurable dashboard bind host 2026-08-17 09:46:49 +03:00
Huang-404-Q 34135632fc fix(tests): stop ANTHROPIC_BASE_URL from failing the Anthropic suites
A developer shell with ANTHROPIC_BASE_URL set reroutes the effective endpoint
away from official, switching off eager tool-input streaming, long cache
retention, the Cowork TLS profile, the Claude Code session header and priority
service tier. 14 tests across 6 files assert those behaviors and fail on a
clean checkout.

Add withOfficialAnthropicEndpoint(), a beforeEach/afterEach pair that removes
the variable and restores it, and call it from the six affected files.
2026-08-17 14:35:32 +08:00
hzliangzhi 316c118680 fix(collab-web): render the user-added note in ask tool cards
The ask tool stores the user-attached note in result details (note on the
single-question shape, per-item note inside results[]), but the shared
tool renderer dropped it: AskAnswer carried no note field and the card
never rendered one. Extract and render it as a muted row so HTML exports
and the collab guest view keep the user's context.
2026-08-17 11:55:26 +08:00
roboomp 42cbee962f fix(update): surface actionable message for unsupported proxy schemes
omp update re-threw Bun's raw fetch() UnsupportedProxyProtocol error, telling CLI users to pass verbose:true to fetch() — an instruction unavailable through the CLI. The update fetch catches now detect this failure and report which proxy env var uses an unsupported scheme plus the http/https requirement.

Fixes #8784
2026-08-17 03:08:38 +00:00
ChangZhuo Chen (陳昌倬) a7dc534598 fix(cli): exit cleanly after printing shell completions
Force process termination via `postmortem.quit(0)` in
`Completions.run()` after writing completion scripts to stdout. Loading
all command modules during completion generation leaves open event loop
handles (sockets, timers) that prevent natural process exit, causing
tools like chezmoi to hang.
2026-08-17 10:09:06 +08:00
ranxianglei 91e27ebe9a fix(pi-ai): cursor — apply customSystemPrompt before onPayload so the replacement is final
Per review on #8717: the customSystemPrompt assignment ran after the hook,
so when both options.customSystemPrompt and an extension payload
replacement were set, the option silently won. Now the option is applied
before the hook (the extension can inspect or drop it in its replacement),
matching anthropic, where the hook runs right before serialization and is
the last word on the wire body.

Adds regression tests: replacement drops customSystemPrompt, replacement
overrides it, and the option still applies when the hook returns undefined.
2026-08-17 09:33:12 +08:00
roboomp 1441fdb28b fix(discovery): expanded OpenCode {env:} and {file:} config tokens
OpenCode substitutes {env:VAR} and {file:path} in config text at load
time, but OMP's OpenCode discovery ran the generic ${VAR}-only
expandEnvVarsDeep, leaving those tokens literal. An MCP header like
`Bearer {env:MCP_KEY}` reached the server verbatim and returned 401.

The OpenCode loader now applies OpenCode's own substitution to raw
config text before parsing: {env:VAR} -> env value or empty string,
{file:path} -> trimmed, JSON-escaped file contents resolved relative to
the config dir / ~ / absolute, skipping tokens on // comment lines.

Fixes #8778
2026-08-17 01:31:00 +00:00
roboomp 5d5c901c21 fix(nix): install writable home-manager config instead of store symlink
The Home Manager module symlinked ~/.omp/agent/config.yml to a read-only
/nix/store path. OMP acquires an advisory lock on and atomically rewrites
its config when persisting runtime changes; on macOS the lock backend
creates an flock sidecar next to the target, so the first startup save
failed with "Failed to acquire native file lock ... Permission denied
(os error 13)", breaking every launch once programs.omp.settings was set.

Copy the generated config into place as a writable regular file via
home.activation instead. OMP can now lock and rewrite it, and the next
home-manager switch reapplies the declared settings. The DAG entry is
written literally so the home-manager-free module evaluation in flake.nix
keeps working; that check now asserts the activation entry.

Fixes #8775
2026-08-17 00:44:52 +00:00
roboomp 7af29b47cc fix(ai): honored Fable/Mythos tier usage in reserve health
usageReservePct scoped limits through scopeClaudeLimitsForModelHardBlock,
which drops a Fable/Mythos weekly tier row until confirmed exhaustion
(>=100% or server exhausted). That guard is correct for credential-wide
hard blocks but wrong for the opt-in, non-destructive reserve fallback:
a tier row at 96% was removed before reserve health, so the model stayed
healthy and kept serving past the configured margin.

Added a scopeLimitsForReserve strategy hook (falls back to scopeLimits)
and pointed the Claude strategy at scopeClaudeLimitsForModel, so reserve
health honors the mapped tier row while credential hard blocks and all
other providers are unchanged.

Fixes #8773
2026-08-16 23:51:38 +00:00
Yang Yang 848f7fb0fd feat(catalog): default paid xAI and SuperGrok to grok-4.6
Point xai and xai-oauth at grok-4.6, already in the bundled catalog.
Tests pin the default id in models.json and load picker fixtures from
the catalog so the next bump does not rot hardcoded name or cost.
2026-08-16 16:29:14 -07:00
roboomp 6802d551c4 fix(tui): prefer macOS file URL over Finder icon bitmap on image paste
Current Finder Cmd+C pasteboards advertise both a public.file-url and a
generated 1024x1024 file-icon bitmap. arboard::get_image() succeeded with
the icon, so handleImagePaste attached it before readMacFileUrlsFromClipboard
was reached, sending a generic PNG document icon to vision models instead of
the copied screenshot.

Probe the Darwin file URLs before the bitmap representation so an image-file
URL wins over the co-advertised icon. Pure bitmap pasteboards (screenshots,
browser copies) and non-image file URLs still fall through to the image/text
paths. readMacFileUrls is a no-op off Darwin.

Fixes #8769
2026-08-16 23:15:08 +00:00
Peter Gagarinov 4025b27c15 fix(ai): encode empty successful tool_result content as empty string
Strict Anthropic-compatible endpoints (Z.AI GLM at api.z.ai/api/anthropic)
reject a whole request when a tool_result block carries content: [] ,
returning 400 code 1213 "The prompt parameter was not received normally".
The official API accepts both shapes, so the empty array only surfaced on
compatible endpoints once a tool returned empty output on a vision-capable
model (text-only models already encode the joined empty string).

Normalize the empty array to "" at encode time, alongside the existing
error-placeholder normalization from #2250.
2026-08-16 23:44:15 +01:00
roboomp 412d0e3b42 fix(coding-agent): keep thinking-loop retries on the same model
A ThinkingLoop abort is the loop guard asking for a same-model resample
(it injects a thinking-loop-redirect notice that only makes sense on the
model that looped), not a provider failure. #handleRetryableError routed
it through the generic retryable-error branch, so on attempt 1 it called
noteRetryFallbackCooldown + #tryRetryModelFallback and could switch to
another family from retry.fallbackChains while parking the original
selector on a 5-minute cooldown. A healthy Grok 4.6 planning turn got
replaced by whatever the chain listed next.

Carve ThinkingLoop out of the model-fallback branch and out of the
Fireworks Fast->base degrade so the loop guard always re-samples the same
model; the retry budget still bounds a genuinely stuck stream.

Fixes #8760
2026-08-16 21:16:35 +00:00
ghosty93 2179f1c987 fix(coding-agent): match interleaved options in the destructive rm pattern
Review noted that the option whitelist still let generic short flags
escape: `rm -rf -v /` and `rm -rf -i /` were not classified critical,
which is the same separator class the change set out to close.

Pin only the recursive/force flag and skip any other options on either
side of it, which also removes the need to enumerate long options. An
absolute target is still required, so `rm -rf -- ./build`,
`rm --recursive --force ./dist` and `rm -v /tmp/scratch` remain benign
and are asserted.
2026-08-16 23:03:01 +03:00
ghosty93 ffb816fe7f fix(coding-agent): classify destructive rm with long options as critical
`CRITICAL_BASH_PATTERNS` required the target to follow one short flag
cluster directly, so anything in between escaped the check:

    rm -rf /                      matched
    rm -rf -- /                   missed
    rm --recursive --force /      missed
    rm -rf --no-preserve-root /   missed
    rm --no-preserve-root -rf /   missed

The last two matter most. GNU coreutils already refuses `rm -rf /` with
"it is dangerous to operate recursively on '/'" and names
`--no-preserve-root` as the override, so the pattern matched the form
that fails safe and missed the form that does not.

Repeat the option separator instead of assuming the path follows one
cluster, and treat `--no-preserve-root` as critical wherever it appears.
Absolute targets are still required for the first pattern, so
`rm -rf -- ./build` and `rm --recursive --force ./dist` stay benign;
both are asserted in the test.

PR #5270 reported the `--` and long-option forms in July and was closed
unmerged by the contributor-vouch bot rather than on merit. This keeps
its cases, credits them in the tests, and adds the `--no-preserve-root`
forms that patch did not cover.
2026-08-16 22:41:44 +03:00
Hayden Evan 3a91d09d43 style(catalog): format grok-4.6 effort assertion in build.test.ts 2026-08-17 02:04:37 +07:00
Hayden Evan 8c61ec798b fix(catalog): expose grok-4.6 thinking levels on xai-oauth
Add grok-4.6 to the SuperGrok Responses effort allowlist so /model
can select low/medium/high/xhigh. Stale omitReasoningEffort cache
rows no longer hide the dial. max is omitted because api.x.ai 400s.
2026-08-17 01:56:38 +07:00
re2zero a34c4991a0 fix(biome): add .css to default fileTypes for CSS language support
Biome 2.x fully supports CSS parsing, formatting, linting, and assist
actions via its CLI and LSP proxy. The built-in Biome client config
did not include .css in its fileTypes array, causing OMP to skip Biome
for CSS files even when the project's biome.json enables CSS rules.

This change adds .css to the default fileTypes so that projects with
CSS files automatically route through Biome without needing a per-project
override of the full fileTypes array.

Closes #8735
2026-08-17 02:26:19 +08:00
Sami Jawhar b8db96e9fe fix: resolve workspace-member imports in installed git-dep monorepo plugins
A plugin installed as a bun git dependency contains its full workspace
tree but no node_modules links: bun materializes a git dep's regular npm
dependencies into the host tree and skips workspace:*/file: edges. Bare
imports between workspace siblings inside such a plugin therefore failed
with 'Cannot find module' - the extension host's package walk only
looked at node_modules dirs.

Teach findNodePackageRoot to also recognize workspace roots on the
walk-up: when a directory's package.json declares workspaces (array or
yarn-style { packages }), scan member manifests for the requested name.
node_modules candidates at the same level still win, so explicitly
installed copies shadow workspace members. Exports conditions (bun ->
source) apply to the member manifest as usual, so unbuilt source-only
members resolve.

Contract tests: a fake installed monorepo tree resolves a bare member
import to the member's bun-condition source entry; an installed
node_modules copy shadows the member.
2026-08-16 16:55:43 +00:00
roboomp 1d971096d3 fix(ai): name selected provider in opencode login prompt
opencode-go and opencode-zen share loginOpenCode, which hardcoded "Paste your OpenCode Zen API key" and generic instructions. Selecting OpenCode Go therefore prompted for an OpenCode Zen key. loginOpenCode now takes the provider display name and each provider passes its own, so Go asks for a Go key while still opening the shared opencode.ai/auth console where Go keys are minted.

Fixes #8738
2026-08-16 16:22:55 +00:00
roboomp ead0a4ceb4 fix(coding-agent): resolved update target from running binary, not PATH launcher
resolveUpdateTargetFromPath gated the symlink->realpath resolution on
allowPackageManagers, so binary-only releases (a major bump or an explicit
omp.dist: "binary") wrote to the raw PATH symlink instead of the binary it
resolves to. On an admin shared install where /usr/local/bin/omp is a
root-owned symlink into a group-writable dir this either failed with EACCES
(writing <link>.new into the root-owned dir) or replaced the symlink with a
full copy, stranding the shared install behind a split-brain second binary.

Target selection no longer depends on the release's distribution channel: a
foreign symlink (a non-manager alias, an admin symlink into a shared install)
resolves to its real binary and the launcher is left intact in every channel.
A package-manager launcher (bun/npm) keeps its deliberate in-place takeover on
a binary-only release, detected by re-classifying the launcher as if managers
were allowed rather than by the channel flag. The manager bin dirs are probed
in the binary channel only when the launcher is a symlink, so plain-file
installs stay probe-free.

Fixes #8732
2026-08-16 15:00:23 +00:00
roboomp 49f22987d5 fix(tui): consolidate live tool spinner timers into one shared ticker
Every live tool block (streaming args, a running partial tool, or a task
subagent) armed its own 80ms setInterval driving requestComponentRender,
so N concurrent live blocks created N unsynchronized repaint timers that
kept the 30fps render scheduler awake near-continuously during
multi-subagent / workflowz / orchestrate work.

Replaced the per-component intervals with a single shared spinner ticker
that advances the already-phase-locked glyph once per step and repaints
every registered live block in one coalesced frame, independent of block
count. Verified 3 live blocks now share 1 timer instead of 3.

Fixes #8731
2026-08-16 14:58:57 +00:00
koopmannleon19977-cmyk 39c908bc90 fix(agent): harden compaction summarizer against prompt injection 2026-08-16 16:22:51 +02:00
roboomp 74e73debaf fix(launch): scope daemon prune to the daemons container
smokeTestDaemonBroker mkdtemp'd its runtime dir directly under
os.tmpdir(), and the broker's startup sweep pruneDeadDaemonRuntimeDirs
reclaims path.dirname(runtimeDir). On a default session that is /tmp, so
--smoke-test recursively deleted every aged sibling with no live
broker/clients (tmux/ssh sockets, editor state, build trees) while still
exiting 0.

- client.ts: keep the smoke broker's project and runtime dirs under a
  single private mkdtemp parent the process owns.
- presence.ts: refuse any prune root that is not the daemons container
  and only prune entries named like a 16-hex daemon scope key, so a
  relocated runtime dir can never rm -rf unrelated neighbours.

Fixes #8721
2026-08-16 11:50:00 +00:00
roboomp d06e6a30b6 fix(ai): strip leaked ```thinking delimiters from gemini thought summaries
Gemini thought summaries occasionally emit a bare ```thinking / ``````thinking
opener line as a between-summary delimiter. consumeGoogleStream appended
thought-part text verbatim to ThinkingContent, and structured thought parts
bypass the visible-channel leaked-reasoning healers, so the delimiter reached
both live display and persisted transcripts as fence spam.

Route thought-part text through a streaming ThinkingFenceStripper that drops
only a standalone reasoning-fence opener line (>=3 backticks + thinking/
reasoning). Language-tagged code fences, bare closers, and inline mentions are
preserved.

Fixes #8719
2026-08-16 11:46:59 +00:00
roboomp 722c4aa0ae fix(compaction): honor /clear reset boundary in prepareCompaction
prepareCompaction walked the branch from the last compaction and ignored reset_boundary markers, so /compact (and auto-compaction) resurrected pre-/clear turns into the summary even though buildSessionContext already starts the model context after the boundary.

Model reset_boundary as a first-class agent-core session entry and start the summarization window after the latest boundary, dropping the superseded pre-reset compaction summary. A boundary before the last compaction stays superseded by it.

Fixes #8718
2026-08-16 11:37:59 +00:00
ranxianglei 574a83f5f5 fix(pi-ai): honor onPayload replacement payloads in openai-completions, bedrock and cursor
The onPayload hook contract (README, docs/extensions.md) is that a non-undefined
return replaces the provider request payload, and every provider except these
three implements it (anthropic, openai-responses family, google, ollama — see
the earlier fix for the responses providers). openai-completions, amazon-bedrock
and cursor invoked the hook fire-and-forget and sent the original payload, so
extensions hooking before_provider_request could never transform the wire body
on these providers.

- openai-completions: await the hook and apply a non-undefined replacement to
  the params used for the request body, raw request dump and error-path
  fallback state
- amazon-bedrock: same for the ConverseStream command input
- cursor: await the hook for the AgentRunRequest; buildGrpcRequest becomes
  async and is exported for direct testing (transport is HTTP/2)
- devin-agent intentionally unchanged: it does not fire the hook at all (its
  payload is a protobuf object), which is a feature gap rather than a dropped
  replacement; documented in README/docs instead
- regression tests: captured wire body reflects async/sync replacement, and an
  undefined return keeps the original payload (completions + bedrock over a
  mocked fetch; cursor by decoding the serialized run request)
2026-08-16 19:22:49 +08:00
roboomp 70af5c300b fix(snapcompact): disambiguate digit zero from letter O in frame fonts
The default snapcompact frame fonts (X.org 8x13 for every provider, plus the selectable 6x12 and legacy 5x8) drew digit zero as a bare oval visually indistinguishable from letter O. Image-based compaction OCRs the frames back, so 0 and O were mixed up and compacted identifiers (e.g. Slack IDs) got corrupted.

Zero now carries a disambiguating interior mark the O lacks: an ascending slash in 8x13 and a center bar in 6x12/5x8. unscii-8 (8x8/6x6u shapes) already shipped a slashed zero and is unchanged.

Fixes #8713
2026-08-16 10:34:48 +00:00
can1357 37eee71978 chore: bump version to 17.3.5 2026-08-16 10:21:05 +03:00
can1357 02cd22dc9b feat: added live tracking and stale status warnings for agent activity snapshots
- Added live tracking and stale status warnings for agent activity snapshots.
- Fixed text wrapping with ANSI escape sequences to defer style open sequences after whitespace.
- Added VirtualRenderScheduler for deterministic virtual-clock rendering tests.
2026-08-16 10:18:56 +03:00
Can Bölük ca1f184823 chore: rewritten changelogs 2026-08-16 09:28:34 +03:00
can1357 906f5b1463 style(coding-agent/registry): formatted persisted mid-spawn test writes as template literals
- Replaced `join("\\n") + "\\n"` concatenations with template-literal interpolation in mid-spawn registry fixtures.
- Updated the three Bun.write calls in `persisted-mid-spawn-stub.test.ts` to use the template form.
2026-08-16 09:19:30 +03:00
Can Bölük 14c99e9519 Merge remote-tracking branch 'origin/farm/343b94da/fix-alibaba-cn-console-url' 2026-08-16 09:13:29 +03:00
Can Bölük f05abb0ab4 Merge remote-tracking branch 'origin/farm/38b90f8c/fix-biome-json-reporter-schema' 2026-08-16 09:13:21 +03:00
can1357 fe6648cb56 chore(edit): removed unused import left by retry-token revert 2026-08-16 07:59:58 +02:00
can1357 8fdb6a4197 fix(edit): dropped compact seen-line retry tokens (#8461)
Reverted the retry-token continuation flow (merge 34628528bf and prompt
follow-up 446e745bf4): seen-line rejections resend the full patch again.
2026-08-16 07:58:55 +02:00
roboomp 3d1bad9c88 fix(coding-agent): map biome 2.x json reporter schema
BiomeClient#parseJsonOutput expected a stale --reporter=json shape
(location.path.file, byte-offset span, description), so the shape guard
dropped every diagnostic against Biome 2.x output and lint() returned []
with no warning. Parse the current schema instead: string location.path,
1-indexed location.start/end {line,column}, and message. Drop the now-dead
offsetsToPositions helper and warn when a non-empty diagnostics array has
no recognizable location, so future schema drift surfaces instead of
silently reporting "no lint issues".

Fixes #8694
2026-08-16 05:39:14 +00:00
roboomp d71ff70c3d fix(ai): updated Alibaba China console URL
Opened the current Bailian API-key management page from the China interactive login flow and updated its user guidance.

Added regression coverage for the emitted auth URL and instructions.

Fixes #8691
2026-08-16 02:56:38 +00:00
can1357 4dc82c56b9 chore(session): removed unused loader import 2026-08-16 02:59:57 +02:00
can1357 f474b43880 chore(changelog): normalized changelogs after merged fixes 2026-08-16 02:59:03 +02:00
can1357 66df516fc4 chore(catalog): regenerated models.json from upstream sources 2026-08-16 02:58:41 +02:00
can1357 f045ae0d07 fix(collab): replicated discarded branch markers 2026-08-16 02:57:16 +02:00
can1357 a0717151da fix(catalog): matched generator key order for Daybreak compat override 2026-08-16 02:57:16 +02:00
can1357 9d21956d35 Merge PR #8491: fix(agent): remove capped empty stop tails (@roboomp)
# Conflicts:
#	packages/coding-agent/src/session/agent-session.ts
#	packages/coding-agent/src/session/session-manager.ts
#	packages/coding-agent/test/agent-session-empty-stop-guard.test.ts
#	packages/coding-agent/test/session-manager-immediate-persist.test.ts
2026-08-16 02:56:08 +02:00
roboomp d421944598 fix(mcp): preserved image tool results
- Forwarded MCP image blocks to the agent and TUI without copying their base64 payloads.

- Retained existing text and resource formatting around image blocks.

- Added regression coverage for mixed text and image tool results.

Fixes #8687
2026-08-16 00:52:19 +00:00
can1357 c162a82169 fix(vibe): deferred IRC wakes during mode exit 2026-08-16 02:49:32 +02:00
can1357 5420b29364 Merge PR #8327: fix(vibe): cancel active turn on mode exit (@roboomp)
# Conflicts:
#	packages/coding-agent/test/interactive-mode-vibe-toggle.test.ts
2026-08-16 02:49:32 +02:00
can1357 c78444541b Merge PR #8560: fix(coding-agent): stop invalid Anthropic thinking fallback (@roboomp)
# Conflicts:
#	packages/coding-agent/src/session/turn-recovery.ts
2026-08-16 02:49:03 +02:00
can1357 c7ecc3ef66 Merge PR #8598: fix(session): repair torn JSONL appends (@roboomp)
# Conflicts:
#	packages/coding-agent/src/session/session-loader.ts
#	packages/coding-agent/src/session/session-manager.ts
#	packages/coding-agent/test/session-loader-stream.test.ts
2026-08-16 02:48:12 +02:00
can1357 d57a0ff233 fix(extensions): preserved drafts before custom presentation 2026-08-16 02:45:04 +02:00