@arbidocs/blocks 0.5.50 → 0.5.51

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 (75) hide show
  1. package/README.md +22 -0
  2. package/dist/{ConnectedCallDock-5OLBZED2.js → ConnectedCallDock-7NYH6DKB.js} +6 -6
  3. package/dist/{ConnectedCallDock-5OLBZED2.js.map → ConnectedCallDock-7NYH6DKB.js.map} +1 -1
  4. package/dist/{ConnectedCallDock-GHJTVUSQ.cjs → ConnectedCallDock-NBEAQYTJ.cjs} +7 -7
  5. package/dist/{ConnectedCallDock-GHJTVUSQ.cjs.map → ConnectedCallDock-NBEAQYTJ.cjs.map} +1 -1
  6. package/dist/{ConnectedCallRoom-SSSKBQA7.js → ConnectedCallRoom-CUV5VWGU.js} +6 -6
  7. package/dist/{ConnectedCallRoom-SSSKBQA7.js.map → ConnectedCallRoom-CUV5VWGU.js.map} +1 -1
  8. package/dist/{ConnectedCallRoom-GVNZ3S6R.cjs → ConnectedCallRoom-WRWKPC7R.cjs} +7 -7
  9. package/dist/{ConnectedCallRoom-GVNZ3S6R.cjs.map → ConnectedCallRoom-WRWKPC7R.cjs.map} +1 -1
  10. package/dist/agents/index.cjs +355 -343
  11. package/dist/agents/index.js +3 -3
  12. package/dist/agents/tasks/WorkflowThreadStrip.d.ts +2 -1
  13. package/dist/agents/workflows/ProgressChevron.d.ts +37 -0
  14. package/dist/agents/workflows/StepBarFrame.d.ts +5 -2
  15. package/dist/agents/workflows/index.d.ts +1 -0
  16. package/dist/agents/workflows/stepWindow.d.ts +9 -0
  17. package/dist/calls/index.cjs +2 -2
  18. package/dist/calls/index.js +2 -2
  19. package/dist/chat/index.cjs +80 -80
  20. package/dist/chat/index.js +3 -3
  21. package/dist/{chunk-JGFBC66V.js → chunk-2J34E5AH.js} +3 -3
  22. package/dist/{chunk-JGFBC66V.js.map → chunk-2J34E5AH.js.map} +1 -1
  23. package/dist/{chunk-RTS3B2W7.cjs → chunk-2QV2SCEB.cjs} +5 -5
  24. package/dist/{chunk-RTS3B2W7.cjs.map → chunk-2QV2SCEB.cjs.map} +1 -1
  25. package/dist/{chunk-YRORPDIY.js → chunk-3YJZGYSL.js} +3 -3
  26. package/dist/{chunk-YRORPDIY.js.map → chunk-3YJZGYSL.js.map} +1 -1
  27. package/dist/{chunk-IQ3VDTR7.js → chunk-42UKJPIQ.js} +3 -3
  28. package/dist/{chunk-IQ3VDTR7.js.map → chunk-42UKJPIQ.js.map} +1 -1
  29. package/dist/{chunk-TQYEHARI.cjs → chunk-AAHLGSSR.cjs} +5 -5
  30. package/dist/{chunk-TQYEHARI.cjs.map → chunk-AAHLGSSR.cjs.map} +1 -1
  31. package/dist/{chunk-IOPGY3IP.cjs → chunk-AEG44LPK.cjs} +23 -23
  32. package/dist/{chunk-IOPGY3IP.cjs.map → chunk-AEG44LPK.cjs.map} +1 -1
  33. package/dist/{chunk-THNTNAYI.js → chunk-CHEU7XI5.js} +3 -2
  34. package/dist/chunk-CHEU7XI5.js.map +1 -0
  35. package/dist/{chunk-O4LORAFC.js → chunk-EIJHL6ZX.js} +135 -100
  36. package/dist/chunk-EIJHL6ZX.js.map +1 -0
  37. package/dist/{chunk-7G4N2HP7.js → chunk-EJVM5IVT.js} +4 -4
  38. package/dist/{chunk-7G4N2HP7.js.map → chunk-EJVM5IVT.js.map} +1 -1
  39. package/dist/{chunk-7QJNWQ7O.js → chunk-GXNHLM5R.js} +3 -3
  40. package/dist/{chunk-7QJNWQ7O.js.map → chunk-GXNHLM5R.js.map} +1 -1
  41. package/dist/{chunk-EZLZ3MDU.cjs → chunk-JWYWP5EE.cjs} +3 -2
  42. package/dist/chunk-JWYWP5EE.cjs.map +1 -0
  43. package/dist/{chunk-JYR55F3P.cjs → chunk-K6T255ST.cjs} +211 -173
  44. package/dist/chunk-K6T255ST.cjs.map +1 -0
  45. package/dist/{chunk-4FIYA764.cjs → chunk-KKAKZSCR.cjs} +9 -9
  46. package/dist/{chunk-4FIYA764.cjs.map → chunk-KKAKZSCR.cjs.map} +1 -1
  47. package/dist/{chunk-MBGV6JHG.cjs → chunk-KYOVVXAS.cjs} +4 -4
  48. package/dist/{chunk-MBGV6JHG.cjs.map → chunk-KYOVVXAS.cjs.map} +1 -1
  49. package/dist/{chunk-PP3LWBIH.js → chunk-TFF3NMPV.js} +3 -3
  50. package/dist/{chunk-PP3LWBIH.js.map → chunk-TFF3NMPV.js.map} +1 -1
  51. package/dist/{chunk-226ILMHW.cjs → chunk-W3AYIOK2.cjs} +11 -11
  52. package/dist/{chunk-226ILMHW.cjs.map → chunk-W3AYIOK2.cjs.map} +1 -1
  53. package/dist/connect/index.cjs +351 -294
  54. package/dist/connect/index.cjs.map +1 -1
  55. package/dist/connect/index.js +66 -9
  56. package/dist/connect/index.js.map +1 -1
  57. package/dist/connection/files/upload/ConnectedUpload.d.ts +3 -1
  58. package/dist/connection/files/upload/ProcessingSettingsFooter.d.ts +31 -0
  59. package/dist/index.cjs +486 -474
  60. package/dist/index.js +6 -6
  61. package/dist/studio/index.cjs +4 -4
  62. package/dist/studio/index.js +3 -3
  63. package/dist/workflow-canvas/WorkflowCanvas.d.ts +2 -0
  64. package/dist/workflow-canvas/index.cjs +54 -52
  65. package/dist/workflow-canvas/index.cjs.map +1 -1
  66. package/dist/workflow-canvas/index.js +5 -3
  67. package/dist/workflow-canvas/index.js.map +1 -1
  68. package/node_modules/@arbidocs/coedit/package.json +1 -1
  69. package/package.json +5 -5
  70. package/src/blocks.css +143 -0
  71. package/src/workflow-canvas/canvas.css +46 -27
  72. package/dist/chunk-EZLZ3MDU.cjs.map +0 -1
  73. package/dist/chunk-JYR55F3P.cjs.map +0 -1
  74. package/dist/chunk-O4LORAFC.js.map +0 -1
  75. package/dist/chunk-THNTNAYI.js.map +0 -1
@@ -14,7 +14,7 @@ var chunkVODFB3K2_cjs = require('./chunk-VODFB3K2.cjs');
14
14
  var chunkLKK52DEY_cjs = require('./chunk-LKK52DEY.cjs');
15
15
  var chunkMEMWZ72Y_cjs = require('./chunk-MEMWZ72Y.cjs');
16
16
  var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
17
- var chunkEZLZ3MDU_cjs = require('./chunk-EZLZ3MDU.cjs');
17
+ var chunkJWYWP5EE_cjs = require('./chunk-JWYWP5EE.cjs');
18
18
  var chunk76L6LOP3_cjs = require('./chunk-76L6LOP3.cjs');
19
19
  var chunkFX3K6LNZ_cjs = require('./chunk-FX3K6LNZ.cjs');
20
20
  var chunkCQ2YSHIF_cjs = require('./chunk-CQ2YSHIF.cjs');
@@ -217,7 +217,7 @@ function toStepField(f) {
217
217
  }
218
218
  var compact = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== void 0 && v !== ""));
