@arbidocs/blocks 0.5.194 → 0.5.195

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 (162) hide show
  1. package/dist/{ConnectedCallDock-7GGYYQNK.cjs → ConnectedCallDock-L2ER6N2P.cjs} +11 -11
  2. package/dist/{ConnectedCallDock-7GGYYQNK.cjs.map → ConnectedCallDock-L2ER6N2P.cjs.map} +1 -1
  3. package/dist/{ConnectedCallRoom-ZZ7RBGGY.cjs → ConnectedCallRoom-R6SHBOKX.cjs} +11 -11
  4. package/dist/{ConnectedCallRoom-ZZ7RBGGY.cjs.map → ConnectedCallRoom-R6SHBOKX.cjs.map} +1 -1
  5. package/dist/{ConnectedNativeDocxComparison-PPVXDQY3.cjs → ConnectedNativeDocxComparison-JNOAKSPK.cjs} +9 -9
  6. package/dist/{ConnectedNativeDocxComparison-PPVXDQY3.cjs.map → ConnectedNativeDocxComparison-JNOAKSPK.cjs.map} +1 -1
  7. package/dist/{ConnectedPresentation-LNDESKYE.cjs → ConnectedPresentation-ZSB7454J.cjs} +12 -12
  8. package/dist/{ConnectedPresentation-LNDESKYE.cjs.map → ConnectedPresentation-ZSB7454J.cjs.map} +1 -1
  9. package/dist/{ConnectedSlidesTab-SYDDGJWM.cjs → ConnectedSlidesTab-LCA3ZX5W.cjs} +12 -12
  10. package/dist/{ConnectedSlidesTab-SYDDGJWM.cjs.map → ConnectedSlidesTab-LCA3ZX5W.cjs.map} +1 -1
  11. package/dist/{ConnectedStreamedWordArtifact-GAACBGTY.cjs → ConnectedStreamedWordArtifact-J5HVQMUS.cjs} +9 -9
  12. package/dist/{ConnectedStreamedWordArtifact-GAACBGTY.cjs.map → ConnectedStreamedWordArtifact-J5HVQMUS.cjs.map} +1 -1
  13. package/dist/{FilesViewerDialog-W2HPT3JS.cjs → FilesViewerDialog-O3ZTKELI.cjs} +18 -18
  14. package/dist/{FilesViewerDialog-W2HPT3JS.cjs.map → FilesViewerDialog-O3ZTKELI.cjs.map} +1 -1
  15. package/dist/agents/index.cjs +383 -367
  16. package/dist/agents/tasks/WorkflowThreadStrip.d.ts +3 -1
  17. package/dist/agents/tasks/WorkflowThreadStrip.js +29 -0
  18. package/dist/agents/tasks/WorkflowThreadStrip.js.map +2 -2
  19. package/dist/agents/workflows/StepBarFrame.d.ts +11 -1
  20. package/dist/agents/workflows/StepBarFrame.js +40 -2
  21. package/dist/agents/workflows/StepBarFrame.js.map +2 -2
  22. package/dist/agents/workflows/WorkflowOverview.d.ts +78 -0
  23. package/dist/agents/workflows/WorkflowOverview.js +150 -0
  24. package/dist/agents/workflows/WorkflowOverview.js.map +7 -0
  25. package/dist/agents/workflows/WorkflowRunner.d.ts +2 -0
  26. package/dist/agents/workflows/WorkflowRunner.js +22 -0
  27. package/dist/agents/workflows/WorkflowRunner.js.map +2 -2
  28. package/dist/agents/workflows/WorkflowStepBar.d.ts +5 -1
  29. package/dist/agents/workflows/WorkflowStepBar.js +33 -1
  30. package/dist/agents/workflows/WorkflowStepBar.js.map +2 -2
  31. package/dist/agents/workflows/index.d.ts +1 -0
  32. package/dist/agents/workflows/index.js +10 -0
  33. package/dist/agents/workflows/index.js.map +2 -2
  34. package/dist/agents/workflows/planSteps.js +21 -4
  35. package/dist/agents/workflows/planSteps.js.map +2 -2
  36. package/dist/agents/workflows/run.js +2 -1
  37. package/dist/agents/workflows/run.js.map +2 -2
  38. package/dist/agents/workflows/suggest.d.ts +15 -0
  39. package/dist/agents/workflows/suggest.js +51 -0
  40. package/dist/agents/workflows/suggest.js.map +7 -0
  41. package/dist/agents/workflows/types.d.ts +27 -2
  42. package/dist/agents/workflows/types.js.map +1 -1
  43. package/dist/{ai-A5YTWIEC.cjs → ai-I7QIW5OA.cjs} +23 -23
  44. package/dist/ai-I7QIW5OA.cjs.map +1 -0
  45. package/dist/calls/index.cjs +2 -2
  46. package/dist/chat/index.cjs +59 -59
  47. package/dist/{chunk-GLNL5AL5.cjs → chunk-3GI3UM2T.cjs} +76 -76
  48. package/dist/{chunk-GLNL5AL5.cjs.map → chunk-3GI3UM2T.cjs.map} +1 -1
  49. package/dist/{chunk-PIJPM5RA.cjs → chunk-3YGSCNXQ.cjs} +6 -6
  50. package/dist/{chunk-PIJPM5RA.cjs.map → chunk-3YGSCNXQ.cjs.map} +1 -1
  51. package/dist/{chunk-RNQ3MDTR.cjs → chunk-5WCQ5Y77.cjs} +9 -9
  52. package/dist/{chunk-RNQ3MDTR.cjs.map → chunk-5WCQ5Y77.cjs.map} +1 -1
  53. package/dist/{chunk-JEUHT7XH.cjs → chunk-6CXTLIGJ.cjs} +6 -6
  54. package/dist/{chunk-JEUHT7XH.cjs.map → chunk-6CXTLIGJ.cjs.map} +1 -1
  55. package/dist/{chunk-5RUY5THD.cjs → chunk-6EATJW7T.cjs} +8 -8
  56. package/dist/{chunk-5RUY5THD.cjs.map → chunk-6EATJW7T.cjs.map} +1 -1
  57. package/dist/{chunk-HS7TUDEM.cjs → chunk-6HP6SQWC.cjs} +7 -7
  58. package/dist/{chunk-HS7TUDEM.cjs.map → chunk-6HP6SQWC.cjs.map} +1 -1
  59. package/dist/{chunk-ER2MRSLT.cjs → chunk-6LNTU7DA.cjs} +16 -16
  60. package/dist/{chunk-ER2MRSLT.cjs.map → chunk-6LNTU7DA.cjs.map} +1 -1
  61. package/dist/{chunk-Y3GJBLAI.cjs → chunk-FSTIAEJW.cjs} +10 -9
  62. package/dist/chunk-FSTIAEJW.cjs.map +1 -0
  63. package/dist/{chunk-HO2AURAQ.cjs → chunk-H4ZKASMT.cjs} +6 -6
  64. package/dist/{chunk-HO2AURAQ.cjs.map → chunk-H4ZKASMT.cjs.map} +1 -1
  65. package/dist/{chunk-J46Y2L26.cjs → chunk-HBY5PEMC.cjs} +4 -4
  66. package/dist/{chunk-J46Y2L26.cjs.map → chunk-HBY5PEMC.cjs.map} +1 -1
  67. package/dist/{chunk-3EIO4ZH5.cjs → chunk-HGH5FLYS.cjs} +6 -6
  68. package/dist/{chunk-3EIO4ZH5.cjs.map → chunk-HGH5FLYS.cjs.map} +1 -1
  69. package/dist/{chunk-65NQW4RR.cjs → chunk-HJAI3QNK.cjs} +17 -17
  70. package/dist/{chunk-65NQW4RR.cjs.map → chunk-HJAI3QNK.cjs.map} +1 -1
  71. package/dist/{chunk-2K5DLB7B.cjs → chunk-IOGN5UAT.cjs} +35 -18
  72. package/dist/chunk-IOGN5UAT.cjs.map +1 -0
  73. package/dist/{chunk-5FSULBPE.cjs → chunk-KC3HRFSO.cjs} +11 -11
  74. package/dist/{chunk-5FSULBPE.cjs.map → chunk-KC3HRFSO.cjs.map} +1 -1
  75. package/dist/{chunk-WDPHYI7S.cjs → chunk-KHT2YJ5N.cjs} +5 -5
  76. package/dist/{chunk-WDPHYI7S.cjs.map → chunk-KHT2YJ5N.cjs.map} +1 -1
  77. package/dist/{chunk-XKXKEVHH.cjs → chunk-NSL5BCGH.cjs} +6 -6
  78. package/dist/{chunk-XKXKEVHH.cjs.map → chunk-NSL5BCGH.cjs.map} +1 -1
  79. package/dist/{chunk-WHU7ABQE.cjs → chunk-NYNHFDVW.cjs} +18 -18
  80. package/dist/{chunk-WHU7ABQE.cjs.map → chunk-NYNHFDVW.cjs.map} +1 -1
  81. package/dist/{chunk-JSP3WTFF.cjs → chunk-P5DNNAUY.cjs} +71 -71
  82. package/dist/{chunk-JSP3WTFF.cjs.map → chunk-P5DNNAUY.cjs.map} +1 -1
  83. package/dist/{chunk-M55XUF4L.cjs → chunk-QFSFTO7I.cjs} +7 -7
  84. package/dist/{chunk-M55XUF4L.cjs.map → chunk-QFSFTO7I.cjs.map} +1 -1
  85. package/dist/{chunk-KZH6HMJL.cjs → chunk-QXIWLWR2.cjs} +4 -4
  86. package/dist/{chunk-KZH6HMJL.cjs.map → chunk-QXIWLWR2.cjs.map} +1 -1
  87. package/dist/{chunk-IRDL2EC6.cjs → chunk-SDID4WK7.cjs} +9 -9
  88. package/dist/{chunk-IRDL2EC6.cjs.map → chunk-SDID4WK7.cjs.map} +1 -1
  89. package/dist/{chunk-GWWX3FZ7.cjs → chunk-SYUVP52B.cjs} +8 -8
  90. package/dist/{chunk-GWWX3FZ7.cjs.map → chunk-SYUVP52B.cjs.map} +1 -1
  91. package/dist/{chunk-7GVKG3G4.cjs → chunk-V4XARTJ4.cjs} +17 -17
  92. package/dist/{chunk-7GVKG3G4.cjs.map → chunk-V4XARTJ4.cjs.map} +1 -1
  93. package/dist/{chunk-VJHDCYKE.cjs → chunk-V5VFRRLL.cjs} +7 -7
  94. package/dist/{chunk-VJHDCYKE.cjs.map → chunk-V5VFRRLL.cjs.map} +1 -1
  95. package/dist/{chunk-SQCCQU3K.cjs → chunk-VOGIYFNN.cjs} +2 -2
  96. package/dist/chunk-VOGIYFNN.cjs.map +1 -0
  97. package/dist/{chunk-QDIIOZBP.cjs → chunk-X3SUQFY7.cjs} +439 -140
  98. package/dist/chunk-X3SUQFY7.cjs.map +1 -0
  99. package/dist/{chunk-GZPNBSRE.cjs → chunk-YPSCG6ZW.cjs} +15 -15
  100. package/dist/{chunk-GZPNBSRE.cjs.map → chunk-YPSCG6ZW.cjs.map} +1 -1
  101. package/dist/{chunk-HH5MKRBL.cjs → chunk-YYK2CCMC.cjs} +10 -10
  102. package/dist/{chunk-HH5MKRBL.cjs.map → chunk-YYK2CCMC.cjs.map} +1 -1
  103. package/dist/{chunk-BH322H5B.cjs → chunk-ZLMWMAID.cjs} +6 -6
  104. package/dist/{chunk-BH322H5B.cjs.map → chunk-ZLMWMAID.cjs.map} +1 -1
  105. package/dist/{chunk-OHWYQI3B.cjs → chunk-ZTR3SUN4.cjs} +27 -27
  106. package/dist/{chunk-OHWYQI3B.cjs.map → chunk-ZTR3SUN4.cjs.map} +1 -1
  107. package/dist/connect/docx.cjs +12 -12
  108. package/dist/connect/index.cjs +536 -448
  109. package/dist/connect/index.cjs.map +1 -1
  110. package/dist/connect/viewer.cjs +7 -7
  111. package/dist/connection/ConnectedWorkflowBuilder.d.ts +1 -1
  112. package/dist/connection/ConnectedWorkflowBuilder.js.map +2 -2
  113. package/dist/connection/report-problem/ConnectedReportProblem.js +3 -0
  114. package/dist/connection/report-problem/ConnectedReportProblem.js.map +2 -2
  115. package/dist/connection/report-problem/ReportProblemDialog.d.ts +4 -1
  116. package/dist/connection/report-problem/ReportProblemDialog.js +2 -0
  117. package/dist/connection/report-problem/ReportProblemDialog.js.map +2 -2
  118. package/dist/connection/report-problem/SupportVideoEvidence.d.ts +4 -1
  119. package/dist/connection/report-problem/SupportVideoEvidence.js +54 -0
  120. package/dist/connection/report-problem/SupportVideoEvidence.js.map +2 -2
  121. package/dist/connection/report-problem/useSaveRecordingToWorkspace.d.ts +16 -0
  122. package/dist/connection/report-problem/useSaveRecordingToWorkspace.js +39 -0
  123. package/dist/connection/report-problem/useSaveRecordingToWorkspace.js.map +7 -0
  124. package/dist/embed/index.cjs +19 -19
  125. package/dist/index.cjs +488 -472
  126. package/dist/office/index.cjs +5 -5
  127. package/dist/pages/index.cjs +19 -19
  128. package/dist/record/index.cjs +2 -2
  129. package/dist/record/index.cjs.map +1 -1
  130. package/dist/record/index.js +2 -2
  131. package/dist/record/index.js.map +1 -1
  132. package/dist/record/runs.d.ts +1 -1
  133. package/dist/studio/index.cjs +14 -14
  134. package/dist/styles.css +1 -1
  135. package/dist/workflow-canvas/StepActionSettings.d.ts +3 -0
  136. package/dist/workflow-canvas/StepActionSettings.js +48 -2
  137. package/dist/workflow-canvas/StepActionSettings.js.map +2 -2
  138. package/dist/workflow-canvas/StepInspector.d.ts +9 -0
  139. package/dist/workflow-canvas/StepInspector.js +18 -1
  140. package/dist/workflow-canvas/StepInspector.js.map +2 -2
  141. package/dist/workflow-canvas/WorkflowBuilder.d.ts +11 -1
  142. package/dist/workflow-canvas/WorkflowBuilder.js +54 -3
  143. package/dist/workflow-canvas/WorkflowBuilder.js.map +2 -2
  144. package/dist/workflow-canvas/WorkflowOutline.d.ts +55 -0
  145. package/dist/workflow-canvas/WorkflowOutline.js +331 -0
  146. package/dist/workflow-canvas/WorkflowOutline.js.map +7 -0
  147. package/dist/workflow-canvas/edit.d.ts +7 -0
  148. package/dist/workflow-canvas/edit.js +22 -1
  149. package/dist/workflow-canvas/edit.js.map +2 -2
  150. package/dist/workflow-canvas/index.cjs +1324 -894
  151. package/dist/workflow-canvas/index.cjs.map +1 -1
  152. package/dist/workflow-canvas/index.d.ts +2 -1
  153. package/dist/workflow-canvas/index.js +10 -0
  154. package/dist/workflow-canvas/index.js.map +2 -2
  155. package/node_modules/@arbidocs/coedit/package.json +1 -1
  156. package/package.json +6 -5
  157. package/record/recording_clock.py +58 -0
  158. package/dist/ai-A5YTWIEC.cjs.map +0 -1
  159. package/dist/chunk-2K5DLB7B.cjs.map +0 -1
  160. package/dist/chunk-QDIIOZBP.cjs.map +0 -1
  161. package/dist/chunk-SQCCQU3K.cjs.map +0 -1
  162. package/dist/chunk-Y3GJBLAI.cjs.map +0 -1
