Commit Graph
12214 Commits
Author SHA1 Message Date
can1357 e8d1ab005e test(coding-agent): verified transcript component streaming and state management
- Added comprehensive unit tests for `TranscriptContainer` to verify uncommitted block tracking.
- Created integration tests ensuring `AssistantMessageComponent` correctly streams thinking and answer content into scrollback.
- Added tests verifying that expanded tool evaluation output records rows correctly without duplication after settling.
- Updated `AssistantMessageComponent` test suite to cover table streaming scenarios in the unsettled tail.
2026-07-04 12:15:23 +02:00
can1357 a3e13cd5f2 test(tui): strengthened scrollback verification for data consistency
- Updated test suite to enforce strict visual record consistency for native scrollback.
- Migrated deferred gap logic to rely on frozen snapshots and final verification.
- Implemented strict verification for mid-stream re-anchoring to prevent data loss.
- Guaranteed zero-duplicate and zero-loss conditions for volatile blocks during finalization.
2026-07-04 12:13:34 +02:00
can1357 10043a5990 feat(coding-agent): gated block lifecycle and state transitions
- Enforced strict history protection by gating ephemeral block removal on uncommitted state across controllers and UI components.
- Optimized settled-row calculations using explicit mermaid fence detection and improved scrollback integrity.
- Refactored transience management to target only actively streaming blocks, preventing redundant label rendering.
- Implemented persistent compaction for auto-retry errors and enabled consistent terminal title updates during session renaming.
2026-07-04 12:13:34 +02:00
can1357 0cdd0a09b8 refactor(coding-agent): consolidated session title update logic
- Moved terminal title update logic to a single listener onSessionNameChanged.
- Removed redundant setSessionTerminalTitle calls from ExtensionUiController, InputController, and InteractiveMode.
- Ensured consistent side-effect execution for terminal titles and editor accents across all session name change triggers.
2026-07-04 12:13:34 +02:00
can1357 ada50effa8 feat(tui): implemented visual-record scrollback with exact zone tracking
- Migrated native scrollback logic to a visual-record model with a three-zone row verification system.
- Replaced heuristic-based audit boundaries with exactness-boundary tracking for improved reliability.
- Resolved issues with live tool preview duplication and content vanishing during scroll.
- Added adaptive index re-basing for frame shrinks and audit exemptions for frozen visual snapshots.
2026-07-04 12:13:34 +02:00
can1357 71dd8c8e81 refactor(coding-agent/modes): updated abort reason rendering logic
- Refactored abort reason handling to rely on shouldRenderAbortReason instead of isSilentAbort.
- Updated documentation to clarify that both silent and user-interrupt aborts yield no label.
2026-07-04 11:37:54 +02:00
can1357 6b90d34924 Merge remote-tracking branch 'origin/farm/96461c96/fix-browser-cmux-pending-unhandled-rejection' 2026-07-04 11:27:29 +02:00
can1357 141244ab21 Merge remote-tracking branch 'origin/farm/1f0795db/guard-write-render-content' 2026-07-04 11:27:12 +02:00
can1357 eb63f38358 Merge remote-tracking branch 'origin/farm/019eb804/fix-ollama-tool-schema' 2026-07-04 11:25:36 +02:00
can1357 81097c4ffa test(tui): consolidated streaming scrollback logic and testing infrastructure
- Exposed `Markdown.getLastRenderSettledRows` to track streaming progress.
- Simplified scrollback architecture by migrating logic to a unified `SeamLineList` boundary.
- Removed legacy safe-end methods and redundant `findCommittedPrefixResync` test suites.
- Fixed live tool and evaluation preview duplication issues during re-layouts.
2026-07-04 11:25:17 +02:00
can1357 42fc4e6b0a refactor(agent): unified transcript block finalization logic
- Replaced commit-based stability checks with a unified `isTranscriptBlockFinalized` tracking mechanism.
- Removed deprecated provisional rendering configuration and flags across tool and renderer interfaces.
- Standardized native scrollback boundary logic to pin at the first unfinalized block using settled row verification.
- Updated and refactored test suites to validate block finalization and settled row boundaries instead of deprecated commit stability methods.
2026-07-04 11:22:05 +02:00
can1357 6e2bba871e feat(agent): implemented automated retry recovery and transcript compaction
- Introduced an automated retry recovery system to track, manage, and persist recovered error states within agent sessions.
- Enabled compact transcript rendering for recovered auto-retry errors by removing heuristic commit machinery.
- Improved raw read tracking and provenance in the ReadTool to support refined file snapshot recording and hashline editing.
- Excluded recovered assistant messages from default model context and updated event controllers to handle retry recovery life cycles.
2026-07-04 11:22:04 +02:00
can1357 b6e33f6ed3 feat(ai): implemented persistent storage and synchronization for credential blocks
- Implemented persistent storage for credential rate-limit blocks with automatic expiry and pruning.
- Added broker API routes and client methods to manage, persist, and synchronize credential block states.
- Integrated rate-limit checks into the credential selection logic, specifically refining Fable/Mythos tier exhaustion gating.
- Extended schema versioning to include the new credential block table and verified persistence via comprehensive unit testing.
2026-07-04 11:22:04 +02:00
can1357 cb30c981a0 feat(walker): implemented parallel filesystem traversal with streaming grep
- Introduced parallel streaming grep with windowed result processing to enhance search performance and memory management.
- Implemented stateful parallel file walking with buffer pooling and directory entry record caching to minimize memory allocations.
- Optimized ignore state derivation by using directory entry names instead of stat probes.
- Added comprehensive unit and performance tests covering parallel traversal correctness, early termination, and streaming behavior.
2026-07-04 11:22:04 +02:00
can1357 d5e9084e65 refactor: restructured audit logic and render boundary tracking
- Removed complex snapshot caching and volatile/stable state tracking logic.
- Replaced multi-zone audit logic with streamlined tail-sample checks.
- Simplified render boundaries by deriving a single final boundary from the live region.
- Eliminated redundant audit state management and auxiliary safe-end interfaces.
2026-07-04 09:50:20 +02:00
can1357 b258c790a5 style(pi-natives): fixed manual_assert lint in drop bomb test 2026-07-04 09:06:25 +02:00
can1357 db09905c25 refactor(pi-natives): reduced allocations in pattern deduplication
- normalize_pattern_list now skips all allocation for duplicate patterns
  and reuses the input String when trimming is a no-op.