219
219
  function placeholders(workflow) {
220
- return Object.fromEntries(chunkEZLZ3MDU_cjs.runFields(workflow).map((f) => [f.name, `{{${f.name}}}`]));
220
+ return Object.fromEntries(chunkJWYWP5EE_cjs.runFields(workflow).map((f) => [f.name, `{{${f.name}}}`]));
221
221
  }
222
222
  function agentStep(workflow, step, options) {
223
223
  const target = step.workflow ? options.resolveWorkflow?.(step.workflow) : void 0;
@@ -226,11 +226,11 @@ function agentStep(workflow, step, options) {
226
226
  ([, v]) => v !== void 0 && v !== null && v !== ""
227
227
  );
228
228
  const inputs = { ...placeholders(workflow), ...Object.fromEntries(given) };
229
- return { skill: null, inputs: null, prompt: chunkEZLZ3MDU_cjs.composeStepPrompt(workflow, step, inputs, options) };
229
+ return { skill: null, inputs: null, prompt: chunkJWYWP5EE_cjs.composeStepPrompt(workflow, step, inputs, options) };
230
230
  }
231
231
  function toPlanSteps(workflow, options = {}) {
232
232
  const layout = workflow.run.kind === "steps" ? workflow.run.layout : void 0;
233
- return chunkEZLZ3MDU_cjs.workflowSteps(workflow).map((step) => {
233
+ return chunkJWYWP5EE_cjs.workflowSteps(workflow).map((step) => {
234
234
  const ui = compact({
235
235
  description: step.description,
236
236
  icon: step.icon,
@@ -257,8 +257,8 @@ function toPlanSteps(workflow, options = {}) {
257
257
  ui,
258
258
  // An unfinished signal (still being typed) is not saved: the server would refuse it.
259
259
  ...step.signals?.some((s) => !isIncompleteSignal(s)) ? { signals: step.signals.filter((s) => !isIncompleteSignal(s)).map(toPlanSignal) } : {},
260
- ...step.assignee && chunkEZLZ3MDU_cjs.canAssign(step) ? { assignee: toPlanAssignee(step.assignee) } : {},
261
- ...step.remindAfterHours && chunkEZLZ3MDU_cjs.canAssign(step) ? { remind_after_hours: step.remindAfterHours } : {},
260
+ ...step.assignee && chunkJWYWP5EE_cjs.canAssign(step) ? { assignee: toPlanAssignee(step.assignee) } : {},
261
+ ...step.remindAfterHours && chunkJWYWP5EE_cjs.canAssign(step) ? { remind_after_hours: step.remindAfterHours } : {},
262
262
  // A review's fields are what approving it is checked against (the server's `fields`).
263
263
  ...step.kind === "review" && step.fields?.length ? { fields: step.fields.map(toStepField) } : {},
264
264
  ...step.kind === "action" ? { action: toPlanAction(step.action) } : {},
@@ -403,7 +403,7 @@ function workflowFromSkillMarkdown(id, text2) {
403
403
  var errorMessage = (e) => e instanceof Error ? e.message : typeof e === "string" ? e : "Something went wrong.";
404
404
  function firstOpen(steps, states) {
405
405
  const open = steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? "pending"));
406
- return open?.id ?? (steps.length && chunkEZLZ3MDU_cjs.isRunFinished(steps, states) ? null : steps[0]?.id ?? null);
406
+ return open?.id ?? (steps.length && chunkJWYWP5EE_cjs.isRunFinished(steps, states) ? null : steps[0]?.id ?? null);
407
407
  }
408
408
  function useWorkflowView(options) {
409
409
  const { steps, states, inputs, setInput, loaded = true } = options;
@@ -443,11 +443,11 @@ function useWorkflowView(options) {
443
443
  }),
444
444
  []
445
445
  );
446
- const action = busy ? "wait" : chunkEZLZ3MDU_cjs.nextAction(steps, states, current, actionOptions(options));
446
+ const action = busy ? "wait" : chunkJWYWP5EE_cjs.nextAction(steps, states, current, actionOptions(options));
447
447
  const next = react.useCallback(async () => {
448
448
  const { steps: s, states: st, inputs: values } = optionsRef.current;
449
449
  const at = s.find((x) => x.id === current);
450
- const act2 = chunkEZLZ3MDU_cjs.nextAction(s, st, current, actionOptions(optionsRef.current));
450
+ const act2 = chunkJWYWP5EE_cjs.nextAction(s, st, current, actionOptions(optionsRef.current));
451
451
  if (!at || act2 === "wait" || busy) return;
452
452
  setActionError(null);
453
453
  if (act2 === "finish") return setCurrent(null);
@@ -458,7 +458,7 @@ function useWorkflowView(options) {
458
458
  await (act2 === "start" ? optionsRef.current.start?.() : optionsRef.current.retry?.(at.id));
459
459
  return;
460
460
  }
461
- if (Object.keys(chunkEZLZ3MDU_cjs.validateStep(at, values)).length > 0) {
461
+ if (Object.keys(chunkJWYWP5EE_cjs.validateStep(at, values)).length > 0) {
462
462
  setShowErrors(true);
463
463
  return;
464
464
  }
@@ -559,10 +559,10 @@ function useWorkflowView(options) {
559
559
  inputs,
560
560
  setInput,
561
561
  stateOf: (id) => states[id],
562
- phaseOf: (id) => chunkEZLZ3MDU_cjs.stepPhase(steps, states, id),
563
- failedUpstreamOf: (id) => chunkEZLZ3MDU_cjs.failedUpstream(steps, states, id),
562
+ phaseOf: (id) => chunkJWYWP5EE_cjs.stepPhase(steps, states, id),
563
+ failedUpstreamOf: (id) => chunkJWYWP5EE_cjs.failedUpstream(steps, states, id),
564
564
  isLocked,
565
- errors: showErrors && step && !isLocked(step.id) ? chunkEZLZ3MDU_cjs.validateStep(step, inputs) : {},
565
+ errors: showErrors && step && !isLocked(step.id) ? chunkJWYWP5EE_cjs.validateStep(step, inputs) : {},
566
566
  busy,
567
567
  actionError,
568
568
  isRunning: Object.values(states).some((s) => s.status === "running"),
@@ -580,11 +580,11 @@ function useWorkflowView(options) {
580
580
  nameOf: options.nameOf,
581
581
  assigneeOf: (id) => {
582
582
  const s = steps.find((x) => x.id === id);
583
- if (!s || !chunkEZLZ3MDU_cjs.canAssign(s)) return void 0;
584
- return chunkEZLZ3MDU_cjs.assigneeName(s.assignee, {
583
+ if (!s || !chunkJWYWP5EE_cjs.canAssign(s)) return void 0;
584
+ return chunkJWYWP5EE_cjs.assigneeName(s.assignee, {
585
585
  nameOf: options.nameOf,
586
586
  inputs,
587
- fields: chunkEZLZ3MDU_cjs.runFieldsOf(steps),
587
+ fields: chunkJWYWP5EE_cjs.runFieldsOf(steps),
588
588
  announcedTo: states[id]?.announcedTo
589
589
  });
590
590
  },
@@ -595,11 +595,48 @@ function useWorkflowView(options) {
595
595
  }
596
596
  };
597
597
  }
598
+ function ChevronShape({ className }) {
599
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: ui.cn("wf-chevron", className) });
600
+ }
601
+ var ProgressChevronBar = react.forwardRef(
602
+ function ProgressChevronBar2({ complete, className, ...rest }, ref) {
603
+ return /* @__PURE__ */ jsxRuntime.jsx(
604
+ "ol",
605
+ {
606
+ ref,
607
+ className: ui.cn("wf-seg-bar", className),
608
+ "data-complete": complete || void 0,
609
+ ...rest
610
+ }
611
+ );
612
+ }
613
+ );
614
+ var ProgressChevron = react.forwardRef(
615
+ function ProgressChevron2({ kind, phase, current, className, children, ...rest }, ref) {
616
+ return /* @__PURE__ */ jsxRuntime.jsxs(
617
+ "li",
618
+ {
619
+ ref,
620
+ className: ui.cn("wf-seg", kind && `wf-kind-${kind}`, className),
621
+ "data-phase": phase,
622
+ "data-current": current || void 0,
623
+ ...rest,
624
+ children: [
625
+ /* @__PURE__ */ jsxRuntime.jsx(ChevronShape, {}),
626
+ children
627
+ ]
628
+ }
629
+ );
630
+ }
631
+ );
598
632
 
599
633
  // src/agents/workflows/stepWindow.ts
600
634
  var LABEL_MAX_PX = 320;
601
635
  var CHAR_PX = 6.5;
602
- var LEVEL_CHROME_PX = 60;
636
+ var CHEVRON_SIDES_PX = 10 + 4 + (10 + 6);
637
+ var CHEVRON_OVERLAP_PX = 10 - 2;
638
+ var CHIP_CHROME_PX = 20 + 6 + 8;
639
+ var LEVEL_CHROME_PX = CHIP_CHROME_PX + CHEVRON_SIDES_PX - CHEVRON_OVERLAP_PX;
603
640
  var GROUP_CHIP_PX = 32;
604
641
  function levelRoomPx(titles) {
605
642
  const label = Math.max(0, ...titles.map((t) => Math.min(LABEL_MAX_PX, t.length * CHAR_PX)));
@@ -697,7 +734,7 @@ var STEP_EXTRA = "min-w-[3rem] shrink-[1000000] truncate font-normal opacity-80"
697
734
  var fill = (template, values) => Object.entries(values).reduce((s, [k, v]) => s.replace(`{${k}}`, String(v)), template);
698
735
  var NARROW_PX = 560;
699
736
  var ARROWS_PX = 56;
700
- var HIDDEN_PX = 40;
737
+ var HIDDEN_PX = 28 + CHEVRON_SIDES_PX - CHEVRON_OVERLAP_PX;
701
738
  function StepBarFrame({
702
739
  levels,
703
740
  phaseOf,
@@ -718,7 +755,7 @@ function StepBarFrame({
718
755
  }) {
719
756
  const l = { ...DEFAULT_STEP_BAR_LABELS, ...labels };
720
757
  const box = react.useRef(null);
721
- const { width } = chunkEZLZ3MDU_cjs.useElementSize(box);
758
+ const { width } = chunkJWYWP5EE_cjs.useElementSize(box);
722
759
  const narrow = width > 0 && width < NARROW_PX;
723
760
  const [start, setStart] = react.useState(null);
724
761
  react.useEffect(() => setStart(null), [current]);
@@ -785,7 +822,7 @@ function StepBarFrame({
785
822
  phase === "blocked" && "opacity-60"
786
823
  ),
787
824
  "aria-hidden": true,
788
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkEZLZ3MDU_cjs.StepBadgeMark, { phase, icon: icon?.(s) })
825
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkJWYWP5EE_cjs.StepBadgeMark, { phase, icon: icon?.(s) })
789
826
  }
790
827
  ),
791
828
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", title: s.title, children: s.title }),
@@ -827,7 +864,7 @@ function StepBarFrame({
827
864
  "button",
828
865
  {
829
866
  type: "button",
830
- className: "flex shrink-0 items-center rounded-full px-1.5 py-1 text-[11px] tabular-nums text-muted-foreground hover:bg-accent hover:text-foreground",
867
+ className: "wf-chip-addon flex shrink-0 items-center rounded-full px-1.5 py-1 text-[11px] tabular-nums text-muted-foreground hover:bg-accent hover:text-foreground",
831
868
  "aria-label": fill(l.position, { position: win.position, total: win.total }),
832
869
  title: fill(l.position, { position: win.position, total: win.total }),
833
870
  "data-testid": tid("steps-count"),
@@ -853,7 +890,7 @@ function StepBarFrame({
853
890
  "button",
854
891
  {
855
892
  type: "button",
856
- className: "flex shrink-0 items-center gap-0.5 rounded-full px-1.5 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-foreground",
893
+ className: "wf-chip-addon flex shrink-0 items-center gap-0.5 rounded-full px-1.5 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-foreground",
857
894
  "aria-label": fill(side === "before" ? l.hiddenBefore : l.hiddenAfter, { count }),
858
895
  title: fill(side === "before" ? l.hiddenBefore : l.hiddenAfter, { count }),
859
896
  "data-testid": tid(`hidden-${side}`),
@@ -893,19 +930,28 @@ function StepBarFrame({
893
930
  };
894
931
  const running = win.runningHidden;
895
932
  const outOfViewChip = (s, kind) => /* @__PURE__ */ jsxRuntime.jsx(
896
- chunkEZLZ3MDU_cjs.StepChip,
933
+ ProgressChevron,
897
934
  {
898
935
  kind: kindOf(s),
899
936
  phase: kind === "working" ? "running" : "failed",
900
- label: fill(l[kind], { title: s.title }),
901
- labelClassName: narrow ? "sr-only" : "truncate",
902
- onClick: () => select(s.id),
903
- className: "max-w-[14rem] shrink",
904
- title: fill(l[kind], { title: s.title }),
905
- "data-testid": tid(`${kind === "working" ? "working" : "failed"}-${s.id}`)
937
+ className: "min-w-0 shrink",
938
+ children: /* @__PURE__ */ jsxRuntime.jsx(
939
+ chunkJWYWP5EE_cjs.StepChip,
940
+ {
941
+ kind: kindOf(s),
942
+ phase: kind === "working" ? "running" : "failed",
943
+ label: fill(l[kind], { title: s.title }),
944
+ labelClassName: narrow ? "sr-only" : "truncate",
945
+ onClick: () => select(s.id),
946
+ className: "max-w-[14rem] shrink",
947
+ title: fill(l[kind], { title: s.title }),
948
+ "data-testid": tid(`${kind === "working" ? "working" : "failed"}-${s.id}`)
949
+ }
950
+ )
906
951
  },
907
952
  s.id
908
953
  );
954
+ const segment = (node, key, kind) => node ? /* @__PURE__ */ jsxRuntime.jsx(ProgressChevron, { kind, className: "shrink-0", children: node }, key) : null;
909
955
  return /* @__PURE__ */ jsxRuntime.jsxs(
910
956
  "nav",
911
957
  {
@@ -917,60 +963,56 @@ function StepBarFrame({
917
963
  "data-narrow": narrow || void 0,
918
964
  children: [
919
965
  arrow("back"),
920
- win.start === 0 && leading,
921
- overflow("before", win.hiddenBefore),
922
- /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex min-w-0 flex-[1_1_auto] items-center gap-1", children: win.visible.map((level, i) => /* @__PURE__ */ jsxRuntime.jsxs(
923
- "li",
924
- {
925
- className: ui.cn(
926
- "flex min-w-[5.5rem] basis-auto items-center gap-1",
927
- i === win.visible.length - 1 ? "grow-0" : "grow",
928
- level.index === win.currentLevel ? "shrink" : "shrink-[1000000]"
929
- ),
930
- "data-role": level.role,
931
- children: [
932
- renderStep(level.primary, level, win, narrow),
933
- level.others.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
934
- GroupChip,
935
- {
936
- level,
937
- label: fill(l.parallel, { count: level.others.length }),
938
- heading: l.inParallel,
939
- row: (s) => row(s, s.id === atId),
940
- tid
941
- }
966
+ /* @__PURE__ */ jsxRuntime.jsxs(ProgressChevronBar, { complete: !win.canForward, className: "min-w-0 flex-[1_1_auto]", children: [
967
+ win.start === 0 && segment(leading, "leading", "start"),
968
+ segment(overflow("before", win.hiddenBefore), "hidden-before"),
969
+ win.visible.map((level) => /* @__PURE__ */ jsxRuntime.jsxs(
970
+ ProgressChevron,
971
+ {
972
+ kind: kindOf(level.primary),
973
+ phase: phaseOf(level.primary.id),
974
+ current: level.index === win.currentLevel,
975
+ className: ui.cn(
976
+ "min-w-[5.5rem] grow basis-auto",
977
+ level.index === win.currentLevel ? "shrink" : "shrink-[1000000]"
942
978
  ),
943
- renderAfter?.(level),
944
- i < win.visible.length - 1 && !narrow && /* @__PURE__ */ jsxRuntime.jsx(
945
- "span",
946
- {
947
- "aria-hidden": true,
948
- className: ui.cn("wf-link", `wf-kind-${kindOf(level.primary)}`),
949
- "data-done": level.steps.every((s) => ["done", "skipped"].includes(phaseOf(s.id))) || void 0
950
- }
951
- )
952
- ]
953
- },
954
- level.steps.map((s) => s.id).join("+")
955
- )) }),
956
- overflow("after", win.hiddenAfter),
957
- !win.canForward && trailing,
979
+ "data-role": level.role,
980
+ children: [
981
+ renderStep(level.primary, level, win, narrow),
982
+ level.others.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
983
+ GroupChip,
984
+ {
985
+ level,
986
+ label: fill(l.parallel, { count: level.others.length }),
987
+ heading: l.inParallel,
988
+ row: (s) => row(s, s.id === atId),
989
+ tid
990
+ }
991
+ ),
992
+ renderAfter?.(level)
993
+ ]
994
+ },
995
+ level.steps.map((s) => s.id).join("+")
996
+ )),
997
+ segment(overflow("after", win.hiddenAfter), "hidden-after"),
998
+ !win.canForward && segment(trailing, "trailing")
999
+ ] }),
958
1000
  arrow("forward"),
959
1001
  running.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
960
- "div",
1002
+ ProgressChevronBar,
961
1003
  {
962
- className: ui.cn("flex shrink-[1000] items-center gap-1", !narrow && "min-w-[6.5rem]"),
1004
+ className: ui.cn("shrink-[1000]", !narrow && "min-w-[6.5rem]"),
963
1005
  "data-testid": tid("working"),
964
1006
  children: [
965
1007
  (running.length > 2 ? running.slice(0, 1) : running).map(
966
1008
  (s) => outOfViewChip(s, "working")
967
1009
  ),
968
- running.length > 2 && /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
1010
+ running.length > 2 && /* @__PURE__ */ jsxRuntime.jsx(ProgressChevron, { phase: "running", className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
969
1011
  /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
970
1012
  "button",
971
1013
  {
972
1014
  type: "button",
973
- className: "flex shrink-0 items-center gap-1 rounded-lg border border-border bg-card px-2 py-1 text-xs text-muted-foreground hover:text-foreground",
1015
+ className: "wf-chip-addon flex shrink-0 items-center gap-1 rounded-lg border border-border bg-card px-2 py-1 text-xs text-muted-foreground hover:text-foreground",
974
1016
  "data-testid": tid("working-more"),
975
1017
  children: [
976
1018
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-3.5 animate-spin" }),
@@ -979,14 +1021,14 @@ function StepBarFrame({
979
1021
  }
980
1022
  ) }),
981
1023
  /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverContent, { align: "end", className: "w-72 p-1", children: running.slice(1).map((s) => row(s, false)) })
982
- ] })
1024
+ ] }) })
983
1025
  ]
984
1026
  }
985
1027
  ),
986
1028
  win.failedHidden.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
987
- "div",
1029
+ ProgressChevronBar,
988
1030
  {
989
- className: ui.cn("flex shrink-[1000] items-center gap-1", !narrow && "min-w-[6.5rem]"),
1031
+ className: ui.cn("shrink-[1000]", !narrow && "min-w-[6.5rem]"),
990
1032
  "data-testid": tid("failed"),
991
1033
  children: win.failedHidden.map((s) => outOfViewChip(s, "failedStep"))
992
1034
  }
@@ -1007,7 +1049,7 @@ function GroupChip({
1007
1049
  "button",
1008
1050
  {
1009
1051
  type: "button",
1010
- className: "shrink-0 rounded-md border border-border bg-card px-1.5 py-0.5 text-[11px] font-medium tabular-nums text-muted-foreground shadow-sm hover:text-foreground",
1052
+ className: "wf-chip-addon shrink-0 rounded-md border border-border bg-card px-1.5 py-0.5 text-[11px] font-medium tabular-nums text-muted-foreground shadow-sm hover:text-foreground",
1011
1053
  "aria-label": label,
1012
1054
  title: label,
1013
1055
  "data-testid": tid(`group-${level.steps[0].id}`),
@@ -1066,7 +1108,7 @@ var DEFAULT_WORKFLOW_STEP_PARTS_LABELS = {
1066
1108
  someone: "someone"
1067
1109
  };
1068
1110
  var docName = (ref, nameOfDoc) => {
1069
- const { id, version } = chunkEZLZ3MDU_cjs.splitDocRef(ref);
1111
+ const { id, version } = chunkJWYWP5EE_cjs.splitDocRef(ref);
1070
1112
  const name = nameOfDoc?.(id) ?? id;
1071
1113
  return version ? `${name} \xB7 v${version}` : name;
1072
1114
  };
@@ -1148,7 +1190,7 @@ function SendBackControl({
1148
1190
  const states = Object.fromEntries(
1149
1191
  run.steps.map((s) => [s.id, run.stateOf(s.id) ?? { status: "pending" }])
1150
1192
  );
1151
- const targets = chunkEZLZ3MDU_cjs.sendBackTargets(run.steps, states, step.id);
1193
+ const targets = chunkJWYWP5EE_cjs.sendBackTargets(run.steps, states, step.id);
1152
1194
  const [open, setOpen] = react.useState(false);
1153
1195
  const [to, setTo] = react.useState(targets[0]?.id ?? "");
1154
1196
  const [note, setNote] = react.useState("");
@@ -1238,7 +1280,7 @@ function ApprovalEvidence({
1238
1280
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex flex-wrap items-center gap-1.5 text-sm font-medium", children: [
1239
1281
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "size-4 text-primary" }),
1240
1282
  approver ? l.approvedBy.replace("{name}", approver) : null,
1241
- state.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground", children: l.approvedAt.replace("{date}", chunkEZLZ3MDU_cjs.formatDate(state.at)) })
1283
+ state.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground", children: l.approvedAt.replace("{date}", chunkJWYWP5EE_cjs.formatDate(state.at)) })
1242
1284
  ] }),
1243
1285
  evidence.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
1244
1286
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: l.approvedWhat }),
@@ -1271,7 +1313,7 @@ function ApprovalEvidence({
1271
1313
  ] }),
1272
1314
  (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: [
1273
1315
  /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: f.label }),
1274
- /* @__PURE__ */ jsxRuntime.jsx("dd", { "data-testid": `${testId}-evidence-field-${f.name}`, children: chunkEZLZ3MDU_cjs.shownValue(run.inputs[f.name], f, run.nameOf) })
1316
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { "data-testid": `${testId}-evidence-field-${f.name}`, children: chunkJWYWP5EE_cjs.shownValue(run.inputs[f.name], f, run.nameOf) })
1275
1317
  ] }, f.name)) })
1276
1318
  ] });
