Commit Graph

16932 Commits

Author SHA1 Message Date
roboomp bee1d44bf9 fix(ai): preserved anthropic tool-search replay blocks
- Retained tool-search server calls and opaque results in signed assistant history across direct streams, gateways, and custom-endpoint projection.

- Added replay regressions for interleaved thinking and client tool continuations.

Fixes #8559
2026-08-14 14:34:27 +00:00
can1357 ffd53ff92a chore: bump version to 17.3.4 2026-08-14 14:38:16 +02:00
can1357 a3c15d2dec feat(coding-agent/tools): implemented pdf page screenshot rendering
- Add `renderPdfPageScreenshot` to render PDF pages via headless Chromium.
- Update `ReadTool` to intercept legacy PDF image paths and return page screenshots.
- Ensure daemon clients are closed on read command exit.
2026-08-14 14:37:56 +02:00
can1357 85acb9ab70 fix(rpc): surface drained stderr when startup fails under load
- RpcClient: when stdout closes before ready, race child.exited (which settles only after ptree drains the stderr tail for nonzero exits) for 250ms before rejecting, so the earlier-registered exit watcher rejects with the real stderr text instead of an empty 'Stderr:'.
- mock-rpc-agent fixture: await the stderr pipe write callback before process.exit so failure text cannot be dropped unflushed.
- sdk-tool-activation: restore the default extension-handler budget once the intentionally stalled activation times out, so full-suite machine load cannot also time out the genuine recovery registration.
Both tests flaked only under concurrent full-suite chunk load; 10 concurrent stress runs pass post-fix.
2026-08-14 14:23:15 +02:00
can1357 db6460c6c5 test(tui): restored process stream descriptors in issue-8542 repro teardown
- Replaced Reflect.deleteProperty teardown with the descriptor-preserving restoreProperty pattern used by the other ProcessTerminal suites, so real isTTY/setRawMode/columns/rows own-properties survive on TTY hosts and later test files are not poisoned.
2026-08-14 14:16:38 +02:00
can1357 56efdfc4db Merge PR #8546: fix(coding-agent): restore Windows external editor launch (@roboomp) 2026-08-14 14:12:00 +02:00
can1357 7384e2c246 Merge PR #8543: fix(tui): swallow late DA responses for the whole session (@roboomp) 2026-08-14 14:12:00 +02:00
can1357 c0ad44b6fc Merge PR #8533: fix(pi-natives): guard DeviceCheck token generation on GUI session (@roboomp) 2026-08-14 14:11:51 +02:00
can1357 aae72bd5ef Merge PR #8531: docs: correct /hotkeys Ctrl+D copy to match save-draft-and-exit (@roboomp) 2026-08-14 14:11:51 +02:00
can1357 7ba71c2e51 Merge PR #8527: fix(agent): add Codex V2 compaction feature header (@roboomp) 2026-08-14 14:11:44 +02:00
can1357 d3d326a8f2 Merge PR #8526: fix(mnemopi): keep global rows recallable under channelId filter (@roboomp) 2026-08-14 14:11:44 +02:00
can1357 69a856ea3e Merge PR #8519: fix(catalog): grant low/high/max to OpenRouter deepseek-v4-pro-0813 (@roboomp) 2026-08-14 14:11:38 +02:00
can1357 d445f987da Merge PR #8515: fix(mcp): initialize sessions before opening sse stream (@roboomp) 2026-08-14 14:11:30 +02:00
can1357 04fab5ecb4 feat: replaced custom mupdf wasm pipeline with native function
- Replaced the custom MuPDF-WASM PDF extraction and rendering pipeline with the new `pdfToMarkdown` native function from `@oh-my-pi/pi-natives`.
- Removed legacy MuPDF extraction modules, WASM embedding scripts, and PDF image extraction tools.
- Added OCR warnings and browser/text redirection for unsupported PDF image reads.
- Updated native package definitions, documentation, and test suites for the new PDF inspection capability.
2026-08-14 14:08:28 +02:00
roboomp a9075ae509 fix(coding-agent): restored Windows external editor launch
Passed the cmd.exe /s /c command line through Bun verbatim so configured editors and temporary paths retain their quotes.

