@inhuman.tools/turn 0.2.0 → 0.3.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 (284) hide show
  1. package/README.md +38 -0
  2. package/dist/agent-calls/acceptance.d.ts +1 -1
  3. package/dist/agent-calls/acceptance.d.ts.map +1 -1
  4. package/dist/agent-calls/acceptance.js +1 -1
  5. package/dist/agent-calls/acceptance.js.map +1 -1
  6. package/dist/agent-calls/callbacks.d.ts +1 -1
  7. package/dist/agent-calls/callbacks.d.ts.map +1 -1
  8. package/dist/agent-calls/callbacks.js +1 -1
  9. package/dist/agent-calls/callbacks.js.map +1 -1
  10. package/dist/agent-calls/delivery.d.ts +1 -1
  11. package/dist/agent-calls/delivery.d.ts.map +1 -1
  12. package/dist/agent-calls/delivery.js +1 -1
  13. package/dist/agent-calls/delivery.js.map +1 -1
  14. package/dist/agent-calls/operator.d.ts +1 -1
  15. package/dist/agent-calls/operator.d.ts.map +1 -1
  16. package/dist/agent-calls/operator.js +1 -1
  17. package/dist/agent-calls/operator.js.map +1 -1
  18. package/dist/agent-calls/runtime.d.ts +4 -2
  19. package/dist/agent-calls/runtime.d.ts.map +1 -1
  20. package/dist/agent-calls/runtime.js +17 -11
  21. package/dist/agent-calls/runtime.js.map +1 -1
  22. package/dist/agent-calls/types.d.ts +1 -1
  23. package/dist/agent-calls/types.d.ts.map +1 -1
  24. package/dist/context/compact-floors.d.ts +1 -1
  25. package/dist/context/compact-floors.d.ts.map +1 -1
  26. package/dist/context/compact.d.ts +1 -1
  27. package/dist/context/compact.d.ts.map +1 -1
  28. package/dist/context/compact.js +5 -4
  29. package/dist/context/compact.js.map +1 -1
  30. package/dist/context/history.d.ts +1 -1
  31. package/dist/context/history.d.ts.map +1 -1
  32. package/dist/context/history.js +35 -3
  33. package/dist/context/history.js.map +1 -1
  34. package/dist/context/retention/defaults.js +1 -1
  35. package/dist/context/retention/defaults.js.map +1 -1
  36. package/dist/context/retention/resolve.js +1 -1
  37. package/dist/context/retention/resolve.js.map +1 -1
  38. package/dist/context/retention/schema.js +1 -1
  39. package/dist/context/retention/schema.js.map +1 -1
  40. package/dist/context/retention/stamp.d.ts +1 -1
  41. package/dist/context/retention/stamp.d.ts.map +1 -1
  42. package/dist/context/retention/stamp.js +5 -2
  43. package/dist/context/retention/stamp.js.map +1 -1
  44. package/dist/context/retention/step.d.ts +1 -1
  45. package/dist/context/retention/step.d.ts.map +1 -1
  46. package/dist/context/retention/step.js +7 -4
  47. package/dist/context/retention/step.js.map +1 -1
  48. package/dist/context/retention/view.d.ts +1 -1
  49. package/dist/context/retention/view.d.ts.map +1 -1
  50. package/dist/context/retention/view.js +1 -1
  51. package/dist/context/retention/view.js.map +1 -1
  52. package/dist/context/spawn-history.d.ts +13 -0
  53. package/dist/context/spawn-history.d.ts.map +1 -0
  54. package/dist/context/spawn-history.js +82 -0
  55. package/dist/context/spawn-history.js.map +1 -0
  56. package/dist/context/squeeze.d.ts +1 -1
  57. package/dist/context/squeeze.d.ts.map +1 -1
  58. package/dist/context/squeeze.js +1 -1
  59. package/dist/context/squeeze.js.map +1 -1
  60. package/dist/context/tools.d.ts +2 -2
  61. package/dist/context/tools.d.ts.map +1 -1
  62. package/dist/context/tools.js +2 -2
  63. package/dist/context/tools.js.map +1 -1
  64. package/dist/context/transcript.d.ts +3 -1
  65. package/dist/context/transcript.d.ts.map +1 -1
  66. package/dist/context/transcript.js +17 -4
  67. package/dist/context/transcript.js.map +1 -1
  68. package/dist/policy-processor/classifier.d.ts.map +1 -1
  69. package/dist/policy-processor/classifier.js +3 -1
  70. package/dist/policy-processor/classifier.js.map +1 -1
  71. package/dist/policy-processor/scope.d.ts +1 -0
  72. package/dist/policy-processor/scope.d.ts.map +1 -1
  73. package/dist/policy-processor/scope.js +9 -2
  74. package/dist/policy-processor/scope.js.map +1 -1
  75. package/dist/policy-processor/unattended-guard.js +8 -2
  76. package/dist/policy-processor/unattended-guard.js.map +1 -1
  77. package/dist/resources/compact-assets.d.ts +5 -0
  78. package/dist/resources/compact-assets.d.ts.map +1 -0
  79. package/dist/resources/compact-assets.js +6 -0
  80. package/dist/resources/compact-assets.js.map +1 -0
  81. package/dist/resources/compact-snapshot.d.ts +21 -0
  82. package/dist/resources/compact-snapshot.d.ts.map +1 -0
  83. package/dist/resources/compact-snapshot.js +44 -0
  84. package/dist/resources/compact-snapshot.js.map +1 -0
  85. package/dist/resources/index.d.ts +6 -0
  86. package/dist/resources/index.d.ts.map +1 -0
  87. package/dist/resources/index.js +19 -0
  88. package/dist/resources/index.js.map +1 -0
  89. package/dist/resources/module-bundle.d.ts +16 -0
  90. package/dist/resources/module-bundle.d.ts.map +1 -0
  91. package/dist/resources/module-bundle.js +78 -0
  92. package/dist/resources/module-bundle.js.map +1 -0
  93. package/dist/runtime/ambient-compact.d.ts +38 -0
  94. package/dist/runtime/ambient-compact.d.ts.map +1 -0
  95. package/dist/runtime/ambient-compact.js +123 -0
  96. package/dist/runtime/ambient-compact.js.map +1 -0
  97. package/dist/runtime/index.d.ts +9 -0
  98. package/dist/runtime/index.d.ts.map +1 -0
  99. package/dist/runtime/index.js +8 -0
  100. package/dist/runtime/index.js.map +1 -0
  101. package/dist/runtime/ports.d.ts +33 -0
  102. package/dist/runtime/ports.d.ts.map +1 -0
  103. package/dist/runtime/ports.js +2 -0
  104. package/dist/runtime/ports.js.map +1 -0
  105. package/dist/runtime/prompt-message-of.d.ts +4 -0
  106. package/dist/runtime/prompt-message-of.d.ts.map +1 -0
  107. package/dist/runtime/prompt-message-of.js +8 -0
  108. package/dist/runtime/prompt-message-of.js.map +1 -0
  109. package/dist/runtime/re-act-loop-intent-detected-trigger.d.ts +32 -0
  110. package/dist/runtime/re-act-loop-intent-detected-trigger.d.ts.map +1 -0
  111. package/dist/runtime/re-act-loop-intent-detected-trigger.js +132 -0
  112. package/dist/runtime/re-act-loop-intent-detected-trigger.js.map +1 -0
  113. package/dist/runtime/round-boundary.d.ts +13 -0
  114. package/dist/runtime/round-boundary.d.ts.map +1 -0
  115. package/dist/runtime/round-boundary.js +210 -0
  116. package/dist/runtime/round-boundary.js.map +1 -0
  117. package/dist/runtime/round-stop.d.ts +9 -0
  118. package/dist/runtime/round-stop.d.ts.map +1 -0
  119. package/dist/runtime/round-stop.js +19 -0
  120. package/dist/runtime/round-stop.js.map +1 -0
  121. package/dist/runtime/tool-call.d.ts +4 -0
  122. package/dist/runtime/tool-call.d.ts.map +1 -0
  123. package/dist/runtime/tool-call.js +8 -0
  124. package/dist/runtime/tool-call.js.map +1 -0
  125. package/dist/runtime/turn-iterator.d.ts +32 -0
  126. package/dist/runtime/turn-iterator.d.ts.map +1 -0
  127. package/dist/runtime/turn-iterator.js +251 -0
  128. package/dist/runtime/turn-iterator.js.map +1 -0
  129. package/dist/runtime/turn-resolvers.d.ts +17 -0
  130. package/dist/runtime/turn-resolvers.d.ts.map +1 -0
  131. package/dist/runtime/turn-resolvers.js +29 -0
  132. package/dist/runtime/turn-resolvers.js.map +1 -0
  133. package/dist/session/cancel.d.ts +4 -1
  134. package/dist/session/cancel.d.ts.map +1 -1
  135. package/dist/session/cancel.js +10 -2
  136. package/dist/session/cancel.js.map +1 -1
  137. package/dist/session/commands.d.ts +1 -1
  138. package/dist/session/commands.d.ts.map +1 -1
  139. package/dist/session/commands.js +4 -2
  140. package/dist/session/commands.js.map +1 -1
  141. package/dist/session/compact-actor.d.ts +12 -5
  142. package/dist/session/compact-actor.d.ts.map +1 -1
  143. package/dist/session/compact-actor.js +64 -12
  144. package/dist/session/compact-actor.js.map +1 -1
  145. package/dist/session/compact-env.d.ts +31 -5
  146. package/dist/session/compact-env.d.ts.map +1 -1
  147. package/dist/session/compact-env.js +23 -13
  148. package/dist/session/compact-env.js.map +1 -1
  149. package/dist/session/compact.d.ts +6 -3
  150. package/dist/session/compact.d.ts.map +1 -1
  151. package/dist/session/compact.js.map +1 -1
  152. package/dist/session/index.d.ts +2 -2
  153. package/dist/session/index.d.ts.map +1 -1
  154. package/dist/session/index.js +2 -2
  155. package/dist/session/index.js.map +1 -1
  156. package/dist/session/park.d.ts +1 -1
  157. package/dist/session/park.d.ts.map +1 -1
  158. package/dist/session/park.js +1 -1
  159. package/dist/session/park.js.map +1 -1
  160. package/dist/session/side-channel-reminder.d.ts +1 -1
  161. package/dist/session/side-channel-reminder.d.ts.map +1 -1
  162. package/dist/session/side-channel-reminder.js +1 -1
  163. package/dist/session/side-channel-reminder.js.map +1 -1
  164. package/dist/session/types.d.ts +1 -1
  165. package/dist/session/types.d.ts.map +1 -1
  166. package/dist/session-runtime/ask-line.d.ts +7 -0
  167. package/dist/session-runtime/ask-line.d.ts.map +1 -0
  168. package/dist/session-runtime/ask-line.js +36 -0
  169. package/dist/session-runtime/ask-line.js.map +1 -0
  170. package/dist/session-runtime/durability.d.ts +25 -0
  171. package/dist/session-runtime/durability.d.ts.map +1 -0
  172. package/dist/session-runtime/durability.js +18 -0
  173. package/dist/session-runtime/durability.js.map +1 -0
  174. package/dist/session-runtime/effects.d.ts +53 -0
  175. package/dist/session-runtime/effects.d.ts.map +1 -0
  176. package/dist/session-runtime/effects.js +18 -0
  177. package/dist/session-runtime/effects.js.map +1 -0
  178. package/dist/session-runtime/index.d.ts +8 -0
  179. package/dist/session-runtime/index.d.ts.map +1 -0
  180. package/dist/session-runtime/index.js +8 -0
  181. package/dist/session-runtime/index.js.map +1 -0
  182. package/dist/session-runtime/interrupt.d.ts +3 -0
  183. package/dist/session-runtime/interrupt.d.ts.map +1 -0
  184. package/dist/session-runtime/interrupt.js +33 -0
  185. package/dist/session-runtime/interrupt.js.map +1 -0
  186. package/dist/session-runtime/recovery.d.ts +17 -0
  187. package/dist/session-runtime/recovery.d.ts.map +1 -0
  188. package/dist/session-runtime/recovery.js +119 -0
  189. package/dist/session-runtime/recovery.js.map +1 -0
  190. package/dist/session-runtime/runtime.d.ts +50 -0
  191. package/dist/session-runtime/runtime.d.ts.map +1 -0
  192. package/dist/session-runtime/runtime.js +533 -0
  193. package/dist/session-runtime/runtime.js.map +1 -0
  194. package/dist/session-runtime/summary.d.ts +26 -0
  195. package/dist/session-runtime/summary.d.ts.map +1 -0
  196. package/dist/session-runtime/summary.js +33 -0
  197. package/dist/session-runtime/summary.js.map +1 -0
  198. package/dist/tool-catalog/bindings.d.ts +6 -0
  199. package/dist/tool-catalog/bindings.d.ts.map +1 -0
  200. package/dist/tool-catalog/bindings.js +37 -0
  201. package/dist/tool-catalog/bindings.js.map +1 -0
  202. package/dist/tool-catalog/catalog.d.ts +1 -3
  203. package/dist/tool-catalog/catalog.d.ts.map +1 -1
  204. package/dist/tool-catalog/catalog.js +6 -34
  205. package/dist/tool-catalog/catalog.js.map +1 -1
  206. package/dist/tool-catalog/types.d.ts +8 -0
  207. package/dist/tool-catalog/types.d.ts.map +1 -1
  208. package/dist/tool-catalog/types.js.map +1 -1
  209. package/dist/tool-runtime/approval/approved.d.ts +1 -1
  210. package/dist/tool-runtime/approval/approved.d.ts.map +1 -1
  211. package/dist/tool-runtime/approval/approved.js +1 -1
  212. package/dist/tool-runtime/approval/approved.js.map +1 -1
  213. package/dist/tool-runtime/handler.d.ts.map +1 -1
  214. package/dist/tool-runtime/handler.js +291 -237
  215. package/dist/tool-runtime/handler.js.map +1 -1
  216. package/dist/tool-runtime/run-system-tool.d.ts +1 -0
  217. package/dist/tool-runtime/run-system-tool.d.ts.map +1 -1
  218. package/dist/tool-runtime/run-system-tool.js +30 -10
  219. package/dist/tool-runtime/run-system-tool.js.map +1 -1
  220. package/dist/tool-runtime/worker-tools.d.ts.map +1 -1
  221. package/dist/tool-runtime/worker-tools.js +2 -2
  222. package/dist/tool-runtime/worker-tools.js.map +1 -1
  223. package/package.json +29 -16
  224. package/src/agent-calls/acceptance.ts +1 -1
  225. package/src/agent-calls/callbacks.ts +1 -1
  226. package/src/agent-calls/delivery.ts +1 -1
  227. package/src/agent-calls/operator.ts +7 -1
  228. package/src/agent-calls/runtime.ts +23 -11
  229. package/src/agent-calls/types.ts +1 -1
  230. package/src/context/compact-floors.ts +1 -1
  231. package/src/context/compact.ts +4 -5
  232. package/src/context/history.ts +46 -4
  233. package/src/context/retention/defaults.ts +1 -1
  234. package/src/context/retention/resolve.ts +1 -1
  235. package/src/context/retention/schema.ts +1 -1
  236. package/src/context/retention/stamp.ts +7 -2
  237. package/src/context/retention/step.ts +7 -4
  238. package/src/context/retention/view.ts +1 -1
  239. package/src/context/spawn-history.ts +95 -0
  240. package/src/context/squeeze.ts +1 -1
  241. package/src/context/tools.ts +3 -2
  242. package/src/context/transcript.ts +15 -4
  243. package/src/policy-processor/README.md +1 -1
  244. package/src/policy-processor/classifier.ts +3 -1
  245. package/src/policy-processor/scope.ts +7 -2
  246. package/src/policy-processor/unattended-guard.ts +5 -2
  247. package/src/resources/compact-assets.ts +9 -0
  248. package/src/resources/compact-snapshot.ts +51 -0
  249. package/src/resources/index.ts +27 -0
  250. package/src/resources/module-bundle.ts +90 -0
  251. package/src/runtime/ambient-compact.ts +147 -0
  252. package/src/runtime/index.ts +17 -0
  253. package/src/runtime/ports.ts +28 -0
  254. package/src/runtime/prompt-message-of.ts +14 -0
  255. package/src/runtime/re-act-loop-intent-detected-trigger.ts +177 -0
  256. package/src/runtime/round-boundary.ts +248 -0
  257. package/src/runtime/round-stop.ts +24 -0
  258. package/src/runtime/tool-call.ts +10 -0
  259. package/src/runtime/turn-iterator.ts +312 -0
  260. package/src/runtime/turn-resolvers.ts +43 -0
  261. package/src/session/cancel.ts +11 -3
  262. package/src/session/commands.ts +5 -2
  263. package/src/session/compact-actor.ts +76 -16
  264. package/src/session/compact-env.ts +27 -18
  265. package/src/session/compact.ts +8 -3
  266. package/src/session/index.ts +7 -2
  267. package/src/session/park.ts +7 -1
  268. package/src/session/side-channel-reminder.ts +1 -1
  269. package/src/session/types.ts +1 -1
  270. package/src/session-runtime/ask-line.ts +39 -0
  271. package/src/session-runtime/durability.ts +41 -0
  272. package/src/session-runtime/effects.ts +35 -0
  273. package/src/session-runtime/index.ts +19 -0
  274. package/src/session-runtime/interrupt.ts +34 -0
  275. package/src/session-runtime/recovery.ts +145 -0
  276. package/src/session-runtime/runtime.ts +535 -0
  277. package/src/session-runtime/summary.ts +67 -0
  278. package/src/tool-catalog/bindings.ts +37 -0
  279. package/src/tool-catalog/catalog.ts +6 -31
  280. package/src/tool-catalog/types.ts +9 -0
  281. package/src/tool-runtime/approval/approved.ts +1 -1
  282. package/src/tool-runtime/handler.ts +40 -24
  283. package/src/tool-runtime/run-system-tool.ts +27 -11
  284. package/src/tool-runtime/worker-tools.ts +2 -2
