@oh-my-pi/pi-coding-agent 15.13.2 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/dist/cli.js +587 -499
  3. package/dist/types/advisor/__tests__/advisor.test.d.ts +1 -0
  4. package/dist/types/advisor/advise-tool.d.ts +58 -0
  5. package/dist/types/advisor/index.d.ts +3 -0
  6. package/dist/types/advisor/runtime.d.ts +52 -0
  7. package/dist/types/advisor/watchdog.d.ts +5 -0
  8. package/dist/types/config/model-roles.d.ts +1 -1
  9. package/dist/types/config/settings-schema.d.ts +75 -5
  10. package/dist/types/eval/js/context-manager.d.ts +15 -0
  11. package/dist/types/modes/components/advisor-message.d.ts +9 -0
  12. package/dist/types/modes/components/assistant-message.d.ts +1 -0
  13. package/dist/types/modes/controllers/command-controller.d.ts +3 -1
  14. package/dist/types/modes/interactive-mode.d.ts +4 -1
  15. package/dist/types/modes/types.d.ts +9 -1
  16. package/dist/types/sdk.d.ts +3 -3
  17. package/dist/types/session/agent-session.d.ts +71 -2
  18. package/dist/types/session/session-history-format.d.ts +4 -0
  19. package/dist/types/session/unexpected-stop-classifier.d.ts +13 -0
  20. package/dist/types/session/yield-queue.d.ts +2 -0
  21. package/dist/types/stt/asr-client.d.ts +1 -1
  22. package/dist/types/tiny/title-client.d.ts +1 -1
  23. package/dist/types/tools/job.d.ts +1 -0
  24. package/dist/types/tools/path-utils.d.ts +1 -0
  25. package/dist/types/tools/report-tool-issue.d.ts +0 -1
  26. package/dist/types/tts/tts-client.d.ts +1 -1
  27. package/dist/types/utils/thinking-display.d.ts +1 -17
  28. package/package.json +13 -13
  29. package/src/advisor/__tests__/advisor.test.ts +586 -0
  30. package/src/advisor/advise-tool.ts +87 -0
  31. package/src/advisor/index.ts +3 -0
  32. package/src/advisor/runtime.ts +248 -0
  33. package/src/advisor/watchdog.ts +83 -0
  34. package/src/cli.ts +25 -12
  35. package/src/config/model-registry.ts +6 -2
  36. package/src/config/model-roles.ts +13 -1
  37. package/src/config/settings-schema.ts +67 -5
  38. package/src/eval/__tests__/agent-bridge.test.ts +106 -46
  39. package/src/eval/__tests__/js-context-manager.test.ts +12 -2
  40. package/src/eval/js/context-manager.ts +40 -3
  41. package/src/eval/js/worker-entry.ts +7 -0
  42. package/src/export/html/template.js +18 -22
  43. package/src/internal-urls/docs-index.generated.ts +8 -5
  44. package/src/main.ts +19 -5
  45. package/src/modes/acp/acp-agent.ts +2 -2
  46. package/src/modes/acp/acp-event-mapper.ts +2 -2
  47. package/src/modes/components/advisor-message.ts +99 -0
  48. package/src/modes/components/agent-hub.ts +38 -7
  49. package/src/modes/components/assistant-message.ts +110 -15
  50. package/src/modes/components/snapcompact-shape-preview-doc.md +2 -2
  51. package/src/modes/components/snapcompact-shape-preview.ts +2 -2
  52. package/src/modes/components/status-line/segments.ts +20 -7
  53. package/src/modes/components/tree-selector.ts +3 -2
  54. package/src/modes/controllers/command-controller.ts +69 -2
  55. package/src/modes/controllers/event-controller.ts +3 -3
  56. package/src/modes/controllers/input-controller.ts +7 -1
  57. package/src/modes/controllers/streaming-reveal.ts +4 -4
  58. package/src/modes/interactive-mode.ts +14 -2
  59. package/src/modes/types.ts +9 -1
  60. package/src/modes/utils/ui-helpers.ts +12 -3
  61. package/src/prompts/advisor/advise-tool.md +1 -0
  62. package/src/prompts/advisor/system.md +31 -0
  63. package/src/prompts/agents/oracle.md +0 -1
  64. package/src/prompts/agents/reviewer.md +0 -1
  65. package/src/prompts/system/unexpected-stop-classifier.md +17 -0
  66. package/src/prompts/system/unexpected-stop-retry.md +4 -0
  67. package/src/sdk.ts +52 -13
  68. package/src/session/agent-session.ts +722 -21
  69. package/src/session/session-dump-format.ts +15 -142
  70. package/src/session/session-history-format.ts +30 -11
  71. package/src/session/unexpected-stop-classifier.ts +129 -0
  72. package/src/session/yield-queue.ts +5 -1
  73. package/src/slash-commands/builtin-registry.ts +102 -4
  74. package/src/stt/asr-client.ts +1 -1
  75. package/src/system-prompt.ts +1 -1
  76. package/src/tiny/title-client.ts +1 -1
  77. package/src/tools/browser/tab-supervisor.ts +1 -1
  78. package/src/tools/browser/tab-worker-entry.ts +12 -4
  79. package/src/tools/job.ts +1 -0
  80. package/src/tools/path-utils.ts +33 -2
  81. package/src/tools/report-tool-issue.ts +2 -7
  82. package/src/tts/tts-client.ts +1 -1
  83. package/src/utils/thinking-display.ts +8 -34
  84. package/src/web/scrapers/docs-rs.ts +2 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,68 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [16.0.0] - 2026-06-15