@@ -2,24 +2,24 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkCYN66TBO_cjs = require('./chunk-CYN66TBO.cjs');
5
- var chunkBH322H5B_cjs = require('./chunk-BH322H5B.cjs');
6
- var chunk2K5DLB7B_cjs = require('./chunk-2K5DLB7B.cjs');
5
+ var chunkZLMWMAID_cjs = require('./chunk-ZLMWMAID.cjs');
6
+ var chunkIOGN5UAT_cjs = require('./chunk-IOGN5UAT.cjs');
7
7
  var chunkI4IS6ST6_cjs = require('./chunk-I4IS6ST6.cjs');
8
- var chunkM55XUF4L_cjs = require('./chunk-M55XUF4L.cjs');
8
+ var chunkQFSFTO7I_cjs = require('./chunk-QFSFTO7I.cjs');
9
9
  var chunkIN6ILI5A_cjs = require('./chunk-IN6ILI5A.cjs');
10
- var chunkPIJPM5RA_cjs = require('./chunk-PIJPM5RA.cjs');
10
+ var chunk3YGSCNXQ_cjs = require('./chunk-3YGSCNXQ.cjs');
11
11
  var chunkOYXWQTHF_cjs = require('./chunk-OYXWQTHF.cjs');
12
12
  var chunkS237ORM3_cjs = require('./chunk-S237ORM3.cjs');
13
13
  var chunkII2OEXHW_cjs = require('./chunk-II2OEXHW.cjs');
14
14
  var chunkFX3K6LNZ_cjs = require('./chunk-FX3K6LNZ.cjs');
15
15
  var chunkKD37PODE_cjs = require('./chunk-KD37PODE.cjs');
16
16
  var chunk3YEXZX4H_cjs = require('./chunk-3YEXZX4H.cjs');
17
- var chunk5FSULBPE_cjs = require('./chunk-5FSULBPE.cjs');
17
+ var chunkKC3HRFSO_cjs = require('./chunk-KC3HRFSO.cjs');
18
18
  var chunkAHDJXIUB_cjs = require('./chunk-AHDJXIUB.cjs');
19
19
  var chunkS3GVFAFB_cjs = require('./chunk-S3GVFAFB.cjs');
20
20
  var chunkIXCWZ4HC_cjs = require('./chunk-IXCWZ4HC.cjs');
21
- var chunkY3GJBLAI_cjs = require('./chunk-Y3GJBLAI.cjs');
22
- var chunkSQCCQU3K_cjs = require('./chunk-SQCCQU3K.cjs');
21
+ var chunkFSTIAEJW_cjs = require('./chunk-FSTIAEJW.cjs');
22
+ var chunkVOGIYFNN_cjs = require('./chunk-VOGIYFNN.cjs');
23
23
  var chunkDKY67DA6_cjs = require('./chunk-DKY67DA6.cjs');
24
24
  var chunkZQQVXRYZ_cjs = require('./chunk-ZQQVXRYZ.cjs');
25
25
  var chunkIPSHAMO2_cjs = require('./chunk-IPSHAMO2.cjs');
@@ -62,7 +62,7 @@ function resolveScopeInputs(workflow, inputs, scopeSource) {
62
62
  for (const field of workflow.inputs) {
63
63
  if (field.type !== "scope") continue;
64
64
  const raw = inputs[field.name];
65
- const scope = chunkSQCCQU3K_cjs.isWorkflowScope(raw) ? raw : { folders: [], labels: [] };
65
+ const scope = chunkVOGIYFNN_cjs.isWorkflowScope(raw) ? raw : { folders: [], labels: [] };
66
66
  next[field.name] = { ...scope, documents: scopeSource.resolveDocuments(scope) };
67
67
  }
68
68
  return next;
@@ -84,7 +84,7 @@ function workflowToSkillMarkdown(workflow) {
84
84
  if (workflow.landing !== "chat") lines.push(`landing: ${workflow.landing}`);
85
85
  if (workflow.requiresFiles) lines.push("requires_files: true");
86
86
  if (workflow.inputs.length > 0) {
87
- lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(chunkSQCCQU3K_cjs.fieldToFrontmatter))}`);
87
+ lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(chunkVOGIYFNN_cjs.fieldToFrontmatter))}`);
88
88
  }
89
89
  lines.push("---", "", run.promptTemplate.trim(), "");
90
90
  return lines.join("\n");
@@ -106,12 +106,12 @@ function workflowFromSkillMarkdown(id, text) {
106
106
  } else if (value === "true" || value === "false") frontmatter[key] = value === "true";
107
107
  else frontmatter[key] = value;
108
108
  }
109
- return chunkSQCCQU3K_cjs.workflowFromFrontmatter(id, frontmatter, body);
109
+ return chunkVOGIYFNN_cjs.workflowFromFrontmatter(id, frontmatter, body);
110
110
  }
111
111
  var errorMessage = (e) => e instanceof Error ? e.message : typeof e === "string" ? e : "Something went wrong.";
112
112
  function firstOpen(steps, states) {
113
113
  const open = steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? "pending"));
114
- return open?.id ?? (steps.length && chunkY3GJBLAI_cjs.isRunFinished(steps, states) ? null : steps[0]?.id ?? null);
114
+ return open?.id ?? (steps.length && chunkFSTIAEJW_cjs.isRunFinished(steps, states) ? null : steps[0]?.id ?? null);
115
115
  }
116
116
  function useWorkflowView(options) {
117
117
  const { steps, states, inputs, setInput, loaded = true } = options;
@@ -162,11 +162,11 @@ function useWorkflowView(options) {
162
162
  }),
163
163
  []
164
164
  );