@@ -1,22 +1,57 @@
1
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
2
+ var useValue = arguments.length > 2;
3
+ for (var i = 0; i < initializers.length; i++) {
4
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
5
+ }
6
+ return useValue ? value : void 0;
7
+ };
8
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
9
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
10
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
11
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
12
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
13
+ var _, done = false;
14
+ for (var i = decorators.length - 1; i >= 0; i--) {
15
+ var context = {};
16
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
17
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
18
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
19
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
20
+ if (kind === "accessor") {
21
+ if (result === void 0) continue;
22
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
23
+ if (_ = accept(result.get)) descriptor.get = _;
24
+ if (_ = accept(result.set)) descriptor.set = _;
25
+ if (_ = accept(result.init)) initializers.unshift(_);
26
+ }
27
+ else if (_ = accept(result)) {
28
+ if (kind === "field") initializers.unshift(_);
29
+ else descriptor[key] = _;
30
+ }
31
+ }
32
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
33
+ done = true;
34
+ };
1
35
  /**
2
36
  * Project-bound mint of one model tool_call. Does not execute.
3
37
  * Connection-sourced names are MCPToolJob; write_file / edit_file are
4
38
  * FileMutateToolJob; pack / unknown are SystemToolJob.
5
- * `agentCallFromWire` mints `agent__ask` / `agent__send`. `admit` wraps it; the turn calls it directly.
39
+ * `agentCallFromWire` mints `agent__ask` / `agent__send`. `admit` wraps it with frozen policy and retention facts.
6
40
  * Both append onto `AdmitContext.parent` when the caller passes one. They do not enqueue.
7
41
  * Bot-call pack tools and standing bot invocations mint BotCallJob.
8
42
  * `scheme_repl` is a ProgrammaticJob bag. Inner admits reuse this door.
9
43
  */
