@draht/coding-agent 2026.10.4-3 → 2026.10.8-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +32 -6
  3. package/dist/bundle/chunks/anthropic.js +1 -1
  4. package/dist/bundle/chunks/{chunk-JTLUBTZT.js → chunk-6QIFWMDF.js} +1 -1
  5. package/dist/bundle/chunks/{chunk-AFL4IDSI.js → chunk-AHGUOQPH.js} +2 -2
  6. package/dist/bundle/chunks/{chunk-VPYAVQLP.js → chunk-BOGY4QVF.js} +4 -4
  7. package/dist/bundle/chunks/chunk-GD2WVXWT.js +65 -0
  8. package/dist/bundle/chunks/{chunk-3HF756LN.js → chunk-KJJJSTND.js} +292 -153
  9. package/dist/bundle/chunks/chunk-PGJAHC3R.js +107 -0
  10. package/dist/bundle/chunks/chunk-QVFELZW2.js +312 -0
  11. package/dist/bundle/chunks/{chunk-V5HG6S2T.js → chunk-QVTLBSTH.js} +1 -1
  12. package/dist/bundle/chunks/{chunk-A4OX5CPR.js → chunk-U6LDZZGM.js} +1 -1
  13. package/dist/bundle/chunks/{chunk-XO3IECI5.js → chunk-VQOV5VFH.js} +1 -1
  14. package/dist/bundle/chunks/{cli-L74YA5GF.js → cli-O6OWCY7N.js} +1 -1
  15. package/dist/bundle/chunks/execute-4JU5WQXP.js +18 -0
  16. package/dist/bundle/chunks/google-antigravity.js +1 -1
  17. package/dist/bundle/chunks/google-gemini-cli.js +1 -1
  18. package/dist/bundle/chunks/openai-chatgpt.js +1 -1
  19. package/dist/bundle/chunks/openai-codex.js +1 -1
  20. package/dist/bundle/chunks/openrouter.js +1 -1
  21. package/dist/bundle/chunks/radius.js +1 -1
  22. package/dist/bundle/chunks/{runtime-RYUR6LRB.js → runtime-FIGQHW75.js} +1 -1
  23. package/dist/bundle/chunks/runtime-TJ3EAMJK.js +3 -0
  24. package/dist/bundle/chunks/{settings-manager-CHEMMAGQ.js → settings-manager-HC5RR36T.js} +1 -1
  25. package/dist/bundle/chunks/virtual-modules-UIGTRGHQ.js +2 -0
  26. package/dist/bundle/chunks/xai.js +1 -1
  27. package/dist/bundle/cli-runtime.js +1 -1
  28. package/dist/bundle/index.js +1 -1
  29. package/dist/bundle/rpc-entry.js +1 -1
  30. package/dist/cli/args.js +3 -3
  31. package/dist/cli/args.js.map +1 -1
  32. package/dist/core/builtins/duet.d.ts +5 -2
  33. package/dist/core/builtins/duet.d.ts.map +1 -1
  34. package/dist/core/builtins/duet.js +65 -27
  35. package/dist/core/builtins/duet.js.map +1 -1
  36. package/dist/core/builtins/index.d.ts.map +1 -1
  37. package/dist/core/builtins/index.js +2 -0
  38. package/dist/core/builtins/index.js.map +1 -1
  39. package/dist/core/builtins/polyphase.d.ts +15 -0
  40. package/dist/core/builtins/polyphase.d.ts.map +1 -0
  41. package/dist/core/builtins/polyphase.js +196 -0
  42. package/dist/core/builtins/polyphase.js.map +1 -0
  43. package/dist/core/builtins/subagent.d.ts +44 -34
  44. package/dist/core/builtins/subagent.d.ts.map +1 -1
  45. package/dist/core/builtins/subagent.js +827 -560
  46. package/dist/core/builtins/subagent.js.map +1 -1
  47. package/dist/core/extensions/types.d.ts +17 -2
  48. package/dist/core/extensions/types.d.ts.map +1 -1
  49. package/dist/core/extensions/types.js.map +1 -1
  50. package/dist/core/keybindings.d.ts +30 -0
  51. package/dist/core/keybindings.d.ts.map +1 -1
  52. package/dist/core/keybindings.js +24 -0
  53. package/dist/core/keybindings.js.map +1 -1
  54. package/dist/core/model-resolver.js +4 -4
  55. package/dist/core/model-resolver.js.map +1 -1
  56. package/dist/core/multi-agent/permission-gate.d.ts.map +1 -1
  57. package/dist/core/multi-agent/permission-gate.js +4 -1
  58. package/dist/core/multi-agent/permission-gate.js.map +1 -1
  59. package/dist/core/polyphase/approval.d.ts +35 -0
  60. package/dist/core/polyphase/approval.d.ts.map +1 -0
  61. package/dist/core/polyphase/approval.js +184 -0
  62. package/dist/core/polyphase/approval.js.map +1 -0
  63. package/dist/core/polyphase/child-events.d.ts +107 -0
  64. package/dist/core/polyphase/child-events.d.ts.map +1 -0
  65. package/dist/core/polyphase/child-events.js +862 -0
  66. package/dist/core/polyphase/child-events.js.map +1 -0
  67. package/dist/core/polyphase/child-process.d.ts +65 -0
  68. package/dist/core/polyphase/child-process.d.ts.map +1 -0
  69. package/dist/core/polyphase/child-process.js +361 -0
  70. package/dist/core/polyphase/child-process.js.map +1 -0
  71. package/dist/core/polyphase/commands.d.ts +44 -0
  72. package/dist/core/polyphase/commands.d.ts.map +1 -0
  73. package/dist/core/polyphase/commands.js +244 -0
  74. package/dist/core/polyphase/commands.js.map +1 -0
  75. package/dist/core/polyphase/details.d.ts +40 -0
  76. package/dist/core/polyphase/details.d.ts.map +1 -0
  77. package/dist/core/polyphase/details.js +538 -0
  78. package/dist/core/polyphase/details.js.map +1 -0
  79. package/dist/core/polyphase/emitter.d.ts +20 -0
  80. package/dist/core/polyphase/emitter.d.ts.map +1 -0
  81. package/dist/core/polyphase/emitter.js +90 -0
  82. package/dist/core/polyphase/emitter.js.map +1 -0
  83. package/dist/core/polyphase/jsonl-reader.d.ts +31 -0
  84. package/dist/core/polyphase/jsonl-reader.d.ts.map +1 -0
  85. package/dist/core/polyphase/jsonl-reader.js +161 -0
  86. package/dist/core/polyphase/jsonl-reader.js.map +1 -0
  87. package/dist/core/polyphase/keyword.d.ts +27 -0
  88. package/dist/core/polyphase/keyword.d.ts.map +1 -0
  89. package/dist/core/polyphase/keyword.js +97 -0
  90. package/dist/core/polyphase/keyword.js.map +1 -0
  91. package/dist/core/polyphase/limiter.d.ts +38 -0
  92. package/dist/core/polyphase/limiter.d.ts.map +1 -0
  93. package/dist/core/polyphase/limiter.js +129 -0
  94. package/dist/core/polyphase/limiter.js.map +1 -0
  95. package/dist/core/polyphase/model-selection.d.ts +35 -0
  96. package/dist/core/polyphase/model-selection.d.ts.map +1 -0
  97. package/dist/core/polyphase/model-selection.js +72 -0
  98. package/dist/core/polyphase/model-selection.js.map +1 -0
  99. package/dist/core/polyphase/render/format.d.ts +52 -0
  100. package/dist/core/polyphase/render/format.d.ts.map +1 -0
  101. package/dist/core/polyphase/render/format.js +169 -0
  102. package/dist/core/polyphase/render/format.js.map +1 -0
  103. package/dist/core/polyphase/render/renderers.d.ts +63 -0
  104. package/dist/core/polyphase/render/renderers.d.ts.map +1 -0
  105. package/dist/core/polyphase/render/renderers.js +277 -0
  106. package/dist/core/polyphase/render/renderers.js.map +1 -0
  107. package/dist/core/polyphase/render/run-block.d.ts +45 -0
  108. package/dist/core/polyphase/render/run-block.d.ts.map +1 -0
  109. package/dist/core/polyphase/render/run-block.js +843 -0
  110. package/dist/core/polyphase/render/run-block.js.map +1 -0
  111. package/dist/core/polyphase/render/snapshot.d.ts +106 -0
  112. package/dist/core/polyphase/render/snapshot.d.ts.map +1 -0
  113. package/dist/core/polyphase/render/snapshot.js +292 -0
  114. package/dist/core/polyphase/render/snapshot.js.map +1 -0
  115. package/dist/core/polyphase/result-text.d.ts +41 -0
  116. package/dist/core/polyphase/result-text.d.ts.map +1 -0
  117. package/dist/core/polyphase/result-text.js +326 -0
  118. package/dist/core/polyphase/result-text.js.map +1 -0
  119. package/dist/core/polyphase/session.d.ts +33 -0
  120. package/dist/core/polyphase/session.d.ts.map +1 -0
  121. package/dist/core/polyphase/session.js +106 -0
  122. package/dist/core/polyphase/session.js.map +1 -0
  123. package/dist/core/polyphase/settings.d.ts +18 -0
  124. package/dist/core/polyphase/settings.d.ts.map +1 -0
  125. package/dist/core/polyphase/settings.js +93 -0
  126. package/dist/core/polyphase/settings.js.map +1 -0
  127. package/dist/core/polyphase/store.d.ts +197 -0
  128. package/dist/core/polyphase/store.d.ts.map +1 -0
  129. package/dist/core/polyphase/store.js +558 -0
  130. package/dist/core/polyphase/store.js.map +1 -0
  131. package/dist/core/polyphase/types.d.ts +371 -0
  132. package/dist/core/polyphase/types.d.ts.map +1 -0
  133. package/dist/core/polyphase/types.js +36 -0
  134. package/dist/core/polyphase/types.js.map +1 -0
  135. package/dist/core/polyphase/ui/controller.d.ts +28 -0
  136. package/dist/core/polyphase/ui/controller.d.ts.map +1 -0
  137. package/dist/core/polyphase/ui/controller.js +150 -0
  138. package/dist/core/polyphase/ui/controller.js.map +1 -0
  139. package/dist/core/polyphase/ui/dock.d.ts +27 -0
  140. package/dist/core/polyphase/ui/dock.d.ts.map +1 -0
  141. package/dist/core/polyphase/ui/dock.js +121 -0
  142. package/dist/core/polyphase/ui/dock.js.map +1 -0
  143. package/dist/core/polyphase/ui/inspector.d.ts +117 -0
  144. package/dist/core/polyphase/ui/inspector.d.ts.map +1 -0
  145. package/dist/core/polyphase/ui/inspector.js +1016 -0
  146. package/dist/core/polyphase/ui/inspector.js.map +1 -0
  147. package/dist/core/polyphase/ui/transcript-layout.d.ts +55 -0
  148. package/dist/core/polyphase/ui/transcript-layout.d.ts.map +1 -0
  149. package/dist/core/polyphase/ui/transcript-layout.js +210 -0
  150. package/dist/core/polyphase/ui/transcript-layout.js.map +1 -0
  151. package/dist/core/polyphase/update-pump.d.ts +18 -0
  152. package/dist/core/polyphase/update-pump.d.ts.map +1 -0
  153. package/dist/core/polyphase/update-pump.js +132 -0
  154. package/dist/core/polyphase/update-pump.js.map +1 -0
  155. package/dist/core/polyphase/workflow/agent-host.d.ts +26 -0
  156. package/dist/core/polyphase/workflow/agent-host.d.ts.map +1 -0
  157. package/dist/core/polyphase/workflow/agent-host.js +187 -0
  158. package/dist/core/polyphase/workflow/agent-host.js.map +1 -0
  159. package/dist/core/polyphase/workflow/guidance.d.ts +19 -0
  160. package/dist/core/polyphase/workflow/guidance.d.ts.map +1 -0
  161. package/dist/core/polyphase/workflow/guidance.js +119 -0
  162. package/dist/core/polyphase/workflow/guidance.js.map +1 -0
  163. package/dist/core/polyphase/workflow/launch.d.ts +41 -0
  164. package/dist/core/polyphase/workflow/launch.d.ts.map +1 -0
  165. package/dist/core/polyphase/workflow/launch.js +173 -0
  166. package/dist/core/polyphase/workflow/launch.js.map +1 -0
  167. package/dist/core/polyphase/workflow/meta.d.ts +43 -0
  168. package/dist/core/polyphase/workflow/meta.d.ts.map +1 -0
  169. package/dist/core/polyphase/workflow/meta.js +529 -0
  170. package/dist/core/polyphase/workflow/meta.js.map +1 -0
  171. package/dist/core/polyphase/workflow/prelude.d.ts +24 -0
  172. package/dist/core/polyphase/workflow/prelude.d.ts.map +1 -0
  173. package/dist/core/polyphase/workflow/prelude.js +93 -0
  174. package/dist/core/polyphase/workflow/prelude.js.map +1 -0
  175. package/dist/core/polyphase/workflow/runtime.d.ts +79 -0
  176. package/dist/core/polyphase/workflow/runtime.d.ts.map +1 -0
  177. package/dist/core/polyphase/workflow/runtime.js +217 -0
  178. package/dist/core/polyphase/workflow/runtime.js.map +1 -0
  179. package/dist/core/polyphase/workflow/runtime.lazy.d.ts +3 -0
  180. package/dist/core/polyphase/workflow/runtime.lazy.d.ts.map +1 -0
  181. package/dist/core/polyphase/workflow/runtime.lazy.js +3 -0
  182. package/dist/core/polyphase/workflow/runtime.lazy.js.map +1 -0
  183. package/dist/core/polyphase/workflow/saved.d.ts +55 -0
  184. package/dist/core/polyphase/workflow/saved.d.ts.map +1 -0
  185. package/dist/core/polyphase/workflow/saved.js +299 -0
  186. package/dist/core/polyphase/workflow/saved.js.map +1 -0
  187. package/dist/core/polyphase/workflow/structured-output.d.ts +22 -0
  188. package/dist/core/polyphase/workflow/structured-output.d.ts.map +1 -0
  189. package/dist/core/polyphase/workflow/structured-output.js +66 -0
  190. package/dist/core/polyphase/workflow/structured-output.js.map +1 -0
  191. package/dist/core/polyphase/workflow/tool.d.ts +24 -0
  192. package/dist/core/polyphase/workflow/tool.d.ts.map +1 -0
  193. package/dist/core/polyphase/workflow/tool.js +139 -0
  194. package/dist/core/polyphase/workflow/tool.js.map +1 -0
  195. package/dist/core/sdk.d.ts +1 -1
  196. package/dist/core/sdk.js +1 -1
  197. package/dist/core/sdk.js.map +1 -1
  198. package/dist/core/settings-manager.d.ts +27 -0
  199. package/dist/core/settings-manager.d.ts.map +1 -1
  200. package/dist/core/settings-manager.js.map +1 -1
  201. package/dist/core/socket-server/permission-relay.js +4 -0
  202. package/dist/core/socket-server/permission-relay.js.map +1 -1
  203. package/dist/core/trust-manager.d.ts +3 -2
  204. package/dist/core/trust-manager.d.ts.map +1 -1
  205. package/dist/core/trust-manager.js +5 -2
  206. package/dist/core/trust-manager.js.map +1 -1
  207. package/dist/experimental/micro/runtime.js +1 -1
  208. package/dist/experimental/micro/runtime.js.map +1 -1
  209. package/dist/modes/interactive/components/keybinding-hints.d.ts +7 -0
  210. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
  211. package/dist/modes/interactive/components/keybinding-hints.js +18 -0
  212. package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
  213. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  214. package/dist/modes/interactive/interactive-mode.js +11 -2
  215. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  216. package/dist/modes/rpc/rpc-types.d.ts +9 -0
  217. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  218. package/dist/modes/rpc/rpc-types.js.map +1 -1
  219. package/dist/prompts/commands/orchestrate.md +1 -1
  220. package/dist/utils/shell.d.ts.map +1 -1
  221. package/dist/utils/shell.js +7 -1
  222. package/dist/utils/shell.js.map +1 -1
  223. package/docs/docs.json +4 -0
  224. package/docs/duet.md +3 -3
  225. package/docs/environment-variables.md +11 -0
  226. package/docs/json.md +7 -0
  227. package/docs/keybindings.md +20 -0
  228. package/docs/polyphase.md +391 -0
  229. package/docs/rpc-commands.md +9 -9
  230. package/docs/settings.md +12 -0
  231. package/docs/virtual-models.md +3 -3
  232. package/examples/extensions/preset.ts +3 -3
  233. package/examples/extensions/subagent/README.md +1 -1
  234. package/examples/extensions/subagent/agents/planner.md +1 -1
  235. package/examples/extensions/subagent/agents/reviewer.md +1 -1
  236. package/examples/extensions/subagent/agents/scout.md +1 -1
  237. package/examples/extensions/subagent/agents/worker.md +1 -1
  238. package/examples/extensions/summarize.ts +3 -3
  239. package/examples/sdk/02-custom-model.ts +1 -1
  240. package/examples/sdk/12-full-control.ts +1 -1
  241. package/examples/sdk/README.md +1 -1
  242. package/package.json +10 -10
  243. package/prompts/commands/orchestrate.md +1 -1
  244. package/dist/bundle/chunks/chunk-SPZUYYP5.js +0 -170
  245. package/dist/bundle/chunks/execute-EMOVNTD6.js +0 -328
  246. package/dist/bundle/chunks/virtual-modules-OC56AAJ7.js +0 -2
