@arbidocs/blocks 0.4.142 → 0.4.144

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 (125) hide show
  1. package/dist/agents/index.cjs +435 -432
  2. package/dist/agents/index.js +7 -4
  3. package/dist/chat/index.cjs +139 -138
  4. package/dist/chat/index.js +4 -3
  5. package/dist/{chunk-N5X37J3D.js → chunk-2FJMTZNJ.js} +8 -5
  6. package/dist/chunk-2FJMTZNJ.js.map +1 -0
  7. package/dist/chunk-33ZOUJXA.js +561 -0
  8. package/dist/chunk-33ZOUJXA.js.map +1 -0
  9. package/dist/{chunk-S24XEVPS.cjs → chunk-464YPRAE.cjs} +33 -2
  10. package/dist/chunk-464YPRAE.cjs.map +1 -0
  11. package/dist/{chunk-7YLJHTDC.cjs → chunk-5A2QQAF5.cjs} +11 -11
  12. package/dist/{chunk-7YLJHTDC.cjs.map → chunk-5A2QQAF5.cjs.map} +1 -1
  13. package/dist/chunk-76L6LOP3.cjs +308 -0
  14. package/dist/chunk-76L6LOP3.cjs.map +1 -0
  15. package/dist/{chunk-FXG7TFAG.js → chunk-7NGAWGA3.js} +3 -3
  16. package/dist/{chunk-FXG7TFAG.js.map → chunk-7NGAWGA3.js.map} +1 -1
  17. package/dist/chunk-A6J2IBUG.js +1602 -0
  18. package/dist/chunk-A6J2IBUG.js.map +1 -0
  19. package/dist/{chunk-DPGFEMVT.cjs → chunk-ABUO6PIQ.cjs} +51 -1659
  20. package/dist/chunk-ABUO6PIQ.cjs.map +1 -0
  21. package/dist/chunk-AOSUHWIL.js +98 -0
  22. package/dist/chunk-AOSUHWIL.js.map +1 -0
  23. package/dist/{chunk-GBS6QVGS.cjs → chunk-BUWBXJ2N.cjs} +5 -5
  24. package/dist/{chunk-GBS6QVGS.cjs.map → chunk-BUWBXJ2N.cjs.map} +1 -1
  25. package/dist/chunk-CQCC7LE7.js +210 -0
  26. package/dist/chunk-CQCC7LE7.js.map +1 -0
  27. package/dist/{chunk-UGCKUXRV.js → chunk-CSI2B2H5.js} +3 -3
  28. package/dist/{chunk-UGCKUXRV.js.map → chunk-CSI2B2H5.js.map} +1 -1
  29. package/dist/{chunk-JO3EMZ4X.js → chunk-GWSGIZQ5.js} +3 -3
  30. package/dist/{chunk-JO3EMZ4X.js.map → chunk-GWSGIZQ5.js.map} +1 -1
  31. package/dist/{chunk-OWCEQKAR.cjs → chunk-JSTKEZBS.cjs} +21 -318
  32. package/dist/chunk-JSTKEZBS.cjs.map +1 -0
  33. package/dist/{chunk-CKCBBYTA.js → chunk-KSHKTOY2.js} +5 -205
  34. package/dist/chunk-KSHKTOY2.js.map +1 -0
  35. package/dist/chunk-LJJJ6CYH.cjs +62 -0
  36. package/dist/chunk-LJJJ6CYH.cjs.map +1 -0
  37. package/dist/chunk-MHFF5N65.cjs +101 -0
  38. package/dist/chunk-MHFF5N65.cjs.map +1 -0
  39. package/dist/{chunk-GYAUJ4KT.js → chunk-MTSKK3BN.js} +32 -3
  40. package/dist/chunk-MTSKK3BN.js.map +1 -0
  41. package/dist/chunk-O2ODDTMA.cjs +1627 -0
  42. package/dist/chunk-O2ODDTMA.cjs.map +1 -0
  43. package/dist/{chunk-3BFGL2JL.cjs → chunk-ODRHHWHY.cjs} +4 -4
  44. package/dist/{chunk-3BFGL2JL.cjs.map → chunk-ODRHHWHY.cjs.map} +1 -1
  45. package/dist/{chunk-Y5KTM3V5.js → chunk-PDKM27DF.js} +17 -295
  46. package/dist/chunk-PDKM27DF.js.map +1 -0
  47. package/dist/{chunk-OAL3B2ZU.cjs → chunk-PLJ7PHWU.cjs} +5 -5
  48. package/dist/{chunk-OAL3B2ZU.cjs.map → chunk-PLJ7PHWU.cjs.map} +1 -1
  49. package/dist/chunk-RA3ZJ45L.cjs +574 -0
  50. package/dist/chunk-RA3ZJ45L.cjs.map +1 -0
  51. package/dist/chunk-RFIBUWLF.cjs +232 -0
  52. package/dist/chunk-RFIBUWLF.cjs.map +1 -0
  53. package/dist/{chunk-MIDXCYZB.cjs → chunk-RQ2Y7USX.cjs} +15 -235
  54. package/dist/chunk-RQ2Y7USX.cjs.map +1 -0
  55. package/dist/chunk-SV65E4QW.js +58 -0
  56. package/dist/chunk-SV65E4QW.js.map +1 -0
  57. package/dist/chunk-TZGBRLPK.js +288 -0
  58. package/dist/chunk-TZGBRLPK.js.map +1 -0
  59. package/dist/{chunk-PROK33G6.js → chunk-X3TGXEFS.js} +11 -1596
  60. package/dist/chunk-X3TGXEFS.js.map +1 -0
  61. package/dist/{chunk-HIJUXAWS.cjs → chunk-XGZX22ET.cjs} +77 -74
  62. package/dist/chunk-XGZX22ET.cjs.map +1 -0
  63. package/dist/{chunk-5BXEYYH6.js → chunk-ZM26YEOT.js} +3 -3
  64. package/dist/{chunk-5BXEYYH6.js.map → chunk-ZM26YEOT.js.map} +1 -1
  65. package/dist/connect/docx.cjs +35 -6
  66. package/dist/connect/docx.cjs.map +1 -1
  67. package/dist/connect/docx.d.ts +9 -2
  68. package/dist/connect/docx.js +29 -5
  69. package/dist/connect/docx.js.map +1 -1
  70. package/dist/connect/index.cjs +126 -339
  71. package/dist/connect/index.cjs.map +1 -1
  72. package/dist/connect/index.d.ts +1 -0
  73. package/dist/connect/index.js +15 -260
  74. package/dist/connect/index.js.map +1 -1
  75. package/dist/connection/docx/ConnectedNativeDocxComparison.d.ts +5 -0
  76. package/dist/connection/docx/ConnectedNativeDocxEditor.d.ts +16 -0
  77. package/dist/connection/{ConnectedStreamedWordArtifact.d.ts → docx/ConnectedStreamedWordArtifact.d.ts} +1 -1
  78. package/dist/connection/docx/support.d.ts +27 -0
  79. package/dist/connection/docx/useConnectedDocxReferences.d.ts +2 -0
  80. package/dist/connection/docx/useConnectedHouseTemplate.d.ts +2 -0
  81. package/dist/docx/index.cjs +17 -63
  82. package/dist/docx/index.cjs.map +1 -1
  83. package/dist/docx/index.d.ts +1 -0
  84. package/dist/docx/index.js +2 -64
  85. package/dist/docx/index.js.map +1 -1
  86. package/dist/docx/template/candidates.d.ts +16 -0
  87. package/dist/index.cjs +625 -609
  88. package/dist/index.cjs.map +1 -1
  89. package/dist/index.d.ts +1 -0
  90. package/dist/index.js +13 -9
  91. package/dist/index.js.map +1 -1
  92. package/dist/lib/deep-link.d.ts +46 -0
  93. package/dist/settings/index.cjs +10 -9
  94. package/dist/settings/index.cjs.map +1 -1
  95. package/dist/settings/index.js +2 -1
  96. package/dist/settings/index.js.map +1 -1
  97. package/dist/studio/index.cjs +5 -4
  98. package/dist/studio/index.cjs.map +1 -1
  99. package/dist/studio/index.js +4 -3
  100. package/dist/studio/index.js.map +1 -1
  101. package/dist/workflow-canvas/index.cjs +58 -55
  102. package/dist/workflow-canvas/index.cjs.map +1 -1
  103. package/dist/workflow-canvas/index.js +7 -4
  104. package/dist/workflow-canvas/index.js.map +1 -1
  105. package/node_modules/@arbidocs/coedit/package.json +1 -1
  106. package/package.json +4 -4
  107. package/dist/chunk-4TR5QCCX.cjs +0 -43
  108. package/dist/chunk-4TR5QCCX.cjs.map +0 -1
  109. package/dist/chunk-7NDW4KF4.cjs +0 -112
  110. package/dist/chunk-7NDW4KF4.cjs.map +0 -1
  111. package/dist/chunk-CKCBBYTA.js.map +0 -1
  112. package/dist/chunk-DPGFEMVT.cjs.map +0 -1
  113. package/dist/chunk-ETXYVO6E.js +0 -109
  114. package/dist/chunk-ETXYVO6E.js.map +0 -1
  115. package/dist/chunk-GYAUJ4KT.js.map +0 -1
  116. package/dist/chunk-HIJUXAWS.cjs.map +0 -1
  117. package/dist/chunk-MCKOZACC.js +0 -41
  118. package/dist/chunk-MCKOZACC.js.map +0 -1
  119. package/dist/chunk-MIDXCYZB.cjs.map +0 -1
  120. package/dist/chunk-N5X37J3D.js.map +0 -1
  121. package/dist/chunk-OWCEQKAR.cjs.map +0 -1
  122. package/dist/chunk-PROK33G6.js.map +0 -1
  123. package/dist/chunk-S24XEVPS.cjs.map +0 -1
  124. package/dist/chunk-Y5KTM3V5.js.map +0 -1
  125. package/dist/connection/ConnectedNativeDocxEditor.d.ts +0 -6