10
44
  import { createHash } from "node:crypto";
11
- import { AgentCallJob, BotCallJob, AgentCallbackJob, AgentMessageJob, AgentNotifyJob, AGENT_ASK, AGENT_MESSAGE, AGENT_NOTIFY, AGENT_RESPOND, AGENT_SEND, AGENT_VOID, CallDelivery, CONTEXT_NEED_TOOL_NAME, ContextNeedToolJob, FailureOutcome, FileMutateToolJob, MCPToolJob, McpToolExpectation, mcpToolListHas, parseWebExtractArgs, parseWebSearchArgs, ProgrammaticJob, SCHEME_REPL_TOOL_NAME, SCHEME_WATCH_TOOL_NAME, SessionTurn, storageIncludingOffTape, SystemToolJob, WEB_EXTRACT_TOOL_NAME, WEB_SEARCH_TOOL_NAME, WebExtractExpectation, WebExtractToolJob, WebSearchExpectation, WebSearchToolJob, writePluginMeta, } from "@inhuman.tools/harness-model";
45
+ import { AgentCallJob, BotCallJob, AgentCallbackJob, AgentMessageJob, AgentNotifyJob, AGENT_ASK, AGENT_MESSAGE, AGENT_NOTIFY, AGENT_RESPOND, AGENT_SEND, AGENT_VOID, CallDelivery, FailureOutcome, FileMutateToolJob, MCPToolJob, McpToolExpectation, mcpToolListHas, parseWebExtractArgs, parseWebSearchArgs, ProgrammaticJob, SCHEME_REPL_TOOL_NAME, SCHEME_WATCH_TOOL_NAME, SessionTurn, storageIncludingOffTape, SystemToolJob, WEB_EXTRACT_TOOL_NAME, WEB_SEARCH_TOOL_NAME, WebExtractExpectation, WebExtractToolJob, WebSearchExpectation, WebSearchToolJob, writePluginMeta, } from "@inhuman.tools/harness-model";
12
46
  import { parseJsonRecord } from "@inhuman.tools/harness-model/json-record";
