@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 +1 @@
1
- {"version":3,"sources":["../src/connection/ai.tsx"],"names":["useConnection","useKitAiTask","useCallback","useKitWorkspaceDocs","useKitSemanticSearch","useWorkspaceUsers","useArbiChat","takeOpenDocumentForTurn","jsx","AssistantDock"],"mappings":";;;;;;;;;AAiCO,SAAS,kBAAA,GAAqB;AACnC,EAAA,MAAM,EAAE,eAAA,EAAgB,GAAIA,+BAAA,EAAc;AAC1C,EAAA,MAAM,OAAOC,eAAA,EAAa;AAC1B,EAAA,MAAM,SAAS,IAAA,CAAK,GAAA;AACpB,EAAA,MAAM,GAAA,GAAMC,mBAAA;AAAA,IACV,CAAC,QAAA,EAAkB,MAAA,EAAkB,IAAA,KACnC,OAAO,QAAA,EAAU,MAAA,EAAQ,EAAE,GAAG,IAAA,EAAM,KAAA,EAAO,IAAA,EAAM,KAAA,IAAS,iBAAiB,CAAA;AAAA,IAC7E,CAAC,QAAQ,eAAe;AAAA,GAC1B;AACA,EAAA,OAAO,EAAE,GAAG,IAAA,EAAM,GAAA,EAAI;AACxB;AAGO,SAAS,gBAAA,GAAmB;AACjC,EAAA,MAAM,EAAE,WAAA,EAAa,mBAAA,EAAoB,GAAIF,+BAAA,EAAc;AAC3D,EAAA,OAAOG,sBAAA,CAAoB,eAAe,mBAAmB,CAAA;AAC/D;AAGO,SAAS,iBAAA,GAAoB;AAClC,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,gBAAA,EAAiB;AACpC,EAAA,OAAOC,wBAAqB,MAAM,CAAA;AACpC;AAOO,SAAS,i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OC,iBAAA,CAAY;AAAA;AAAA,IAEvB,gBAAgB,MAAMC,yCAAA,CAAwB,EAAE,WAAA,EAAa,MAAM,CAAA;AAAA,IACnE,GAAG,OAAA;AAAA,IACH,WAAA,EAAa,IAAA;AAAA,IACb,KAAA,EAAO,SAAS,KAAA,IAAS;AAAA,GAC1B,CAAA;AACD,EAAA,OAAO;AAAA,IACL,GAAG,IAAA;AAAA,IACH,iBAAA;AAAA,IACA,QAAA,EAAU,IAAA,CAAK,QAAA,CAAS,GAAA,CAAI,CAAC,OAAA,MAAa;AAAA,MACxC,GAAG,OAAA;AAAA,MACH,GAAI,QAAQ,QAAA,GACR;AAAA,QACE,YACE,OAAA,CAAQ,QAAA,KAAa,IAAA,EAAM,UAAA,GACvB,MAAM,IAAA,IAAQ,IAAA,EAAM,KAAA,GACpB,iBAAA,CAAkB,KAAK,CAAC,SAAA,KAAc,UAAU,EAAA,KAAO,OAAA,CAAQ,QAAQ,CAAA,EAAG;AAAA,UAElF;AAAC,KACP,CAAE;AAAA,GACJ;AACF;AAMO,SAAS,uBAAuB,KAAA,EAAyC;AAC9E,EAAA,MAAM,OAAO,gBAAA,EAAiB;AAC9B,EAAA,uBAAOC,cAAA,CAACC,+BAAA,EAAA,EAAe,GAAG,KAAA,EAAO,IAAA,EAAY,CAAA;AAC/C","file":"chunk-4QIIDXLF.cjs","sourcesContent":["/**\n * The connected agent hooks — thin adapters over the reusable AI kit in\n * `@arbidocs/react`. The streaming/accumulation/search plumbing lives once in\n * the SDK; these hooks only bind the *workspace source* (from the connection\n * context, falling back to the configured workspace) and inject the host's\n * default assistant *configuration* so call sites needn't know the config\n * ext_id. An explicit `opts.model` still wins.\n */\nimport { useCallback } from 'react'\nimport {\n useAiTask as useKitAiTask,\n useWorkspaceDocs as useKitWorkspaceDocs,\n useSemanticSearch as useKitSemanticSearch,\n useArbiChat,\n useWorkspaceUsers,\n type ArbiChat,\n type UseArbiChatOptions,\n type AiRunOptions,\n} from '@arbidocs/react'\nimport { useConnection } from './ConnectionProvider'\nimport { AssistantDock, type AssistantDockProps } from '../chat/AssistantDock'\nimport type { MentionCandidate } from '../chat/mentions'\nimport { takeOpenDocumentForTurn } from '../chat/open-document'\n\nexport type { AiTaskStatus, AiRunOptions, SearchChunk, ArtifactEvent } from '@arbidocs/react'\n\n/** Client-side redlining, re-exported so a host app has one import surface. */\nexport { toRedlineMarkdown, redlineStats, textToArtifact } from '@arbidocs/react'\n\n/**\n * The kit's `useAiTask` with the host's default assistant configuration\n * injected, so call sites needn't know the config ext_id.\n */\nexport function useConnectedAiTask() {\n const { assistantConfig } = useConnection()\n const task = useKitAiTask()\n const kitRun = task.run\n const run = useCallback(\n (question: string, docIds: string[], opts?: AiRunOptions) =>\n kitRun(question, docIds, { ...opts, model: opts?.model ?? assistantConfig }),\n [kitRun, assistantConfig]\n )\n return { ...task, run }\n}\n\n/** Resolve the active workspace + its document ids (what we ground the agent on). */\nexport function useWorkspaceDocs() {\n const { workspaceId, fallbackWorkspaceId } = useConnection()\n return useKitWorkspaceDocs(workspaceId ?? fallbackWorkspaceId)\n}\n\n/** Search the active workspace's documents and return the top matching passages. */\nexport function useSemanticSearch() {\n const { docIds } = useWorkspaceDocs()\n return useKitSemanticSearch(docIds)\n}\n\n/**\n * The chat controller for `ChatPage` bound to the connection: the active workspace and the host's\n * default assistant configuration are injected, so a host writes\n * `<ChatPage chat={useConnectedChat()} />`.\n */\nexport function useConnectedChat(\n options?: Omit<UseArbiChatOptions, 'workspaceId'>\n): ArbiChat & { mentionCandidates: MentionCandidate[] } {\n const { workspaceId, fallbackWorkspaceId, assistantConfig, user, status, ensureWorkspaceOpen } =\n useConnection()\n const wsId = workspaceId ?? fallbackWorkspaceId\n const { data: members = [] } = useWorkspaceUsers(wsId, {\n enabled: status === 'authenticated' && !!wsId,\n beforeFetch: ensureWorkspaceOpen,\n })\n const mentionCandidates: MentionCandidate[] = [\n { id: 'assistant', kind: 'assistant', label: 'Assistant' },\n ...(status === 'authenticated' ? members : [])\n .filter(\n (member) =>\n !member.agent_ext_id &&\n member.user.external_id !== user?.externalId &&\n !member.user.external_id.startsWith('agt-')\n )\n .map((member) => ({\n id: member.user.external_id,\n kind: 'user' as const,\n label:\n [member.user.given_name, member.user.family_name].filter(Boolean).join(' ') ||\n member.user.email,\n description: member.user.email,\n }))\n .sort((a, b) => a.label.localeCompare(b.label)),\n ]\n const chat = useArbiChat({\n // Drafting mode: each question names the document open beside the chat.\n activeArtifact: () => takeOpenDocumentForTurn({ workspaceId: wsId }),\n ...options,\n workspaceId: wsId,\n model: options?.model ?? assistantConfig,\n })\n return {\n ...chat,\n mentionCandidates,\n messages: chat.messages.map((message) => ({\n ...message,\n ...(message.authorId\n ? {\n senderName:\n message.authorId === user?.externalId\n ? user?.name || user?.email\n : mentionCandidates.find((candidate) => candidate.id === message.authorId)?.label,\n }\n : {}),\n })),\n }\n}\n\n/**\n * The assistant dock bound to the connection: mount it once in the layout (`Shell.Root`'s `aside`)\n * and put `AssistantDockToggle` in the topbar. Chat state lives here, so it survives closing the dock.\n */\nexport function ConnectedAssistantDock(props: Omit<AssistantDockProps, 'chat'>) {\n const chat = useConnectedChat()\n return <AssistantDock {...props} chat={chat} />\n}\n"]}
1
+ {"version":3,"sources":["../src/connection/ai.tsx"],"names":["useConnection","useKitAiTask","useCallback","useKitWorkspaceDocs","useKitSemanticSearch","useWorkspaceUsers","useArbiChat","takeOpenDocumentForTurn","jsx","AssistantDock"],"mappings":";;;;;;;;;AAiCO,SAAS,kBAAA,GAAqB;AACnC,EAAA,MAAM,EAAE,eAAA,EAAgB,GAAIA,+BAAA,EAAc;AAC1C,EAAA,MAAM,OAAOC,eAAA,EAAa;AAC1B,EAAA,MAAM,SAAS,IAAA,CAAK,GAAA;AACpB,EAAA,MAAM,GAAA,GAAMC,mBAAA;AAAA,IACV,CAAC,QAAA,EAAkB,MAAA,EAAkB,IAAA,KACnC,OAAO,QAAA,EAAU,MAAA,EAAQ,EAAE,GAAG,IAAA,EAAM,KAAA,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AA,EAAO,IAAA,EAAY,CAAA;AAC/C","file":"chunk-HW2J4JMV.cjs","sourcesContent":["/**\n * The connected agent hooks — thin adapters over the reusable AI kit in\n * `@arbidocs/react`. The streaming/accumulation/search plumbing lives once in\n * the SDK; these hooks only bind the *workspace source* (from the connection\n * context, falling back to the configured workspace) and inject the host's\n * default assistant *configuration* so call sites needn't know the config\n * ext_id. An explicit `opts.model` still wins.\n */\nimport { useCallback } from 'react'\nimport {\n useAiTask as useKitAiTask,\n useWorkspaceDocs as useKitWorkspaceDocs,\n useSemanticSearch as useKitSemanticSearch,\n useArbiChat,\n useWorkspaceUsers,\n type ArbiChat,\n type UseArbiChatOptions,\n type AiRunOptions,\n} from '@arbidocs/react'\nimport { useConnection } from './ConnectionProvider'\nimport { AssistantDock, type AssistantDockProps } from '../chat/AssistantDock'\nimport type { MentionCandidate } from '../chat/mentions'\nimport { takeOpenDocumentForTurn } from '../chat/open-document'\n\nexport type { AiTaskStatus, AiRunOptions, SearchChunk, ArtifactEvent } from '@arbidocs/react'\n\n/** Client-side redlining, re-exported so a host app has one import surface. */\nexport { toRedlineMarkdown, redlineStats, textToArtifact } from '@arbidocs/react'\n\n/**\n * The kit's `useAiTask` with the host's default assistant configuration\n * injected, so call sites needn't know the config ext_id.\n */\nexport function useConnectedAiTask() {\n const { assistantConfig } = useConnection()\n const task = useKitAiTask()\n const kitRun = task.run\n const run = useCallback(\n (question: string, docIds: string[], opts?: AiRunOptions) =>\n kitRun(question, docIds, { ...opts, model: opts?.model ?? assistantConfig }),\n [kitRun, assistantConfig]\n )\n return { ...task, run }\n}\n\n/** Resolve the active workspace + its document ids (what we ground the agent on). */\nexport function useWorkspaceDocs() {\n const { workspaceId, fallbackWorkspaceId } = useConnection()\n return useKitWorkspaceDocs(workspaceId ?? fallbackWorkspaceId)\n}\n\n/** Search the active workspace's documents and return the top matching passages. */\nexport function useSemanticSearch() {\n const { docIds } = useWorkspaceDocs()\n return useKitSemanticSearch(docIds)\n}\n\n/**\n * The chat controller for `ChatPage` bound to the connection: the active workspace and the host's\n * default assistant configuration are injected, so a host writes\n * `<ChatPage chat={useConnectedChat()} />`.\n */\nexport function useConnectedChat(\n options?: Omit<UseArbiChatOptions, 'workspaceId'>\n): ArbiChat & { mentionCandidates: MentionCandidate[] } {\n const { workspaceId, fallbackWorkspaceId, assistantConfig, user, status, ensureWorkspaceOpen } =\n useConnection()\n const wsId = workspaceId ?? fallbackWorkspaceId\n const { data: members = [] } = useWorkspaceUsers(wsId, {\n enabled: status === 'authenticated' && !!wsId,\n beforeFetch: ensureWorkspaceOpen,\n })\n const mentionCandidates: MentionCandidate[] = [\n { id: 'assistant', kind: 'assistant', label: 'Assistant' },\n ...(status === 'authenticated' ? members : [])\n .filter(\n (member) =>\n !member.agent_ext_id &&\n member.user.external_id !== user?.externalId &&\n !member.user.external_id.startsWith('agt-')\n )\n .map((member) => ({\n id: member.user.external_id,\n kind: 'user' as const,\n label:\n [member.user.given_name, member.user.family_name].filter(Boolean).join(' ') ||\n member.user.email,\n description: member.user.email,\n }))\n .sort((a, b) => a.label.localeCompare(b.label)),\n ]\n const chat = useArbiChat({\n // Drafting mode: each question names the document open beside the chat.\n activeArtifact: () => takeOpenDocumentForTurn({ workspaceId: wsId }),\n ...options,\n workspaceId: wsId,\n model: options?.model ?? assistantConfig,\n })\n return {\n ...chat,\n mentionCandidates,\n messages: chat.messages.map((message) => ({\n ...message,\n ...(message.authorId\n ? {\n senderName:\n message.authorId === user?.externalId\n ? user?.name || user?.email\n : mentionCandidates.find((candidate) => candidate.id === message.authorId)?.label,\n }\n : {}),\n })),\n }\n}\n\n/**\n * The assistant dock bound to the connection: mount it once in the layout (`Shell.Root`'s `aside`)\n * and put `AssistantDockToggle` in the topbar. Chat state lives here, so it survives closing the dock.\n */\nexport function ConnectedAssistantDock(props: Omit<AssistantDockProps, 'chat'>) {\n const chat = useConnectedChat()\n return <AssistantDock {...props} chat={chat} />\n}\n"]}
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkDETZZBG2_cjs = require('./chunk-DETZZBG2.cjs');
5
4
  var chunk7D737FLE_cjs = require('./chunk-7D737FLE.cjs');