@@ -0,0 +1,173 @@
1
+ /**
2
+ * Starts one workflow run (§14.2): creates the store run and mailbox synchronously, then runs the
3
+ * script asynchronously via the lazily-loaded runtime. `done` never rejects.
4
+ */
5
+ import { createRunMailbox } from "../../builtins/subagent.js";
6
+ import { buildDetails, sumRunUsage } from "../details.js";
7
+ import { formatWorkflowResultText } from "../result-text.js";
8
+ import { createWorkflowAgentHost } from "./agent-host.js";
9
+ import { loadWorkflowRuntime } from "./runtime.lazy.js";
10
+ const RESULT_PREVIEW_MAX_CHARS = 400;
11
+ /** A one-line JSON preview of the value (DESIGN.md §14.2 step 4): `JSON.stringify` even for a
12
+ * string value, so embedded newlines are escaped instead of breaking the row onto several lines.
13
+ * `undefined` (no return value) has no preview at all. */
14
+ function resultPreviewOf(value) {
15
+ if (value === undefined)
16
+ return undefined;
17
+ const text = JSON.stringify(value);
18
+ // Measured and truncated by code point, not UTF-16 code unit, throughout: comparing `text.length`
19
+ // (code units) against the cap but truncating by code point let a text over the unit cap but at
20
+ // or under the code-point cap (e.g. ~300 non-BMP emoji) through untruncated, with a trailing "…"
21
+ // that still marked it as truncated, and let the truncated preview reach ~2x the intended cap.
22
+ const codePoints = Array.from(text);
23
+ if (codePoints.length <= RESULT_PREVIEW_MAX_CHARS)
24
+ return text;
25
+ return `${codePoints.slice(0, RESULT_PREVIEW_MAX_CHARS - 1).join("")}…`;
26
+ }
27
+ /** Folds the sandbox's redeclaration hint (runtime.ts) into the message so it survives into
28
+ * `WorkflowOutcomeSummary`, which has no `hint` field of its own. */
29
+ function errorMessageWithHint(error) {
30
+ return error.hint ? `${error.message} (hint: ${error.hint})` : error.message;
31
+ }
32
+ function toSummary(outcome) {
33
+ if (outcome.ok)
34
+ return { ok: true, value: outcome.value, consoleOutput: outcome.consoleOutput };
35
+ return {
36
+ ok: false,
37
+ errorKind: outcome.error.kind,
38
+ errorMessage: errorMessageWithHint(outcome.error),
39
+ errorLine: outcome.error.line,
40
+ consoleOutput: outcome.consoleOutput,
41
+ };
42
+ }
43
+ function finishRun(run, outcome) {
44
+ if (outcome.ok) {
45
+ const preview = resultPreviewOf(outcome.value);
46
+ if (preview !== undefined)
47
+ run.setResultPreview(preview);
48
+ run.finish("done");
49
+ }
50
+ else if (outcome.error.kind === "aborted") {
51
+ run.finish("cancelled", outcome.error.message);
52
+ }
53
+ else {
54
+ const composed = errorMessageWithHint(outcome.error);
55
+ const message = outcome.error.line !== undefined ? `line ${outcome.error.line}: ${composed}` : composed;
56
+ run.finish("failed", message);
57
+ }
58
+ const summary = toSummary(outcome);
59
+ return {
60
+ outcome,
61
+ text: formatWorkflowResultText(run, summary),
62
+ details: buildDetails(run, { final: true }),
63
+ usage: sumRunUsage(run),
64
+ isError: !outcome.ok,
65
+ };
66
+ }
67
+ function failedCompletion(run, message) {
68
+ run.finish("failed", message);
69
+ const outcome = {
70
+ ok: false,
71
+ error: { kind: "sandbox", message },
72
+ consoleOutput: [],
73
+ agentCalls: 0,
74
+ };
75
+ return {
76
+ outcome,
77
+ text: formatWorkflowResultText(run, toSummary(outcome)),
78
+ details: buildDetails(run, { final: true }),
79
+ usage: sumRunUsage(run),
80
+ isError: true,
81
+ };
82
+ }
83
+ /** Built without `buildDetails`/`formatWorkflowResultText` so it can never itself throw; used only
84
+ * when `failedCompletion` (which calls those) throws a second time (DESIGN.md §14.2 step 4: `done`
85
+ * must never reject). */
86
+ function minimalFailedCompletion(run, meta, message) {
87
+ run.finish("failed", message);
88
+ const outcome = {
89
+ ok: false,
90
+ error: { kind: "sandbox", message },
91
+ consoleOutput: [],
92
+ agentCalls: 0,
93
+ };
94
+ const details = {
95
+ v: 1,
96
+ runId: run.id,
97
+ kind: run.kind,
98
+ origin: run.origin,
99
+ title: run.title,
100
+ status: "failed",
101
+ startedAt: run.startedAt,
102
+ endedAt: run.endedAt ?? Date.now(),
103
+ agents: [],
104
+ totals: { agents: 0, tokens: 0, cost: 0, byStatus: {}, blockedToolCalls: 0 },
105
+ error: message,
106
+ };
107
+ return {
108
+ outcome,
109
+ text: `Workflow ${meta.name} failed: ${message}`,
110
+ details,
111
+ usage: undefined,
112
+ isError: true,
113
+ };
114
+ }
115
+ export function startWorkflowRun(options) {
116
+ const { ctx, session, id, origin, parentSignal, meta, body, args, source, budgetTokens, runner } = options;
117
+ const settings = session.settings();
118
+ const run = session.store.createRun({
119
+ id,
120
+ kind: "workflow",
121
+ origin,
122
+ title: meta.name,
123
+ workflow: { name: meta.name, description: meta.description, source: source.kind, path: source.path, args },
124
+ phases: meta.phases,
125
+ budgetTokens,
126
+ parentSignal,
127
+ });
128
+ const mailbox = createRunMailbox("workflow-run");
129
+ const done = (async () => {
130
+ let host;
131
+ try {
132
+ const runtime = await loadWorkflowRuntime();
133
+ host = createWorkflowAgentHost({ ctx, session, run, meta, mailbox: mailbox.name, runner });
134
+ const outcome = await runtime.runWorkflowScript({
135
+ meta,
136
+ body,
137
+ args,
138
+ budgetTokens,
139
+ maxAgents: settings.maxAgentsPerRun,
140
+ maxItemsPerCall: settings.maxItemsPerCall,
141
+ timeoutMs: settings.workflowTimeoutMs,
142
+ signal: run.signal,
143
+ host,
144
+ });
145
+ // The sandbox may finish (abort, timeout, script error, script return) while an agent it
146
+ // abandoned mid-call is still being torn down (DESIGN.md §14.2 step 4); wait for every
147
+ // `runSingleTask` this host started before snapshotting the run as final.
148
+ await host.settled();
149
+ return finishRun(run, outcome);
150
+ }
151
+ catch (error) {
152
+ // Defensive: `runWorkflowScript` never rejects while agents are in flight today
153
+ // (`finish()` aborts every pending host call), but if it ever did, awaiting `settled()`
154
+ // without cancelling first would let paid children run to completion unobserved.
155
+ run.cancel("run");
156
+ await host?.settled();
157
+ const message = error instanceof Error ? error.message : String(error);
158
+ try {
159
+ return failedCompletion(run, message);
160
+ }
161
+ catch {
162
+ // formatWorkflowResultText/buildDetails/sumRunUsage threw a second time; fall back to a
163
+ // completion that can't itself throw, so `done` still never rejects.
164
+ return minimalFailedCompletion(run, meta, message);
165
+ }
166
+ }
167
+ finally {
168
+ mailbox.dispose();
169
+ }
170
+ })();
171
+ return { run, done };
172
+ }
173
+ //# sourceMappingURL=launch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"launch.js","sourceRoot":"","sources":["../../../../src/core/polyphase/workflow/launch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAA+B,MAAM,mBAAmB,CAAC;AAI1F,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AA+BxD,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAErC;;0DAE0D;AAC1D,SAAS,eAAe,CAAC,KAAc;IACtC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACnC,kGAAkG;IAClG,gGAAgG;IAChG,iGAAiG;IACjG,+FAA+F;IAC/F,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,UAAU,CAAC,MAAM,IAAI,wBAAwB;QAAE,OAAO,IAAI,CAAC;IAC/D,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,CAA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K,CAAC,CAAC;YAClB,MAAM,IAAI,EAAE,OAAO,EAAE,CAAC;YACtB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,IAAI,CAAC;gBACJ,OAAO,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;YACvC,CAAC;YAAC,MAAM,CAAC;gBACR,wFAAwF;gBACxF,qEAAqE;gBACrE,OAAO,uBAAuB,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;YACpD,CAAC;QACF,CAAC;gBAAS,CAAC;YACV,OAAO,CAAC,OAAO,EAAE,CAAC;QACnB,CAAC;IACF,CAAC,CAAC,EAAE,CAAC;IAEL,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AACtB,CAAC","sourcesContent":["/**\n * Starts one workflow run (§14.2): creates the store run and mailbox synchronously, then runs the\n * script asynchronously via the lazily-loaded runtime. `done` never rejects.\n */\n\nimport type { Usage } from \"@draht/ai\";\nimport { createRunMailbox } from \"../../builtins/subagent.ts\";\nimport type { ExtensionContext } from \"../../extensions/types.ts\";\nimport { buildDetails, sumRunUsage } from \"../details.ts\";\nimport { formatWorkflowResultText, type WorkflowOutcomeSummary } from \"../result-text.ts\";\nimport type { PolyphaseSession } from \"../session.ts\";\nimport type { PolyphaseRun } from \"../store.ts\";\nimport type { AgentRunner, PolyphaseDetails, RunOrigin, WorkflowSource } from \"../types.ts\";\nimport { createWorkflowAgentHost } from \"./agent-host.ts\";\nimport type { WorkflowMeta } from \"./meta.ts\";\nimport { loadWorkflowRuntime } from \"./runtime.lazy.ts\";\nimport type { WorkflowOutcome, WorkflowScriptError } from \"./runtime.ts\";\n\nexport interface StartWorkflowRunOptions {\n\tctx: ExtensionContext;\n\tsession: PolyphaseSession;\n\tid: string;\n\torigin: RunOrigin;\n\tparentSignal?: AbortSignal;\n\tmeta: WorkflowMeta;\n\tbody: string;\n\targs: string;\n\tsource: { kind: WorkflowSource; path?: string };\n\tbudgetTokens: number | null;\n\trunner?: AgentRunner;\n}\n\nexport interface WorkflowRunCompletion {\n\toutcome: WorkflowOutcome;\n\ttext: string;\n\tdetails: PolyphaseDetails;\n\tusage: Usage | undefined;\n\tisError: boolean;\n}\n\nexport interface WorkflowRunHandle {\n\treadonly run: PolyphaseRun;\n\t/** Never rejects. */\n\treadonly done: Promise<WorkflowRunCompletion>;\n}\n\nconst RESULT_PREVIEW_MAX_CHARS = 400;\n\n/** A one-line JSON preview of the value (DESIGN.md §14.2 step 4): `JSON.stringify` even for a\n * string value, so embedded newlines are escaped instead of breaking the row onto several lines.\n * `undefined` (no return value) has no preview at all. */\nfunction resultPreviewOf(value: unknown): string | undefined {\n\tif (value === undefined) return undefined;\n\tconst text = JSON.stringify(value);\n\t// Measured and truncated by code point, not UTF-16 code unit, throughout: comparing `text.length`\n\t// (code units) against the cap but truncating by code point let a text over the unit cap but at\n\t// or under the code-point cap (e.g. ~300 non-BMP emoji) through untruncated, with a trailing \"…\"\n\t// that still marked it as truncated, and let the truncated preview reach ~2x the intended cap.\n\tconst codePoints = Array.from(text);\n\tif (codePoints.length <= RESULT_PREVIEW_MAX_CHARS) return text;\n\treturn `${codePoints.slice(0, RESULT_PREVIEW_MAX_CHARS - 1).join(\"\")}…`;\n}\n\n/** Folds the sandbox's redeclaration hint (runtime.ts) into the message so it survives into\n * `WorkflowOutcomeSummary`, which has no `hint` field of its own. */\nfunction errorMessageWithHint(error: WorkflowScriptError): string {\n\treturn error.hint ? `${error.message} (hint: ${error.hint})` : error.message;\n}\n\nfunction toSummary(outcome: WorkflowOutcome): WorkflowOutcomeSummary {\n\tif (outcome.ok) return { ok: true, value: outcome.value, consoleOutput: outcome.consoleOutput };\n\treturn {\n\t\tok: false,\n\t\terrorKind: outcome.error.kind,\n\t\terrorMessage: errorMessageWithHint(outcome.error),\n\t\terrorLine: outcome.error.line,\n\t\tconsoleOutput: outcome.consoleOutput,\n\t};\n}\n\nfunction finishRun(run: PolyphaseRun, outcome: WorkflowOutcome): WorkflowRunCompletion {\n\tif (outcome.ok) {\n\t\tconst preview = resultPreviewOf(outcome.value);\n\t\tif (preview !== undefined) run.setResultPreview(preview);\n\t\trun.finish(\"done\");\n\t} else if (outcome.error.kind === \"aborted\") {\n\t\trun.finish(\"cancelled\", outcome.error.message);\n\t} else {\n\t\tconst composed = errorMessageWithHint(outcome.error);\n\t\tconst message = outcome.error.line !== undefined ? `line ${outcome.error.line}: ${composed}` : composed;\n\t\trun.finish(\"failed\", message);\n\t}\n\n\tconst summary = toSummary(outcome);\n\treturn {\n\t\toutcome,\n\t\ttext: formatWorkflowResultText(run, summary),\n\t\tdetails: buildDetails(run, { final: true }),\n\t\tusage: sumRunUsage(run),\n\t\tisError: !outcome.ok,\n\t};\n}\n\nfunction failedCompletion(run: PolyphaseRun, message: string): WorkflowRunCompletion {\n\trun.finish(\"failed\", message);\n\tconst outcome: WorkflowOutcome = {\n\t\tok: false,\n\t\terror: { kind: \"sandbox\", message },\n\t\tconsoleOutput: [],\n\t\tagentCalls: 0,\n\t};\n\treturn {\n\t\toutcome,\n\t\ttext: formatWorkflowResultText(run, toSummary(outcome)),\n\t\tdetails: buildDetails(run, { final: true }),\n\t\tusage: sumRunUsage(run),\n\t\tisError: true,\n\t};\n}\n\n/** Built without `buildDetails`/`formatWorkflowResultText` so it can never itself throw; used only\n * when `failedCompletion` (which calls those) throws a second time (DESIGN.md §14.2 step 4: `done`\n * must never reject). */\nfunction minimalFailedCompletion(run: PolyphaseRun, meta: WorkflowMeta, message: string): WorkflowRunCompletion {\n\trun.finish(\"failed\", message);\n\tconst outcome: WorkflowOutcome = {\n\t\tok: false,\n\t\terror: { kind: \"sandbox\", message },\n\t\tconsoleOutput: [],\n\t\tagentCalls: 0,\n\t};\n\tconst details: PolyphaseDetails = {\n\t\tv: 1,\n\t\trunId: run.id,\n\t\tkind: run.kind,\n\t\torigin: run.origin,\n\t\ttitle: run.title,\n\t\tstatus: \"failed\",\n\t\tstartedAt: run.startedAt,\n\t\tendedAt: run.endedAt ?? Date.now(),\n\t\tagents: [],\n\t\ttotals: { agents: 0, tokens: 0, cost: 0, byStatus: {}, blockedToolCalls: 0 },\n\t\terror: message,\n\t};\n\treturn {\n\t\toutcome,\n\t\ttext: `Workflow ${meta.name} failed: ${message}`,\n\t\tdetails,\n\t\tusage: undefined,\n\t\tisError: true,\n\t};\n}\n\nexport function startWorkflowRun(options: StartWorkflowRunOptions): WorkflowRunHandle {\n\tconst { ctx, session, id, origin, parentSignal, meta, body, args, source, budgetTokens, runner } = options;\n\tconst settings = session.settings();\n\n\tconst run = session.store.createRun({\n\t\tid,\n\t\tkind: \"workflow\",\n\t\torigin,\n\t\ttitle: meta.name,\n\t\tworkflow: { name: meta.name, description: meta.description, source: source.kind, path: source.path, args },\n\t\tphases: meta.phases,\n\t\tbudgetTokens,\n\t\tparentSignal,\n\t});\n\n\tconst mailbox = createRunMailbox(\"workflow-run\");\n\n\tconst done = (async (): Promise<WorkflowRunCompletion> => {\n\t\tlet host: ReturnType<typeof createWorkflowAgentHost> | undefined;\n\t\ttry {\n\t\t\tconst runtime = await loadWorkflowRuntime();\n\t\t\thost = createWorkflowAgentHost({ ctx, session, run, meta, mailbox: mailbox.name, runner });\n\t\t\tconst outcome = await runtime.runWorkflowScript({\n\t\t\t\tmeta,\n\t\t\t\tbody,\n\t\t\t\targs,\n\t\t\t\tbudgetTokens,\n\t\t\t\tmaxAgents: settings.maxAgentsPerRun,\n\t\t\t\tmaxItemsPerCall: settings.maxItemsPerCall,\n\t\t\t\ttimeoutMs: settings.workflowTimeoutMs,\n\t\t\t\tsignal: run.signal,\n\t\t\t\thost,\n\t\t\t});\n\t\t\t// The sandbox may finish (abort, timeout, script error, script return) while an agent it\n\t\t\t// abandoned mid-call is still being torn down (DESIGN.md §14.2 step 4); wait for every\n\t\t\t// `runSingleTask` this host started before snapshotting the run as final.\n\t\t\tawait host.settled();\n\t\t\treturn finishRun(run, outcome);\n\t\t} catch (error) {\n\t\t\t// Defensive: `runWorkflowScript` never rejects while agents are in flight today\n\t\t\t// (`finish()` aborts every pending host call), but if it ever did, awaiting `settled()`\n\t\t\t// without cancelling first would let paid children run to completion unobserved.\n\t\t\trun.cancel(\"run\");\n\t\t\tawait host?.settled();\n\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\ttry {\n\t\t\t\treturn failedCompletion(run, message);\n\t\t\t} catch {\n\t\t\t\t// formatWorkflowResultText/buildDetails/sumRunUsage threw a second time; fall back to a\n\t\t\t\t// completion that can't itself throw, so `done` still never rejects.\n\t\t\t\treturn minimalFailedCompletion(run, meta, message);\n\t\t\t}\n\t\t} finally {\n\t\t\tmailbox.dispose();\n\t\t}\n\t})();\n\n\treturn { run, done };\n}\n"]}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Extracts and validates `export const meta = {...}` from a workflow script, without running it.
3
+ *
4
+ * The parser accepts exactly the pure-literal grammar a model is expected to write: objects,
5
+ * arrays, strings (quoted or template without `${}`), numbers, booleans, `null`, comments and
6
+ * trailing commas. It rejects identifiers, calls, spreads, computed keys, `${}` interpolation and
7
+ * regex literals, each with a 1-based line and column. See DESIGN.md §13.1.
8
+ */
9
+ export interface WorkflowPhaseMeta {
10
+ title: string;
11
+ detail?: string;
12
+ model?: string;
13
+ }
14
+ export interface WorkflowMeta {
15
+ name: string;
16
+ description: string;
17
+ whenToUse?: string;
18
+ phases: WorkflowPhaseMeta[];
19
+ }
20
+ export interface MetaError {
21
+ message: string;
22
+ line: number;
23
+ column: number;
24
+ }
25
+ export type MetaExtraction = {
26
+ ok: true;
27
+ meta: WorkflowMeta;
28
+ body: string;
29
+ warnings: string[];
30
+ } | {
31
+ ok: false;
32
+ error: MetaError;
33
+ };
34
+ export declare const WORKFLOW_NAME_PATTERN: RegExp;
35
+ export declare function extractWorkflowMeta(source: string): MetaExtraction;
36
+ /** Tolerant, for streaming args: scans at most {@link PEEK_HEAD_BYTES} for fields and counts lines up to {@link PEEK_LINE_SCAN_BYTES}. */
37
+ export declare function peekWorkflowMeta(partial: string): {
38
+ name?: string;
39
+ description?: string;
40
+ phases?: string[];
41
+ lines: number;
42
+ };
43
+ //# sourceMappingURL=meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../../src/core/polyphase/workflow/meta.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,cAAc,GACvB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,GAClE;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AAEnC,eAAO,MAAM,qBAAqB,EAAE,MAAiC,CAAC;AAgdtE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAyBlE;AAyBD,0IAA0I;AAC1I,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACd,CAUA"}