@arbidocs/blocks 0.4.130 → 0.4.132

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 (62) hide show
  1. package/dist/agents/index.cjs +302 -302
  2. package/dist/agents/index.js +10 -10
  3. package/dist/chat/index.cjs +139 -139
  4. package/dist/chat/index.js +4 -4
  5. package/dist/{chunk-SZX44LCT.js → chunk-26E6PHD2.js} +3 -3
  6. package/dist/{chunk-SZX44LCT.js.map → chunk-26E6PHD2.js.map} +1 -1
  7. package/dist/{chunk-GDBDHOI4.js → chunk-3FFRYZKV.js} +3 -3
  8. package/dist/{chunk-GDBDHOI4.js.map → chunk-3FFRYZKV.js.map} +1 -1
  9. package/dist/{chunk-QDEODGXE.cjs → chunk-44R3CCZT.cjs} +3 -3
  10. package/dist/{chunk-QDEODGXE.cjs.map → chunk-44R3CCZT.cjs.map} +1 -1
  11. package/dist/{chunk-2PNNCEPH.js → chunk-54ANPPMV.js} +4 -4
  12. package/dist/{chunk-2PNNCEPH.js.map → chunk-54ANPPMV.js.map} +1 -1
  13. package/dist/{chunk-2DFDFOM7.js → chunk-7HAM7Y5U.js} +3 -3
  14. package/dist/{chunk-2DFDFOM7.js.map → chunk-7HAM7Y5U.js.map} +1 -1
  15. package/dist/{chunk-UMIY4SQS.js → chunk-BMNNT27D.js} +9 -9
  16. package/dist/{chunk-UMIY4SQS.js.map → chunk-BMNNT27D.js.map} +1 -1
  17. package/dist/{chunk-4S5IDT5F.cjs → chunk-BZF55UCE.cjs} +5 -5
  18. package/dist/{chunk-4S5IDT5F.cjs.map → chunk-BZF55UCE.cjs.map} +1 -1
  19. package/dist/{chunk-PUCY3UXN.js → chunk-CXLVI3SB.js} +3 -3
  20. package/dist/{chunk-PUCY3UXN.js.map → chunk-CXLVI3SB.js.map} +1 -1
  21. package/dist/{chunk-KYDRUFWT.cjs → chunk-D4YR56FV.cjs} +5 -5
  22. package/dist/{chunk-KYDRUFWT.cjs.map → chunk-D4YR56FV.cjs.map} +1 -1
  23. package/dist/{chunk-6AALMYPS.cjs → chunk-HM23LXUP.cjs} +3 -3
  24. package/dist/{chunk-6AALMYPS.cjs.map → chunk-HM23LXUP.cjs.map} +1 -1
  25. package/dist/{chunk-4QIIDXLF.cjs → chunk-HW2J4JMV.cjs} +4 -4
  26. package/dist/{chunk-4QIIDXLF.cjs.map → chunk-HW2J4JMV.cjs.map} +1 -1
  27. package/dist/{chunk-SARREDFP.cjs → chunk-LC2KJSUS.cjs} +46 -46
  28. package/dist/{chunk-SARREDFP.cjs.map → chunk-LC2KJSUS.cjs.map} +1 -1
  29. package/dist/{chunk-TT6XV6WM.cjs → chunk-QUDCNT63.cjs} +77 -77
  30. package/dist/{chunk-TT6XV6WM.cjs.map → chunk-QUDCNT63.cjs.map} +1 -1
  31. package/dist/{chunk-ENDP7JER.js → chunk-VW2C2AZL.js} +3 -3
  32. package/dist/{chunk-ENDP7JER.js.map → chunk-VW2C2AZL.js.map} +1 -1
  33. package/dist/{chunk-PJJY6CYL.cjs → chunk-WV4IDVDQ.cjs} +11 -11
  34. package/dist/{chunk-PJJY6CYL.cjs.map → chunk-WV4IDVDQ.cjs.map} +1 -1
  35. package/dist/{chunk-QYTYW74G.js → chunk-YIF6SVSO.js} +3 -3
  36. package/dist/{chunk-QYTYW74G.js.map → chunk-YIF6SVSO.js.map} +1 -1
  37. package/dist/collaboration/index.cjs +9 -9
  38. package/dist/collaboration/index.js +1 -1
  39. package/dist/connect/index.cjs +43 -43
  40. package/dist/connect/index.js +10 -10
  41. package/dist/document-tools/index.cjs +1 -1
  42. package/dist/document-tools/index.js +1 -1
  43. package/dist/facts/index.cjs +1 -1
  44. package/dist/facts/index.js +1 -1
  45. package/dist/files/index.cjs +1 -1
  46. package/dist/files/index.js +1 -1
  47. package/dist/home/index.cjs +17 -17
  48. package/dist/home/index.js +3 -3
  49. package/dist/index.cjs +501 -501
  50. package/dist/index.js +16 -16
  51. package/dist/settings/index.cjs +10 -10
  52. package/dist/settings/index.js +2 -2
  53. package/dist/shell/index.cjs +1 -1
  54. package/dist/shell/index.js +1 -1
  55. package/dist/site/index.cjs +5 -5
  56. package/dist/site/index.js +1 -1
  57. package/dist/studio/index.cjs +6 -6
  58. package/dist/studio/index.js +5 -5
  59. package/dist/workflow-canvas/index.cjs +61 -61
  60. package/dist/workflow-canvas/index.js +10 -10
  61. package/node_modules/@arbidocs/coedit/package.json +1 -1
  62. package/package.json +4 -4
