@arbidocs/blocks 0.4.136 → 0.4.137

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 (128) hide show
  1. package/dist/agents/index.cjs +380 -373
  2. package/dist/agents/index.js +11 -12
  3. package/dist/agents/workflows/WorkflowDocumentsField.d.ts +42 -5
  4. package/dist/agents/workflows/index.d.ts +2 -2
  5. package/dist/agents/workflows/workspaceScope.d.ts +12 -0
  6. package/dist/calls/index.cjs +3 -3
  7. package/dist/calls/index.js +2 -2
  8. package/dist/chat/index.cjs +139 -139
  9. package/dist/chat/index.js +4 -4
  10. package/dist/chunk-2KUCVSFF.js +51 -0
  11. package/dist/chunk-2KUCVSFF.js.map +1 -0
  12. package/dist/{chunk-3FFRYZKV.js → chunk-3RJN2VTL.js} +36 -6
  13. package/dist/chunk-3RJN2VTL.js.map +1 -0
  14. package/dist/{chunk-OWCEQKAR.cjs → chunk-6F7SZCVL.cjs} +3 -3
  15. package/dist/{chunk-OWCEQKAR.cjs.map → chunk-6F7SZCVL.cjs.map} +1 -1
  16. package/dist/{chunk-JO3EMZ4X.js → chunk-7M4C6CK7.js} +3 -3
  17. package/dist/{chunk-JO3EMZ4X.js.map → chunk-7M4C6CK7.js.map} +1 -1
  18. package/dist/{chunk-OR4CO743.cjs → chunk-AAFX64WD.cjs} +3 -3
  19. package/dist/{chunk-OR4CO743.cjs.map → chunk-AAFX64WD.cjs.map} +1 -1
  20. package/dist/{chunk-IQU2GI6V.js → chunk-ATJUVHVB.js} +1301 -8
  21. package/dist/chunk-ATJUVHVB.js.map +1 -0
  22. package/dist/{chunk-OAL3B2ZU.cjs → chunk-BUNZWOPX.cjs} +5 -5
  23. package/dist/{chunk-OAL3B2ZU.cjs.map → chunk-BUNZWOPX.cjs.map} +1 -1
  24. package/dist/{chunk-N55UIXVT.cjs → chunk-C3ZRLULA.cjs} +5 -5
  25. package/dist/{chunk-N55UIXVT.cjs.map → chunk-C3ZRLULA.cjs.map} +1 -1
  26. package/dist/{chunk-LIHRGG4M.cjs → chunk-CHVCTKF4.cjs} +1365 -49
  27. package/dist/chunk-CHVCTKF4.cjs.map +1 -0
  28. package/dist/chunk-CQCC7LE7.js +210 -0
  29. package/dist/chunk-CQCC7LE7.js.map +1 -0
  30. package/dist/{chunk-ZAVEMQ37.cjs → chunk-DWZXSPMB.cjs} +3 -3
  31. package/dist/{chunk-ZAVEMQ37.cjs.map → chunk-DWZXSPMB.cjs.map} +1 -1
  32. package/dist/{chunk-VIU7AMHF.js → chunk-E5OYHJMU.js} +3 -3
  33. package/dist/{chunk-VIU7AMHF.js.map → chunk-E5OYHJMU.js.map} +1 -1
  34. package/dist/{chunk-7YLJHTDC.cjs → chunk-EHOPZBAX.cjs} +11 -11
  35. package/dist/{chunk-7YLJHTDC.cjs.map → chunk-EHOPZBAX.cjs.map} +1 -1
  36. package/dist/{chunk-5HFPRI3W.js → chunk-FUTMU4FR.js} +3 -3
  37. package/dist/{chunk-5HFPRI3W.js.map → chunk-FUTMU4FR.js.map} +1 -1
  38. package/dist/{chunk-IE5CUCZK.cjs → chunk-HDYWXEQU.cjs} +4 -4
  39. package/dist/{chunk-IE5CUCZK.cjs.map → chunk-HDYWXEQU.cjs.map} +1 -1
  40. package/dist/{chunk-C44D4WFG.cjs → chunk-HLB4DIYV.cjs} +3 -3
  41. package/dist/{chunk-C44D4WFG.cjs.map → chunk-HLB4DIYV.cjs.map} +1 -1
  42. package/dist/{chunk-OZLWSNUC.cjs → chunk-JY73DJOS.cjs} +80 -1232
  43. package/dist/chunk-JY73DJOS.cjs.map +1 -0
  44. package/dist/{chunk-LT2X5N37.js → chunk-KMNZ2RVO.js} +19 -1152
  45. package/dist/chunk-KMNZ2RVO.js.map +1 -0
  46. package/dist/{chunk-6S5FLMWG.js → chunk-KSHKTOY2.js} +203 -7
  47. package/dist/chunk-KSHKTOY2.js.map +1 -0
  48. package/dist/{chunk-ZNI4SW2G.js → chunk-L3T7OJRX.js} +3 -3
  49. package/dist/{chunk-ZNI4SW2G.js.map → chunk-L3T7OJRX.js.map} +1 -1
  50. package/dist/{chunk-RUB62J2X.js → chunk-M33QUNFH.js} +3 -3
  51. package/dist/{chunk-RUB62J2X.js.map → chunk-M33QUNFH.js.map} +1 -1
  52. package/dist/{chunk-DJM7DLCT.cjs → chunk-OPTBQSCV.cjs} +3 -3
  53. package/dist/{chunk-DJM7DLCT.cjs.map → chunk-OPTBQSCV.cjs.map} +1 -1
  54. package/dist/{chunk-GFYGYME3.js → chunk-OQ7RUNOC.js} +3 -3
  55. package/dist/{chunk-GFYGYME3.js.map → chunk-OQ7RUNOC.js.map} +1 -1
  56. package/dist/chunk-RFIBUWLF.cjs +232 -0
  57. package/dist/chunk-RFIBUWLF.cjs.map +1 -0
  58. package/dist/{chunk-N26CXGXC.cjs → chunk-RQ2Y7USX.cjs} +201 -3
  59. package/dist/chunk-RQ2Y7USX.cjs.map +1 -0
  60. package/dist/chunk-UUHUQHXR.cjs +56 -0
  61. package/dist/chunk-UUHUQHXR.cjs.map +1 -0
  62. package/dist/{chunk-ECERC6TI.js → chunk-VHJHY7TT.js} +3 -3
  63. package/dist/{chunk-ECERC6TI.js.map → chunk-VHJHY7TT.js.map} +1 -1
  64. package/dist/{chunk-5BXEYYH6.js → chunk-VMESMX7N.js} +3 -3
  65. package/dist/{chunk-5BXEYYH6.js.map → chunk-VMESMX7N.js.map} +1 -1
  66. package/dist/{chunk-44R3CCZT.cjs → chunk-WS5EX7DN.cjs} +37 -6
  67. package/dist/chunk-WS5EX7DN.cjs.map +1 -0
  68. package/dist/{chunk-Y5KTM3V5.js → chunk-YOMPLCP6.js} +3 -3
  69. package/dist/{chunk-Y5KTM3V5.js.map → chunk-YOMPLCP6.js.map} +1 -1
  70. package/dist/collaboration/index.cjs +51 -51
  71. package/dist/collaboration/index.js +3 -3
  72. package/dist/connect/docx.cjs +5 -5
  73. package/dist/connect/docx.js +4 -4
  74. package/dist/connect/index.cjs +353 -76
  75. package/dist/connect/index.cjs.map +1 -1
  76. package/dist/connect/index.d.ts +3 -0
  77. package/dist/connect/index.js +274 -20
  78. package/dist/connect/index.js.map +1 -1
  79. package/dist/connection/ConnectedWorkflowBuilder.d.ts +1 -1
  80. package/dist/connection/ConnectedWorkflowLauncher.d.ts +35 -0
  81. package/dist/connection/ConnectedWorkflowsTable.d.ts +62 -0
  82. package/dist/connection/workspaceData.d.ts +45 -0
  83. package/dist/document-tools/index.cjs +1 -1
  84. package/dist/document-tools/index.js +1 -1
  85. package/dist/facts/index.cjs +4 -4
  86. package/dist/facts/index.js +4 -4
  87. package/dist/files/index.cjs +3 -3
  88. package/dist/files/index.js +3 -3
  89. package/dist/home/index.cjs +22 -23
  90. package/dist/home/index.cjs.map +1 -1
  91. package/dist/home/index.js +4 -5
  92. package/dist/home/index.js.map +1 -1
  93. package/dist/index.cjs +733 -726
  94. package/dist/index.cjs.map +1 -1
  95. package/dist/index.js +20 -21
  96. package/dist/index.js.map +1 -1
  97. package/dist/retrieval/index.cjs +1 -1
  98. package/dist/retrieval/index.js +1 -1
  99. package/dist/settings/index.cjs +56 -56
  100. package/dist/settings/index.js +6 -6
  101. package/dist/shell/index.cjs +2 -2
  102. package/dist/shell/index.js +2 -2
  103. package/dist/site/index.cjs +5 -5
  104. package/dist/site/index.js +1 -1
  105. package/dist/studio/index.cjs +8 -8
  106. package/dist/studio/index.js +7 -7
  107. package/dist/workflow-canvas/index.cjs +73 -71
  108. package/dist/workflow-canvas/index.cjs.map +1 -1
  109. package/dist/workflow-canvas/index.js +23 -21
  110. package/dist/workflow-canvas/index.js.map +1 -1
  111. package/node_modules/@arbidocs/coedit/package.json +1 -1
  112. package/package.json +4 -4
  113. package/dist/chunk-3FFRYZKV.js.map +0 -1
  114. package/dist/chunk-44R3CCZT.cjs.map +0 -1
  115. package/dist/chunk-4XJZ6AAY.js +0 -407
  116. package/dist/chunk-4XJZ6AAY.js.map +0 -1
  117. package/dist/chunk-6S5FLMWG.js.map +0 -1
  118. package/dist/chunk-7D737FLE.cjs +0 -43
  119. package/dist/chunk-7D737FLE.cjs.map +0 -1
  120. package/dist/chunk-IQU2GI6V.js.map +0 -1
  121. package/dist/chunk-LIHRGG4M.cjs.map +0 -1
  122. package/dist/chunk-LT2X5N37.js.map +0 -1
  123. package/dist/chunk-N26CXGXC.cjs.map +0 -1
  124. package/dist/chunk-OZLWSNUC.cjs.map +0 -1
  125. package/dist/chunk-S5HZBXZA.cjs +0 -430
  126. package/dist/chunk-S5HZBXZA.cjs.map +0 -1
  127. package/dist/chunk-XD2M6LIG.js +0 -41
  128. package/dist/chunk-XD2M6LIG.js.map +0 -1