165
- const action = busy ? "wait" : chunkY3GJBLAI_cjs.nextAction(steps, states, current, actionOptions(options));
165
+ const action = busy ? "wait" : chunkFSTIAEJW_cjs.nextAction(steps, states, current, actionOptions(options));
166
166
  const next = react.useCallback(async () => {
167
167
  const { steps: s, states: st, inputs: values } = optionsRef.current;
168
168
  const at = s.find((x) => x.id === current);
169
- const act2 = chunkY3GJBLAI_cjs.nextAction(s, st, current, actionOptions(optionsRef.current));
169
+ const act2 = chunkFSTIAEJW_cjs.nextAction(s, st, current, actionOptions(optionsRef.current));
170
170
  if (!at || act2 === "wait" || busy) return;
171
171
  setActionError(null);
172
172
  if (act2 === "finish") return setCurrent(null);
@@ -177,7 +177,7 @@ function useWorkflowView(options) {
177
177
  await (act2 === "start" ? optionsRef.current.start?.() : optionsRef.current.retry?.(at.id));
178
178
  return;
179
179
  }
180
- if (Object.keys(chunkY3GJBLAI_cjs.validateStep(at, values)).length > 0) {
180
+ if (Object.keys(chunkFSTIAEJW_cjs.validateStep(at, values)).length > 0) {
181
181
  setShowErrors(true);
182
182
  return;
183
183
  }
@@ -278,10 +278,10 @@ function useWorkflowView(options) {
278
278
  inputs,
279
279
  setInput,
280
280
  stateOf: (id) => states[id],
281
- phaseOf: (id) => chunkY3GJBLAI_cjs.stepPhase(steps, states, id),
282
- failedUpstreamOf: (id) => chunkY3GJBLAI_cjs.failedUpstream(steps, states, id),
281
+ phaseOf: (id) => chunkFSTIAEJW_cjs.stepPhase(steps, states, id),
282
+ failedUpstreamOf: (id) => chunkFSTIAEJW_cjs.failedUpstream(steps, states, id),
283
283
  isLocked,
284
- errors: showErrors && step && !isLocked(step.id) ? chunkY3GJBLAI_cjs.validateStep(step, inputs) : {},
284
+ errors: showErrors && step && !isLocked(step.id) ? chunkFSTIAEJW_cjs.validateStep(step, inputs) : {},
285
285
  busy,
286
286
  actionError,
287
287
  isRunning: Object.values(states).some((s) => s.status === "running"),
@@ -299,11 +299,11 @@ function useWorkflowView(options) {
299
299
  nameOf: options.nameOf,
300
300
  assigneeOf: (id) => {
301
301
  const s = steps.find((x) => x.id === id);
302
- if (!s || !chunkY3GJBLAI_cjs.canAssign(s)) return void 0;
303
- return chunkY3GJBLAI_cjs.assigneeName(s.assignee, {
302
+ if (!s || !chunkFSTIAEJW_cjs.canAssign(s)) return void 0;
303
+ return chunkFSTIAEJW_cjs.assigneeName(s.assignee, {
304
304
  nameOf: options.nameOf,
305
305
  inputs,
306
- fields: chunkY3GJBLAI_cjs.runFieldsOf(steps),
306
+ fields: chunkFSTIAEJW_cjs.runFieldsOf(steps),
307
307
  announcedTo: states[id]?.announcedTo
308
308
  });
309
309
  },
@@ -402,6 +402,9 @@ var DEFAULT_STEP_BAR_LABELS = {
402
402
  moreWorking: "+{count} working",
403
403
  failedStep: "Failed: {title}",
404
404
  waitingFor: "Waiting for {name}",
405
+ overview: "The whole workflow",
406
+ branchOptional: "Optional",
407
+ branchStarted: "Started",
405
408
  phases: {
406
409
  blocked: "Not started",
407
410
  ready: "To do",
@@ -435,6 +438,7 @@ function StepBarFrame({
435
438
  kindOf = () => "adhoc",
436
439
  disabled,
437
440
  maxSpan,
441
+ overview,
438
442
  labels,
439
443
  tid,
440
444
  className
@@ -462,6 +466,10 @@ function StepBarFrame({
462
466
  }
463
467
  const win = stepWindow({ levels, phaseOf, current, start, span });
464
468
  const [listOpen, setListOpen] = react.useState(null);
469
+ const [overviewOpen, setOverviewOpen] = react.useState(false);
470
+ react.useEffect(() => {
471
+ if (listOpen) setOverviewOpen(false);
472
+ }, [listOpen]);
465
473
  const move = (to) => setStart(Math.max(0, Math.min(win.levels.length - 1, to)));
466
474
  const keyMoved = react.useRef(false);
467
475
  react.useEffect(() => {
@@ -519,7 +527,7 @@ function StepBarFrame({
519
527
  phase === "blocked" && "opacity-60"
520
528
  ),
521
529
  "aria-hidden": true,
522
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkPIJPM5RA_cjs.StepBadgeMark, { phase, icon: icon?.(s) })
530
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunk3YGSCNXQ_cjs.StepBadgeMark, { phase, icon: icon?.(s) })
523
531
  }
524
532
  ),
525
533
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", title: s.title, children: s.title }),
@@ -635,7 +643,7 @@ function StepBarFrame({
635
643
  phase: kind === "working" ? "running" : "failed",
636
644
  className: "min-w-0 shrink",
637
645
  children: /* @__PURE__ */ jsxRuntime.jsx(
638
- chunkPIJPM5RA_cjs.StepChip,
646
+ chunk3YGSCNXQ_cjs.StepChip,
639
647
  {
640
648
  kind: kindOf(s),
641
649
  phase: kind === "working" ? "running" : "failed",
@@ -651,7 +659,7 @@ function StepBarFrame({
651
659
  s.id
652
660
  );
653
661
  const segment = (node, key, kind) => node ? /* @__PURE__ */ jsxRuntime.jsx(chunkI4IS6ST6_cjs.ProgressChevron, { kind, className: "shrink-0", children: node }, key) : null;
654
- return /* @__PURE__ */ jsxRuntime.jsxs(
662
+ const bar = /* @__PURE__ */ jsxRuntime.jsxs(
655
663
  "nav",
656
664
  {
657
665
  ref: box,
@@ -735,6 +743,28 @@ function StepBarFrame({
735
743
  ]
736
744
  }
737
745
  );
746
+ if (!overview) return bar;
747
+ return /* @__PURE__ */ jsxRuntime.jsxs(
748
+ ui.HoverCard,
749
+ {
750
+ open: overviewOpen,
751
+ onOpenChange: (o) => setOverviewOpen(o && listOpen === null),
752
+ openDelay: 300,
753
+ closeDelay: 150,
754
+ children: [
755
+ /* @__PURE__ */ jsxRuntime.jsx(ui.HoverCardTrigger, { asChild: true, children: bar }),
756
+ /* @__PURE__ */ jsxRuntime.jsx(
757
+ ui.HoverCardContent,
758
+ {
759
+ align: "start",
760
+ className: "max-h-[min(28rem,70vh)] w-80 overflow-y-auto p-1",
761
+ "data-testid": tid("overview-card"),
762
+ children: overview
763
+ }
764
+ )
765
+ ]
766
+ }
767
+ );
738
768
  }
739
769
  function GroupChip({
740
770
  level,
@@ -772,6 +802,144 @@ function GroupChip({
772
802
  )
773
803
  ] });
774
804
  }
805
+ function WorkflowOverview({
806
+ levels,
807
+ phaseOf,
808
+ current,
809
+ detailOf,
810
+ branchesOf,
811
+ icon,
812
+ kindOf = () => "adhoc",
813
+ onSelect,
814
+ labels: l,
815
+ tid
816
+ }) {
817
+ const row = (s) => {
818
+ const phase = phaseOf?.(s.id);
819
+ const detail = detailOf?.(s);
820
+ const branches = branchesOf?.(s) ?? [];
821
+ return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `wf-kind-${kindOf(s)}`, "data-testid": tid(`overview-${s.id}`), children: [
822
+ /* @__PURE__ */ jsxRuntime.jsxs(
823
+ "button",
824
+ {
825
+ type: "button",
826
+ disabled: !onSelect,
827
+ onClick: () => onSelect?.(s.id),
828
+ "aria-current": s.id === current ? "step" : void 0,
829
+ "data-phase": phase,
830
+ className: ui.cn(
831
+ "flex w-full min-w-0 items-center gap-2 rounded-md px-2 py-1 text-left text-xs enabled:hover:bg-accent disabled:cursor-default",
832
+ s.id === current && "bg-accent font-semibold"
833
+ ),
834
+ children: [
835
+ /* @__PURE__ */ jsxRuntime.jsx(
836
+ "span",
837
+ {
838
+ className: ui.cn(
839
+ "wf-badge flex size-5 shrink-0 items-center justify-center rounded-md [&_svg]:size-3",
840
+ phase === "done" && "bg-[hsl(var(--wf-accent))] text-card",
841
+ phase === "blocked" && "opacity-60"
842
+ ),
843
+ "aria-hidden": true,
844
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunk3YGSCNXQ_cjs.StepBadgeMark, { phase: phase ?? "blocked", icon: icon?.(s) })
845
+ }
846
+ ),
847
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1", children: [
848
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate", title: s.title, children: s.title }),
849
+ detail && /* @__PURE__ */ jsxRuntime.jsx(
850
+ "span",
851
+ {
852
+ className: "block truncate text-[10px] font-normal text-muted-foreground",
853
+ "data-testid": tid(`overview-${s.id}-detail`),
854
+ children: detail
855
+ }
856
+ )
857
+ ] }),
858
+ phase && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-[10px] font-normal text-muted-foreground", children: l.phases[phase] })
859
+ ]
860
+ }
861
+ ),
862
+ branches.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "ml-4 border-l border-dashed border-border pl-2", children: branches.map((b) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
863
+ "button",
864
+ {
865
+ type: "button",
866
+ disabled: !b.onSelect,
867
+ onClick: b.onSelect,
868
+ className: "flex w-full min-w-0 items-center gap-1.5 rounded-md px-2 py-0.5 text-left text-[11px] text-muted-foreground enabled:hover:bg-accent",
869
+ "data-testid": tid(`overview-${s.id}-branch-${b.key}`),
870
+ "data-taken": b.taken || void 0,
871
+ children: [
872
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CornerDownRight, { className: "size-3 shrink-0", "aria-hidden": true }),
873
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", title: b.text, children: b.text }),
874
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-[10px]", children: b.taken ? l.started : l.optional })
875
+ ]
876
+ }
877
+ ) }, b.key)) })
878
+ ] }, s.id);
879
+ };
880
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": tid("overview"), children: [
881
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-2 py-1 text-[11px] font-medium text-muted-foreground", children: l.heading }),
882
+ /* @__PURE__ */ jsxRuntime.jsx("ol", { children: levels.map((level, i) => /* @__PURE__ */ jsxRuntime.jsxs(
883
+ "li",
884
+ {
885
+ className: ui.cn(level.length > 1 && "my-0.5 border-l-2 border-border pl-1"),
886
+ children: [
887
+ level.length > 1 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-2 text-[10px] uppercase tracking-wide text-muted-foreground", children: l.inParallel }),
888
+ /* @__PURE__ */ jsxRuntime.jsx("ol", { children: level.map(row) })
889
+ ]
890
+ },
891
+ level.map((s) => s.id).join("+") || i
892
+ )) })
893
+ ] });
894
+ }
895
+ var fieldsOf = (steps) => steps.flatMap((s) => s.kind === "form" ? s.inputs : s.kind === "review" ? s.fields ?? [] : []);
896
+ var DEFAULT_STEP_BRANCH_WORDS = {
897
+ whenDone: "When done",
898
+ ifApproved: "If approved",
899
+ ifContains: "If the answer mentions \u201C{value}\u201D",
900
+ ifMatches: "If the answer matches {value}",
901
+ if: "If {field} is {value}"
902
+ };
903
+ function stepBranches(step, steps, options = {}) {
904
+ const w = { ...DEFAULT_STEP_BRANCH_WORDS, ...options.words };
905
+ const fields = fieldsOf(steps);
906
+ return (step.signals ?? []).map((sig) => {
907
+ const c = sig.when;
908
+ let when = w.whenDone;
909
+ if (c && "field" in c) {
910
+ const f = fields.find((x) => x.name === c.field);
911
+ const value = String(c.equals);
912
+ const opt = f?.options?.find((o) => o.value.toLowerCase() === value.toLowerCase());
913
+ when = w.if.replace("{field}", f?.label ?? c.field).replace("{value}", opt?.label ?? value);
914
+ } else if (c && "contains" in c) when = w.ifContains.replace("{value}", c.contains);
915
+ else if (c && "matches" in c) when = w.ifMatches.replace("{value}", c.matches);
916
+ else if (c && "approved" in c) when = w.ifApproved;
917
+ const targets = options.listeners?.(sig.name) ?? [];
918
+ const raised = options.raised?.(sig.name);
919
+ return {
920
+ key: sig.name,
921
+ text: `${when} \u2192 ${targets.length ? targets.join(", ") : sig.name}`,
922
+ taken: raised ? true : void 0,
923
+ onSelect: raised?.onSelect
924
+ };
925
+ });
926
+ }
927
+ function stepRunDetail(state, nameOf, locale) {
928
+ if (!state || state.status === "pending") return void 0;
929
+ const when = (iso) => {
930
+ const d = iso ? new Date(iso) : void 0;
931
+ return d && !Number.isNaN(d.getTime()) ? d.toLocaleString(locale, {
932
+ day: "numeric",
933
+ month: "short",
934
+ hour: "2-digit",
935
+ minute: "2-digit"
936
+ }) : void 0;
937
+ };
938
+ const who = state.by ? nameOf?.(state.by) ?? state.by : void 0;
939
+ const parts = state.status === "running" ? [when(state.startedAt) && `since ${when(state.startedAt)}`] : state.status === "failed" ? [state.error] : [who && `by ${who}`, when(state.at)];
940
+ const text = parts.filter(Boolean).join(" \xB7 ");
941
+ return text || void 0;
942
+ }
775
943
  var DEFAULT_WORKFLOW_STEP_PARTS_LABELS = {
776
944
  waitingFor: "Waiting for {name}",
777
945
  sendBack: "Send back",
@@ -812,7 +980,7 @@ var DEFAULT_WORKFLOW_STEP_PARTS_LABELS = {
812
980
  someone: "someone"
813
981
  };
814
982
  var docName = (ref, nameOfDoc) => {
815
- const { id, version } = chunkY3GJBLAI_cjs.splitDocRef(ref);
983
+ const { id, version } = chunkFSTIAEJW_cjs.splitDocRef(ref);
816
984
  const name = nameOfDoc?.(id) ?? id;
817
985
  return version ? `${name} \xB7 v${version}` : name;
818
986
  };
@@ -894,7 +1062,7 @@ function SendBackControl({
894
1062
  const states = Object.fromEntries(
895
1063
  run.steps.map((s) => [s.id, run.stateOf(s.id) ?? { status: "pending" }])
896
1064
  );
897
- const targets = chunkY3GJBLAI_cjs.sendBackTargets(run.steps, states, step.id);
1065
+ const targets = chunkFSTIAEJW_cjs.sendBackTargets(run.steps, states, step.id);
898
1066
  const [open, setOpen] = react.useState(false);
899
1067
  const [to, setTo] = react.useState(targets[0]?.id ?? "");
900
1068
  const [note, setNote] = react.useState("");
@@ -984,7 +1152,7 @@ function ApprovalEvidence({
984
1152
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex flex-wrap items-center gap-1.5 text-sm font-medium", children: [
985
1153
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "size-4 text-primary" }),
986
1154
  approver ? l.approvedBy.replace("{name}", approver) : null,
987
- state.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground", children: l.approvedAt.replace("{date}", chunkPIJPM5RA_cjs.formatDate(state.at)) })
1155
+ state.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground", children: l.approvedAt.replace("{date}", chunk3YGSCNXQ_cjs.formatDate(state.at)) })
988
1156
  ] }),
989
1157
  evidence.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
990
1158
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: l.approvedWhat }),
@@ -1017,7 +1185,7 @@ function ApprovalEvidence({
1017
1185
  ] }),
1018
1186
  (step.fields ?? []).length > 0 && /* @__PURE__ */ jsxRuntime.jsx("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 text-xs", children: (step.fields ?? []).map((f) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "contents", children: [
1019
1187
  /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: f.label }),
1020
- /* @__PURE__ */ jsxRuntime.jsx("dd", { "data-testid": `${testId}-evidence-field-${f.name}`, children: chunkPIJPM5RA_cjs.shownValue(run.inputs[f.name], f, run.nameOf) })
1188
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { "data-testid": `${testId}-evidence-field-${f.name}`, children: chunk3YGSCNXQ_cjs.shownValue(run.inputs[f.name], f, run.nameOf) })
1021
1189
  ] }, f.name)) })
1022
1190
  ] });
1023
1191
  }
@@ -1113,7 +1281,7 @@ function ActionStepBody({
1113
1281
  waiting?.expires_at && phase === "waiting" && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
1114
1282
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "size-3.5" }),
1115
1283
  " ",
1116
- l.expires.replace("{date}", chunkPIJPM5RA_cjs.formatDate(waiting.expires_at))
1284
+ l.expires.replace("{date}", chunk3YGSCNXQ_cjs.formatDate(waiting.expires_at))
1117
1285
  ] }),
1118
1286
  phase === "waiting" && mine && !declining && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-2", children: [
1119
1287
  actions?.sign && state && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1192,7 +1360,7 @@ function ActionStepBody({
1192
1360
  ] });
1193
1361
  } else if (a.type === "email_draft") {
1194
1362
  const draftId = state?.waiting?.draft_id ?? (typeof state?.output?.draft_id === "string" ? state.output.draft_id : void 0);
1195
- const gmailUrl = chunkSQCCQU3K_cjs.gmailDraftUrl(state?.waiting);
1363
+ const gmailUrl = chunkVOGIYFNN_cjs.gmailDraftUrl(state?.waiting);
1196
1364
  body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1197
1365
  underWay && working(l.preparingDraft),
1198
1366
  phase === "waiting" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: gmailUrl ? l.draftReadyInGmail : l.draftReady }),
@@ -1265,6 +1433,53 @@ function ActionStepBody({
1265
1433
  phase === "failed" && !state?.declinedBy && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive", "data-testid": `${testId}-failed`, children: state?.error || "" })
1266
1434
  ] });
1267
1435
  }
