@oh-my-pi/pi-coding-agent 15.10.12 → 15.11.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 (125) hide show
  1. package/CHANGELOG.md +60 -3
  2. package/dist/cli.js +841 -803
  3. package/dist/types/async/index.d.ts +0 -1
  4. package/dist/types/cli/gallery-fixtures/types.d.ts +5 -0
  5. package/dist/types/config/keybindings.d.ts +6 -1
  6. package/dist/types/config/settings-schema.d.ts +56 -33
  7. package/dist/types/export/html/template.generated.d.ts +1 -1
  8. package/dist/types/extensibility/custom-tools/types.d.ts +2 -2
  9. package/dist/types/extensibility/shared-events.d.ts +2 -2
  10. package/dist/types/internal-urls/history-protocol.d.ts +14 -0
  11. package/dist/types/internal-urls/index.d.ts +1 -0
  12. package/dist/types/internal-urls/types.d.ts +1 -1
  13. package/dist/types/irc/bus.d.ts +66 -0
  14. package/dist/types/modes/components/agent-hub.d.ts +30 -0
  15. package/dist/types/modes/components/compaction-summary-message.d.ts +10 -4
  16. package/dist/types/modes/components/custom-editor.d.ts +2 -0
  17. package/dist/types/modes/components/tool-execution.d.ts +8 -0
  18. package/dist/types/modes/components/ttsr-notification.d.ts +5 -1
  19. package/dist/types/modes/components/welcome.d.ts +3 -9
  20. package/dist/types/modes/controllers/selector-controller.d.ts +1 -1
  21. package/dist/types/modes/interactive-mode.d.ts +3 -2
  22. package/dist/types/modes/theme/theme.d.ts +2 -1
  23. package/dist/types/modes/types.d.ts +3 -2
  24. package/dist/types/modes/utils/ui-helpers.d.ts +1 -1
  25. package/dist/types/registry/agent-lifecycle.d.ts +51 -0
  26. package/dist/types/registry/agent-registry.d.ts +16 -5
  27. package/dist/types/session/agent-session.d.ts +35 -30
  28. package/dist/types/session/messages.d.ts +2 -4
  29. package/dist/types/session/session-history-format.d.ts +12 -0
  30. package/dist/types/session/session-manager.d.ts +21 -3
  31. package/dist/types/session/streaming-output.d.ts +23 -0
  32. package/dist/types/task/executor.d.ts +11 -2
  33. package/dist/types/task/index.d.ts +11 -4
  34. package/dist/types/task/output-manager.d.ts +0 -7
  35. package/dist/types/task/repair-args.d.ts +8 -7
  36. package/dist/types/task/types.d.ts +55 -51
  37. package/dist/types/tools/browser/tab-worker.d.ts +3 -1
  38. package/dist/types/tools/find.d.ts +0 -11
  39. package/dist/types/tools/grouped-file-output.d.ts +0 -49
  40. package/dist/types/tools/index.d.ts +1 -3
  41. package/dist/types/tools/irc.d.ts +76 -38
  42. package/dist/types/tools/job.d.ts +7 -1
  43. package/examples/extensions/with-deps/package.json +1 -0
  44. package/package.json +11 -10
  45. package/scripts/bundle-dist.ts +28 -19
  46. package/src/async/index.ts +0 -1
  47. package/src/cli/gallery-cli.ts +1 -1
  48. package/src/cli/gallery-fixtures/agentic.ts +230 -115
  49. package/src/cli/gallery-fixtures/types.ts +5 -0
  50. package/src/cli.ts +20 -6
  51. package/src/commit/agentic/tools/analyze-file.ts +38 -19
  52. package/src/config/keybindings.ts +6 -1
  53. package/src/config/settings-schema.ts +56 -40
  54. package/src/config/settings.ts +7 -0
  55. package/src/eval/__tests__/agent-bridge.test.ts +5 -3
  56. package/src/eval/agent-bridge.ts +3 -16
  57. package/src/eval/js/shared/prelude.txt +1 -1
  58. package/src/eval/py/prelude.py +5 -6
  59. package/src/export/html/template.generated.ts +1 -1
  60. package/src/export/html/template.js +38 -13
  61. package/src/extensibility/custom-tools/types.ts +2 -2
  62. package/src/extensibility/shared-events.ts +2 -2
  63. package/src/internal-urls/docs-index.generated.ts +8 -8
  64. package/src/internal-urls/history-protocol.ts +113 -0
  65. package/src/internal-urls/index.ts +1 -0
  66. package/src/internal-urls/router.ts +3 -1
  67. package/src/internal-urls/types.ts +1 -1
  68. package/src/irc/bus.ts +292 -0
  69. package/src/main.ts +8 -60
  70. package/src/modes/components/{session-observer-overlay.ts → agent-hub.ts} +586 -367
  71. package/src/modes/components/compaction-summary-message.ts +68 -32
  72. package/src/modes/components/custom-editor.ts +10 -0
  73. package/src/modes/components/tool-execution.ts +31 -1
  74. package/src/modes/components/ttsr-notification.ts +72 -30
  75. package/src/modes/components/welcome.ts +9 -33
  76. package/src/modes/controllers/event-controller.ts +65 -0
  77. package/src/modes/controllers/extension-ui-controller.ts +8 -8
  78. package/src/modes/controllers/input-controller.ts +18 -2
  79. package/src/modes/controllers/selector-controller.ts +21 -17
  80. package/src/modes/interactive-mode.ts +8 -13
  81. package/src/modes/theme/theme.ts +18 -5
  82. package/src/modes/types.ts +3 -5
  83. package/src/modes/utils/hotkeys-markdown.ts +1 -0
  84. package/src/modes/utils/ui-helpers.ts +51 -49
  85. package/src/prompts/system/irc-incoming.md +3 -4
  86. package/src/prompts/system/orchestrate-notice.md +2 -2
  87. package/src/prompts/system/subagent-system-prompt.md +0 -5
  88. package/src/prompts/system/system-prompt.md +1 -0
  89. package/src/prompts/system/workflow-notice.md +2 -2
  90. package/src/prompts/tools/eval.md +3 -3
  91. package/src/prompts/tools/irc.md +29 -19
  92. package/src/prompts/tools/read.md +2 -2
  93. package/src/prompts/tools/task-summary.md +5 -16
  94. package/src/prompts/tools/task.md +38 -29
  95. package/src/registry/agent-lifecycle.ts +218 -0
  96. package/src/registry/agent-registry.ts +16 -5
  97. package/src/sdk.ts +29 -9
  98. package/src/session/agent-session.ts +243 -237
  99. package/src/session/messages.ts +11 -78
  100. package/src/session/session-history-format.ts +246 -0
  101. package/src/session/session-manager.ts +59 -5
  102. package/src/session/streaming-output.ts +60 -0
  103. package/src/task/executor.ts +855 -466
  104. package/src/task/index.ts +718 -794
  105. package/src/task/output-manager.ts +0 -11
  106. package/src/task/render.ts +133 -63
  107. package/src/task/repair-args.ts +21 -9
  108. package/src/task/types.ts +73 -66
  109. package/src/tools/ask.ts +4 -2
  110. package/src/tools/bash.ts +15 -5
  111. package/src/tools/browser/tab-worker.ts +26 -7
  112. package/src/tools/browser.ts +28 -1
  113. package/src/tools/find.ts +2 -27
  114. package/src/tools/grouped-file-output.ts +1 -118
  115. package/src/tools/index.ts +4 -12
  116. package/src/tools/irc.ts +596 -171
  117. package/src/tools/job.ts +41 -7
  118. package/src/tools/read.ts +57 -1
  119. package/src/tools/renderers.ts +2 -0
  120. package/src/tools/resolve.ts +4 -1
  121. package/dist/types/async/support.d.ts +0 -2
  122. package/dist/types/modes/components/session-observer-overlay.d.ts +0 -11
  123. package/dist/types/task/simple-mode.d.ts +0 -8
  124. package/src/async/support.ts +0 -5
  125. package/src/task/simple-mode.ts +0 -27