6
- var chunk6AALMYPS_cjs = require('./chunk-6AALMYPS.cjs');
5
+ var chunkDETZZBG2_cjs = require('./chunk-DETZZBG2.cjs');
6
+ var chunkHM23LXUP_cjs = require('./chunk-HM23LXUP.cjs');
7
7
  var chunk32HW2Q33_cjs = require('./chunk-32HW2Q33.cjs');
8
8
  var chunkMHVNT4J3_cjs = require('./chunk-MHVNT4J3.cjs');
9
9
  var react = require('react');
@@ -147,11 +147,11 @@ function FieldControl({
147
147
  ] });
148
148
  }
149
149
  case "scope": {
150
- const scope = chunk6AALMYPS_cjs.isWorkflowScope(value) ? value : { folders: [], labels: [] };
150
+ const scope = chunkHM23LXUP_cjs.isWorkflowScope(value) ? value : { folders: [], labels: [] };
151
151
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": testId, children: renderScope?.(field, scope, onChange) });
152
152
  }
153
153
  case "documents": {
154
- const picked = chunk6AALMYPS_cjs.isWorkflowScope(value) ? value : { folders: [], labels: [], documents: [] };
154
+ const picked = chunkHM23LXUP_cjs.isWorkflowScope(value) ? value : { folders: [], labels: [], documents: [] };
155
155
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": testId, children: renderDocuments?.(field, picked, onChange) });
156
156
  }