@@ -1,40 +1,44 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkOR4CO743_cjs = require('../chunk-OR4CO743.cjs');
5
- var chunkIE5CUCZK_cjs = require('../chunk-IE5CUCZK.cjs');
6
- var chunkC44D4WFG_cjs = require('../chunk-C44D4WFG.cjs');
4
+ var chunkO4YPVYPO_cjs = require('../chunk-O4YPVYPO.cjs');
5
+ var chunkAAFX64WD_cjs = require('../chunk-AAFX64WD.cjs');
6
+ var chunkHDYWXEQU_cjs = require('../chunk-HDYWXEQU.cjs');
7
+ var chunkUUHUQHXR_cjs = require('../chunk-UUHUQHXR.cjs');
8
+ var chunkHLB4DIYV_cjs = require('../chunk-HLB4DIYV.cjs');
7
9
  var chunkKDUGTKVI_cjs = require('../chunk-KDUGTKVI.cjs');
8
10
  var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
9
11
  require('../chunk-S24XEVPS.cjs');
10
12
  require('../chunk-V5OAXIBN.cjs');
11
13
  require('../chunk-5FYU7ZIU.cjs');
12
- var chunkO4YPVYPO_cjs = require('../chunk-O4YPVYPO.cjs');
13
- var chunkN55UIXVT_cjs = require('../chunk-N55UIXVT.cjs');
14
+ var chunkC3ZRLULA_cjs = require('../chunk-C3ZRLULA.cjs');
14
15
  var chunkO6IEZDRC_cjs = require('../chunk-O6IEZDRC.cjs');
15
16
  var chunkI2QSDQQV_cjs = require('../chunk-I2QSDQQV.cjs');
16
17
  require('../chunk-RC25WMVB.cjs');
17
- var chunkLIHRGG4M_cjs = require('../chunk-LIHRGG4M.cjs');
18
- require('../chunk-7D737FLE.cjs');
19
- var chunkN26CXGXC_cjs = require('../chunk-N26CXGXC.cjs');
18
+ var chunkCHVCTKF4_cjs = require('../chunk-CHVCTKF4.cjs');
20
19
  require('../chunk-DETZZBG2.cjs');
20
+ var chunkRQ2Y7USX_cjs = require('../chunk-RQ2Y7USX.cjs');
21
+ require('../chunk-ZW6FPIFC.cjs');
22
+ require('../chunk-WS5EX7DN.cjs');
23
+ require('../chunk-R26BK7YL.cjs');
24
+ require('../chunk-V4ISCZJ7.cjs');
21
25
  var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
22
26
  require('../chunk-C2CWWEHO.cjs');
23
27
  var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
24
28
  require('../chunk-ADOKTJHV.cjs');
25
- var chunkZAVEMQ37_cjs = require('../chunk-ZAVEMQ37.cjs');
29
+ var chunkDWZXSPMB_cjs = require('../chunk-DWZXSPMB.cjs');
26
30
  var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
27
- var chunkC4WSHRR6_cjs = require('../chunk-C4WSHRR6.cjs');
28
- var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
29
- var chunk7YLJHTDC_cjs = require('../chunk-7YLJHTDC.cjs');
31
+ var chunkEHOPZBAX_cjs = require('../chunk-EHOPZBAX.cjs');
30
32
  require('../chunk-B6MVQCXW.cjs');
31
33
  var chunkJKB7WT7L_cjs = require('../chunk-JKB7WT7L.cjs');
32
- var chunkOWCEQKAR_cjs = require('../chunk-OWCEQKAR.cjs');
33
- require('../chunk-7UTB4PHM.cjs');
34
+ var chunk6F7SZCVL_cjs = require('../chunk-6F7SZCVL.cjs');
34
35
  require('../chunk-32HW2Q33.cjs');
