Commit Graph

9881 Commits

Author SHA1 Message Date
can1357 ea147d9d05 Merge PR #5915: docs(advisor): clarify concern delivery after a self-ended yield (@roboomp) 2026-07-18 19:57:43 +02:00
can1357 e7adbb1093 Merge PR #5935: perf(coding-agent): coalesce subagent recent-output reconstruction to emit boundaries (@metaphorics) 2026-07-18 19:57:43 +02:00
can1357 5570aaaa05 Merge PR #5940: fix(tui): scope stable-focus keystroke renders (@roboomp) 2026-07-18 19:57:43 +02:00
can1357 8af064002f Merge PR #5941: fix(coding-agent): parallelize session teardown (@roboomp) 2026-07-18 19:57:43 +02:00
can1357 6945c4cd9b test: stub getLastAssistantMessage in noninteractive-dispose session mock 2026-07-18 19:44:47 +02:00
can1357 f7f8e1188c chore: normalized changelog sections after merges 2026-07-18 19:43:33 +02:00
can1357 a1caad9ce7 test: stub getLastAssistantMessage in print-mode session mocks for baseline compatibility 2026-07-18 19:43:17 +02:00
can1357 822e461b5a Merge PR #5942: fix(coding-agent): drain advisor reviews in print mode (@paralin)
# Conflicts:
#	packages/coding-agent/test/print-mode-working-indicator.test.ts
#	packages/coding-agent/test/silent-abort-print-mode.test.ts
2026-07-18 19:43:17 +02:00
can1357 65534c5c07 Merge PR #5947: perf(session): memoize convertToLlm and estimateTokens over settled history (@roboomp) 2026-07-18 19:42:52 +02:00
can1357 55b5a8d73c Merge PR #5962: fix(session): discard capped zero-block assistant stops (@roboomp) 2026-07-18 19:42:52 +02:00
can1357 b5033707b9 Merge PR #5969: fix(extensibility): re-export getPackageDir/getProjectDir from legacy pi shim (@roboomp) 2026-07-18 19:42:51 +02:00
can1357 b8091d4f2c Merge PR #5972: fix: resolve configured model roles in --model (@paralin) 2026-07-18 19:42:51 +02:00
can1357 f8cd966406 Merge PR #5988: fix(coding-agent): render ask option previews inline (@metaphorics) 2026-07-18 19:42:50 +02:00
can1357 bf94f05a8e fix(coding-agent): reactivate a live debug session when the active child terminates
When the active js-debug child exits or terminates while other tree
sessions remain alive, #activeSessionId pointed at the dead child and
every subsequent tool action failed. Reassign to a live tree session
(preferring stopped, then non-root) on exited/terminated/proc-exit.
Regression test proves threads route to the surviving session.
2026-07-18 19:42:50 +02:00
can1357 ab77aeb245 Merge PR #5989: fix(coding-agent): enable js-debug child sessions (@roboomp) 2026-07-18 19:42:50 +02:00
can1357 3d8cd494ec Merge PR #5997: fix(agent): preserve side-effecting hub outcomes (@roboomp) 2026-07-18 19:42:37 +02:00
can1357 ed18b72075 Merge PR #5999: fix(launch): prevent finite PTY start hangs (@roboomp) 2026-07-18 19:42:37 +02:00
can1357 81aa577865 Merge PR #6002: fix(search): honor configured Codex transport (@roboomp) 2026-07-18 19:42:36 +02:00
can1357 b95a25820f Merge PR #6005: fix(browser): isolate request interception per run (@roboomp) 2026-07-18 19:42:36 +02:00
can1357 df9b04a0eb fix(task): canonicalize the shared-common-dir gate in detachGitDir
rev-parse --git-common-dir resolves symlinks while ensureIsolation derives
sourceCommonDir lexically from the session cwd (resolveRepository walks
path.resolve'd components). On any symlinked repo path (macOS /tmp,
symlinked project dirs) the lexical comparison missed, detachGitDir
returned "independent", and the parent-mutation leak silently survived.
Realpath both sides before comparing; regression test drives the gate
through a symlink alias.
2026-07-18 19:42:36 +02:00
can1357 53437aff3d fix(task): harden detachGitDir edge handling
- Match the rcopy worktree-add registration via realpath: git canonicalizes
  the admin gitdir back-reference (macOS /var -> /private/var), so the
  lexical comparison missed it and left a stale registration in the source
  repo's worktree list.