@@ -1,2 +1 @@
1
1
  export * from "./job-manager";
2
- export * from "./support";
@@ -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";
@@ -1326,12 +1326,12 @@ export declare const SETTINGS_SCHEMA: {
1326
1326
  };
1327
1327
  readonly "compaction.strategy": {
1328
1328
  readonly type: "enum";
1329
- readonly values: readonly ["context-full", "handoff", "shake", "off"];
1329
+ readonly values: readonly ["context-full", "handoff", "shake", "snapcompact", "off"];
1330
1330
  readonly default: "context-full";
1331
1331
  readonly ui: {
1332
1332
  readonly tab: "context";
1333
1333
  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)";
1334
+ 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
1335
  readonly options: readonly [{
1336
1336
  readonly value: "context-full";
1337
1337
  readonly label: "Context-full";
@@ -1344,6 +1344,10 @@ export declare const SETTINGS_SCHEMA: {
1344
1344
  readonly value: "shake";
1345
1345
  readonly label: "Shake";
1346
1346
  readonly description: "Drop heavy content (tool results + large blocks) in place; recover via artifact";
1347
+ }, {
1348
+ readonly value: "snapcompact";
1349
+ readonly label: "Snapcompact";
1350
+ readonly description: "Archive history onto dense bitmap images the model reads back; no LLM call";
1347
1351
  }, {
1348
1352
  readonly value: "off";
1349
1353
  readonly label: "Off";
@@ -1563,6 +1567,15 @@ export declare const SETTINGS_SCHEMA: {
1563
1567
  }];
1564
1568
  };
1565
1569
  };
1570
+ readonly "compaction.supersedeReads": {
1571
+ readonly type: "boolean";
1572
+ readonly default: true;
1573
+ readonly ui: {
1574
+ readonly tab: "context";
1575
+ readonly label: "Supersede Stale Reads";
1576
+ readonly description: "Prune older read results when the same file is read again (cache-aware, runs every turn)";
1577
+ };
1578
+ };
1566
1579
  readonly "branchSummary.enabled": {
1567
1580
  readonly type: "boolean";
1568
1581
  readonly default: false;
@@ -2622,22 +2635,13 @@ export declare const SETTINGS_SCHEMA: {
2622
2635
  readonly description: "Enable the ast_edit tool for structural AST rewrites";
2623
2636
  };
2624
2637
  };
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
2638
  readonly "irc.timeoutMs": {
2635
2639
  readonly type: "number";
2636
2640
  readonly default: 120000;
2637
2641
  readonly ui: {
2638
2642
  readonly tab: "tools";
2639
2643
  readonly label: "IRC Timeout";
2640
- readonly description: "Drop IRC messages whose recipient does not respond within this many milliseconds (0 disables the timeout)";
2644
+ readonly description: "Default timeout for irc wait (and send await:true) in milliseconds; 0 disables the timeout";
2641
2645
  readonly options: readonly [{
2642
2646
  readonly value: "0";
2643
2647
  readonly label: "Disabled";
@@ -2834,7 +2838,7 @@ export declare const SETTINGS_SCHEMA: {
2834
2838
  readonly ui: {
2835
2839
  readonly tab: "tools";
2836
2840
  readonly label: "Async Execution";
2837
- readonly description: "Enable async bash commands and background task execution";
2841
+ readonly description: "Enable async bash commands";
2838
2842
  };
2839
2843
  };
2840
2844
  readonly "async.maxJobs": {
@@ -3079,27 +3083,13 @@ export declare const SETTINGS_SCHEMA: {
3079
3083
  readonly description: "Encourage the agent to delegate work to subagents unless changes are trivial";
3080
3084
  };
3081
3085
  };
3082
- readonly "task.simple": {
3083
- readonly type: "enum";
3084
- readonly values: readonly ["default", "schema-free", "independent"];
3085
- readonly default: "schema-free";
3086
+ readonly "task.batch": {
3087
+ readonly type: "boolean";
3088
+ readonly default: true;
3086
3089
  readonly ui: {
3087
3090
  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
- }];
3091
+ readonly label: "Batch Task Calls";
3092
+ 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. Each spawn still runs as an independent background agent with the normal idle/parked lifecycle. Disable to restore the flat single-spawn schema.";
3103
3093
  };
3104
3094
  };
3105
3095
  readonly "task.maxConcurrency": {
@@ -3196,6 +3186,38 @@ export declare const SETTINGS_SCHEMA: {
3196
3186
  }];
3197
3187
  };
3198
3188
  };
3189
+ readonly "task.agentIdleTtlMs": {
3190
+ readonly type: "number";
3191
+ readonly default: 420000;
3192
+ readonly ui: {
3193
+ readonly tab: "tasks";
3194
+ readonly label: "Agent Idle TTL";
3195
+ 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.";
3196
+ };
3197
+ };
3198
+ readonly "task.softRequestBudget": {
3199
+ readonly type: "number";
3200
+ readonly default: 90;
3201
+ readonly ui: {
3202
+ readonly tab: "tasks";
3203
+ readonly label: "Soft Subagent Request Budget";
3204
+ 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.";
3205
+ readonly options: readonly [{
3206
+ readonly value: "0";
3207
+ readonly label: "Disabled";
3208
+ }, {
3209
+ readonly value: "40";
3210
+ readonly label: "40 requests";
3211
+ }, {
3212
+ readonly value: "90";
3213
+ readonly label: "90 requests";
3214
+ readonly description: "Default";
3215
+ }, {
3216
+ readonly value: "150";
3217
+ readonly label: "150 requests";
3218
+ }];
3219
+ };
3220
+ };
3199
3221
  readonly "task.disabledAgents": {
3200
3222
  readonly type: "array";
3201
3223
  readonly default: string[];
@@ -3956,7 +3978,7 @@ export type StatusLineSeparatorStyle = SettingValue<"statusLine.separator">;
3956
3978
  export type TreeFilterMode = SettingValue<"treeFilterMode">;
3957
3979
  export interface CompactionSettings {
3958
3980
  enabled: boolean;
3959
- strategy: "context-full" | "handoff" | "shake" | "off";
3981
+ strategy: "context-full" | "handoff" | "shake" | "snapcompact" | "off";
3960
3982
  thresholdPercent: number;
3961
3983
  thresholdTokens: number;
3962
3984
  reserveTokens: number;
@@ -3968,6 +3990,7 @@ export interface CompactionSettings {
3968
3990
  idleEnabled: boolean;
3969
3991
  idleThresholdTokens: number;
3970
3992
  idleTimeoutSeconds: number;
3993
+ supersedeReads: boolean;
3971
3994
  }
3972
3995
  export interface ContextPromotionSettings {
3973
3996
  enabled: boolean;