1277
1319
  }
@@ -1367,7 +1409,7 @@ function ActionStepBody({
1367
1409
  waiting?.expires_at && phase === "waiting" && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
1368
1410
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "size-3.5" }),
1369
1411
  " ",
1370
- l.expires.replace("{date}", chunkEZLZ3MDU_cjs.formatDate(waiting.expires_at))
1412
+ l.expires.replace("{date}", chunkJWYWP5EE_cjs.formatDate(waiting.expires_at))
1371
1413
  ] }),
1372
1414
  phase === "waiting" && mine && !declining && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-2", children: [
1373
1415
  actions?.sign && state && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1525,7 +1567,7 @@ function WorkflowStepBar({
1525
1567
  const name = `${title} (${l.phases[phase]})`;
1526
1568
  if (s.id === DONE)
1527
1569
  return /* @__PURE__ */ jsxRuntime.jsx(
1528
- chunkEZLZ3MDU_cjs.StepChip,
1570
+ chunkJWYWP5EE_cjs.StepChip,
1529
1571
  {
1530
1572
  inert: true,
1531
1573
  kind: "start",
@@ -1539,17 +1581,17 @@ function WorkflowStepBar({
1539
1581
  "data-testid": tid("step-done")
1540
1582
  }
1541
1583
  );
1542
- const kind = chunkEZLZ3MDU_cjs.stepKindOf(s);
1543
- const KindIcon = chunkEZLZ3MDU_cjs.STEP_KIND_ICONS[kind];
1584
+ const kind = chunkJWYWP5EE_cjs.stepKindOf(s);
1585
+ const KindIcon = chunkJWYWP5EE_cjs.STEP_KIND_ICONS[kind];
1544
1586
  return /* @__PURE__ */ jsxRuntime.jsx(
1545
- chunkEZLZ3MDU_cjs.StepChip,
1587
+ chunkJWYWP5EE_cjs.StepChip,
1546
1588
  {
1547
1589
  kind,
1548
1590
  phase,
1549
1591
  icon: icon(s.icon) ?? /* @__PURE__ */ jsxRuntime.jsx(KindIcon, {}),
1550
1592
  label: s.title,
1551
1593
  current: isCurrent,
1552
- heading: chunkEZLZ3MDU_cjs.DEFAULT_STEP_KIND_LABELS[kind],
1594
+ heading: chunkJWYWP5EE_cjs.DEFAULT_STEP_KIND_LABELS[kind],
1553
1595
  labelClassName: isCurrent ? STEP_LABEL_CURRENT : ui.cn(STEP_LABEL, STEP_LABEL_MAX),
1554
1596
  labelTestId: tid(`step-${s.id}-label`),
1555
1597
  onClick: () => run.goTo(s.id),
@@ -1582,7 +1624,7 @@ function WorkflowStepBar({
1582
1624
  isSelectable: (id) => id !== DONE,
1583
1625
  renderStep: (s) => pill(s),
1584
1626
  icon: (s) => s.id === DONE ? doneIcon : icon(s.icon),
1585
- kindOf: (s) => s.id === DONE ? "start" : chunkEZLZ3MDU_cjs.stepKindOf(s),
1627
+ kindOf: (s) => s.id === DONE ? "start" : chunkJWYWP5EE_cjs.stepKindOf(s),
1586
1628
  disabled: run.busy,
1587
1629
  labels,
1588
1630
  tid,
@@ -1665,7 +1707,7 @@ function WorkflowRunner({
1665
1707
  const { steps, step, isComplete, action } = run;
1666
1708
  const completion = workflow.run.kind === "steps" ? workflow.run.completion : void 0;
1667
1709
  const tid = (suffix) => `${testIdPrefix}-${suffix}`;
1668
- const levels = chunkEZLZ3MDU_cjs.stepLevels(steps);
1710
+ const levels = chunkJWYWP5EE_cjs.stepLevels(steps);
1669
1711
  const icon = (key) => key && renderIcon ? renderIcon(key) : void 0;
1670
1712
  const added = step?.kind === "upload" ? (files ?? []).filter((f) => f.addedFor === step.id) : [];
1671
1713
  const unread = added.filter((f) => f.status === "processing").length;
@@ -1673,7 +1715,7 @@ function WorkflowRunner({
1673
1715
  const sending = added.filter((f) => f.status === "uploading").length;
1674
1716
  const unsent = added.filter((f) => f.status === "upload-failed").length;
1675
1717
  const uploadHold = step?.kind === "upload" && (sending > 0 || uploading || unsent > 0);
1676
- const docsWait = !!step && chunkEZLZ3MDU_cjs.waitingDocuments(run.stateOf(step.id)).length > 0;
1718
+ const docsWait = !!step && chunkJWYWP5EE_cjs.waitingDocuments(run.stateOf(step.id)).length > 0;
1677
1719
  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;
1678
1720
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn(compact2 ? "space-y-3" : "space-y-6", className), "data-testid": testIdPrefix, children: [
1679
1721
  !hideStepBar && /* @__PURE__ */ jsxRuntime.jsx(
@@ -1705,7 +1747,7 @@ function WorkflowRunner({
1705
1747
  /* @__PURE__ */ jsxRuntime.jsx(StepNotices, { run, step, l, tid }),
1706
1748
  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(
1707
1749
  "{steps}",
1708
- chunkEZLZ3MDU_cjs.stepDependencies(steps, step.id).map((d) => steps.find((s) => s.id === d)?.title ?? d).join(", ")
1750
+ chunkJWYWP5EE_cjs.stepDependencies(steps, step.id).map((d) => steps.find((s) => s.id === d)?.title ?? d).join(", ")
1709
1751
  ) }) }) : step.kind === "form" ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { className: ui.cn(box, "space-y-4"), "data-testid": tid(step.id), children: [
1710
1752
  /* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon: icon(step.icon), testId: tid(`${step.id}-title`) }),
1711
1753
  /* @__PURE__ */ jsxRuntime.jsx(SentBackNote, { state: run.stateOf(step.id), l: pl, testId: tid(step.id) }),
@@ -1761,7 +1803,7 @@ function WorkflowRunner({
1761
1803
  ] }) : step.kind === "review" ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { className: ui.cn(box, "space-y-4"), "data-testid": tid(step.id), children: [
1762
1804
  /* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon: icon(step.icon) }),
1763
1805
  /* @__PURE__ */ jsxRuntime.jsx(SentBackNote, { state: run.stateOf(step.id), l: pl, testId: tid(step.id) }),
1764
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-line text-sm text-muted-foreground", children: chunkEZLZ3MDU_cjs.reviewInstructions(step, run.inputs) }),
1806
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-line text-sm text-muted-foreground", children: chunkJWYWP5EE_cjs.reviewInstructions(step, run.inputs) }),
1765
1807
  /* @__PURE__ */ jsxRuntime.jsx(AssigneeLine, { run, stepId: step.id, l: pl, testId: tid(step.id) }),
1766
1808
  !(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 }),
1767
1809
  (step.fields ?? []).length > 0 && run.phaseOf(step.id) === "ready" && /* @__PURE__ */ jsxRuntime.jsx(
@@ -2028,8 +2070,8 @@ function AgentStepBody({
2028
2070
  }) {
2029
2071
  const state = run.stateOf(step.id);
2030
2072
  const phase = run.phaseOf(step.id);
2031
- const pending = chunkEZLZ3MDU_cjs.waitingDocuments(state);
2032
- const pendingNames = pending.flatMap((ref) => nameOfDoc?.(chunkEZLZ3MDU_cjs.splitDocRef(ref).id) ?? []);
2073
+ const pending = chunkJWYWP5EE_cjs.waitingDocuments(state);
2074
+ const pendingNames = pending.flatMap((ref) => nameOfDoc?.(chunkJWYWP5EE_cjs.splitDocRef(ref).id) ?? []);
2033
2075
  const header = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
2034
2076
  /* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon }),
2035
2077
  phase === "failed" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: run.retry && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2114,7 +2156,7 @@ function StepNotices({
2114
2156
  l,
2115
2157
  tid
2116
2158
  }) {
2117
- const notStarted = !chunkEZLZ3MDU_cjs.isPersonStep(step) && run.needsStart && run.phaseOf(step.id) === "ready";
2159
+ const notStarted = !chunkJWYWP5EE_cjs.isPersonStep(step) && run.needsStart && run.phaseOf(step.id) === "ready";
2118
2160
  const failed = run.failedUpstreamOf(step.id);
2119
2161
  if (!notStarted && failed.length === 0) return null;
2120
2162
  const why = (error) => error ? `: ${error}` : "";
@@ -2653,7 +2695,7 @@ var asForm = (step) => ({
2653
2695
  id: step.id,
2654
2696
  title: step.title,
2655
2697
  description: "",
2656
- inputs: chunkEZLZ3MDU_cjs.stepFields(step),
2698
+ inputs: chunkJWYWP5EE_cjs.stepFields(step),
2657
2699
  run: { kind: "operation" },
2658
2700
  landing: "chat"
2659
2701
  });
@@ -2672,13 +2714,13 @@ function WorkflowStepAction({
2672
2714
  onOpenDraft,
2673
2715
  onOpenReview
2674
2716
  }) {
2675
- const fields = chunkEZLZ3MDU_cjs.stepFields(step);
2717
+ const fields = chunkJWYWP5EE_cjs.stepFields(step);
2676
2718
  const [values, setValues] = react.useState(
2677
2719
  () => fields.length ? { ...chunk76L6LOP3_cjs.defaultInputs(asForm(step)), ...inputs } : {}
2678
2720
  );
2679
2721
  const [open, setOpen] = react.useState(null);
2680
2722
  const [note, setNote] = react.useState("");
2681
- const targets = chunkEZLZ3MDU_cjs.sendBackTargets(steps, states, step.id);
2723
+ const targets = chunkJWYWP5EE_cjs.sendBackTargets(steps, states, step.id);
2682
2724
  const [to, setTo] = react.useState(targets[0]?.id ?? "");
2683
2725
  const [busy, setBusy] = react.useState(false);
2684
2726
  const [error, setError] = react.useState(null);
@@ -7075,7 +7117,7 @@ function TaskStartDialog({
7075
7117
  setSourceOpen(false);
7076
7118
  }, [open]);
7077
7119
  const textareaRef = react.useRef(null);
7078
- const mention = chunkEZLZ3MDU_cjs.useMentionAutocomplete({
7120
+ const mention = chunkJWYWP5EE_cjs.useMentionAutocomplete({
7079
7121
  value: prompt,
7080
7122
  onValueChange: setPrompt,
7081
7123
  candidates: people,
@@ -8029,12 +8071,12 @@ function taskActivityHeadline(e, labels = DEFAULT_TASK_ACTIVITY_LABELS, agentNam
8029
8071
  case "step_skipped":
8030
8072
  return "Step skipped";
8031
8073
  case "step_waiting": {
8032
- const documents = chunkEZLZ3MDU_cjs.eventWaitingDocuments(detail);
8033
- return documents ? chunkEZLZ3MDU_cjs.waitingForDocumentsText(documents.length) : "Waiting on people";
8074
+ const documents = chunkJWYWP5EE_cjs.eventWaitingDocuments(detail);
8075
+ return documents ? chunkJWYWP5EE_cjs.waitingForDocumentsText(documents.length) : "Waiting on people";
8034
8076
  }
8035
8077
  case "step_progress": {
8036
- const documents = chunkEZLZ3MDU_cjs.eventWaitingDocuments(detail);
8037
- return documents ? chunkEZLZ3MDU_cjs.waitingForDocumentsText(documents.length) : detail.signed ? "Signed" : "Step moved on";
8078
+ const documents = chunkJWYWP5EE_cjs.eventWaitingDocuments(detail);
8079
+ return documents ? chunkJWYWP5EE_cjs.waitingForDocumentsText(documents.length) : detail.signed ? "Signed" : "Step moved on";
8038
8080
  }
8039
8081
  case "step_sent_back":
8040
8082
  return "Sent the work back";
@@ -8196,9 +8238,9 @@ function TaskFlow({
8196
8238
  const el = e.currentTarget;
8197
8239
  following.current = el.scrollWidth - el.scrollLeft - el.clientWidth < 24;
8198
8240
  },
8199
- children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex w-max min-w-full items-center gap-1 py-0.5", children: items.map((item, i) => {
8241
+ children: /* @__PURE__ */ jsxRuntime.jsx(ProgressChevronBar, { className: "w-max min-w-full py-0.5", children: items.map((item) => {
8200
8242
  const chip = (props) => /* @__PURE__ */ jsxRuntime.jsx(
8201
- chunkEZLZ3MDU_cjs.StepChip,
8243
+ chunkJWYWP5EE_cjs.StepChip,
8202
8244
  {
8203
8245
  kind: "adhoc",
8204
8246
  phase: "ready",
@@ -8219,18 +8261,18 @@ function TaskFlow({
8219
8261
  )
8220
8262
  }
8221
8263
  );
8222
- return /* @__PURE__ */ jsxRuntime.jsxs(
8223
- "li",
8264
+ return /* @__PURE__ */ jsxRuntime.jsx(
8265
+ ProgressChevron,
8224
8266
  {
8225
- className: "flex shrink-0 items-center gap-1",
8267
+ kind: "adhoc",
8268
+ phase: "done",
8269
+ current: item.current,
8270
+ className: "shrink-0",
8226
8271
  "data-testid": `thread-flow-${item.id}`,
8227
- children: [
8228
- i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "wf-link wf-kind-adhoc w-3 flex-none", "data-done": true }),
8229
- item.onSelect ? chip({ onClick: item.onSelect }) : item.detail ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
8230
- /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: chip({}) }),
8231
- /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverContent, { className: "max-h-72 overflow-y-auto text-sm whitespace-pre-wrap", children: item.detail })
8232
- ] }) : chip({ inert: true })
8233
- ]
8272
+ children: item.onSelect ? chip({ onClick: item.onSelect }) : item.detail ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
8273
+ /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: chip({}) }),
8274
+ /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverContent, { className: "max-h-72 overflow-y-auto text-sm whitespace-pre-wrap", children: item.detail })
8275
+ ] }) : chip({ inert: true })
8234
8276
  },
8235
8277
  item.id
8236
8278
  );
@@ -8252,7 +8294,7 @@ function ThreadActivity({ item, children }) {
8252
8294
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full max-w-xl items-center gap-2", children: [
8253
8295
  /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "wf-link", "data-done": done || void 0 }),
8254
8296
  /* @__PURE__ */ jsxRuntime.jsx(
8255
- chunkEZLZ3MDU_cjs.StepChip,
8297
+ chunkJWYWP5EE_cjs.StepChip,
8256
8298
  {
8257
8299
  inert: true,
8258
8300
  kind,
@@ -8271,7 +8313,7 @@ function ThreadActivity({ item, children }) {
8271
8313
  }
8272
8314
  ),
8273
8315
  document && /* @__PURE__ */ jsxRuntime.jsx(
8274
- chunkEZLZ3MDU_cjs.StepDocumentButton,
8316
+ chunkJWYWP5EE_cjs.StepDocumentButton,
8275
8317
  {
8276
8318
  kind,
8277
8319
  name: document.name,
@@ -8338,7 +8380,7 @@ function ThreadLauncher({
8338
8380
  const [shared, setShared] = react.useState(false);
8339
8381
  const [started, setStarted] = react.useState(null);
8340
8382
  const textareaRef = react.useRef(null);
8341
- const mention = chunkEZLZ3MDU_cjs.useMentionAutocomplete({
8383
+ const mention = chunkJWYWP5EE_cjs.useMentionAutocomplete({
8342
8384
  value: prompt,
8343
8385
  onValueChange: setPrompt,
8344
8386
  candidates: people,
@@ -8535,10 +8577,10 @@ function WorkflowRunStatus({
8535
8577
  testId = "workflow-run-status"
8536
8578
  }) {
8537
8579
  const l = { ...DEFAULT_WORKFLOW_RUN_STATUS_LABELS, ...labels };
8538
- const ordered = chunkEZLZ3MDU_cjs.stepLevels(steps).flat();
8539
- const phaseOf = (id) => isLoading ? "blocked" : chunkEZLZ3MDU_cjs.stepPhase(steps, states, id);
8540
- const finished = !isLoading && chunkEZLZ3MDU_cjs.isRunFinished(steps, states);
8541
- const atId = finished || isLoading ? void 0 : activeStepId(chunkEZLZ3MDU_cjs.stepLevels(steps), phaseOf);
8580
+ const ordered = chunkJWYWP5EE_cjs.stepLevels(steps).flat();
8581
+ const phaseOf = (id) => isLoading ? "blocked" : chunkJWYWP5EE_cjs.stepPhase(steps, states, id);
8582
+ const finished = !isLoading && chunkJWYWP5EE_cjs.isRunFinished(steps, states);
8583
+ const atId = finished || isLoading ? void 0 : activeStepId(chunkJWYWP5EE_cjs.stepLevels(steps), phaseOf);
8542
8584
  const at = ordered.find((s) => s.id === atId);
8543
8585
  const phase = at ? phaseOf(at.id) : "done";
8544
8586
  const assignee = at && ["ready", "waiting"].includes(phase) ? assigneeOf?.(at) : void 0;
@@ -8570,7 +8612,7 @@ function WorkflowRunStatus({
8570
8612
  "span",
8571
8613
  {
8572
8614
  className: ui.cn(
8573
- `wf-kind-${chunkEZLZ3MDU_cjs.stepKindOf(s)}`,
8615
+ `wf-kind-${chunkJWYWP5EE_cjs.stepKindOf(s)}`,
8574
8616
  "h-1.5 w-3 shrink-0 rounded-full",
8575
8617
  SEGMENT[phaseOf(s.id)],
8576
8618
  s.id === atId && "w-5"
@@ -8616,7 +8658,7 @@ function groupThreadActivity(steps, items) {
8616
8658
  continue;
8617
8659
  }
8618
8660
  if (current === void 0) out.before.push(item);
8619
- else if (chunkEZLZ3MDU_cjs.isRunFinished(steps, states)) out.after.push(item);
8661
+ else if (chunkJWYWP5EE_cjs.isRunFinished(steps, states)) out.after.push(item);
8620
8662
  else {
8621
8663
  const status = states[current]?.status;
8622
8664
  const at = status === "done" || status === "skipped" ? steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? ""))?.id ?? current : current;
@@ -8639,9 +8681,9 @@ var DEFAULT_WORKFLOW_THREAD_STRIP_LABELS = {
8639
8681
  after: "After",
8640
8682
  beforeSteps: "Before the first step",
8641
8683
  afterSteps: "After the last step",
8642
- kinds: chunkEZLZ3MDU_cjs.DEFAULT_STEP_KIND_LABELS,
8643
- documents: chunkEZLZ3MDU_cjs.DEFAULT_STEP_DOCUMENT_LABELS,
8644
- record: chunkEZLZ3MDU_cjs.DEFAULT_STEP_RECORD_LABELS
8684
+ kinds: chunkJWYWP5EE_cjs.DEFAULT_STEP_KIND_LABELS,
8685
+ documents: chunkJWYWP5EE_cjs.DEFAULT_STEP_DOCUMENT_LABELS,
8686
+ record: chunkJWYWP5EE_cjs.DEFAULT_STEP_RECORD_LABELS
8645
8687
  };
8646
8688
  function WorkflowThreadStartedBy({
8647
8689
  origin,
@@ -8772,7 +8814,7 @@ function EntriesChip({
8772
8814
  const latest = items.at(-1);
8773
8815
  return /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
8774
8816
  /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
8775
- chunkEZLZ3MDU_cjs.StepChip,
8817
+ chunkJWYWP5EE_cjs.StepChip,
8776
8818
  {
8777
8819
  kind,
8778
8820
  phase: "ready",
@@ -8814,20 +8856,19 @@ function WorkflowThreadStrip({
8814
8856
  const barL = { ...DEFAULT_STEP_BAR_LABELS, ...barLabels };
8815
8857
  const grouped = groupThreadActivity(steps, items);
8816
8858
  const strays = signals.filter((s) => !steps.some((step) => step.id === s.step));
8817
- const link = /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "wf-link wf-kind-start max-w-6", "data-done": true });
8818
8859
  const [selected, setSelected] = react.useState(null);
8819
8860
  const [open, setOpen] = react.useState(null);
8820
- const phaseOf = (id) => chunkEZLZ3MDU_cjs.stepPhase(steps, states, id);
8861
+ const phaseOf = (id) => chunkJWYWP5EE_cjs.stepPhase(steps, states, id);
8821
8862
  const iconOf = (step) => step.icon && renderIcon ? renderIcon(step.icon) : void 0;
8822
8863
  const glyphOf = (step) => {
8823
- const KindIcon = chunkEZLZ3MDU_cjs.STEP_KIND_ICONS[chunkEZLZ3MDU_cjs.stepKindOf(step)];
8864
+ const KindIcon = chunkJWYWP5EE_cjs.STEP_KIND_ICONS[chunkJWYWP5EE_cjs.stepKindOf(step)];
8824
8865
  return iconOf(step) ?? /* @__PURE__ */ jsxRuntime.jsx(KindIcon, {});
8825
8866
  };
8826
8867
  const waitingOf = (id) => {
8827
8868
  const step = steps.find((s) => s.id === id);
8828
8869
  const phase = phaseOf(id);
8829
- const documents = chunkEZLZ3MDU_cjs.waitingDocuments(states[id]);
8830
- if (documents.length) return chunkEZLZ3MDU_cjs.waitingForDocumentsText(documents.length);
8870
+ const documents = chunkJWYWP5EE_cjs.waitingDocuments(states[id]);
8871
+ if (documents.length) return chunkJWYWP5EE_cjs.waitingForDocumentsText(documents.length);
8831
8872
  const name = step && (phase === "ready" || phase === "waiting") ? assigneeOf?.(step) : void 0;
8832
8873
  return name ? l.waitingFor.replace("{name}", name) : void 0;
8833
8874
  };
@@ -8837,8 +8878,8 @@ function WorkflowThreadStrip({
8837
8878
  const assignee = phase === "ready" || phase === "waiting" ? assigneeOf?.(step) : void 0;
8838
8879
  const waiting = waitingOf(step.id);
8839
8880
  const sentBack = states[step.id]?.sentBack;
8840
- const kind = chunkEZLZ3MDU_cjs.stepKindOf(step);
8841
- const documents = chunkEZLZ3MDU_cjs.stepDocuments(steps, states, step.id);
8881
+ const kind = chunkJWYWP5EE_cjs.stepKindOf(step);
8882
+ const documents = chunkJWYWP5EE_cjs.stepDocuments(steps, states, step.id);
8842
8883
  const latestDoc = onOpenDocument ? documents.at(-1) : void 0;
8843
8884
  const finished = ["done", "skipped", "failed"].includes(phase);
8844
8885
  const chip = /* @__PURE__ */ jsxRuntime.jsxs(
@@ -8851,7 +8892,7 @@ function WorkflowThreadStrip({
8851
8892
  },
8852
8893
  children: [
8853
8894
  /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
8854
- chunkEZLZ3MDU_cjs.StepChip,
8895
+ chunkJWYWP5EE_cjs.StepChip,
8855
8896
  {
8856
8897
  kind,
8857
8898
  phase,
@@ -8900,7 +8941,7 @@ function WorkflowThreadStrip({
8900
8941
  ),
8901
8942
  sentBack && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 text-xs text-amber-700 dark:text-amber-300", children: l.sentBack }),
8902
8943
  /* @__PURE__ */ jsxRuntime.jsx(
8903
- chunkEZLZ3MDU_cjs.StepDocumentCards,
8944
+ chunkJWYWP5EE_cjs.StepDocumentCards,
8904
8945
  {
8905
8946
  refs: documents,
8906
8947
  heading: step.kind === "review" ? phase === "done" ? l.documents.approved : l.documents.toApprove : l.documents.produced,
@@ -8911,7 +8952,7 @@ function WorkflowThreadStrip({
8911
8952
  }
8912
8953
  ),
8913
8954
  /* @__PURE__ */ jsxRuntime.jsx(
8914
- chunkEZLZ3MDU_cjs.StepRecord,
8955
+ chunkJWYWP5EE_cjs.StepRecord,
8915
8956
  {
8916
8957
  step,
8917
8958
  state: states[step.id],
@@ -8943,59 +8984,53 @@ function WorkflowThreadStrip({
8943
8984
  return latestDoc ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center", children: [
8944
8985
  chip,
8945
8986
  /* @__PURE__ */ jsxRuntime.jsx(
8946
- chunkEZLZ3MDU_cjs.StepDocumentButton,
8987
+ chunkJWYWP5EE_cjs.StepDocumentButton,
8947
8988
  {
8948
8989
  kind,
8949
- name: nameOfDoc?.(chunkEZLZ3MDU_cjs.splitDocRef(latestDoc).id) ?? latestDoc,
8990
+ name: nameOfDoc?.(chunkJWYWP5EE_cjs.splitDocRef(latestDoc).id) ?? latestDoc,
8950
8991
  onOpen: () => onOpenDocument?.(latestDoc),
8951
8992
  testId: `workflow-thread-step-${step.id}-open-document`
8952
8993
  }
8953
8994
  )
8954
8995
  ] }) : chip;
8955
8996
  };
8956
- const leading = startedBy || grouped.before.length ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [
8957
- grouped.before.length ? /* @__PURE__ */ jsxRuntime.jsx(
8997
+ const leading = startedBy || grouped.before.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-1", children: grouped.before.length ? /* @__PURE__ */ jsxRuntime.jsx(
8998
+ EntriesChip,
8999
+ {
9000
+ kind: "start",
9001
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, {}),
9002
+ label: l.started,
9003
+ items: grouped.before,
9004
+ heading: l.beforeSteps,
9005
+ extra: startedBy && /* @__PURE__ */ jsxRuntime.jsx(WorkflowThreadStartedBy, { origin: startedBy, labels }),
9006
+ testId: "workflow-thread-start"
9007
+ }
9008
+ ) : startedBy && /* @__PURE__ */ jsxRuntime.jsx(WorkflowThreadStartedBy, { origin: startedBy, labels }) }) : null;
9009
+ const trailing = grouped.after.length || strays.length ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [
9010
+ grouped.after.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
8958
9011
  EntriesChip,
8959
9012
  {
8960
- kind: "start",
8961
- icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, {}),
8962
- label: l.started,
8963
- items: grouped.before,
8964
- heading: l.beforeSteps,
8965
- extra: startedBy && /* @__PURE__ */ jsxRuntime.jsx(WorkflowThreadStartedBy, { origin: startedBy, labels }),
8966
- testId: "workflow-thread-start"
9013
+ kind: "adhoc",
9014
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessagesSquare, {}),
9015
+ label: l.after,
9016
+ items: grouped.after,
9017
+ heading: l.afterSteps,
9018
+ testId: "workflow-thread-after"
8967
9019
  }
8968
- ) : startedBy && /* @__PURE__ */ jsxRuntime.jsx(WorkflowThreadStartedBy, { origin: startedBy, labels }),
8969
- link
8970
- ] }) : null;
8971
- const trailing = grouped.after.length || strays.length ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [
8972
- grouped.after.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8973
- /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "wf-link max-w-6" }),
8974
- /* @__PURE__ */ jsxRuntime.jsx(
8975
- EntriesChip,
8976
- {
8977
- kind: "adhoc",
8978
- icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessagesSquare, {}),
8979
- label: l.after,
8980
- items: grouped.after,
8981
- heading: l.afterSteps,
8982
- testId: "workflow-thread-after"
8983
- }
8984
- )
8985
- ] }),
9020
+ ),
8986
9021
  strays.map((s) => /* @__PURE__ */ jsxRuntime.jsx(SignalPill, { signal: s, l }, `${s.step}-${s.signal}`))
8987
9022
  ] }) : null;
8988
- const at = steps.find((s) => s.id === (selected ?? activeStepId(chunkEZLZ3MDU_cjs.stepLevels(steps), phaseOf)));
8989
- const headingPx = (step) => `${l.kinds[chunkEZLZ3MDU_cjs.stepKindOf(step)]} \xB7 ${waitingOf(step.id) ?? ""}`.length * 5.6 - step.title.length * 6.5;
9023
+ const at = steps.find((s) => s.id === (selected ?? activeStepId(chunkJWYWP5EE_cjs.stepLevels(steps), phaseOf)));
9024
+ const headingPx = (step) => `${l.kinds[chunkJWYWP5EE_cjs.stepKindOf(step)]} \xB7 ${waitingOf(step.id) ?? ""}`.length * 5.6 - step.title.length * 6.5;
8990
9025
  const reserve = {
8991
- always: (at ? Math.max(0, headingPx(at)) : 0) + steps.filter((s) => grouped.byStep[s.id]?.length).length * BEADS_PX + (onOpenDocument ? steps.filter((s) => chunkEZLZ3MDU_cjs.stepDocuments(steps, states, s.id).length).length * DOC_BUTTON_PX : 0),
9026
+ always: (at ? Math.max(0, headingPx(at)) : 0) + steps.filter((s) => grouped.byStep[s.id]?.length).length * BEADS_PX + (onOpenDocument ? steps.filter((s) => chunkJWYWP5EE_cjs.stepDocuments(steps, states, s.id).length).length * DOC_BUTTON_PX : 0),
8992
9027
  leading: leading ? 150 : 0,
8993
9028
  trailing: trailing ? 120 : 0
8994
9029
  };
8995
9030
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("min-w-0 flex-1", className), "data-testid": "workflow-thread-strip", children: /* @__PURE__ */ jsxRuntime.jsx(
8996
9031
  StepBarFrame,
8997
9032
  {
8998
- levels: chunkEZLZ3MDU_cjs.stepLevels(steps),
9033
+ levels: chunkJWYWP5EE_cjs.stepLevels(steps),
8999
9034
  phaseOf,
9000
9035
  current: selected,
9001
9036
  onSelect: (id) => {
@@ -9008,7 +9043,7 @@ function WorkflowThreadStrip({
9008
9043
  trailing,
9009
9044
  reservePx: reserve,
9010
9045
  icon: glyphOf,
9011
- kindOf: chunkEZLZ3MDU_cjs.stepKindOf,
9046
+ kindOf: chunkJWYWP5EE_cjs.stepKindOf,
9012
9047
  labels: { waitingFor: l.waitingFor, ...barLabels },
9013
9048
  tid: (suffix) => `workflow-thread-${suffix}`
9014
9049
  }
@@ -9084,11 +9119,11 @@ function compactThreadActivity(events, stepTitleOf) {
9084
9119
  const count = Math.max(1, entry.recipients.length);
9085
9120
  entry.label = `Notified ${count} ${count === 1 ? "user" : "users"}`;
9086
9121
  } else if (STEP_LABELS[event.kind]) {
9087
- const documents = chunkEZLZ3MDU_cjs.eventWaitingDocuments(event.detail);
9122
+ const documents = chunkJWYWP5EE_cjs.eventWaitingDocuments(event.detail);
9088
9123
  const title = typeof event.detail?.step === "string" ? stepTitleOf?.(event.detail.step) : void 0;
9089
9124
  result.push({
9090
9125
  event,
9091
- label: documents ? chunkEZLZ3MDU_cjs.waitingForDocumentsText(documents.length) : title && STEP_VERBS[event.kind] ? `${title} ${STEP_VERBS[event.kind]}` : STEP_LABELS[event.kind],
9126
+ label: documents ? chunkJWYWP5EE_cjs.waitingForDocumentsText(documents.length) : title && STEP_VERBS[event.kind] ? `${title} ${STEP_VERBS[event.kind]}` : STEP_LABELS[event.kind],
9092
9127
  recipients: []
9093
9128
  });
9094
9129
  } else if (["artifact_created", "artifact_edited", "document_added", "document_removed"].includes(
@@ -12663,6 +12698,7 @@ exports.CUSTOM_TASK = CUSTOM_TASK;
12663
12698
  exports.CUSTOM_TASK_ID = CUSTOM_TASK_ID;
12664
12699
  exports.CapabilityGrid = CapabilityGrid;
12665
12700
  exports.CapabilityTile = CapabilityTile;
12701
+ exports.ChevronShape = ChevronShape;
12666
12702
  exports.ConfigField = ConfigField;
12667
12703
  exports.ConfigForm = ConfigForm;
12668
12704
  exports.ConsentActions = ConsentActions;
@@ -12740,6 +12776,8 @@ exports.MODEL_TIER_ICON_MAP = MODEL_TIER_ICON_MAP;
12740
12776
  exports.MODEL_TIER_LABELS = MODEL_TIER_LABELS;
12741
12777
  exports.NewThreadDialog = NewThreadDialog;
12742
12778
  exports.PillSelect = PillSelect;
12779
+ exports.ProgressChevron = ProgressChevron;
12780
+ exports.ProgressChevronBar = ProgressChevronBar;
12743
12781
  exports.REMIND_TASK = REMIND_TASK;
12744
12782
  exports.REMIND_TASK_ID = REMIND_TASK_ID;
12745
12783
  exports.RecurrenceBuilder = RecurrenceBuilder;
@@ -12927,5 +12965,5 @@ exports.workflowTaskFields = workflowTaskFields;
12927
12965
  exports.workflowToComposerValues = workflowToComposerValues;
12928
12966
  exports.workflowToSkillMarkdown = workflowToSkillMarkdown;
12929
12967
  exports.workflowWhen = workflowWhen;
12930
- //# sourceMappingURL=chunk-JYR55F3P.cjs.map
12931
- //# sourceMappingURL=chunk-JYR55F3P.cjs.map
12968
+ //# sourceMappingURL=chunk-K6T255ST.cjs.map
12969
+ //# sourceMappingURL=chunk-K6T255ST.cjs.map