@@ -2,24 +2,27 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkQIMVTGKS_cjs = require('../chunk-QIMVTGKS.cjs');
5
- var chunk3BFGL2JL_cjs = require('../chunk-3BFGL2JL.cjs');
5
+ var chunkODRHHWHY_cjs = require('../chunk-ODRHHWHY.cjs');
6
+ var chunkRA3ZJ45L_cjs = require('../chunk-RA3ZJ45L.cjs');
6
7
  var chunkJZNXRMLH_cjs = require('../chunk-JZNXRMLH.cjs');
7
- var chunk7NDW4KF4_cjs = require('../chunk-7NDW4KF4.cjs');
8
8
  var chunkGFNELPDP_cjs = require('../chunk-GFNELPDP.cjs');
9
9
  var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
10
- require('../chunk-S24XEVPS.cjs');
10
+ require('../chunk-464YPRAE.cjs');
11
11
  require('../chunk-V5OAXIBN.cjs');
12
12
  require('../chunk-5FYU7ZIU.cjs');
13
13
  var chunkO4YPVYPO_cjs = require('../chunk-O4YPVYPO.cjs');
14
- var chunkGBS6QVGS_cjs = require('../chunk-GBS6QVGS.cjs');
14
+ var chunkBUWBXJ2N_cjs = require('../chunk-BUWBXJ2N.cjs');
15
15
  var chunkV46W7YLI_cjs = require('../chunk-V46W7YLI.cjs');
16
16
  var chunkO6IEZDRC_cjs = require('../chunk-O6IEZDRC.cjs');
17
+ require('../chunk-LJJJ6CYH.cjs');
17
18
  var chunkI2QSDQQV_cjs = require('../chunk-I2QSDQQV.cjs');
18
19
  require('../chunk-RC25WMVB.cjs');
19
- var chunkDPGFEMVT_cjs = require('../chunk-DPGFEMVT.cjs');
20
+ var chunkABUO6PIQ_cjs = require('../chunk-ABUO6PIQ.cjs');
21
+ var chunkRFIBUWLF_cjs = require('../chunk-RFIBUWLF.cjs');
22
+ var chunkO2ODDTMA_cjs = require('../chunk-O2ODDTMA.cjs');
20
23
  require('../chunk-WS5EX7DN.cjs');
24
+ var chunkRQ2Y7USX_cjs = require('../chunk-RQ2Y7USX.cjs');
21
25
  require('../chunk-AHDJXIUB.cjs');
22
- var chunkMIDXCYZB_cjs = require('../chunk-MIDXCYZB.cjs');
23
26
  require('../chunk-ZW6FPIFC.cjs');
24
27
  require('../chunk-DETZZBG2.cjs');
25
28
  require('../chunk-R26BK7YL.cjs');
@@ -32,10 +35,11 @@ var chunk6YTHQ73P_cjs = require('../chunk-6YTHQ73P.cjs');
32
35
  var chunkBIXHB4LV_cjs = require('../chunk-BIXHB4LV.cjs');
33
36
  var chunkDWZXSPMB_cjs = require('../chunk-DWZXSPMB.cjs');
34
37
  var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
35
- var chunk7YLJHTDC_cjs = require('../chunk-7YLJHTDC.cjs');
38
+ var chunk5A2QQAF5_cjs = require('../chunk-5A2QQAF5.cjs');
36
39
  require('../chunk-B6MVQCXW.cjs');
37
40
  var chunkJKB7WT7L_cjs = require('../chunk-JKB7WT7L.cjs');
38
- var chunkOWCEQKAR_cjs = require('../chunk-OWCEQKAR.cjs');
41
+ var chunkJSTKEZBS_cjs = require('../chunk-JSTKEZBS.cjs');
42
+ require('../chunk-76L6LOP3.cjs');
39
43
  require('../chunk-7UTB4PHM.cjs');
40
44
  require('../chunk-32HW2Q33.cjs');
41
45
  require('../chunk-FX3K6LNZ.cjs');