157
157
  case "person":
@@ -429,7 +429,7 @@ function toStepField(f) {
429
429
  }
430
430
  var compact = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== void 0 && v !== ""));
431
431
  function placeholders(workflow) {
432
- return Object.fromEntries(chunk6AALMYPS_cjs.runFields(workflow).map((f) => [f.name, `{{${f.name}}}`]));
432
+ return Object.fromEntries(chunkHM23LXUP_cjs.runFields(workflow).map((f) => [f.name, `{{${f.name}}}`]));
433
433
  }
434
434
  function agentStep(workflow, step, options) {
435
435
  const target = step.workflow ? options.resolveWorkflow?.(step.workflow) : void 0;
@@ -438,11 +438,11 @@ function agentStep(workflow, step, options) {
438
438
  ([, v]) => v !== void 0 && v !== null && v !== ""
439
439
  );
440
440
  const inputs = { ...placeholders(workflow), ...Object.fromEntries(given) };
441
- return { skill: null, inputs: null, prompt: chunk6AALMYPS_cjs.composeStepPrompt(workflow, step, inputs, options) };
441
+ return { skill: null, inputs: null, prompt: chunkHM23LXUP_cjs.composeStepPrompt(workflow, step, inputs, options) };
442
442
  }
443
443
  function toPlanSteps(workflow, options = {}) {
444
444
  const layout = workflow.run.kind === "steps" ? workflow.run.layout : void 0;
445
- return chunk6AALMYPS_cjs.workflowSteps(workflow).map((step) => {
445
+ return chunkHM23LXUP_cjs.workflowSteps(workflow).map((step) => {
446
446
  const ui = compact({
447
447
  description: step.description,
448
448
  icon: step.icon,
@@ -469,8 +469,8 @@ function toPlanSteps(workflow, options = {}) {
469
469
  ui,
470
470
  // An unfinished signal (still being typed) is not saved: the server would refuse it.
471
471
  ...step.signals?.some((s) => !isIncompleteSignal(s)) ? { signals: step.signals.filter((s) => !isIncompleteSignal(s)).map(toPlanSignal) } : {},
472
- ...step.assignee && chunk6AALMYPS_cjs.canAssign(step) ? { assignee: toPlanAssignee(step.assignee) } : {},
473
- ...step.remindAfterHours && chunk6AALMYPS_cjs.canAssign(step) ? { remind_after_hours: step.remindAfterHours } : {},
472
+ ...step.assignee && chunkHM23LXUP_cjs.canAssign(step) ? { assignee: toPlanAssignee(step.assignee) } : {},
473
+ ...step.remindAfterHours && chunkHM23LXUP_cjs.canAssign(step) ? { remind_after_hours: step.remindAfterHours } : {},
474
474
  // A review's fields are what approving it is checked against (the server's `fields`).
475
475
  ...step.kind === "review" && step.fields?.length ? { fields: step.fields.map(toStepField) } : {},
476
476
  ...step.kind === "action" ? { action: toPlanAction(step.action) } : {},
@@ -574,7 +574,7 @@ function fromStepField(f) {
574
574
  var errorMessage = (e) => e instanceof Error ? e.message : typeof e === "string" ? e : "Something went wrong.";
575
575
  function firstOpen(steps, states) {
576
576
  const open = steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? "pending"));
577
- return open?.id ?? (steps.length && chunk6AALMYPS_cjs.isRunFinished(steps, states) ? null : steps[0]?.id ?? null);
577
+ return open?.id ?? (steps.length && chunkHM23LXUP_cjs.isRunFinished(steps, states) ? null : steps[0]?.id ?? null);
578
578
  }
579
579
  function useWorkflowView(options) {
580
580
  const { steps, states, inputs, setInput, loaded = true } = options;
@@ -614,11 +614,11 @@ function useWorkflowView(options) {
614
614
  }),
615
615
  []
616
616
  );
617
- const action = busy ? "wait" : chunk6AALMYPS_cjs.nextAction(steps, states, current, actionOptions(options));
617
+ const action = busy ? "wait" : chunkHM23LXUP_cjs.nextAction(steps, states, current, actionOptions(options));
618
618
  const next = react.useCallback(async () => {
619
619
  const { steps: s, states: st, inputs: values } = optionsRef.current;
620
620
  const at = s.find((x) => x.id === current);
621
- const act2 = chunk6AALMYPS_cjs.nextAction(s, st, current, actionOptions(optionsRef.current));
621
+ const act2 = chunkHM23LXUP_cjs.nextAction(s, st, current, actionOptions(optionsRef.current));
622
622
  if (!at || act2 === "wait" || busy) return;
623
623
  setActionError(null);
624
624
  if (act2 === "finish") return setCurrent(null);
@@ -629,7 +629,7 @@ function useWorkflowView(options) {
629
629
  await (act2 === "start" ? optionsRef.current.start?.() : optionsRef.current.retry?.(at.id));
630
630
  return;
631
631
  }
632
- if (Object.keys(chunk6AALMYPS_cjs.validateStep(at, values)).length > 0) {
632
+ if (Object.keys(chunkHM23LXUP_cjs.validateStep(at, values)).length > 0) {
633
633
  setShowErrors(true);
634
634
  return;
635
635
  }
@@ -730,10 +730,10 @@ function useWorkflowView(options) {
730
730
  inputs,
731
731
  setInput,
732
732
  stateOf: (id) => states[id],
733
- phaseOf: (id) => chunk6AALMYPS_cjs.stepPhase(steps, states, id),
734
- failedUpstreamOf: (id) => chunk6AALMYPS_cjs.failedUpstream(steps, states, id),
733
+ phaseOf: (id) => chunkHM23LXUP_cjs.stepPhase(steps, states, id),
734
+ failedUpstreamOf: (id) => chunkHM23LXUP_cjs.failedUpstream(steps, states, id),
735
735
  isLocked,
736
- errors: showErrors && step && !isLocked(step.id) ? chunk6AALMYPS_cjs.validateStep(step, inputs) : {},
736
+ errors: showErrors && step && !isLocked(step.id) ? chunkHM23LXUP_cjs.validateStep(step, inputs) : {},
737
737
  busy,
738
738
  actionError,
739
739
  isRunning: Object.values(states).some((s) => s.status === "running"),
@@ -751,11 +751,11 @@ function useWorkflowView(options) {
751
751
  nameOf: options.nameOf,
752
752
  assigneeOf: (id) => {
753
753
  const s = steps.find((x) => x.id === id);
754
- if (!s || !chunk6AALMYPS_cjs.canAssign(s)) return void 0;
755
- return chunk6AALMYPS_cjs.assigneeName(s.assignee, {
754
+ if (!s || !chunkHM23LXUP_cjs.canAssign(s)) return void 0;
755
+ return chunkHM23LXUP_cjs.assigneeName(s.assignee, {
756
756
  nameOf: options.nameOf,
757
757
  inputs,
758
- fields: chunk6AALMYPS_cjs.runFieldsOf(steps),
758
+ fields: chunkHM23LXUP_cjs.runFieldsOf(steps),
759
759
  announcedTo: states[id]?.announcedTo
760
760
  });
761
761
  },
@@ -889,7 +889,7 @@ function StepBarFrame({
889
889
  }) {
890
890
  const l = { ...DEFAULT_STEP_BAR_LABELS, ...labels };
891
891
  const box = react.useRef(null);
892
- const { width } = chunk6AALMYPS_cjs.useElementSize(box);
892
+ const { width } = chunkHM23LXUP_cjs.useElementSize(box);
893
893
  const narrow = width > 0 && width < NARROW_PX;
894
894
  const [start, setStart] = react.useState(null);
895
895
  react.useEffect(() => setStart(null), [current]);
@@ -956,7 +956,7 @@ function StepBarFrame({
956
956
  phase === "blocked" && "opacity-60"
957
957
  ),
958
958
  "aria-hidden": true,
959
- children: /* @__PURE__ */ jsxRuntime.jsx(chunk6AALMYPS_cjs.StepBadgeMark, { phase, icon: icon?.(s) })
959
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkHM23LXUP_cjs.StepBadgeMark, { phase, icon: icon?.(s) })
960
960
  }
961
961
  ),
962
962
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", title: s.title, children: s.title }),
@@ -1064,7 +1064,7 @@ function StepBarFrame({
1064
1064
  };
1065
1065
  const running = win.runningHidden;
1066
1066
  const outOfViewChip = (s, kind) => /* @__PURE__ */ jsxRuntime.jsx(
1067
- chunk6AALMYPS_cjs.StepChip,
1067
+ chunkHM23LXUP_cjs.StepChip,
1068
1068
  {
1069
1069
  kind: kindOf(s),
1070
1070
  phase: kind === "working" ? "running" : "failed",
@@ -1237,7 +1237,7 @@ var DEFAULT_WORKFLOW_STEP_PARTS_LABELS = {
1237
1237
  someone: "someone"
1238
1238
  };
1239
1239
  var docName = (ref, nameOfDoc) => {
1240
- const { id, version } = chunk6AALMYPS_cjs.splitDocRef(ref);
1240
+ const { id, version } = chunkHM23LXUP_cjs.splitDocRef(ref);
1241
1241
  const name = nameOfDoc?.(id) ?? id;
1242
1242
  return version ? `${name} \xB7 v${version}` : name;
1243
1243
  };
@@ -1319,7 +1319,7 @@ function SendBackControl({
1319
1319
  const states = Object.fromEntries(
1320
1320
  run.steps.map((s) => [s.id, run.stateOf(s.id) ?? { status: "pending" }])
1321
1321
  );
1322
- const targets = chunk6AALMYPS_cjs.sendBackTargets(run.steps, states, step.id);
1322
+ const targets = chunkHM23LXUP_cjs.sendBackTargets(run.steps, states, step.id);
1323
1323
  const [open, setOpen] = react.useState(false);
1324
1324
  const [to, setTo] = react.useState(targets[0]?.id ?? "");
1325
1325
  const [note, setNote] = react.useState("");
@@ -1409,7 +1409,7 @@ function ApprovalEvidence({
1409
1409
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex flex-wrap items-center gap-1.5 text-sm font-medium", children: [
1410
1410
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "size-4 text-primary" }),
1411
1411
  approver ? l.approvedBy.replace("{name}", approver) : null,
1412
- state.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground", children: l.approvedAt.replace("{date}", chunk6AALMYPS_cjs.formatDate(state.at)) })
1412
+ state.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground", children: l.approvedAt.replace("{date}", chunkHM23LXUP_cjs.formatDate(state.at)) })
1413
1413
  ] }),
1414
1414
  evidence.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
1415
1415
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: l.approvedWhat }),
@@ -1442,7 +1442,7 @@ function ApprovalEvidence({
1442
1442
  ] }),
1443
1443
  (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: [
1444
1444
  /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: f.label }),
1445
- /* @__PURE__ */ jsxRuntime.jsx("dd", { "data-testid": `${testId}-evidence-field-${f.name}`, children: chunk6AALMYPS_cjs.shownValue(run.inputs[f.name], f, run.nameOf) })
1445
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { "data-testid": `${testId}-evidence-field-${f.name}`, children: chunkHM23LXUP_cjs.shownValue(run.inputs[f.name], f, run.nameOf) })
1446
1446
  ] }, f.name)) })
1447
1447
  ] });
1448
1448
  }