36
+ require('../chunk-7UTB4PHM.cjs');
35
37
  require('../chunk-FX3K6LNZ.cjs');
36
38
  require('../chunk-PPCATBOY.cjs');
37
39
  require('../chunk-MHVNT4J3.cjs');
40
+ var chunkC4WSHRR6_cjs = require('../chunk-C4WSHRR6.cjs');
41
+ var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
38
42
  var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
39
43
  require('../chunk-DES3K4SD.cjs');
40
44
  var react = require('react');
@@ -125,7 +129,7 @@ function ConnectedWorkspaceActivity({
125
129
  [feed.data]
126
130
  );
127
131
  return /* @__PURE__ */ jsxRuntime.jsx(
128
- chunkN55UIXVT_cjs.WorkspaceActivityList,
132
+ chunkC3ZRLULA_cjs.WorkspaceActivityList,
129
133
  {
130
134
  ...listProps,
131
135
  items,
@@ -151,7 +155,7 @@ function ConnectedWorkspaceNotificationMenu({
151
155
  });
152
156
  if (!workspaceId) return null;
153
157
  return /* @__PURE__ */ jsxRuntime.jsx(
154
- chunkN55UIXVT_cjs.WorkspaceNotificationMenu,
158
+ chunkC3ZRLULA_cjs.WorkspaceNotificationMenu,
155
159
  {
156
160
  ...menuProps,
157
161
  level,
@@ -170,7 +174,7 @@ function ConnectedThreadFollow({
170
174
  enabled: status === "authenticated"
171
175
  });
172
176
  if (!conversationId) return null;
173
- const Control = as === "menu-item" ? chunkN55UIXVT_cjs.ThreadFollowMenuItem : chunkN55UIXVT_cjs.ThreadFollowButton;
177
+ const Control = as === "menu-item" ? chunkC3ZRLULA_cjs.ThreadFollowMenuItem : chunkC3ZRLULA_cjs.ThreadFollowButton;
174
178
  return /* @__PURE__ */ jsxRuntime.jsx(
175
179
  Control,
176
180
  {
@@ -181,6 +185,255 @@ function ConnectedThreadFollow({
181
185
  }
182
186
  );
183
187
  }
188
+ function useConnectedWorkspaceRole() {
189
+ const { workspaceId, live, userId, ensureWorkspaceOpen } = chunkKDUGTKVI_cjs.useConnectedWorkspace();
190
+ const { data: members = [] } = react$1.useWorkspaceUsers(workspaceId ?? void 0, {
191
+ enabled: live && !!workspaceId,
192
+ beforeFetch: ensureWorkspaceOpen
193
+ });
194
+ const role = members.find((m) => m.user.external_id === userId)?.role;
195
+ return {
196
+ members,
197
+ role,
198
+ /** An owner or a collaborator edits, pauses, resumes and runs what is shared with the workspace. */
199
+ canEditShared: role === "owner" || role === "collaborator",
200
+ /** With an item's creator, the only one who deletes it. */
201
+ isWorkspaceOwner: role === "owner"
202
+ };
203
+ }
204
+ var DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS = {
205
+ updateFailed: "Could not update the workflow",
206
+ deleteTitle: "Delete workflow",
207
+ deleteOne: (name) => `Delete \u201C${name}\u201D? Threads it already created stay.`,
208
+ deleteMany: (count) => `Delete ${count} workflows? Threads they already created stay.`,
209
+ runFailed: "The workflow failed. You can send an error report from its history.",
210
+ noThread: "The workflow did not create a thread.",
211
+ documentAction: (workflow) => workflow.action?.type === "email_documents" ? "Preparing your document email" : "Reviewing documents",
212
+ untitledTask: "Untitled thread"
213
+ };
214
+ var messageOf = (error) => error instanceof Error ? error.message : "";
215
+ function ConnectedWorkflowsTable({
216
+ filter,
217
+ describeTrigger = (w) => chunkCHVCTKF4_cjs.workflowTriggerType(w).replaceAll("_", " "),
218
+ formatDate = chunkKDG6FER6_cjs.fmtDate,
219
+ onViewRuns,
220
+ connectedLabels,
221
+ ...tableProps
222
+ }) {
223
+ const l = { ...DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS, ...connectedLabels };
224
+ const { notify, confirm, openConversation } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
225
+ const { canEditShared, isWorkspaceOwner } = useConnectedWorkspaceRole();
226
+ const { data: saved = [], isLoading } = react$1.useWorkflows({ live: true });
227
+ const { data: conversations, refetch } = chunkUUHUQHXR_cjs.useConnectedConversations({ live: true });
228
+ const { data: agents = [] } = react$1.useAgents();
229
+ const update = react$1.useUpdateWorkflow();
230
+ const remove = react$1.useDeleteWorkflow();
231
+ const run = react$1.useRunWorkflow();
232
+ const [busyId, setBusyId] = react.useState(null);
233
+ const workflows = react.useMemo(() => filter ? saved.filter(filter) : saved, [saved, filter]);
234
+ const firingStamp = saved.map((w) => `${w.external_id}:${w.last_fired_at ?? ""}`).join("|");
235
+ react.useEffect(() => {
236
+ void refetch?.();
237
+ }, [firingStamp, refetch]);
238
+ const lastRuns = react.useMemo(() => {
239
+ const out = {};
240
+ for (const c of conversations) {
241
+ const id = c.workflow_ext_id;
242
+ if (id && (!out[id] || Date.parse(c.created_at) > Date.parse(out[id].at)))
243
+ out[id] = { conversationId: c.external_id, at: c.created_at, threadStatus: c.status };
244
+ }
245
+ return out;
246
+ }, [conversations]);
247
+ const agentNames = react.useMemo(
248
+ () => Object.fromEntries(agents.map((a) => [a.external_id, a.given_name || a.email])),
249
+ [agents]
250
+ );
251
+ const taskNames = react.useMemo(
252
+ () => Object.fromEntries(
253
+ conversations.filter((c) => c.status != null).map((c) => [c.external_id, c.title || l.untitledTask])
254
+ ),
255
+ [conversations, l.untitledTask]
256
+ );
257
+ const act = async (workflow, action) => {
258
+ setBusyId(workflow.external_id);
259
+ try {
260
+ await action();
261
+ } catch (error) {
262
+ notify(messageOf(error) || l.updateFailed, "error");
263
+ } finally {
264
+ setBusyId(null);
265
+ }
266
+ };
267
+ const setActive = (workflow, active) => act(workflow, () => update.mutateAsync({ workflowId: workflow.external_id, patch: { active } }));
268
+ const deleteAll = async (items) => {
269
+ if (!items.length) return;
270
+ const ok = await confirm({
271
+ title: l.deleteTitle,
272
+ message: items.length === 1 ? l.deleteOne(items[0].name) : l.deleteMany(items.length)
273
+ });
274
+ if (!ok) return;
275
+ for (const workflow of items)
276
+ await act(workflow, () => remove.mutateAsync(workflow.external_id));
277
+ };
278
+ return /* @__PURE__ */ jsxRuntime.jsx(
279
+ chunkCHVCTKF4_cjs.WorkflowsTable,
280
+ {
281
+ ...tableProps,
282
+ workflows,
283
+ isLoading,
284
+ busyId,
285
+ describeTrigger,
286
+ formatDate,
287
+ agentNames,
288
+ taskNames,
289
+ lastRuns,
290
+ canEditShared,
291
+ isWorkspaceOwner,
292
+ onOpenThread: (conversationId) => openConversation(conversationId),
293
+ onViewRuns,
294
+ onToggleActive: (workflow, active) => void setActive(workflow, active),
295
+ onToggleActiveMany: (items, active) => {
296
+ void (async () => {
297
+ for (const workflow of items) await setActive(workflow, active);
298
+ })();
299
+ },
300
+ onToggleShared: (workflow, shared) => void act(
301
+ workflow,
302
+ () => update.mutateAsync({ workflowId: workflow.external_id, patch: { shared } })
303
+ ),
304
+ onDelete: (workflow) => void deleteAll([workflow]),
305
+ onDeleteMany: (items) => void deleteAll(items),
306
+ onRun: (workflow) => void act(workflow, async () => {
307
+ const result = await run.mutateAsync(workflow.external_id);
308
+ if (result.conversation_ext_id) openConversation(result.conversation_ext_id);
309
+ if (result.error) {
310
+ onViewRuns?.(workflow);
311
+ notify(l.runFailed, "error");
312
+ return;
313
+ }
314
+ if (result.execution_id && !result.conversation_ext_id) {
315
+ onViewRuns?.(workflow);
316
+ notify(l.documentAction(workflow), "success");
317
+ return;
318
+ }
319
+ if (!result.conversation_ext_id) throw new Error(l.noThread);
320
+ })
321
+ }
322
+ );
323
+ }
324
+ var IMAGE_FILE_TYPES = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "bmp", "tiff", "webp"]);
325
+ function toWorkflowFieldDocument(doc) {
326
+ const isImage = IMAGE_FILE_TYPES.has((doc.file_type ?? "").toLowerCase());
327
+ return {
328
+ id: doc.external_id,
329
+ title: doc.doc_metadata?.title || doc.file_name || doc.external_id,
330
+ fileName: doc.file_name,
331
+ pages: isImage ? null : doc.n_pages ?? null,
332
+ tokens: isImage ? null : doc.tokens ?? null,
333
+ status: doc.status,
334
+ isImage
335
+ };
336
+ }
337
+ function useConnectedWorkflowScopeSource() {
338
+ const { data: docs } = chunkUUHUQHXR_cjs.useConnectedDocuments();
339
+ const { data: tags } = chunkUUHUQHXR_cjs.useConnectedTags();
340
+ return react.useMemo(() => chunkCHVCTKF4_cjs.buildWorkflowScopeSource(docs, chunkCHVCTKF4_cjs.documentScopeLabels(tags)), [docs, tags]);
341
+ }
342
+ function useConnectedAgentOptions() {
343
+ const { data: agents } = react$1.useAgents();
344
+ return react.useMemo(
345
+ () => (agents ?? []).map((a) => ({ id: a.external_id, label: a.given_name || a.email })),
346
+ [agents]
347
+ );
348
+ }
349
+ function ConnectedWorkflowDocumentsField({
350
+ field,
351
+ value,
352
+ onChange,
353
+ onAddFiles,
354
+ labels
355
+ }) {
356
+ const arbi = react$1.useArbi();
357
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
358
+ const { ensureWorkspaceOpen } = chunkKDUGTKVI_cjs.useConnectedWorkspace();
359
+ const { data: docs, loaded, refetch } = chunkUUHUQHXR_cjs.useConnectedDocuments();
360
+ const documents = react.useMemo(() => docs.map(toWorkflowFieldDocument), [docs]);
361
+ const chosen = value.documents ?? [];
362
+ const { data: thumbnails } = react$1.useThumbnails(chosen, { enabled: (field.max ?? 1) > 1 });
363
+ const input = react.useRef(null);
364
+ const [adding, setAdding] = react.useState(false);
365
+ const upload = react.useCallback(
366
+ async (files) => {
367
+ setAdding(true);
368
+ try {
369
+ await ensureWorkspaceOpen();
370
+ for (const file of files) await arbi.documents.uploadFile(file, file.name);
371
+ } catch (error) {
372
+ notify(error instanceof Error && error.message ? error.message : String(error), "error");
373
+ } finally {
374
+ setAdding(false);
375
+ await refetch?.();
376
+ }
377
+ },
378
+ [arbi, ensureWorkspaceOpen, notify, refetch]
379
+ );
380
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
381
+ !onAddFiles && /* @__PURE__ */ jsxRuntime.jsx(
382
+ "input",
383
+ {
384
+ ref: input,
385
+ type: "file",
386
+ multiple: true,
387
+ className: "hidden",
388
+ "aria-label": "Add files",
389
+ "data-testid": "workflow-add-files-input",
390
+ onChange: (e) => {
391
+ const files = Array.from(e.target.files ?? []);
392
+ e.target.value = "";
393
+ if (files.length) void upload(files);
394
+ }
395
+ }
396
+ ),
397
+ /* @__PURE__ */ jsxRuntime.jsx(
398
+ chunkCHVCTKF4_cjs.WorkflowDocumentsField,
399
+ {
400
+ field,
401
+ value,
402
+ onChange,
403
+ documents,
404
+ loaded,
405
+ thumbnailOf: (id) => thumbnails?.[id],
406
+ onAddFiles: onAddFiles ?? ((files) => files?.length ? void upload(files) : input.current?.click()),
407
+ adding,
408
+ labels
409
+ }
410
+ )
411
+ ] });
412
+ }
413
+ function ConnectedWorkflowLauncher({
414
+ onAddFiles,
415
+ ...props
416
+ }) {
417
+ const scopeSource = useConnectedWorkflowScopeSource();
418
+ const agents = useConnectedAgentOptions();
419
+ return /* @__PURE__ */ jsxRuntime.jsx(
420
+ chunkCHVCTKF4_cjs.WorkflowLauncher,
421
+ {
422
+ ...props,
423
+ scopeSource,
424
+ agents,
425
+ renderDocuments: (field, value, onChange) => /* @__PURE__ */ jsxRuntime.jsx(
426
+ ConnectedWorkflowDocumentsField,
427
+ {
428
+ field,
429
+ value,
430
+ onChange,
431
+ onAddFiles
432
+ }
433
+ )
434
+ }
435
+ );
436
+ }
184
437
  var DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS = {
185
438
  title: "Add a skill",
186
439
  description: "Bring in a skill someone sent you, from a file or a link.",
@@ -243,7 +496,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
243
496
  onChange: (e) => {
244
497
  const file = e.target.files?.[0];
245
498
  e.target.value = "";
246
- if (file) void add(() => chunkLIHRGG4M_cjs.importSkillFile(file));
499
+ if (file) void add(() => chunkCHVCTKF4_cjs.importSkillFile(file));
247
500
  }
248
501
  }
249
502
  ),
