@narumitw/pi-subagents 2.1.3 → 3.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 (314) hide show
  1. package/README.md +181 -1250
  2. package/dist/child-communication-bridge.ts +136 -0
  3. package/dist/child-communication-bridge.ts.map +7 -0
  4. package/dist/chunks/chunk-UKTWUQRM.js +667 -0
  5. package/dist/chunks/chunk-UKTWUQRM.js.map +7 -0
  6. package/dist/index.ts +1448 -1598
  7. package/dist/index.ts.map +4 -4
  8. package/docs/design-principles.md +31 -0
  9. package/docs/ipc-transport-idea.md +103 -0
  10. package/docs/tools.md +109 -0
  11. package/package.json +11 -19
  12. package/src/broker-credentials.ts +71 -0
  13. package/src/child-communication-bridge.ts +153 -0
  14. package/src/child-communication-tools.ts +147 -0
  15. package/src/completion-renderer.ts +60 -0
  16. package/src/index.ts +1 -1
  17. package/src/message-broker.ts +628 -0
  18. package/src/model-output.ts +42 -0
  19. package/src/process.ts +688 -0
  20. package/src/runtime.ts +538 -0
  21. package/src/subagents.ts +33 -34
  22. package/src/tools.ts +416 -0
  23. package/src/types.ts +85 -0
  24. package/src/widget.ts +130 -0
  25. package/dist/chunks/auto-transport-FUUKFDIG.ts +0 -109
  26. package/dist/chunks/auto-transport-FUUKFDIG.ts.map +0 -7
  27. package/dist/chunks/capability-grant-PR72SWWS.ts +0 -19
  28. package/dist/chunks/capability-grant-PR72SWWS.ts.map +0 -7
  29. package/dist/chunks/child-peer-bridge.ts +0 -108
  30. package/dist/chunks/child-peer-bridge.ts.map +0 -7
  31. package/dist/chunks/chunk-2LMJU25E.ts +0 -1641
  32. package/dist/chunks/chunk-2LMJU25E.ts.map +0 -7
  33. package/dist/chunks/chunk-47SK2QYC.ts +0 -56
  34. package/dist/chunks/chunk-47SK2QYC.ts.map +0 -7
  35. package/dist/chunks/chunk-4AQSF7AS.ts +0 -29
  36. package/dist/chunks/chunk-4AQSF7AS.ts.map +0 -7
  37. package/dist/chunks/chunk-5DGRMKNV.ts +0 -126
  38. package/dist/chunks/chunk-5DGRMKNV.ts.map +0 -7
  39. package/dist/chunks/chunk-6H6TBBED.ts +0 -108
  40. package/dist/chunks/chunk-6H6TBBED.ts.map +0 -7
  41. package/dist/chunks/chunk-6KJ34M6S.ts +0 -159
  42. package/dist/chunks/chunk-6KJ34M6S.ts.map +0 -7
  43. package/dist/chunks/chunk-6NSJVPXX.ts +0 -480
  44. package/dist/chunks/chunk-6NSJVPXX.ts.map +0 -7
  45. package/dist/chunks/chunk-7AAJEUSL.ts +0 -238
  46. package/dist/chunks/chunk-7AAJEUSL.ts.map +0 -7
  47. package/dist/chunks/chunk-BFK2Z4ZF.ts +0 -189
  48. package/dist/chunks/chunk-BFK2Z4ZF.ts.map +0 -7
  49. package/dist/chunks/chunk-BOAXY55Y.ts +0 -153
  50. package/dist/chunks/chunk-BOAXY55Y.ts.map +0 -7
  51. package/dist/chunks/chunk-D4CR7T73.ts +0 -353
  52. package/dist/chunks/chunk-D4CR7T73.ts.map +0 -7
  53. package/dist/chunks/chunk-FEVPWRMU.ts +0 -300
  54. package/dist/chunks/chunk-FEVPWRMU.ts.map +0 -7
  55. package/dist/chunks/chunk-G6VZTCFH.ts +0 -70
  56. package/dist/chunks/chunk-G6VZTCFH.ts.map +0 -7
  57. package/dist/chunks/chunk-H3FP6DLR.ts +0 -160
  58. package/dist/chunks/chunk-H3FP6DLR.ts.map +0 -7
  59. package/dist/chunks/chunk-HA36LPCO.ts +0 -130
  60. package/dist/chunks/chunk-HA36LPCO.ts.map +0 -7
  61. package/dist/chunks/chunk-HOP5FXDT.ts +0 -27
  62. package/dist/chunks/chunk-HOP5FXDT.ts.map +0 -7
  63. package/dist/chunks/chunk-IGAMVWFN.ts +0 -139
  64. package/dist/chunks/chunk-IGAMVWFN.ts.map +0 -7
  65. package/dist/chunks/chunk-ILEQ27AL.ts +0 -45
  66. package/dist/chunks/chunk-ILEQ27AL.ts.map +0 -7
  67. package/dist/chunks/chunk-ITVWPNU4.ts +0 -819
  68. package/dist/chunks/chunk-ITVWPNU4.ts.map +0 -7
  69. package/dist/chunks/chunk-IWC32VPY.ts +0 -172
  70. package/dist/chunks/chunk-IWC32VPY.ts.map +0 -7
  71. package/dist/chunks/chunk-JSZIP73U.ts +0 -362
  72. package/dist/chunks/chunk-JSZIP73U.ts.map +0 -7
  73. package/dist/chunks/chunk-JU6LUNLP.ts +0 -380
  74. package/dist/chunks/chunk-JU6LUNLP.ts.map +0 -7
  75. package/dist/chunks/chunk-KMGKCEO4.ts +0 -38
  76. package/dist/chunks/chunk-KMGKCEO4.ts.map +0 -7
  77. package/dist/chunks/chunk-LASD73CM.ts +0 -339
  78. package/dist/chunks/chunk-LASD73CM.ts.map +0 -7
  79. package/dist/chunks/chunk-LEOYDZI3.ts +0 -22
  80. package/dist/chunks/chunk-LEOYDZI3.ts.map +0 -7
  81. package/dist/chunks/chunk-LL4LP2T7.ts +0 -737
  82. package/dist/chunks/chunk-LL4LP2T7.ts.map +0 -7
  83. package/dist/chunks/chunk-N2T5IN4X.ts +0 -18
  84. package/dist/chunks/chunk-N2T5IN4X.ts.map +0 -7
  85. package/dist/chunks/chunk-N7BLVXKK.ts +0 -73
  86. package/dist/chunks/chunk-N7BLVXKK.ts.map +0 -7
  87. package/dist/chunks/chunk-NLT67IZS.ts +0 -322
  88. package/dist/chunks/chunk-NLT67IZS.ts.map +0 -7
  89. package/dist/chunks/chunk-NTRPLF46.ts +0 -63
  90. package/dist/chunks/chunk-NTRPLF46.ts.map +0 -7
  91. package/dist/chunks/chunk-ONDTY4EL.ts +0 -91
  92. package/dist/chunks/chunk-ONDTY4EL.ts.map +0 -7
  93. package/dist/chunks/chunk-OVPHFGKO.ts +0 -1769
  94. package/dist/chunks/chunk-OVPHFGKO.ts.map +0 -7
  95. package/dist/chunks/chunk-P7OH4XMF.ts +0 -60
  96. package/dist/chunks/chunk-P7OH4XMF.ts.map +0 -7
  97. package/dist/chunks/chunk-PBZMBTNJ.ts +0 -422
  98. package/dist/chunks/chunk-PBZMBTNJ.ts.map +0 -7
  99. package/dist/chunks/chunk-PGLSFLYW.ts +0 -52
  100. package/dist/chunks/chunk-PGLSFLYW.ts.map +0 -7
  101. package/dist/chunks/chunk-RRR66UWR.ts +0 -28
  102. package/dist/chunks/chunk-RRR66UWR.ts.map +0 -7
  103. package/dist/chunks/chunk-RSUXZD6S.ts +0 -275
  104. package/dist/chunks/chunk-RSUXZD6S.ts.map +0 -7
  105. package/dist/chunks/chunk-RTCVYIZA.ts +0 -221
  106. package/dist/chunks/chunk-RTCVYIZA.ts.map +0 -7
  107. package/dist/chunks/chunk-RY2AEGMZ.ts +0 -34
  108. package/dist/chunks/chunk-RY2AEGMZ.ts.map +0 -7
  109. package/dist/chunks/chunk-SWGQLFSD.ts +0 -60
  110. package/dist/chunks/chunk-SWGQLFSD.ts.map +0 -7
  111. package/dist/chunks/chunk-TM2R67J3.ts +0 -52
  112. package/dist/chunks/chunk-TM2R67J3.ts.map +0 -7
  113. package/dist/chunks/chunk-TMZRHIIK.ts +0 -497
  114. package/dist/chunks/chunk-TMZRHIIK.ts.map +0 -7
  115. package/dist/chunks/chunk-TZ34IQ3M.ts +0 -59
  116. package/dist/chunks/chunk-TZ34IQ3M.ts.map +0 -7
  117. package/dist/chunks/chunk-UMBPMVJW.ts +0 -22
  118. package/dist/chunks/chunk-UMBPMVJW.ts.map +0 -7
  119. package/dist/chunks/chunk-VDG7LTYE.ts +0 -80
  120. package/dist/chunks/chunk-VDG7LTYE.ts.map +0 -7
  121. package/dist/chunks/chunk-X4NMONPE.ts +0 -73
  122. package/dist/chunks/chunk-X4NMONPE.ts.map +0 -7
  123. package/dist/chunks/chunk-YPJEN6NU.ts +0 -65
  124. package/dist/chunks/chunk-YPJEN6NU.ts.map +0 -7
  125. package/dist/chunks/chunk-YU53SHA7.ts +0 -328
  126. package/dist/chunks/chunk-YU53SHA7.ts.map +0 -7
  127. package/dist/chunks/completion-delivery-RSJU6BXL.ts +0 -17
  128. package/dist/chunks/completion-delivery-RSJU6BXL.ts.map +0 -7
  129. package/dist/chunks/config-status-FKGDECZ3.ts +0 -35
  130. package/dist/chunks/config-status-FKGDECZ3.ts.map +0 -7
  131. package/dist/chunks/config-ui-ABHYNGQ7.ts +0 -1212
  132. package/dist/chunks/config-ui-ABHYNGQ7.ts.map +0 -7
  133. package/dist/chunks/consult-LJU3IQY5.ts +0 -519
  134. package/dist/chunks/consult-LJU3IQY5.ts.map +0 -7
  135. package/dist/chunks/context-QDKLVQXE.ts +0 -11
  136. package/dist/chunks/context-QDKLVQXE.ts.map +0 -7
  137. package/dist/chunks/create-stateful-transport-JWC2EFYL.ts +0 -130
  138. package/dist/chunks/create-stateful-transport-JWC2EFYL.ts.map +0 -7
  139. package/dist/chunks/cwd-policy-NB6XZ5GF.ts +0 -17
  140. package/dist/chunks/cwd-policy-NB6XZ5GF.ts.map +0 -7
  141. package/dist/chunks/delegation-contract-LA56I5DT.ts +0 -24
  142. package/dist/chunks/delegation-contract-LA56I5DT.ts.map +0 -7
  143. package/dist/chunks/discovery-MIFB2U4Y.ts +0 -12
  144. package/dist/chunks/discovery-MIFB2U4Y.ts.map +0 -7
  145. package/dist/chunks/execution-Q2JZLKJA.ts +0 -4037
  146. package/dist/chunks/execution-Q2JZLKJA.ts.map +0 -7
  147. package/dist/chunks/in-process-transport-HJ6TZXC3.ts +0 -39
  148. package/dist/chunks/in-process-transport-HJ6TZXC3.ts.map +0 -7
  149. package/dist/chunks/inspect-UH2TKH6E.ts +0 -634
  150. package/dist/chunks/inspect-UH2TKH6E.ts.map +0 -7
  151. package/dist/chunks/peer-communication-KL36Z6CO.ts +0 -294
  152. package/dist/chunks/peer-communication-KL36Z6CO.ts.map +0 -7
  153. package/dist/chunks/persistence-UY3PY6E5.ts +0 -348
  154. package/dist/chunks/persistence-UY3PY6E5.ts.map +0 -7
  155. package/dist/chunks/registry-BT54L6CY.ts +0 -1445
  156. package/dist/chunks/registry-BT54L6CY.ts.map +0 -7
  157. package/dist/chunks/retained-semantic-state-GM75FZGE.ts +0 -81
  158. package/dist/chunks/retained-semantic-state-GM75FZGE.ts.map +0 -7
  159. package/dist/chunks/rpc-transport-7R7DVCEB.ts +0 -1222
  160. package/dist/chunks/rpc-transport-7R7DVCEB.ts.map +0 -7
  161. package/dist/chunks/runtime-policy-5YELCOVC.ts +0 -15
  162. package/dist/chunks/runtime-policy-5YELCOVC.ts.map +0 -7
  163. package/dist/chunks/semantic-snapshot-WPJ3UAFW.ts +0 -19
  164. package/dist/chunks/semantic-snapshot-WPJ3UAFW.ts.map +0 -7
  165. package/dist/chunks/spawn-idempotency-BNHOSMZW.ts +0 -13
  166. package/dist/chunks/spawn-idempotency-BNHOSMZW.ts.map +0 -7
  167. package/dist/chunks/stateful-lifecycle-JAR6K55H.ts +0 -15
  168. package/dist/chunks/stateful-lifecycle-JAR6K55H.ts.map +0 -7
  169. package/dist/chunks/subprocess-transport-VHZJRBTW.ts +0 -160
  170. package/dist/chunks/subprocess-transport-VHZJRBTW.ts.map +0 -7
  171. package/dist/chunks/usage-recording-store-CW3EH2SZ.ts +0 -164
  172. package/dist/chunks/usage-recording-store-CW3EH2SZ.ts.map +0 -7
  173. package/dist/chunks/workspace-WDKLN72J.ts +0 -11
  174. package/dist/chunks/workspace-WDKLN72J.ts.map +0 -7
  175. package/docs/async-runtime-protocol.md +0 -84
  176. package/docs/implementation-notes/pi-subagents-capability-matrix.md +0 -62
  177. package/docs/implementation-notes/pi-subagents-current-direction.md +0 -99
  178. package/docs/implementation-notes/pi-subagents-rpc-v1.md +0 -153
  179. package/docs/pi-subagents-diagrams.md +0 -183
  180. package/src/adaptive-scheduler.ts +0 -224
  181. package/src/admission-benchmark.ts +0 -95
  182. package/src/admission-policy.ts +0 -78
  183. package/src/agent-projection.ts +0 -53
  184. package/src/agents/built-ins.ts +0 -71
  185. package/src/agents/catalog.ts +0 -241
  186. package/src/agents/discovery.ts +0 -265
  187. package/src/agents/types.ts +0 -100
  188. package/src/agents.ts +0 -51
  189. package/src/async-subagent-benchmark.ts +0 -532
  190. package/src/auto-transport.ts +0 -121
  191. package/src/blocking-status.ts +0 -63
  192. package/src/cached-module-loader.ts +0 -18
  193. package/src/capabilities.ts +0 -145
  194. package/src/capability-grant.ts +0 -115
  195. package/src/capability-router.ts +0 -107
  196. package/src/child-peer-bridge.ts +0 -124
  197. package/src/child-peer-tools.ts +0 -132
  198. package/src/completion-delivery.ts +0 -409
  199. package/src/completion-render.ts +0 -190
  200. package/src/completion-requirement.ts +0 -479
  201. package/src/completion-routing.ts +0 -24
  202. package/src/config-registration.ts +0 -114
  203. package/src/config-status.ts +0 -217
  204. package/src/config-ui.ts +0 -983
  205. package/src/consult-policy.ts +0 -15
  206. package/src/consult-registration.ts +0 -125
  207. package/src/consult-render.ts +0 -194
  208. package/src/consult-resources.ts +0 -51
  209. package/src/consult-tool.ts +0 -95
  210. package/src/consult.ts +0 -566
  211. package/src/context.ts +0 -126
  212. package/src/create-stateful-transport.ts +0 -157
  213. package/src/cwd-policy.ts +0 -183
  214. package/src/delegation-contract.ts +0 -463
  215. package/src/execution/budget.ts +0 -56
  216. package/src/execution/runtime-policy.ts +0 -19
  217. package/src/execution-plan.ts +0 -322
  218. package/src/execution-ui.ts +0 -259
  219. package/src/execution.ts +0 -1679
  220. package/src/in-process-transport.ts +0 -941
  221. package/src/inspect-registration.ts +0 -64
  222. package/src/inspect-render.ts +0 -334
  223. package/src/inspect-tool.ts +0 -45
  224. package/src/inspect.ts +0 -769
  225. package/src/integration-controller.ts +0 -98
  226. package/src/limits.ts +0 -75
  227. package/src/orchestration-metrics.ts +0 -116
  228. package/src/outcome.ts +0 -61
  229. package/src/panel-child-group.ts +0 -35
  230. package/src/panel-contract.ts +0 -343
  231. package/src/panel-evidence.ts +0 -59
  232. package/src/panel-execution.ts +0 -769
  233. package/src/panel-failure.ts +0 -56
  234. package/src/panel-planning.ts +0 -175
  235. package/src/panel-presets.ts +0 -3
  236. package/src/panel-prompts.ts +0 -132
  237. package/src/panel-reconciliation.ts +0 -57
  238. package/src/panel-render.ts +0 -103
  239. package/src/parallel-limit-ui.ts +0 -113
  240. package/src/params.ts +0 -278
  241. package/src/peer-communication.ts +0 -352
  242. package/src/peer-transport.ts +0 -49
  243. package/src/persistence.ts +0 -522
  244. package/src/pi-args.ts +0 -43
  245. package/src/pi-invocation.ts +0 -168
  246. package/src/process-control.ts +0 -43
  247. package/src/prompt-resources.ts +0 -38
  248. package/src/prompt-source-safety.ts +0 -48
  249. package/src/protocol.ts +0 -76
  250. package/src/registry-types.ts +0 -204
  251. package/src/registry.ts +0 -1698
  252. package/src/render-common.ts +0 -252
  253. package/src/render.ts +0 -704
  254. package/src/result-contract.ts +0 -431
  255. package/src/retained-semantic-state.ts +0 -100
  256. package/src/rpc-timeout-finalization.ts +0 -207
  257. package/src/rpc-transport-metadata.ts +0 -65
  258. package/src/rpc-transport.ts +0 -1035
  259. package/src/rpc-turn-capture.ts +0 -217
  260. package/src/runner-outcome.ts +0 -31
  261. package/src/runner-result.ts +0 -55
  262. package/src/runner-types.ts +0 -102
  263. package/src/runner-usage.ts +0 -48
  264. package/src/runner.ts +0 -866
  265. package/src/safe-text.ts +0 -67
  266. package/src/semantic-snapshot.ts +0 -214
  267. package/src/session-guidance-contract.ts +0 -399
  268. package/src/settings/inspection.ts +0 -302
  269. package/src/settings/schema.ts +0 -195
  270. package/src/settings-reader.ts +0 -215
  271. package/src/settings.ts +0 -452
  272. package/src/spawn-idempotency.ts +0 -68
  273. package/src/stateful-agent-view.ts +0 -85
  274. package/src/stateful-config.ts +0 -13
  275. package/src/stateful-guidance.ts +0 -29
  276. package/src/stateful-lifecycle.ts +0 -74
  277. package/src/stateful-limit-ui.ts +0 -249
  278. package/src/stateful-limits.ts +0 -96
  279. package/src/stateful-prompt.ts +0 -49
  280. package/src/stateful-registration.ts +0 -1320
  281. package/src/stateful-render.ts +0 -318
  282. package/src/stateful-safety.ts +0 -47
  283. package/src/stateful-tool-params.ts +0 -215
  284. package/src/stateful.ts +0 -12
  285. package/src/subagent-details.ts +0 -43
  286. package/src/subagents-extension.ts +0 -355
  287. package/src/subprocess-transport.ts +0 -145
  288. package/src/supervision.ts +0 -104
  289. package/src/task-path.ts +0 -65
  290. package/src/timeout-checkpoint.ts +0 -305
  291. package/src/timeout-finalization.ts +0 -75
  292. package/src/tool-schema-compatibility.ts +0 -73
  293. package/src/transport-types.ts +0 -74
  294. package/src/transport-ui.ts +0 -135
  295. package/src/transport.ts +0 -43
  296. package/src/turn-budget.ts +0 -109
  297. package/src/usage-format.ts +0 -42
  298. package/src/usage-recording-config.ts +0 -13
  299. package/src/usage-recording-store.ts +0 -183
  300. package/src/usage-recording.ts +0 -478
  301. package/src/verification-harness.ts +0 -516
  302. package/src/verification-policy.ts +0 -67
  303. package/src/verification-receipt.ts +0 -275
  304. package/src/verified-execution-benchmark.ts +0 -86
  305. package/src/verified-execution-contract.ts +0 -191
  306. package/src/verified-execution-schema.ts +0 -32
  307. package/src/work-item-ledger.ts +0 -1404
  308. package/src/work-item-persistence.ts +0 -254
  309. package/src/workflow-completion-controller.ts +0 -397
  310. package/src/workflow-planning.ts +0 -172
  311. package/src/workflow-tree-identity.ts +0 -289
  312. package/src/workflow-ui.ts +0 -69
  313. package/src/workflow-verification.ts +0 -296
  314. package/src/workspace.ts +0 -174