1436
+
1437
+ // src/agents/workflows/suggest.ts
1438
+ function lastJsonBlock(text) {
1439
+ if (!text) return void 0;
1440
+ const blocks = [...text.matchAll(/```(?:json)?\s*\n([\s\S]*?)```/gi)];
1441
+ for (let i = blocks.length - 1; i >= 0; i--) {
1442
+ try {
1443
+ const v = JSON.parse(blocks[i][1]);
1444
+ if (v && typeof v === "object" && !Array.isArray(v)) return v;
1445
+ } catch {
1446
+ }
1447
+ }
1448
+ return void 0;
1449
+ }
1450
+ function coerce(field, v) {
1451
+ if (v === null || v === void 0) return void 0;
1452
+ switch (field.type) {
1453
+ case "text":
1454
+ case "longtext":
1455
+ case "date":
1456
+ return typeof v === "string" || typeof v === "number" ? String(v).trim() || void 0 : void 0;
1457
+ case "number": {
1458
+ const n = typeof v === "number" ? v : typeof v === "string" ? Number(v) : NaN;
1459
+ return Number.isFinite(n) ? n : void 0;
1460
+ }
1461
+ case "boolean":
1462
+ return typeof v === "boolean" ? v : void 0;
1463
+ case "select": {
1464
+ const s = String(v).toLowerCase();
1465
+ return field.options?.find((o) => o.value.toLowerCase() === s || o.label.toLowerCase() === s)?.value;
1466
+ }
1467
+ default:
1468
+ return void 0;
1469
+ }
1470
+ }
1471
+ var isBlank = (v) => v === void 0 || v === "";
1472
+ function suggestedValues(fields, answer, current) {
1473
+ const block = lastJsonBlock(answer);
1474
+ const out = {};
1475
+ if (!block) return out;
1476
+ for (const f of fields) {
1477
+ if (!isBlank(current[f.name]) || !(f.name in block)) continue;
1478
+ const v = coerce(f, block[f.name]);
1479
+ if (v !== void 0) out[f.name] = v;
1480
+ }
1481
+ return out;
1482
+ }
1268
1483
  var DONE = "__done";