@@ -1,20 +1,20 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunk3AFWGEDJ_cjs = require('./chunk-3AFWGEDJ.cjs');
4
+ var chunk44R3CCZT_cjs = require('./chunk-44R3CCZT.cjs');
5
5
  var chunkS5HZBXZA_cjs = require('./chunk-S5HZBXZA.cjs');
6
- var chunkDVUZTGVL_cjs = require('./chunk-DVUZTGVL.cjs');
7
6
  var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
8
- var chunkSARREDFP_cjs = require('./chunk-SARREDFP.cjs');
7
+ var chunkLC2KJSUS_cjs = require('./chunk-LC2KJSUS.cjs');
8
+ var chunk7D737FLE_cjs = require('./chunk-7D737FLE.cjs');
9
9
  var chunkN26CXGXC_cjs = require('./chunk-N26CXGXC.cjs');
10
+ var chunk3AFWGEDJ_cjs = require('./chunk-3AFWGEDJ.cjs');
11
+ var chunkDVUZTGVL_cjs = require('./chunk-DVUZTGVL.cjs');
12
+ var chunkR26BK7YL_cjs = require('./chunk-R26BK7YL.cjs');
10
13
  var chunkV4ISCZJ7_cjs = require('./chunk-V4ISCZJ7.cjs');
11
14
  var chunk2EI7NCUA_cjs = require('./chunk-2EI7NCUA.cjs');
12
15
  var chunkC2CWWEHO_cjs = require('./chunk-C2CWWEHO.cjs');
13
- var chunkQDEODGXE_cjs = require('./chunk-QDEODGXE.cjs');
14
- var chunkR26BK7YL_cjs = require('./chunk-R26BK7YL.cjs');
15
- var chunk7D737FLE_cjs = require('./chunk-7D737FLE.cjs');
16
16
  var chunk7RGLTF76_cjs = require('./chunk-7RGLTF76.cjs');
17
- var chunk6AALMYPS_cjs = require('./chunk-6AALMYPS.cjs');
17
+ var chunkHM23LXUP_cjs = require('./chunk-HM23LXUP.cjs');
18
18
  var chunk7UTB4PHM_cjs = require('./chunk-7UTB4PHM.cjs');
19
19
  var chunkFX3K6LNZ_cjs = require('./chunk-FX3K6LNZ.cjs');
20
20
  var chunkMHVNT4J3_cjs = require('./chunk-MHVNT4J3.cjs');