package/src/agents.ts DELETED
@@ -1,51 +0,0 @@
1
- /**
2
- * Compatibility facade for the former mixed agent module.
3
- *
4
- * New source modules should import from the cohesive agent boundaries directly.
5
- * Keep this facade while tests and supported internal entrypoints still depend on the old path.
6
- */
7
-
8
- export { getBuiltInAgent } from "./agents/built-ins.js";
9
- export {
10
- type AgentCatalog,
11
- type AgentCatalogFormatOptions,
12
- type AgentCatalogFormatResult,
13
- DEFAULT_AGENT_CATALOG_MAX_CHARACTERS,
14
- DEFAULT_AGENT_CATALOG_MAX_DESCRIPTION_LENGTH,
15
- DEFAULT_AGENT_CATALOG_MAX_FILE_BYTES,
16
- DEFAULT_AGENT_CATALOG_MAX_FILES_PER_SCOPE,
17
- DEFAULT_AGENT_CATALOG_MAX_ITEMS,
18
- DEFAULT_AGENT_CATALOG_MAX_TOTAL_BYTES_PER_SCOPE,
19
- discoverAgentCatalog,
20
- formatAgentCatalog,
21
- formatAgentList,
22
- } from "./agents/catalog.js";
23
- export {
24
- type AgentDiscoveryOptions,
25
- type AgentDiscoveryResult,
26
- discoverAgents,
27
- } from "./agents/discovery.js";
28
- export {
29
- type AgentConfig,
30
- type AgentScope,
31
- type AgentSource,
32
- CONSULT_RESOURCE_POLICIES,
33
- CONSULTATION_CWD_POLICIES,
34
- type CompletionDelivery,
35
- type ConsultationCwdPolicy,
36
- type ConsultResourcePolicy,
37
- DEFAULT_PI_TOOL_NAMES,
38
- DELEGATION_CWD_POLICIES,
39
- type DelegationCwdPolicy,
40
- isThinkingLevel,
41
- resolveAgentToolNames,
42
- type SubagentAgentConfig,
43
- type SubagentBlockingSettings,
44
- type SubagentConsultSettings,
45
- type SubagentCwdPolicySettings,
46
- type SubagentRuntimeSettings,
47
- type SubagentSettings,
48
- type SubagentThinkingLevel,
49
- type SubagentTransportKind,
50
- THINKING_LEVELS,
51
- } from "./agents/types.js";
@@ -1,532 +0,0 @@
1
- export const ASYNC_SUBAGENT_BENCHMARK_VERSION = "pi-subagents:async-surface-benchmark:v1" as const;
2
-
3
- export const BENCHMARK_RESULT_PREFIX = "BENCHMARK_RESULT_JSON:";
4
- export const BENCHMARK_MODES = ["quick", "extended"] as const;
5
- export const BENCHMARK_ARMS = ["sync", "async"] as const;
6
- export const BENCHMARK_THINKING_LEVELS = [
7
- "off",
8
- "minimal",
9
- "low",
10
- "medium",
11
- "high",
12
- "xhigh",
13
- "max",
14
- ] as const;
15
-
16
- export type AsyncSubagentBenchmarkMode = (typeof BENCHMARK_MODES)[number];
17
- export type AsyncSubagentBenchmarkArm = (typeof BENCHMARK_ARMS)[number];
18
- export type AsyncSubagentBenchmarkThinkingLevel = (typeof BENCHMARK_THINKING_LEVELS)[number];
19
- export type AsyncSubagentTerminalOutcome =
20
- | "completed"
21
- | "invalid-output"
22
- | "timed-out"
23
- | "readiness-timeout"
24
- | "process-error"
25
- | "protocol-error";
26
-
27
- export const FIXED_BENCHMARK_TASK = [
28
- "Inspect only packages/pi-subagents/src/registry.ts, packages/pi-subagents/src/completion-delivery.ts, and packages/pi-subagents/src/stateful-registration.ts.",
29
- "Report what AgentRegistry.wait races, how completion IDs prevent duplicate delivery, and which session hook closes retained completion delivery state.",
30
- "Cite each finding with its repository-relative source path and exact symbol or operation.",
31
- "Do not modify files.",
32
- ].join("\n");
33
-
34
- export const FIXED_EVIDENCE_RUBRIC = [
35
- {
36
- id: "registry-wait-race",
37
- terms: ["packages/pi-subagents/src/registry.ts", "promise.race"],
38
- },
39
- {
40
- id: "completion-id-deduplication",
41
- terms: ["packages/pi-subagents/src/completion-delivery.ts", "completionid"],
42
- },
43
- {
44
- id: "session-shutdown-cleanup",
45
- terms: ["packages/pi-subagents/src/stateful-registration.ts", "session_shutdown"],
46
- },
47
- ] as const;
48
-
49
- export interface AsyncSubagentBenchmarkOptions {
50
- mode: AsyncSubagentBenchmarkMode;
51
- model: string;
52
- thinkingLevel: AsyncSubagentBenchmarkThinkingLevel;
53
- timeoutMs: number;
54
- readinessTimeoutMs: number;
55
- outputPath?: string;
56
- run: boolean;
57
- piCommand: string;
58
- workspace?: string;
59
- extension?: string;
60
- }
61
-
62
- export interface AsyncSubagentBenchmarkTrialPlan {
63
- pairIndex: number;
64
- orderIndex: number;
65
- arm: AsyncSubagentBenchmarkArm;
66
- }
67
-
68
- export interface AsyncSubagentEventAnalysis {
69
- completionObserved: boolean;
70
- evidenceScore: number;
71
- matchedEvidence: string[];
72
- prematureFinalCount: number;
73
- finalAnswer?: string;
74
- resultMarker?: Record<string, unknown>;
75
- }
76
-
77
- export interface AsyncSubagentBenchmarkTrialRecord extends AsyncSubagentEventAnalysis {
78
- version: typeof ASYNC_SUBAGENT_BENCHMARK_VERSION;
79
- pairIndex: number;
80
- orderIndex: number;
81
- arm: AsyncSubagentBenchmarkArm;
82
- outcome: AsyncSubagentTerminalOutcome;
83
- readinessMs: number;
84
- elapsedMs: number;
85
- cost: number | null;
86
- startedAt: string;
87
- completedAt: string;
88
- events: unknown[];
89
- stderr?: string;
90
- error?: string;
91
- }
92
-
93
- export interface DistributionSummary {
94
- median: number;
95
- p95: number;
96
- }
97
-
98
- export interface AsyncSubagentArmSummary {
99
- trials: number;
100
- completionCoverage: number;
101
- evidenceScore: number;
102
- prematureFinalCount: number;
103
- terminalOutcomes: Record<AsyncSubagentTerminalOutcome, number>;
104
- latencyMs: DistributionSummary | null;
105
- cost: {
106
- available: number;
107
- total: number;
108
- median: number;
109
- p95: number;
110
- } | null;
111
- }
112
-
113
- export interface AsyncSubagentBenchmarkSummary {
114
- version: typeof ASYNC_SUBAGENT_BENCHMARK_VERSION;
115
- pairs: number;
116
- arms: Record<AsyncSubagentBenchmarkArm, AsyncSubagentArmSummary>;
117
- }
118
-
119
- export class BenchmarkDeadlineError extends Error {
120
- constructor(message: string) {
121
- super(message);
122
- this.name = "BenchmarkDeadlineError";
123
- }
124
- }
125
-
126
- export function parseAsyncSubagentBenchmarkArgs(
127
- args: readonly string[],
128
- ): AsyncSubagentBenchmarkOptions {
129
- let mode: AsyncSubagentBenchmarkMode = "quick";
130
- let model = "";
131
- let thinkingLevel: AsyncSubagentBenchmarkThinkingLevel = "medium";
132
- let timeoutMs = 120_000;
133
- let readinessTimeoutMs = 15_000;
134
- let outputPath: string | undefined;
135
- let run = false;
136
- let piCommand = "pi";
137
- let workspace: string | undefined;
138
- let extension: string | undefined;
139
-
140
- for (let index = 0; index < args.length; index++) {
141
- const argument = args[index];
142
- if (argument === "--run") {
143
- run = true;
144
- continue;
145
- }
146
- const value = args[index + 1];
147
- if (!value || value.startsWith("--")) throw new Error(`${argument} requires a value`);
148
- index++;
149
- switch (argument) {
150
- case "--mode":
151
- if (!isOneOf(value, BENCHMARK_MODES)) throw new Error("--mode must be quick or extended");
152
- mode = value;
153
- break;
154
- case "--model":
155
- model = value.trim();
156
- break;
157
- case "--thinking":
158
- if (!isOneOf(value, BENCHMARK_THINKING_LEVELS)) {
159
- throw new Error(`Unsupported thinking level: ${value}`);
160
- }
161
- thinkingLevel = value;
162
- break;
163
- case "--timeout-ms":
164
- timeoutMs = positiveInteger(value, "--timeout-ms");
165
- break;
166
- case "--readiness-timeout-ms":
167
- readinessTimeoutMs = positiveInteger(value, "--readiness-timeout-ms");
168
- break;
169
- case "--output":
170
- outputPath = value;
171
- break;
172
- case "--pi":
173
- piCommand = value;
174
- break;
175
- case "--workspace":
176
- workspace = value;
177
- break;
178
- case "--extension":
179
- extension = value;
180
- break;
181
- default:
182
- throw new Error(`Unknown benchmark argument: ${argument}`);
183
- }
184
- }
185
- if (!model) throw new Error("--model is required so every paired trial uses one fixed model");
186
- if (run && !outputPath) throw new Error("--output is required with --run");
187
- return {
188
- mode,
189
- model,
190
- thinkingLevel,
191
- timeoutMs,
192
- readinessTimeoutMs,
193
- outputPath,
194
- run,
195
- piCommand,
196
- ...(workspace ? { workspace } : {}),
197
- ...(extension ? { extension } : {}),
198
- };
199
- }
200
-
201
- export function benchmarkPairCount(mode: AsyncSubagentBenchmarkMode): number {
202
- return mode === "quick" ? 3 : 10;
203
- }
204
-
205
- export function createAlternatingTrialPlan(
206
- mode: AsyncSubagentBenchmarkMode,
207
- ): AsyncSubagentBenchmarkTrialPlan[] {
208
- const trials: AsyncSubagentBenchmarkTrialPlan[] = [];
209
- for (let pairIndex = 0; pairIndex < benchmarkPairCount(mode); pairIndex++) {
210
- const order: readonly AsyncSubagentBenchmarkArm[] =
211
- pairIndex % 2 === 0 ? ["sync", "async"] : ["async", "sync"];
212
- for (const [orderIndex, arm] of order.entries()) {
213
- trials.push({ pairIndex, orderIndex, arm });
214
- }
215
- }
216
- return trials;
217
- }
218
-
219
- export function buildAsyncSubagentBenchmarkPrompt(
220
- arm: AsyncSubagentBenchmarkArm,
221
- thinkingLevel: AsyncSubagentBenchmarkThinkingLevel = "medium",
222
- ): string {
223
- const orchestration =
224
- arm === "sync"
225
- ? [
226
- "Use the deprecated subagent tool in single mode exactly once with agent explorer.",
227
- `Set thinkingLevel to ${thinkingLevel}, pass the fixed task below, and wait for the blocking result.`,
228
- ]
229
- : [
230
- "Use subagent_spawn exactly once with agent explorer, context none, and completionRequirement required.",
231
- `Set thinkingLevel to ${thinkingLevel}, continue only useful non-overlapping local work, and rely on automatic completion delivery without calling any blocking or inspection tool.`,
232
- "Do not provide the benchmark result before the retained completion is visible or terminal.",
233
- ];
234
- return [
235
- "This is a non-interactive paired benchmark.",
236
- ...orchestration,
237
- "Use the configured model without changing it.",
238
- "Fixed child task:",
239
- FIXED_BENCHMARK_TASK,
240
- "After observing the child result, answer concisely with all three requested findings.",
241
- `End with one single-line marker in this exact form: ${BENCHMARK_RESULT_PREFIX} {"complete":true}`,
242
- ].join("\n\n");
243
- }
244
-
245
- export function parseBenchmarkJsonLines(source: string): unknown[] {
246
- const values: unknown[] = [];
247
- for (const [index, rawLine] of source.split("\n").entries()) {
248
- const line = rawLine.endsWith("\r") ? rawLine.slice(0, -1) : rawLine;
249
- if (!line) continue;
250
- try {
251
- values.push(JSON.parse(line));
252
- } catch {
253
- throw new Error(`Invalid benchmark JSONL at line ${index + 1}`);
254
- }
255
- }
256
- return values;
257
- }
258
-
259
- export function analyzeBenchmarkEvents(
260
- arm: AsyncSubagentBenchmarkArm,
261
- events: readonly unknown[],
262
- ): AsyncSubagentEventAnalysis {
263
- let completionIndex = -1;
264
- let spawnObserved = false;
265
- let prematureFinalCount = 0;
266
- let finalAnswer: string | undefined;
267
- let resultMarker: Record<string, unknown> | undefined;
268
- let finalIndex = -1;
269
-
270
- for (const [index, value] of events.entries()) {
271
- if (!isRecord(value)) continue;
272
- const message =
273
- value.type === "message_end" && isRecord(value.message) ? value.message : undefined;
274
- if (!message) continue;
275
- if (message.role === "custom" && message.customType === "pi-subagent-completion") {
276
- if (completionIndex < 0) completionIndex = index;
277
- continue;
278
- }
279
- if (message.role === "toolResult") {
280
- const toolName = typeof message.toolName === "string" ? message.toolName : "";
281
- const details = isRecord(message.details) ? message.details : undefined;
282
- if (toolName === "subagent_spawn" && message.isError !== true) spawnObserved = true;
283
- if (
284
- message.isError !== true &&
285
- details?.timedOut !== true &&
286
- ((arm === "sync" && toolName === "subagent") ||
287
- (arm === "async" && toolName === "subagent_await"))
288
- ) {
289
- if (completionIndex < 0) completionIndex = index;
290
- }
291
- continue;
292
- }
293
- if (message.role !== "assistant") continue;
294
- const content = Array.isArray(message.content) ? message.content : [];
295
- const hasToolCall = content.some(
296
- (item) => isRecord(item) && item.type === "toolCall" && typeof item.name === "string",
297
- );
298
- if (
299
- content.some(
300
- (item) => isRecord(item) && item.type === "toolCall" && item.name === "subagent_spawn",
301
- )
302
- ) {
303
- spawnObserved = true;
304
- }
305
- const text = messageText(message);
306
- const marker = extractResultMarker(text);
307
- if (marker) {
308
- if (arm === "async" && spawnObserved && completionIndex < 0) prematureFinalCount++;
309
- finalAnswer = text;
310
- resultMarker = marker;
311
- finalIndex = index;
312
- } else if (
313
- arm === "async" &&
314
- spawnObserved &&
315
- completionIndex < 0 &&
316
- text.trim() &&
317
- !hasToolCall &&
318
- scoreBenchmarkEvidence(text).score > 0
319
- ) {
320
- prematureFinalCount++;
321
- }
322
- }
323
-
324
- const score = scoreBenchmarkEvidence(finalAnswer ?? "");
325
- return {
326
- completionObserved: completionIndex >= 0 && (finalIndex < 0 || completionIndex < finalIndex),
327
- evidenceScore: score.score,
328
- matchedEvidence: score.matched,
329
- prematureFinalCount,
330
- ...(finalAnswer ? { finalAnswer } : {}),
331
- ...(resultMarker ? { resultMarker } : {}),
332
- };
333
- }
334
-
335
- export function scoreBenchmarkEvidence(text: string): { score: number; matched: string[] } {
336
- const normalized = text.toLowerCase().replaceAll("`", "");
337
- const matched = FIXED_EVIDENCE_RUBRIC.filter((item) =>
338
- item.terms.every((term) => normalized.includes(term.toLowerCase())),
339
- ).map((item) => item.id);
340
- return {
341
- score: round(matched.length / FIXED_EVIDENCE_RUBRIC.length),
342
- matched,
343
- };
344
- }
345
-
346
- export function percentile(values: readonly number[], quantile: number): number {
347
- if (values.length === 0) throw new Error("Cannot calculate a percentile without values");
348
- if (!Number.isFinite(quantile) || quantile < 0 || quantile > 1) {
349
- throw new Error("Percentile quantile must be between zero and one");
350
- }
351
- const sorted = [...values].sort((left, right) => left - right);
352
- const position = (sorted.length - 1) * quantile;
353
- const lower = Math.floor(position);
354
- const upper = Math.ceil(position);
355
- if (lower === upper) return round(sorted[lower]);
356
- return round(sorted[lower] + (sorted[upper] - sorted[lower]) * (position - lower));
357
- }
358
-
359
- export function summarizeAsyncSubagentBenchmark(
360
- records: readonly AsyncSubagentBenchmarkTrialRecord[],
361
- ): AsyncSubagentBenchmarkSummary {
362
- const summarizeArm = (arm: AsyncSubagentBenchmarkArm): AsyncSubagentArmSummary => {
363
- const selected = records.filter((record) => record.arm === arm);
364
- const completed = selected.filter((record) => record.outcome === "completed");
365
- const costs = selected.flatMap((record) => (record.cost === null ? [] : [record.cost]));
366
- const terminalOutcomes = emptyTerminalOutcomes();
367
- for (const record of selected) terminalOutcomes[record.outcome]++;
368
- return {
369
- trials: selected.length,
370
- completionCoverage:
371
- selected.length === 0
372
- ? 0
373
- : round(selected.filter((record) => record.completionObserved).length / selected.length),
374
- evidenceScore:
375
- selected.length === 0
376
- ? 0
377
- : round(
378
- selected.reduce((sum, record) => sum + record.evidenceScore, 0) / selected.length,
379
- ),
380
- prematureFinalCount: selected.reduce((sum, record) => sum + record.prematureFinalCount, 0),
381
- terminalOutcomes,
382
- latencyMs:
383
- completed.length === 0
384
- ? null
385
- : {
386
- median: percentile(
387
- completed.map((record) => record.elapsedMs),
388
- 0.5,
389
- ),
390
- p95: percentile(
391
- completed.map((record) => record.elapsedMs),
392
- 0.95,
393
- ),
394
- },
395
- cost:
396
- costs.length === 0
397
- ? null
398
- : {
399
- available: costs.length,
400
- total: round(costs.reduce((sum, value) => sum + value, 0)),
401
- median: percentile(costs, 0.5),
402
- p95: percentile(costs, 0.95),
403
- },
404
- };
405
- };
406
- return {
407
- version: ASYNC_SUBAGENT_BENCHMARK_VERSION,
408
- pairs: new Set(records.map((record) => record.pairIndex)).size,
409
- arms: { sync: summarizeArm("sync"), async: summarizeArm("async") },
410
- };
411
- }
412
-
413
- export async function runAfterReadinessWithDeadline<T>(
414
- readiness: Promise<unknown>,
415
- run: () => Promise<T>,
416
- timeoutMs: number,
417
- ): Promise<T> {
418
- await readiness;
419
- return await withDeadline(run(), timeoutMs, "Benchmark trial timed out");
420
- }
421
-
422
- export async function withDeadline<T>(
423
- operation: Promise<T>,
424
- timeoutMs: number,
425
- message: string,
426
- ): Promise<T> {
427
- if (!Number.isFinite(timeoutMs) || timeoutMs < 1) throw new Error("Deadline must be positive");
428
- let timer: NodeJS.Timeout | undefined;
429
- try {
430
- return await Promise.race([
431
- operation,
432
- new Promise<never>((_resolve, reject) => {
433
- timer = setTimeout(() => reject(new BenchmarkDeadlineError(message)), timeoutMs);
434
- }),
435
- ]);
436
- } finally {
437
- if (timer) clearTimeout(timer);
438
- }
439
- }
440
-
441
- export function redactBenchmarkValue(value: unknown): unknown {
442
- return redactValue(value, new WeakSet<object>());
443
- }
444
-
445
- function extractResultMarker(text: string): Record<string, unknown> | undefined {
446
- for (const line of text.split("\n").reverse()) {
447
- const markerIndex = line.indexOf(BENCHMARK_RESULT_PREFIX);
448
- if (markerIndex < 0) continue;
449
- const source = line.slice(markerIndex + BENCHMARK_RESULT_PREFIX.length).trim();
450
- try {
451
- const parsed: unknown = JSON.parse(source);
452
- if (isRecord(parsed) && parsed.complete === true) return parsed;
453
- } catch {
454
- return undefined;
455
- }
456
- }
457
- return undefined;
458
- }
459
-
460
- function messageText(message: Record<string, unknown>): string {
461
- if (typeof message.content === "string") return message.content;
462
- if (!Array.isArray(message.content)) return "";
463
- return message.content
464
- .flatMap((item) =>
465
- isRecord(item) && item.type === "text" && typeof item.text === "string" ? [item.text] : [],
466
- )
467
- .join("\n");
468
- }
469
-
470
- function emptyTerminalOutcomes(): Record<AsyncSubagentTerminalOutcome, number> {
471
- return {
472
- completed: 0,
473
- "invalid-output": 0,
474
- "timed-out": 0,
475
- "readiness-timeout": 0,
476
- "process-error": 0,
477
- "protocol-error": 0,
478
- };
479
- }
480
-
481
- function redactValue(value: unknown, seen: WeakSet<object>): unknown {
482
- if (typeof value === "string") return redactString(value);
483
- if (Array.isArray(value)) return value.map((item) => redactValue(item, seen));
484
- if (!isRecord(value)) return value;
485
- if (seen.has(value)) return "[circular]";
486
- seen.add(value);
487
- const redacted: Record<string, unknown> = {};
488
- for (const [key, item] of Object.entries(value)) {
489
- redacted[key] = sensitiveKey(key) ? "[redacted]" : redactValue(item, seen);
490
- }
491
- return redacted;
492
- }
493
-
494
- function redactString(value: string): string {
495
- const home = process.env.HOME;
496
- let redacted = value.replace(/<private>[\s\S]*?<\/private>/giu, "[private content omitted]");
497
- redacted = redacted.replace(/\bBearer\s+[A-Za-z0-9._~+/-]+=*/giu, "Bearer [redacted]");
498
- redacted = redacted.replace(/\b(sk-[A-Za-z0-9_-]{12,})\b/gu, "[redacted-key]");
499
- redacted = redacted.replace(
500
- /\b([A-Z][A-Z0-9_]*(?:TOKEN|SECRET|PASSWORD|API_KEY))=([^\s]+)/gu,
501
- "$1=[redacted]",
502
- );
503
- if (home) redacted = redacted.split(home).join("$HOME");
504
- const limit = 16 * 1024;
505
- return redacted.length <= limit ? redacted : `${redacted.slice(0, limit)}\n[truncated]`;
506
- }
507
-
508
- function sensitiveKey(key: string): boolean {
509
- return /^(?:authorization|api[-_]?key|token|secret|password|headers|environment|env)$/iu.test(
510
- key,
511
- );
512
- }
513
-
514
- function positiveInteger(value: string, name: string): number {
515
- const parsed = Number(value);
516
- if (!Number.isSafeInteger(parsed) || parsed < 1 || parsed > 2_147_483_647) {
517
- throw new Error(`${name} must be a positive integer`);
518
- }
519
- return parsed;
520
- }
521
-
522
- function isRecord(value: unknown): value is Record<string, unknown> {
523
- return typeof value === "object" && value !== null && !Array.isArray(value);
524
- }
525
-
526
- function isOneOf<const T extends readonly string[]>(value: string, values: T): value is T[number] {
527
- return values.includes(value);
528
- }
529
-
530
- function round(value: number): number {
531
- return Number(value.toFixed(3));
532
- }
@@ -1,121 +0,0 @@
1
- import { discoverAgents } from "./agents/discovery.js";
2
- import type { SubagentSettings } from "./agents/types.js";
3
- import type { AgentMailboxMessage, ManagedAgent, TurnOutcome } from "./registry.js";
4
- import { isWriteCapable } from "./stateful-safety.js";
5
- import type { SubagentTransport } from "./transport.js";
6
- import type {
7
- EffectiveSubagentTransportKind,
8
- TransportProgressCallback,
9
- } from "./transport-types.js";
10
-
11
- const BUILT_IN_TOOL_NAMES = new Set(["read", "bash", "edit", "write", "grep", "find", "ls"]);
12
-
13
- export interface AutoTransportOptions {
14
- subprocess: SubagentTransport;
15
- inProcess: SubagentTransport;
16
- rpc: SubagentTransport;
17
- getSettings?: () => SubagentSettings | undefined;
18
- }
19
-
20
- export interface AutoTransportSelection {
21
- kind: EffectiveSubagentTransportKind;
22
- reason: string;
23
- }
24
-
25
- export class AutoTransport implements SubagentTransport {
26
- readonly kind = "auto" as const;
27
- private readonly selections = new Map<string, AutoTransportSelection>();
28
-
29
- constructor(private readonly options: AutoTransportOptions) {}
30
-
31
- async runTurn(
32
- agent: ManagedAgent,
33
- task: string,
34
- signal: AbortSignal,
35
- onProgress?: TransportProgressCallback,
36
- ): Promise<TurnOutcome> {
37
- const selection = this.selections.get(agent.id) ?? this.select(agent);
38
- this.selections.set(agent.id, selection);
39
- const transport = this.transport(selection.kind);
40
- const outcome = await transport.runTurn(agent, task, signal, (progress) =>
41
- onProgress?.({ ...progress, selectionReason: selection.reason }),
42
- );
43
- return {
44
- ...outcome,
45
- telemetry: outcome.telemetry
46
- ? { ...outcome.telemetry, selectionReason: selection.reason }
47
- : outcome.telemetry,
48
- };
49
- }
50
-
51
- async deliverMessage(agent: ManagedAgent, message: AgentMailboxMessage): Promise<boolean> {
52
- const selection = this.selections.get(agent.id);
53
- if (!selection) return false;
54
- return this.transport(selection.kind).deliverMessage?.(agent, message) ?? false;
55
- }
56
-
57
- async release(agent: ManagedAgent): Promise<void> {
58
- const selection = this.selections.get(agent.id);
59
- this.selections.delete(agent.id);
60
- if (selection) await this.transport(selection.kind).release?.(agent);
61
- }
62
-
63
- async shutdown(): Promise<void> {
64
- this.selections.clear();
65
- const transports = [this.options.subprocess, this.options.inProcess, this.options.rpc];
66
- const results = await Promise.allSettled(transports.map((transport) => transport.shutdown?.()));
67
- const failures = results.flatMap((result) =>
68
- result.status === "rejected" ? [result.reason] : [],
69
- );
70
- if (failures.length > 0) {
71
- throw new AggregateError(
72
- failures,
73
- `Failed to shut down ${failures.length} auto transport(s)`,
74
- );
75
- }
76
- }
77
-
78
- selectionFor(agentId: string): AutoTransportSelection | undefined {
79
- const selection = this.selections.get(agentId);
80
- return selection ? { ...selection } : undefined;
81
- }
82
-
83
- private select(agent: ManagedAgent): AutoTransportSelection {
84
- const settings = this.options.getSettings?.();
85
- const config = discoverAgents(agent.cwd, agent.agentScope ?? "user", settings).agents.find(
86
- (candidate) => candidate.name === agent.agent,
87
- );
88
- if (!config) {
89
- throw new Error(`Automatic transport cannot resolve subagent ${agent.agent}`);
90
- }
91
- const effectiveTools = agent.executionPlan?.effectiveTools ?? config.tools;
92
- const unsupported = (effectiveTools ?? []).filter((tool) => !BUILT_IN_TOOL_NAMES.has(tool));
93
- if (unsupported.length > 0) {
94
- return {
95
- kind: "subprocess",
96
- reason: `extension/custom tools require subprocess: ${unsupported.join(", ")}`,
97
- };
98
- }
99
- if (isWriteCapable(effectiveTools)) {
100
- return {
101
- kind: "rpc",
102
- reason: "write-capable built-in tools use a persistent isolated process",
103
- };
104
- }
105
- return {
106
- kind: "in-process",
107
- reason: "read-only built-in tools use the lowest-overhead public SDK session",
108
- };
109
- }
110
-
111
- private transport(kind: EffectiveSubagentTransportKind): SubagentTransport {
112
- switch (kind) {
113
- case "subprocess":
114
- return this.options.subprocess;
115
- case "in-process":
116
- return this.options.inProcess;
117
- case "rpc":
118
- return this.options.rpc;
119
- }
120
- }
121
- }