Commit Graph

15846 Commits

Author SHA1 Message Date
can1357 222e3569bd perf: optimized markdown rendering speed and device doc schemas
- Render device doc parameter schemas as TypeScript types instead of raw JSON schema dumps.
- Optimize marked streaming block rules and add pre-gates to reduce CPU overhead.
- Increase the markdown render cache entry budget from 32 KiB to 256 KiB.
2026-07-27 22:19:51 +02:00
can1357 4210727227 feat(coding-agent): integrated v8 cpuprofile parsing into read tool
- Added V8 `.cpuprofile` parser and bottleneck summary generation utilities.
- Integrated profile summary rendering into the read tool execution.
- Refactored profile rendering machinery into shared tree utilities.
- Added comprehensive unit and integration tests for cpuprofile parsing and read tool dispatch.
2026-07-27 20:37:46 +02:00
can1357 1888b0999e perf(tui): optimized markdown lexing, editor input, and cursor updates
- Optimized markdown streaming lexing, tokenizers, and render cache limits.
- Improved editor input handling with bulk printable fast paths and iterative chunk processing.
- Added cursor visibility tracking and deduplication to prevent redundant terminal escape sequences.
- Added benchmarks and unit tests covering markdown streaming, incremental lexing, and editor fast paths.
2026-07-27 20:33:39 +02:00
can1357 6b42097d12 perf(agent): implemented caching for session file scans and actions
- Add an LRU cache to `scanSessionFile` in `session-listing.ts` keyed by file path, stat identity, and scan mode.
- Add a match key union probe in `CustomEditor` in `custom-editor.ts` to bypass per-action lookups on plain text input.
- Add tests covering cache hits, size and mtime invalidations, and negative result caching.
2026-07-27 20:33:38 +02:00
can1357 1d74bc73e3 refactor(ai): optimized credential lookup and stream chunk processing
- Memoize credential lookup and filtered usage report output in RemoteAuthCredentialStore for O(1) steady-state performance.
- Optimize Devin stream chunk processing to avoid redundant buffer copies during steady-state reads.
- Add comprehensive integration test covering usage report filter memoization and cache invalidation on snapshot changes.
2026-07-27 20:33:37 +02:00
can1357 b459bf3ec6 perf(ai): optimized stream reader buffer handling to eliminate copying
- Optimize stream reader buffer handling by avoiding unnecessary copying when the pending buffer is empty.
2026-07-27 20:33:37 +02:00
can1357 7db4463da6 feat: introduced parser for macos sample reports and updated models
- Added a new parser and bottleneck summary renderer for macOS `/usr/bin/sample` reports with symbol demangling.
- Integrated automated summary parsing for sample reports into the ReadTool.
- Updated model configurations and pricing parameters across multiple providers.
- Added comprehensive unit and integration tests for sample profile parsing and ReadTool integration.
2026-07-27 20:08:30 +02:00
can1357 2f63a07ba9 style(shell): removed unused mut in kill test helper 2026-07-27 17:11:37 +02:00
can1357 15517cc563 fix(build): repinned bazel crate lockfile for pi-walker windows-sys features
- 3d9f28dd46 changed pi-walker Cargo.toml dependency features without
  CARGO_BAZEL_REPIN, so crate_universe failed the digest check and CI
  could not start the rust workspace validation.
