@esso0428/pi-subagents 0.17.16 → 0.17.18

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 (359) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/ROADMAP.md +87 -0
  3. package/docs/post-0.17.6-agents-roster-viewer-spec.md +42 -0
  4. package/docs/post-0.17.6-durable-history-spec.md +41 -0
  5. package/docs/post-0.17.6-feature-specs.md +50 -0
  6. package/docs/post-0.17.6-nested-agents-spec.md +38 -0
  7. package/docs/post-0.17.6-recovery-shutdown-spec.md +46 -0
  8. package/docs/post-0.17.6-ui-latency-baseline-spec.md +46 -0
  9. package/docs/post-0.17.6-workflow-rpc-lifecycle-spec.md +54 -0
  10. package/package.json +1 -1
  11. package/src/agent-history.ts +2 -54
  12. package/src/agent-manager.ts +406 -1288
  13. package/src/agent-runner.ts +27 -251
  14. package/src/agent-types.ts +32 -188
  15. package/src/cross-extension-rpc.ts +20 -96
  16. package/src/custom-agents.ts +13 -170
  17. package/src/index.ts +480 -1920
  18. package/src/invocation-config.ts +3 -118
  19. package/src/model-resolver.ts +0 -18
  20. package/src/output-file.ts +6 -61
  21. package/src/prompts.ts +2 -45
  22. package/src/schedule.ts +14 -35
  23. package/src/settings.ts +2 -301
  24. package/src/status-note.ts +1 -66
  25. package/src/types.ts +10 -177
  26. package/src/ui/agent-widget.ts +57 -278
  27. package/src/ui/conversation-blocks.ts +0 -6
  28. package/src/ui/conversation-timeline.ts +25 -139
  29. package/src/ui/conversation-viewer.ts +48 -212
  30. package/src/ui/schedule-menu.ts +8 -9
  31. package/src/usage.ts +2 -109
  32. package/src/worktree.ts +55 -69
  33. package/dist/abortable.d.ts +0 -13
  34. package/dist/abortable.d.ts.map +0 -1
  35. package/dist/abortable.js +0 -43
  36. package/dist/abortable.js.map +0 -1
  37. package/dist/agent-color.d.ts +0 -36
  38. package/dist/agent-color.d.ts.map +0 -1
  39. package/dist/agent-color.js +0 -124
  40. package/dist/agent-color.js.map +0 -1
  41. package/dist/agent-file-toggle.d.ts +0 -126
  42. package/dist/agent-file-toggle.d.ts.map +0 -1
  43. package/dist/agent-file-toggle.js +0 -259
  44. package/dist/agent-file-toggle.js.map +0 -1
  45. package/dist/agent-history-list.d.ts +0 -19
  46. package/dist/agent-history-list.d.ts.map +0 -1
  47. package/dist/agent-history-list.js +0 -69
  48. package/dist/agent-history-list.js.map +0 -1
  49. package/dist/agent-history.d.ts +0 -35
  50. package/dist/agent-history.d.ts.map +0 -1
  51. package/dist/agent-history.js +0 -188
  52. package/dist/agent-history.js.map +0 -1
  53. package/dist/agent-manager.d.ts +0 -503
  54. package/dist/agent-manager.d.ts.map +0 -1
  55. package/dist/agent-manager.js +0 -1572
  56. package/dist/agent-manager.js.map +0 -1
  57. package/dist/agent-recovery.d.ts +0 -37
  58. package/dist/agent-recovery.d.ts.map +0 -1
  59. package/dist/agent-recovery.js +0 -171
  60. package/dist/agent-recovery.js.map +0 -1
  61. package/dist/agent-runner.d.ts +0 -303
  62. package/dist/agent-runner.d.ts.map +0 -1
  63. package/dist/agent-runner.js +0 -1003
  64. package/dist/agent-runner.js.map +0 -1
  65. package/dist/agent-types.d.ts +0 -120
  66. package/dist/agent-types.d.ts.map +0 -1
  67. package/dist/agent-types.js +0 -301
  68. package/dist/agent-types.js.map +0 -1
  69. package/dist/child-context.d.ts +0 -3
  70. package/dist/child-context.d.ts.map +0 -1
  71. package/dist/child-context.js +0 -13
  72. package/dist/child-context.js.map +0 -1
  73. package/dist/context.d.ts +0 -13
  74. package/dist/context.d.ts.map +0 -1
  75. package/dist/context.js +0 -57
  76. package/dist/context.js.map +0 -1
  77. package/dist/cross-extension-rpc.d.ts +0 -67
  78. package/dist/cross-extension-rpc.d.ts.map +0 -1
  79. package/dist/cross-extension-rpc.js +0 -139
  80. package/dist/cross-extension-rpc.js.map +0 -1
  81. package/dist/custom-agents.d.ts +0 -55
  82. package/dist/custom-agents.d.ts.map +0 -1
  83. package/dist/custom-agents.js +0 -309
  84. package/dist/custom-agents.js.map +0 -1
  85. package/dist/default-agents.d.ts +0 -8
  86. package/dist/default-agents.d.ts.map +0 -1
  87. package/dist/default-agents.js +0 -123
  88. package/dist/default-agents.js.map +0 -1
  89. package/dist/enabled-models.d.ts +0 -50
  90. package/dist/enabled-models.d.ts.map +0 -1
  91. package/dist/enabled-models.js +0 -146
  92. package/dist/enabled-models.js.map +0 -1
  93. package/dist/env.d.ts +0 -7
  94. package/dist/env.d.ts.map +0 -1
  95. package/dist/env.js +0 -29
  96. package/dist/env.js.map +0 -1
  97. package/dist/group-join.d.ts +0 -33
  98. package/dist/group-join.d.ts.map +0 -1
  99. package/dist/group-join.js +0 -117
  100. package/dist/group-join.js.map +0 -1
  101. package/dist/index.d.ts +0 -51
  102. package/dist/index.d.ts.map +0 -1
  103. package/dist/index.js +0 -3687
  104. package/dist/index.js.map +0 -1
  105. package/dist/invocation-config.d.ts +0 -108
  106. package/dist/invocation-config.d.ts.map +0 -1
  107. package/dist/invocation-config.js +0 -84
  108. package/dist/invocation-config.js.map +0 -1
  109. package/dist/memory.d.ts +0 -54
  110. package/dist/memory.d.ts.map +0 -1
  111. package/dist/memory.js +0 -166
  112. package/dist/memory.js.map +0 -1
  113. package/dist/mention-clone.d.ts +0 -88
  114. package/dist/mention-clone.d.ts.map +0 -1
  115. package/dist/mention-clone.js +0 -154
  116. package/dist/mention-clone.js.map +0 -1
  117. package/dist/mention.d.ts +0 -82
  118. package/dist/mention.d.ts.map +0 -1
  119. package/dist/mention.js +0 -132
  120. package/dist/mention.js.map +0 -1
  121. package/dist/model-resolver.d.ts +0 -37
  122. package/dist/model-resolver.d.ts.map +0 -1
  123. package/dist/model-resolver.js +0 -96
  124. package/dist/model-resolver.js.map +0 -1
  125. package/dist/model-scope.d.ts +0 -50
  126. package/dist/model-scope.d.ts.map +0 -1
  127. package/dist/model-scope.js +0 -49
  128. package/dist/model-scope.js.map +0 -1
  129. package/dist/nested-tools.d.ts +0 -57
  130. package/dist/nested-tools.d.ts.map +0 -1
  131. package/dist/nested-tools.js +0 -301
  132. package/dist/nested-tools.js.map +0 -1
  133. package/dist/nico-overrides.d.ts +0 -54
  134. package/dist/nico-overrides.d.ts.map +0 -1
  135. package/dist/nico-overrides.js +0 -170
  136. package/dist/nico-overrides.js.map +0 -1
  137. package/dist/output-file.d.ts +0 -44
  138. package/dist/output-file.d.ts.map +0 -1
  139. package/dist/output-file.js +0 -156
  140. package/dist/output-file.js.map +0 -1
  141. package/dist/prompts.d.ts +0 -56
  142. package/dist/prompts.d.ts.map +0 -1
  143. package/dist/prompts.js +0 -92
  144. package/dist/prompts.js.map +0 -1
  145. package/dist/schedule-store.d.ts +0 -39
  146. package/dist/schedule-store.d.ts.map +0 -1
  147. package/dist/schedule-store.js +0 -156
  148. package/dist/schedule-store.js.map +0 -1
  149. package/dist/schedule.d.ts +0 -110
  150. package/dist/schedule.d.ts.map +0 -1
  151. package/dist/schedule.js +0 -360
  152. package/dist/schedule.js.map +0 -1
  153. package/dist/settings.d.ts +0 -354
  154. package/dist/settings.d.ts.map +0 -1
  155. package/dist/settings.js +0 -247
  156. package/dist/settings.js.map +0 -1
  157. package/dist/skill-loader.d.ts +0 -25
  158. package/dist/skill-loader.d.ts.map +0 -1
  159. package/dist/skill-loader.js +0 -94
  160. package/dist/skill-loader.js.map +0 -1
  161. package/dist/status-note.d.ts +0 -62
  162. package/dist/status-note.d.ts.map +0 -1
  163. package/dist/status-note.js +0 -86
  164. package/dist/status-note.js.map +0 -1
  165. package/dist/structured-output.d.ts +0 -62
  166. package/dist/structured-output.d.ts.map +0 -1
  167. package/dist/structured-output.js +0 -113
  168. package/dist/structured-output.js.map +0 -1
  169. package/dist/types.d.ts +0 -372
  170. package/dist/types.d.ts.map +0 -1
  171. package/dist/types.js +0 -6
  172. package/dist/types.js.map +0 -1
  173. package/dist/ui/agent-mention.d.ts +0 -83
  174. package/dist/ui/agent-mention.d.ts.map +0 -1
  175. package/dist/ui/agent-mention.js +0 -188
  176. package/dist/ui/agent-mention.js.map +0 -1
  177. package/dist/ui/agent-widget.d.ts +0 -241
  178. package/dist/ui/agent-widget.d.ts.map +0 -1
  179. package/dist/ui/agent-widget.js +0 -992
  180. package/dist/ui/agent-widget.js.map +0 -1
  181. package/dist/ui/ccstyle/diff/ansi-utils.d.ts +0 -11
  182. package/dist/ui/ccstyle/diff/ansi-utils.d.ts.map +0 -1
  183. package/dist/ui/ccstyle/diff/ansi-utils.js +0 -145
  184. package/dist/ui/ccstyle/diff/ansi-utils.js.map +0 -1
  185. package/dist/ui/ccstyle/diff/diff-presentation.d.ts +0 -12
  186. package/dist/ui/ccstyle/diff/diff-presentation.d.ts.map +0 -1
  187. package/dist/ui/ccstyle/diff/diff-presentation.js +0 -48
  188. package/dist/ui/ccstyle/diff/diff-presentation.js.map +0 -1
  189. package/dist/ui/ccstyle/diff/diff-renderer.d.ts +0 -46
  190. package/dist/ui/ccstyle/diff/diff-renderer.d.ts.map +0 -1
  191. package/dist/ui/ccstyle/diff/diff-renderer.js +0 -2049
  192. package/dist/ui/ccstyle/diff/diff-renderer.js.map +0 -1
  193. package/dist/ui/ccstyle/diff/line-width-safety.d.ts +0 -12
  194. package/dist/ui/ccstyle/diff/line-width-safety.d.ts.map +0 -1
  195. package/dist/ui/ccstyle/diff/line-width-safety.js +0 -58
  196. package/dist/ui/ccstyle/diff/line-width-safety.js.map +0 -1
  197. package/dist/ui/ccstyle/diff/render-utils.d.ts +0 -6
  198. package/dist/ui/ccstyle/diff/render-utils.d.ts.map +0 -1
  199. package/dist/ui/ccstyle/diff/render-utils.js +0 -25
  200. package/dist/ui/ccstyle/diff/render-utils.js.map +0 -1
  201. package/dist/ui/ccstyle/diff/shiki-highlight.d.ts +0 -19
  202. package/dist/ui/ccstyle/diff/shiki-highlight.d.ts.map +0 -1
  203. package/dist/ui/ccstyle/diff/shiki-highlight.js +0 -85
  204. package/dist/ui/ccstyle/diff/shiki-highlight.js.map +0 -1
  205. package/dist/ui/ccstyle/diff/types.d.ts +0 -22
  206. package/dist/ui/ccstyle/diff/types.d.ts.map +0 -1
  207. package/dist/ui/ccstyle/diff/types.js +0 -10
  208. package/dist/ui/ccstyle/diff/types.js.map +0 -1
  209. package/dist/ui/ccstyle/diff/write-display-utils.d.ts +0 -2
  210. package/dist/ui/ccstyle/diff/write-display-utils.d.ts.map +0 -1
  211. package/dist/ui/ccstyle/diff/write-display-utils.js +0 -12
  212. package/dist/ui/ccstyle/diff/write-display-utils.js.map +0 -1
  213. package/dist/ui/ccstyle/tool-renderer.d.ts +0 -17
  214. package/dist/ui/ccstyle/tool-renderer.d.ts.map +0 -1
  215. package/dist/ui/ccstyle/tool-renderer.js +0 -74
  216. package/dist/ui/ccstyle/tool-renderer.js.map +0 -1
  217. package/dist/ui/ccstyle/tool-result.d.ts +0 -44
  218. package/dist/ui/ccstyle/tool-result.d.ts.map +0 -1
  219. package/dist/ui/ccstyle/tool-result.js +0 -423
  220. package/dist/ui/ccstyle/tool-result.js.map +0 -1
  221. package/dist/ui/conversation-blocks.d.ts +0 -46
  222. package/dist/ui/conversation-blocks.d.ts.map +0 -1
  223. package/dist/ui/conversation-blocks.js +0 -313
  224. package/dist/ui/conversation-blocks.js.map +0 -1
  225. package/dist/ui/conversation-nvim.d.ts +0 -8
  226. package/dist/ui/conversation-nvim.d.ts.map +0 -1
  227. package/dist/ui/conversation-nvim.js +0 -117
  228. package/dist/ui/conversation-nvim.js.map +0 -1
  229. package/dist/ui/conversation-role.d.ts +0 -13
  230. package/dist/ui/conversation-role.d.ts.map +0 -1
  231. package/dist/ui/conversation-role.js +0 -39
  232. package/dist/ui/conversation-role.js.map +0 -1
  233. package/dist/ui/conversation-search.d.ts +0 -39
  234. package/dist/ui/conversation-search.d.ts.map +0 -1
  235. package/dist/ui/conversation-search.js +0 -124
  236. package/dist/ui/conversation-search.js.map +0 -1
  237. package/dist/ui/conversation-timeline.d.ts +0 -102
  238. package/dist/ui/conversation-timeline.d.ts.map +0 -1
  239. package/dist/ui/conversation-timeline.js +0 -555
  240. package/dist/ui/conversation-timeline.js.map +0 -1
  241. package/dist/ui/conversation-viewer.d.ts +0 -138
  242. package/dist/ui/conversation-viewer.d.ts.map +0 -1
  243. package/dist/ui/conversation-viewer.js +0 -1175
  244. package/dist/ui/conversation-viewer.js.map +0 -1
  245. package/dist/ui/schedule-menu.d.ts +0 -17
  246. package/dist/ui/schedule-menu.d.ts.map +0 -1
  247. package/dist/ui/schedule-menu.js +0 -95
  248. package/dist/ui/schedule-menu.js.map +0 -1
  249. package/dist/ui/select-item.d.ts +0 -28
  250. package/dist/ui/select-item.d.ts.map +0 -1
  251. package/dist/ui/select-item.js +0 -35
  252. package/dist/ui/select-item.js.map +0 -1
  253. package/dist/ui/viewer-keys.d.ts +0 -21
  254. package/dist/ui/viewer-keys.d.ts.map +0 -1
  255. package/dist/ui/viewer-keys.js +0 -18
  256. package/dist/ui/viewer-keys.js.map +0 -1
  257. package/dist/ui/workflow-card.d.ts +0 -176
  258. package/dist/ui/workflow-card.d.ts.map +0 -1
  259. package/dist/ui/workflow-card.js +0 -333
  260. package/dist/ui/workflow-card.js.map +0 -1
  261. package/dist/ui/workflow-dialog.d.ts +0 -306
  262. package/dist/ui/workflow-dialog.d.ts.map +0 -1
  263. package/dist/ui/workflow-dialog.js +0 -844
  264. package/dist/ui/workflow-dialog.js.map +0 -1
  265. package/dist/ui/workflow-menu.d.ts +0 -42
  266. package/dist/ui/workflow-menu.d.ts.map +0 -1
  267. package/dist/ui/workflow-menu.js +0 -127
  268. package/dist/ui/workflow-menu.js.map +0 -1
  269. package/dist/usage.d.ts +0 -136
  270. package/dist/usage.d.ts.map +0 -1
  271. package/dist/usage.js +0 -121
  272. package/dist/usage.js.map +0 -1
  273. package/dist/workflow/collisions.d.ts +0 -96
  274. package/dist/workflow/collisions.d.ts.map +0 -1
  275. package/dist/workflow/collisions.js +0 -89
  276. package/dist/workflow/collisions.js.map +0 -1
  277. package/dist/workflow/entry.d.ts +0 -33
  278. package/dist/workflow/entry.d.ts.map +0 -1
  279. package/dist/workflow/entry.js +0 -30
  280. package/dist/workflow/entry.js.map +0 -1
  281. package/dist/workflow/host.d.ts +0 -63
  282. package/dist/workflow/host.d.ts.map +0 -1
  283. package/dist/workflow/host.js +0 -363
  284. package/dist/workflow/host.js.map +0 -1
  285. package/dist/workflow/journal.d.ts +0 -98
  286. package/dist/workflow/journal.d.ts.map +0 -1
  287. package/dist/workflow/journal.js +0 -121
  288. package/dist/workflow/journal.js.map +0 -1
  289. package/dist/workflow/json-schema.d.ts +0 -52
  290. package/dist/workflow/json-schema.d.ts.map +0 -1
  291. package/dist/workflow/json-schema.js +0 -112
  292. package/dist/workflow/json-schema.js.map +0 -1
  293. package/dist/workflow/meta.d.ts +0 -68
  294. package/dist/workflow/meta.d.ts.map +0 -1
  295. package/dist/workflow/meta.js +0 -318
  296. package/dist/workflow/meta.js.map +0 -1
  297. package/dist/workflow/progress.d.ts +0 -225
  298. package/dist/workflow/progress.d.ts.map +0 -1
  299. package/dist/workflow/progress.js +0 -362
  300. package/dist/workflow/progress.js.map +0 -1
  301. package/dist/workflow/runtime.d.ts +0 -335
  302. package/dist/workflow/runtime.d.ts.map +0 -1
  303. package/dist/workflow/runtime.js +0 -831
  304. package/dist/workflow/runtime.js.map +0 -1
  305. package/dist/workflow/saved.d.ts +0 -91
  306. package/dist/workflow/saved.d.ts.map +0 -1
  307. package/dist/workflow/saved.js +0 -204
  308. package/dist/workflow/saved.js.map +0 -1
  309. package/dist/workflow/task.d.ts +0 -137
  310. package/dist/workflow/task.d.ts.map +0 -1
  311. package/dist/workflow/task.js +0 -208
  312. package/dist/workflow/task.js.map +0 -1
  313. package/dist/workflow/tool-description.d.ts +0 -39
  314. package/dist/workflow/tool-description.d.ts.map +0 -1
  315. package/dist/workflow/tool-description.js +0 -200
  316. package/dist/workflow/tool-description.js.map +0 -1
  317. package/dist/workflow/worker-source.d.ts +0 -48
  318. package/dist/workflow/worker-source.d.ts.map +0 -1
  319. package/dist/workflow/worker-source.js +0 -779
  320. package/dist/workflow/worker-source.js.map +0 -1
  321. package/dist/worktree.d.ts +0 -53
  322. package/dist/worktree.d.ts.map +0 -1
  323. package/dist/worktree.js +0 -165
  324. package/dist/worktree.js.map +0 -1
  325. package/dist/write-execution.d.ts +0 -42
  326. package/dist/write-execution.d.ts.map +0 -1
  327. package/dist/write-execution.js +0 -138
  328. package/dist/write-execution.js.map +0 -1
  329. package/dist/xml.d.ts +0 -11
  330. package/dist/xml.d.ts.map +0 -1
  331. package/dist/xml.js +0 -13
  332. package/dist/xml.js.map +0 -1
  333. package/src/abortable.ts +0 -43
  334. package/src/agent-color.ts +0 -161
  335. package/src/agent-file-toggle.ts +0 -269
  336. package/src/child-context.ts +0 -15
  337. package/src/mention-clone.ts +0 -196
  338. package/src/mention.ts +0 -141
  339. package/src/model-scope.ts +0 -70
  340. package/src/nested-tools.ts +0 -424
  341. package/src/structured-output.ts +0 -130
  342. package/src/ui/agent-mention.ts +0 -216
  343. package/src/ui/select-item.ts +0 -45
  344. package/src/ui/workflow-card.ts +0 -470
  345. package/src/ui/workflow-dialog.ts +0 -1115
  346. package/src/ui/workflow-menu.ts +0 -166
  347. package/src/workflow/collisions.ts +0 -123
  348. package/src/workflow/entry.ts +0 -47
  349. package/src/workflow/host.ts +0 -403
  350. package/src/workflow/journal.ts +0 -164
  351. package/src/workflow/json-schema.ts +0 -128
  352. package/src/workflow/meta.ts +0 -325
  353. package/src/workflow/progress.ts +0 -550
  354. package/src/workflow/runtime.ts +0 -1219
  355. package/src/workflow/saved.ts +0 -217
  356. package/src/workflow/task.ts +0 -302
  357. package/src/workflow/tool-description.ts +0 -200
  358. package/src/workflow/worker-source.ts +0 -781
  359. package/src/xml.ts +0 -13