@@ -1538,7 +1538,7 @@ function ActionStepBody({
1538
1538
  waiting?.expires_at && phase === "waiting" && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
1539
1539
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "size-3.5" }),
1540
1540
  " ",
1541
- l.expires.replace("{date}", chunk6AALMYPS_cjs.formatDate(waiting.expires_at))
1541
+ l.expires.replace("{date}", chunkHM23LXUP_cjs.formatDate(waiting.expires_at))
1542
1542
  ] }),
1543
1543
  phase === "waiting" && mine && !declining && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-2", children: [
1544
1544
  actions?.sign && state && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1696,7 +1696,7 @@ function WorkflowStepBar({
1696
1696
  const name = `${title} (${l.phases[phase]})`;
1697
1697
  if (s.id === DONE)
1698
1698
  return /* @__PURE__ */ jsxRuntime.jsx(
1699
- chunk6AALMYPS_cjs.StepChip,
1699
+ chunkHM23LXUP_cjs.StepChip,
1700
1700
  {
1701
1701
  inert: true,
1702
1702
  kind: "start",
@@ -1710,17 +1710,17 @@ function WorkflowStepBar({
1710
1710
  "data-testid": tid("step-done")
1711
1711
  }
1712
1712
  );
1713
- const kind = chunk6AALMYPS_cjs.stepKindOf(s);
1714
- const KindIcon = chunk6AALMYPS_cjs.STEP_KIND_ICONS[kind];
1713
+ const kind = chunkHM23LXUP_cjs.stepKindOf(s);
1714
+ const KindIcon = chunkHM23LXUP_cjs.STEP_KIND_ICONS[kind];
1715
1715
  return /* @__PURE__ */ jsxRuntime.jsx(
1716
- chunk6AALMYPS_cjs.StepChip,
1716
+ chunkHM23LXUP_cjs.StepChip,
1717
1717
  {
1718
1718
  kind,
1719
1719
  phase,
1720
1720
  icon: icon(s.icon) ?? /* @__PURE__ */ jsxRuntime.jsx(KindIcon, {}),
1721
1721
  label: s.title,
1722
1722
  current: isCurrent,
1723
- heading: chunk6AALMYPS_cjs.DEFAULT_STEP_KIND_LABELS[kind],
1723
+ heading: chunkHM23LXUP_cjs.DEFAULT_STEP_KIND_LABELS[kind],
1724
1724
  labelClassName: isCurrent ? STEP_LABEL_CURRENT : ui.cn(STEP_LABEL, STEP_LABEL_MAX),
1725
1725
  labelTestId: tid(`step-${s.id}-label`),
1726
1726
  onClick: () => run.goTo(s.id),
@@ -1753,7 +1753,7 @@ function WorkflowStepBar({
1753
1753
  isSelectable: (id) => id !== DONE,
1754
1754
  renderStep: (s) => pill(s),
1755
1755
  icon: (s) => s.id === DONE ? doneIcon : icon(s.icon),
1756
- kindOf: (s) => s.id === DONE ? "start" : chunk6AALMYPS_cjs.stepKindOf(s),
1756
+ kindOf: (s) => s.id === DONE ? "start" : chunkHM23LXUP_cjs.stepKindOf(s),
1757
1757
  disabled: run.busy,
1758
1758
  labels,
1759
1759
  tid,
@@ -1836,7 +1836,7 @@ function WorkflowRunner({
1836
1836
  const { steps, step, isComplete, action } = run;
1837
1837
  const completion = workflow.run.kind === "steps" ? workflow.run.completion : void 0;
1838
1838
  const tid = (suffix) => `${testIdPrefix}-${suffix}`;
1839
- const levels = chunk6AALMYPS_cjs.stepLevels(steps);
1839
+ const levels = chunkHM23LXUP_cjs.stepLevels(steps);
1840
1840
  const icon = (key) => key && renderIcon ? renderIcon(key) : void 0;
1841
1841
  const added = step?.kind === "upload" ? (files ?? []).filter((f) => f.addedFor === step.id) : [];
1842
1842
  const unread = added.filter((f) => f.status === "processing").length;
@@ -1844,7 +1844,7 @@ function WorkflowRunner({
1844
1844
  const sending = added.filter((f) => f.status === "uploading").length;
1845
1845
  const unsent = added.filter((f) => f.status === "upload-failed").length;
1846
1846
  const uploadHold = step?.kind === "upload" && (sending > 0 || uploading || unsent > 0);
1847
- const docsWait = !!step && chunk6AALMYPS_cjs.waitingDocuments(run.stateOf(step.id)).length > 0;
1847
+ const docsWait = !!step && chunkHM23LXUP_cjs.waitingDocuments(run.stateOf(step.id)).length > 0;
1848
1848
  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;
1849
1849
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn(compact2 ? "space-y-3" : "space-y-6", className), "data-testid": testIdPrefix, children: [
1850
1850
  !hideStepBar && /* @__PURE__ */ jsxRuntime.jsx(
@@ -1876,7 +1876,7 @@ function WorkflowRunner({
1876
1876
  /* @__PURE__ */ jsxRuntime.jsx(StepNotices, { run, step, l, tid }),
1877
1877
  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(
1878
1878
  "{steps}",
1879
- chunk6AALMYPS_cjs.stepDependencies(steps, step.id).map((d) => steps.find((s) => s.id === d)?.title ?? d).join(", ")
1879
+ chunkHM23LXUP_cjs.stepDependencies(steps, step.id).map((d) => steps.find((s) => s.id === d)?.title ?? d).join(", ")
1880
1880
  ) }) }) : step.kind === "form" ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { className: ui.cn(box, "space-y-4"), "data-testid": tid(step.id), children: [
1881
1881
  /* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon: icon(step.icon), testId: tid(`${step.id}-title`) }),
1882
1882
  /* @__PURE__ */ jsxRuntime.jsx(SentBackNote, { state: run.stateOf(step.id), l: pl, testId: tid(step.id) }),
@@ -1932,7 +1932,7 @@ function WorkflowRunner({
1932
1932
  ] }) : step.kind === "review" ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { className: ui.cn(box, "space-y-4"), "data-testid": tid(step.id), children: [
1933
1933
  /* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon: icon(step.icon) }),
1934
1934
  /* @__PURE__ */ jsxRuntime.jsx(SentBackNote, { state: run.stateOf(step.id), l: pl, testId: tid(step.id) }),
1935
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-line text-sm text-muted-foreground", children: chunk6AALMYPS_cjs.reviewInstructions(step, run.inputs) }),
1935
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-line text-sm text-muted-foreground", children: chunkHM23LXUP_cjs.reviewInstructions(step, run.inputs) }),
1936
1936
  /* @__PURE__ */ jsxRuntime.jsx(AssigneeLine, { run, stepId: step.id, l: pl, testId: tid(step.id) }),
1937
1937
  !(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 }),
1938
1938
  (step.fields ?? []).length > 0 && run.phaseOf(step.id) === "ready" && /* @__PURE__ */ jsxRuntime.jsx(
@@ -2199,8 +2199,8 @@ function AgentStepBody({
2199
2199
  }) {
2200
2200
  const state = run.stateOf(step.id);
2201
2201
  const phase = run.phaseOf(step.id);
2202
- const pending = chunk6AALMYPS_cjs.waitingDocuments(state);
2203
- const pendingNames = pending.flatMap((ref) => nameOfDoc?.(chunk6AALMYPS_cjs.splitDocRef(ref).id) ?? []);
2202
+ const pending = chunkHM23LXUP_cjs.waitingDocuments(state);
2203
+ const pendingNames = pending.flatMap((ref) => nameOfDoc?.(chunkHM23LXUP_cjs.splitDocRef(ref).id) ?? []);
2204
2204
  const header = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
2205
2205
  /* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon }),
2206
2206
  phase === "failed" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: run.retry && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2285,7 +2285,7 @@ function StepNotices({
2285
2285
  l,
2286
2286
  tid
2287
2287
  }) {
2288
- const notStarted = !chunk6AALMYPS_cjs.isPersonStep(step) && run.needsStart && run.phaseOf(step.id) === "ready";
2288
+ const notStarted = !chunkHM23LXUP_cjs.isPersonStep(step) && run.needsStart && run.phaseOf(step.id) === "ready";
2289
2289
  const failed = run.failedUpstreamOf(step.id);
2290
2290
  if (!notStarted && failed.length === 0) return null;
2291
2291
  const why = (error) => error ? `: ${error}` : "";
@@ -2407,12 +2407,12 @@ function taskActivityHeadline(e, labels = DEFAULT_TASK_ACTIVITY_LABELS, agentNam
2407
2407
  case "step_skipped":
2408
2408
  return "Step skipped";
2409
2409
  case "step_waiting": {
2410
- const documents = chunk6AALMYPS_cjs.eventWaitingDocuments(detail);
2411
- return documents ? chunk6AALMYPS_cjs.waitingForDocumentsText(documents.length) : "Waiting on people";
2410
+ const documents = chunkHM23LXUP_cjs.eventWaitingDocuments(detail);
2411
+ return documents ? chunkHM23LXUP_cjs.waitingForDocumentsText(documents.length) : "Waiting on people";
2412
2412
  }
2413
2413
  case "step_progress": {
2414
- const documents = chunk6AALMYPS_cjs.eventWaitingDocuments(detail);
2415
- return documents ? chunk6AALMYPS_cjs.waitingForDocumentsText(documents.length) : detail.signed ? "Signed" : "Step moved on";
2414
+ const documents = chunkHM23LXUP_cjs.eventWaitingDocuments(detail);
2415
+ return documents ? chunkHM23LXUP_cjs.waitingForDocumentsText(documents.length) : detail.signed ? "Signed" : "Step moved on";
2416
2416
  }
2417
2417
  case "step_sent_back":
2418
2418
  return "Sent the work back";
@@ -2542,5 +2542,5 @@ exports.toPlanAssignee = toPlanAssignee;
2542
2542
  exports.toPlanDocumentRef = toPlanDocumentRef;
2543
2543
  exports.toPlanSteps = toPlanSteps;
2544
2544
  exports.useWorkflowView = useWorkflowView;
2545
- //# sourceMappingURL=chunk-SARREDFP.cjs.map
2546
- //# sourceMappingURL=chunk-SARREDFP.cjs.map
2545
+ //# sourceMappingURL=chunk-LC2KJSUS.cjs.map
2546
+ //# sourceMappingURL=chunk-LC2KJSUS.cjs.map