@oh-my-pi/pi-coding-agent 15.10.12 → 15.11.1

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 (158) hide show
  1. package/CHANGELOG.md +90 -4
  2. package/dist/cli.js +869 -825
  3. package/dist/types/async/index.d.ts +0 -1
  4. package/dist/types/capability/mcp.d.ts +1 -0
  5. package/dist/types/cli/gallery-fixtures/types.d.ts +5 -0
  6. package/dist/types/config/keybindings.d.ts +6 -1
  7. package/dist/types/config/settings-schema.d.ts +66 -34
  8. package/dist/types/export/html/template.generated.d.ts +1 -1
  9. package/dist/types/extensibility/custom-tools/types.d.ts +2 -2
  10. package/dist/types/extensibility/shared-events.d.ts +2 -2
  11. package/dist/types/internal-urls/history-protocol.d.ts +14 -0
  12. package/dist/types/internal-urls/index.d.ts +1 -0
  13. package/dist/types/internal-urls/types.d.ts +1 -1
  14. package/dist/types/irc/bus.d.ts +66 -0
  15. package/dist/types/mcp/oauth-discovery.d.ts +2 -0
  16. package/dist/types/mcp/oauth-flow.d.ts +6 -1
  17. package/dist/types/mcp/transports/stdio.d.ts +1 -0
  18. package/dist/types/mcp/types.d.ts +2 -0
  19. package/dist/types/modes/components/agent-hub.d.ts +30 -0
  20. package/dist/types/modes/components/assistant-message.d.ts +1 -0
  21. package/dist/types/modes/components/compaction-summary-message.d.ts +10 -4
  22. package/dist/types/modes/components/custom-editor.d.ts +2 -0
  23. package/dist/types/modes/components/mcp-add-wizard.d.ts +2 -1
  24. package/dist/types/modes/components/settings-selector.d.ts +1 -0
  25. package/dist/types/modes/components/status-line/types.d.ts +3 -0
  26. package/dist/types/modes/components/tool-execution.d.ts +8 -0
  27. package/dist/types/modes/components/transcript-container.d.ts +3 -2
  28. package/dist/types/modes/components/ttsr-notification.d.ts +5 -1
  29. package/dist/types/modes/components/welcome.d.ts +3 -9
  30. package/dist/types/modes/controllers/selector-controller.d.ts +1 -1
  31. package/dist/types/modes/controllers/tool-args-reveal.d.ts +43 -0
  32. package/dist/types/modes/interactive-mode.d.ts +3 -2
  33. package/dist/types/modes/theme/theme.d.ts +3 -1
  34. package/dist/types/modes/types.d.ts +3 -2
  35. package/dist/types/modes/utils/ui-helpers.d.ts +1 -1
  36. package/dist/types/registry/agent-lifecycle.d.ts +51 -0
  37. package/dist/types/registry/agent-registry.d.ts +16 -5
  38. package/dist/types/session/agent-session.d.ts +35 -30
  39. package/dist/types/session/messages.d.ts +2 -4
  40. package/dist/types/session/session-history-format.d.ts +12 -0
  41. package/dist/types/session/session-manager.d.ts +21 -3
  42. package/dist/types/session/streaming-output.d.ts +23 -0
  43. package/dist/types/task/executor.d.ts +11 -2
  44. package/dist/types/task/index.d.ts +11 -4
  45. package/dist/types/task/output-manager.d.ts +0 -7
  46. package/dist/types/task/repair-args.d.ts +8 -7
  47. package/dist/types/task/types.d.ts +55 -51
  48. package/dist/types/tools/browser/tab-worker.d.ts +3 -1
  49. package/dist/types/tools/find.d.ts +0 -11
  50. package/dist/types/tools/grouped-file-output.d.ts +0 -49
  51. package/dist/types/tools/index.d.ts +1 -3
  52. package/dist/types/tools/irc.d.ts +76 -38
  53. package/dist/types/tools/job.d.ts +7 -1
  54. package/dist/types/tools/render-utils.d.ts +22 -0
  55. package/examples/extensions/with-deps/package.json +1 -0
  56. package/package.json +11 -10
  57. package/scripts/bundle-dist.ts +28 -19
  58. package/src/async/index.ts +0 -1
  59. package/src/capability/mcp.ts +1 -0
  60. package/src/cli/gallery-cli.ts +6 -5
  61. package/src/cli/gallery-fixtures/agentic.ts +230 -115
  62. package/src/cli/gallery-fixtures/types.ts +5 -0
  63. package/src/cli.ts +20 -6
  64. package/src/commit/agentic/tools/analyze-file.ts +38 -19
  65. package/src/config/keybindings.ts +6 -1
  66. package/src/config/mcp-schema.json +4 -0
  67. package/src/config/settings-schema.ts +68 -41
  68. package/src/config/settings.ts +7 -0
  69. package/src/edit/renderer.ts +96 -46
  70. package/src/eval/__tests__/agent-bridge.test.ts +5 -3
  71. package/src/eval/agent-bridge.ts +3 -16
  72. package/src/eval/js/shared/prelude.txt +1 -1
  73. package/src/eval/py/prelude.py +5 -6
  74. package/src/export/html/template.generated.ts +1 -1
  75. package/src/export/html/template.js +44 -14
  76. package/src/extensibility/custom-tools/types.ts +2 -2
  77. package/src/extensibility/shared-events.ts +2 -2
  78. package/src/internal-urls/docs-index.generated.ts +9 -9
  79. package/src/internal-urls/history-protocol.ts +113 -0
  80. package/src/internal-urls/index.ts +1 -0
  81. package/src/internal-urls/router.ts +3 -1
  82. package/src/internal-urls/types.ts +1 -1
  83. package/src/irc/bus.ts +292 -0
  84. package/src/main.ts +8 -60
  85. package/src/mcp/manager.ts +3 -0
  86. package/src/mcp/oauth-discovery.ts +27 -2
  87. package/src/mcp/oauth-flow.ts +47 -1
  88. package/src/mcp/transports/stdio.ts +3 -0
  89. package/src/mcp/types.ts +2 -0
  90. package/src/modes/components/{session-observer-overlay.ts → agent-hub.ts} +586 -367
  91. package/src/modes/components/assistant-message.ts +15 -0
  92. package/src/modes/components/btw-panel.ts +5 -1
  93. package/src/modes/components/compaction-summary-message.ts +68 -32
  94. package/src/modes/components/custom-editor.ts +10 -0
  95. package/src/modes/components/mcp-add-wizard.ts +13 -0
  96. package/src/modes/components/settings-selector.ts +2 -0
  97. package/src/modes/components/status-line/component.ts +22 -12
  98. package/src/modes/components/status-line/types.ts +3 -0
  99. package/src/modes/components/tool-execution.ts +31 -1
  100. package/src/modes/components/transcript-container.ts +99 -18
  101. package/src/modes/components/tree-selector.ts +6 -1
  102. package/src/modes/components/ttsr-notification.ts +72 -30
  103. package/src/modes/components/welcome.ts +9 -33
  104. package/src/modes/controllers/event-controller.ts +93 -4
  105. package/src/modes/controllers/extension-ui-controller.ts +8 -8
  106. package/src/modes/controllers/input-controller.ts +18 -2
  107. package/src/modes/controllers/mcp-command-controller.ts +34 -2
  108. package/src/modes/controllers/selector-controller.ts +25 -17
  109. package/src/modes/controllers/tool-args-reveal.ts +174 -0
  110. package/src/modes/interactive-mode.ts +17 -15
  111. package/src/modes/theme/theme.ts +24 -5
  112. package/src/modes/types.ts +3 -5
  113. package/src/modes/utils/hotkeys-markdown.ts +1 -0
  114. package/src/modes/utils/ui-helpers.ts +51 -49
  115. package/src/prompts/system/irc-incoming.md +3 -4
  116. package/src/prompts/system/orchestrate-notice.md +2 -2
  117. package/src/prompts/system/subagent-system-prompt.md +0 -5
  118. package/src/prompts/system/system-prompt.md +1 -0
  119. package/src/prompts/system/workflow-notice.md +2 -2
  120. package/src/prompts/tools/eval.md +3 -3
  121. package/src/prompts/tools/irc.md +29 -19
  122. package/src/prompts/tools/read.md +2 -2
  123. package/src/prompts/tools/task-summary.md +5 -16
  124. package/src/prompts/tools/task.md +43 -29
  125. package/src/registry/agent-lifecycle.ts +218 -0
  126. package/src/registry/agent-registry.ts +16 -5
  127. package/src/sdk.ts +29 -9
  128. package/src/session/agent-session.ts +268 -241
  129. package/src/session/messages.ts +11 -78
  130. package/src/session/session-history-format.ts +246 -0
  131. package/src/session/session-manager.ts +59 -5
  132. package/src/session/streaming-output.ts +60 -0
  133. package/src/task/executor.ts +855 -466
  134. package/src/task/index.ts +723 -794
  135. package/src/task/output-manager.ts +0 -11
  136. package/src/task/render.ts +142 -66
  137. package/src/task/repair-args.ts +21 -9
  138. package/src/task/types.ts +73 -66
  139. package/src/tools/ask.ts +4 -2
  140. package/src/tools/bash.ts +15 -5
  141. package/src/tools/browser/tab-worker.ts +26 -7
  142. package/src/tools/browser.ts +28 -1
  143. package/src/tools/find.ts +2 -27
  144. package/src/tools/grouped-file-output.ts +1 -118
  145. package/src/tools/index.ts +4 -12
  146. package/src/tools/irc.ts +596 -171
  147. package/src/tools/job.ts +41 -7
  148. package/src/tools/read.ts +57 -1
  149. package/src/tools/render-utils.ts +56 -0
  150. package/src/tools/renderers.ts +2 -0
  151. package/src/tools/resolve.ts +4 -1
  152. package/src/tools/write.ts +65 -47
  153. package/src/web/search/providers/anthropic.ts +29 -4
  154. package/dist/types/async/support.d.ts +0 -2
  155. package/dist/types/modes/components/session-observer-overlay.d.ts +0 -11
  156. package/dist/types/task/simple-mode.d.ts +0 -8
  157. package/src/async/support.ts +0 -5
  158. package/src/task/simple-mode.ts +0 -27