2026-07-04 09:06:25 +02:00
can1357 1d7e20115b refactor(pi-iso): extracted shared command_failed error formatter
- Collapsed seven duplicated stderr-trim + exit-format sites across diff.rs, rcopy.rs, and overlayfs.rs into one pub(crate) helper.
- Exit code stays caller-formatted so signal-death renders unchanged.
- Also covers the fuse_mount site PR #4376 left with an eager to_string.
2026-07-04 09:06:25 +02:00
can1357 a3becdb7b6 Merge PR #4376: refactor(crates): clean up first-party Rust crates 2026-07-04 08:59:59 +02:00
roboomp 8bd40a6db9 test(browser): restored cmux release mocks after each test
The cmux release regression tests install spies on CmuxSocketClient.prototype. Bun keeps those spies active across later browser-* files unless the file restores them explicitly, so browser-cmux-socket.test could stop exercising the real socket client depending on order.

Restore all Bun test mocks in afterEach after draining any test tabs, preserving mocked cleanup while preventing cross-file pollution.

Fixes #4499
2026-07-04 06:29:41 +00:00
roboomp a6a8258945 fix(browser): propagate cmux tab-close into the run body, not only the caller
Codex review of #4502 flagged that a bare `.catch(() => undefined)`
neutralizes the unhandledRejection but leaves the affected `runInTab`
call blocked inside `runCmuxCode` until timeout when the in-flight
code does not make another cmux socket request (e.g. `await
wait(60_000)`). `releaseTab` was signaling the run only by rejecting
an orphaned promise.

Wire the tab-close event all the way into the cmux run body:

- `PendingRun` gains a `closeAc: AbortController` that `releaseTab`
  aborts BEFORE calling `pending.reject`. `wait(...)` (via
  `waitForBrowserRun` -> `untilAborted`), in-flight cmux socket calls
  (via CmuxTab's `#request` -> `untilAborted`), and facade proxies
  (via `bindBrowserRunFacade`) all consume the composed signal, so
  the run body unwinds within a microtask instead of blocking to its
  own timeout.
- `runInTabWithSnapshot`'s cmux branch composes `closeAc.signal` into
  the run's signal (`AbortSignal.any([opts.signal, closeAc.signal])`)
  and now publishes `runCmuxCode(...)`'s outcome to the shared
  `promise` via `.then(resolve, reject)` and returns `await promise`.
  Both branches thus await the same promise, so `pending.reject`
  always has an attached handler (removing the original crash) AND
  the caller sees `Tab "..." was closed` immediately instead of
  waiting on the run's timeout.
- Drop the defensive `promise.catch(() => undefined)` — the promise
  is now actively consumed on both backends.

The new regression test adds a second case that exercises the
reviewer's exact scenario (`await wait(60_000);`) and asserts:
1. `pending.closeAc.signal.aborted` flips from `false` to `true`
   across `releaseTab`, with the tab-close error as its reason.
2. The awaited `runInTab(...)` rejects with `Tab "..." was closed`.
3. No `unhandledRejection` fires.

Verified locally by temporarily removing `closeAc.abort(...)` in
`releaseTab` — the new assertions fail; restoring it makes them pass.

Fixes #4499
2026-07-04 06:24:45 +00:00
roboomp 3622094e91 fix(browser): swallowed cmux tab-close rejection to prevent session crash
The cmux branch of `runInTabWithSnapshot` awaits `runCmuxCode(...)`
directly and never awaits/`.catch`es the `Promise.withResolvers()`
promise it stashes on `tab.pending`. When `releaseTab` walks pending
runs and calls `pending.reject(new ToolError("Tab ... was closed"))`
(a sibling subagent's `browser close --all`, session-scoped reap, etc.),
that orphaned promise had zero handlers and Bun surfaced the rejection
as `unhandledRejection`, which the CLI's top-level handler treats as
fatal — killing every other tab and subagent sharing the process, not
just the affected run.

Attach a no-op `.catch(() => undefined)` to the promise immediately
after creation. Inert for the worker branch (which still awaits the
same promise via `raceWithTimeout`, and attaching a second handler is
safe) and neutralizes the orphan on the cmux branch.

Adds a regression test that drives real `acquireBrowser` /
`acquireTab` / `runInTab` / `releaseTab` against a mocked
`CmuxSocketClient`, races `releaseTab` against an in-flight cmux run,
and asserts no `unhandledRejection` fires.

Fixes #4499
2026-07-04 06:06:18 +00:00
roboomp 74a8289404 fix(coding-agent): guarded write renderer content
Coerced runtime write content before preview rendering so truthy non-string transcript values cannot crash CR normalization, line counting, or highlighting.

Added regression coverage for pending write calls and merged write results with non-string runtime content.

Fixes #4495
2026-07-04 05:22:21 +00:00
roboomp d4f331a450 fix(ai): kept ollama type unions conjunctive
- Wrapped generated multi-type branches in allOf so existing sibling anyOf constraints remain conjunctive.

- Added a regression case for schemas that combine type arrays with their own anyOf.

Refs #4488
2026-07-04 04:49:01 +00:00
roboomp d4545bc59f fix(ai): preserved multi-type ollama tool unions
- Kept nullable single-type arrays flattened for Ollama while expanding true multi-type arrays into anyOf alternatives.

- Covered non-null string/number and object/array unions in the Ollama provider payload regression test.

Refs #4488
2026-07-04 04:41:51 +00:00
roboomp df45f85885 fix(ai): widened open ollama subschemas instead of collapsing to {}
- Replaced boolean true / empty subschemas with an anyOf union over every primitive JSON type so grammar-constrained samplers (llama.cpp) keep advertising "any JSON value" for unconstrained fields.

- Dropped the WeakMap identity cache; the sanitizer no longer relies on module-external state.

- Updated the provider regression test and changelog entry to the widened shape.

Refs #4488
2026-07-04 04:31:14 +00:00
roboomp 676fefbfce fix(ai): sanitized ollama tool schemas
- Added an Ollama-specific tool schema sanitizer for boolean subschemas, boolean additionalProperties/unevaluatedProperties, and nullable type arrays.

- Applied the sanitizer in the native Ollama chat tool serializer and covered the provider payload contract with a regression test.

Fixes #4488
2026-07-04 04:19:03 +00:00
can1357 fef9b62334 chore: bump version to 16.3.5 2026-07-04 05:19:15 +02:00
can1357 3046718695 chore: update chanelogs 2026-07-04 05:16:58 +02:00
can1357 63e4b3a7bf Merge remote-tracking branch 'origin/farm/2152d73c/preserve-explicit-strict-false' 2026-07-04 05:15:52 +02:00
can1357 3dec7ac12c Merge remote-tracking branch 'origin/farm/99fd01f3/fix-linux-tiny-cuda-runtime' 2026-07-04 05:15:18 +02:00
can1357 6f8e060419 Merge remote-tracking branch 'origin/farm/d78d878e/lsp-duplicate-edits' 2026-07-04 05:14:37 +02:00
can1357 a96f2f9292 Merge remote-tracking branch 'origin/farm/ab9741c2/fix-mcp-oauth-windows-opener-and-url-truncation' 2026-07-04 05:14:28 +02:00
can1357 98e450f0c4 Merge remote-tracking branch 'origin/farm/2dfff794/suppress-orphan-lsp-noise' 2026-07-04 05:13:55 +02:00
can1357 cdad865b64 Merge remote-tracking branch 'origin/farm/8316301c/cherry-pick-skip-empty' 2026-07-04 05:13:37 +02:00
can1357 4bd8f270ae Merge remote-tracking branch 'origin/farm/a6b7ad66/mcp-oauth-carry-challenge-scopes' 2026-07-04 05:13:18 +02:00
can1357 ec6fa53b26 Merge remote-tracking branch 'origin/farm/d5671b86/strip-todo-op-newline' 2026-07-04 05:12:37 +02:00
can1357 21d2c2271a Revert "fix(tui): merged scrollback offer boundary repair"
This reverts commit ae89b3ff08, reversing
changes made to 227874dcc6.
2026-07-04 05:12:18 +02:00
can1357 e9c44f3277 Merge remote-tracking branch 'origin/farm/59fcbc18/guard-large-raw-artifacts' 2026-07-04 05:11:26 +02:00
can1357 45f1d63861 Merge remote-tracking branch 'origin/farm/035627c4/slice-mnemopi-retain-window' 2026-07-04 05:10:38 +02:00
can1357 841677e13a Merge remote-tracking branch 'origin/farm/eae649af/strip-retention-markers' 2026-07-04 05:10:25 +02:00
roboomp 9947c317ef fix(ai): gated codex strict false emission on PI_NO_STRICT
The openai-codex-responses serializer preserved author-set tool.strict === false
even while the PI_NO_STRICT global bypass was active. The Codex path has no
supportsStrictMode or retry gate, so proxies that reject the strict tool field
could still receive it for loose tools despite the documented bypass.

Codex emission now guards explicit false on !NO_STRICT, mirroring the
openai-responses path. CONSTRAINTS.md records the invariant next to the
existing Responses/Completions exceptions.

Fixes #4336
2026-07-04 01:13:11 +00:00
roboomp 7d2b4fd3ca Merge remote-tracking branch 'origin/main' into farm/2152d73c/preserve-explicit-strict-false 2026-07-04 01:04:26 +00:00
roboomp 2b8c8cadfb fix(read): kept raw artifact chunks verbatim and broadened path-only resolution
Skipped the workflow notice on raw selectors so bounded raw reads stay byte-for-byte, and taught resolveToolSearchScope to request pathOnly resolution so ast_grep/ast_edit scope-only calls no longer trip the inline-content cap on large artifacts.

Fixes #4482
2026-07-03 23:36:57 +00:00
roboomp a979713d08 fix(ai): tightened tool-argument whitespace normalization
Resolved Codex review feedback by narrowing identifier normalization to line terminators, preserving POSIX-significant trailing spaces, skipping content payload subtrees, re-running identifier normalization after stringified array coercion, and normalizing tuple prefixItems.

Added regressions for ordinary trailing spaces in paths, stringified path arrays, tuple enum arguments, and nested content payloads.

Fixes #4461
2026-07-03 23:28:46 +00:00
roboomp 7049966def fix(mcp): hydrate JSON-body OAuth scopes from resource metadata
When the error body already advertises OAuth endpoints, `/mcp add` and `/mcp reauth` use `authResult.oauth` directly and skip `discoverOAuthEndpoints`, so scopes advertised only in the RFC 9728 protected-resource metadata document never reach the grant.

Add exported `fetchResourceMetadataScopes(url, opts?)` that fetches the metadata doc and returns `scopes_supported` / `scopes` / `scope`. Hoist the shared `readMetadataScopes` reader out of `discoverOAuthEndpoints`. At all three call sites (wizard, `/mcp add`, `/mcp reauth`), when `oauth` is populated from the JSON body but `oauth.scopes` is empty and `authResult.resourceMetadataUrl` was advertised, fetch the metadata and merge scopes onto `oauth`.

Regression tests cover the resource-metadata fetch and its failure/empty-doc paths.

Refs #4467
2026-07-03 23:27:18 +00:00
roboomp 7497e68189 fix(read): shortened artifact paths in user-visible notices
shortenPath() the artifact.path leaked into the read-tool 'Artifact storage' and 'Unbounded raw read blocked' notices so $HOME never appears verbatim; details.resolvedPath keeps the absolute path for tooling.

Fixes #4482
2026-07-03 23:20:20 +00:00
roboomp ff397cf27a fix(read): kept large artifacts reachable from path-only resolvers
Bash URL expansion and search/grep only need sourcePath; they now request pathOnly resolution so large artifacts stay usable for search/copy workflows while unbounded content materialization stays blocked.

Fixes #4482
2026-07-03 23:17:46 +00:00
roboomp a9bb4c7d59 fix(read): guarded large artifact raw reads
Resolved artifact:// reads to backing files before selector handling, streamed bounded reads, and blocked unbounded raw reads for large artifacts with recovery guidance.

Fixes #4482
2026-07-03 23:08:18 +00:00
roboomp 941a931599 fix(tiny): repaired cuda sidecars for auto gpu requests
Extended ONNX Runtime CUDA sidecar repair to PI_TINY_DEVICE=auto and gpu on Linux x64, matching the CUDA-capable diagnostics path.

Added focused regression coverage for both generic accelerated settings.

Refs #4475
2026-07-03 18:34:56 +00:00