47
+ import { action } from "mobx";
13
48
  import { externalizePrior } from "./blob-port.js";
14
49
  import { peelAgentCallArgs, requestIdOf } from "./peel.js";
15
50
  import { workerToolAllowed } from "./worker-tools.js";
16
51
  import { lineStartOfSpan, writeFileAdmitSnap } from "./write-admit.js";
17
52
  import { policyOfTurn, stampJobRetention } from "../context/retention/index.js";
18
53
  import { peelShellCwd } from "../policy-processor/peel-cwd.js";
19
- import { agentCallSupportsNotify } from "../tool-catalog/index.js";
54
+ import { agentCallSupportsNotify, behaviorEntriesOf, } from "../tool-catalog/index.js";
20
55
  function pluginRevision(catalog, pluginName) {
21
56
  const record = catalog.pluginInstall?.plugins.get(pluginName);
22
57
  if (record == null)
@@ -40,8 +75,12 @@ function priorProps(text) {
40
75
  return text === null ? {} : externalizePrior(text);
41
76
  }
42
77
  function catalogFlags(entry) {
78
+ const continuation = entry?.continuation ?? {
79
+ kind: entry?.triggersReactLoop === false ? "none" : "observation",
80
+ };
43
81
  return {
44
- triggersReactLoop: entry?.triggersReactLoop ?? true,
82
+ continuationJson: JSON.stringify(continuation),
83
+ triggersReactLoop: continuation.kind === "observation",
45
84
  tapeHidden: entry?.tapeHidden ?? false,
46
85
  isSideChannel: entry?.isSideChannel === true,
47
86
  };
@@ -101,16 +140,16 @@ function admitExam(call, ctx, entry) {
101
140
  bag.outcomeSnap ??= { ok: true, value: { job_id: bag.toolCallId, background: true } };
102
141
  }
103
142
  ctx.originTurn?.pushChild(bag);
104
- const action = exam.admit(prefix, input);
105
- let jobUuid = "";
143
+ const admittedAction = exam.admit(prefix, input);
144
+ let jobUuid;
106
145
  try {
107
146
  jobUuid = bag.uuid;
108
147
  }
109
148
  catch {
110
149
  jobUuid = "";
111
150
  }
112
- const actionRec = asRecord(action);
113
- writePluginMeta(bag, pluginId, actionRec == null ? action : { ...actionRec, jobUuid }, true);
151
+ const actionRec = asRecord(admittedAction);
152
+ writePluginMeta(bag, pluginId, actionRec == null ? admittedAction : { ...actionRec, jobUuid }, true);
114
153
  return bag;
115
154
  }
116
155
  function rejectedComms(kind, toolCallId, name, argsJson, text) {
@@ -148,6 +187,9 @@ export function agentCallFromWire(call, catalog, ctx = {}) {
148
187
  if (ctx.session != null && !workerToolAllowed(catalog, ctx.session.agent.spec.name, name, ctx.session)) {
149
188
  return appendJob(ctx, ceilingJob(call));
150
189
  }
190
+ const flags = catalogFlags(catalog.catalogEntry(call.function.name) ??
191
+ catalog.privateWorkerEntries.find((row) => row.wireName === call.function.name) ??
192
+ behaviorEntriesOf(ctx.session).find((row) => row.wireName === call.function.name));
151
193
  const peeled = peelAgentCallArgs(call.function.arguments);
152
194
  const spec = parseJsonRecord(peeled.argsJson)?.spec;
153
195
  // Select the explicit child or bot node at admission;
@@ -159,6 +201,7 @@ export function agentCallFromWire(call, catalog, ctx = {}) {
159
201
  argsJson: peeled.argsJson,
160
202
  botName: spec.trim(),
161
203
  voidLegal: name === AGENT_SEND ? peeled.voidLegal : false,
204
+ ...flags,
162
205
  readonly: peeled.readonly,
163
206
  responseSchema: peeled.responseSchema,
164
207
  ...stamp(peeled.argsJson),
@@ -170,6 +213,7 @@ export function agentCallFromWire(call, catalog, ctx = {}) {
170
213
  argsJson: peeled.argsJson,
171
214
  regenerateable: false,
172
215
  voidLegal: name === AGENT_SEND ? peeled.voidLegal : false,
216
+ ...flags,
173
217
  readonly: peeled.readonly,
174
218
  responseSchema: peeled.responseSchema,
175
219
  constitution: peeled.constitution,
@@ -180,93 +224,131 @@ export function agentCallFromWire(call, catalog, ctx = {}) {
180
224
  ...stamp(peeled.argsJson),
181
225
  }));
182
226
  }
183
- export class ToolCallHandler {
184
- kernel;
185
- constructor(kernel) {
186
- this.kernel = kernel;
187
- }
188
- admit(call, catalog = this.kernel.catalog, ctx = {}) {
189
- const job = this.#admit(call, catalog, ctx);
190
- // R2: the horizon is resolved once, here, from the turn's R1 policy and the catalog as it is now.
191
- const entry = catalog.catalogEntry(call.function.name) ?? this.kernel.catalog.catalogEntry(call.function.name);
192
- const turn = ctx.originTurn ?? ctx.session?.head ?? null;
193
- stampJobRetention(job, policyOfTurn(turn instanceof SessionTurn ? turn : null), {
194
- ...(entry?.class === undefined ? {} : { entryClass: entry.class }),
195
- ...(entry?.retention === undefined ? {} : { hint: entry.retention }),
196
- });
197
- return job;
198
- }
199
- #admit(call, catalog, ctx) {
200
- const place = (job) => appendJob(ctx, job);
201
- const toolCallId = call.id;
202
- const name = call.function.name;
203
- const argsJson = call.function.arguments;
204
- if (ctx.session != null && !workerToolAllowed(catalog, ctx.session.agent.spec.name, name, ctx.session)) {
205
- return place(ceilingJob(call));
227
+ let ToolCallHandler = (() => {
228
+ let _instanceExtraInitializers = [];
229
+ let _admit_decorators;
230
+ return class ToolCallHandler {
231
+ static {
232
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
233
+ _admit_decorators = [action];
234
+ __esDecorate(this, null, _admit_decorators, { kind: "method", name: "admit", static: false, private: false, access: { has: obj => "admit" in obj, get: obj => obj.admit }, metadata: _metadata }, null, _instanceExtraInitializers);
235
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
206
236
  }
207
- if (name === SCHEME_REPL_TOOL_NAME || name === SCHEME_WATCH_TOOL_NAME) {
208
- const flagged = name === SCHEME_WATCH_TOOL_NAME ? { background: true, walkBoundary: true } : stamp(argsJson);
209
- const job = new ProgrammaticJob({
210
- toolName: name,
211
- toolCallId,
212
- argsJson,
213
- ...flagged,
214
- });
215
- if (job.background && job.toolCallId.trim() !== "") {
216
- job.outcomeSnap ??= { ok: true, value: { job_id: job.toolCallId, background: true } };
217
- }
218
- return place(job);
237
+ kernel = __runInitializers(this, _instanceExtraInitializers);
238
+ constructor(kernel) {
239
+ this.kernel = kernel;
219
240
  }
220
- const viewEntry = catalog.catalogEntry(name);
221
- const kernelEntry = this.kernel.catalog.catalogEntry(name);
222
- const entry = viewEntry ?? kernelEntry ?? catalog.privateWorkerEntries.find((row) => row.wireName === name);
223
- const regenerateable = viewEntry?.class === "read";
224
- if (entry?.exam != null) {
225
- return place(admitExam(call, ctx, entry));
241
+ admit(call, catalog = this.kernel.catalog, ctx = {}) {
242
+ const job = this.#admit(call, catalog, { ...ctx, parent: undefined });
243
+ // R2: the horizon is resolved once, here, from the turn's R1 policy and the catalog as it is now.
244
+ const entry = catalog.catalogEntry(call.function.name) ??
245
+ this.kernel.catalog.catalogEntry(call.function.name) ??
246
+ catalog.privateWorkerEntries.find((row) => row.wireName === call.function.name) ??
247
+ behaviorEntriesOf(ctx.session).find((row) => row.wireName === call.function.name);
248
+ const policy = catalogFlags(entry);
249
+ job.continuationJson = policy.continuationJson;
250
+ job.triggersReactLoop = policy.triggersReactLoop;
251
+ job.isSideChannel = policy.isSideChannel;
252
+ job.tapeHidden = policy.tapeHidden;
253
+ const turn = ctx.originTurn ?? ctx.session?.head ?? null;
254
+ stampJobRetention(job, policyOfTurn(turn instanceof SessionTurn ? turn : null), {
255
+ ...(entry?.class === undefined ? {} : { entryClass: entry.class }),
256
+ ...(entry?.retention === undefined ? {} : { hint: entry.retention }),
257
+ });
258
+ return appendJob(ctx, job);
226
259
  }
227
- if (entry?.packMeta?.kind === "bot-call") {
228
- const meta = entry.packMeta;
229
- const recipe = catalog.recipe(meta.target);
230
- const known = recipe != null;
231
- const revision = pluginRevision(catalog, meta.pluginName);
232
- const peeled = peelAgentCallArgs(argsJson);
233
- const job = new BotCallJob({
234
- toolCallId,
235
- name,
236
- argsJson: peeled.argsJson,
237
- botName: meta.target,
238
- regenerateable: false,
239
- voidLegal: peeled.voidLegal,
240
- readonly: peeled.readonly,
241
- responseSchema: peeled.responseSchema,
242
- contributionPluginName: meta.pluginName,
243
- contributionBotName: meta.target,
244
- contributionRevision: revision,
245
- ...(meta.background ? { background: true, walkBoundary: true } : stamp(argsJson)),
246
- ...(known
247
- ? {}
248
- : {
249
- outcome: new FailureOutcome({
250
- code: "unknown_recipe",
251
- message: "unknown recipe",
260
+ #admit(call, catalog, ctx) {
261
+ const place = (job) => appendJob(ctx, job);
262
+ const toolCallId = call.id;
263
+ const name = call.function.name;
264
+ const argsJson = call.function.arguments;
265
+ if (ctx.session != null && !workerToolAllowed(catalog, ctx.session.agent.spec.name, name, ctx.session)) {
266
+ return place(ceilingJob(call));
267
+ }
268
+ if (name === SCHEME_REPL_TOOL_NAME || name === SCHEME_WATCH_TOOL_NAME) {
269
+ const flagged = name === SCHEME_WATCH_TOOL_NAME ? { background: true, walkBoundary: true } : stamp(argsJson);
270
+ const job = new ProgrammaticJob({
271
+ toolName: name,
272
+ toolCallId,
273
+ argsJson,
274
+ ...catalogFlags(catalog.catalogEntry(name) ?? this.kernel.catalog.catalogEntry(name)),
275
+ ...flagged,
276
+ });
277
+ if (job.background && job.toolCallId.trim() !== "") {
278
+ job.outcomeSnap ??= { ok: true, value: { job_id: job.toolCallId, background: true } };
279
+ }
280
+ return place(job);
281
+ }
282
+ const viewEntry = catalog.catalogEntry(name);
283
+ const kernelEntry = this.kernel.catalog.catalogEntry(name);
284
+ const entry = viewEntry ?? kernelEntry ?? catalog.privateWorkerEntries.find((row) => row.wireName === name);
285
+ const regenerateable = viewEntry?.class === "read";
286
+ if (entry?.exam != null) {
287
+ return place(admitExam(call, ctx, entry));
288
+ }
289
+ if (entry?.packMeta?.kind === "bot-call") {
290
+ const meta = entry.packMeta;
291
+ const recipe = catalog.recipe(meta.target);
292
+ const known = recipe != null;
293
+ const revision = pluginRevision(catalog, meta.pluginName);
294
+ const peeled = peelAgentCallArgs(argsJson);
295
+ const job = new BotCallJob({
296
+ toolCallId,
297
+ name,
298
+ argsJson: peeled.argsJson,
299
+ botName: meta.target,
300
+ regenerateable: false,
301
+ voidLegal: peeled.voidLegal,
302
+ readonly: peeled.readonly,
303
+ responseSchema: peeled.responseSchema,
304
+ contributionPluginName: meta.pluginName,
305
+ contributionBotName: meta.target,
306
+ contributionRevision: revision,
307
+ ...(meta.background ? { background: true, walkBoundary: true } : stamp(argsJson)),
308
+ ...(known
309
+ ? {}
310
+ : {
311
+ outcome: new FailureOutcome({
312
+ code: "unknown_recipe",
313
+ message: "unknown recipe",
314
+ }),
315
+ completed: true,
316
+ }),
317
+ });
318
+ if (known && meta.lifetime != null)
319
+ job.delivery = new CallDelivery({ lifetime: meta.lifetime });
320
+ return place(job);
321
+ }
322
+ if (entry?.source.kind === "connection") {
323
+ const hidden = viewEntry == null && !catalog.privateWorkerEntries.some((row) => row.wireName === name);
324
+ const blocked = ctx.session != null &&
325
+ mcpToolListHas(ctx.session.toolBlocklist, entry.source.connectionKey, entry.source.serverToolName);
326
+ if (hidden || blocked) {
327
+ return place(new MCPToolJob({
328
+ toolCallId,
329
+ name,
330
+ argsJson,
331
+ regenerateable: false,
332
+ connectionKey: entry.source.connectionKey,
333
+ serverToolName: entry.source.serverToolName,
334
+ expectation: new McpToolExpectation({
335
+ connectionId: entry.source.connectionKey,
336
+ serverToolName: entry.source.serverToolName,
337
+ argsJson,
252
338
  }),
339
+ humanApprove: false,
253
340
  completed: true,
254
- }),
255
- });
256
- if (known && meta.lifetime != null)
257
- job.delivery = new CallDelivery({ lifetime: meta.lifetime });
258
- return place(job);
259
- }
260
- if (entry?.source.kind === "connection") {
261
- const hidden = viewEntry == null && !catalog.privateWorkerEntries.some((row) => row.wireName === name);
262
- const blocked = ctx.session != null &&
263
- mcpToolListHas(ctx.session.toolBlocklist, entry.source.connectionKey, entry.source.serverToolName);
264
- if (hidden || blocked) {
341
+ outcomeJson: JSON.stringify({
342
+ ok: false,
343
+ text: `unknown MCP tool "${entry.source.serverToolName}"`,
344
+ }),
345
+ }));
346
+ }
265
347
  return place(new MCPToolJob({
266
348
  toolCallId,
267
349
  name,
268
350
  argsJson,
269
- regenerateable: false,
351
+ regenerateable,
270
352
  connectionKey: entry.source.connectionKey,
271
353
  serverToolName: entry.source.serverToolName,
272
354
  expectation: new McpToolExpectation({
@@ -274,187 +356,159 @@ export class ToolCallHandler {
274
356
  serverToolName: entry.source.serverToolName,
275
357
  argsJson,
276
358
  }),
277
- humanApprove: false,
278
- completed: true,
279
- outcomeJson: JSON.stringify({
280
- ok: false,
281
- text: `unknown MCP tool "${entry.source.serverToolName}"`,
282
- }),
283
359
  }));
284
360
  }
285
- return place(new MCPToolJob({
286
- toolCallId,
287
- name,
288
- argsJson,
289
- regenerateable,
290
- connectionKey: entry.source.connectionKey,
291
- serverToolName: entry.source.serverToolName,
292
- expectation: new McpToolExpectation({
293
- connectionId: entry.source.connectionKey,
294
- serverToolName: entry.source.serverToolName,
361
+ if (name === AGENT_ASK || name === AGENT_SEND) {
362
+ return agentCallFromWire(call, catalog, ctx);
363
+ }
364
+ const requestId = requestIdOf(argsJson);
365
+ const ownsOpen = ctx.session != null && requestId !== "" && ctx.session.agentCallbacks[requestId] != null;
366
+ if (name === AGENT_RESPOND || name === AGENT_VOID) {
367
+ if (ownsOpen) {
368
+ return place(new AgentCallbackJob({
369
+ toolCallId,
370
+ name,
371
+ argsJson,
372
+ regenerateable: false,
373
+ ...stamp(argsJson),
374
+ }));
375
+ }
376
+ return place(rejectedComms("callback", toolCallId, name, argsJson, "no open callback"));
377
+ }
378
+ if (name === AGENT_NOTIFY) {
379
+ const open = ownsOpen && ctx.loadAgentCall != null ? ctx.loadAgentCall(requestId) : undefined;
380
+ if (open != null && agentCallSupportsNotify(catalog, open.name)) {
381
+ return place(new AgentNotifyJob({
382
+ toolCallId,
383
+ name,
384
+ argsJson,
385
+ regenerateable: false,
386
+ ...stamp(argsJson),
387
+ }));
388
+ }
389
+ return place(rejectedComms("notify", toolCallId, name, argsJson, "no open notify"));
390
+ }
391
+ if (name === AGENT_MESSAGE) {
392
+ return place(new AgentMessageJob({
393
+ toolCallId,
394
+ name,
295
395
  argsJson,
296
- }),
297
- }));
298
- }
299
- if (name === AGENT_ASK || name === AGENT_SEND) {
300
- return agentCallFromWire(call, catalog, ctx);
301
- }
302
- const requestId = requestIdOf(argsJson);
303
- const ownsOpen = ctx.session != null && requestId !== "" && ctx.session.agentCallbacks[requestId] != null;
304
- if (name === AGENT_RESPOND || name === AGENT_VOID) {
305
- if (ownsOpen) {
306
- return place(new AgentCallbackJob({
396
+ regenerateable: false,
397
+ ...stamp(argsJson),
398
+ }));
399
+ }
400
+ if (name === WEB_SEARCH_TOOL_NAME) {
401
+ const parsed = parseWebSearchArgs(argsJson);
402
+ return place(new WebSearchToolJob({
307
403
  toolCallId,
308
404
  name,
309
405
  argsJson,
310
406
  regenerateable: false,
407
+ expectation: new WebSearchExpectation({
408
+ connectionId: WEB_SEARCH_TOOL_NAME,
409
+ query: parsed.query,
410
+ limit: parsed.limit,
411
+ }),
311
412
  ...stamp(argsJson),
312
413
  }));
313
414
  }
314
- return place(rejectedComms("callback", toolCallId, name, argsJson, "no open callback"));
315
- }
316
- if (name === AGENT_NOTIFY) {
317
- const open = ownsOpen && ctx.loadAgentCall != null ? ctx.loadAgentCall(requestId) : undefined;
318
- if (open != null && agentCallSupportsNotify(catalog, open.name)) {
319
- return place(new AgentNotifyJob({
415
+ if (name === WEB_EXTRACT_TOOL_NAME) {
416
+ const parsed = parseWebExtractArgs(argsJson);
417
+ return place(new WebExtractToolJob({
320
418
  toolCallId,
321
419
  name,
322
420
  argsJson,
323
421
  regenerateable: false,
422
+ expectation: new WebExtractExpectation({
423
+ connectionId: WEB_EXTRACT_TOOL_NAME,
424
+ url: parsed.url,
425
+ charLimit: parsed.charLimit,
426
+ }),
324
427
  ...stamp(argsJson),
325
428
  }));
326
429
  }
327
- return place(rejectedComms("notify", toolCallId, name, argsJson, "no open notify"));
328
- }
329
- if (name === AGENT_MESSAGE) {
330
- return place(new AgentMessageJob({
331
- toolCallId,
332
- name,
333
- argsJson,
334
- regenerateable: false,
335
- ...stamp(argsJson),
336
- }));
337
- }
338
- if (name === CONTEXT_NEED_TOOL_NAME) {
339
- return place(new ContextNeedToolJob({
340
- toolCallId,
341
- name,
342
- argsJson,
343
- regenerateable: false,
344
- ...stamp(argsJson),
345
- ...catalogFlags(entry),
346
- }));
347
- }
348
- if (name === WEB_SEARCH_TOOL_NAME) {
349
- const parsed = parseWebSearchArgs(argsJson);
350
- return place(new WebSearchToolJob({
351
- toolCallId,
352
- name,
353
- argsJson,
354
- regenerateable: false,
355
- expectation: new WebSearchExpectation({
356
- connectionId: WEB_SEARCH_TOOL_NAME,
357
- query: parsed.query,
358
- limit: parsed.limit,
359
- }),
360
- ...stamp(argsJson),
361
- }));
362
- }
363
- if (name === WEB_EXTRACT_TOOL_NAME) {
364
- const parsed = parseWebExtractArgs(argsJson);
365
- return place(new WebExtractToolJob({
366
- toolCallId,
367
- name,
368
- argsJson,
369
- regenerateable: false,
370
- expectation: new WebExtractExpectation({
371
- connectionId: WEB_EXTRACT_TOOL_NAME,
372
- url: parsed.url,
373
- charLimit: parsed.charLimit,
374
- }),
375
- ...stamp(argsJson),
376
- }));
377
- }
378
- const fileRoot = ctx.session?.path.trim() ?? "";
379
- const fileSnap = (name === "write_file" || name === "edit_file") && fileRoot !== ""
380
- ? writeFileAdmitSnap(fileRoot, argsJson)
381
- : null;
382
- let oldString = "";
383
- if (name === "edit_file") {
384
- const parsed = parseJsonRecord(argsJson === "" ? "{}" : argsJson);
385
- const old = parsed == null ? undefined : parsed.old_string;
386
- if (typeof old === "string")
387
- oldString = old;
388
- }
389
- const priorLineStart = name === "edit_file" && fileSnap?.priorContent != null ? lineStartOfSpan(fileSnap.priorContent, oldString) : null;
390
- let shellArgsJson = argsJson;
391
- let shellRefuse;
392
- if (name === "shell") {
393
- const parsed = parseJsonRecord(argsJson === "" ? "{}" : argsJson);
394
- if (parsed != null) {
395
- const command = parsed.command;
396
- if (typeof command === "string" && command !== "") {
397
- const cwdArg = typeof parsed.cwd === "string" ? parsed.cwd : undefined;
398
- const peeled = peelShellCwd(command, cwdArg);
399
- if (peeled !== null && peeled.command === "") {
400
- shellRefuse = "cwd only; use the cwd arg on the next call";
401
- }
402
- else if (peeled !== null) {
403
- shellArgsJson = JSON.stringify({
404
- ...parsed,
405
- cwd: peeled.cwd,
406
- command: peeled.command,
407
- });
430
+ const fileRoot = ctx.session?.path.trim() ?? "";
431
+ const fileSnap = (name === "write_file" || name === "edit_file") && fileRoot !== ""
432
+ ? writeFileAdmitSnap(fileRoot, argsJson)
433
+ : null;
434
+ let oldString = "";
435
+ if (name === "edit_file") {
436
+ const parsed = parseJsonRecord(argsJson === "" ? "{}" : argsJson);
437
+ const old = parsed == null ? undefined : parsed.old_string;
438
+ if (typeof old === "string")
439
+ oldString = old;
440
+ }
441
+ const priorLineStart = name === "edit_file" && fileSnap?.priorContent != null ? lineStartOfSpan(fileSnap.priorContent, oldString) : null;
442
+ let shellArgsJson = argsJson;
443
+ let shellRefuse;
444
+ if (name === "shell") {
445
+ const parsed = parseJsonRecord(argsJson === "" ? "{}" : argsJson);
446
+ if (parsed != null) {
447
+ const command = parsed.command;
448
+ if (typeof command === "string" && command !== "") {
449
+ const cwdArg = typeof parsed.cwd === "string" ? parsed.cwd : undefined;
450
+ const peeled = peelShellCwd(command, cwdArg);
451
+ if (peeled !== null && peeled.command === "") {
452
+ shellRefuse = "cwd only; use the cwd arg on the next call";
453
+ }
454
+ else if (peeled !== null) {
455
+ shellArgsJson = JSON.stringify({
456
+ ...parsed,
457
+ cwd: peeled.cwd,
458
+ command: peeled.command,
459
+ });
460
+ }
408
461
  }
409
462
  }
410
463
  }
411
- }
412
- if (shellRefuse !== undefined) {
413
- return place(new SystemToolJob({
414
- toolCallId,
415
- name,
416
- argsJson: shellArgsJson,
417
- regenerateable: false,
418
- completed: true,
419
- outcomeJson: JSON.stringify({ ok: false, text: shellRefuse }),
420
- }));
421
- }
422
- if (name === "write_file" || name === "edit_file") {
423
- if (name === "write_file" && fileSnap?.refuse != null) {
424
- return place(new FileMutateToolJob({
464
+ if (shellRefuse !== undefined) {
465
+ return place(new SystemToolJob({
425
466
  toolCallId,
426
467
  name,
427
- argsJson,
468
+ argsJson: shellArgsJson,
428
469
  regenerateable: false,
429
470
  completed: true,
430
- existed: fileSnap.existed,
431
- ...priorProps(fileSnap.priorContent),
432
- outcomeJson: JSON.stringify({ ok: false, text: fileSnap.refuse }),
471
+ outcomeJson: JSON.stringify({ ok: false, text: shellRefuse }),
472
+ }));
473
+ }
474
+ if (name === "write_file" || name === "edit_file") {
475
+ if (name === "write_file" && fileSnap?.refuse != null) {
476
+ return place(new FileMutateToolJob({
477
+ toolCallId,
478
+ name,
479
+ argsJson,
480
+ regenerateable: false,
481
+ completed: true,
482
+ existed: fileSnap.existed,
483
+ ...priorProps(fileSnap.priorContent),
484
+ outcomeJson: JSON.stringify({ ok: false, text: fileSnap.refuse }),
485
+ }));
486
+ }
487
+ const prior = fileSnap == null
488
+ ? {}
489
+ : {
490
+ ...(fileSnap.existed === null ? {} : { existed: fileSnap.existed }),
491
+ ...priorProps(fileSnap.priorContent),
492
+ ...(priorLineStart == null ? {} : { priorLineStart }),
493
+ };
494
+ return place(new FileMutateToolJob({
495
+ toolCallId,
496
+ name,
497
+ argsJson,
498
+ regenerateable,
499
+ ...catalogFlags(entry),
500
+ ...prior,
433
501
  }));
434
502
  }
435
- const prior = fileSnap == null
436
- ? {}
437
- : {
438
- ...(fileSnap.existed === null ? {} : { existed: fileSnap.existed }),
439
- ...priorProps(fileSnap.priorContent),
440
- ...(priorLineStart == null ? {} : { priorLineStart }),
441
- };
442
- return place(new FileMutateToolJob({
503
+ return place(new SystemToolJob({
443
504
  toolCallId,
444
505
  name,
445
- argsJson,
506
+ argsJson: shellArgsJson,
446
507
  regenerateable,
447
508
  ...catalogFlags(entry),
448
- ...prior,
449
509
  }));
450
510
  }
451
- return place(new SystemToolJob({
452
- toolCallId,
453
- name,
454
- argsJson: shellArgsJson,
455
- regenerateable,
456
- ...catalogFlags(entry),
457
- }));
458
- }
459
- }
511
+ };
512
+ })();
513
+ export { ToolCallHandler };
460
514
  //# sourceMappingURL=handler.js.map