2026-07-27 17:10:44 +02:00
can1357 01d8347b81 chore: bump version to 17.1.6 2026-07-27 17:07:05 +02:00
can1357 811cb77c52 feat(coding-agent): updated steering interjection format to system notice
- Restructured the user interjection prompt to use a system-notice envelope instead of nested message tags.
- Updated associated tests to verify the new system-notice formatting for steering messages.
2026-07-27 17:06:40 +02:00
can1357 3d9f28dd46 refactor: resolved cross-platform build warnings and add windows-sys features
- Add conditional attributes to silence dead-code warnings on platform-specific code and fields.
- Update target dependencies in pi-walker/Cargo.toml with explicit windows-sys feature sets.
- Simplify time cast expressions in linux_reflink and rcopy modules.
2026-07-27 17:04:52 +02:00
can1357 d16a251777 chore: reorg tests 2026-07-27 16:43:53 +02:00
can1357 137bad2c8b style: applied biome formatting to review follow-up changes 2026-07-27 16:17:04 +02:00
can1357 41ce810cff fix(mcp): preserved native resource URIs and opaque scheme routing
- Native (non-mcp://) resource URIs now pass through byte-for-byte via
  rawHref; slash elision applies only to the legacy mcp:// wrapper, so
  catalog://root/ style URIs match exact-equality server lookups.
- resources/templates/list failure no longer discards a successful
  resources/list (Promise.allSettled; templates retried later).
- Opaque RFC 3986 URIs (urn:doc, custom:item) are recognized by both
  the router and read-cli discovery gates, with drive-path and
  read-selector false positives guarded.
- Review follow-up for PR #6790.
2026-07-27 16:15:02 +02:00
can1357 8c5dc16344 fix(task): enforced per-spawn effort ceiling across retry fallbacks
- task.maxEffort only clamped the initial thinking level; a retry
  fallback candidate could clamp back up to its model floor and run a
  low-capped spawn at high.
- The ceiling now rides the session as thinkingLevelCeiling: clamped in
  ModelControls (constructor, setThinkingLevel, auto classifier,
  restore) and in applyRetryFallbackCandidate; fallback candidates whose
  floor exceeds the ceiling are skipped.
- Effort value import moved to @oh-my-pi/pi-catalog/effort; changelog
  attribution added.
- Review follow-up for PR #6794.
2026-07-27 16:09:28 +02:00
can1357 9448aac3a6 fix(mcp): kept disable precedence and stable tool collision winners
- Added a suppress load option so disabled servers still claim their
  capability key: a project foo with enabled:false shadows a same-named
  enabled user foo again, while scope-removed entries drop fully.
- Tool-name collisions now resolve by stable server+tool origin key
  instead of manager array order, so reconnect re-appends cannot flip
  the routed implementation.
- Review follow-up for PR #6787.
2026-07-27 16:07:23 +02:00
can1357 1fe35f4526 fix(shell): included post-marker operands in kill -l listing
- kill -l -- 9 printed the whole signal table because the -l branch read
  only pre-marker args; listed_signals() now chains both collections
  without allocation and print_signals takes an IntoIterator.
- Review follow-up for PR #6780.
2026-07-27 16:03:47 +02:00
can1357 05eae39c84 fix(memories): preserved learned.md structure across saves
- Dropped the terminal split artifact so repeated saves no longer grow a
  blank line per write.
- Replaced the partition-and-concat merge with an ordered line list:
  headings, prose, and footers keep their positions; new lessons insert
  at the head of the first bullet run and the cap trims oldest bullets.
- Strengthened tests to byte-exact idempotence and mixed-Markdown order.
- Review follow-up for PR #6774.
2026-07-27 16:03:29 +02:00
can1357 39a7525dd0 fix(tui): excluded multiplexers from raw-backspace heuristic
- WT_SESSION leaks into tmux/screen/Zellij panes, so the automatic raw
  0x08 -> ctrl+backspace override deleted a word on plain Backspace.
- The heuristic now requires isWindowsTerminalSession() and not
  isInsideTerminalMultiplexer(); PI_TUI_RAW_BACKSPACE_IS_CTRL=1 stays an
  unconditional opt-in.
- Review follow-up for PR #6784.
2026-07-27 16:02:58 +02:00
can1357 15f90f86c2 fix(catalog): tightened siliconflow discovery after review
- Retargeted the dynamic-only regression test at source-owned
  CATALOG_PROVIDERS instead of the generated models.json type.
- Reused withCatalogDiscoveryTimeout for the models.dev lookup so the
  timer clears on success.
- Deferred bundled-model reference index construction into the dynamic
  fetch, keeping the ModelManager cache fast path free of a 12K-model
  walk.
- Review follow-up for PR #6765.
2026-07-27 16:02:58 +02:00
can1357 48247fa746 fix(extensions): kept live context accessors in scoped handler contexts
- Handler wrappers spread ctx, snapshotting the model accessor; a handler
  calling pi.setModel() then reading ctx.model saw the stale model.
- Scoped contexts now delegate via Object.create(ctx) with an own ui
  property, so all accessors stay live.
- Review follow-up for PR #6806.
2026-07-27 16:02:13 +02:00
can1357 7dcf95ad6f docs(natives): added changelog entry for napi build error surfacing
- Review follow-up for PR #6799.
2026-07-27 16:00:37 +02:00
can1357 53d66634a2 chore(changelog): merged duplicate unreleased headings after pr merges 2026-07-27 15:58:11 +02:00
can1357 fae0e5df31 Merge PR #6765: feat(catalog,ai): add SiliconFlow providers with dynamic-only model discovery (@iacore) 2026-07-27 15:57:47 +02:00
can1357 43347c4f57 Merge PR #6774: fix(memories): preserve non-list learned content (@isaac-sun) 2026-07-27 15:57:47 +02:00
can1357 0327c776e0 Merge PR #6794: feat(task): add per-spawn effort ceiling (@wolfiesch) 2026-07-27 15:57:47 +02:00
can1357 8acd667005 Merge PR #6780: fix(shell): correct kill signal handling (@roboomp) 2026-07-27 15:57:47 +02:00
can1357 7d864fd4e6 Merge PR #6799: fix(natives): surface exit code and stdout in napi build error (@roboomp) 2026-07-27 15:57:46 +02:00
can1357 3681faec41 Merge PR #6789: feat(coding-agent): show advisor cost separately in the status line (@paolomazzitti) 2026-07-27 15:57:46 +02:00
can1357 a89ab0841a Merge PR #6778: test(coding-agent): decouple changelog bundle probe from native addon resolution (@wolfiesch) 2026-07-27 15:57:46 +02:00
can1357 9e8947cc83 Merge PR #6773: fix(live): honor standard proxies for sideband websocket (@roboomp) 2026-07-27 15:57:46 +02:00
can1357 d220cfee9b Merge PR #6806: fix(extensions): cancel timed-out handler dialogs (@roboomp) 2026-07-27 15:57:46 +02:00
can1357 e4e8f8a40a Merge PR #6785: fix(coding-agent): preserve extension providers for plan subagents (@roboomp) 2026-07-27 15:57:45 +02:00
can1357 d3e55817fb Merge PR #6802: fix(lsp): honor custom server language ids (@roboomp) 2026-07-27 15:57:45 +02:00
can1357 da044f33ef Merge PR #6784: fix(tui): route editor word delete through keybindings registry (@roboomp) 2026-07-27 15:57:45 +02:00
can1357 0bfcdd434b Merge PR #6768: fix(tui): defer large command panels during streaming to stop scrollback dupes (@roboomp) 2026-07-27 15:57:45 +02:00
can1357 56c5fe5ad6 Merge PR #6788: fix(tui): don't crash on teardown when the pty is already gone (@dergachoff) 2026-07-27 15:57:45 +02:00
can1357 b0063dd180 Merge PR #6787: fix(mcp): deduplicate aliased server connections (@roboomp) 2026-07-27 15:57:44 +02:00
can1357 f9c4118b0b Merge PR #6790: fix(mcp): resolve native resource URIs (@FernandeZ-hjm) 2026-07-27 15:57:44 +02:00
roboomp 452932b291 fix(rpc): cancelled aborted extension dialogs
Moved RPC dialog request lifecycle into a reusable helper that emits a cancel frame targeting the original request before settling an aborted local promise.

Added coverage for remote confirmation cancellation and pending-request cleanup.
2026-07-27 13:53:30 +00:00
Paolo Mazzitti 9d240ea0ad feat(coding-agent): show advisor cost separately in the status line
Render the Advisor spend next to the primary-model cost as `$2.67 (sub) + $0.41 (adv)`, leaving the status line unchanged until an Advisor cost exists.

Record the cost from finalized advisor `message_end` events in a per-session ledger instead of deriving it from the live advisor transcript, so an in-session compaction or any other history rewrite no longer resets the reported spend. The ledger is cleared for a new session and once a different-session switch commits, and survives a switch that rolls back.
2026-07-27 13:52:22 +00:00
roboomp eb40353a95 fix(extensions): preserved prototype-backed UI methods
Replaced the scoped UI object spread with a delegating proxy that binds inherited methods to the original context while overriding only abort-capable dialogs.

Extended watchdog coverage with a prototype-backed notification method matching RPC UI contexts.
2026-07-27 13:44:33 +00:00
roboomp 4176a6c799 fix(extensions): registered abort before handler start
Attached the session-stop abort listener and rechecked cancellation before invoking extension work, preventing synchronous ctx.abort() calls from being missed.

Added deterministic coverage for a handler that aborts and then waits on non-UI work.
2026-07-27 13:37:05 +00:00
roboomp 5e6f12b278 fix(extensions): cancelled timed-out handler dialogs
Forwarded confirmation dialog options in the interactive TUI and scoped extension UI dialogs to each handler watchdog signal.

Added regressions for direct confirmation cancellation and fail-closed tool-call timeout cleanup.

Fixes #6805
2026-07-27 13:28:24 +00:00
can1357 c60b6971db feat(coding-agent): used static colon separator for working terminal title on windows
- Keep terminal working titles static with a colon separator on Windows instead of scheduling animated spinner updates.
- Update terminal title builder and state machine to check the platform and bypass timer intervals on win32.
2026-07-27 15:04:04 +02:00
can1357 5e139d9515 feat(coding-agent): reduced terminal title update overhead with deduplication and FFI
- Deduplicate terminal title writes globally across all platforms.
- Adopt `SetConsoleTitleW` via `bun:ffi` for Windows terminal updates instead of OSC writes.
2026-07-27 14:35:06 +02:00
can1357 a7abeff1b7 perf(ci): cut warm CI time via download-skipping, splat reuse, PR gating
Four levers on top of the green pipeline:
- kata jobs pass --remote_download_toplevel, so fully cache-hit builds
  stay metadata-only instead of pulling every intermediate artifact from
  bazel-remote (the bulk of the previous 6-minute TS-only main runs).
- the xwin MSVC splat caches its ~1GiB CDN payload on the runner-cache
  PVC (OMP_XWIN_CACHE_DIR), instead of re-downloading per ephemeral pod.
- main-push rust jobs export their bazel disk cache to the GitHub cache
  (once per lockfile change, shared linux scope). GitHub only shares
  default-branch caches across PRs, and main runs on kata where
  actions/cache never saved — so every fresh PR was building cold.
- TS-only pull requests skip Rust validation entirely (gh pr diff path
  gate); their test jobs restore addons from the main-exported cache.

Export runs disable top-level-only downloading: remote hits would
otherwise export action entries whose blobs were never materialized.
2026-07-27 14:31:24 +02:00
can1357 ae01a76136 fix(agent): hardened pre-model-call gate state cleanup and API surface
- Cleared the retained soft-requirement lifecycle alongside the deferred
  hard choice: clearDeferredToolDirectives() owns both, is called from
  clearAllQueues/reset and session-scoped tool-state cleanup, with a
  regression covering reminder re-injection after a queue clear.
- Allowed void-returning pre-model gates via the named AgentBeforeModelCall
  type and normalized gate results in the loop and Agent dispatcher.
- Documented that the first gate installed mid-run applies from the next
  run; corrected the onToolChoiceRejected contract docs; documented the
  cross-run lifetime of ToolChoiceQueue's in-flight claim.
- Removed the unused addBeforeModelContextBuild hook.
- Relocated both packages' changelog entries out of the released 17.1.4
  sections into Unreleased with PR attribution, folding the never-shipped
  Fixed bullet into Added and noting the input-event timing change.
2026-07-27 14:08:53 +02:00
can1357 6bbfc1110a Merge PR #6543: feat(agent): add a pre-model-call gate that can stop the turn (@paralin) 2026-07-27 14:01:11 +02:00