Commit Graph

6842 Commits

Author SHA1 Message Date
can1357 dcb16d86f6 perf(compaction): kept per-turn tool-result pruning inside the warm prompt-cache prefix
- Added `keepBoundaryId` and `cacheWarmSuffixTokens` guards to `pruneToolOutputs` and `pruneSupersededToolResults` so superseded/useless results sitting in the already-sent cached prefix are no longer rewritten mid-session, with new `computeMessageSuffixTokens`/`resolveBoundaryIndex` helpers.
- Added a `keepBoundaryId` floor to `collectShakeRegions` so shake skips entries summarized away by the latest compaction.
- Threaded `firstKeptEntryId`, `PRUNE_CACHE_WARM_SUFFIX_TOKENS` (8k) and `PRUNE_IDLE_FLUSH_MS` (90m, above the 1h cache TTL) from `#pruneToolOutputs`, `#pruneStaleToolResults` and `shake` in `agent-session.ts`.
- Added six boundary tests in `supersede-prune.test.ts` covering warm-prefix protection, tail-case pruning, and the pre-boundary floor.
2026-06-19 06:57:53 +02:00
can1357 96151e6c30 feat: implemented tool description pruning to reduce token usage
- Added utility functions to strip descriptions from JSON schemas and tool definitions for optimized token output.
- Integrated `pruneToolDescriptions` configuration across agent loops and sessions to enable optional schema pruning.
- Updated agent context and snapshot logic to propagate pruning settings and maintain fingerprinting integrity.
- Verified schema structural integrity and removal of annotation descriptions through new unit tests.
2026-06-19 06:55:19 +02:00
can1357 f01b5e4c27 refactor(snapcompact): updated MAX_FRAMES_DEFAULT to 80 to better
- Update `MAX_FRAMES_DEFAULT` to 80 to better utilize high-capacity model context windows.
- Remove `providerFrameBudget` from `snapcompact` to decouple archival limits from provider-specific image caps.
- Update `compact` logic to treat `maxFrames` as a hard upper bound rather than a provider-clamped limit.
2026-06-19 06:33:19 +02:00
can1357 fa45b9e7f9 test(coding-agent): migrated temp file creation to system temp directory
- Standardized all test temporary file handling to use the system temp directory (`os.tmpdir`) instead of creating artifacts inside the source tree.
- Added lifecycle management to `ttsr-cli.test.ts` to ensure temporary directories are created once per test run and cleaned up automatically.
- Updated file generation paths in CLI and reproduction tests to prevent local state pollution.
2026-06-19 05:11:40 +02:00
can1357 f7937c5e8d chore: bump version to 16.0.11 2026-06-19 04:59:59 +02:00
can1357 4f03180ae6 refactor(deps): moved intent field constant to pi-wire
- Moved the `INTENT_FIELD` constant from `@oh-my-pi/pi-agent-core` to the specialized `@oh-my-pi/pi-wire` package to permit broader usage across the monorepo.
- Updated all references across `agent`, `ai`, `coding-agent`, `collab-web`, and `snapcompact` packages to import the constant from the new location.
- Added `@oh-my-pi/pi-wire` as a dependency to all affected packages.
2026-06-19 04:58:29 +02:00
can1357 3a8005a46f fix(coding-agent/tools): adjusted inline argument preview truncation
- Removed the fixed 24-column truncation cap for argument preview values.
- Implemented a dynamic width allocation that reserves space for subsequent keys, allowing single values to expand when additional space is available.
- Added comprehensive unit tests to verify proper formatting and key visibility across varying constraints.
2026-06-19 04:53:51 +02:00
can1357 256587bbbe ux(coding-agent): standardized elision indicators in scraper output
- Replaced inconsistent list truncation messages with a standardized `[...N items elided...]` format across all scrapers.
- Updated documentation reference to use consistent variable naming convention.
2026-06-19 04:51:39 +02:00
can1357 3998d95088 feat: standardized tab expansion to fixed width
- Removed configurable tab width support and the `display.tabWidth` setting across all packages.
- Deleted obsolete utility functions `getIndentation`, `getIndentationNoescape`, and `setDefaultTabWidth`.
- Standardized tab expansion logic to use a fixed `DEFAULT_TAB_WIDTH` globally.
- Cleaned up related configuration schemas, test suites, and internal API signatures to remove path-dependency.
2026-06-19 04:48:41 +02:00
can1357 9d2728a455 ux(coding-agent): standardized truncation formatting for elided content
- Updated log and error truncation messages to use a consistent `[...Nch elided...]` format.
- Standardized diagnostics and prompt text output to improve consistency in reporting truncated information.
2026-06-19 04:45:08 +02:00
can1357 1df1349b99 ux: standardized elision markers
- Updated various truncation and overflow messages across `pi-shell` and `coding-agent` to use the consistent `[...N units elided...]` format.
- Improved clarity of elided output by explicitly stating the count and type of omitted information.
2026-06-19 04:42:06 +02:00
can1357 c224ef4df5 feat: standardized elision markers and improve transcript viewer robustness
- Standardized elision markers across all tool outputs and filters to use cohesive `[...N [type] elided...]`, `[...Nln elided...]`, and `[...xB elided...]` syntax.
- Updated documentation, prompts, and test expectations to reflect the unified elision format.
- Improved transcript viewer robustness by preventing content aliasing through path-inclusive signature hashing.
- Added logic to clear stale transcript content when associated session files are deleted, accompanied by verifying test cases.
2026-06-19 04:35:18 +02:00
can1357 b33a4b80df fix(coding-agent): aligned transcript viewer body with header
- Fixed an alignment issue where the transcript body was incorrectly offset by an extra gutter column relative to the "Agent Hub" title.
- Updated the transcript renderer to omit the redundant outer gutter and ensure file-mention rows include the standard 1-column left pad.
- Added regression tests to verify consistent gutter alignment and correct scroll behavior.
2026-06-19 04:29:49 +02:00
can1357 280492a605 feat(coding-agent): migrated agent transcripts to fullscreen overlay
- Replaced inline chat view with a dedicated fullscreen `AgentTranscriptViewer` overlay.
- Introduced `ChatTranscriptBuilder` to enable non-incremental, full-history transcript rendering.
- Implemented robust state management for thinking blocks, message history, and transcript disposal.
- Added support for auto-reloading local session files and sync for remote transcript data.
2026-06-19 04:13:10 +02:00
can1357 bc96f52cb7 feat(coding-agent): forced display reset on thinking visibility toggle
- Replace individual component invalidation with a full display reset when toggling thinking block visibility.
- Ensure stale snapshots of thinking blocks in terminal scrollback are retired correctly.
2026-06-19 04:12:25 +02:00
can1357 d30b9d8f88 Merge remote-tracking branch 'origin/farm/266899cd/acp-mobile-speech-models' 2026-06-19 03:56:32 +02:00
can1357 29d250fae2 feat(coding-agent): supported advisor transcript persistence
- Implemented `AdvisorTranscriptRecorder` to persist advisor sessions to append-only `__advisor.jsonl` files.
- Integrated transcript recording into agent sessions with managed flushing, atomic file switching, and synthetic turn attribution.
- Restricted advisor-kind agents by excluding them from rosters, history protocols, messaging, and interactive agent commands.
- Reserved the `__advisor` filename stem across the output manager and task registry to prevent task ID collisions.
2026-06-19 03:50:00 +02:00
can1357 2b843dc744 feat(coding-agent): reset advisor settings for protocol hosts
- Included advisor syncBacklog and immuneTurns in the default-resetting configuration for protocol hosts.
- Updated the lazy startup tests to verify that these settings are reset to defaults rather than inheriting user-defined values when a protocol host initiates.
2026-06-19 03:48:37 +02:00
roboomp 9a8e625a44 fix(acp): listed local speech models
Added the ACP mobile speech.models.list method so voice settings can fetch static local STT, TTS, and voice catalog options without invoking setup/download paths.