- Carry core.fileMode so an explicit filemode=false source does not read as
  mode-changed files in the detached isolation.
- Carry core.splitIndex and the sharedindex.* files referenced by a split
  source index; restoring the raw index without them broke every git read.
- Carry the source shallow boundary file so history traversal over the
  borrowed object DB stops at the boundary instead of failing.
- Regression test covering all three carries.
2026-07-18 19:42:36 +02:00
can1357 38454e263b Merge PR #6007: fix(task): detach isolated worktree git dir from parent checkout (@roboomp) 2026-07-18 19:42:36 +02:00
can1357 4143abf511 Merge PR #6008: fix: scope provider request hooks to the request model (@roboomp) 2026-07-18 19:42:35 +02:00
roboomp 970043bd8a fix(task): preserve sparse-checkout state when detaching isolation
A fresh `git init` in detachGitDir dropped core.sparseCheckout and the
sparse-checkout patterns, and rebuilding the index via write-tree/
read-tree discarded skip-worktree bits. Files intentionally absent from
a sparse working tree then read as deletions, which delta capture could
apply back to the parent.

detachGitDir now restores the index verbatim (preserving skip-worktree,
assume-unchanged, and exact stage entries) and carries
core.sparseCheckout, core.sparseCheckoutCone, and info/sparse-checkout
into the detached .git before restoring the index. Falls back to
read-tree HEAD only when the source had no index.

Fixes #6003
2026-07-18 17:04:40 +00:00
roboomp 37304a12a3 fix(task): detach unborn linked worktrees from parent checkout
A linked git worktree with an unborn HEAD (a fresh/orphan branch with no
commits) still shares the parent's common dir, so an isolated task's
first branch and commit would write into the parent repo. The previous
early return on a missing HEAD SHA left that shared metadata intact.

detachGitDir now severs unborn worktrees too: `git init -b <branch>`
preserves the checked-out branch name, ref freezing is gated on a born
HEAD, and the rcopy worktree registration is still removed.

Fixes #6003
2026-07-18 16:57:41 +00:00
can1357 37456c5f4b fix(coding-agent/session): cleared todo reminder and track assistant message synchronously
- Moved `#todoReminderAwaitingProgress` clearing into tool result handler for synchronous state update.
- Moved `#lastAssistantMessage` tracking to message_end to prevent stale reads when events land in same tick.
2026-07-18 18:56:32 +02:00
roboomp bf232ca062 fix(extensions): scoped provider hooks to request model
Passed the per-request model through SDK payload callbacks and ExtensionRunner context creation.

Added regression coverage for Codex-primary and Anthropic-request contexts.

Fixes #6006
2026-07-18 16:52:15 +00:00
roboomp afea682b7f fix(task): detach isolated worktree git dir from parent checkout
Copy isolation backends (reflink/apfs/btrfs/zfs/block-clone/rcopy)
materialise the worktree by duplicating its `.git` verbatim. When the
parent is a linked git worktree its `.git` is a pointer file, so the
isolation shared the parent's HEAD/index/ref namespace: a task's
`git checkout`/`commit` moved the parent's branch, and the rcopy
`git worktree add` path stacked task branches in the shared namespace.

`ensureIsolation` now runs `git.detachGitDir` after `isoStart`, turning
each isolation into a standalone repo with a frozen HEAD/refs/index
snapshot that borrows the source object database via
`objects/info/alternates`. Isolated git ops stay private, every task
branch is parented on the requested base, and patch/branch capture
(`git fetch <merged>`) still resolves objects.