@@ -136,7 +140,7 @@ function ConnectedWorkspaceActivity({
136
140
  [feed.data]
137
141
  );
138
142
  return /* @__PURE__ */ jsxRuntime.jsx(
139
- chunkGBS6QVGS_cjs.WorkspaceActivityList,
143
+ chunkBUWBXJ2N_cjs.WorkspaceActivityList,
140
144
  {
141
145
  ...listProps,
142
146
  items,
@@ -546,7 +550,7 @@ function NotificationCenter({
546
550
  // Filter-aware: the filtered total whenever a filter applies.
547
551
  count: filtered.length,
548
552
  actions: /* @__PURE__ */ jsxRuntime.jsx(
549
- chunkMIDXCYZB_cjs.TriStateFilterMenu,
553
+ chunkRQ2Y7USX_cjs.TriStateFilterMenu,
550
554
  {
551
555
  testId: "notifications-filter-button",
552
556
  title: "Filter",
@@ -809,7 +813,7 @@ function ConnectedWorkspaceNotificationMenu({
809
813
  });
810
814
  if (!workspaceId) return null;
811
815
  return /* @__PURE__ */ jsxRuntime.jsx(
812
- chunkGBS6QVGS_cjs.WorkspaceNotificationMenu,
816
+ chunkBUWBXJ2N_cjs.WorkspaceNotificationMenu,
813
817
  {
814
818
  ...menuProps,
815
819
  level,
@@ -828,7 +832,7 @@ function ConnectedThreadFollow({
828
832
  enabled: status === "authenticated"
829
833
  });
830
834
  if (!conversationId) return null;
831
- const Control = as === "menu-item" ? chunkGBS6QVGS_cjs.ThreadFollowMenuItem : chunkGBS6QVGS_cjs.ThreadFollowButton;
835
+ const Control = as === "menu-item" ? chunkBUWBXJ2N_cjs.ThreadFollowMenuItem : chunkBUWBXJ2N_cjs.ThreadFollowButton;
832
836
  return /* @__PURE__ */ jsxRuntime.jsx(
833
837
  Control,
834
838
  {
@@ -839,255 +843,6 @@ function ConnectedThreadFollow({
839
843
  }
840
844
  );
841
845
  }
842
- function useConnectedWorkspaceRole() {
843
- const { workspaceId, live, userId, ensureWorkspaceOpen } = chunkGFNELPDP_cjs.useConnectedWorkspace();
844
- const { data: members = [] } = react$1.useWorkspaceUsers(workspaceId ?? void 0, {
845
- enabled: live && !!workspaceId,
846
- beforeFetch: ensureWorkspaceOpen
847
- });
848
- const role = members.find((m) => m.user.external_id === userId)?.role;
849
- return {
850
- members,
851
- role,
852
- /** An owner or a collaborator edits, pauses, resumes and runs what is shared with the workspace. */
853
- canEditShared: role === "owner" || role === "collaborator",
854
- /** With an item's creator, the only one who deletes it. */
855
- isWorkspaceOwner: role === "owner"
856
- };
857
- }
858
- var DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS = {
859
- updateFailed: "Could not update the workflow",
860
- deleteTitle: "Delete workflow",
861
- deleteOne: (name) => `Delete \u201C${name}\u201D? Threads it already created stay.`,
862
- deleteMany: (count) => `Delete ${count} workflows? Threads they already created stay.`,
863
- runFailed: "The workflow failed. You can send an error report from its history.",
864
- noThread: "The workflow did not create a thread.",
865
- documentAction: (workflow) => workflow.action?.type === "email_documents" ? "Preparing your document email" : "Reviewing documents",
866
- untitledTask: "Untitled thread"
867
- };
868
- var messageOf = (error) => error instanceof Error ? error.message : "";
869
- function ConnectedWorkflowsTable({
870
- filter,
871
- describeTrigger = (w) => chunkDPGFEMVT_cjs.workflowTriggerType(w).replaceAll("_", " "),
872
- formatDate: formatDate2 = chunkKDG6FER6_cjs.fmtDate,
873
- onViewRuns,
874
- connectedLabels,
875
- ...tableProps
876
- }) {
877
- const l = { ...DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS, ...connectedLabels };
878
- const { notify, confirm, openConversation } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
879
- const { canEditShared, isWorkspaceOwner } = useConnectedWorkspaceRole();
880
- const { data: saved = [], isLoading } = react$1.useWorkflows({ live: true });
881
- const { data: conversations, refetch } = chunkJZNXRMLH_cjs.useConnectedConversations({ live: true });
882
- const { data: agents = [] } = react$1.useAgents();
883
- const update = react$1.useUpdateWorkflow();
884
- const remove = react$1.useDeleteWorkflow();
885
- const run = react$1.useRunWorkflow();
886
- const [busyId, setBusyId] = react.useState(null);
887
- const workflows = react.useMemo(() => filter ? saved.filter(filter) : saved, [saved, filter]);
888
- const firingStamp = saved.map((w) => `${w.external_id}:${w.last_fired_at ?? ""}`).join("|");
889
- react.useEffect(() => {
890
- void refetch?.();
891
- }, [firingStamp, refetch]);
892
- const lastRuns = react.useMemo(() => {
893
- const out = {};
894
- for (const c of conversations) {
895
- const id = c.workflow_ext_id;
896
- if (id && (!out[id] || Date.parse(c.created_at) > Date.parse(out[id].at)))
897
- out[id] = { conversationId: c.external_id, at: c.created_at, threadStatus: c.status };
898
- }
899
- return out;
900
- }, [conversations]);
901
- const agentNames = react.useMemo(
902
- () => Object.fromEntries(agents.map((a) => [a.external_id, a.given_name || a.email])),
903
- [agents]
904
- );
905
- const taskNames = react.useMemo(
906
- () => Object.fromEntries(
907
- conversations.filter((c) => c.status != null).map((c) => [c.external_id, c.title || l.untitledTask])
908
- ),
909
- [conversations, l.untitledTask]
910
- );
911
- const act = async (workflow, action) => {
912
- setBusyId(workflow.external_id);
913
- try {
914
- await action();
915
- } catch (error) {
916
- notify(messageOf(error) || l.updateFailed, "error");
917
- } finally {
918
- setBusyId(null);
919
- }
920
- };
921
- const setActive = (workflow, active) => act(workflow, () => update.mutateAsync({ workflowId: workflow.external_id, patch: { active } }));
922
- const deleteAll = async (items) => {
923
- if (!items.length) return;
924
- const ok = await confirm({
925
- title: l.deleteTitle,
926
- message: items.length === 1 ? l.deleteOne(items[0].name) : l.deleteMany(items.length)
927
- });
928
- if (!ok) return;
929
- for (const workflow of items)
930
- await act(workflow, () => remove.mutateAsync(workflow.external_id));
931
- };
932
- return /* @__PURE__ */ jsxRuntime.jsx(
933
- chunkDPGFEMVT_cjs.WorkflowsTable,
934
- {
935
- ...tableProps,
936
- workflows,
937
- isLoading,
938
- busyId,
939
- describeTrigger,
940
- formatDate: formatDate2,
941
- agentNames,
942
- taskNames,
943
- lastRuns,
944
- canEditShared,
945
- isWorkspaceOwner,
946
- onOpenThread: (conversationId) => openConversation(conversationId),
947
- onViewRuns,
948
- onToggleActive: (workflow, active) => void setActive(workflow, active),
949
- onToggleActiveMany: (items, active) => {
950
- void (async () => {
951
- for (const workflow of items) await setActive(workflow, active);
952
- })();
953
- },
954
- onToggleShared: (workflow, shared) => void act(
955
- workflow,
956
- () => update.mutateAsync({ workflowId: workflow.external_id, patch: { shared } })
957
- ),
958
- onDelete: (workflow) => void deleteAll([workflow]),
959
- onDeleteMany: (items) => void deleteAll(items),
960
- onRun: (workflow) => void act(workflow, async () => {
961
- const result = await run.mutateAsync(workflow.external_id);
962
- if (result.conversation_ext_id) openConversation(result.conversation_ext_id);
963
- if (result.error) {
964
- onViewRuns?.(workflow);
965
- notify(l.runFailed, "error");
966
- return;
967
- }
968
- if (result.execution_id && !result.conversation_ext_id) {
969
- onViewRuns?.(workflow);
970
- notify(l.documentAction(workflow), "success");
971
- return;
972
- }
973
- if (!result.conversation_ext_id) throw new Error(l.noThread);
974
- })
975
- }
976
- );
977
- }
978
- var IMAGE_FILE_TYPES = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "bmp", "tiff", "webp"]);
979
- function toWorkflowFieldDocument(doc) {
980
- const isImage = IMAGE_FILE_TYPES.has((doc.file_type ?? "").toLowerCase());
981
- return {
982
- id: doc.external_id,
983
- title: doc.doc_metadata?.title || doc.file_name || doc.external_id,
984
- fileName: doc.file_name,
985
- pages: isImage ? null : doc.n_pages ?? null,
986
- tokens: isImage ? null : doc.tokens ?? null,
987
- status: doc.status,
988
- isImage
989
- };
990
- }
991
- function useConnectedWorkflowScopeSource() {
992
- const { data: docs } = chunkJZNXRMLH_cjs.useConnectedDocuments();
993
- const { data: tags } = chunkJZNXRMLH_cjs.useConnectedTags();
994
- return react.useMemo(() => chunkDPGFEMVT_cjs.buildWorkflowScopeSource(docs, chunkDPGFEMVT_cjs.documentScopeLabels(tags)), [docs, tags]);
995
- }
996
- function useConnectedAgentOptions() {
997
- const { data: agents } = react$1.useAgents();
998
- return react.useMemo(
999
- () => (agents ?? []).map((a) => ({ id: a.external_id, label: a.given_name || a.email })),
1000
- [agents]
1001
- );
1002
- }
1003
- function ConnectedWorkflowDocumentsField({
1004
- field,
1005
- value,
1006
- onChange,
1007
- onAddFiles,
1008
- labels
1009
- }) {
1010
- const arbi = react$1.useArbi();
1011
- const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
1012
- const { ensureWorkspaceOpen } = chunkGFNELPDP_cjs.useConnectedWorkspace();
1013
- const { data: docs, loaded, refetch } = chunkJZNXRMLH_cjs.useConnectedDocuments();
1014
- const documents = react.useMemo(() => docs.map(toWorkflowFieldDocument), [docs]);
1015
- const chosen = value.documents ?? [];
1016
- const { data: thumbnails } = react$1.useThumbnails(chosen, { enabled: (field.max ?? 1) > 1 });
1017
- const input = react.useRef(null);
1018
- const [adding, setAdding] = react.useState(false);
1019
- const upload = react.useCallback(
1020
- async (files) => {
1021
- setAdding(true);
1022
- try {
1023
- await ensureWorkspaceOpen();
1024
- for (const file of files) await arbi.documents.uploadFile(file, file.name);
1025
- } catch (error) {
1026
- notify(error instanceof Error && error.message ? error.message : String(error), "error");
1027
- } finally {
1028
- setAdding(false);
1029
- await refetch?.();
1030
- }
1031
- },
1032
- [arbi, ensureWorkspaceOpen, notify, refetch]
1033
- );
1034
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1035
- !onAddFiles && /* @__PURE__ */ jsxRuntime.jsx(
1036
- "input",
1037
- {
1038
- ref: input,
1039
- type: "file",
1040
- multiple: true,
1041
- className: "hidden",
1042
- "aria-label": "Add files",
1043
- "data-testid": "workflow-add-files-input",
1044
- onChange: (e) => {
1045
- const files = Array.from(e.target.files ?? []);
1046
- e.target.value = "";
1047
- if (files.length) void upload(files);
1048
- }
1049
- }
1050
- ),
1051
- /* @__PURE__ */ jsxRuntime.jsx(
1052
- chunkDPGFEMVT_cjs.WorkflowDocumentsField,
1053
- {
1054
- field,
1055
- value,
1056
- onChange,
1057
- documents,
1058
- loaded,
1059
- thumbnailOf: (id) => thumbnails?.[id],
1060
- onAddFiles: onAddFiles ?? ((files) => files?.length ? void upload(files) : input.current?.click()),
1061
- adding,
1062
- labels
1063
- }
1064
- )
1065
- ] });
1066
- }
1067
- function ConnectedWorkflowLauncher({
1068
- onAddFiles,
1069
- ...props
1070
- }) {
1071
- const scopeSource = useConnectedWorkflowScopeSource();
1072
- const agents = useConnectedAgentOptions();
1073
- return /* @__PURE__ */ jsxRuntime.jsx(
1074
- chunkDPGFEMVT_cjs.WorkflowLauncher,
1075
- {
1076
- ...props,
1077
- scopeSource,
1078
- agents,
1079
- renderDocuments: (field, value, onChange) => /* @__PURE__ */ jsxRuntime.jsx(
1080
- ConnectedWorkflowDocumentsField,
1081
- {
1082
- field,
1083
- value,
1084
- onChange,
1085
- onAddFiles
1086
- }
1087
- )
1088
- }
1089
- );
1090
- }
1091
846
  var DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS = {
1092
847
  title: "Add a skill",
1093
848
  description: "Bring in a skill someone sent you, from a file or a link.",
@@ -1150,7 +905,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
1150
905
  onChange: (e) => {
1151
906
  const file = e.target.files?.[0];
1152
907
  e.target.value = "";
1153
- if (file) void add(() => chunkDPGFEMVT_cjs.importSkillFile(file));
908
+ if (file) void add(() => chunkABUO6PIQ_cjs.importSkillFile(file));
1154
909
  }
1155
910
  }
1156
911
  ),
@@ -1175,7 +930,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
1175
930
  className: "space-y-2",
1176
931
  onSubmit: (e) => {
1177
932
  e.preventDefault();
1178
- if (url.trim()) void add(() => chunkDPGFEMVT_cjs.importSkillFromUrl(url));
933
+ if (url.trim()) void add(() => chunkABUO6PIQ_cjs.importSkillFromUrl(url));
1179
934
  },
1180
935
  children: [
1181
936
  /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "skills-add-url", children: l.fromLink }),
@@ -1239,9 +994,9 @@ function ConnectedSkillsLibrary({
1239
994
  const [type, setType] = react.useState("all");
1240
995
  const [view, setView] = react.useState("gallery");
1241
996
  const [isBusy, setIsBusy] = react.useState(false);
1242
- const all = react.useMemo(() => chunkDPGFEMVT_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
997
+ const all = react.useMemo(() => chunkABUO6PIQ_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
1243
998
  const shown = react.useMemo(
1244
- () => chunkDPGFEMVT_cjs.filterLibrarySkills(all, { query, source, type }),
999
+ () => chunkABUO6PIQ_cjs.filterLibrarySkills(all, { query, source, type }),
1245
1000
  [all, query, source, type]
1246
1001
  );
1247
1002
  const current = all.find((s) => s.slug === selected) ?? null;
@@ -1252,21 +1007,21 @@ function ConnectedSkillsLibrary({
1252
1007
  const count = (s) => all.filter((x) => x.source === s).length;
1253
1008
  const sourceOptions = [
1254
1009
  { id: "all", label: "All", count: all.length },
1255
- { id: "builtin", label: chunkDPGFEMVT_cjs.SKILL_SOURCE_LABELS.builtin, count: count("builtin") },
1256
- { id: "mine", label: chunkDPGFEMVT_cjs.SKILL_SOURCE_LABELS.mine, count: count("mine") },
1257
- { id: "shared", label: chunkDPGFEMVT_cjs.SKILL_SOURCE_LABELS.shared, count: count("shared") }
1010
+ { id: "builtin", label: chunkABUO6PIQ_cjs.SKILL_SOURCE_LABELS.builtin, count: count("builtin") },
1011
+ { id: "mine", label: chunkABUO6PIQ_cjs.SKILL_SOURCE_LABELS.mine, count: count("mine") },
1012
+ { id: "shared", label: chunkABUO6PIQ_cjs.SKILL_SOURCE_LABELS.shared, count: count("shared") }
1258
1013
  ];
1259
1014
  const types = [...new Set(all.map((s) => s.type))];
1260
1015
  const typeOptions = [
1261
1016
  { id: "all", label: "Any kind" },
1262
- ...types.map((t) => ({ id: t, label: chunkDPGFEMVT_cjs.SKILL_TYPE_LABELS[t] ?? t }))
1017
+ ...types.map((t) => ({ id: t, label: chunkABUO6PIQ_cjs.SKILL_TYPE_LABELS[t] ?? t }))
1263
1018
  ];
1264
1019
  const pick = (slug) => {
1265
1020
  setSelected(slug);
1266
1021
  setMode("detail");
1267
1022
  };
1268
1023
  const markdownOf = async (skill) => {
1269
- if (!skill.docExtId) return chunkDPGFEMVT_cjs.workflowToSkillMarkdown(skill.workflow);
1024
+ if (!skill.docExtId) return chunkABUO6PIQ_cjs.workflowToSkillMarkdown(skill.workflow);
1270
1025
  const response = await arbi.documents.download(skill.docExtId);
1271
1026
  if (!response.ok) throw new Error(`Could not read the skill (${response.status})`);
1272
1027
  return response.text();
@@ -1274,7 +1029,7 @@ function ConnectedSkillsLibrary({
1274
1029
  const saveAs = (slug, markdown, shared = false) => upload.mutateAsync([
1275
1030
  {
1276
1031
  folder: `${SKILL_FOLDER}${slug}`,
1277
- fileName: chunkDPGFEMVT_cjs.SKILL_MAIN_FILENAME,
1032
+ fileName: chunkABUO6PIQ_cjs.SKILL_MAIN_FILENAME,
1278
1033
  content: new Blob([markdown], { type: "text/markdown" }),
1279
1034
  shared
1280
1035
  }
@@ -1337,7 +1092,7 @@ function ConnectedSkillsLibrary({
1337
1092
  try {
1338
1093
  documentTools.downloadBlob(
1339
1094
  new Blob([await markdownOf(skill)], { type: "text/markdown" }),
1340
- chunkDPGFEMVT_cjs.SKILL_MAIN_FILENAME
1095
+ chunkABUO6PIQ_cjs.SKILL_MAIN_FILENAME
1341
1096
  );
1342
1097
  } catch (error) {
1343
1098
  notify(errorText(error, "Could not export the skill"), "error");
@@ -1378,10 +1133,10 @@ function ConnectedSkillsLibrary({
1378
1133
  }
1379
1134
  )
1380
1135
  ] }),
1381
- /* @__PURE__ */ jsxRuntime.jsx(chunkDPGFEMVT_cjs.SkillViewToggle, { value: view, onChange: setView })
1136
+ /* @__PURE__ */ jsxRuntime.jsx(chunkABUO6PIQ_cjs.SkillViewToggle, { value: view, onChange: setView })
1382
1137
  ] }),
1383
1138
  /* @__PURE__ */ jsxRuntime.jsx(
1384
- chunkDPGFEMVT_cjs.SkillFilterChips,
1139
+ chunkABUO6PIQ_cjs.SkillFilterChips,
1385
1140
  {
1386
1141
  label: "Show",
1387
1142
  value: source,
@@ -1390,7 +1145,7 @@ function ConnectedSkillsLibrary({
1390
1145
  }
1391
1146
  ),
1392
1147
  types.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
1393
- chunkDPGFEMVT_cjs.SkillFilterChips,
1148
+ chunkABUO6PIQ_cjs.SkillFilterChips,
1394
1149
  {
1395
1150
  label: "Kind",
1396
1151
  value: type,
@@ -1437,12 +1192,12 @@ function ConnectedSkillsLibrary({
1437
1192
  view === "gallery" ? "grid grid-cols-[repeat(auto-fill,minmax(9.5rem,1fr))]" : "flex flex-col"
1438
1193
  ),
1439
1194
  children: shown.map((skill) => /* @__PURE__ */ jsxRuntime.jsx(
1440
- chunkDPGFEMVT_cjs.SkillTile,
1195
+ chunkABUO6PIQ_cjs.SkillTile,
1441
1196
  {
1442
1197
  name: skill.title,
1443
1198
  testId: `skill-tile-${skill.slug}`,
1444
1199
  description: skill.description,
1445
- sourceLabel: skill.isShared ? `${chunkDPGFEMVT_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunkDPGFEMVT_cjs.SKILL_SOURCE_LABELS[skill.source],
1200
+ sourceLabel: skill.isShared ? `${chunkABUO6PIQ_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunkABUO6PIQ_cjs.SKILL_SOURCE_LABELS[skill.source],
1446
1201
  type: skill.type,
1447
1202
  icon,
1448
1203
  layout: view,
@@ -1477,7 +1232,7 @@ function ConnectedSkillsLibrary({
1477
1232
  }
1478
1233
  ),
1479
1234
  mode === "new" && /* @__PURE__ */ jsxRuntime.jsx(
1480
- chunkDPGFEMVT_cjs.SkillGenerateForm,
1235
+ chunkABUO6PIQ_cjs.SkillGenerateForm,
1481
1236
  {
1482
1237
  icon,
1483
1238
  onGenerate: (desc) => {
@@ -1504,11 +1259,11 @@ function ConnectedSkillsLibrary({
1504
1259
  ),
1505
1260
  mode === "add" && /* @__PURE__ */ jsxRuntime.jsx(ConnectedSkillUpload, { onDone: done }),
1506
1261
  mode === "detail" && current && /* @__PURE__ */ jsxRuntime.jsx(
1507
- chunkDPGFEMVT_cjs.SkillLibraryDetail,
1262
+ chunkABUO6PIQ_cjs.SkillLibraryDetail,
1508
1263
  {
1509
1264
  skill: current,
1510
1265
  icon,
1511
- instructions: current.docExtId ? currentText ? chunkDPGFEMVT_cjs.parseSkillFrontmatter(currentText, chunkDPGFEMVT_cjs.SKILL_MAIN_FILENAME).content : "" : current.workflow.run.kind === "prompt" ? current.workflow.run.promptTemplate : "",
1266
+ instructions: current.docExtId ? currentText ? chunkABUO6PIQ_cjs.parseSkillFrontmatter(currentText, chunkABUO6PIQ_cjs.SKILL_MAIN_FILENAME).content : "" : current.workflow.run.kind === "prompt" ? current.workflow.run.promptTemplate : "",
1512
1267
  isLoading: !!current.docExtId && textLoading,
1513
1268
  actions: {
1514
1269
  onRun: () => onRun(current.slug),
@@ -1543,7 +1298,7 @@ function SkillEditor({
1543
1298
  const [seeded, setSeeded] = react.useState(!isEditing);
1544
1299
  const [nameError, setNameError] = react.useState(null);
1545
1300
  if (isEditing && !seeded && text !== void 0) {
1546
- const parsed = chunkDPGFEMVT_cjs.parseSkillFrontmatter(text, chunkDPGFEMVT_cjs.SKILL_MAIN_FILENAME);
1301
+ const parsed = chunkABUO6PIQ_cjs.parseSkillFrontmatter(text, chunkABUO6PIQ_cjs.SKILL_MAIN_FILENAME);
1547
1302
  setDescription(parsed.description ?? "");
1548
1303
  setBody(parsed.content ?? "");
1549
1304
  setSeeded(true);
@@ -1557,15 +1312,15 @@ function SkillEditor({
1557
1312
  notify("Add a short description.", "error");
1558
1313
  return;
1559
1314
  }
1560
- const slug = chunkDPGFEMVT_cjs.skillSlug(name);
1315
+ const slug = chunkABUO6PIQ_cjs.skillSlug(name);
1561
1316
  try {
1562
- await onSave(slug, chunkDPGFEMVT_cjs.serializeSkill({ name: slug, description, body }), isEditing);
1317
+ await onSave(slug, chunkABUO6PIQ_cjs.serializeSkill({ name: slug, description, body }), isEditing);
1563
1318
  } catch (err) {
1564
1319
  notify(errorText(err, "Could not save the skill"), "error");
1565
1320
  }
1566
1321
  };
1567
1322
  return /* @__PURE__ */ jsxRuntime.jsx(
1568
- chunkDPGFEMVT_cjs.SkillEditForm,
1323
+ chunkABUO6PIQ_cjs.SkillEditForm,
1569
1324
  {
1570
1325
  name,
1571
1326
  onNameChange: setName,
@@ -1601,9 +1356,9 @@ function ConnectedAgentCreator({
1601
1356
  agent,
1602
1357
  initialName,
1603
1358
  onSaved,
1604
- capabilities = chunkDPGFEMVT_cjs.DEFAULT_AGENT_CAPABILITIES,
1605
- templates = chunkDPGFEMVT_cjs.DEFAULT_AGENT_TEMPLATES,
1606
- types = chunkDPGFEMVT_cjs.DEFAULT_AGENT_TYPES,
1359
+ capabilities = chunkABUO6PIQ_cjs.DEFAULT_AGENT_CAPABILITIES,
1360
+ templates = chunkABUO6PIQ_cjs.DEFAULT_AGENT_TEMPLATES,
1361
+ types = chunkABUO6PIQ_cjs.DEFAULT_AGENT_TYPES,
1607
1362
  canRevokeWorkspaces = false,
1608
1363
  labels
1609
1364
  }) {
@@ -1645,7 +1400,7 @@ function ConnectedAgentCreator({
1645
1400
  const initialValues = react.useMemo(
1646
1401
  () => ({
1647
1402
  name: agent?.given_name ?? initialName ?? "",
1648
- persona: isEdit ? chunkDPGFEMVT_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
1403
+ persona: isEdit ? chunkABUO6PIQ_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
1649
1404
  modelName: String(agents.AGENT_MODEL_NAME ?? ""),
1650
1405
  capabilities: Object.fromEntries(capabilities.map(({ key }) => [key, Boolean(agents[key])])),
1651
1406
  type: "builtin",
@@ -1664,7 +1419,7 @@ function ConnectedAgentCreator({
1664
1419
  try {
1665
1420
  let agentExtId = agent?.external_id ?? early?.id ?? "";
1666
1421
  if (!agentExtId) {
1667
- if (!chunkDPGFEMVT_cjs.isValidAgentName(values.name)) {
1422
+ if (!chunkABUO6PIQ_cjs.isValidAgentName(values.name)) {
1668
1423
  notify("Give the agent a name first.", "error");
1669
1424
  return;
1670
1425
  }
@@ -1700,7 +1455,7 @@ function ConnectedAgentCreator({
1700
1455
  title: `agent-${name}`,
1701
1456
  sections: {
1702
1457
  Agents: {
1703
- PERSONA: chunkDPGFEMVT_cjs.composePersona(name, values.persona),
1458
+ PERSONA: chunkABUO6PIQ_cjs.composePersona(name, values.persona),
1704
1459
  ...values.modelName ? { AGENT_MODEL_NAME: values.modelName } : {},
1705
1460
  ...Object.fromEntries(capabilities.map(({ key }) => [key, !!values.capabilities[key]])),
1706
1461
  ENABLED_SKILLS: values.capabilities.SKILLS_ENABLED && skills.length ? skills : null,
@@ -1723,7 +1478,7 @@ function ConnectedAgentCreator({
1723
1478
  };
1724
1479
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1725
1480
  /* @__PURE__ */ jsxRuntime.jsx(
1726
- chunkDPGFEMVT_cjs.AgentCreator,
1481
+ chunkABUO6PIQ_cjs.AgentCreator,
1727
1482
  {
1728
1483
  open: ready,
1729
1484
  onOpenChange,
@@ -1739,11 +1494,11 @@ function ConnectedAgentCreator({
1739
1494
  ) : void 0,
1740
1495
  revokingWorkspaceId: revokeAccess.isPending ? revokeAccess.variables?.workspaceId : void 0,
1741
1496
  avatar: (values) => /* @__PURE__ */ jsxRuntime.jsx(
1742
- chunkDPGFEMVT_cjs.AgentAvatarField,
1497
+ chunkABUO6PIQ_cjs.AgentAvatarField,
1743
1498
  {
1744
1499
  picture,
1745
1500
  isBusy: avatarBusy,
1746
- canGenerate: isEdit || chunkDPGFEMVT_cjs.isValidAgentName(values.name),
1501
+ canGenerate: isEdit || chunkABUO6PIQ_cjs.isValidAgentName(values.name),
1747
1502
  onGenerate: () => handleGenerateAvatar(values)
1748
1503
  }
1749
1504
  ),
@@ -1757,7 +1512,7 @@ function ConnectedAgentCreator({
1757
1512
  /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { children: "Connected tools" }),
1758
1513
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Extra tools from services you have connected. Pick which this agent may use." }),
1759
1514
  /* @__PURE__ */ jsxRuntime.jsx(
1760
- chunkMIDXCYZB_cjs.MultiSelect,
1515
+ chunkRFIBUWLF_cjs.MultiSelect,
1761
1516
  {
1762
1517
  data: mcpOptions,
1763
1518
  value: mcpTools,
@@ -1771,7 +1526,7 @@ function ConnectedAgentCreator({
1771
1526
  /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { children: "Skills" }),
1772
1527
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Skills are instructions the agent may follow. Leave empty to allow all of yours." }),
1773
1528
  /* @__PURE__ */ jsxRuntime.jsx(
1774
- chunkMIDXCYZB_cjs.MultiSelect,
1529
+ chunkRFIBUWLF_cjs.MultiSelect,
1775
1530
  {
1776
1531
  data: skillOptions,
1777
1532
  value: skills,
@@ -1795,7 +1550,7 @@ function ConnectedAgentCreator({
1795
1550
  /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: "Connect your agent" }),
1796
1551
  /* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { children: "This key is shown once. Run the script on the machine that will host the agent." })
1797
1552
  ] }),
1798
- connect && /* @__PURE__ */ jsxRuntime.jsx(chunkDPGFEMVT_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
1553
+ connect && /* @__PURE__ */ jsxRuntime.jsx(chunkABUO6PIQ_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
1799
1554
  ]
1800
1555
  }
1801
1556
  ) })
@@ -1832,7 +1587,7 @@ function ConnectedWorkflowHistory({
1832
1587
  const { openConversation } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
1833
1588
  const { data: runs = [], isLoading } = react$1.useWorkflowRuns(workflow?.external_id);
1834
1589
  return /* @__PURE__ */ jsxRuntime.jsx(
1835
- chunkDPGFEMVT_cjs.TaskRunsDialog,
1590
+ chunkABUO6PIQ_cjs.TaskRunsDialog,
1836
1591
  {
1837
1592
  inline,
1838
1593
  hideHeader,
@@ -1868,14 +1623,14 @@ function ConnectedTaskActivityDialog({
1868
1623
  const activity = react$1.useConversationActivity(conversationId, { live });
1869
1624
  const { data: agents = [] } = react$1.useAgents();
1870
1625
  const { userId } = chunkGFNELPDP_cjs.useConnectedWorkspace();
1871
- const { members } = useConnectedWorkspaceRole();
1626
+ const { members } = chunkRA3ZJ45L_cjs.useConnectedWorkspaceRole();
1872
1627
  const renderPerson = react.useCallback(
1873
1628
  (id) => {
1874
1629
  const isMe = !!id && id === userId;
1875
1630
  const member = members.find((m) => m.user.external_id === id)?.user;
1876
1631
  const name = member && [member.given_name, member.family_name].filter(Boolean).join(" ") || member?.email;
1877
1632
  const person = { id, label: isMe ? "You" : name || "Someone", isMe };
1878
- return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(chunkDPGFEMVT_cjs.PersonPill, { person });
1633
+ return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(chunkO2ODDTMA_cjs.PersonPill, { person });
1879
1634
  },
1880
1635
  [renderTaskPerson, userId, members]
1881
1636
  );
@@ -1884,7 +1639,7 @@ function ConnectedTaskActivityDialog({
1884
1639
  [agents]
1885
1640
  );
1886
1641
  return /* @__PURE__ */ jsxRuntime.jsx(
1887
- chunkDPGFEMVT_cjs.TaskActivityDialog,
1642
+ chunkABUO6PIQ_cjs.TaskActivityDialog,
1888
1643
  {
1889
1644
  open: true,
1890
1645
  onOpenChange: (open) => !open && onClose(),
@@ -1972,7 +1727,7 @@ function StreamedArtifact({
1972
1727
  }
1973
1728
  var STARTING = /* @__PURE__ */ new Set(["pending", "running"]);
1974
1729
  function formValues(step, inputs) {
1975
- const fields = chunkOWCEQKAR_cjs.stepFields(step);
1730
+ const fields = chunkJSTKEZBS_cjs.stepFields(step);
1976
1731
  if (!fields.length) return void 0;
1977
1732
  if (step.kind === "form")
1978
1733
  return Object.fromEntries(fields.map((f) => [f.name, inputs[f.name] ?? ""]));
@@ -2010,7 +1765,7 @@ function useWorkflowThread(workflow, options = {}) {
2010
1765
  const wsId = workspaceId ?? void 0;
2011
1766
  const [threadId, setThreadId] = react.useState(options.conversationId);
2012
1767
  const [localInputs, setLocalInputs] = react.useState(
2013
- () => chunkOWCEQKAR_cjs.initialRunInputs(workflow, options.initialInputs)
1768
+ () => chunkJSTKEZBS_cjs.initialRunInputs(workflow, options.initialInputs)
2014
1769
  );
2015
1770
  const [edits, setEdits] = react.useState({});
2016
1771
  const [localStates, setLocalStates] = react.useState({});
@@ -2030,12 +1785,12 @@ function useWorkflowThread(workflow, options = {}) {
2030
1785
  );
2031
1786
  const conversation = conversations.data?.find((c) => c.external_id === threadId);
2032
1787
  const steps = react.useMemo(
2033
- () => chunkOWCEQKAR_cjs.workflowSteps(workflow).length > 0 ? chunkOWCEQKAR_cjs.workflowSteps(workflow) : chunkDPGFEMVT_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
1788
+ () => chunkJSTKEZBS_cjs.workflowSteps(workflow).length > 0 ? chunkJSTKEZBS_cjs.workflowSteps(workflow) : chunkABUO6PIQ_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
2034
1789
  [workflow, conversation?.plan?.steps]
2035
1790
  );
2036
1791
  const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
2037
1792
  const serverStates = react.useMemo(
2038
- () => chunkOWCEQKAR_cjs.stepStatesFromActivity(activity.data ?? []),
1793
+ () => chunkJSTKEZBS_cjs.stepStatesFromActivity(activity.data ?? []),
2039
1794
  [activity.data]
2040
1795
  );
2041
1796
  const working = steps.some(
@@ -2078,7 +1833,7 @@ function useWorkflowThread(workflow, options = {}) {
2078
1833
  async (values, done) => {
2079
1834
  await ensureWorkspaceOpen();
2080
1835
  const created = await createWork.mutateAsync({
2081
- title: chunkOWCEQKAR_cjs.runThreadTitle(workflow, values).slice(0, 60),
1836
+ title: chunkJSTKEZBS_cjs.runThreadTitle(workflow, values).slice(0, 60),
2082
1837
  description: workflow.description || null,
2083
1838
  prompt: null,
2084
1839
  skill_ref: null,
@@ -2090,7 +1845,7 @@ function useWorkflowThread(workflow, options = {}) {
2090
1845
  criteria: [],
2091
1846
  max_passes: 3,
2092
1847
  documents: [],
2093
- steps: chunkDPGFEMVT_cjs.toPlanSteps(workflow, {
1848
+ steps: chunkABUO6PIQ_cjs.toPlanSteps(workflow, {
2094
1849
  inputs: values,
2095
1850
  resolveWorkflow: options.resolveWorkflow,
2096
1851
  compose: options.compose
@@ -2177,7 +1932,7 @@ function useWorkflowThread(workflow, options = {}) {
2177
1932
  const anyRunning = Object.values(states).some((s) => s.status === "running");
2178
1933
  const needsStart = !threadId || idle && !anyRunning;
2179
1934
  const runError = idle ? conversation?.last_error ?? null : null;
2180
- const view = chunkDPGFEMVT_cjs.useWorkflowView({
1935
+ const view = chunkABUO6PIQ_cjs.useWorkflowView({
2181
1936
  steps,
2182
1937
  states,
2183
1938
  inputs,
@@ -2220,7 +1975,7 @@ function WorkflowRunThread({
2220
1975
  if (listed && activeThreadId !== conversationId) selectThread(conversationId);
2221
1976
  }, [listed, activeThreadId, conversationId, selectThread]);
2222
1977
  return /* @__PURE__ */ jsxRuntime.jsx(
2223
- chunk7YLJHTDC_cjs.ChatPage,
1978
+ chunk5A2QQAF5_cjs.ChatPage,
2224
1979
  {
2225
1980
  chat: { ...chat, threads: chat.threads.filter((t) => t.id === conversationId) },
2226
1981
  singleThread: true,
@@ -2258,7 +2013,7 @@ function WorkflowSignDialog({
2258
2013
  const arbi = react$1.useArbi();
2259
2014
  const { user, ensureWorkspaceOpen } = chunkGFNELPDP_cjs.useConnectedWorkspace();
2260
2015
  const tools = documentTools.useOptionalDocumentTools();
2261
- const { id, version: stepVersion } = chunkOWCEQKAR_cjs.splitDocRef(docRef);
2016
+ const { id, version: stepVersion } = chunkJSTKEZBS_cjs.splitDocRef(docRef);
2262
2017
  const [version, setVersion] = react.useState(stepVersion);
2263
2018
  const [pdf, setPdf] = react.useState(null);
2264
2019
  const [preparing, setPreparing] = react.useState(false);
@@ -2336,7 +2091,7 @@ function WorkflowWordDialog({
2336
2091
  onClose,
2337
2092
  labels
2338
2093
  }) {
2339
- const { id } = chunkOWCEQKAR_cjs.splitDocRef(docRef);
2094
+ const { id } = chunkJSTKEZBS_cjs.splitDocRef(docRef);
2340
2095
  return /* @__PURE__ */ jsxRuntime.jsx(
2341
2096
  chunkULWRNGGE_cjs.ModalScaffold,
2342
2097
  {
@@ -2345,7 +2100,7 @@ function WorkflowWordDialog({
2345
2100
  title: title ?? labels.wordTitle,
2346
2101
  size: "xl",
2347
2102
  testId: "workflow-word-dialog",
2348
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunk7NDW4KF4_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
2103
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkRA3ZJ45L_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
2349
2104
  }
2350
2105
  );
2351
2106
  }
@@ -2508,7 +2263,7 @@ function ConnectedWorkflowRunner({
2508
2263
  () => ({
2509
2264
  me: userId,
2510
2265
  openDocument: onOpenDocument && ((ref) => {
2511
- const { id, version } = chunkOWCEQKAR_cjs.splitDocRef(ref);
2266
+ const { id, version } = chunkJSTKEZBS_cjs.splitDocRef(ref);
2512
2267
  onOpenDocument(id, version);
2513
2268
  }),
2514
2269
  openDraft: onOpenDraft && ((draftId) => onOpenDraft(draftId)),
@@ -2518,7 +2273,7 @@ function ConnectedWorkflowRunner({
2518
2273
  const w = state.waiting;
2519
2274
  if (w?.doc_ext_id) setDialog({ kind: "sign", docRef: w.doc_ext_id });
2520
2275
  }),
2521
- openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(chunkOWCEQKAR_cjs.splitDocRef(ref).id) ?? "" })),
2276
+ openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(chunkJSTKEZBS_cjs.splitDocRef(ref).id) ?? "" })),
2522
2277
  openReview: hostActions?.openReview ?? ((tags, documents) => setDialog({ kind: "review", tags, documents }))
2523
2278
  }),
2524
2279
  [userId, onOpenDocument, onOpenDraft, onOpenMessage, hostActions, nameOfDoc, inThread]
@@ -2654,7 +2409,7 @@ function ConnectedWorkflowRunner({
2654
2409
  );
2655
2410
  };
2656
2411
  const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
2657
- chunkDPGFEMVT_cjs.WorkflowRunner,
2412
+ chunkABUO6PIQ_cjs.WorkflowRunner,
2658
2413
  {
2659
2414
  people,
2660
2415
  ...runnerProps,
@@ -2700,10 +2455,10 @@ function ConnectedWorkflowRunner({
2700
2455
  ) }),
2701
2456
  inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2702
2457
  /* @__PURE__ */ jsxRuntime.jsx(
2703
- chunkDPGFEMVT_cjs.WorkflowStepBar,
2458
+ chunkABUO6PIQ_cjs.WorkflowStepBar,
2704
2459
  {
2705
2460
  run: view,
2706
- levels: chunkOWCEQKAR_cjs.stepLevels(view.steps),
2461
+ levels: chunkJSTKEZBS_cjs.stepLevels(view.steps),
2707
2462
  doneTitle: (workflow.run.kind === "steps" ? workflow.run.completion?.title : void 0) ?? runnerProps.labels?.complete ?? "Done",
2708
2463
  icon: (key) => key && runnerProps.renderIcon ? runnerProps.renderIcon(key) : void 0,
2709
2464
  tid: (suffix) => `${testIdPrefix}-${suffix}`
@@ -2723,13 +2478,13 @@ function ConnectedWorkflowRunner({
2723
2478
  return state ? [[s.id, state]] : [];
2724
2479
  })
2725
2480
  );
2726
- const ref = chunkOWCEQKAR_cjs.stepDocuments(view.steps, states, id).at(-1);
2481
+ const ref = chunkJSTKEZBS_cjs.stepDocuments(view.steps, states, id).at(-1);
2727
2482
  const open = actions.openDocument ?? actions.openRedline;
2728
2483
  return {
2729
2484
  title: step.title,
2730
- kind: chunkOWCEQKAR_cjs.stepKindOf(step),
2485
+ kind: chunkJSTKEZBS_cjs.stepKindOf(step),
2731
2486
  phase: view.phaseOf(id),
2732
- document: ref && open ? { name: nameOfDoc(chunkOWCEQKAR_cjs.splitDocRef(ref).id) ?? ref, onOpen: () => open(ref) } : void 0
2487
+ document: ref && open ? { name: nameOfDoc(chunkJSTKEZBS_cjs.splitDocRef(ref).id) ?? ref, onOpen: () => open(ref) } : void 0
2733
2488
  };
2734
2489
  },
2735
2490
  targetMessageId: target,
@@ -2901,7 +2656,7 @@ function ConnectedTagTable({
2901
2656
  const fail = (e) => setError(e instanceof Error ? e.message : String(e));
2902
2657
  const snapshot = (data) => {
2903
2658
  const title = exportTitle ?? KIND_TITLES[kind];
2904
- const bytes = chunkGBS6QVGS_cjs.tagTableDocx(data, {
2659
+ const bytes = chunkBUWBXJ2N_cjs.tagTableDocx(data, {
2905
2660
  title,
2906
2661
  nameOf: (id) => people.find((p) => p.value === id)?.label
2907
2662
  });
@@ -2911,7 +2666,7 @@ function ConnectedTagTable({
2911
2666
  };
2912
2667
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2913
2668
  /* @__PURE__ */ jsxRuntime.jsx(
2914
- chunkGBS6QVGS_cjs.TagTable,
2669
+ chunkBUWBXJ2N_cjs.TagTable,
2915
2670
  {
2916
2671
  ...props,
2917
2672
  table,
@@ -5052,7 +4807,7 @@ function ConnectedMailbox({
5052
4807
  testIds: { root: "mail-search", input: "mail-filter-input" },
5053
4808
  className: "min-w-28 flex-1 sm:max-w-72",
5054
4809
  filter: /* @__PURE__ */ jsxRuntime.jsx(
5055
- chunkMIDXCYZB_cjs.TriStateFilterMenu,
4810
+ chunkRQ2Y7USX_cjs.TriStateFilterMenu,
5056
4811
  {
5057
4812
  testId: "mail-bar-filter-button",
5058
4813
  open: filterMenuOpen,
@@ -9078,7 +8833,7 @@ function ActiveChat({ agentId, workspaceId }) {
9078
8833
  activeArtifact: () => chunkJKB7WT7L_cjs.takeOpenDocumentForTurn({ workspaceId })
9079
8834
  });
9080
8835
  return /* @__PURE__ */ jsxRuntime.jsx(
9081
- chunk7YLJHTDC_cjs.ChatPage,
8836
+ chunk5A2QQAF5_cjs.ChatPage,
9082
8837
  {
9083
8838
  chat: { ...chat, assistantMode: void 0, setAssistantMode: void 0 },
9084
8839
  documentsRequired: false,
@@ -9140,35 +8895,75 @@ function ConnectedAgentChatPanel({
9140
8895
 
9141
8896
  Object.defineProperty(exports, "ConnectedAssistantDock", {
9142
8897
  enumerable: true,
9143
- get: function () { return chunk3BFGL2JL_cjs.ConnectedAssistantDock; }
8898
+ get: function () { return chunkODRHHWHY_cjs.ConnectedAssistantDock; }
9144
8899
  });
9145
8900
  Object.defineProperty(exports, "redlineStats", {
9146
8901
  enumerable: true,
9147
- get: function () { return chunk3BFGL2JL_cjs.redlineStats; }
8902
+ get: function () { return chunkODRHHWHY_cjs.redlineStats; }
9148
8903
  });
9149
8904
  Object.defineProperty(exports, "textToArtifact", {
9150
8905
  enumerable: true,
9151
- get: function () { return chunk3BFGL2JL_cjs.textToArtifact; }
8906
+ get: function () { return chunkODRHHWHY_cjs.textToArtifact; }
9152
8907
  });
9153
8908
  Object.defineProperty(exports, "toRedlineMarkdown", {
9154
8909
  enumerable: true,
9155
- get: function () { return chunk3BFGL2JL_cjs.toRedlineMarkdown; }
8910
+ get: function () { return chunkODRHHWHY_cjs.toRedlineMarkdown; }
9156
8911
  });
9157
8912
  Object.defineProperty(exports, "useConnectedAiTask", {
9158
8913
  enumerable: true,
9159
- get: function () { return chunk3BFGL2JL_cjs.useConnectedAiTask; }
8914
+ get: function () { return chunkODRHHWHY_cjs.useConnectedAiTask; }
9160
8915
  });
9161
8916
  Object.defineProperty(exports, "useConnectedChat", {
9162
8917
  enumerable: true,
9163
- get: function () { return chunk3BFGL2JL_cjs.useConnectedChat; }
8918
+ get: function () { return chunkODRHHWHY_cjs.useConnectedChat; }
9164
8919
  });
9165
8920
  Object.defineProperty(exports, "useSemanticSearch", {
9166
8921
  enumerable: true,
9167
- get: function () { return chunk3BFGL2JL_cjs.useSemanticSearch; }
8922
+ get: function () { return chunkODRHHWHY_cjs.useSemanticSearch; }
9168
8923
  });
9169
8924
  Object.defineProperty(exports, "useWorkspaceDocs", {
9170
8925
  enumerable: true,
9171
- get: function () { return chunk3BFGL2JL_cjs.useWorkspaceDocs; }
8926
+ get: function () { return chunkODRHHWHY_cjs.useWorkspaceDocs; }
8927
+ });
8928
+ Object.defineProperty(exports, "ConnectedWorkflowDocumentsField", {
8929
+ enumerable: true,
8930
+ get: function () { return chunkRA3ZJ45L_cjs.ConnectedWorkflowDocumentsField; }
8931
+ });
8932
+ Object.defineProperty(exports, "ConnectedWorkflowLauncher", {
8933
+ enumerable: true,
8934
+ get: function () { return chunkRA3ZJ45L_cjs.ConnectedWorkflowLauncher; }
8935
+ });
8936
+ Object.defineProperty(exports, "ConnectedWorkflowsTable", {
8937
+ enumerable: true,
8938
+ get: function () { return chunkRA3ZJ45L_cjs.ConnectedWorkflowsTable; }
8939
+ });
8940
+ Object.defineProperty(exports, "DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS", {
8941
+ enumerable: true,
8942
+ get: function () { return chunkRA3ZJ45L_cjs.DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS; }
8943
+ });
8944
+ Object.defineProperty(exports, "NativeDocxSupportProvider", {
8945
+ enumerable: true,
8946
+ get: function () { return chunkRA3ZJ45L_cjs.NativeDocxSupportProvider; }
8947
+ });
8948
+ Object.defineProperty(exports, "toWorkflowFieldDocument", {
8949
+ enumerable: true,
8950
+ get: function () { return chunkRA3ZJ45L_cjs.toWorkflowFieldDocument; }
8951
+ });
8952
+ Object.defineProperty(exports, "useConnectedAgentOptions", {
8953
+ enumerable: true,
8954
+ get: function () { return chunkRA3ZJ45L_cjs.useConnectedAgentOptions; }
8955
+ });
8956
+ Object.defineProperty(exports, "useConnectedWorkflowScopeSource", {
8957
+ enumerable: true,
8958
+ get: function () { return chunkRA3ZJ45L_cjs.useConnectedWorkflowScopeSource; }
8959
+ });
8960
+ Object.defineProperty(exports, "useConnectedWorkspaceRole", {
8961
+ enumerable: true,
8962
+ get: function () { return chunkRA3ZJ45L_cjs.useConnectedWorkspaceRole; }
8963
+ });
8964
+ Object.defineProperty(exports, "useNativeDocxSupport", {
8965
+ enumerable: true,
8966
+ get: function () { return chunkRA3ZJ45L_cjs.useNativeDocxSupport; }
9172
8967
  });
9173
8968
  Object.defineProperty(exports, "ConnectedWorkspaceDataProvider", {
9174
8969
  enumerable: true,
@@ -9234,15 +9029,11 @@ exports.ConnectedTaskAccessRequest = ConnectedTaskAccessRequest;
9234
9029
  exports.ConnectedTaskActivityDialog = ConnectedTaskActivityDialog;
9235
9030
  exports.ConnectedThreadFollow = ConnectedThreadFollow;
9236
9031
  exports.ConnectedUpcomingEvents = ConnectedUpcomingEvents;
9237
- exports.ConnectedWorkflowDocumentsField = ConnectedWorkflowDocumentsField;
9238
9032
  exports.ConnectedWorkflowHistory = ConnectedWorkflowHistory;
9239
- exports.ConnectedWorkflowLauncher = ConnectedWorkflowLauncher;
9240
9033
  exports.ConnectedWorkflowRunner = ConnectedWorkflowRunner;
9241
- exports.ConnectedWorkflowsTable = ConnectedWorkflowsTable;
9242
9034
  exports.ConnectedWorkspaceActivity = ConnectedWorkspaceActivity;
9243
9035
  exports.ConnectedWorkspaceNotificationMenu = ConnectedWorkspaceNotificationMenu;
9244
9036
  exports.DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS = DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS;
9245
- exports.DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS = DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS;
9246
9037
  exports.DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS = DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS;
9247
9038
  exports.NotificationCenter = NotificationCenter;
9248
9039
  exports.NotificationEvent = NotificationEvent;
@@ -9257,14 +9048,10 @@ exports.openMeetingLink = openMeetingLink;
9257
9048
  exports.requestCalendarComposer = requestCalendarComposer;
9258
9049
  exports.requestCalendarEvent = requestCalendarEvent;
9259
9050
  exports.resolveMailbox = resolveMailbox;
9260
- exports.toWorkflowFieldDocument = toWorkflowFieldDocument;
9261
9051
  exports.useCalendarViewStore = useCalendarViewStore;
9262
- exports.useConnectedAgentOptions = useConnectedAgentOptions;
9263
9052
  exports.useConnectedDocxNotifications = useConnectedDocxNotifications;
9264
9053
  exports.useConnectedShellWorkspaces = useConnectedShellWorkspaces;
9265
9054
  exports.useConnectedWorkNotifications = useConnectedWorkNotifications;
9266
- exports.useConnectedWorkflowScopeSource = useConnectedWorkflowScopeSource;
9267
- exports.useConnectedWorkspaceRole = useConnectedWorkspaceRole;
9268
9055
  exports.workflowRunView = workflowRunView;
9269
9056
  //# sourceMappingURL=index.cjs.map
9270
9057
  //# sourceMappingURL=index.cjs.map