1269
1484
  function WorkflowStepBar({
1270
1485
  run,
@@ -1273,7 +1488,9 @@ function WorkflowStepBar({
1273
1488
  doneIcon,
1274
1489
  icon,
1275
1490
  tid,
1276
- labels
1491
+ labels,
1492
+ linkedFlows,
1493
+ nameOf
1277
1494
  }) {
1278
1495
  const l = { ...DEFAULT_STEP_BAR_LABELS, ...labels };
1279
1496
  const done = { id: DONE, title: doneTitle };
@@ -1290,7 +1507,7 @@ function WorkflowStepBar({
1290
1507
  const name = `${title} (${l.phases[phase]})`;
1291
1508
  if (s.id === DONE)
1292
1509
  return /* @__PURE__ */ jsxRuntime.jsx(
1293
- chunkPIJPM5RA_cjs.StepChip,
1510
+ chunk3YGSCNXQ_cjs.StepChip,
1294
1511
  {
1295
1512
  inert: true,
1296
1513
  kind: "start",
@@ -1304,17 +1521,17 @@ function WorkflowStepBar({
1304
1521
  "data-testid": tid("step-done")
1305
1522
  }
1306
1523
  );
1307
- const kind = chunkPIJPM5RA_cjs.stepKindOf(s);
1308
- const KindIcon = chunkPIJPM5RA_cjs.STEP_KIND_ICONS[kind];
1524
+ const kind = chunk3YGSCNXQ_cjs.stepKindOf(s);
1525
+ const KindIcon = chunk3YGSCNXQ_cjs.STEP_KIND_ICONS[kind];
1309
1526
  return /* @__PURE__ */ jsxRuntime.jsx(
1310
- chunkPIJPM5RA_cjs.StepChip,
1527
+ chunk3YGSCNXQ_cjs.StepChip,
1311
1528
  {
1312
1529
  kind,
1313
1530
  phase,
1314
1531
  icon: icon(s.icon) ?? /* @__PURE__ */ jsxRuntime.jsx(KindIcon, {}),
1315
1532
  label: s.title,
1316
1533
  current: isCurrent,
1317
- heading: chunkPIJPM5RA_cjs.DEFAULT_STEP_KIND_LABELS[kind],
1534
+ heading: chunk3YGSCNXQ_cjs.DEFAULT_STEP_KIND_LABELS[kind],
1318
1535
  labelClassName: isCurrent ? STEP_LABEL_CURRENT : ui.cn(STEP_LABEL, STEP_LABEL_MAX),
1319
1536
  labelTestId: tid(`step-${s.id}-label`),
1320
1537
  onClick: () => run.goTo(s.id),
@@ -1337,9 +1554,38 @@ function WorkflowStepBar({
1337
1554
  }
1338
1555
  );
1339
1556
  };
1557
+ const all = levels.flat();
1558
+ const overview = /* @__PURE__ */ jsxRuntime.jsx(
1559
+ WorkflowOverview,
1560
+ {
1561
+ levels,
1562
+ phaseOf,
1563
+ current,
1564
+ detailOf: (s) => stepRunDetail(run.stateOf(s.id), run.nameOf ?? nameOf),
1565
+ branchesOf: (s) => stepBranches(s, all, {
1566
+ listeners: linkedFlows
1567
+ // A raised signal is only known to the thread (`WorkflowThreadStrip`); a runner shows the plan.
1568
+ }),
1569
+ icon: (s) => {
1570
+ const KindIcon = chunk3YGSCNXQ_cjs.STEP_KIND_ICONS[chunk3YGSCNXQ_cjs.stepKindOf(s)];
1571
+ return icon(s.icon) ?? /* @__PURE__ */ jsxRuntime.jsx(KindIcon, {});
1572
+ },
1573
+ kindOf: chunk3YGSCNXQ_cjs.stepKindOf,
1574
+ onSelect: (id) => run.goTo(id),
1575
+ labels: {
1576
+ heading: l.overview,
1577
+ inParallel: l.inParallel,
1578
+ optional: l.branchOptional,
1579
+ started: l.branchStarted,
1580
+ phases: l.phases
1581
+ },
1582
+ tid
1583
+ }
1584
+ );
1340
1585
  return /* @__PURE__ */ jsxRuntime.jsx(
1341
1586
  StepBarFrame,
1342
1587
  {
1588
+ overview,
1343
1589
  levels: [...levels, [done]],
1344
1590
  phaseOf,
1345
1591
  current,
@@ -1347,7 +1593,7 @@ function WorkflowStepBar({
1347
1593
  isSelectable: (id) => id !== DONE,
1348
1594
  renderStep: (s) => pill(s),
1349
1595
  icon: (s) => s.id === DONE ? doneIcon : icon(s.icon),
1350
- kindOf: (s) => s.id === DONE ? "start" : chunkPIJPM5RA_cjs.stepKindOf(s),
1596
+ kindOf: (s) => s.id === DONE ? "start" : chunk3YGSCNXQ_cjs.stepKindOf(s),
1351
1597
  disabled: run.busy,
1352
1598
  labels,
1353
1599
  tid,
@@ -1377,6 +1623,7 @@ var DEFAULT_WORKFLOW_RUNNER_LABELS = {
1377
1623
  skipped: "Skipped.",
1378
1624
  branch: "Runs alongside; its result joins the thread",
1379
1625
  complete: "Done",
1626
+ suggested: "Filled in by AI from \u201C{step}\u201D: check each answer, then continue to confirm.",
1380
1627
  restart: "Start again",
1381
1628
  filesHeading: "Already in the workspace ({count})",
1382
1629
  addedHeading: "Added for this step ({count})",
@@ -1426,7 +1673,7 @@ function WorkflowRunner({
1426
1673
  const { steps, step, isComplete, action } = run;
1427
1674
  const completion = workflow.run.kind === "steps" ? workflow.run.completion : void 0;
1428
1675
  const tid = (suffix) => `${testIdPrefix}-${suffix}`;
1429
- const levels = chunkY3GJBLAI_cjs.stepLevels(steps);
1676
+ const levels = chunkFSTIAEJW_cjs.stepLevels(steps);
1430
1677
  const icon = (key) => key && renderIcon ? renderIcon(key) : void 0;
1431
1678
  const added = step?.kind === "upload" ? (files ?? []).filter((f) => f.addedFor === step.id) : [];
1432
1679
  const unread = added.filter((f) => f.status === "processing").length;
@@ -1434,7 +1681,16 @@ function WorkflowRunner({
1434
1681
  const sending = added.filter((f) => f.status === "uploading").length;
1435
1682
  const unsent = added.filter((f) => f.status === "upload-failed").length;
1436
1683
  const uploadHold = step?.kind === "upload" && (sending > 0 || uploading || unsent > 0);
1437
- const docsWait = !!step && chunkY3GJBLAI_cjs.waitingDocuments(run.stateOf(step.id)).length > 0;
1684
+ const suggestSource = step?.kind === "form" ? step.suggestFrom : void 0;
1685
+ const suggestAnswer = suggestSource ? run.stateOf(suggestSource)?.text : void 0;
1686
+ const [suggested, setSuggested] = react.useState({});
1687
+ react.useEffect(() => {
1688
+ if (step?.kind !== "form" || !suggestSource || !suggestAnswer || suggested[step.id]) return;
1689
+ const values = suggestedValues(step.inputs, suggestAnswer, run.inputs);
1690
+ setSuggested((s) => ({ ...s, [step.id]: Object.keys(values) }));
1691
+ for (const [name, value] of Object.entries(values)) run.setInput(name, value);
1692
+ }, [step, suggestSource, suggestAnswer]);
1693
+ const docsWait = !!step && chunkFSTIAEJW_cjs.waitingDocuments(run.stateOf(step.id)).length > 0;
1438
1694
  const nextLabel = sending ? sending === 1 ? l.uploadingFile : l.uploadingFiles.replace("{count}", String(sending)) : uploadHold && uploading ? l.uploadingAny : uploadHold ? unsent === 1 ? l.uploadFailed : l.uploadsFailed.replace("{count}", String(unsent)) : reading ? l.readingFiles.replace("{current}", String(Math.min(added.length - unread + 1, added.length))).replace("{count}", String(added.length)) : action === "start" ? l.start : action === "retry" ? l.retry : action === "finish" ? l.finish : action === "complete" && step?.kind === "review" ? l.approve : action === "complete" && step?.kind === "action" ? l.markSent : action === "wait" && (run.isRunning || run.busy || docsWait) ? l.working : (step && !run.isLocked(step.id) ? step.nextLabel : void 0) ?? l.next;
1439
1695
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn(compact ? "space-y-3" : "space-y-6", className), "data-testid": testIdPrefix, children: [
1440
1696
  !hideStepBar && /* @__PURE__ */ jsxRuntime.jsx(
@@ -1466,13 +1722,24 @@ function WorkflowRunner({
1466
1722
  /* @__PURE__ */ jsxRuntime.jsx(StepNotices, { run, step, l, tid }),
1467
1723
  run.phaseOf(step.id) === "blocked" ? /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { className: ui.cn(box, "p-6"), "data-testid": tid(step.id), children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", "data-testid": tid(`${step.id}-blocked`), children: l.blocked.replace(
1468
1724
  "{steps}",
1469
- chunkY3GJBLAI_cjs.stepDependencies(steps, step.id).map((d) => steps.find((s) => s.id === d)?.title ?? d).join(", ")
1725
+ chunkFSTIAEJW_cjs.stepDependencies(steps, step.id).map((d) => steps.find((s) => s.id === d)?.title ?? d).join(", ")
1470
1726
  ) }) }) : step.kind === "form" ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { className: ui.cn(box, "space-y-4"), "data-testid": tid(step.id), children: [
1471
1727
  /* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon: icon(step.icon), testId: tid(`${step.id}-title`) }),
1472
1728
  /* @__PURE__ */ jsxRuntime.jsx(SentBackNote, { state: run.stateOf(step.id), l: pl, testId: tid(step.id) }),
1473
1729
  /* @__PURE__ */ jsxRuntime.jsx(AssigneeLine, { run, stepId: step.id, l: pl, testId: tid(step.id) }),
1730
+ suggested[step.id]?.length ? /* @__PURE__ */ jsxRuntime.jsx(
1731
+ "p",
1732
+ {
1733
+ className: "rounded-md bg-muted/60 px-3 py-2 text-xs text-muted-foreground",
1734
+ "data-testid": tid(`${step.id}-suggested`),
1735
+ children: l.suggested.replace(
1736
+ "{step}",
1737
+ steps.find((s) => s.id === step.suggestFrom)?.title ?? ""
1738
+ )
1739
+ }
1740
+ ) : null,
1474
1741
  /* @__PURE__ */ jsxRuntime.jsx("fieldset", { disabled: run.isLocked(step.id), className: "contents", children: /* @__PURE__ */ jsxRuntime.jsx(
1475
- chunk5FSULBPE_cjs.SchemaForm,
1742
+ chunkKC3HRFSO_cjs.SchemaForm,
1476
1743
  {
1477
1744
  fields: step.inputs,
1478
1745
  values: run.inputs,
@@ -1518,11 +1785,11 @@ function WorkflowRunner({
1518
1785
  ] }) : step.kind === "review" ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { className: ui.cn(box, "space-y-4"), "data-testid": tid(step.id), children: [
1519
1786
  /* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon: icon(step.icon) }),
1520
1787
  /* @__PURE__ */ jsxRuntime.jsx(SentBackNote, { state: run.stateOf(step.id), l: pl, testId: tid(step.id) }),
1521
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-line text-sm text-muted-foreground", children: chunkY3GJBLAI_cjs.reviewInstructions(step, run.inputs) }),
1788
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-line text-sm text-muted-foreground", children: chunkFSTIAEJW_cjs.reviewInstructions(step, run.inputs) }),
1522
1789
  /* @__PURE__ */ jsxRuntime.jsx(AssigneeLine, { run, stepId: step.id, l: pl, testId: tid(step.id) }),
1523
1790
  !(run.phaseOf(step.id) === "done" && run.stateOf(step.id)?.by) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm", "data-testid": tid(`${step.id}-status`), children: run.phaseOf(step.id) === "done" ? l.approved : run.phaseOf(step.id) === "skipped" ? l.skipped : l.awaitingReview }),
1524
1791
  (step.fields ?? []).length > 0 && run.phaseOf(step.id) === "ready" && /* @__PURE__ */ jsxRuntime.jsx(
1525
- chunk5FSULBPE_cjs.SchemaForm,
1792
+ chunkKC3HRFSO_cjs.SchemaForm,
1526
1793
  {
1527
1794
  fields: step.fields ?? [],
1528
1795
  values: run.inputs,
@@ -1779,8 +2046,8 @@ function AgentStepBody({
1779
2046
  }) {
1780
2047
  const state = run.stateOf(step.id);
1781
2048
  const phase = run.phaseOf(step.id);
1782
- const pending = chunkY3GJBLAI_cjs.waitingDocuments(state);
1783
- const pendingNames = pending.flatMap((ref) => nameOfDoc?.(chunkY3GJBLAI_cjs.splitDocRef(ref).id) ?? []);
2049
+ const pending = chunkFSTIAEJW_cjs.waitingDocuments(state);
2050
+ const pendingNames = pending.flatMap((ref) => nameOfDoc?.(chunkFSTIAEJW_cjs.splitDocRef(ref).id) ?? []);
1784
2051
  const header = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
1785
2052
  /* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon }),
1786
2053
  phase === "failed" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: run.retry && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1863,7 +2130,7 @@ function StepNotices({
1863
2130
  l,
1864
2131
  tid
1865
2132
  }) {
1866
- const notStarted = !chunkY3GJBLAI_cjs.isPersonStep(step) && run.needsStart && run.phaseOf(step.id) === "ready";
2133
+ const notStarted = !chunkFSTIAEJW_cjs.isPersonStep(step) && run.needsStart && run.phaseOf(step.id) === "ready";
1867
2134
  const failed = run.failedUpstreamOf(step.id);
1868
2135
  if (!notStarted && failed.length === 0) return null;
1869
2136
  const why = (error) => error ? `: ${error}` : "";
@@ -1919,7 +2186,7 @@ var asForm = (step) => ({
1919
2186
  id: step.id,
1920
2187
  title: step.title,
1921
2188
  description: "",
1922
- inputs: chunkY3GJBLAI_cjs.stepFields(step),
2189
+ inputs: chunkFSTIAEJW_cjs.stepFields(step),
1923
2190
  run: { kind: "operation" },
1924
2191
  landing: "chat"
1925
2192
  });
@@ -2096,13 +2363,13 @@ function StepAction({
2096
2363
  onOpenReview,
2097
2364
  onOpenRequest
2098
2365
  }) {
2099
- const fields = chunkY3GJBLAI_cjs.stepFields(step);
2366
+ const fields = chunkFSTIAEJW_cjs.stepFields(step);
2100
2367
  const [values, setValues] = react.useState(
2101
- () => fields.length ? { ...chunkSQCCQU3K_cjs.defaultInputs(asForm(step)), ...inputs } : {}
2368
+ () => fields.length ? { ...chunkVOGIYFNN_cjs.defaultInputs(asForm(step)), ...inputs } : {}
2102
2369
  );
2103
2370
  const [open, setOpen] = react.useState(null);
2104
2371
  const [note, setNote] = react.useState("");
2105
- const targets = chunkY3GJBLAI_cjs.sendBackTargets(steps, states, step.id);
2372
+ const targets = chunkFSTIAEJW_cjs.sendBackTargets(steps, states, step.id);
2106
2373
  const [to, setTo] = react.useState(targets[0]?.id ?? "");
2107
2374
  const [busy, setBusy] = react.useState(false);
2108
2375
  const [error, setError] = react.useState(null);
@@ -2139,7 +2406,7 @@ function StepAction({
2139
2406
  const waiting = state?.waiting;
2140
2407
  if (phase !== "waiting") return null;
2141
2408
  if (step.action.type === "email_draft") {
2142
- const gmailUrl = chunkSQCCQU3K_cjs.gmailDraftUrl(waiting);
2409
+ const gmailUrl = chunkVOGIYFNN_cjs.gmailDraftUrl(waiting);
2143
2410
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 p-1", "data-testid": tid, children: [
2144
2411
  gmailUrl ? /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", variant: "outline", className: "w-full", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
2145
2412
  "a",
@@ -2301,10 +2568,10 @@ function StepAction({
2301
2568
  ] });
2302
2569
  }
2303
2570
  if (fields.length && open === "form") {
2304
- const errors = chunkSQCCQU3K_cjs.validateInputs(asForm(step), values);
2571
+ const errors = chunkVOGIYFNN_cjs.validateInputs(asForm(step), values);
2305
2572
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 p-1", "data-testid": tid, children: [
2306
2573
  /* @__PURE__ */ jsxRuntime.jsx(
2307
- chunk5FSULBPE_cjs.SchemaForm,
2574
+ chunkKC3HRFSO_cjs.SchemaForm,
2308
2575
  {
2309
2576
  fields,
2310
2577
  values,
@@ -2372,7 +2639,7 @@ function requiredLabelsOf(workflow) {
2372
2639
  return workflow.requiredLabels ?? [];
2373
2640
  }
2374
2641
  function unresolvedLabelRefs(workflow, ids = {}) {
2375
- return chunkY3GJBLAI_cjs.workflowSteps(workflow).flatMap(
2642
+ return chunkFSTIAEJW_cjs.workflowSteps(workflow).flatMap(
2376
2643
  (step) => step.kind === "action" && step.action.type === "tabular_review" ? step.action.tags.filter((t) => {
2377
2644
  const key = labelRefKey(t);
2378
2645
  return key !== void 0 && !ids[key];
@@ -3924,7 +4191,7 @@ var SKILL_FIELD_TYPE_LABELS = {
3924
4191
  person: "A person"
3925
4192
  };
3926
4193
  function buildLibrarySkills(builtins, listings) {
3927
- const { host, skills } = chunkSQCCQU3K_cjs.mergeSkillWorkflows(builtins, listings);
4194
+ const { host, skills } = chunkVOGIYFNN_cjs.mergeSkillWorkflows(builtins, listings);
3928
4195
  const builtinIds = new Set(builtins.map((w) => w.id));
3929
4196
  const stored = new Map(listings.filter((s) => s.doc_ext_id).map((s) => [s.slug, s]));
3930
4197
  return [...host, ...skills].flatMap((workflow) => {
@@ -4551,16 +4818,16 @@ var DEFAULT_RECURRENCE_BUILDER_LABELS = {
4551
4818
  var pad2 = (n) => String(n).padStart(2, "0");
4552
4819
  function RecurrenceBuilder({ rrule, onChange, testIds, labels }) {
4553
4820
  const l = { ...DEFAULT_RECURRENCE_BUILDER_LABELS, ...labels };
4554
- const [advanced, setAdvanced] = react.useState(() => !!rrule && chunk2K5DLB7B_cjs.parseRRule(rrule) === null);
4821
+ const [advanced, setAdvanced] = react.useState(() => !!rrule && chunkIOGN5UAT_cjs.parseRRule(rrule) === null);
4555
4822
  const [preset, setPreset] = react.useState(
4556
- () => chunk2K5DLB7B_cjs.parseRRule(rrule) ?? chunk2K5DLB7B_cjs.DEFAULT_RECURRENCE
4823
+ () => chunkIOGN5UAT_cjs.parseRRule(rrule) ?? chunkIOGN5UAT_cjs.DEFAULT_RECURRENCE
4557
4824
  );
4558
4825
  react.useEffect(() => {
4559
- if (!rrule) onChange(chunk2K5DLB7B_cjs.buildRRule(chunk2K5DLB7B_cjs.DEFAULT_RECURRENCE));
4826
+ if (!rrule) onChange(chunkIOGN5UAT_cjs.buildRRule(chunkIOGN5UAT_cjs.DEFAULT_RECURRENCE));
4560
4827
  }, []);
4561
4828
  const update = (next) => {
4562
4829
  setPreset(next);
4563
- onChange(chunk2K5DLB7B_cjs.buildRRule(next));
4830
+ onChange(chunkIOGN5UAT_cjs.buildRRule(next));
4564
4831
  };
4565
4832
  const toggleWeekday = (day) => {
4566
4833
  const has = preset.weekdays.includes(day);
@@ -4590,9 +4857,9 @@ function RecurrenceBuilder({ rrule, onChange, testIds, labels }) {
4590
4857
  type: "button",
4591
4858
  className: "text-sm text-muted-foreground hover:text-foreground",
4592
4859
  onClick: () => {
4593
- const parsed = chunk2K5DLB7B_cjs.parseRRule(rrule);
4594
- setPreset(parsed ?? chunk2K5DLB7B_cjs.DEFAULT_RECURRENCE);
4595
- if (!parsed) onChange(chunk2K5DLB7B_cjs.buildRRule(chunk2K5DLB7B_cjs.DEFAULT_RECURRENCE));
4860
+ const parsed = chunkIOGN5UAT_cjs.parseRRule(rrule);
4861
+ setPreset(parsed ?? chunkIOGN5UAT_cjs.DEFAULT_RECURRENCE);
4862
+ if (!parsed) onChange(chunkIOGN5UAT_cjs.buildRRule(chunkIOGN5UAT_cjs.DEFAULT_RECURRENCE));
4596
4863
  setAdvanced(false);
4597
4864
  },
4598
4865
  "data-testid": chunkPLIF5CUV_cjs.testIdOr(testIds?.simple, { testId: "task-recurrence-simple" }),
@@ -4670,7 +4937,7 @@ function RecurrenceBuilder({ rrule, onChange, testIds, labels }) {
4670
4937
  ] }),
4671
4938
  preset.frequency === "weekly" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
4672
4939
  /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { children: l.on }),
4673
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1", children: chunk2K5DLB7B_cjs.WEEKDAYS.map((day) => /* @__PURE__ */ jsxRuntime.jsx(
4940
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1", children: chunkIOGN5UAT_cjs.WEEKDAYS.map((day) => /* @__PURE__ */ jsxRuntime.jsx(
4674
4941
  ui.Button,
4675
4942
  {
4676
4943
  type: "button",
@@ -4860,12 +5127,12 @@ function TaskStatusPill({
4860
5127
  hint
4861
5128
  }) {
4862
5129
  const l = { ...DEFAULT_TASK_STATUS_PILL_LABELS, ...labels };
4863
- const key = chunkBH322H5B_cjs.asTaskStatus(status);
5130
+ const key = chunkZLMWMAID_cjs.asTaskStatus(status);
4864
5131
  const generating = key === "generating";
4865
5132
  const now = useNow(generating && Boolean(runStartedAt));
4866
5133
  const started = runStartedAt ? Date.parse(runStartedAt) : NaN;
4867
- let text = chunkBH322H5B_cjs.STATUS_LABELS[key];
4868
- let tone = chunkBH322H5B_cjs.STATUS_TONE[key];
5134
+ let text = chunkZLMWMAID_cjs.STATUS_LABELS[key];
5135
+ let tone = chunkZLMWMAID_cjs.STATUS_TONE[key];
4869
5136
  if (awaitingAccess) {
4870
5137
  text = l.waitingForAccess;
4871
5138
  tone = "danger";
@@ -5206,9 +5473,9 @@ var WIDTH_RULES = [
5206
5473
  function statusHint(task, ctx) {
5207
5474
  const { props: p, l } = ctx;
5208
5475
  if (!p.formatRelative || !task.updated_at) return void 0;
5209
- const key = chunkBH322H5B_cjs.asTaskStatus(task.status);
5476
+ const key = chunkZLMWMAID_cjs.asTaskStatus(task.status);
5210
5477
  const pill = { ...DEFAULT_TASK_STATUS_PILL_LABELS, ...p.statusPillLabels };
5211
- const label = task.pending_auth_request_id ? pill.waitingForAccess : chunkBH322H5B_cjs.STATUS_LABELS[key];
5478
+ const label = task.pending_auth_request_id ? pill.waitingForAccess : chunkZLMWMAID_cjs.STATUS_LABELS[key];
5212
5479
  return l.statusHint(label, p.formatRelative(task.updated_at));
5213
5480
  }
5214
5481
  function TaskTable(props) {
@@ -5216,7 +5483,7 @@ function TaskTable(props) {
5216
5483
  const l = {
5217
5484
  ...DEFAULT_TASK_LIST_LABELS,
5218
5485
  ...props.labels,
5219
- status: { ...chunkBH322H5B_cjs.STATUS_LABELS, ...props.labels?.status }
5486
+ status: { ...chunkZLMWMAID_cjs.STATUS_LABELS, ...props.labels?.status }
5220
5487
  };
5221
5488
  const [filter, setFilter] = react.useState("all");
5222
5489
  const [query, setQuery] = react.useState("");
@@ -5228,14 +5495,14 @@ function TaskTable(props) {
5228
5495
  const apiRef = react.useRef(null);
5229
5496
  const [narrow, setNarrow] = react.useState(false);
5230
5497
  const rowCache = react.useRef(/* @__PURE__ */ new Map());
5231
- const tree = react.useMemo(() => chunkBH322H5B_cjs.indexTasks(tasks), [tasks]);
5498
+ const tree = react.useMemo(() => chunkZLMWMAID_cjs.indexTasks(tasks), [tasks]);
5232
5499
  const peopleNames = react.useMemo(
5233
5500
  () => new Map((props.people ?? []).map((p) => [p.id, p.label])),
5234
5501
  [props.people]
5235
5502
  );
5236
5503
  const nameOf = (task) => task.title?.trim() || task.workflow_ext_id && props.workflowNames?.[task.workflow_ext_id] || l.untitled;
5237
5504
  const owner = (task) => {
5238
- const id = chunkBH322H5B_cjs.ownerExtId(task);
5505
+ const id = chunkZLMWMAID_cjs.ownerExtId(task);
5239
5506
  const mine = task.is_owner !== false;
5240
5507
  return {
5241
5508
  id,
@@ -5255,13 +5522,13 @@ function TaskTable(props) {
5255
5522
  const renderPerson = (person) => /* @__PURE__ */ jsxRuntime.jsx(chunkKD37PODE_cjs.PersonPill, { person });
5256
5523
  const q = (query.trim() || (props.filterText ?? "").trim()).toLowerCase();
5257
5524
  const counts = react.useMemo(() => {
5258
- const map = new Map(chunkBH322H5B_cjs.STATUS_ORDER.map((s) => [s, 0]));
5525
+ const map = new Map(chunkZLMWMAID_cjs.STATUS_ORDER.map((s) => [s, 0]));
5259
5526
  let all = 0;
5260
5527
  for (const task of tasks) {
5261
5528
  const text = `${nameOf(task)} ${task.description ?? ""}`.toLowerCase();
5262
5529
  if (q && !text.includes(q)) continue;
5263
5530
  all += 1;
5264
- const s = chunkBH322H5B_cjs.asTaskStatus(task.status);
5531
+ const s = chunkZLMWMAID_cjs.asTaskStatus(task.status);
5265
5532
  map.set(s, (map.get(s) ?? 0) + 1);
5266
5533
  }
5267
5534
  map.set("all", all);
@@ -5283,7 +5550,7 @@ function TaskTable(props) {
5283
5550
  case "due":
5284
5551
  return t.due_at ? Date.parse(t.due_at) : Number.POSITIVE_INFINITY;
5285
5552
  default:
5286
- return chunkBH322H5B_cjs.STATUS_ORDER.indexOf(chunkBH322H5B_cjs.asTaskStatus(t.status));
5553
+ return chunkZLMWMAID_cjs.STATUS_ORDER.indexOf(chunkZLMWMAID_cjs.asTaskStatus(t.status));
5287
5554
  }
5288
5555
  };
5289
5556
  const key = (t) => {
@@ -5311,7 +5578,7 @@ function TaskTable(props) {
5311
5578
  l.untitled
5312
5579
  ]);
5313
5580
  const rows = react.useMemo(
5314
- () => chunkBH322H5B_cjs.buildTaskRows(tasks, filter, collapsed, compare, {
5581
+ () => chunkZLMWMAID_cjs.buildTaskRows(tasks, filter, collapsed, compare, {
5315
5582
  query: query.trim() || props.filterText,
5316
5583
  titleOf: nameOf,
5317
5584
  cache: rowCache.current
@@ -5336,7 +5603,7 @@ function TaskTable(props) {
5336
5603
  [selectedTasks, selectedIds, tree]
5337
5604
  );
5338
5605
  const markable = selectedTasks.filter(
5339
- (t) => t.status != null && (t.is_owner !== false || props.canEditShared) && chunkBH322H5B_cjs.isPlainTodo(t) && chunkBH322H5B_cjs.asTaskStatus(t.status) !== "done"
5606
+ (t) => t.status != null && (t.is_owner !== false || props.canEditShared) && chunkZLMWMAID_cjs.isPlainTodo(t) && chunkZLMWMAID_cjs.asTaskStatus(t.status) !== "done"
5340
5607
  );
5341
5608
  const deletable = selectedTasks.filter((t) => chunkDKY67DA6_cjs.canDeleteThread(t, Boolean(props.isWorkspaceOwner)));
5342
5609
  const rowsRef = react.useRef(rows);
@@ -5351,11 +5618,11 @@ function TaskTable(props) {
5351
5618
  const next = new Set(prev);
5352
5619
  for (const id of added) {
5353
5620
  next.add(id);
5354
- for (const d of chunkBH322H5B_cjs.descendantIds(tree, id)) next.add(d);
5621
+ for (const d of chunkZLMWMAID_cjs.descendantIds(tree, id)) next.add(d);
5355
5622
  }
5356
5623
  for (const id of removed) {
5357
5624
  next.delete(id);
5358
- for (const d of chunkBH322H5B_cjs.descendantIds(tree, id)) next.delete(d);
5625
+ for (const d of chunkZLMWMAID_cjs.descendantIds(tree, id)) next.delete(d);
5359
5626
  for (let at = tree.parentOf.get(id); at; at = tree.parentOf.get(at)) next.delete(at);
5360
5627
  }
5361
5628
  return next;
@@ -5382,8 +5649,8 @@ function TaskTable(props) {
5382
5649
  const { l: lb, props: p, nameOf: name } = latest.current;
5383
5650
  const { task, depth, childStats, expanded } = row;
5384
5651
  const id = task.external_id;
5385
- const status = chunkBH322H5B_cjs.asTaskStatus(task.status);
5386
- const goal = chunkBH322H5B_cjs.goalProgress(task);
5652
+ const status = chunkZLMWMAID_cjs.asTaskStatus(task.status);
5653
+ const goal = chunkZLMWMAID_cjs.goalProgress(task);
5387
5654
  const workflowName = task.workflow_ext_id ? p.workflowNames?.[task.workflow_ext_id] : null;
5388
5655
  return /* @__PURE__ */ jsxRuntime.jsxs(
5389
5656
  "div",
@@ -5482,7 +5749,7 @@ function TaskTable(props) {
5482
5749
  const { l: lb, props: p } = latest.current;
5483
5750
  const { task } = row;
5484
5751
  const dueMs = task.due_at ? Date.parse(task.due_at) : NaN;
5485
- const overdue = chunkBH322H5B_cjs.asTaskStatus(task.status) !== "done" && !Number.isNaN(dueMs) && dueMs < Date.now();
5752
+ const overdue = chunkZLMWMAID_cjs.asTaskStatus(task.status) !== "done" && !Number.isNaN(dueMs) && dueMs < Date.now();
5486
5753
  return /* @__PURE__ */ jsxRuntime.jsx(
5487
5754
  "span",
5488
5755
  {
@@ -5529,7 +5796,7 @@ function TaskTable(props) {
5529
5796
  TaskStatusPill,
5530
5797
  {
5531
5798
  id: row.external_id,
5532
- status: chunkBH322H5B_cjs.asTaskStatus(row.task.status),
5799
+ status: chunkZLMWMAID_cjs.asTaskStatus(row.task.status),
5533
5800
  runStartedAt: row.task.run_started_at,
5534
5801
  lastError: row.task.last_error,
5535
5802
  awaitingAccess: Boolean(row.task.pending_auth_request_id),
@@ -5541,7 +5808,7 @@ function TaskTable(props) {
5541
5808
  const { l: lb, props: p } = latest.current;
5542
5809
  const { task } = row;
5543
5810
  const id = task.external_id;
5544
- const status = chunkBH322H5B_cjs.asTaskStatus(task.status);
5811
+ const status = chunkZLMWMAID_cjs.asTaskStatus(task.status);
5545
5812
  const busy = p.busyId === id;
5546
5813
  const isOwner = task.is_owner !== false;
5547
5814
  const canEdit = isOwner || Boolean(p.canEditShared);
@@ -5656,7 +5923,7 @@ function TaskTable(props) {
5656
5923
  [animate]
5657
5924
  );
5658
5925
  const clearSelection = () => setSelectedIds(/* @__PURE__ */ new Set());
5659
- const filterKeys = ["all", ...chunkBH322H5B_cjs.STATUS_ORDER].filter(
5926
+ const filterKeys = ["all", ...chunkZLMWMAID_cjs.STATUS_ORDER].filter(
5660
5927
  (key) => key !== "chat" || (counts.get(key) ?? 0) > 0
5661
5928
  );
5662
5929
  const hasChildren = tree.kids.size > 0;
@@ -5814,7 +6081,7 @@ function TaskTable(props) {
5814
6081
  {
5815
6082
  open: true,
5816
6083
  onOpenChange: (open) => !open && setMoving(null),
5817
- options: chunkBH322H5B_cjs.moveTargets(tasks, moving).map((t) => ({ id: t.external_id, label: nameOf(t) })),
6084
+ options: chunkZLMWMAID_cjs.moveTargets(tasks, moving).map((t) => ({ id: t.external_id, label: nameOf(t) })),
5818
6085
  currentParentId: moving.parent_conversation_ext_id,
5819
6086
  onPick: (parentId) => props.onMove?.(moving, parentId),
5820
6087
  labels: {
@@ -5936,7 +6203,7 @@ function ConversationListView(p) {
5936
6203
  }
5937
6204
  ),
5938
6205
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0", children: liveProps.current.renderThread ? liveProps.current.renderThread(data) : /* @__PURE__ */ jsxRuntime.jsx(
5939
- chunk2K5DLB7B_cjs.EntityChip,
6206
+ chunkIOGN5UAT_cjs.EntityChip,
5940
6207
  {
5941
6208
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquare, { className: "size-4", "aria-hidden": true }),
5942
6209
  label: data.title?.trim() || "Untitled thread",
@@ -6199,12 +6466,12 @@ function taskActivityHeadline(e, labels = DEFAULT_TASK_ACTIVITY_LABELS, agentNam
6199
6466
  case "step_skipped":
6200
6467
  return "Step skipped";
6201
6468
  case "step_waiting": {
6202
- const documents = chunkY3GJBLAI_cjs.eventWaitingDocuments(detail);
6203
- return documents ? chunkY3GJBLAI_cjs.waitingForDocumentsText(documents.length) : "Waiting on people";
6469
+ const documents = chunkFSTIAEJW_cjs.eventWaitingDocuments(detail);
6470
+ return documents ? chunkFSTIAEJW_cjs.waitingForDocumentsText(documents.length) : "Waiting on people";
6204
6471
  }
6205
6472
  case "step_progress": {
6206
- const documents = chunkY3GJBLAI_cjs.eventWaitingDocuments(detail);
6207
- return documents ? chunkY3GJBLAI_cjs.waitingForDocumentsText(documents.length) : detail.signed ? "Signed" : "Step moved on";
6473
+ const documents = chunkFSTIAEJW_cjs.eventWaitingDocuments(detail);
6474
+ return documents ? chunkFSTIAEJW_cjs.waitingForDocumentsText(documents.length) : detail.signed ? "Signed" : "Step moved on";
6208
6475
  }
6209
6476
  case "step_sent_back":
6210
6477
  return "Sent the work back";
@@ -6359,10 +6626,10 @@ function WorkflowRunStatus({
6359
6626
  testId = "workflow-run-status"
6360
6627
  }) {
6361
6628
  const l = { ...DEFAULT_WORKFLOW_RUN_STATUS_LABELS, ...labels };
6362
- const ordered = chunkY3GJBLAI_cjs.stepLevels(steps).flat();
6363
- const phaseOf = (id) => isLoading ? "blocked" : chunkY3GJBLAI_cjs.stepPhase(steps, states, id);
6364
- const finished = !isLoading && chunkY3GJBLAI_cjs.isRunFinished(steps, states);
6365
- const atId = finished || isLoading ? void 0 : activeStepId(chunkY3GJBLAI_cjs.stepLevels(steps), phaseOf);
6629
+ const ordered = chunkFSTIAEJW_cjs.stepLevels(steps).flat();
6630
+ const phaseOf = (id) => isLoading ? "blocked" : chunkFSTIAEJW_cjs.stepPhase(steps, states, id);
6631
+ const finished = !isLoading && chunkFSTIAEJW_cjs.isRunFinished(steps, states);
6632
+ const atId = finished || isLoading ? void 0 : activeStepId(chunkFSTIAEJW_cjs.stepLevels(steps), phaseOf);
6366
6633
  const at = ordered.find((s) => s.id === atId);
6367
6634
  const phase = at ? phaseOf(at.id) : "done";
6368
6635
  const assignee = at && ["ready", "waiting"].includes(phase) ? assigneeOf?.(at) : void 0;
@@ -6394,7 +6661,7 @@ function WorkflowRunStatus({
6394
6661
  "span",
6395
6662
  {
6396
6663
  className: ui.cn(
6397
- `wf-kind-${chunkPIJPM5RA_cjs.stepKindOf(s)}`,
6664
+ `wf-kind-${chunk3YGSCNXQ_cjs.stepKindOf(s)}`,
6398
6665
  "h-1.5 w-3 shrink-0 rounded-full",
6399
6666
  SEGMENT[phaseOf(s.id)],
6400
6667
  s.id === atId && "w-5"
@@ -6440,7 +6707,7 @@ function groupThreadActivity(steps, items) {
6440
6707
  continue;
6441
6708
  }
6442
6709
  if (current === void 0) out.before.push(item);
6443
- else if (chunkY3GJBLAI_cjs.isRunFinished(steps, states)) out.after.push(item);
6710
+ else if (chunkFSTIAEJW_cjs.isRunFinished(steps, states)) out.after.push(item);
6444
6711
  else {
6445
6712
  const status = states[current]?.status;
6446
6713
  const at = status === "done" || status === "skipped" ? steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? ""))?.id ?? current : current;
@@ -6463,9 +6730,9 @@ var DEFAULT_WORKFLOW_THREAD_STRIP_LABELS = {
6463
6730
  after: "After",
6464
6731
  beforeSteps: "Before the first step",
6465
6732
  afterSteps: "After the last step",
6466
- kinds: chunkPIJPM5RA_cjs.DEFAULT_STEP_KIND_LABELS,
6467
- documents: chunkPIJPM5RA_cjs.DEFAULT_STEP_DOCUMENT_LABELS,
6468
- record: chunkPIJPM5RA_cjs.DEFAULT_STEP_RECORD_LABELS
6733
+ kinds: chunk3YGSCNXQ_cjs.DEFAULT_STEP_KIND_LABELS,
6734
+ documents: chunk3YGSCNXQ_cjs.DEFAULT_STEP_DOCUMENT_LABELS,
6735
+ record: chunk3YGSCNXQ_cjs.DEFAULT_STEP_RECORD_LABELS
6469
6736
  };
6470
6737
  function WorkflowThreadStartedBy({
6471
6738
  origin,
@@ -6596,7 +6863,7 @@ function EntriesChip({
6596
6863
  const latest = items.at(-1);
6597
6864
  return /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
6598
6865
  /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
6599
- chunkPIJPM5RA_cjs.StepChip,
6866
+ chunk3YGSCNXQ_cjs.StepChip,
6600
6867
  {
6601
6868
  kind,
6602
6869
  phase: "ready",
@@ -6633,6 +6900,7 @@ function WorkflowThreadStrip({
6633
6900
  labels,
6634
6901
  barLabels,
6635
6902
  maxSpan,
6903
+ linkedFlows,
6636
6904
  current,
6637
6905
  onSelectStep,
6638
6906
  className
@@ -6647,17 +6915,17 @@ function WorkflowThreadStrip({
6647
6915
  setOpen(id);
6648
6916
  onSelectStep?.(id);
6649
6917
  };
6650
- const phaseOf = (id) => chunkY3GJBLAI_cjs.stepPhase(steps, states, id);
6918
+ const phaseOf = (id) => chunkFSTIAEJW_cjs.stepPhase(steps, states, id);
6651
6919
  const iconOf = (step) => step.icon && renderIcon ? renderIcon(step.icon) : void 0;
6652
6920
  const glyphOf = (step) => {
6653
- const KindIcon = chunkPIJPM5RA_cjs.STEP_KIND_ICONS[chunkPIJPM5RA_cjs.stepKindOf(step)];
6921
+ const KindIcon = chunk3YGSCNXQ_cjs.STEP_KIND_ICONS[chunk3YGSCNXQ_cjs.stepKindOf(step)];
6654
6922
  return iconOf(step) ?? /* @__PURE__ */ jsxRuntime.jsx(KindIcon, {});
6655
6923
  };
6656
6924
  const waitingOf = (id) => {
6657
6925
  const step = steps.find((s) => s.id === id);
6658
6926
  const phase = phaseOf(id);
6659
- const documents = chunkY3GJBLAI_cjs.waitingDocuments(states[id]);
6660
- if (documents.length) return chunkY3GJBLAI_cjs.waitingForDocumentsText(documents.length);
6927
+ const documents = chunkFSTIAEJW_cjs.waitingDocuments(states[id]);
6928
+ if (documents.length) return chunkFSTIAEJW_cjs.waitingForDocumentsText(documents.length);
6661
6929
  const name = step && (phase === "ready" || phase === "waiting") ? assigneeOf?.(step) : void 0;
6662
6930
  return name ? l.waitingFor.replace("{name}", name) : void 0;
6663
6931
  };
@@ -6667,8 +6935,8 @@ function WorkflowThreadStrip({
6667
6935
  const assignee = phase === "ready" || phase === "waiting" ? assigneeOf?.(step) : void 0;
6668
6936
  const waiting = waitingOf(step.id);
6669
6937
  const sentBack = states[step.id]?.sentBack;
6670
- const kind = chunkPIJPM5RA_cjs.stepKindOf(step);
6671
- const documents = chunkPIJPM5RA_cjs.stepDocuments(steps, states, step.id);
6938
+ const kind = chunk3YGSCNXQ_cjs.stepKindOf(step);
6939
+ const documents = chunk3YGSCNXQ_cjs.stepDocuments(steps, states, step.id);
6672
6940
  const latestDoc = onOpenDocument ? documents.at(-1) : void 0;
6673
6941
  const finished = ["done", "skipped", "failed"].includes(phase);
6674
6942
  const chip = /* @__PURE__ */ jsxRuntime.jsxs(
@@ -6681,7 +6949,7 @@ function WorkflowThreadStrip({
6681
6949
  },
6682
6950
  children: [
6683
6951
  /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
6684
- chunkPIJPM5RA_cjs.StepChip,
6952
+ chunk3YGSCNXQ_cjs.StepChip,
6685
6953
  {
6686
6954
  kind,
6687
6955
  phase,
@@ -6730,7 +6998,7 @@ function WorkflowThreadStrip({
6730
6998
  ),
6731
6999
  sentBack && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 text-xs text-amber-700 dark:text-amber-300", children: l.sentBack }),
6732
7000
  /* @__PURE__ */ jsxRuntime.jsx(
6733
- chunkPIJPM5RA_cjs.StepDocumentCards,
7001
+ chunk3YGSCNXQ_cjs.StepDocumentCards,
6734
7002
  {
6735
7003
  refs: documents,
6736
7004
  heading: step.kind === "review" ? phase === "done" ? l.documents.approved : l.documents.toApprove : l.documents.produced,
@@ -6741,7 +7009,7 @@ function WorkflowThreadStrip({
6741
7009
  }
6742
7010
  ),
6743
7011
  /* @__PURE__ */ jsxRuntime.jsx(
6744
- chunkPIJPM5RA_cjs.StepRecord,
7012
+ chunk3YGSCNXQ_cjs.StepRecord,
6745
7013
  {
6746
7014
  step,
6747
7015
  state: states[step.id],
@@ -6774,10 +7042,10 @@ function WorkflowThreadStrip({
6774
7042
  return latestDoc ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center", children: [
6775
7043
  chip,
6776
7044
  /* @__PURE__ */ jsxRuntime.jsx(
6777
- chunkPIJPM5RA_cjs.StepDocumentButton,
7045
+ chunk3YGSCNXQ_cjs.StepDocumentButton,
6778
7046
  {
6779
7047
  kind,
6780
- name: nameOfDoc?.(chunkY3GJBLAI_cjs.splitDocRef(latestDoc).id) ?? latestDoc,
7048
+ name: nameOfDoc?.(chunkFSTIAEJW_cjs.splitDocRef(latestDoc).id) ?? latestDoc,
6781
7049
  onOpen: () => onOpenDocument?.(latestDoc),
6782
7050
  testId: `workflow-thread-step-${step.id}-open-document`
6783
7051
  }
@@ -6810,17 +7078,44 @@ function WorkflowThreadStrip({
6810
7078
  ),
6811
7079
  strays.map((s) => /* @__PURE__ */ jsxRuntime.jsx(SignalPill, { signal: s, l }, `${s.step}-${s.signal}`))
6812
7080
  ] }) : null;
6813
- const at = steps.find((s) => s.id === (selected ?? activeStepId(chunkY3GJBLAI_cjs.stepLevels(steps), phaseOf)));
6814
- const headingPx = (step) => `${l.kinds[chunkPIJPM5RA_cjs.stepKindOf(step)]} \xB7 ${waitingOf(step.id) ?? ""}`.length * 5.6 - step.title.length * 6.5;
7081
+ const at = steps.find((s) => s.id === (selected ?? activeStepId(chunkFSTIAEJW_cjs.stepLevels(steps), phaseOf)));
7082
+ const headingPx = (step) => `${l.kinds[chunk3YGSCNXQ_cjs.stepKindOf(step)]} \xB7 ${waitingOf(step.id) ?? ""}`.length * 5.6 - step.title.length * 6.5;
6815
7083
  const reserve = {
6816
- always: (at ? Math.max(0, headingPx(at)) : 0) + steps.filter((s) => grouped.byStep[s.id]?.length).length * BEADS_PX + (onOpenDocument ? steps.filter((s) => chunkPIJPM5RA_cjs.stepDocuments(steps, states, s.id).length).length * DOC_BUTTON_PX : 0),
7084
+ always: (at ? Math.max(0, headingPx(at)) : 0) + steps.filter((s) => grouped.byStep[s.id]?.length).length * BEADS_PX + (onOpenDocument ? steps.filter((s) => chunk3YGSCNXQ_cjs.stepDocuments(steps, states, s.id).length).length * DOC_BUTTON_PX : 0),
6817
7085
  leading: leading ? 150 : 0,
6818
7086
  trailing: trailing ? 120 : 0
6819
7087
  };
6820
7088
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("min-w-0 flex-1", className), "data-testid": "workflow-thread-strip", children: /* @__PURE__ */ jsxRuntime.jsx(
6821
7089
  StepBarFrame,
6822
7090
  {
6823
- levels: chunkY3GJBLAI_cjs.stepLevels(steps),
7091
+ overview: /* @__PURE__ */ jsxRuntime.jsx(
7092
+ WorkflowOverview,
7093
+ {
7094
+ levels: chunkFSTIAEJW_cjs.stepLevels(steps),
7095
+ phaseOf,
7096
+ current: selected,
7097
+ detailOf: (s) => stepRunDetail(states[s.id], nameOf),
7098
+ branchesOf: (s) => stepBranches(s, steps, {
7099
+ listeners: linkedFlows,
7100
+ raised: (signal) => {
7101
+ const hit = signals.find((x) => x.step === s.id && x.signal === signal);
7102
+ return hit ? { onSelect: hit.runs[0]?.onSelect } : void 0;
7103
+ }
7104
+ }),
7105
+ icon: glyphOf,
7106
+ kindOf: chunk3YGSCNXQ_cjs.stepKindOf,
7107
+ onSelect: setSelected,
7108
+ labels: {
7109
+ heading: barL.overview,
7110
+ inParallel: barL.inParallel,
7111
+ optional: barL.branchOptional,
7112
+ started: barL.branchStarted,
7113
+ phases: barL.phases
7114
+ },
7115
+ tid: (suffix) => `workflow-thread-${suffix}`
7116
+ }
7117
+ ),
7118
+ levels: chunkFSTIAEJW_cjs.stepLevels(steps),
6824
7119
  phaseOf,
6825
7120
  current: selected,
6826
7121
  onSelect: setSelected,
@@ -6831,7 +7126,7 @@ function WorkflowThreadStrip({
6831
7126
  reservePx: reserve,
6832
7127
  maxSpan,
6833
7128
  icon: glyphOf,
6834
- kindOf: chunkPIJPM5RA_cjs.stepKindOf,
7129
+ kindOf: chunk3YGSCNXQ_cjs.stepKindOf,
6835
7130
  labels: { waitingFor: l.waitingFor, ...barLabels },
6836
7131
  tid: (suffix) => `workflow-thread-${suffix}`
6837
7132
  }
@@ -7076,7 +7371,7 @@ function defaultTaskComposerValues(workflows, initial) {
7076
7371
  return {
7077
7372
  assignee: "me",
7078
7373
  workflowId,
7079
- inputs: workflow ? { ...chunkSQCCQU3K_cjs.defaultInputs(workflow), ...initial?.inputs } : { ...initial?.inputs },
7374
+ inputs: workflow ? { ...chunkVOGIYFNN_cjs.defaultInputs(workflow), ...initial?.inputs } : { ...initial?.inputs },
7080
7375
  when: "manual",
7081
7376
  runAt: "",
7082
7377
  rrule: "",
@@ -7184,19 +7479,19 @@ function WorkflowComposer({
7184
7479
  return !docs?.length;
7185
7480
  })
7186
7481
  );
7187
- const whatMissing = !workflow || Object.keys(chunkSQCCQU3K_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs)).length > 0;
7482
+ const whatMissing = !workflow || Object.keys(chunkVOGIYFNN_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs)).length > 0;
7188
7483
  const runAtPast = values.when === "once" && values.runAt !== "" && values.runAt !== initialValues?.runAt && new Date(values.runAt).getTime() <= Date.now();
7189
7484
  const whenMissing = missingWhen(values, runAtPast);
7190
7485
  const scheduled = values.when !== "now" && values.when !== "manual";
7191
7486
  const agentMissing = scheduled && values.agentId === "";
7192
7487
  const canSubmit = !whatMissing && !noFiles && whenMissing === null && !agentMissing && !isPending && !planDrafting;
7193
- const derivedName = workflow ? chunkM55XUF4L_cjs.deriveWorkflowName(workflow, values.inputs) : "";
7488
+ const derivedName = workflow ? chunkQFSFTO7I_cjs.deriveWorkflowName(workflow, values.inputs) : "";
7194
7489
  const pickWorkflow = (next) => {
7195
7490
  const def = workflows.find((w) => w.id === next);
7196
7491
  setValues({
7197
7492
  ...values,
7198
7493
  workflowId: next,
7199
- inputs: def ? chunkSQCCQU3K_cjs.defaultInputs(def) : {},
7494
+ inputs: def ? chunkVOGIYFNN_cjs.defaultInputs(def) : {},
7200
7495
  ...def?.documentAction ? { access: "standing" } : {}
7201
7496
  });
7202
7497
  };
@@ -7301,7 +7596,7 @@ function WorkflowComposer({
7301
7596
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-2", "data-testid": `${id}-what`, children: [
7302
7597
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-medium", children: l.what }),
7303
7598
  /* @__PURE__ */ jsxRuntime.jsx(
7304
- chunkBH322H5B_cjs.PillSelect,
7599
+ chunkZLMWMAID_cjs.PillSelect,
7305
7600
  {
7306
7601
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bot, { className: GLYPH, "aria-hidden": true }),
7307
7602
  prefix: l.template,
@@ -7334,7 +7629,7 @@ function WorkflowComposer({
7334
7629
  }
7335
7630
  ),
7336
7631
  !noFiles && workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
7337
- chunk5FSULBPE_cjs.SchemaForm,
7632
+ chunkKC3HRFSO_cjs.SchemaForm,
7338
7633
  {
7339
7634
  fields,
7340
7635
  values: values.inputs,
@@ -7381,7 +7676,7 @@ function WorkflowComposer({
7381
7676
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-2", "data-testid": `${id}-when-section`, children: [
7382
7677
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-medium", children: l.whenHeading }),
7383
7678
  /* @__PURE__ */ jsxRuntime.jsx(
7384
- chunkBH322H5B_cjs.PillSelect,
7679
+ chunkZLMWMAID_cjs.PillSelect,
7385
7680
  {
7386
7681
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: GLYPH, "aria-hidden": true }),
7387
7682
  prefix: l.start,
@@ -7394,7 +7689,7 @@ function WorkflowComposer({
7394
7689
  }
7395
7690
  ),
7396
7691
  (values.when === "once" || values.when === "repeat") && /* @__PURE__ */ jsxRuntime.jsx(
7397
- chunkBH322H5B_cjs.PillSelect,
7692
+ chunkZLMWMAID_cjs.PillSelect,
7398
7693
  {
7399
7694
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: GLYPH, "aria-hidden": true }),
7400
7695
  prefix: "Schedule",
@@ -7453,7 +7748,7 @@ function WorkflowComposer({
7453
7748
  values.when === "event" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
7454
7749
  /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "task-composer-event", className: "sr-only", children: l.event }),
7455
7750
  eventOptions ? /* @__PURE__ */ jsxRuntime.jsx(
7456
- chunkBH322H5B_cjs.PillSelect,
7751
+ chunkZLMWMAID_cjs.PillSelect,
7457
7752
  {
7458
7753
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, { className: GLYPH, "aria-hidden": true }),
7459
7754
  prefix: l.event,
@@ -7484,7 +7779,7 @@ function WorkflowComposer({
7484
7779
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: l.eventHint })
7485
7780
  ] }),
7486
7781
  values.when === "event" && values.eventKind === "workflow_completed" && eventWorkflowOptions && /* @__PURE__ */ jsxRuntime.jsx(
7487
- chunkBH322H5B_cjs.PillSelect,
7782
+ chunkZLMWMAID_cjs.PillSelect,
7488
7783
  {
7489
7784
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, { className: GLYPH, "aria-hidden": true }),
7490
7785
  prefix: "Automation",
@@ -7500,7 +7795,7 @@ function WorkflowComposer({
7500
7795
  }
7501
7796
  ),
7502
7797
  values.when === "task" && /* @__PURE__ */ jsxRuntime.jsx(
7503
- chunkBH322H5B_cjs.PillSelect,
7798
+ chunkZLMWMAID_cjs.PillSelect,
7504
7799
  {
7505
7800
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CornerDownRight, { className: GLYPH, "aria-hidden": true }),
7506
7801
  prefix: l.afterTask,
@@ -7551,7 +7846,7 @@ function WorkflowComposer({
7551
7846
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-2", "data-testid": `${id}-who`, children: [
7552
7847
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-medium", children: l.whoHeading }),
7553
7848
  /* @__PURE__ */ jsxRuntime.jsx(
7554
- chunkBH322H5B_cjs.PillSelect,
7849
+ chunkZLMWMAID_cjs.PillSelect,
7555
7850
  {
7556
7851
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bot, { className: GLYPH, "aria-hidden": true }),
7557
7852
  prefix: l.runAs,
@@ -7583,7 +7878,7 @@ function WorkflowComposer({
7583
7878
  ] }),
7584
7879
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-2", "data-testid": `${id}-config`, children: [
7585
7880
  /* @__PURE__ */ jsxRuntime.jsx(
7586
- chunkBH322H5B_cjs.PillSelect,
7881
+ chunkZLMWMAID_cjs.PillSelect,
7587
7882
  {
7588
7883
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, { className: GLYPH, "aria-hidden": true }),
7589
7884
  prefix: l.permission,
@@ -7772,7 +8067,7 @@ function WorkTaskComposer({
7772
8067
  }, [open]);
7773
8068
  const workflow = workflows.find((w) => w.id === values.workflowId);
7774
8069
  const fields = workflow?.inputs ?? [];
7775
- const errors = workflow ? chunkSQCCQU3K_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs) : {};
8070
+ const errors = workflow ? chunkVOGIYFNN_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs) : {};
7776
8071
  const hasWork = configOpen && Boolean(workflow) && Object.keys(errors).length === 0;
7777
8072
  const unattended = hasWork && values.when !== "now" && values.when !== "manual";
7778
8073
  const canConfigure = !isEdit || seed.assignee === "agent";
@@ -7780,7 +8075,7 @@ function WorkTaskComposer({
7780
8075
  const set = (key, value) => setValues({ ...values, [key]: value });
7781
8076
  const pickWorkflow = (id2) => {
7782
8077
  const next = workflows.find((w) => w.id === id2);
7783
- setValues({ ...values, workflowId: id2, inputs: next ? chunkSQCCQU3K_cjs.defaultInputs(next) : {} });
8078
+ setValues({ ...values, workflowId: id2, inputs: next ? chunkVOGIYFNN_cjs.defaultInputs(next) : {} });
7784
8079
  };
7785
8080
  const openConfigure = () => {
7786
8081
  setConfigOpen(true);
@@ -7872,7 +8167,7 @@ function WorkTaskComposer({
7872
8167
  }
7873
8168
  ) }),
7874
8169
  /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverContent, { align: "start", className: "w-auto p-2", children: /* @__PURE__ */ jsxRuntime.jsx(
7875
- chunkBH322H5B_cjs.DueDateMenu,
8170
+ chunkZLMWMAID_cjs.DueDateMenu,
7876
8171
  {
7877
8172
  id: `${id}-due`,
7878
8173
  label: l.due,
@@ -7883,7 +8178,7 @@ function WorkTaskComposer({
7883
8178
  ) })
7884
8179
  ] }),
7885
8180
  tasks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
7886
- chunkBH322H5B_cjs.PillSelect,
8181
+ chunkZLMWMAID_cjs.PillSelect,
7887
8182
  {
7888
8183
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CornerDownRight, { className: GLYPH2, "aria-hidden": true }),
7889
8184
  prefix: l.parentTask,
@@ -7952,7 +8247,7 @@ function WorkTaskComposer({
7952
8247
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
7953
8248
  /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { className: "text-xs text-muted-foreground", children: l.what }),
7954
8249
  /* @__PURE__ */ jsxRuntime.jsx(
7955
- chunkBH322H5B_cjs.PillSelect,
8250
+ chunkZLMWMAID_cjs.PillSelect,
7956
8251
  {
7957
8252
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bot, { className: GLYPH2, "aria-hidden": true }),
7958
8253
  prefix: l.template,
@@ -7966,7 +8261,7 @@ function WorkTaskComposer({
7966
8261
  )
7967
8262
  ] }),
7968
8263
  workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
7969
- chunk5FSULBPE_cjs.SchemaForm,
8264
+ chunkKC3HRFSO_cjs.SchemaForm,
7970
8265
  {
7971
8266
  fields,
7972
8267
  values: values.inputs,
@@ -7987,7 +8282,7 @@ function WorkTaskComposer({
7987
8282
  ] }),
7988
8283
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
7989
8284
  /* @__PURE__ */ jsxRuntime.jsx(
7990
- chunkBH322H5B_cjs.PillSelect,
8285
+ chunkZLMWMAID_cjs.PillSelect,
7991
8286
  {
7992
8287
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: GLYPH2, "aria-hidden": true }),
7993
8288
  prefix: l.start,
@@ -8000,7 +8295,7 @@ function WorkTaskComposer({
8000
8295
  }
8001
8296
  ),
8002
8297
  agents.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
8003
- chunkBH322H5B_cjs.PillSelect,
8298
+ chunkZLMWMAID_cjs.PillSelect,
8004
8299
  {
8005
8300
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bot, { className: GLYPH2, "aria-hidden": true }),
8006
8301
  prefix: l.which,
@@ -8015,7 +8310,7 @@ function WorkTaskComposer({
8015
8310
  }
8016
8311
  ),
8017
8312
  unattended && /* @__PURE__ */ jsxRuntime.jsx(
8018
- chunkBH322H5B_cjs.PillSelect,
8313
+ chunkZLMWMAID_cjs.PillSelect,
8019
8314
  {
8020
8315
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, { className: GLYPH2, "aria-hidden": true }),
8021
8316
  prefix: l.permission,
@@ -8072,7 +8367,7 @@ function WorkTaskComposer({
8072
8367
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: l.eventHint })
8073
8368
  ] }),
8074
8369
  values.when === "task" && /* @__PURE__ */ jsxRuntime.jsx(
8075
- chunkBH322H5B_cjs.PillSelect,
8370
+ chunkZLMWMAID_cjs.PillSelect,
8076
8371
  {
8077
8372
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CornerDownRight, { className: GLYPH2, "aria-hidden": true }),
8078
8373
  prefix: l.afterTask,
@@ -9459,6 +9754,7 @@ exports.DEFAULT_SKILL_EDIT_FORM_LABELS = DEFAULT_SKILL_EDIT_FORM_LABELS;
9459
9754
  exports.DEFAULT_SKILL_GENERATE_FORM_LABELS = DEFAULT_SKILL_GENERATE_FORM_LABELS;
9460
9755
  exports.DEFAULT_SKILL_VIEW_TOGGLE_LABELS = DEFAULT_SKILL_VIEW_TOGGLE_LABELS;
9461
9756
  exports.DEFAULT_STEP_BAR_LABELS = DEFAULT_STEP_BAR_LABELS;
9757
+ exports.DEFAULT_STEP_BRANCH_WORDS = DEFAULT_STEP_BRANCH_WORDS;
9462
9758
  exports.DEFAULT_TASK_ACTIVITY_LABELS = DEFAULT_TASK_ACTIVITY_LABELS;
9463
9759
  exports.DEFAULT_TASK_COMPOSER_LABELS = DEFAULT_TASK_COMPOSER_LABELS;
9464
9760
  exports.DEFAULT_TASK_LIST_LABELS = DEFAULT_TASK_LIST_LABELS;
@@ -9504,6 +9800,7 @@ exports.ThreadStatusLine = ThreadStatusLine;
9504
9800
  exports.TupleArrayField = TupleArrayField;
9505
9801
  exports.UploadTaskItem = UploadTaskItem;
9506
9802
  exports.UploadTaskList = UploadTaskList;
9803
+ exports.WorkflowOverview = WorkflowOverview;
9507
9804
  exports.WorkflowRunStatus = WorkflowRunStatus;
9508
9805
  exports.WorkflowRunner = WorkflowRunner;
9509
9806
  exports.WorkflowStepAction = WorkflowStepAction;
@@ -9548,6 +9845,8 @@ exports.requiredLabelsOf = requiredLabelsOf;
9548
9845
  exports.resolveScopeInputs = resolveScopeInputs;
9549
9846
  exports.serializeSkill = serializeSkill;
9550
9847
  exports.skillSlug = skillSlug;
9848
+ exports.stepBranches = stepBranches;
9849
+ exports.stepRunDetail = stepRunDetail;
9551
9850
  exports.stepWindow = stepWindow;
9552
9851
  exports.stripPersonaPreamble = stripPersonaPreamble;
9553
9852
  exports.summarizeAgent = summarizeAgent;
@@ -9560,5 +9859,5 @@ exports.withLabelIds = withLabelIds;
9560
9859
  exports.withLabelInputs = withLabelInputs;
9561
9860
  exports.workflowFromSkillMarkdown = workflowFromSkillMarkdown;
9562
9861
  exports.workflowToSkillMarkdown = workflowToSkillMarkdown;
9563
- //# sourceMappingURL=chunk-QDIIOZBP.cjs.map
9564
- //# sourceMappingURL=chunk-QDIIOZBP.cjs.map
9862
+ //# sourceMappingURL=chunk-X3SUQFY7.cjs.map
9863
+ //# sourceMappingURL=chunk-X3SUQFY7.cjs.map