@@ -146,7 +146,7 @@ function WorkflowConfigDialog({
146
146
  }) {
147
147
  const l = { ...DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, ...labels };
148
148
  const initialKey = JSON.stringify(initialInputs ?? {});
149
- const seedKey = JSON.stringify({ ...chunk6AALMYPS_cjs.defaultInputs(workflow), ...JSON.parse(initialKey) });
149
+ const seedKey = JSON.stringify({ ...chunkHM23LXUP_cjs.defaultInputs(workflow), ...JSON.parse(initialKey) });
150
150
  const seed = react.useMemo(() => JSON.parse(seedKey), [seedKey]);
151
151
  const [inputs, setInputs] = useControllableState(inputsProp, seed, onInputsChange);
152
152
  const [agentId, setAgentId] = useControllableState(
@@ -158,7 +158,7 @@ function WorkflowConfigDialog({
158
158
  if (open && inputsProp === void 0) setInputs(seed);
159
159
  }, [open, seed]);
160
160
  const setField = (name, value) => setInputs({ ...inputs, [name]: value });
161
- const errors = chunk6AALMYPS_cjs.validateInputs(workflow, inputs);
161
+ const errors = chunkHM23LXUP_cjs.validateInputs(workflow, inputs);
162
162
  const valid = Object.keys(errors).length === 0;
163
163
  const visibleErrors = Object.fromEntries(
164
164
  Object.entries(errors).filter(([, e]) => e !== "required")
@@ -171,7 +171,7 @@ function WorkflowConfigDialog({
171
171
  const blockedByScope = matchedCount !== null && matchedCount === 0 && Boolean(workflow.requiresFiles);
172
172
  const showAgent = workflow.run.kind === "prompt" && workflow.options?.agent !== false && agents !== void 0 && agents.length > 0;
173
173
  const launch = (values) => {
174
- Promise.resolve(onLaunch(chunk6AALMYPS_cjs.buildLaunch(workflow, values, agentId))).catch(() => {
174
+ Promise.resolve(onLaunch(chunkHM23LXUP_cjs.buildLaunch(workflow, values, agentId))).catch(() => {
175
175
  });
176
176
  };
177
177
  const submit = () => {
@@ -190,7 +190,7 @@ function WorkflowConfigDialog({
190
190
  const firstField = workflow.inputs.find((f) => !f.advanced);
191
191
  const focusPromptFirst = firstField?.type === "text" || firstField?.type === "longtext";
192
192
  const defaultScopeRender = scopeSource ? (_field, value, onChange) => /* @__PURE__ */ jsxRuntime.jsx(
193
- chunkQDEODGXE_cjs.ScopePicker,
193
+ chunk44R3CCZT_cjs.ScopePicker,
194
194
  {
195
195
  folders: scopeSource.folders,
196
196
  unfiledCount: scopeSource.unfiledCount,
@@ -223,7 +223,7 @@ function WorkflowConfigDialog({
223
223
  },
224
224
  children: [
225
225
  /* @__PURE__ */ jsxRuntime.jsx(
226
- chunkQDEODGXE_cjs.QuickActionDialogHeader,
226
+ chunk44R3CCZT_cjs.QuickActionDialogHeader,
227
227
  {
228
228
  icon: workflow.icon && renderIcon ? renderIcon(workflow.icon) : null,
229
229
  title: workflow.title,
@@ -241,7 +241,7 @@ function WorkflowConfigDialog({
241
241
  submit();
242
242
  },
243
243
  children: noFiles ? /* @__PURE__ */ jsxRuntime.jsx(
244
- chunkQDEODGXE_cjs.AddFilesFirst,
244
+ chunk44R3CCZT_cjs.AddFilesFirst,
245
245
  {
246
246
  reason: l.addFilesReason,
247
247
  action: addFilesAction,
@@ -249,7 +249,7 @@ function WorkflowConfigDialog({
249
249
  }
250
250
  ) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
251
251
  /* @__PURE__ */ jsxRuntime.jsx(
252
- chunkSARREDFP_cjs.SchemaForm,
252
+ chunkLC2KJSUS_cjs.SchemaForm,
253
253
  {
254
254
  fields,
255
255
  values: inputs,
@@ -308,7 +308,7 @@ function defaultScopeRenderer(scopeSource) {
308
308
  if (!scopeSource) return void 0;
309
309
  return function renderScope(_field, value, onChange) {
310
310
  return /* @__PURE__ */ jsxRuntime.jsx(
311
- chunkQDEODGXE_cjs.ScopePicker,
311
+ chunk44R3CCZT_cjs.ScopePicker,
312
312
  {
313
313
  folders: scopeSource.folders,
314
314
  unfiledCount: scopeSource.unfiledCount,
@@ -327,7 +327,7 @@ function resolveScopeInputs(workflow, inputs, scopeSource) {
327
327
  for (const field of workflow.inputs) {
328
328
  if (field.type !== "scope") continue;
329
329
  const raw = inputs[field.name];
330
- const scope = chunk6AALMYPS_cjs.isWorkflowScope(raw) ? raw : { folders: [], labels: [] };
330
+ const scope = chunkHM23LXUP_cjs.isWorkflowScope(raw) ? raw : { folders: [], labels: [] };
331
331
  next[field.name] = { ...scope, documents: scopeSource.resolveDocuments(scope) };
332
332
  }
333
333
  return next;
@@ -369,9 +369,9 @@ function WorkflowLauncher({
369
369
  };
370
370
  const select = (workflow) => {
371
371
  if (workflow.run.kind === "operation" && workflow.inputs.length === 0) {
372
- const inputs = chunk6AALMYPS_cjs.defaultInputs(workflow);
373
- if (Object.keys(chunk6AALMYPS_cjs.validateInputs(workflow, inputs)).length === 0) {
374
- Promise.resolve(onLaunch(chunk6AALMYPS_cjs.buildLaunch(workflow, inputs, void 0))).catch(() => {
372
+ const inputs = chunkHM23LXUP_cjs.defaultInputs(workflow);
373
+ if (Object.keys(chunkHM23LXUP_cjs.validateInputs(workflow, inputs)).length === 0) {
374
+ Promise.resolve(onLaunch(chunkHM23LXUP_cjs.buildLaunch(workflow, inputs, void 0))).catch(() => {
375
375
  });
376
376
  return;
377
377
  }
@@ -393,7 +393,7 @@ function WorkflowLauncher({
393
393
  });
394
394
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, "data-slot": "workflow-launcher", children: [
395
395
  showTiles && /* @__PURE__ */ jsxRuntime.jsx(
396
- chunkQDEODGXE_cjs.StartTiles,
396
+ chunk44R3CCZT_cjs.StartTiles,
397
397
  {
398
398
  items: [...tiles, ...extraTiles],
399
399
  caption,
@@ -521,7 +521,7 @@ function workflowToSkillMarkdown(workflow) {
521
521
  if (workflow.landing !== "chat") lines.push(`landing: ${workflow.landing}`);
522
522
  if (workflow.requiresFiles) lines.push("requires_files: true");
523
523
  if (workflow.inputs.length > 0) {
524
- lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(chunk6AALMYPS_cjs.fieldToFrontmatter))}`);
524
+ lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(chunkHM23LXUP_cjs.fieldToFrontmatter))}`);
525
525
  }
526
526
  lines.push("---", "", run.promptTemplate.trim(), "");
527
527
  return lines.join("\n");
@@ -543,11 +543,11 @@ function workflowFromSkillMarkdown(id, text2) {
543
543
  } else if (value === "true" || value === "false") frontmatter[key] = value === "true";
544
544
  else frontmatter[key] = value;
545
545
  }
546
- return chunk6AALMYPS_cjs.workflowFromFrontmatter(id, frontmatter, body);
546
+ return chunkHM23LXUP_cjs.workflowFromFrontmatter(id, frontmatter, body);
547
547
  }
548
548
  function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, resolveWorkflow, compose } = {}) {
549
- const steps = chunk6AALMYPS_cjs.workflowSteps(workflow);
550
- const [inputs, setInputs] = react.useState(() => chunk6AALMYPS_cjs.initialRunInputs(workflow));
549
+ const steps = chunkHM23LXUP_cjs.workflowSteps(workflow);
550
+ const [inputs, setInputs] = react.useState(() => chunkHM23LXUP_cjs.initialRunInputs(workflow));
551
551
  const [states, setStates] = react.useState({});
552
552
  const set = (id, state) => setStates((s) => ({ ...s, [id]: state }));
553
553
  const timers = react.useRef(/* @__PURE__ */ new Map());
@@ -569,10 +569,10 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
569
569
  react.useEffect(() => {
570
570
  if (Object.values(states).some((s) => s.status === "running")) return;
571
571
  const next = steps.find(
572
- (s) => (s.kind === "agent" || s.kind === "action") && chunk6AALMYPS_cjs.stepPhase(steps, states, s.id) === "ready"
572
+ (s) => (s.kind === "agent" || s.kind === "action") && chunkHM23LXUP_cjs.stepPhase(steps, states, s.id) === "ready"
573
573
  );
574
574
  if (!next || next.kind !== "agent" && next.kind !== "action") return;
575
- const prompt = next.kind === "agent" ? chunk6AALMYPS_cjs.composeStepPrompt(workflow, next, inputs, { resolveWorkflow, compose }) : "";
575
+ const prompt = next.kind === "agent" ? chunkHM23LXUP_cjs.composeStepPrompt(workflow, next, inputs, { resolveWorkflow, compose }) : "";
576
576
  set(next.id, { status: "running", startedAt: (/* @__PURE__ */ new Date()).toISOString() });
577
577
  timers.current.set(
578
578
  next.id,
@@ -585,7 +585,7 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
585
585
  }, delayMs)
586
586
  );
587
587
  }, [states, steps, workflow]);
588
- return chunkSARREDFP_cjs.useWorkflowView({
588
+ return chunkLC2KJSUS_cjs.useWorkflowView({
589
589
  steps,
590
590
  states,
591
591
  inputs,
@@ -4710,7 +4710,7 @@ function TaskStartDialog({
4710
4710
  setSourceOpen(false);
4711
4711
  }, [open]);
4712
4712
  const textareaRef = react.useRef(null);
4713
- const mention = chunk6AALMYPS_cjs.useMentionAutocomplete({
4713
+ const mention = chunkHM23LXUP_cjs.useMentionAutocomplete({
4714
4714
  value: prompt,
4715
4715
  onValueChange: setPrompt,
4716
4716
  candidates: people,
@@ -5061,7 +5061,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
5061
5061
  }
5062
5062
  const typed = name?.trim();
5063
5063
  if (workflow.options?.agent === false) {
5064
- const message = chunk6AALMYPS_cjs.composeWorkflowPrompt(workflow, inputs, context);
5064
+ const message = chunkHM23LXUP_cjs.composeWorkflowPrompt(workflow, inputs, context);
5065
5065
  return { name: typed || message, prompt: "", skill_ref: null, skill_inputs: null };
5066
5066
  }
5067
5067
  const derived = typed || deriveWorkflowName(workflow, inputs);
@@ -5075,7 +5075,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
5075
5075
  }
5076
5076
  return {
5077
5077
  name: derived,
5078
- prompt: chunk6AALMYPS_cjs.composeWorkflowPrompt(workflow, inputs, context),
5078
+ prompt: chunkHM23LXUP_cjs.composeWorkflowPrompt(workflow, inputs, context),
5079
5079
  skill_ref: null,
5080
5080
  // The files a run is bound to travel in the saved inputs, whatever the template: the server binds
5081
5081
  // the run to the ids listed under any input's `documents`.
@@ -6255,7 +6255,7 @@ function TaskActivityDialog({
6255
6255
  testId,
6256
6256
  ...timeline
6257
6257
  }) {
6258
- const l = { ...chunkSARREDFP_cjs.DEFAULT_TASK_ACTIVITY_LABELS, ...labels };
6258
+ const l = { ...chunkLC2KJSUS_cjs.DEFAULT_TASK_ACTIVITY_LABELS, ...labels };
6259
6259
  const id = chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "task-activity" });
6260
6260
  const count = events?.length ?? 0;
6261
6261
  const scrollToEnd = react.useCallback(
@@ -6270,7 +6270,7 @@ function TaskActivityDialog({
6270
6270
  /* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { className: "truncate", children: taskName })
6271
6271
  ] }),
6272
6272
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-h-[55dvh] overflow-y-auto pr-1", "data-testid": `${id}-scroll`, children: [
6273
- isLoading && !events ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.loading }) : isError && !events ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive", children: l.error }) : count === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.empty }) : /* @__PURE__ */ jsxRuntime.jsx(chunkSARREDFP_cjs.TaskActivityTimeline, { events: events ?? [], labels, testId: id, ...timeline }),
6273
+ isLoading && !events ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.loading }) : isError && !events ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive", children: l.error }) : count === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.empty }) : /* @__PURE__ */ jsxRuntime.jsx(chunkLC2KJSUS_cjs.TaskActivityTimeline, { events: events ?? [], labels, testId: id, ...timeline }),
6274
6274
  /* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollToEnd })
6275
6275
  ] })
6276
6276
  ] }) });
@@ -6308,7 +6308,7 @@ function TaskFlow({
6308
6308
  },
6309
6309
  children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex w-max min-w-full items-center gap-1 py-0.5", children: items.map((item, i) => {
6310
6310
  const chip = (props) => /* @__PURE__ */ jsxRuntime.jsx(
6311
- chunk6AALMYPS_cjs.StepChip,
6311
+ chunkHM23LXUP_cjs.StepChip,
6312
6312
  {
6313
6313
  kind: "adhoc",
6314
6314
  phase: "ready",
@@ -6362,7 +6362,7 @@ function ThreadActivity({ item, children }) {
6362
6362
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full max-w-xl items-center gap-2", children: [
6363
6363
  /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "wf-link", "data-done": done || void 0 }),
6364
6364
  /* @__PURE__ */ jsxRuntime.jsx(
6365
- chunk6AALMYPS_cjs.StepChip,
6365
+ chunkHM23LXUP_cjs.StepChip,
6366
6366
  {
6367
6367
  inert: true,
6368
6368
  kind,
@@ -6381,7 +6381,7 @@ function ThreadActivity({ item, children }) {
6381
6381
  }
6382
6382
  ),
6383
6383
  document && /* @__PURE__ */ jsxRuntime.jsx(
6384
- chunk6AALMYPS_cjs.StepDocumentButton,
6384
+ chunkHM23LXUP_cjs.StepDocumentButton,
6385
6385
  {
6386
6386
  kind,
6387
6387
  name: document.name,
@@ -6448,7 +6448,7 @@ function ThreadLauncher({
6448
6448
  const [shared, setShared] = react.useState(false);
6449
6449
  const [started, setStarted] = react.useState(null);
6450
6450
  const textareaRef = react.useRef(null);
6451
- const mention = chunk6AALMYPS_cjs.useMentionAutocomplete({
6451
+ const mention = chunkHM23LXUP_cjs.useMentionAutocomplete({
6452
6452
  value: prompt,
6453
6453
  onValueChange: setPrompt,
6454
6454
  candidates: people,
@@ -6645,10 +6645,10 @@ function WorkflowRunStatus({
6645
6645
  testId = "workflow-run-status"
6646
6646
  }) {
6647
6647
  const l = { ...DEFAULT_WORKFLOW_RUN_STATUS_LABELS, ...labels };
6648
- const ordered = chunk6AALMYPS_cjs.stepLevels(steps).flat();
6649
- const phaseOf = (id) => isLoading ? "blocked" : chunk6AALMYPS_cjs.stepPhase(steps, states, id);
6650
- const finished = !isLoading && chunk6AALMYPS_cjs.isRunFinished(steps, states);
6651
- const atId = finished || isLoading ? void 0 : chunkSARREDFP_cjs.activeStepId(chunk6AALMYPS_cjs.stepLevels(steps), phaseOf);
6648
+ const ordered = chunkHM23LXUP_cjs.stepLevels(steps).flat();
6649
+ const phaseOf = (id) => isLoading ? "blocked" : chunkHM23LXUP_cjs.stepPhase(steps, states, id);
6650
+ const finished = !isLoading && chunkHM23LXUP_cjs.isRunFinished(steps, states);
6651
+ const atId = finished || isLoading ? void 0 : chunkLC2KJSUS_cjs.activeStepId(chunkHM23LXUP_cjs.stepLevels(steps), phaseOf);
6652
6652
  const at = ordered.find((s) => s.id === atId);
6653
6653
  const phase = at ? phaseOf(at.id) : "done";
6654
6654
  const assignee = at && ["ready", "waiting"].includes(phase) ? assigneeOf?.(at) : void 0;
@@ -6680,7 +6680,7 @@ function WorkflowRunStatus({
6680
6680
  "span",
6681
6681
  {
6682
6682
  className: ui.cn(
6683
- `wf-kind-${chunk6AALMYPS_cjs.stepKindOf(s)}`,
6683
+ `wf-kind-${chunkHM23LXUP_cjs.stepKindOf(s)}`,
6684
6684
  "h-1.5 w-3 shrink-0 rounded-full",
6685
6685
  SEGMENT[phaseOf(s.id)],
6686
6686
  s.id === atId && "w-5"
@@ -6726,7 +6726,7 @@ function groupThreadActivity(steps, items) {
6726
6726
  continue;
6727
6727
  }
6728
6728
  if (current === void 0) out.before.push(item);
6729
- else if (chunk6AALMYPS_cjs.isRunFinished(steps, states)) out.after.push(item);
6729
+ else if (chunkHM23LXUP_cjs.isRunFinished(steps, states)) out.after.push(item);
6730
6730
  else {
6731
6731
  const status = states[current]?.status;
6732
6732
  const at = status === "done" || status === "skipped" ? steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? ""))?.id ?? current : current;
@@ -6749,9 +6749,9 @@ var DEFAULT_WORKFLOW_THREAD_STRIP_LABELS = {
6749
6749
  after: "After",
6750
6750
  beforeSteps: "Before the first step",
6751
6751
  afterSteps: "After the last step",
6752
- kinds: chunk6AALMYPS_cjs.DEFAULT_STEP_KIND_LABELS,
6753
- documents: chunk6AALMYPS_cjs.DEFAULT_STEP_DOCUMENT_LABELS,
6754
- record: chunk6AALMYPS_cjs.DEFAULT_STEP_RECORD_LABELS
6752
+ kinds: chunkHM23LXUP_cjs.DEFAULT_STEP_KIND_LABELS,
6753
+ documents: chunkHM23LXUP_cjs.DEFAULT_STEP_DOCUMENT_LABELS,
6754
+ record: chunkHM23LXUP_cjs.DEFAULT_STEP_RECORD_LABELS
6755
6755
  };
6756
6756
  function WorkflowThreadStartedBy({
6757
6757
  origin,
@@ -6882,7 +6882,7 @@ function EntriesChip({
6882
6882
  const latest = items.at(-1);
6883
6883
  return /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
6884
6884
  /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
6885
- chunk6AALMYPS_cjs.StepChip,
6885
+ chunkHM23LXUP_cjs.StepChip,
6886
6886
  {
6887
6887
  kind,
6888
6888
  phase: "ready",
@@ -6921,23 +6921,23 @@ function WorkflowThreadStrip({
6921
6921
  className
6922
6922
  }) {
6923
6923
  const l = { ...DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, ...labels };
6924
- const barL = { ...chunkSARREDFP_cjs.DEFAULT_STEP_BAR_LABELS, ...barLabels };
6924
+ const barL = { ...chunkLC2KJSUS_cjs.DEFAULT_STEP_BAR_LABELS, ...barLabels };
6925
6925
  const grouped = groupThreadActivity(steps, items);
6926
6926
  const strays = signals.filter((s) => !steps.some((step) => step.id === s.step));
6927
6927
  const link = /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "wf-link wf-kind-start max-w-6", "data-done": true });
6928
6928
  const [selected, setSelected] = react.useState(null);
6929
6929
  const [open, setOpen] = react.useState(null);
6930
- const phaseOf = (id) => chunk6AALMYPS_cjs.stepPhase(steps, states, id);
6930
+ const phaseOf = (id) => chunkHM23LXUP_cjs.stepPhase(steps, states, id);
6931
6931
  const iconOf = (step) => step.icon && renderIcon ? renderIcon(step.icon) : void 0;
6932
6932
  const glyphOf = (step) => {
6933
- const KindIcon = chunk6AALMYPS_cjs.STEP_KIND_ICONS[chunk6AALMYPS_cjs.stepKindOf(step)];
6933
+ const KindIcon = chunkHM23LXUP_cjs.STEP_KIND_ICONS[chunkHM23LXUP_cjs.stepKindOf(step)];
6934
6934
  return iconOf(step) ?? /* @__PURE__ */ jsxRuntime.jsx(KindIcon, {});
6935
6935
  };
6936
6936
  const waitingOf = (id) => {
6937
6937
  const step = steps.find((s) => s.id === id);
6938
6938
  const phase = phaseOf(id);
6939
- const documents = chunk6AALMYPS_cjs.waitingDocuments(states[id]);
6940
- if (documents.length) return chunk6AALMYPS_cjs.waitingForDocumentsText(documents.length);
6939
+ const documents = chunkHM23LXUP_cjs.waitingDocuments(states[id]);
6940
+ if (documents.length) return chunkHM23LXUP_cjs.waitingForDocumentsText(documents.length);
6941
6941
  const name = step && (phase === "ready" || phase === "waiting") ? assigneeOf?.(step) : void 0;
6942
6942
  return name ? l.waitingFor.replace("{name}", name) : void 0;
6943
6943
  };
@@ -6947,8 +6947,8 @@ function WorkflowThreadStrip({
6947
6947
  const assignee = phase === "ready" || phase === "waiting" ? assigneeOf?.(step) : void 0;
6948
6948
  const waiting = waitingOf(step.id);
6949
6949
  const sentBack = states[step.id]?.sentBack;
6950
- const kind = chunk6AALMYPS_cjs.stepKindOf(step);
6951
- const documents = chunk6AALMYPS_cjs.stepDocuments(steps, states, step.id);
6950
+ const kind = chunkHM23LXUP_cjs.stepKindOf(step);
6951
+ const documents = chunkHM23LXUP_cjs.stepDocuments(steps, states, step.id);
6952
6952
  const latestDoc = onOpenDocument ? documents.at(-1) : void 0;
6953
6953
  const finished = ["done", "skipped", "failed"].includes(phase);
6954
6954
  const chip = /* @__PURE__ */ jsxRuntime.jsxs(
@@ -6961,7 +6961,7 @@ function WorkflowThreadStrip({
6961
6961
  },
6962
6962
  children: [
6963
6963
  /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
6964
- chunk6AALMYPS_cjs.StepChip,
6964
+ chunkHM23LXUP_cjs.StepChip,
6965
6965
  {
6966
6966
  kind,
6967
6967
  phase,
@@ -6975,7 +6975,7 @@ function WorkflowThreadStrip({
6975
6975
  waiting
6976
6976
  ] })
6977
6977
  ] }),
6978
- labelClassName: isCurrent ? chunkSARREDFP_cjs.STEP_LABEL_CURRENT : ui.cn(chunkSARREDFP_cjs.STEP_LABEL, chunkSARREDFP_cjs.STEP_LABEL_MAX),
6978
+ labelClassName: isCurrent ? chunkLC2KJSUS_cjs.STEP_LABEL_CURRENT : ui.cn(chunkLC2KJSUS_cjs.STEP_LABEL, chunkLC2KJSUS_cjs.STEP_LABEL_MAX),
6979
6979
  className: ui.cn(latestDoc && "rounded-r-none"),
6980
6980
  title: waiting ? `${step.title} \xB7 ${waiting}` : step.title,
6981
6981
  "data-testid": `workflow-thread-step-${step.id}`,
@@ -7010,7 +7010,7 @@ function WorkflowThreadStrip({
7010
7010
  ),
7011
7011
  sentBack && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 text-xs text-amber-700 dark:text-amber-300", children: l.sentBack }),
7012
7012
  /* @__PURE__ */ jsxRuntime.jsx(
7013
- chunk6AALMYPS_cjs.StepDocumentCards,
7013
+ chunkHM23LXUP_cjs.StepDocumentCards,
7014
7014
  {
7015
7015
  refs: documents,
7016
7016
  heading: step.kind === "review" ? phase === "done" ? l.documents.approved : l.documents.toApprove : l.documents.produced,
@@ -7021,7 +7021,7 @@ function WorkflowThreadStrip({
7021
7021
  }
7022
7022
  ),
7023
7023
  /* @__PURE__ */ jsxRuntime.jsx(
7024
- chunk6AALMYPS_cjs.StepRecord,
7024
+ chunkHM23LXUP_cjs.StepRecord,
7025
7025
  {
7026
7026
  step,
7027
7027
  state: states[step.id],
@@ -7053,10 +7053,10 @@ function WorkflowThreadStrip({
7053
7053
  return latestDoc ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center", children: [
7054
7054
  chip,
7055
7055
  /* @__PURE__ */ jsxRuntime.jsx(
7056
- chunk6AALMYPS_cjs.StepDocumentButton,
7056
+ chunkHM23LXUP_cjs.StepDocumentButton,
7057
7057
  {
7058
7058
  kind,
7059
- name: nameOfDoc?.(chunk6AALMYPS_cjs.splitDocRef(latestDoc).id) ?? latestDoc,
7059
+ name: nameOfDoc?.(chunkHM23LXUP_cjs.splitDocRef(latestDoc).id) ?? latestDoc,
7060
7060
  onOpen: () => onOpenDocument?.(latestDoc),
7061
7061
  testId: `workflow-thread-step-${step.id}-open-document`
7062
7062
  }
@@ -7095,17 +7095,17 @@ function WorkflowThreadStrip({
7095
7095
  ] }),
7096
7096
  strays.map((s) => /* @__PURE__ */ jsxRuntime.jsx(SignalPill, { signal: s, l }, `${s.step}-${s.signal}`))
7097
7097
  ] }) : null;
7098
- const at = steps.find((s) => s.id === (selected ?? chunkSARREDFP_cjs.activeStepId(chunk6AALMYPS_cjs.stepLevels(steps), phaseOf)));
7099
- const headingPx = (step) => `${l.kinds[chunk6AALMYPS_cjs.stepKindOf(step)]} \xB7 ${waitingOf(step.id) ?? ""}`.length * 5.6 - step.title.length * 6.5;
7098
+ const at = steps.find((s) => s.id === (selected ?? chunkLC2KJSUS_cjs.activeStepId(chunkHM23LXUP_cjs.stepLevels(steps), phaseOf)));
7099
+ const headingPx = (step) => `${l.kinds[chunkHM23LXUP_cjs.stepKindOf(step)]} \xB7 ${waitingOf(step.id) ?? ""}`.length * 5.6 - step.title.length * 6.5;
7100
7100
  const reserve = {
7101
- always: (at ? Math.max(0, headingPx(at)) : 0) + steps.filter((s) => grouped.byStep[s.id]?.length).length * BEADS_PX + (onOpenDocument ? steps.filter((s) => chunk6AALMYPS_cjs.stepDocuments(steps, states, s.id).length).length * DOC_BUTTON_PX : 0),
7101
+ always: (at ? Math.max(0, headingPx(at)) : 0) + steps.filter((s) => grouped.byStep[s.id]?.length).length * BEADS_PX + (onOpenDocument ? steps.filter((s) => chunkHM23LXUP_cjs.stepDocuments(steps, states, s.id).length).length * DOC_BUTTON_PX : 0),
7102
7102
  leading: leading ? 150 : 0,
7103
7103
  trailing: trailing ? 120 : 0
7104
7104
  };
7105
7105
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("min-w-0 flex-1", className), "data-testid": "workflow-thread-strip", children: /* @__PURE__ */ jsxRuntime.jsx(
7106
- chunkSARREDFP_cjs.StepBarFrame,
7106
+ chunkLC2KJSUS_cjs.StepBarFrame,
7107
7107
  {
7108
- levels: chunk6AALMYPS_cjs.stepLevels(steps),
7108
+ levels: chunkHM23LXUP_cjs.stepLevels(steps),
7109
7109
  phaseOf,
7110
7110
  current: selected,
7111
7111
  onSelect: (id) => {
@@ -7118,7 +7118,7 @@ function WorkflowThreadStrip({
7118
7118
  trailing,
7119
7119
  reservePx: reserve,
7120
7120
  icon: glyphOf,
7121
- kindOf: chunk6AALMYPS_cjs.stepKindOf,
7121
+ kindOf: chunkHM23LXUP_cjs.stepKindOf,
7122
7122
  labels: { waitingFor: l.waitingFor, ...barLabels },
7123
7123
  tid: (suffix) => `workflow-thread-${suffix}`
7124
7124
  }
@@ -7194,11 +7194,11 @@ function compactThreadActivity(events, stepTitleOf) {
7194
7194
  const count = Math.max(1, entry.recipients.length);
7195
7195
  entry.label = `Notified ${count} ${count === 1 ? "user" : "users"}`;
7196
7196
  } else if (STEP_LABELS[event.kind]) {
7197
- const documents = chunk6AALMYPS_cjs.eventWaitingDocuments(event.detail);
7197
+ const documents = chunkHM23LXUP_cjs.eventWaitingDocuments(event.detail);
7198
7198
  const title = typeof event.detail?.step === "string" ? stepTitleOf?.(event.detail.step) : void 0;
7199
7199
  result.push({
7200
7200
  event,
7201
- label: documents ? chunk6AALMYPS_cjs.waitingForDocumentsText(documents.length) : title && STEP_VERBS[event.kind] ? `${title} ${STEP_VERBS[event.kind]}` : STEP_LABELS[event.kind],
7201
+ label: documents ? chunkHM23LXUP_cjs.waitingForDocumentsText(documents.length) : title && STEP_VERBS[event.kind] ? `${title} ${STEP_VERBS[event.kind]}` : STEP_LABELS[event.kind],
7202
7202
  recipients: []
7203
7203
  });
7204
7204
  } else if (["artifact_created", "artifact_edited", "document_added", "document_removed"].includes(
@@ -7605,7 +7605,7 @@ function defaultTaskComposerValues(workflows, initial) {
7605
7605
  return {
7606
7606
  assignee: "me",
7607
7607
  workflowId,
7608
- inputs: workflow ? { ...chunk6AALMYPS_cjs.defaultInputs(workflow), ...initial?.inputs } : { ...initial?.inputs },
7608
+ inputs: workflow ? { ...chunkHM23LXUP_cjs.defaultInputs(workflow), ...initial?.inputs } : { ...initial?.inputs },
7609
7609
  when: "manual",
7610
7610
  runAt: "",
7611
7611
  rrule: "",
@@ -7714,7 +7714,7 @@ function WorkflowComposer({
7714
7714
  return !docs?.length;
7715
7715
  })
7716
7716
  );
7717
- const whatMissing = !workflow || Object.keys(chunk6AALMYPS_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs)).length > 0;
7717
+ const whatMissing = !workflow || Object.keys(chunkHM23LXUP_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs)).length > 0;
7718
7718
  const runAtPast = values.when === "once" && values.runAt !== "" && values.runAt !== initialValues?.runAt && new Date(values.runAt).getTime() <= Date.now();
7719
7719
  const whenMissing = missingWhen(values, runAtPast);
7720
7720
  const scheduled = values.when !== "now" && values.when !== "manual";
@@ -7726,7 +7726,7 @@ function WorkflowComposer({
7726
7726
  setValues({
7727
7727
  ...values,
7728
7728
  workflowId: next,
7729
- inputs: def ? chunk6AALMYPS_cjs.defaultInputs(def) : {},
7729
+ inputs: def ? chunkHM23LXUP_cjs.defaultInputs(def) : {},
7730
7730
  ...def?.documentAction ? { access: "standing" } : {}
7731
7731
  });
7732
7732
  };
@@ -7854,7 +7854,7 @@ function WorkflowComposer({
7854
7854
  },
7855
7855
  "data-testid": `${id}-dropzone`,
7856
7856
  children: /* @__PURE__ */ jsxRuntime.jsx(
7857
- chunkQDEODGXE_cjs.AddFilesFirst,
7857
+ chunk44R3CCZT_cjs.AddFilesFirst,
7858
7858
  {
7859
7859
  reason: l.addFilesReason,
7860
7860
  action: addFilesAction,
@@ -7864,7 +7864,7 @@ function WorkflowComposer({
7864
7864
  }
7865
7865
  ),
7866
7866
  !noFiles && workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
7867
- chunkSARREDFP_cjs.SchemaForm,
7867
+ chunkLC2KJSUS_cjs.SchemaForm,
7868
7868
  {
7869
7869
  fields,
7870
7870
  values: values.inputs,
@@ -8303,7 +8303,7 @@ function WorkTaskComposer({
8303
8303
  }, [open]);
8304
8304
  const workflow = workflows.find((w) => w.id === values.workflowId);
8305
8305
  const fields = workflow?.inputs ?? [];
8306
- const errors = workflow ? chunk6AALMYPS_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs) : {};
8306
+ const errors = workflow ? chunkHM23LXUP_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs) : {};
8307
8307
  const hasWork = configOpen && Boolean(workflow) && Object.keys(errors).length === 0;
8308
8308
  const unattended = hasWork && values.when !== "now" && values.when !== "manual";
8309
8309
  const canConfigure = !isEdit || seed.assignee === "agent";
@@ -8311,7 +8311,7 @@ function WorkTaskComposer({
8311
8311
  const set = (key, value) => setValues({ ...values, [key]: value });
8312
8312
  const pickWorkflow = (id2) => {
8313
8313
  const next = workflows.find((w) => w.id === id2);
8314
- setValues({ ...values, workflowId: id2, inputs: next ? chunk6AALMYPS_cjs.defaultInputs(next) : {} });
8314
+ setValues({ ...values, workflowId: id2, inputs: next ? chunkHM23LXUP_cjs.defaultInputs(next) : {} });
8315
8315
  };
8316
8316
  const openConfigure = () => {
8317
8317
  setConfigOpen(true);
@@ -8497,7 +8497,7 @@ function WorkTaskComposer({
8497
8497
  )
8498
8498
  ] }),
8499
8499
  workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
8500
- chunkSARREDFP_cjs.SchemaForm,
8500
+ chunkLC2KJSUS_cjs.SchemaForm,
8501
8501
  {
8502
8502
  fields,
8503
8503
  values: values.inputs,
@@ -10685,5 +10685,5 @@ exports.workflowToComposerValues = workflowToComposerValues;
10685
10685
  exports.workflowToSkillMarkdown = workflowToSkillMarkdown;
10686
10686
  exports.workflowTriggerType = workflowTriggerType;
10687
10687
  exports.workflowWhen = workflowWhen;
10688
- //# sourceMappingURL=chunk-TT6XV6WM.cjs.map
10689
- //# sourceMappingURL=chunk-TT6XV6WM.cjs.map
10688
+ //# sourceMappingURL=chunk-QUDCNT63.cjs.map
10689
+ //# sourceMappingURL=chunk-QUDCNT63.cjs.map