6
+
7
+ ### Breaking Changes
8
+
9
+ - Renamed the SDK tool format type and resolver from `ToolCallFormat`/`resolveToolCallSyntax` to `DialectFormat`/`resolveDialect`, and the agent option from `toolCallSyntax` to `dialect`.
10
+ - Changed `/dump` transcript output to render messages with the selected model's native dialect turn and thinking envelopes instead of markdown role headings.
11
+
12
+ ### Added
13
+
14
+ - Added `advisor.syncBacklog` setting (`off`, `1`, `3`, `5`) to pause turn completion until advisor review backlog drops below the threshold, with a maximum 30-second wait
15
+ - Added advisor backlog synchronization at turn end when enabled so the main session stays aligned with the advisor's pending review turns
16
+ - Added automatic discovery of WATCHDOG.md files from user and project locations so advisor guidance from local watchdog instructions is appended to its system prompt
17
+ - Added `/advisor on`, `/advisor off`, `/advisor status`, and `/advisor dump [raw]` slash-command subcommands to manage the advisor at runtime
18
+ - Added `advisor.enabled` and `advisor.subagents` settings to enable the advisor and extend it to spawned task/eval subagents
19
+ - Added advisor status badge (`++` in success color) to the status line when an advisor is active
20
+ - Added `/dump [raw]` flag to toggle between compact and legacy uncompact transcript output formats
21
+ - Added `/advisor on`, `/advisor off`, and `/advisor status` slash-command subcommands to enable or disable the advisor at runtime and view advisor status metrics
22
+ - Added a passive advisor: assign a second model to the `advisor` role and enable `advisor.enabled` to have it silently review each primary turn and inject severity-tagged advice notes via the `advise` tool. A `nit` rides the non-interrupting aside queue (batched into one card at the next step boundary), while a `concern` or `blocker` interrupts the running agent through the steering channel — aborting in-flight tools, or resuming the agent when it has already yielded — so high-severity advice is acted on immediately. Advice renders in the primary transcript as a distinct `Advisor` card, and the advisor gets hard-isolated read-only `read`/`search`/`find` access — bound to its own `ToolSession` so its reads never touch the primary's snapshot/seen-lines caches — to investigate the workspace before weighing in. The status line shows a `++` badge (in the success color, kept distinct from the model name) after the model name while an advisor is active, and `/advisor dump` copies the advisor's own transcript to the clipboard. Advisors are created only for the top-level session by default; enable `advisor.subagents` to extend them to spawned task/eval subagents.
23
+ - Animated "thinking" pulse (`·‥…‥`) shown in place of a hidden thinking block while the model is actively reasoning, so streaming progress is visible even with `hideThinkingBlock` enabled.
24
+
25
+ ### Changed
26
+
27
+ - Changed advisor prompting guidance to emit at most one `advise` per update and to prefer silence when the agent is on track
28
+ - Changed `/dump` default output to compact markdown format; use `/dump raw` for the legacy uncompact format
29
+ - Changed `/dump` and `/advisor dump` to default to compact transcript output and accept an optional `raw` flag for the legacy uncompact format
30
+ - Session dump output now renders message history using the model's native dialect turn envelope instead of markdown role headings
31
+ - Changed RPC, RPC-UI, and ACP hosts to default the advisor settings off instead of inheriting a user's interactive-session advisor preference.
32
+
33
+ ### Fixed
34
+
35
+ - Fixed advisor backlog tracking so failed advice prompts do not stall catch-up indefinitely by dropping pending backlog after repeated consecutive failures
36
+ - Fixed backlog accounting to decrement only after successful advisor prompts so sync waits correctly reflect advisor progress
37
+ - Fixed advisor context batching to still send pending review updates when context maintenance fails instead of dropping the batch
38
+ - Fixed explicit advisor enablement to clear protocol-default overrides so enabling the advisor applies immediately
39
+ - Fixed advisor message card notes getting truncated to two lines when the card is collapsed.
40
+ - Fixed advisor context handling to maintain its token budget by promoting or compacting/restarting advisor context while preserving advisor reasoning-off settings.
41
+ - Fixed `startup.quiet` leaving MCP and LSP startup status events visible during launch ([#2639](https://github.com/can1357/oh-my-pi/issues/2639)).
42
+ - Registered the `Advisor` group in the `model` settings tab so advisor settings render correctly in the settings panel.
43
+ - Fixed Windows bash path handling so MSYS/Git-Bash drive aliases like `/d/project` and WSL-style `/mnt/d/project` normalize to native drive paths consistently across the bash tool cwd validation and brush filesystem builtins ([#2634](https://github.com/can1357/oh-my-pi/issues/2634)).
44
+
45
+ ## [15.13.3] - 2026-06-15
46
+
47
+ ### Added
48
+
49
+ - Unexpected stop detection: optional tiny/smol classifier that continues the turn when the assistant says it will act but emits no tool calls.
50
+ - Settings `features.unexpectedStopDetection` and `providers.unexpectedStopModel`.
51
+
52
+ ### Changed
53
+
54
+ - Changed the `job` poll to return early when a steering message is queued, draining the steer immediately instead of waiting out the poll window.
55
+ - Capped unexpected-stop auto-continuation to three retry attempts before giving up on repeated stops
56
+ - Updated the `edit` tool's hashline prompt, grammar, and docs to recommend the `.=` inclusive range separator (`SWAP 1.=3:`); the legacy `..` form still parses.
57
+ - Normalized all internal worker argv selectors under the `__omp_worker_` prefix, skipping the async worker dispatch check during normal CLI startup.
58
+
59
+ ### Fixed
60
+
61
+ - Filtered out whitespace-only and dot-only (`.` or `…`) assistant blocks so they are treated as empty and no longer appear as visible content in message rendering, streaming reveal counts, or session export output
62
+ - Filtered placeholder-only thinking content from ACP notifications and message visibility checks so dot-only `reasoning_content` no longer triggers turn completion or read/run updates
63
+ - Fixed ModelRegistry tests making outbound network calls by automatically stubbing fetch during test execution.
64
+ - Fixed `eval` JS cells (and browser-tab worker startup) always stalling for the full init timeout — typically the cell's whole 30s budget — before silently falling back to the slower inline worker. The self-dispatching CLI host imports the worker module dynamically from its argv dispatch, so the worker's own `parentPort.on("message")` attached only after Bun flushed the messages the parent posted before spawn; the synchronously-posted `init` handshake was dropped and never answered with `ready`. The host now installs a buffering `parentPort` inbox synchronously in the entry's sync prefix (before importing the worker module) and the worker binds it on load, replaying the buffered handshake. `omp --smoke-test` now also spawns the JS eval worker through the host entry and asserts it handshakes on a real worker thread.
65
+ - Fixed pre-prompt context-full compaction on OpenAI Responses sessions to use provider-anchored context usage when available, so large encrypted reasoning signatures no longer trigger automatic maintenance while the visible context percentage remains below threshold ([#2628](https://github.com/can1357/oh-my-pi/issues/2628)).
66
+
5
67
  ## [15.13.2] - 2026-06-15
6
68
 
7
69
  ### Added