Fixes #3011
2026-06-19 01:19:08 +00:00
can1357 71144825ec feat(coding-agent): extended compact command with submode support
- Added a `mode` property to `CompactOptions` to allow fine-grained control over compaction strategies.
- Implemented `soft`, `remote`, and `snapcompact` submode overrides for the `/compact` command.
- Integrated `parseCompactArgs` to enable robust subcommand routing and validation, including focus instruction rejection for specific modes.
- Established a `CompactMode` registry to manage compaction strategies and verify remote availability.
2026-06-19 02:55:21 +02:00
can1357 2e6e56711f fix: prevented shell command corruption in sequential chains
- Validated every stage of a pipeline against `simple_command_is_safe` instead of only the first stage to prevent improper segmentation of compound shell constructs.
- Guarded segment re-execution by verifying that each `Display`-reconstructed command parses back to the expected pipeline shape.
- Configured segmented-chain execution to fall back to an unsegmented, whole-command path whenever a reconstructed segment diverges from the original AST.
- Resolved a syntax error during command execution by preventing `Display` from stripping terminators from compound commands like `while` and `for` loops.
2026-06-19 02:39:44 +02:00
can1357 623ae8df35 chore: bump version to 16.0.10 2026-06-19 01:32:28 +02:00
can1357 8588aa5802 refactor(coding-agent/slash-commands): removed collab qrcode slash commands
- Removed qrcode and qrcode-view subcommands from the collab command.
- Updated showCollabLink to always trigger QR code display.
- Refactored internal verb logic to simplify session sharing flow.
2026-06-19 01:30:26 +02:00
can1357 a7fdd0b4ed chore: reformat 2026-06-19 01:22:20 +02:00
can1357 a0defa17ce refactor(collab): replace qrcode dependency with a self-contained QR encoder
Drop the runtime qrcode + @types/qrcode packages in favor of a zero-dependency
byte-mode QR encoder (versions 1-40, EC L/M/Q/H, auto version + mask selection)
with a half-block ANSI renderer. Cross-validated byte-for-byte against the qrcode
reference library and decoded end-to-end with jsQR. Adds encoder regression tests.
2026-06-19 01:21:21 +02:00
Bin Jin e91d2cc776 feat(collab): added QR links and split web UI URL support
- Added collab.webUrl and rendered browser links as web UI wrappers whose fragments carry relay links.
- Added one-shot /collab qrcode and /collab qrcode-view commands with terminal QR rendering.
- Updated coding-agent and collab-web parsers to prefer parseable wrapper fragments while preserving legacy links.
- Added regression tests and changelog entries for split-host collab links and QR commands.
2026-06-19 01:21:21 +02:00
can1357 f743ddc83d feat: replaced XML-style pi dialect with sigil-delimited format
- Migrated the `pi` AI dialect from legacy XML-style elements to a compact, token-frugal sigil-delimited format using `§` for calls, `""` for body fences, and `¤` for thinking.
- Implemented robust parsing for the new format, including support for incremental streaming of tool arguments and automatic escalation of body fences to prevent content collisions.
- Updated documentation, settings configurations, and test suites across the `ai` and `coding-agent` packages to ensure consistency with the new dialect rules.
- Standardized moderation category terminology in `stats` to improve clarity in reporting metrics.
2026-06-19 01:19:41 +02:00
can1357 eeb9128510 docs(changelog): move merged fix entries (#2775/#2573/#2729/#2791) to [Unreleased] 2026-06-19 01:00:57 +02:00
can1357 5168e6d6af Merge PR #2791: fix(tool): resolve pasted image attachments in inspect_image (@roboomp)
# Conflicts:
#	packages/coding-agent/src/tools/inspect-image.ts
2026-06-19 00:59:03 +02:00
can1357 3e91783da8 fix(coding-agent): treat openrouter :max suffix as thinking selector
getOpenRouterRouteSuffix() used strict parseThinkingLevel(), which never
recognizes the max->xhigh alias, so openrouter/<id>:max was consumed as an
OpenRouter route suffix and cloned into a literal <id>:max model id with the
reasoning level dropped. This hit every exact-selector funnel
(parseModelPattern -> resolveCliModel/--model, resolveModelRoleValue/modelRoles
+ model picker, SDK default role) for the dominant aggregator provider.

Exclude max via parseThinkingSuffix(.., MAX_THINKING_SUFFIX_OPTIONS) so the
pattern falls through to the existing max-aware selector split. Literal :max
ids stay safe (none exist under openrouter; nanogpt literals win via exact
lookup before this path). Adds an openrouter/<id>:max regression test.
2026-06-19 00:58:52 +02:00
can1357 5d72ce1237 Merge PR #2729: fix(coding-agent): accept max thinking alias (@roboomp)
# Conflicts:
#	packages/coding-agent/test/model-resolver.test.ts
#	packages/coding-agent/test/sdk-model-selection.test.ts
2026-06-19 00:58:52 +02:00
can1357 f5c3b34a41 Merge remote-tracking branch 'origin/farm/11c539c6/bedrock-inference-profile-model' 2026-06-19 00:14:48 +02:00
can1357 c5c0229da0 style: biome format #2839 dispose-disconnect test 2026-06-19 00:14:21 +02:00
can1357 51f54ad30a docs(changelog): consolidate changelog entries under [Unreleased]; add #2906/#2839 notes 2026-06-19 00:14:20 +02:00
roboomp 12f608e0f4 fix(providers): used neutral bedrock profile metadata
Stopped synthetic Bedrock inference profile ARN models from inheriting Claude Opus reasoning and context metadata.

Fixes #3004
2026-06-18 21:40:08 +00:00
can1357 6d5f548147 fix(mcp): bound owned-manager disconnect on dispose
The dispose() disconnect added by this PR awaited mcpManager.disconnectAll()
unbounded. An owned manager holding an HTTP/SSE server whose session-
termination DELETE hangs would block dispose for the full MCP request timeout
(30s default, unbounded when OMP_MCP_TIMEOUT_MS=0), stalling /exit and
print-mode shutdown on a broken remote endpoint.

Wrap the disconnect in withTimeout(..., 3_000) — mirroring the bounded
async-job teardown two lines above and the startup bound from issue #2100.
stdio close (the subprocess reap this PR targets) completes well within the
bound; a slow transport close is left to finish detached.

Adds a regression test driving the real MCPManager.disconnectAll() with a
stalled transport close.
2026-06-18 23:32:55 +02:00
can1357 e6228ebda0 fix(coding-agent): move #2909 changelog entry to [Unreleased]
The quoted-path fix entry was appended under the already-released [16.0.6] section (creating a duplicate ### Fixed heading); released sections are immutable per repo convention. Move it to [Unreleased] and normalize the bullet.
2026-06-18 23:32:54 +02:00
can1357 469e4626d0 Merge PR #2839: fix(mcp): disconnect owned MCP manager on AgentSession.dispose() (@jms830) 2026-06-18 23:32:54 +02:00
can1357 7c635de10a Merge PR #2914: fix(coding-agent): preserve queued steers/follow-ups during auto-compaction (@metaphorics) 2026-06-18 23:32:54 +02:00
can1357 1c051532d4 Merge PR #2809: fix(coding-agent/config): support comments in JSON config migration (@usr-bin-roygbiv) 2026-06-18 23:32:54 +02:00
can1357 4406559996 Merge PR #2909: fix(coding-agent): support quoted paths with spaces in file arguments and mentions (@pidevxplay) 2026-06-18 23:32:54 +02:00
can1357 7a819bba16 Merge PR #2906: fix(login): honor disabledProviders in /login provider list (@dipunj) 2026-06-18 23:32:53 +02:00
roboomp b67d07e829 fix(providers): preserved bedrock profile thinking suffixes
Handled Bedrock inference profile ARNs through the normal thinking selector parser so suffixes such as :off do not become part of the ARN.

Fixes #3004
2026-06-18 21:26:35 +00:00
roboomp 3a736ff7c1 fix(providers): accepted bedrock inference profile arns
Resolved Amazon Bedrock application inference profile ARNs through the provider-specific model resolver and routed Bedrock requests to the ARN region.

Fixes #3004
2026-06-18 21:06:01 +00:00
usr_bin_roygbiv bc5f25af23 fix(coding-agent/config): support comments in JSON config migration 2026-06-18 16:05:06 -05:00
can1357 20f8c3776f chore: bump version to 16.0.9 2026-06-18 23:01:31 +02:00
can1357 828699ffdf test(catalog): drop evaluator-worktree note from copilot signing test 2026-06-18 23:01:11 +02:00
can1357 3006fe817b test(coding-agent): drop evaluator-worktree note from plan-reference test 2026-06-18 22:57:20 +02:00
can1357 0c69b35785 style: biome format integrated #2851/#1246/#2972 changes 2026-06-18 22:56:24 +02:00
can1357 a1dbbb50c9 Merge PR #2986: fix(session): prevent goal mode pause during compaction/switch (@roboomp) 2026-06-18 22:53:39 +02:00