Added command-line regression coverage and documented the fix.

Fixes #8544
2026-08-14 11:27:13 +00:00
roboomp 3f5cb91068 fix(tui): swallow late DA responses for the whole session
The private-CSI reassembly gate and the DA1 swallow were both guarded by
`#da1SentinelOwners.length > 0`, so a Device-Attributes reply that arrived
after the startup capability-probe sentinel FIFO drained fell through to the
input handler and leaked into the composer as literal text (e.g.
`1;22;...;52c`). The extra latency of an SSH/zmx PTY chain makes the race
observable.

`CSI ? ... c` and split private-CSI responses are terminal->host reports,
never keystrokes, so they are now consumed regardless of whether a sentinel
is still outstanding.

Fixes #8542
2026-08-14 10:57:37 +00:00
roboomp 988ccc8268 fix(pi-natives): guard DeviceCheck token generation on GUI session
-[DCDevice isSupported] synchronously opens an XPC connection to the per-user DeviceCheck metadata daemon, which exists only in an interactive GUI login session. From a session without graphic access (SSH, launchd LaunchDaemon, CI runner, service account, sandbox) the connection setup hits _xpc_api_misuse and aborts the process with SIGTRAP before any completion handler runs, so the promise never rejects and every openai-codex/* OAuth model becomes unusable.

Check the caller's security session for the sessionHasGraphicAccess attribute via SessionGetInfo before touching DeviceCheck; resolve { supported: false, error } when it is absent, mirroring the non-macOS stub and letting the caller send an error-coded attestation instead of dying.

Fixes #8353
2026-08-14 08:49:26 +00:00
roboomp ff9c5189c9 docs: correct /hotkeys ctrl+d copy to match save-draft-and-exit
The /hotkeys table described app.exit (Ctrl+D) as "Exit (when editor is
empty)", implying readline/EOF-style conditional exit. The handler exits
unconditionally and snapshots the current prompt as a resumable draft
regardless of editor content (custom-editor.ts fires onExit for app.exit
with no empty check; input-controller.ts handleCtrlD calls shutdown()
unconditionally, which persists the draft). Corrected the line to
"Exit (saves current prompt as draft)".

Fixes #8530
2026-08-14 08:27:35 +00:00
roboomp 2996f16a61 fix(agent): added codex v2 compaction feature header
- Negotiated remote_compaction_v2 on Codex compatibility fetches.

- Covered explicit endpoints and non-Codex request scoping.

Fixes #8524
2026-08-14 06:56:57 +00:00
roboomp fc9d40ca30 fix(mnemopi): keep global rows recallable under channelId filter
buildWhere() appended a redundant hard `channel_id = ?` clause on top of
the `(session_id = ? OR scope = 'global' OR channel_id = ?)` visibility
clause. The hard AND nullified the `scope='global'` branch, so any global
row whose channel_id differed from the recall channelId — including rows
imported via importFromDict() with channel_id NULL — was silently dropped.

Channel isolation is fully preserved by the visibility OR-clause alone
(other-channel, non-global, cross-session rows still fail all three
disjuncts), so removing the hard clause restores global visibility without
leaking other channels.

Fixes #8525
2026-08-14 06:55:59 +00:00
roboomp 2d0eb6c41e fix(catalog): grant low/high/max to OpenRouter deepseek-v4-pro-0813
The OpenRouter non-Flash DeepSeek V4 effort override forced HIGH_ONLY for every id, so getModelDefinedEfforts clamped deepseek-v4-pro-0813 to high even though OpenRouter's /models advertises reasoning.supported_efforts [low,high,max] and the route accepts them. Carve out the dated SKU to the wire-exact low/high/max ladder while keeping the undated deepseek-v4-pro route high-only.

Fixes #8517
2026-08-14 06:18:34 +00:00
roboomp 83d08936ae fix(mcp): initialized sessions before opening sse stream
Moved the optional Streamable HTTP GET listener after the initialized notification so stateful servers do not terminate the session during setup.

Added regression coverage for a server that rejects pre-initialization GET traffic.

Fixes #8514
2026-08-14 05:33:38 +00:00
can1357 1e1ee2c330 test(coding-agent): updated model cache tests to resolve provider ids
- Import and use `resolveModelCacheProviderId` for github-copilot in model discovery and cache header tests.
2026-08-14 07:31:12 +02:00
can1357 a821f4316a fix(ai): sized usage requests by unfiltered account batch and updated cache methods
- Updated `RemoteAuthCredentialStore` to track broker usage accounts across snapshots and streams before account-pool filtering.
- Replaced `#countUsageAccounts` with dynamic tracking methods `#replaceBrokerUsageAccounts`, `#upsertBrokerUsageAccount`, and `#removeBrokerUsageAccount`.
- Refactored `AuthStorage.#fetchUsageCached` to accept an options object for `timeoutMs` and `forceRefresh`.
- Updated dockerignore patterns to exclude `**/.venv/` and ensure depth-agnostic `.env` secret exclusion.
2026-08-14 07:23:02 +02:00
can1357 7f56412423 Merge remote-tracking branch 'origin/farm/260d1f69/fix-alibaba-cn-quota-reporting' 2026-08-14 07:19:24 +02:00
can1357 ca583871c3 Merge remote-tracking branch 'origin/farm/73a063f1/fix-copilot-env-token-endpoint' 2026-08-14 07:18:42 +02:00
can1357 e47b0207ac feat(ai): scaled usage fetch timeout dynamically based on account counts
- Scale usage fetch timeout dynamically in AuthBrokerClient based on the maximum account count per provider.
- Track maximum usage accounts per provider in RemoteAuthCredentialStore snapshot applications.
- Add comprehensive wire and store tests covering serialized account batch timeouts and account pool sizing.
2026-08-14 07:18:17 +02:00
roboomp c0394ba53d fix(catalog): scope Copilot model cache by credential
Copilot discovery writes an authoritative cache, so online-if-uncached served the prior endpoint for the full TTL after COPILOT_GITHUB_TOKEN switched accounts. Keying the cache namespace on the credential forces fresh discovery for a new token instead of reusing a stale personal-endpoint cache.

Fixes #8507
2026-08-14 05:12:06 +00:00
can1357 ad318c7572 build: configured docker build pipelines for cargo native addons
- Switched Docker images to build native addons via cargo/napi-rs (`OMP_NATIVE_BUILD_BACKEND=cargo`) instead of Bazel.
- Updated Cargo.toml workspace members explicitly to prevent loading errors from stale directories under crates/.
- Added depth-agnostic patterns to .dockerignore files to exclude nested build outputs from Docker build contexts.
- Added OMP_NATIVE_CARGO_PROFILE environment variable to support configuring cargo profiles for addon builds.
2026-08-14 07:09:48 +02:00
can1357 ebcbdd5297 fix(ai): prevented stale ai usage cache re-plays during invalidation
- Added force-refresh tracking to serialize provider usage probes and prevent stale fallback re-plays after manual invalidation.
- Updated usage request handling to incorporate cache epochs and prevent stale in-flight results from overwriting new data.
- Added integration test verifying that broker invalidations correctly drop server-side last-good usage reports.
2026-08-14 07:05:41 +02:00
can1357 e5d59450c8 feat(ai): prevented usage cache from replaying stale values after invalidation
- Replace legacy credential-listing invalidation logic with prefix-based and exhaustive usage cache clearing.
- Update auth broker usage stale route to await storage cache invalidation.
- Add tests verifying explicit cache invalidation behavior prevents replaying last-good data on failure.
2026-08-14 06:54:26 +02:00
roboomp 335637de1e fix(ai): restored Beijing Token Plan quota reporting
- Routed Beijing credentials through the Bailian console session and usage endpoints.

- Added region-aware Cookie capture guidance and regression coverage.

Fixes #8509
2026-08-14 04:51:58 +00:00
roboomp ce65a40539 fix(catalog): bound Copilot endpoint probe with discovery timeout
Threaded the shared 10s discovery AbortSignal into the copilot_internal/user probe so a stalled endpoint falls back to the personal host instead of hanging startup or refresh.

Fixes #8507
2026-08-14 04:47:42 +00:00
roboomp c92ba97538 fix(catalog): discovered Copilot endpoint for env tokens
Shared the plan-endpoint probe between OAuth login and raw token model discovery so Business credentials route to their advertised API host.

Added regression coverage for the raw environment-token path.

Fixes #8507
2026-08-14 04:41:27 +00:00
can1357 039728ad80 chore: bump version to 17.3.3 2026-08-14 05:44:05 +02:00
can1357 f5911781c2 fix(hashline): recovered dangling range separators in hunk headers
- Recover dangling range separators in hunk headers as single-line ranges instead of rejecting them.
- Ensure strict rejection is maintained when a dangling separator is followed by invalid tokens.
2026-08-14 05:15:14 +02:00
usr-bin-roygbiv ed108dec8b test(gemini): keep retry assertion behavioral 2026-08-14 02:54:25 +00:00
usr-bin-roygbiv fe33232298 fix(gemini): preserve retry and rendering boundaries 2026-08-14 02:48:18 +00:00
usr-bin-roygbiv bdbea3f7f3 fix(tui): recover reports after orphan fences 2026-08-14 02:15:22 +00:00
usr-bin-roygbiv b1ce77c109 fix(gemini): recover malformed and thought-only turns 2026-08-14 01:35:21 +00:00
can1357 ae2d3d6ea1 chore: bump version to 17.3.2 2026-08-14 00:28:43 +02:00
can1357 642d6c0b31 fix(coding-agent): preserved linked update ownership
Detected npm and Bun ownership from the bin link immediate target within each precise global node_modules root. Foreign aliases now update their resolved standalone binary without replacing the alias.

Fixes #8468
2026-08-14 00:27:16 +02:00
can1357 15981329d6 refactor(coding-agent): migrated external editor and removed obsolete tests
- Replaced child_process spawn with Bun.spawn in packages/coding-agent/src/utils/external-editor.ts.
- Removed the browser tab evaluation test suite from packages/coding-agent/test/tools/browser-tab-evaluate.test.ts.
2026-08-14 00:14:29 +02:00
can1357 6ecb1e3383 Revert "fix(coding-agent): routed foreign aliases to binary updates"
This reverts commit 834002adc5.
2026-08-14 00:13:49 +02:00
can1357 0d6a7146a3 feat(coding-agent): supported allSettled and any promise combinators in browser scope
- Added `allSettled` and `any` to tracked promise combinators in run scope.
- Updated browser cancellation tests to cover new promise combinators.
2026-08-14 00:11:04 +02:00
can1357 d7a8583f02 refactor(catalog/wire): updated ensureAntigravityVersion fetcher parameter type
- Updated the fetcher parameter type in ensureAntigravityVersion to use FetchImpl.
2026-08-14 00:05:54 +02:00
roboomp a02f88994b fix(tools): preserve workspace-relative path in read hashline headers
formatReadHashlineHeader collapsed every relative in-workspace path to its
basename, so reading a nested file (e.g. src/settings.json) emitted
[settings.json#tag]. When a same-basename file existed at the session cwd,
a verbatim follow-up edit resolved against the cwd file; Patcher.prepare only
runs snapshot-tag path recovery when the authored path is missing, so the
valid edit was deterministically rejected with "hash is not from this
session". Keep the workspace-relative path, which names the file uniquely and
stays directly resolvable against cwd. Out-of-workspace absolute paths remain
shortened; root-level files are unchanged.

Fixes #8482
2026-08-14 00:04:59 +02:00
can1357 5dd0aca4b8 refactor: removed markit converters test suite
- Removed markit-converters.test.ts from packages/coding-agent.
- Updated google-gemini-cli provider to ensure antigravity version during stream execution.
- Updated antigravity discovery options to use fetcher fallback.
2026-08-14 00:04:34 +02:00
roboomp 834002adc5 fix(coding-agent): routed foreign aliases to binary updates
Resolved npm and bun bin-entry symlinks before selecting the update method, and preserved foreign aliases by replacing their standalone target.

Fixes #8468
2026-08-14 00:03:33 +02:00
roboomp 5a0b2d460d fix(utils): normalized aborts during retry backoff
Route both fetchWithRetry backoff paths through one abort-normalizing wait helper and cover response and network retry cancellation.

Fixes #8450
2026-08-14 00:02:14 +02:00