Fixes #6003
2026-07-18 16:48:33 +00:00
roboomp e0358b77a0 fix(browser): unregister fired once request handlers
- Removed the once wrapper from Puppeteer's request emitter on first fire so it cannot leak into later runs.
- Added regression coverage asserting a fired once handler leaves zero residual request listeners.

Fixes #6004
2026-07-18 16:31:10 +00:00
roboomp fe2fdf6564 fix(browser): isolated request interception per run
- Removed run-scoped Puppeteer request handlers and disabled interception on every browser.run exit path.
- Recycled workers when bounded interception cleanup cannot restore the tab, with raw CDP recovery for held requests.
- Added live Chromium coverage for held requests, normal traffic restoration, and thrown setup calls.

Fixes #6004
2026-07-18 16:22:40 +00:00
can1357 c439b1eacd docs(tools): documented ARIA ref selector and navigation gotchas
- Clarified that snapshot refs work in any selector slot with equivalence example.
- Expanded navigation gotcha to include re-renders and virtualized lists.
2026-07-18 17:51:57 +02:00
can1357 1a6fc09611 feat(tools): added bare ARIA ref support in browser actions, fixed select() double-count
- Added bare `eN`/`@eN` regex to `parseAriaRefSelector` so agents can copy refs straight from snapshot output.
- Applied ref resolution to `press`, `screenshot`, `drag`, `select`, and `uploadFile` action handlers.
- Fixed `#select` to assign the full option set first then read back, avoiding double-counting when unselecting mid-loop.
2026-07-18 17:51:54 +02:00
can1357 133af40c03 feat(session): serialized subscriber fan-out to prevent event reordering
- Added `#subscriberEmitGate: Promise<void>` FIFO ticket to order concurrent `#emitSessionEvent` calls and prevent event reordering.
- Modified `#emitSessionEvent` to serialize subscriber fan-out: waits for previous gate before emitting, ensuring `message_start` arrives before `message_end` regardless of extension handler asymmetry.
- Added `#prunedTerminalRefusal` field to retain classifier-refusal turns for post-settle readers.
2026-07-18 17:51:51 +02:00
can1357 c655db4e3c fix(session): added #prunedTerminalRefusal field to store the
- Added `#prunedTerminalRefusal` field to store the pruned refusal for post-settle consumers.
- Modified `getLastAssistantMessage()` to return the pruned refusal before active-context lookup.
- Reset `#prunedTerminalRefusal` on `agent_start` so a fresh run supersedes the settled refusal.
- Updated test mock helpers to include `getLastAssistantMessage` for consistency.
2026-07-18 17:51:48 +02:00
can1357 127cca511a refactor(modes): removed scrollback compaction from TranscriptContainer
- Removed `#compactedChildStart` state, `compactable` segment field, and `#compactCommittedPrefix()` method, stopping the local-frame pruning of committed finalized rows.
- Post-finalize mutations now surface on every render via version tracking, instead of requiring a destructive replay to rehydrate the compacted block.
- Changed `print-mode.ts` to use `session.getLastAssistantMessage()` instead of array tail read, fixing access to terminal assistant messages after compaction removal.
2026-07-18 17:51:45 +02:00
roboomp 2d27bfdd66 fix(search): allowed command-backed codex keys
- Exposed command-backed provider-key detection from ModelRegistry.
- Allowed configured Codex command keys to outrank stored OAuth while preserving the custom-endpoint OAuth guard.
- Added resolver-precedence regression coverage.

Fixes #6001
2026-07-18 15:34:03 +00:00
roboomp feac38298f fix(search): guarded codex origin from resolver storage
- Validated the openai-codex credential origin against the registry storage that supplies the bearer, closing the OAuth-leak path when authStorage and modelRegistry diverge.
- Added a regression test covering the mismatched storage case.

Fixes #6001
2026-07-18 15:26:37 +00:00
roboomp 9c2682cea2 fix(search): honored configured codex transport
- Routed Codex web search through configured Responses base URLs, API keys, and headers while preserving the official OAuth backend.
- Refused OAuth leakage to custom endpoints and stopped explicitly selected providers from silently falling back.
- Added transport, safety, and fail-closed regression coverage.