@@ -1,2 +1 @@
1
1
  export * from "./job-manager";
2
- export * from "./support";
@@ -28,6 +28,7 @@ export interface MCPServer {
28
28
  tokenUrl?: string;
29
29
  clientId?: string;
30
30
  clientSecret?: string;
31
+ resource?: string;
31
32
  };
32
33
  /** OAuth configuration (clientId, clientSecret, redirectUri, callbackPort, callbackPath) for servers requiring explicit client credentials */
33
34
  oauth?: {
@@ -34,6 +34,11 @@ export interface GalleryFixture {
34
34
  * real one keeps the gallery honest for these tools.
35
35
  */
36
36
  customRendered?: boolean;
37
+ /**
38
+ * Renderer-registry key to use when the fixture key is a variant of a tool
39
+ * (e.g. `irc_wait` → `irc`). Defaults to the fixture key.
40
+ */
41
+ renderer?: string;
37
42
  /**
38
43
  * Arguments shown during the streaming state — a partial view of {@link args}
39
44
  * as if the tool-call JSON were still arriving. May include `__partialJson`
@@ -23,6 +23,7 @@ interface AppKeybindings {
23
23
  "app.clipboard.pasteTextRaw": true;
24
24
  "app.clipboard.copyLine": true;
25
25
  "app.clipboard.copyPrompt": true;
26
+ "app.agents.hub": true;
26
27
  "app.session.new": true;
27
28
  "app.session.tree": true;
28
29
  "app.session.fork": true;
@@ -268,9 +269,13 @@ export declare const KEYBINDINGS: {
268
269
  readonly defaultKeys: [];
269
270
  readonly description: "Resume session";
270
271
  };
272
+ readonly "app.agents.hub": {
273
+ readonly defaultKeys: "alt+a";
274
+ readonly description: "Open the agent hub";
275
+ };
271
276
  readonly "app.session.observe": {
272
277
  readonly defaultKeys: "ctrl+s";
273
- readonly description: "Observe subagent sessions";
278
+ readonly description: "Open the agent hub";
274
279
  };
275
280
  readonly "app.session.togglePath": {
276
281
  readonly defaultKeys: "ctrl+p";
@@ -356,6 +356,15 @@ export declare const SETTINGS_SCHEMA: {
356
356
  readonly description: "Use the session name color for the editor border and status line gap";
357
357
  };
358
358
  };
359
+ readonly "statusLine.transparent": {
360
+ readonly type: "boolean";
361
+ readonly default: false;
362
+ readonly ui: {
363
+ readonly tab: "appearance";
364
+ readonly label: "Transparent Status Line";
365
+ readonly description: "Use the terminal's default background for the status line instead of the theme's `statusLineBg`. Powerline end caps are dropped because they need a contrasting fill to bridge into the surrounding terminal.";
366
+ };
367
+ };
359
368
  readonly "tools.artifactSpillThreshold": {
360
369
  readonly type: "number";
361
370
  readonly default: 50;
@@ -691,7 +700,7 @@ export declare const SETTINGS_SCHEMA: {
691
700
  readonly ui: {
692
701
  readonly tab: "appearance";
693
702
  readonly label: "Smooth Streaming";
694
- readonly description: "Reveal assistant text smoothly while streamed chunks arrive";
703
+ readonly description: "Reveal assistant text and streamed tool input smoothly while chunks arrive";
695
704
  };
696
705
  };
697
706
  readonly "display.showTokenUsage": {
@@ -1326,12 +1335,12 @@ export declare const SETTINGS_SCHEMA: {
1326
1335
  };
1327
1336
  readonly "compaction.strategy": {
1328
1337
  readonly type: "enum";
1329
- readonly values: readonly ["context-full", "handoff", "shake", "off"];
1338
+ readonly values: readonly ["context-full", "handoff", "shake", "snapcompact", "off"];
1330
1339
  readonly default: "context-full";
1331
1340
  readonly ui: {
1332
1341
  readonly tab: "context";
1333
1342
  readonly label: "Compaction Strategy";
1334
- readonly description: "Choose in-place context-full maintenance, auto-handoff, surgical shake (drop heavy content), or disable auto maintenance (off)";
1343
+ readonly description: "Choose in-place context-full maintenance, auto-handoff, surgical shake (drop heavy content), snapcompact (archive history as dense images), or disable auto maintenance (off)";
1335
1344
  readonly options: readonly [{
1336
1345
  readonly value: "context-full";
1337
1346
  readonly label: "Context-full";
@@ -1344,6 +1353,10 @@ export declare const SETTINGS_SCHEMA: {
1344
1353
  readonly value: "shake";
1345
1354
  readonly label: "Shake";
1346
1355
  readonly description: "Drop heavy content (tool results + large blocks) in place; recover via artifact";
1356
+ }, {
1357
+ readonly value: "snapcompact";
1358
+ readonly label: "Snapcompact";
1359
+ readonly description: "Archive history onto dense bitmap images the model reads back; no LLM call";
1347
1360
  }, {
1348
1361
  readonly value: "off";
1349
1362
  readonly label: "Off";
@@ -1563,6 +1576,15 @@ export declare const SETTINGS_SCHEMA: {
1563
1576
  }];
1564
1577
  };
1565
1578
  };
1579
+ readonly "compaction.supersedeReads": {
1580
+ readonly type: "boolean";
1581
+ readonly default: true;
1582
+ readonly ui: {
1583
+ readonly tab: "context";
1584
+ readonly label: "Supersede Stale Reads";
1585
+ readonly description: "Prune older read results when the same file is read again (cache-aware, runs every turn)";
1586
+ };
1587
+ };
1566
1588
  readonly "branchSummary.enabled": {
1567
1589
  readonly type: "boolean";
1568
1590
  readonly default: false;
@@ -2622,22 +2644,13 @@ export declare const SETTINGS_SCHEMA: {
2622
2644
  readonly description: "Enable the ast_edit tool for structural AST rewrites";
2623
2645
  };
2624
2646
  };
2625
- readonly "irc.enabled": {
2626
- readonly type: "boolean";
2627
- readonly default: true;
2628
- readonly ui: {
2629
- readonly tab: "tools";
2630
- readonly label: "IRC";
2631
- readonly description: "Enable agent-to-agent IRC messaging via the irc tool";
2632
- };
2633
- };
2634
2647
  readonly "irc.timeoutMs": {
2635
2648
  readonly type: "number";
2636
2649
  readonly default: 120000;
2637
2650
  readonly ui: {
2638
2651
  readonly tab: "tools";
2639
2652
  readonly label: "IRC Timeout";
2640
- readonly description: "Drop IRC messages whose recipient does not respond within this many milliseconds (0 disables the timeout)";
2653
+ readonly description: "Default timeout for irc wait (and send await:true) in milliseconds; 0 disables the timeout";
2641
2654
  readonly options: readonly [{
2642
2655
  readonly value: "0";
2643
2656
  readonly label: "Disabled";
@@ -2830,7 +2843,7 @@ export declare const SETTINGS_SCHEMA: {
2830
2843
  };
2831
2844
  readonly "async.enabled": {
2832
2845
  readonly type: "boolean";
2833
- readonly default: false;
2846
+ readonly default: true;
2834
2847
  readonly ui: {
2835
2848
  readonly tab: "tools";
2836
2849
  readonly label: "Async Execution";
@@ -3079,27 +3092,13 @@ export declare const SETTINGS_SCHEMA: {
3079
3092
  readonly description: "Encourage the agent to delegate work to subagents unless changes are trivial";
3080
3093
  };
3081
3094
  };
3082
- readonly "task.simple": {
3083
- readonly type: "enum";
3084
- readonly values: readonly ["default", "schema-free", "independent"];
3085
- readonly default: "schema-free";
3095
+ readonly "task.batch": {
3096
+ readonly type: "boolean";
3097
+ readonly default: true;
3086
3098
  readonly ui: {
3087
3099
  readonly tab: "tasks";
3088
- readonly label: "Task Input Mode";
3089
- readonly description: "How much shared structure the task tool accepts (default, schema-free, or independent)";
3090
- readonly options: readonly [{
3091
- readonly value: "default";
3092
- readonly label: "Default";
3093
- readonly description: "Shared context and custom task schema are available";
3094
- }, {
3095
- readonly value: "schema-free";
3096
- readonly label: "Schema-free";
3097
- readonly description: "Shared context stays available, but custom task schema is disabled";
3098
- }, {
3099
- readonly value: "independent";
3100
- readonly label: "Independent";
3101
- readonly description: "No shared context or custom task schema; each task must stand alone";
3102
- }];
3100
+ readonly label: "Batch Task Calls";
3101
+ readonly description: "Switch the task tool to its batch shape: one call carries { agent, context, tasks[] } — one subagent per item (with per-item isolation) and a required shared context prepended to every assignment. With async.enabled=true, each spawn runs as an independent background agent with the normal idle/parked lifecycle; otherwise the call blocks for merged results. Disable to restore the flat single-spawn schema.";
3103
3102
  };
3104
3103
  };
3105
3104
  readonly "task.maxConcurrency": {
@@ -3196,6 +3195,38 @@ export declare const SETTINGS_SCHEMA: {
3196
3195
  }];
3197
3196
  };
3198
3197
  };
3198
+ readonly "task.agentIdleTtlMs": {
3199
+ readonly type: "number";
3200
+ readonly default: 420000;
3201
+ readonly ui: {
3202
+ readonly tab: "tasks";
3203
+ readonly label: "Agent Idle TTL";
3204
+ readonly description: "How long an idle subagent stays live in memory before being parked to disk (ms). Parked agents are revived automatically when messaged or resumed. 0 keeps idle agents live until exit.";
3205
+ };
3206
+ };
3207
+ readonly "task.softRequestBudget": {
3208
+ readonly type: "number";
3209
+ readonly default: 90;
3210
+ readonly ui: {
3211
+ readonly tab: "tasks";
3212
+ readonly label: "Soft Subagent Request Budget";
3213
+ readonly description: "Soft per-subagent request budget (assistant requests per run). Crossing it injects one steering notice asking the subagent to wrap up; at 1.5x the budget the run is aborted gracefully, salvaging partial output. 0 disables the guard. Bundled explore/quick_task agents use a lower built-in budget.";
3214
+ readonly options: readonly [{
3215
+ readonly value: "0";
3216
+ readonly label: "Disabled";
3217
+ }, {
3218
+ readonly value: "40";
3219
+ readonly label: "40 requests";
3220
+ }, {
3221
+ readonly value: "90";
3222
+ readonly label: "90 requests";
3223
+ readonly description: "Default";
3224
+ }, {
3225
+ readonly value: "150";
3226
+ readonly label: "150 requests";
3227
+ }];
3228
+ };
3229
+ };
3199
3230
  readonly "task.disabledAgents": {
3200
3231
  readonly type: "array";
3201
3232
  readonly default: string[];
@@ -3956,7 +3987,7 @@ export type StatusLineSeparatorStyle = SettingValue<"statusLine.separator">;
3956
3987
  export type TreeFilterMode = SettingValue<"treeFilterMode">;
3957
3988
  export interface CompactionSettings {
3958
3989
  enabled: boolean;
3959
- strategy: "context-full" | "handoff" | "shake" | "off";
3990
+ strategy: "context-full" | "handoff" | "shake" | "snapcompact" | "off";
3960
3991
  thresholdPercent: number;
3961
3992
  thresholdTokens: number;
3962
3993
  reserveTokens: number;
@@ -3968,6 +3999,7 @@ export interface CompactionSettings {
3968
3999
  idleEnabled: boolean;
3969
4000
  idleThresholdTokens: number;
3970
4001
  idleTimeoutSeconds: number;
4002
+ supersedeReads: boolean;
3971
4003
  }
3972
4004
  export interface ContextPromotionSettings {
3973
4005
  enabled: boolean;