@@ -268,7 +521,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
268
521
  className: "space-y-2",
269
522
  onSubmit: (e) => {
270
523
  e.preventDefault();
271
- if (url.trim()) void add(() => chunkLIHRGG4M_cjs.importSkillFromUrl(url));
524
+ if (url.trim()) void add(() => chunkCHVCTKF4_cjs.importSkillFromUrl(url));
272
525
  },
273
526
  children: [
274
527
  /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "skills-add-url", children: l.fromLink }),
@@ -380,7 +633,7 @@ function StreamedArtifact({
380
633
  }
381
634
  var STARTING = /* @__PURE__ */ new Set(["pending", "running"]);
382
635
  function formValues(step, inputs) {
383
- const fields = chunkOWCEQKAR_cjs.stepFields(step);
636
+ const fields = chunk6F7SZCVL_cjs.stepFields(step);
384
637
  if (!fields.length) return void 0;
385
638
  if (step.kind === "form")
386
639
  return Object.fromEntries(fields.map((f) => [f.name, inputs[f.name] ?? ""]));
@@ -415,10 +668,10 @@ function useAnswerRetry(missing, refetch) {
415
668
  function useWorkflowThread(workflow, options = {}) {
416
669
  const arbi = react$1.useArbi();
417
670
  const { ensureWorkspaceOpen, status } = chunkKDUGTKVI_cjs.useConnection();
418
- const { wsId } = chunkIE5CUCZK_cjs.useWorkspaceDocs();
671
+ const { wsId } = chunkHDYWXEQU_cjs.useWorkspaceDocs();
419
672
  const [threadId, setThreadId] = react.useState(options.conversationId);
420
673
  const [localInputs, setLocalInputs] = react.useState(
421
- () => chunkOWCEQKAR_cjs.initialRunInputs(workflow, options.initialInputs)
674
+ () => chunk6F7SZCVL_cjs.initialRunInputs(workflow, options.initialInputs)
422
675
  );
423
676
  const [edits, setEdits] = react.useState({});
424
677
  const [localStates, setLocalStates] = react.useState({});
@@ -438,12 +691,12 @@ function useWorkflowThread(workflow, options = {}) {
438
691
  );
439
692
  const conversation = conversations.data?.find((c) => c.external_id === threadId);
440
693
  const steps = react.useMemo(
441
- () => chunkOWCEQKAR_cjs.workflowSteps(workflow).length > 0 ? chunkOWCEQKAR_cjs.workflowSteps(workflow) : chunkLIHRGG4M_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
694
+ () => chunk6F7SZCVL_cjs.workflowSteps(workflow).length > 0 ? chunk6F7SZCVL_cjs.workflowSteps(workflow) : chunkCHVCTKF4_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
442
695
  [workflow, conversation?.plan?.steps]
443
696
  );
444
697
  const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
445
698
  const serverStates = react.useMemo(
446
- () => chunkOWCEQKAR_cjs.stepStatesFromActivity(activity.data ?? []),
699
+ () => chunk6F7SZCVL_cjs.stepStatesFromActivity(activity.data ?? []),
447
700
  [activity.data]
448
701
  );
449
702
  const working = steps.some(
@@ -486,7 +739,7 @@ function useWorkflowThread(workflow, options = {}) {
486
739
  async (values, done) => {
487
740
  await ensureWorkspaceOpen();
488
741
  const created = await createWork.mutateAsync({
489
- title: chunkOWCEQKAR_cjs.runThreadTitle(workflow, values).slice(0, 60),
742
+ title: chunk6F7SZCVL_cjs.runThreadTitle(workflow, values).slice(0, 60),
490
743
  description: workflow.description || null,
491
744
  prompt: null,
492
745
  skill_ref: null,
@@ -498,7 +751,7 @@ function useWorkflowThread(workflow, options = {}) {
498
751
  criteria: [],
499
752
  max_passes: 3,
500
753
  documents: [],
501
- steps: chunkLIHRGG4M_cjs.toPlanSteps(workflow, {
754
+ steps: chunkCHVCTKF4_cjs.toPlanSteps(workflow, {
502
755
  inputs: values,
503
756
  resolveWorkflow: options.resolveWorkflow,
504
757
  compose: options.compose
@@ -585,7 +838,7 @@ function useWorkflowThread(workflow, options = {}) {
585
838
  const anyRunning = Object.values(states).some((s) => s.status === "running");
586
839
  const needsStart = !threadId || idle && !anyRunning;
587
840
  const runError = idle ? conversation?.last_error ?? null : null;
588
- const view = chunkLIHRGG4M_cjs.useWorkflowView({
841
+ const view = chunkCHVCTKF4_cjs.useWorkflowView({
589
842
  steps,
590
843
  states,
591
844
  inputs,
@@ -628,7 +881,7 @@ function WorkflowRunThread({
628
881
  if (listed && activeThreadId !== conversationId) selectThread(conversationId);
629
882
  }, [listed, activeThreadId, conversationId, selectThread]);
630
883
  return /* @__PURE__ */ jsxRuntime.jsx(
631
- chunk7YLJHTDC_cjs.ChatPage,
884
+ chunkEHOPZBAX_cjs.ChatPage,
632
885
  {
633
886
  chat: { ...chat, threads: chat.threads.filter((t) => t.id === conversationId) },
634
887
  singleThread: true,
@@ -666,7 +919,7 @@ function WorkflowSignDialog({
666
919
  const arbi = react$1.useArbi();
667
920
  const { user, ensureWorkspaceOpen } = chunkKDUGTKVI_cjs.useConnection();
668
921
  const tools = documentTools.useOptionalDocumentTools();
669
- const { id, version: stepVersion } = chunkOWCEQKAR_cjs.splitDocRef(docRef);
922
+ const { id, version: stepVersion } = chunk6F7SZCVL_cjs.splitDocRef(docRef);
670
923
  const [version, setVersion] = react.useState(stepVersion);
671
924
  const [pdf, setPdf] = react.useState(null);
672
925
  const [preparing, setPreparing] = react.useState(false);
@@ -744,7 +997,7 @@ function WorkflowWordDialog({
744
997
  onClose,
745
998
  labels
746
999
  }) {
747
- const { id } = chunkOWCEQKAR_cjs.splitDocRef(docRef);
1000
+ const { id } = chunk6F7SZCVL_cjs.splitDocRef(docRef);
748
1001
  return /* @__PURE__ */ jsxRuntime.jsx(
749
1002
  chunkULWRNGGE_cjs.ModalScaffold,
750
1003
  {
@@ -753,7 +1006,7 @@ function WorkflowWordDialog({
753
1006
  title: title ?? labels.wordTitle,
754
1007
  size: "xl",
755
1008
  testId: "workflow-word-dialog",
756
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkC44D4WFG_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
1009
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkHLB4DIYV_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
757
1010
  }
758
1011
  );
759
1012
  }
@@ -893,7 +1146,7 @@ function ConnectedWorkflowRunner({
893
1146
  const dl = { ...DEFAULT_WORKFLOW_RUNNER_DIALOG_LABELS, ...dialogLabels };
894
1147
  const arbi = react$1.useArbi();
895
1148
  const { ensureWorkspaceOpen, user } = chunkKDUGTKVI_cjs.useConnection();
896
- const { wsId } = chunkIE5CUCZK_cjs.useWorkspaceDocs();
1149
+ const { wsId } = chunkHDYWXEQU_cjs.useWorkspaceDocs();
897
1150
  const { data: docs = [], refetch } = react$1.useDocuments(wsId);
898
1151
  const [sending, setSending] = react.useState([]);
899
1152
  const [added, setAdded] = react.useState({});
@@ -916,7 +1169,7 @@ function ConnectedWorkflowRunner({
916
1169
  () => ({
917
1170
  me: user?.externalId,
918
1171
  openDocument: onOpenDocument && ((ref) => {
919
- const { id, version } = chunkOWCEQKAR_cjs.splitDocRef(ref);
1172
+ const { id, version } = chunk6F7SZCVL_cjs.splitDocRef(ref);
920
1173
  onOpenDocument(id, version);
921
1174
  }),
922
1175
  openDraft: onOpenDraft && ((draftId) => onOpenDraft(draftId)),
@@ -926,7 +1179,7 @@ function ConnectedWorkflowRunner({
926
1179
  const w = state.waiting;
927
1180
  if (w?.doc_ext_id) setDialog({ kind: "sign", docRef: w.doc_ext_id });
928
1181
  }),
929
- openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(chunkOWCEQKAR_cjs.splitDocRef(ref).id) ?? "" })),
1182
+ openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(chunk6F7SZCVL_cjs.splitDocRef(ref).id) ?? "" })),
930
1183
  openReview: hostActions?.openReview ?? ((tags, documents) => setDialog({ kind: "review", tags, documents }))
931
1184
  }),
932
1185
  [user?.externalId, onOpenDocument, onOpenDraft, onOpenMessage, hostActions, nameOfDoc, inThread]
@@ -1062,7 +1315,7 @@ function ConnectedWorkflowRunner({
1062
1315
  );
1063
1316
  };
1064
1317
  const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
1065
- chunkLIHRGG4M_cjs.WorkflowRunner,
1318
+ chunkCHVCTKF4_cjs.WorkflowRunner,
1066
1319
  {
1067
1320
  people,
1068
1321
  ...runnerProps,
@@ -1108,10 +1361,10 @@ function ConnectedWorkflowRunner({
1108
1361
  ) }),
1109
1362
  inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1110
1363
  /* @__PURE__ */ jsxRuntime.jsx(
1111
- chunkLIHRGG4M_cjs.WorkflowStepBar,
1364
+ chunkCHVCTKF4_cjs.WorkflowStepBar,
1112
1365
  {
1113
1366
  run: view,
1114
- levels: chunkOWCEQKAR_cjs.stepLevels(view.steps),
1367
+ levels: chunk6F7SZCVL_cjs.stepLevels(view.steps),
1115
1368
  doneTitle: (workflow.run.kind === "steps" ? workflow.run.completion?.title : void 0) ?? runnerProps.labels?.complete ?? "Done",
1116
1369
  icon: (key) => key && runnerProps.renderIcon ? runnerProps.renderIcon(key) : void 0,
1117
1370
  tid: (suffix) => `${testIdPrefix}-${suffix}`
@@ -1131,13 +1384,13 @@ function ConnectedWorkflowRunner({
1131
1384
  return state ? [[s.id, state]] : [];
1132
1385
  })
1133
1386
  );
1134
- const ref = chunkOWCEQKAR_cjs.stepDocuments(view.steps, states, id).at(-1);
1387
+ const ref = chunk6F7SZCVL_cjs.stepDocuments(view.steps, states, id).at(-1);
1135
1388
  const open = actions.openDocument ?? actions.openRedline;
1136
1389
  return {
1137
1390
  title: step.title,
1138
- kind: chunkOWCEQKAR_cjs.stepKindOf(step),
1391
+ kind: chunk6F7SZCVL_cjs.stepKindOf(step),
1139
1392
  phase: view.phaseOf(id),
1140
- document: ref && open ? { name: nameOfDoc(chunkOWCEQKAR_cjs.splitDocRef(ref).id) ?? ref, onOpen: () => open(ref) } : void 0
1393
+ document: ref && open ? { name: nameOfDoc(chunk6F7SZCVL_cjs.splitDocRef(ref).id) ?? ref, onOpen: () => open(ref) } : void 0
1141
1394
  };
1142
1395
  },
1143
1396
  targetMessageId: target,
@@ -1309,7 +1562,7 @@ function ConnectedTagTable({
1309
1562
  const fail = (e) => setError(e instanceof Error ? e.message : String(e));
1310
1563
  const snapshot = (data) => {
1311
1564
  const title = exportTitle ?? KIND_TITLES[kind];
1312
- const bytes = chunkN55UIXVT_cjs.tagTableDocx(data, {
1565
+ const bytes = chunkC3ZRLULA_cjs.tagTableDocx(data, {
1313
1566
  title,
1314
1567
  nameOf: (id) => people.find((p) => p.value === id)?.label
1315
1568
  });
@@ -1319,7 +1572,7 @@ function ConnectedTagTable({
1319
1572
  };
1320
1573
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
1321
1574
  /* @__PURE__ */ jsxRuntime.jsx(
1322
- chunkN55UIXVT_cjs.TagTable,
1575
+ chunkC3ZRLULA_cjs.TagTable,
1323
1576
  {
1324
1577
  ...props,
1325
1578
  table,
@@ -1461,13 +1714,13 @@ function ConnectedProfileCard({
1461
1714
  }
1462
1715
  });
1463
1716
  const display = profile?.fullName || "Unnamed";
1464
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkOR4CO743_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: [
1717
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkAAFX64WD_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: [
1465
1718
  /* @__PURE__ */ jsxRuntime.jsx(
1466
- chunkOR4CO743_cjs.ProfileCard,
1719
+ chunkAAFX64WD_cjs.ProfileCard,
1467
1720
  {
1468
1721
  avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1469
1722
  /* @__PURE__ */ jsxRuntime.jsx(
1470
- chunkOR4CO743_cjs.AvatarPicker,
1723
+ chunkAAFX64WD_cjs.AvatarPicker,
1471
1724
  {
1472
1725
  pictureUrl: profile?.picture,
1473
1726
  initials: chunkKDG6FER6_cjs.initials(display),
@@ -1514,9 +1767,9 @@ function ConnectedIdentityVerification({
1514
1767
  onNameAccepted: () => notify("Name updated to match your ID", "success")
1515
1768
  });
1516
1769
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1517
- /* @__PURE__ */ jsxRuntime.jsx(chunkOR4CO743_cjs.IdentityVerificationCard, { flow, labels, onManageBilling }),
1770
+ /* @__PURE__ */ jsxRuntime.jsx(chunkAAFX64WD_cjs.IdentityVerificationCard, { flow, labels, onManageBilling }),
1518
1771
  /* @__PURE__ */ jsxRuntime.jsx(
1519
- chunkOR4CO743_cjs.IdentityVerificationDialog,
1772
+ chunkAAFX64WD_cjs.IdentityVerificationDialog,
1520
1773
  {
1521
1774
  flow,
1522
1775
  accountName: profile?.fullName ?? "",
@@ -1529,7 +1782,7 @@ function ConnectedIdentityVerification({
1529
1782
  function ConnectedRequireVerified({ children, labels }) {
1530
1783
  const { data: profile } = react$1.useProfile();
1531
1784
  const flow = react$1.useIdentityVerification();
1532
- return /* @__PURE__ */ jsxRuntime.jsx(chunkOR4CO743_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
1785
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkAAFX64WD_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
1533
1786
  }
1534
1787
  function defaultUnmetPasswordRequirement(password) {
1535
1788
  if (password.length < 8) return "Minimum 8 characters";
@@ -1562,7 +1815,7 @@ function ConnectedPasswordChangeDialog({
1562
1815
  onRecoveryComplete
1563
1816
  });
1564
1817
  return /* @__PURE__ */ jsxRuntime.jsx(
1565
- chunkOR4CO743_cjs.PasswordChangeDialog,
1818
+ chunkAAFX64WD_cjs.PasswordChangeDialog,
1566
1819
  {
1567
1820
  open,
1568
1821
  onClose: form.onCancel,
@@ -1588,10 +1841,10 @@ function ConnectedSecuritySection({
1588
1841
  children
1589
1842
  }) {
1590
1843
  const [open, setOpen] = react.useState(false);
1591
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkOR4CO743_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
1592
- /* @__PURE__ */ jsxRuntime.jsxs(chunkOR4CO743_cjs.SettingsCard, { padding: "sm", children: [
1844
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkAAFX64WD_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
1845
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkAAFX64WD_cjs.SettingsCard, { padding: "sm", children: [
1593
1846
  /* @__PURE__ */ jsxRuntime.jsx(
1594
- chunkOR4CO743_cjs.SettingsActionRow,
1847
+ chunkAAFX64WD_cjs.SettingsActionRow,
1595
1848
  {
1596
1849
  title: "Change password",
1597
1850
  description: "Used to sign in and to unlock your account key. Changing it keeps everything readable and re-encrypts nothing.",
@@ -1612,23 +1865,23 @@ function ConnectedSecuritySection({
1612
1865
  ] });
1613
1866
  }
1614
1867
  function ConnectedNotificationPreferences({
1615
- categories = chunkOR4CO743_cjs.EMAIL_NOTIFICATION_CATEGORIES,
1868
+ categories = chunkAAFX64WD_cjs.EMAIL_NOTIFICATION_CATEGORIES,
1616
1869
  title = "Notifications"
1617
1870
  }) {
1618
1871
  const keys = react.useMemo(
1619
- () => categories === chunkOR4CO743_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkOR4CO743_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
1872
+ () => categories === chunkAAFX64WD_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkAAFX64WD_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
1620
1873
  [categories]
1621
1874
  );
1622
1875
  const prefs = react$1.useNotificationPreferences(keys);
1623
- return /* @__PURE__ */ jsxRuntime.jsx(chunkOR4CO743_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkOR4CO743_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
1624
- chunkOR4CO743_cjs.NotificationCategoryList,
1876
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkAAFX64WD_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkAAFX64WD_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
1877
+ chunkAAFX64WD_cjs.NotificationCategoryList,
1625
1878
  {
1626
1879
  masterId: "emailNotifications",
1627
1880
  masterTitle: "Email Notifications",
1628
1881
  masterDescription: "Email me about activity when I\u2019m away",
1629
1882
  masterChecked: prefs.masterChecked,
1630
1883
  onMasterChange: prefs.setAll,
1631
- categories: chunkOR4CO743_cjs.toNotificationCategories(prefs.checked, categories),
1884
+ categories: chunkAAFX64WD_cjs.toNotificationCategories(prefs.checked, categories),
1632
1885
  onCategoryChange: prefs.setCategory
1633
1886
  }
1634
1887
  ) }) });
@@ -1639,14 +1892,14 @@ function ConnectedSessionsRow({ renderSessionIcon }) {
1639
1892
  const sessions = react$1.useSessions({ enabled: open });
1640
1893
  const currentSessionId = react$1.useCurrentSessionId();
1641
1894
  const terminate = react$1.useTerminateSession();
1642
- const views = chunkOR4CO743_cjs.toActiveSessionViews(sessions.data ?? [], {
1895
+ const views = chunkAAFX64WD_cjs.toActiveSessionViews(sessions.data ?? [], {
1643
1896
  currentSessionId,
1644
1897
  terminatingId: terminate.isPending ? terminate.variables : null,
1645
1898
  renderIcon: renderSessionIcon
1646
1899
  });
1647
1900
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1648
1901
  /* @__PURE__ */ jsxRuntime.jsx(
1649
- chunkOR4CO743_cjs.SettingsRow,
1902
+ chunkAAFX64WD_cjs.SettingsRow,
1650
1903
  {
1651
1904
  label: "Active sessions",
1652
1905
  description: "Devices and agents currently signed in to your account.",
@@ -1668,7 +1921,7 @@ function ConnectedSessionsRow({ renderSessionIcon }) {
1668
1921
  }
1669
1922
  ),
1670
1923
  /* @__PURE__ */ jsxRuntime.jsx(
1671
- chunkOR4CO743_cjs.ActiveSessionsDialog,
1924
+ chunkAAFX64WD_cjs.ActiveSessionsDialog,
1672
1925
  {
1673
1926
  open,
1674
1927
  onOpenChange: setOpen,
@@ -1710,7 +1963,7 @@ function ConnectedLogoutDialog({
1710
1963
  signOut.mutate({ everywhere, reason: "manual" });
1711
1964
  };
1712
1965
  return /* @__PURE__ */ jsxRuntime.jsx(
1713
- chunkOR4CO743_cjs.LogoutDialog,
1966
+ chunkAAFX64WD_cjs.LogoutDialog,
1714
1967
  {
1715
1968
  open,
1716
1969
  onClose,
@@ -1718,7 +1971,7 @@ function ConnectedLogoutDialog({
1718
1971
  onLogoutAll: () => void run(true),
1719
1972
  canLogoutAll,
1720
1973
  isOnline,
1721
- sessions: chunkOR4CO743_cjs.toLogoutSessionViews(sessions.data ?? []),
1974
+ sessions: chunkAAFX64WD_cjs.toLogoutSessionViews(sessions.data ?? []),
1722
1975
  renderSessionIcon
1723
1976
  }
1724
1977
  );
@@ -1740,7 +1993,7 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
1740
1993
  });
1741
1994
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1742
1995
  /* @__PURE__ */ jsxRuntime.jsx(
1743
- chunkOR4CO743_cjs.SettingsDangerZone,
1996
+ chunkAAFX64WD_cjs.SettingsDangerZone,
1744
1997
  {
1745
1998
  isOpen: zoneOpen,
1746
1999
  onToggle: () => setZoneOpen((o) => !o),
@@ -1760,12 +2013,12 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
1760
2013
  }
1761
2014
  ),
1762
2015
  /* @__PURE__ */ jsxRuntime.jsx(
1763
- chunkOR4CO743_cjs.DeleteAccountDialog,
2016
+ chunkAAFX64WD_cjs.DeleteAccountDialog,
1764
2017
  {
1765
2018
  open: dialogOpen,
1766
2019
  onClose: flow.onClose,
1767
2020
  step: flow.step,
1768
- blockers: chunkOR4CO743_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
2021
+ blockers: chunkAAFX64WD_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
1769
2022
  onContinue: flow.onContinue,
1770
2023
  onBack: flow.onBack,
1771
2024
  userEmail,
@@ -3460,7 +3713,7 @@ function ConnectedMailbox({
3460
3713
  testIds: { root: "mail-search", input: "mail-filter-input" },
3461
3714
  className: "min-w-28 flex-1 sm:max-w-72",
3462
3715
  filter: /* @__PURE__ */ jsxRuntime.jsx(
3463
- chunkN26CXGXC_cjs.TriStateFilterMenu,
3716
+ chunkRQ2Y7USX_cjs.TriStateFilterMenu,
3464
3717
  {
3465
3718
  testId: "mail-bar-filter-button",
3466
3719
  open: filterMenuOpen,
@@ -3749,7 +4002,7 @@ function ConnectedMailbox({
3749
4002
  }
3750
4003
  ),
3751
4004
  /* @__PURE__ */ jsxRuntime.jsx(
3752
- chunkZAVEMQ37_cjs.ConfirmDialog,
4005
+ chunkDWZXSPMB_cjs.ConfirmDialog,
3753
4006
  {
3754
4007
  isOpen: confirmDelete !== null,
3755
4008
  onClose: () => setConfirmDelete(null),
@@ -3849,7 +4102,7 @@ function ActiveChat({ agentId, workspaceId }) {
3849
4102
  activeArtifact: () => chunkJKB7WT7L_cjs.takeOpenDocumentForTurn({ workspaceId })
3850
4103
  });
3851
4104
  return /* @__PURE__ */ jsxRuntime.jsx(
3852
- chunk7YLJHTDC_cjs.ChatPage,
4105
+ chunkEHOPZBAX_cjs.ChatPage,
3853
4106
  {
3854
4107
  chat: { ...chat, assistantMode: void 0, setAssistantMode: void 0 },
3855
4108
  documentsRequired: false,
@@ -3911,35 +4164,51 @@ function ConnectedAgentChatPanel({
3911
4164
 
3912
4165
  Object.defineProperty(exports, "ConnectedAssistantDock", {
3913
4166
  enumerable: true,
3914
- get: function () { return chunkIE5CUCZK_cjs.ConnectedAssistantDock; }
4167
+ get: function () { return chunkHDYWXEQU_cjs.ConnectedAssistantDock; }
3915
4168
  });
3916
4169
  Object.defineProperty(exports, "redlineStats", {
3917
4170
  enumerable: true,
3918
- get: function () { return chunkIE5CUCZK_cjs.redlineStats; }
4171
+ get: function () { return chunkHDYWXEQU_cjs.redlineStats; }
3919
4172
  });
3920
4173
  Object.defineProperty(exports, "textToArtifact", {
3921
4174
  enumerable: true,
3922
- get: function () { return chunkIE5CUCZK_cjs.textToArtifact; }
4175
+ get: function () { return chunkHDYWXEQU_cjs.textToArtifact; }
3923
4176
  });
3924
4177
  Object.defineProperty(exports, "toRedlineMarkdown", {
3925
4178
  enumerable: true,
3926
- get: function () { return chunkIE5CUCZK_cjs.toRedlineMarkdown; }
4179
+ get: function () { return chunkHDYWXEQU_cjs.toRedlineMarkdown; }
3927
4180
  });
3928
4181
  Object.defineProperty(exports, "useConnectedAiTask", {
3929
4182
  enumerable: true,
3930
- get: function () { return chunkIE5CUCZK_cjs.useConnectedAiTask; }
4183
+ get: function () { return chunkHDYWXEQU_cjs.useConnectedAiTask; }
3931
4184
  });
3932
4185
  Object.defineProperty(exports, "useConnectedChat", {
3933
4186
  enumerable: true,
3934
- get: function () { return chunkIE5CUCZK_cjs.useConnectedChat; }
4187
+ get: function () { return chunkHDYWXEQU_cjs.useConnectedChat; }
3935
4188
  });
3936
4189
  Object.defineProperty(exports, "useSemanticSearch", {
3937
4190
  enumerable: true,
3938
- get: function () { return chunkIE5CUCZK_cjs.useSemanticSearch; }
4191
+ get: function () { return chunkHDYWXEQU_cjs.useSemanticSearch; }
3939
4192
  });
3940
4193
  Object.defineProperty(exports, "useWorkspaceDocs", {
3941
4194
  enumerable: true,
3942
- get: function () { return chunkIE5CUCZK_cjs.useWorkspaceDocs; }
4195
+ get: function () { return chunkHDYWXEQU_cjs.useWorkspaceDocs; }
4196
+ });
4197
+ Object.defineProperty(exports, "ConnectedWorkspaceDataProvider", {
4198
+ enumerable: true,
4199
+ get: function () { return chunkUUHUQHXR_cjs.ConnectedWorkspaceDataProvider; }
4200
+ });
4201
+ Object.defineProperty(exports, "useConnectedConversations", {
4202
+ enumerable: true,
4203
+ get: function () { return chunkUUHUQHXR_cjs.useConnectedConversations; }
4204
+ });
4205
+ Object.defineProperty(exports, "useConnectedDocuments", {
4206
+ enumerable: true,
4207
+ get: function () { return chunkUUHUQHXR_cjs.useConnectedDocuments; }
4208
+ });
4209
+ Object.defineProperty(exports, "useConnectedTags", {
4210
+ enumerable: true,
4211
+ get: function () { return chunkUUHUQHXR_cjs.useConnectedTags; }
3943
4212
  });
3944
4213
  Object.defineProperty(exports, "ConnectionProvider", {
3945
4214
  enumerable: true,
@@ -3981,17 +4250,25 @@ exports.ConnectedSkillUpload = ConnectedSkillUpload;
3981
4250
  exports.ConnectedTagTable = ConnectedTagTable;
3982
4251
  exports.ConnectedTaskAccessRequest = ConnectedTaskAccessRequest;
3983
4252
  exports.ConnectedThreadFollow = ConnectedThreadFollow;
4253
+ exports.ConnectedWorkflowDocumentsField = ConnectedWorkflowDocumentsField;
4254
+ exports.ConnectedWorkflowLauncher = ConnectedWorkflowLauncher;
3984
4255
  exports.ConnectedWorkflowRunner = ConnectedWorkflowRunner;
4256
+ exports.ConnectedWorkflowsTable = ConnectedWorkflowsTable;
3985
4257
  exports.ConnectedWorkspaceActivity = ConnectedWorkspaceActivity;
3986
4258
  exports.ConnectedWorkspaceNotificationMenu = ConnectedWorkspaceNotificationMenu;
3987
4259
  exports.DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS = DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS;
4260
+ exports.DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS = DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS;
3988
4261
  exports.DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS = DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS;
3989
4262
  exports.StreamedArtifact = StreamedArtifact;
3990
4263
  exports.WorkflowRunThread = WorkflowRunThread;
3991
4264
  exports.defaultUnmetPasswordRequirement = defaultUnmetPasswordRequirement;
3992
4265
  exports.resolveMailbox = resolveMailbox;
4266
+ exports.toWorkflowFieldDocument = toWorkflowFieldDocument;
4267
+ exports.useConnectedAgentOptions = useConnectedAgentOptions;
3993
4268
  exports.useConnectedDocxNotifications = useConnectedDocxNotifications;
3994
4269
  exports.useConnectedShellWorkspaces = useConnectedShellWorkspaces;
3995
4270
  exports.useConnectedWorkNotifications = useConnectedWorkNotifications;
4271
+ exports.useConnectedWorkflowScopeSource = useConnectedWorkflowScopeSource;
4272
+ exports.useConnectedWorkspaceRole = useConnectedWorkspaceRole;
3996
4273
  //# sourceMappingURL=index.cjs.map
3997
4274
  //# sourceMappingURL=index.cjs.map