Fixes #6001
2026-07-18 15:21:09 +00:00
roboomp 044b74594f fix(launch): prevented finite PTY start hangs
- Reported the spawned PTY child PID through the native start callback.
- Replaced broker PID-file polling with the authoritative spawn event.
- Covered finite PTY startup without the legacy handoff in integration tests.

Fixes #5996
2026-07-18 14:54:53 +00:00
roboomp a713b941dc fix(agent): preserved side-effecting hub outcomes
Resolved tool interruptibility from each call's raw arguments so mixed-operation tools can keep side-effecting calls non-interruptible.

Restricted the unified hub to interrupt passive waits and followed logs while preserving start, send, and lifecycle operation results.

Fixes #5995
2026-07-18 14:41:19 +00:00
robomp-bot 2300c9ff41 fix(coding-agent): addressed PR review feedback (#5988)
- Kept tall-preview pages inside the selected option row.\n- Compared cached overflow output against the initial width-adjusted render.\n\nNote: pre-existing repository formatting failures in bun check are not addressed by this PR.
2026-07-18 22:29:31 +09:00
roboomp d2fcdd434d fix(coding-agent): activated running debug children
Selected adapter-requested children immediately so thread-level actions target attach sessions and launches that do not stop on entry.

Fixes #5984
2026-07-18 12:03:52 +00:00
robomp-bot 1570f2510d docs(coding-agent): documented inline ask previews 2026-07-18 20:57:49 +09:00
roboomp 61fdd4dfbc fix(coding-agent): enabled js-debug child sessions
Added TCP server transport for vscode-js-debug and recursively handled startDebugging requests, breakpoint synchronization, active child routing, and tree cleanup.

Fixes #5984
2026-07-18 11:56:42 +00:00
robomp-bot 59b9f6568a fix(coding-agent): showed remapped cancel key in ask footer
Ask dialogs accepted the configured cancel binding but always advertised Escape. Derive the compact footer label from the active binding so the displayed key remains actionable.
2026-07-18 20:52:29 +09:00
robomp-bot a741e0b388 fix(coding-agent): rendered ask option previews inline
Rich ask options previously exposed preview content only for the highlighted row. Render every preview beneath its option and keep long content reachable without reviving the split-pane layout.
2026-07-18 20:42:23 +09:00
Christian Stewart 670304eafa fix(coding-agent): resolve bare model role aliases
Signed-off-by: Christian Stewart <christian@aperture.us>
2026-07-18 03:51:09 -07:00
Christian Stewart c8f1972c8c fix(coding-agent): drain advisor reviews in print mode 2026-07-18 01:51:00 -07:00
roboomp 5082763d49 fix(extensibility): guarantee string getPackageDir in compiled shim builds
omp's canonical getPackageDir() returns undefined inside a bun --compile
binary (import.meta.dir is /$bunfs/root, no owning package.json — issue
#1423). Re-exporting it directly broke pi's string-valued contract:
legacy extensions doing path.join(getPackageDir(), ...) crashed at
runtime in the shipped binary, the primary distribution.

Wrap the canonical helper so the shim always returns a string, falling
back to the executable's directory in compiled mode (where the binary is
the install root). PI_PACKAGE_DIR and dev/source/npm-dist walk-up still
win. Test covers the compiled-mode fallback via isCompiledBinary spy.

Fixes #5968
2026-07-18 06:50:00 +00:00
roboomp 4a25993682 fix(extensibility): re-export getPackageDir/getProjectDir from legacy pi shim
The legacy pi compatibility shim only forwarded getAgentDir (via
`export * from "../index"`). getProjectDir and getPackageDir were absent,
so any pi extension importing either from @earendil-works/pi-coding-agent
failed Bun's static export check during extension validation and the
install was rolled back.

Re-export getProjectDir from @oh-my-pi/pi-utils and getPackageDir from
omp's canonical config helper (returns the coding-agent package root,
matching pi semantics).

Fixes #5968
2026-07-18 06:41:55 +00:00