@@ -1,503 +0,0 @@
1
- /**
2
- * agent-manager.ts — Tracks agents, background execution, resume support.
3
- *
4
- * There are two independent concurrency pools, never one:
5
- *
6
- * - Background (`maxConcurrent`, default 10) bounds detached agents.
7
- * - Foreground (`maxConcurrentForeground`, default 0 = unlimited) bounds
8
- * agents a caller is blocking on inline — `spawnAndWait`.
9
- *
10
- * Independent by design: a foreground agent blocks the parent anyway, so
11
- * charging it to the background pool would let a saturated pool starve the main
12
- * session of work it could have done itself. Excess agents in either pool are
13
- * queued and auto-started as slots free up. Nested children take no slot in
14
- * either — see `occupiesPoolSlot` / `occupiesForegroundSlot`.
15
- */
16
- import type { Model } from "@earendil-works/pi-ai";
17
- import type { AgentSession, ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
18
- import { type ToolActivity } from "./agent-runner.js";
19
- import type { AgentInvocation, AgentRecord, AgentTombstone, IsolationMode, MentionResolution, SubagentType, ThinkingLevel } from "./types.js";
20
- import { type LifetimeUsage } from "./usage.js";
21
- import type { CompiledSchema } from "./workflow/json-schema.js";
22
- export type OnAgentComplete = (record: AgentRecord) => void;
23
- export type OnAgentStart = (record: AgentRecord) => void;
24
- export type OnAgentCompact = (record: AgentRecord, info: CompactionInfo) => void;
25
- /**
26
- * Fired once per assistant `message_end`, for EVERY agent this manager owns —
27
- * top-level and nested alike, spawns and resumes. The one place where each
28
- * message is seen exactly once: `AgentRecord.lifetimeUsage` is deliberately
29
- * double-booked into ancestors (see `nested-tools.ts`) so a hidden child's spend
30
- * shows up on the record a human can see, which makes those records useless as
31
- * a basis for anything that must not count a message twice — parent-session
32
- * accounting above all.
33
- */
34
- export type OnAgentUsage = (record: AgentRecord, usage: LifetimeUsage) => void;
35
- export type CompactionInfo = {
36
- reason: "manual" | "threshold" | "overflow";
37
- tokensBefore: number;
38
- };
39
- /**
40
- * Whether a record is one of the session's own agents, rather than something
41
- * another agent or a workflow owns.
42
- *
43
- * The single definition behind every user-facing surface — the fleet list, the
44
- * widget, the `/agents` menus, `@handle` resolution, and the completion events
45
- * and session entries. An owned child reports through its owner, so surfacing
46
- * it separately would double-count the same work in the places a person reads.
47
- */
48
- export declare function isTopLevelAgent(record: Pick<AgentRecord, "parentAgentId" | "workflowId">): boolean;
49
- interface SpawnOptions {
50
- description: string;
51
- /**
52
- * Optional memorable name for this instance, becoming a second handle
53
- * (`@auth-audit`) alongside the type-derived one. Slugged, not validated —
54
- * anything unusable degrades via `handleBase` rather than failing the spawn.
55
- */
56
- name?: string;
57
- /**
58
- * Reopen this pi session file instead of starting a fresh conversation, so a
59
- * mention of an evicted agent continues where it left off. The agent's
60
- * definition is still resolved from its type, so the continuation runs under
61
- * the type's CURRENT config.
62
- */
63
- resumeSessionFile?: string;
64
- /**
65
- * Take an evicted agent's names back verbatim instead of allocating fresh
66
- * ones, so a resumed conversation keeps the handle the user just typed —
67
- * `handleBase(type)` cannot reproduce a numbered `explore-2`. Safe without an
68
- * `assignHandle` pass because tombstoned names are excluded from allocation
69
- * (`takenHandles`), so nothing live can be holding them.
70
- *
71
- * Internal capability, like `resumeSessionFile`: a forged handle would
72
- * duplicate a live agent's name and make `resolveMention` ambiguous, so
73
- * `spawnTopLevel` strips it from anything a caller sends.
74
- */
75
- reclaim?: {
76
- handle: string;
77
- alias?: string;
78
- };
79
- model?: Model<any>;
80
- maxTurns?: number;
81
- isolated?: boolean;
82
- inheritContext?: boolean;
83
- thinkingLevel?: ThinkingLevel;
84
- isBackground?: boolean;
85
- /**
86
- * Skip whichever pool's queue check applies to this spawn — start immediately
87
- * even if the configured concurrency limit would otherwise queue it. The slot
88
- * is still COUNTED once the run starts, so a bypassing spawn transiently
89
- * exceeds the limit rather than being invisible to it.
90
- *
91
- * Used by the scheduler, so a fired job can't be deferred past its trigger
92
- * window, and by the `/agents` agent-file generator, which has no way to
93
- * cancel a wait (see its call site).
94
- */
95
- bypassQueue?: boolean;
96
- /**
97
- * A caller is awaiting this record inline (`spawnAndWait`) — what
98
- * `maxConcurrentForeground` bounds. Set only by `spawnAndWait`; stripped from
99
- * caller-supplied options by `spawnTopLevel`, since a forged `blocking` would
100
- * defer a detached start behind a queue its caller cannot see or release.
101
- */
102
- blocking?: boolean;
103
- /**
104
- * The workflow run this child belongs to, when a workflow spawned it.
105
- *
106
- * Ownership, not decoration. A workflow's children are the workflow's — they
107
- * report through its card, its notification and its dialog, so they are
108
- * filtered out of every top-level surface exactly as nested children are, and
109
- * they take no `maxConcurrent` slot: the run has its own concurrency cap, and
110
- * counting them twice would let one workflow starve the whole session.
111
- */
112
- workflowId?: string;
113
- /**
114
- * Make the child report through a `StructuredOutput` tool built from this
115
- * compiled schema. Set only by the workflow host, for `agent({ schema })`.
116
- */
117
- structuredOutput?: CompiledSchema;
118
- /** Isolation mode — "worktree" creates a temp git worktree for the agent. */
119
- isolation?: IsolationMode;
120
- /**
121
- * Working directory for the agent (absolute path). Default: parent session
122
- * cwd. The agent's tools operate here, but .pi config (extensions, skills,
123
- * settings, memory) still loads from the parent session's project — the
124
- * target directory's `.pi` extensions never execute. With isolation:
125
- * "worktree", the worktree is created FROM this directory and the result
126
- * branch lands in that repo.
127
- */
128
- cwd?: string;
129
- /**
130
- * Last chance to look at an isolated agent's worktree, awaited immediately
131
- * before it is committed to a branch and removed.
132
- *
133
- * Exists because that removal happens inside the settle path, before
134
- * `spawnAndWait` resolves: by the time a caller has the finished record, the
135
- * directory the child actually wrote in is gone. Anything that must inspect
136
- * or verify that tree — a workflow `gate` is the motivating case — has to run
137
- * here or it silently inspects the main tree instead.
138
- *
139
- * Fires only on the normal settle path, and only when a worktree was created.
140
- * Not on the error path and not on the stop-during-copy guard: those are
141
- * already failing, and delaying cleanup there would leak a copy for no gain.
142
- * A rejection is swallowed — the hook can never keep the worktree alive.
143
- */
144
- onBeforeWorktreeCleanup?: (worktreePath: string) => Promise<void>;
145
- /** Resolved invocation snapshot captured for UI display. */
146
- invocation?: AgentInvocation;
147
- /** Whether the optional `.output` transcript is enabled for this run. */
148
- outputTranscript?: boolean;
149
- /** Parent abort signal — when aborted, the subagent is also stopped. */
150
- signal?: AbortSignal;
151
- /**
152
- * Called synchronously once the record is in the map and its promise is set,
153
- * before `onSessionCreated` fires — where callers attach the output file.
154
- *
155
- * Carried on the options rather than parked on the manager for the duration
156
- * of a spawn: with a foreground queue, `startAgent` can run at drain time,
157
- * long after any such field would have been restored, and the callback would
158
- * silently never fire (or fire into an unrelated caller's closure).
159
- */
160
- onSpawned?: (id: string) => void;
161
- /**
162
- * Called synchronously when the spawn is queued instead of started, with how
163
- * many entries in its own pool are ahead of it. The foreground UI uses it to
164
- * say so while it waits; nothing else needs it.
165
- */
166
- onQueued?: (id: string, ahead: number) => void;
167
- /** Called on tool start/end with activity info (for streaming progress to UI). */
168
- onToolActivity?: (activity: ToolActivity) => void;
169
- /** Called on streaming text deltas from the assistant response. */
170
- onTextDelta?: (delta: string, fullText: string) => void;
171
- /** Called when the agent session is created (for accessing session stats). */
172
- onSessionCreated?: (session: AgentSession) => void;
173
- /** Called at the end of each agentic turn with the cumulative count. */
174
- onTurnEnd?: (turnCount: number) => void;
175
- /** Called once per assistant message_end with that message's usage delta. */
176
- onAssistantUsage?: (usage: {
177
- input: number;
178
- output: number;
179
- cacheWrite: number;
180
- }) => void;
181
- /** Called when the session successfully compacts. */
182
- onCompaction?: (info: CompactionInfo) => void;
183
- /** Nesting depth: top-level subagent = 1. */
184
- depth?: number;
185
- /** Parent agent ID for ownership-scoped nested controls. */
186
- parentAgentId?: string;
187
- /** Effective inherited nesting cap for this branch. */
188
- maxSubagentDepth?: number;
189
- /** Config-discovery root inherited by nested launches when it differs from the working directory. */
190
- configCwd?: string;
191
- /** Root session id, inherited by nested launches so transcripts stay grouped. */
192
- rootSessionId?: string;
193
- }
194
- interface ResumeOptions {
195
- /**
196
- * Run the resumed turn detached in the background: return immediately with
197
- * the record still "running" (or "queued" at the concurrency limit) and
198
- * notify on completion via onComplete, exactly like a background spawn.
199
- * Default (false/undefined) runs the resume inline and returns the settled
200
- * record — the historical behavior.
201
- */
202
- isBackground?: boolean;
203
- /** Called on tool start/end with activity info (for streaming progress to UI). */
204
- onToolActivity?: (activity: ToolActivity) => void;
205
- /** Called once per assistant message_end with that message's usage delta. */
206
- onAssistantUsage?: (usage: {
207
- input: number;
208
- output: number;
209
- cacheWrite: number;
210
- }) => void;
211
- /** Called when the session successfully compacts. */
212
- onCompaction?: (info: CompactionInfo) => void;
213
- /**
214
- * Background resume only: called synchronously when the run actually starts —
215
- * immediately, or later from drainQueue. Callers wire per-run side effects
216
- * (output-file streaming) here rather than at the call site, so a resume that
217
- * is stopped while still queued never leaves a subscription behind: `abort()`
218
- * drops a queued record without reaching `settle()`, which is what would have
219
- * torn that subscription down.
220
- */
221
- onStarted?: () => void;
222
- }
223
- export declare class AgentManager {
224
- private agents;
225
- /** Lightweight terminal rows retained after runtime GC so durable history stays discoverable. */
226
- private historyRecords;
227
- private cleanupInterval;
228
- private onComplete?;
229
- private onStart?;
230
- private onCompact?;
231
- private onUsage?;
232
- private maxConcurrent;
233
- private maxConcurrentForeground;
234
- /** Base repos worktrees were created from — so dispose() can prune them all,
235
- * not just the parent repo (caller-supplied cwd can target other repos). */
236
- private worktreeRepos;
237
- /** Project cwd for each record's durable checkpoint. */
238
- private recoveryCwds;
239
- /**
240
- * Startup phases, keyed by agent id. `spawn()` still returns synchronously,
241
- * but an agent using worktree isolation is not running yet when it does —
242
- * copying the repo is an awaited git call. This is what `awaitStartup` hands
243
- * callers that must fail their tool call on a startup failure, and what
244
- * `waitForAll` waits on while a record is "running" with no `promise` yet.
245
- * Entries are dropped once the run is underway, and kept (rejected) after a
246
- * startup failure so a late `awaitStartup` still sees it.
247
- */
248
- private startups;
249
- /**
250
- * Evicted agents that can still be reached by name, keyed by handle. Outlives
251
- * the 10-minute record cleanup — that timer exists to bound memory, not to
252
- * expire a conversation the user might still want — and is cleared alongside
253
- * completed records on session start/switch.
254
- */
255
- private tombstones;
256
- /**
257
- * Agents waiting to start, tagged with the pool they wait on. One queue for
258
- * both pools: `drainQueue` picks the earliest entry whose own pool has room,
259
- * so neither can head-of-line-block the other, and every removal path
260
- * (`abort`, `abortAll`, `dispose`) stays a single filter.
261
- *
262
- * `release` wakes a caller blocked in `spawnAndWait`, and is fired once the
263
- * entry's `start` has SETTLED rather than at drain time: startup is async
264
- * now, so releasing earlier would wake the caller before `record.promise`
265
- * exists and it would read a still-starting agent as one that never ran.
266
- * Removing an entry from this array MUST release it — a queued record has no
267
- * promise to await, and pi has no tool-execution timeout to bail the caller
268
- * out.
269
- */
270
- private queue;
271
- /** Number of currently running background agents. */
272
- private runningBackground;
273
- /** Number of currently running foreground (blocking) agents. */
274
- private runningForeground;
275
- constructor(onComplete?: OnAgentComplete, maxConcurrent?: number, onStart?: OnAgentStart, onCompact?: OnAgentCompact, onUsage?: OnAgentUsage);
276
- /** Update the max concurrent background agents limit. */
277
- setMaxConcurrent(n: number): void;
278
- getMaxConcurrent(): number;
279
- /** Update the max concurrent foreground (blocking) agents limit. 0 = unlimited. */
280
- setMaxConcurrentForeground(n: number): void;
281
- getMaxConcurrentForeground(): number;
282
- /**
283
- * Which pool a spawn is charged to, or undefined for one that is charged to
284
- * neither (nested children, detached non-background spawns).
285
- *
286
- * Nothing here queues when the limit is unset — `poolHasRoom` reports an
287
- * unlimited pool as always having room, so that alone is what keeps the
288
- * default path identical. The `> 0` guard is belt and braces on top: it also
289
- * keeps the counter from churning and the settle path from calling a drain
290
- * that would find nothing to do. Both are unobservable, which is why no test
291
- * pins them; the observable half — that the default start stays synchronous —
292
- * is pinned in `test/foreground-concurrency.test.ts`.
293
- */
294
- private poolFor;
295
- private poolHasRoom;
296
- /**
297
- * Spawn an agent and return its ID immediately (for background use).
298
- * If the concurrency limit is reached, the agent is queued.
299
- *
300
- * The id comes back synchronously, but with `isolation: "worktree"` the agent
301
- * is not running yet when it does — the repo copy is an awaited git call.
302
- * Callers that must fail a tool call on a startup failure await
303
- * `awaitStartup(id)`; everyone else sees it on the record (status "error").
304
- */
305
- spawn(pi: ExtensionAPI, ctx: ExtensionContext, type: SubagentType, prompt: string, options: SpawnOptions): string;
306
- /**
307
- * Attach the project-local transcript once for a newly-created record.
308
- * Repeated calls are harmless: deterministic paths and an existing file keep
309
- * the initial user entry intact, which is important for resume and retries.
310
- */
311
- private attachDurableTranscript;
312
- private checkpointStatus;
313
- private makeCheckpoint;
314
- private checkpoint;
315
- /** Checkpoint a record after external transcript wiring. */
316
- checkpointRecord(id: string): void;
317
- /** Register durable transcript metadata for compatibility with callers that
318
- * attach a pre-existing history (for example a restored session). */
319
- setTranscript(id: string, historyFile: string, transcriptPath: string, cwd?: string): void;
320
- /** Restore active checkpoints as stopped partial history after a restart. */
321
- restoreRecovered(cwd: string): void;
322
- /**
323
- * Restore terminal records from durable history without creating sessions.
324
- * Invalid and live records are ignored so recovery cannot replace active work.
325
- */
326
- restoreCompleted(records: readonly Partial<AgentRecord>[]): void;
327
- /**
328
- * Wire a parent abort signal for a record that is about to be QUEUED.
329
- * `startAgent` does this for running agents, and a queued record never gets
330
- * there, so without this Esc could not release a queue position.
331
- *
332
- * Returns false when the signal is ALREADY aborted, in which case the record
333
- * is stopped here and must not be enqueued: `addEventListener` never fires on
334
- * an aborted signal, so a `spawnAndWait` on it would wait forever — pi has no
335
- * tool-execution timeout to bail it out.
336
- *
337
- * The listener is left in place when the agent starts. `startAgent` adds its
338
- * own, so both fire on a later abort, but `abort()` on an already-stopped
339
- * record is a no-op — so detaching would only be tidiness, and tidiness the
340
- * `abortAll`/`dispose` paths could not offer anyway.
341
- */
342
- private armQueuedAbort;
343
- /**
344
- * Kick off an agent's startup and register it under `startups`. The returned
345
- * promise never rejects — the failure is delivered through `awaitStartup`,
346
- * and to the record.
347
- *
348
- * @param queuedPool - The pool this start was QUEUED on, or undefined for an
349
- * immediate start. A queue drain can be minutes after `spawn()` returned,
350
- * and nobody is awaiting `awaitStartup` by then, so a failure has to live
351
- * on the record as status "error" — what drainQueue did when the throw was
352
- * still synchronous. An immediate start instead drops the record, exactly
353
- * as the throw out of `spawn()` did: no orphan in `listAgents()`, and the
354
- * handle goes back.
355
- */
356
- private launch;
357
- /**
358
- * Resolves once the agent is actually running, and rejects with the startup
359
- * failure (strict worktree isolation) that `spawn()` used to throw before the
360
- * repo copy became async. Resolves immediately for an agent that is already
361
- * running, still queued, or unknown — so callers can await it unconditionally.
362
- *
363
- * Call it in the same tick as the `spawn()` it belongs to: a failed startup
364
- * takes its record (and this entry) with it, exactly as the throw did.
365
- */
366
- awaitStartup(id: string): Promise<void>;
367
- /** Actually start an agent (called immediately or from queue drain). */
368
- private startAgent;
369
- /**
370
- * The shared tail of both settle paths: release whatever pool slot the run
371
- * held, notify, and let the queue drain into the freed slot.
372
- *
373
- * The decrement lives HERE and nowhere else. `abort()` on a running record
374
- * only fires its controller and leaves the run to settle normally, so
375
- * decrementing there too would double-free — permanently lifting the limit.
376
- *
377
- * Foreground agents fire `onComplete` for lifecycle symmetry, with
378
- * `resultConsumed` set so the callback skips notifications the inline result
379
- * already delivered.
380
- *
381
- * @param guardCallback swallow a throwing `onComplete` (the success path does;
382
- * the error path historically did not, and keeps not doing so).
383
- * @param pool the pool this run was CHARGED TO at start time — passed in, not
384
- * recomputed, so a mid-run change to `maxConcurrentForeground` can't make
385
- * the release disagree with the acquire.
386
- */
387
- private settleRun;
388
- private flushOutput;
389
- /**
390
- * Stop the nested children a settled parent owns. Nested records are hidden
391
- * from the UI and only their owner can consume them, so a child outliving its
392
- * parent would burn tokens unseen with no way to reach it. Grandchildren are
393
- * covered transitively — each abort lands in that child's own settle path.
394
- */
395
- private abortOwnedChildren;
396
- /**
397
- * Start queued agents up to each pool's concurrency limit.
398
- *
399
- * `findIndex` on the entry's OWN pool rather than `shift`: with one queue
400
- * serving two independent limits, a saturated foreground pool at the head
401
- * would otherwise stall every background agent behind it. Taking the earliest
402
- * eligible entry keeps FIFO within each pool, which is what callers see.
403
- */
404
- private drainQueue;
405
- /**
406
- * Remove queued entries and wake anyone blocked on them. The single point
407
- * that enforces "leaving the queue releases the waiter" — a missed release is
408
- * an unbounded hang, not a failed call.
409
- */
410
- private dequeue;
411
- /**
412
- * Spawn an agent and wait for completion (foreground use).
413
- * Charged to the foreground pool (`maxConcurrentForeground`), which is
414
- * unlimited by default; never to the background one.
415
- * Returns { id, record } so callers can access the agent ID.
416
- *
417
- * @param onSpawned - Called synchronously once the run is kicked off, before
418
- * onSessionCreated fires. Use this to set record.outputFile so
419
- * streamToOutputFile can pick it up.
420
- */
421
- spawnAndWait(pi: ExtensionAPI, ctx: ExtensionContext, type: SubagentType, prompt: string, options: Omit<SpawnOptions, "isBackground">, onSpawned?: (id: string) => void): Promise<{
422
- id: string;
423
- record: AgentRecord;
424
- }>;
425
- /**
426
- * Resume an existing agent session with a new prompt.
427
- */
428
- resume(id: string, prompt: string, signal?: AbortSignal, options?: ResumeOptions): Promise<AgentRecord | undefined>;
429
- /**
430
- * Start a background resume run: detached, settling and notifying like
431
- * startAgent's background path. Invoked immediately, or from drainQueue when
432
- * a concurrency slot frees. The session already exists (resume reuses it), so
433
- * there is no onSessionCreated to hang per-run wiring off — callers use
434
- * `options.onStarted`, which fires on both the immediate and the drained path.
435
- */
436
- private startResume;
437
- /**
438
- * Send a steering message to an agent from the UI (mirrors the steer_subagent
439
- * tool). A live session delivers it now — it interrupts the agent after its
440
- * current tool execution and appears as a user message. If the session isn't
441
- * ready yet, the message is queued on `pendingSteers` and flushed when the
442
- * session is created. Returns false if the agent can't accept steering
443
- * (unknown id, or no longer running/queued).
444
- */
445
- steer(id: string, message: string): boolean;
446
- getRecord(id: string): AgentRecord | undefined;
447
- /** Handles already in use, so a fresh spawn can pick an unclaimed one. */
448
- private takenHandles;
449
- /**
450
- * Resolve an `@name` from the prompt. Matches a top-level agent's handle
451
- * case-insensitively, preferring one that can still be steered and otherwise
452
- * the most recently started (which is the one a resume should continue), then
453
- * falls back to an exact agent id so `@<agentId>` works too.
454
- */
455
- resolveMention(name: string): MentionResolution | undefined;
456
- /**
457
- * Forget an evicted agent, by handle. For the case where its session file has
458
- * gone: the entry can then only ever fail, while still holding the name
459
- * against the type that would otherwise start a fresh agent under it.
460
- *
461
- * A *successful* resume does not drop its tombstone — the live record it
462
- * creates already wins in `resolveMention`, and overwrites the entry in place
463
- * when it is itself evicted.
464
- */
465
- dropTombstone(handle: string): void;
466
- /** Evicted agents whose conversation can still be reopened, newest first. */
467
- listTombstones(): AgentTombstone[];
468
- listAgents(): AgentRecord[];
469
- abort(id: string): boolean;
470
- /** Dispose a record's session and remove it from the map. */
471
- private removeRecord;
472
- /**
473
- * Preserve enough of a departing record for `@handle` to reopen its
474
- * conversation later. Nothing to keep unless it has both a handle to be
475
- * addressed by and a session file to reopen — an in-memory session leaves no
476
- * transcript, so the mention would have nothing to continue from.
477
- */
478
- private tombstone;
479
- private cleanup;
480
- /**
481
- * Remove completed/stopped/errored runtime records immediately.
482
- * Called on session start/switch so live handles from a prior session do not
483
- * remain addressable. Transcript-backed rows move to `historyRecords` and
484
- * stay visible to the UI; their JSONL history is the durable source of truth.
485
- * Pass skipUnconsumed=true to preserve records the LLM has not read yet
486
- * (resultConsumed=false) so the result remains available to the caller.
487
- */
488
- clearCompleted(skipUnconsumed?: boolean): void;
489
- /** Whether any agents are still running or queued. */
490
- hasRunning(): boolean;
491
- /** Abort all running and queued agents immediately. */
492
- abortAll(): number;
493
- /** Wait for all running and queued agents to complete (including queued ones). */
494
- waitForAll(): Promise<void>;
495
- /**
496
- * @param pi - Needed to run `git worktree prune`, which is async now and so
497
- * cannot be reached through a stored spawn argument at shutdown. Omitting
498
- * it (tests, teardown of a manager that never spawned) skips the prune.
499
- */
500
- dispose(pi?: ExtensionAPI): Promise<void>;
501
- }
502
- export {};
503
- //# sourceMappingURL=agent-manager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-manager.d.ts","sourceRoot":"","sources":["../src/agent-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAcpG,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAI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