@arbidocs/blocks 0.5.142 → 0.5.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 (193) hide show
  1. package/dist/{ConnectedCallDock-ZNS5BS2R.cjs → ConnectedCallDock-FHKM7MAL.cjs} +28 -28
  2. package/dist/{ConnectedCallDock-ZNS5BS2R.cjs.map → ConnectedCallDock-FHKM7MAL.cjs.map} +1 -1
  3. package/dist/{ConnectedCallRoom-ACNVSFH7.cjs → ConnectedCallRoom-QNMZJMLB.cjs} +21 -21
  4. package/dist/{ConnectedCallRoom-ACNVSFH7.cjs.map → ConnectedCallRoom-QNMZJMLB.cjs.map} +1 -1
  5. package/dist/{ConnectedNativeDocxComparison-KZIMMOOL.cjs → ConnectedNativeDocxComparison-SWY7327V.cjs} +16 -16
  6. package/dist/{ConnectedNativeDocxComparison-KZIMMOOL.cjs.map → ConnectedNativeDocxComparison-SWY7327V.cjs.map} +1 -1
  7. package/dist/{ConnectedPresentation-3JXN6SRT.cjs → ConnectedPresentation-XPMQQ3E2.cjs} +17 -17
  8. package/dist/{ConnectedPresentation-3JXN6SRT.cjs.map → ConnectedPresentation-XPMQQ3E2.cjs.map} +1 -1
  9. package/dist/{ConnectedProductionSetDialog-EOWZQ6J3.cjs → ConnectedProductionSetDialog-GM5D7IUG.cjs} +3 -3
  10. package/dist/{ConnectedProductionSetDialog-EOWZQ6J3.cjs.map → ConnectedProductionSetDialog-GM5D7IUG.cjs.map} +1 -1
  11. package/dist/{ConnectedSlidesTab-IECS2MJI.cjs → ConnectedSlidesTab-OOTWJBDV.cjs} +15 -15
  12. package/dist/{ConnectedSlidesTab-IECS2MJI.cjs.map → ConnectedSlidesTab-OOTWJBDV.cjs.map} +1 -1
  13. package/dist/{ConnectedStreamedWordArtifact-2FUCYULO.cjs → ConnectedStreamedWordArtifact-TU5GEHEV.cjs} +16 -16
  14. package/dist/{ConnectedStreamedWordArtifact-2FUCYULO.cjs.map → ConnectedStreamedWordArtifact-TU5GEHEV.cjs.map} +1 -1
  15. package/dist/{DocumentReviewCard-ENCPTGJE.cjs → DocumentReviewCard-BCWIW7PU.cjs} +15 -15
  16. package/dist/{DocumentReviewCard-ENCPTGJE.cjs.map → DocumentReviewCard-BCWIW7PU.cjs.map} +1 -1
  17. package/dist/{FilesViewerDialog-4CVIX3PD.cjs → FilesViewerDialog-UX7LNBJI.cjs} +46 -46
  18. package/dist/{FilesViewerDialog-4CVIX3PD.cjs.map → FilesViewerDialog-UX7LNBJI.cjs.map} +1 -1
  19. package/dist/{WorkspaceTableView-2RH33X3U.cjs → WorkspaceTableView-NW3ANGBX.cjs} +8 -8
  20. package/dist/{WorkspaceTableView-2RH33X3U.cjs.map → WorkspaceTableView-NW3ANGBX.cjs.map} +1 -1
  21. package/dist/agents/index.cjs +407 -407
  22. package/dist/agents/workflows/StepParts.js +3 -0
  23. package/dist/agents/workflows/StepParts.js.map +2 -2
  24. package/dist/agents/workflows/WorkflowStepAction.d.ts +3 -1
  25. package/dist/agents/workflows/WorkflowStepAction.js +24 -3
  26. package/dist/agents/workflows/WorkflowStepAction.js.map +2 -2
  27. package/dist/agents/workflows/planSteps.js +24 -0
  28. package/dist/agents/workflows/planSteps.js.map +2 -2
  29. package/dist/agents/workflows/run.d.ts +1 -1
  30. package/dist/agents/workflows/run.js +9 -1
  31. package/dist/agents/workflows/run.js.map +2 -2
  32. package/dist/agents/workflows/stepKinds.d.ts +2 -1
  33. package/dist/agents/workflows/stepKinds.js +7 -4
  34. package/dist/agents/workflows/stepKinds.js.map +2 -2
  35. package/dist/agents/workflows/types.d.ts +22 -1
  36. package/dist/agents/workflows/types.js.map +1 -1
  37. package/dist/agents/workflows/useWorkflowView.js +13 -2
  38. package/dist/agents/workflows/useWorkflowView.js.map +3 -3
  39. package/dist/{ai-QEXZ4SYR.cjs → ai-T2BDBHI3.cjs} +31 -31
  40. package/dist/ai-T2BDBHI3.cjs.map +1 -0
  41. package/dist/calls/index.cjs +121 -121
  42. package/dist/chat/index.cjs +59 -59
  43. package/dist/{chunk-6CGMSJLB.cjs → chunk-2Q32RXY2.cjs} +16 -16
  44. package/dist/{chunk-6CGMSJLB.cjs.map → chunk-2Q32RXY2.cjs.map} +1 -1
  45. package/dist/{chunk-DGAGSP5G.cjs → chunk-2V5HW6T5.cjs} +6 -6
  46. package/dist/{chunk-DGAGSP5G.cjs.map → chunk-2V5HW6T5.cjs.map} +1 -1
  47. package/dist/{chunk-F6CEPWIF.cjs → chunk-5RMVFFVW.cjs} +7 -7
  48. package/dist/{chunk-F6CEPWIF.cjs.map → chunk-5RMVFFVW.cjs.map} +1 -1
  49. package/dist/{chunk-MSJGEZHL.cjs → chunk-6RJXO2NF.cjs} +6 -6
  50. package/dist/{chunk-MSJGEZHL.cjs.map → chunk-6RJXO2NF.cjs.map} +1 -1
  51. package/dist/{chunk-OOHBXCDV.cjs → chunk-6TU4YLFW.cjs} +18 -18
  52. package/dist/{chunk-OOHBXCDV.cjs.map → chunk-6TU4YLFW.cjs.map} +1 -1
  53. package/dist/{chunk-5A6T4W46.cjs → chunk-7D4WXUBS.cjs} +7 -7
  54. package/dist/{chunk-5A6T4W46.cjs.map → chunk-7D4WXUBS.cjs.map} +1 -1
  55. package/dist/{chunk-VCDD763Y.cjs → chunk-7HU2NQVO.cjs} +3 -3
  56. package/dist/{chunk-VCDD763Y.cjs.map → chunk-7HU2NQVO.cjs.map} +1 -1
  57. package/dist/{chunk-56Z6CQC6.cjs → chunk-7KEB3VZ5.cjs} +4 -4
  58. package/dist/{chunk-56Z6CQC6.cjs.map → chunk-7KEB3VZ5.cjs.map} +1 -1
  59. package/dist/{chunk-NRRX3TYV.cjs → chunk-AJTHOVCM.cjs} +64 -64
  60. package/dist/{chunk-NRRX3TYV.cjs.map → chunk-AJTHOVCM.cjs.map} +1 -1
  61. package/dist/{chunk-R7VF2UFA.cjs → chunk-ANFDJIJP.cjs} +4 -4
  62. package/dist/{chunk-R7VF2UFA.cjs.map → chunk-ANFDJIJP.cjs.map} +1 -1
  63. package/dist/{chunk-PIYYBPHH.cjs → chunk-BCRB42SP.cjs} +56 -5
  64. package/dist/chunk-BCRB42SP.cjs.map +1 -0
  65. package/dist/{chunk-RSQGDXAF.cjs → chunk-BSZ45U3F.cjs} +12 -12
  66. package/dist/{chunk-RSQGDXAF.cjs.map → chunk-BSZ45U3F.cjs.map} +1 -1
  67. package/dist/{chunk-KP7BQIZL.cjs → chunk-BT2QTDZ4.cjs} +35 -35
  68. package/dist/{chunk-KP7BQIZL.cjs.map → chunk-BT2QTDZ4.cjs.map} +1 -1
  69. package/dist/{chunk-X46QYO4S.cjs → chunk-BXLY2UQM.cjs} +9 -9
  70. package/dist/{chunk-X46QYO4S.cjs.map → chunk-BXLY2UQM.cjs.map} +1 -1
  71. package/dist/{chunk-QW6NCUR7.cjs → chunk-DH5NOQCU.cjs} +5 -5
  72. package/dist/{chunk-QW6NCUR7.cjs.map → chunk-DH5NOQCU.cjs.map} +1 -1
  73. package/dist/{chunk-IFJBE7M5.cjs → chunk-EY23TOPI.cjs} +11 -11
  74. package/dist/{chunk-IFJBE7M5.cjs.map → chunk-EY23TOPI.cjs.map} +1 -1
  75. package/dist/{chunk-TOYKBRAU.cjs → chunk-F47B75LV.cjs} +27 -27
  76. package/dist/{chunk-TOYKBRAU.cjs.map → chunk-F47B75LV.cjs.map} +1 -1
  77. package/dist/{chunk-UWTCK5IN.cjs → chunk-F7IBUDD5.cjs} +8 -8
  78. package/dist/{chunk-UWTCK5IN.cjs.map → chunk-F7IBUDD5.cjs.map} +1 -1
  79. package/dist/{chunk-R5NTEW4L.cjs → chunk-FM46VQ5D.cjs} +149 -114
  80. package/dist/chunk-FM46VQ5D.cjs.map +1 -0
  81. package/dist/{chunk-QFXOTJ6G.cjs → chunk-FWD4WSGR.cjs} +38 -14
  82. package/dist/chunk-FWD4WSGR.cjs.map +1 -0
  83. package/dist/{chunk-33GOYI3O.cjs → chunk-FYNNNQ6H.cjs} +4 -4
  84. package/dist/{chunk-33GOYI3O.cjs.map → chunk-FYNNNQ6H.cjs.map} +1 -1
  85. package/dist/{chunk-VF26CUE3.cjs → chunk-HG72AVXX.cjs} +3 -3
  86. package/dist/{chunk-VF26CUE3.cjs.map → chunk-HG72AVXX.cjs.map} +1 -1
  87. package/dist/{chunk-EQTZQD66.cjs → chunk-I2LJ7RZ2.cjs} +17 -9
  88. package/dist/chunk-I2LJ7RZ2.cjs.map +1 -0
  89. package/dist/{chunk-ACDMGTHX.cjs → chunk-JDQIZFDO.cjs} +7 -7
  90. package/dist/{chunk-ACDMGTHX.cjs.map → chunk-JDQIZFDO.cjs.map} +1 -1
  91. package/dist/{chunk-ZTHYJP4G.cjs → chunk-JXSSR6T3.cjs} +10 -10
  92. package/dist/{chunk-ZTHYJP4G.cjs.map → chunk-JXSSR6T3.cjs.map} +1 -1
  93. package/dist/{chunk-MBXXWTKT.cjs → chunk-JXZM5ODS.cjs} +28 -28
  94. package/dist/{chunk-MBXXWTKT.cjs.map → chunk-JXZM5ODS.cjs.map} +1 -1
  95. package/dist/{chunk-VL7ZX4KQ.cjs → chunk-KMOIE2XH.cjs} +12 -9
  96. package/dist/chunk-KMOIE2XH.cjs.map +1 -0
  97. package/dist/{chunk-UD56Y6UA.cjs → chunk-LYDPVFNS.cjs} +4 -4
  98. package/dist/{chunk-UD56Y6UA.cjs.map → chunk-LYDPVFNS.cjs.map} +1 -1
  99. package/dist/{chunk-ECSOXKJQ.cjs → chunk-N5UI363Q.cjs} +3 -3
  100. package/dist/{chunk-ECSOXKJQ.cjs.map → chunk-N5UI363Q.cjs.map} +1 -1
  101. package/dist/{chunk-ZPIZINH2.cjs → chunk-N7B5OAI5.cjs} +4 -4
  102. package/dist/{chunk-ZPIZINH2.cjs.map → chunk-N7B5OAI5.cjs.map} +1 -1
  103. package/dist/{chunk-MEYQLQWS.cjs → chunk-NM2WDBXH.cjs} +17 -17
  104. package/dist/{chunk-MEYQLQWS.cjs.map → chunk-NM2WDBXH.cjs.map} +1 -1
  105. package/dist/{chunk-N3H3YAKY.cjs → chunk-PQQA34ZR.cjs} +4 -4
  106. package/dist/{chunk-N3H3YAKY.cjs.map → chunk-PQQA34ZR.cjs.map} +1 -1
  107. package/dist/{chunk-OOW7H2YD.cjs → chunk-PWGHCEJK.cjs} +6 -6
  108. package/dist/{chunk-OOW7H2YD.cjs.map → chunk-PWGHCEJK.cjs.map} +1 -1
  109. package/dist/{chunk-UVP5RJWA.cjs → chunk-Q67V6O4R.cjs} +110 -110
  110. package/dist/{chunk-UVP5RJWA.cjs.map → chunk-Q67V6O4R.cjs.map} +1 -1
  111. package/dist/{chunk-EYXU32D7.cjs → chunk-Q77OKXYM.cjs} +6 -6
  112. package/dist/{chunk-EYXU32D7.cjs.map → chunk-Q77OKXYM.cjs.map} +1 -1
  113. package/dist/{chunk-U6XMZG6G.cjs → chunk-RDBUQCAS.cjs} +3 -3
  114. package/dist/{chunk-U6XMZG6G.cjs.map → chunk-RDBUQCAS.cjs.map} +1 -1
  115. package/dist/{chunk-JJZOL5MG.cjs → chunk-RYVZDFVO.cjs} +3 -3
  116. package/dist/{chunk-JJZOL5MG.cjs.map → chunk-RYVZDFVO.cjs.map} +1 -1
  117. package/dist/{chunk-GG7QKDV5.cjs → chunk-SDSK7RWP.cjs} +11 -11
  118. package/dist/{chunk-GG7QKDV5.cjs.map → chunk-SDSK7RWP.cjs.map} +1 -1
  119. package/dist/{chunk-ORQXGMCC.cjs → chunk-SJTLHWFC.cjs} +18 -18
  120. package/dist/{chunk-ORQXGMCC.cjs.map → chunk-SJTLHWFC.cjs.map} +1 -1
  121. package/dist/{chunk-SK6LFIU2.cjs → chunk-TIBTTITZ.cjs} +3 -3
  122. package/dist/{chunk-SK6LFIU2.cjs.map → chunk-TIBTTITZ.cjs.map} +1 -1
  123. package/dist/{chunk-JN5YMHGI.cjs → chunk-XPQR2PJX.cjs} +2 -2
  124. package/dist/chunk-XPQR2PJX.cjs.map +1 -0
  125. package/dist/{chunk-LFMOQALU.cjs → chunk-YQRACWAS.cjs} +54 -54
  126. package/dist/{chunk-LFMOQALU.cjs.map → chunk-YQRACWAS.cjs.map} +1 -1
  127. package/dist/{chunk-VZUXTF3U.cjs → chunk-ZCSX5SMV.cjs} +88 -83
  128. package/dist/chunk-ZCSX5SMV.cjs.map +1 -0
  129. package/dist/{chunk-TXBXIUTX.cjs → chunk-ZJS2BM7D.cjs} +6 -6
  130. package/dist/{chunk-TXBXIUTX.cjs.map → chunk-ZJS2BM7D.cjs.map} +1 -1
  131. package/dist/connect/docx.cjs +19 -19
  132. package/dist/connect/index.cjs +1095 -1048
  133. package/dist/connect/index.cjs.map +1 -1
  134. package/dist/connect/viewer.cjs +33 -33
  135. package/dist/connection/ConnectedWorkflowBuilder.js +8 -0
  136. package/dist/connection/ConnectedWorkflowBuilder.js.map +2 -2
  137. package/dist/connection/billing/StripeCheckoutModal.js +1 -1
  138. package/dist/connection/billing/StripeCheckoutModal.js.map +2 -2
  139. package/dist/connection/databases/ConnectedDatabasesPage.js +50 -8
  140. package/dist/connection/databases/ConnectedDatabasesPage.js.map +2 -2
  141. package/dist/connection/notification-center/useOpenNotificationTarget.d.ts +2 -0
  142. package/dist/connection/notification-center/useOpenNotificationTarget.js +11 -2
  143. package/dist/connection/notification-center/useOpenNotificationTarget.js.map +2 -2
  144. package/dist/connection/tasks/ConnectedThreadTaskBar.js +9 -2
  145. package/dist/connection/tasks/ConnectedThreadTaskBar.js.map +2 -2
  146. package/dist/connection/workspace-list/useConnectedWorkspaceList.d.ts +2 -2
  147. package/dist/dashboards/index.cjs +1 -1
  148. package/dist/databases/DatabaseColumnDialog.d.ts +13 -0
  149. package/dist/databases/DatabaseColumnDialog.js +38 -1
  150. package/dist/databases/DatabaseColumnDialog.js.map +2 -2
  151. package/dist/databases/DatabaseRowDetail.d.ts +6 -1
  152. package/dist/databases/DatabaseRowDetail.js +15 -1
  153. package/dist/databases/DatabaseRowDetail.js.map +2 -2
  154. package/dist/databases/column-types.d.ts +14 -0
  155. package/dist/databases/column-types.js.map +2 -2
  156. package/dist/databases/databaseColumns.js +1 -1
  157. package/dist/databases/databaseColumns.js.map +2 -2
  158. package/dist/databases/index.cjs +48 -48
  159. package/dist/embed/index.cjs +40 -40
  160. package/dist/files/index.cjs +224 -224
  161. package/dist/index.cjs +1727 -1727
  162. package/dist/office/index.cjs +5 -5
  163. package/dist/settings/index.cjs +146 -146
  164. package/dist/shell/index.cjs +87 -87
  165. package/dist/studio/index.cjs +29 -29
  166. package/dist/styles.css +1 -1
  167. package/dist/workflow-canvas/StepActionSettings.d.ts +25 -1
  168. package/dist/workflow-canvas/StepActionSettings.js +113 -1
  169. package/dist/workflow-canvas/StepActionSettings.js.map +2 -2
  170. package/dist/workflow-canvas/StepInspector.d.ts +5 -3
  171. package/dist/workflow-canvas/StepInspector.js +14 -1
  172. package/dist/workflow-canvas/StepInspector.js.map +2 -2
  173. package/dist/workflow-canvas/WorkflowBuilder.d.ts +4 -2
  174. package/dist/workflow-canvas/WorkflowBuilder.js +8 -2
  175. package/dist/workflow-canvas/WorkflowBuilder.js.map +2 -2
  176. package/dist/workflow-canvas/WorkflowCanvas.d.ts +4 -0
  177. package/dist/workflow-canvas/WorkflowCanvas.js +5 -1
  178. package/dist/workflow-canvas/WorkflowCanvas.js.map +2 -2
  179. package/dist/workflow-canvas/edit.js +19 -1
  180. package/dist/workflow-canvas/edit.js.map +2 -2
  181. package/dist/workflow-canvas/index.cjs +256 -100
  182. package/dist/workflow-canvas/index.cjs.map +1 -1
  183. package/node_modules/@arbidocs/coedit/package.json +1 -1
  184. package/package.json +5 -5
  185. package/src/blocks.css +3 -0
  186. package/dist/ai-QEXZ4SYR.cjs.map +0 -1
  187. package/dist/chunk-EQTZQD66.cjs.map +0 -1
  188. package/dist/chunk-JN5YMHGI.cjs.map +0 -1
  189. package/dist/chunk-PIYYBPHH.cjs.map +0 -1
  190. package/dist/chunk-QFXOTJ6G.cjs.map +0 -1
  191. package/dist/chunk-R5NTEW4L.cjs.map +0 -1
  192. package/dist/chunk-VL7ZX4KQ.cjs.map +0 -1
  193. package/dist/chunk-VZUXTF3U.cjs.map +0 -1
@@ -2,29 +2,29 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkCYN66TBO_cjs = require('./chunk-CYN66TBO.cjs');
5
- var chunkQFXOTJ6G_cjs = require('./chunk-QFXOTJ6G.cjs');
5
+ var chunkFWD4WSGR_cjs = require('./chunk-FWD4WSGR.cjs');
6
6
  var chunkI4IS6ST6_cjs = require('./chunk-I4IS6ST6.cjs');
7
- var chunk5A6T4W46_cjs = require('./chunk-5A6T4W46.cjs');
7
+ var chunk7D4WXUBS_cjs = require('./chunk-7D4WXUBS.cjs');
8
+ var chunkIN6ILI5A_cjs = require('./chunk-IN6ILI5A.cjs');
9
+ var chunkKMOIE2XH_cjs = require('./chunk-KMOIE2XH.cjs');
8
10
  var chunkOYXWQTHF_cjs = require('./chunk-OYXWQTHF.cjs');
9
11
  var chunkS237ORM3_cjs = require('./chunk-S237ORM3.cjs');
10
12
  var chunkII2OEXHW_cjs = require('./chunk-II2OEXHW.cjs');
11
- var chunkJJZOL5MG_cjs = require('./chunk-JJZOL5MG.cjs');
13
+ var chunkFX3K6LNZ_cjs = require('./chunk-FX3K6LNZ.cjs');
14
+ var chunkRYVZDFVO_cjs = require('./chunk-RYVZDFVO.cjs');
12
15
  var chunk3YEXZX4H_cjs = require('./chunk-3YEXZX4H.cjs');
13
- var chunkRSQGDXAF_cjs = require('./chunk-RSQGDXAF.cjs');
16
+ var chunkBSZ45U3F_cjs = require('./chunk-BSZ45U3F.cjs');
14
17
  var chunkAHDJXIUB_cjs = require('./chunk-AHDJXIUB.cjs');
18
+ var chunkS5OGPQSB_cjs = require('./chunk-S5OGPQSB.cjs');
15
19
  var chunkRL2HI6NP_cjs = require('./chunk-RL2HI6NP.cjs');
16
20
  var chunk6UZC4XVV_cjs = require('./chunk-6UZC4XVV.cjs');
17
- var chunkS5OGPQSB_cjs = require('./chunk-S5OGPQSB.cjs');
21
+ var chunkI2LJ7RZ2_cjs = require('./chunk-I2LJ7RZ2.cjs');
22
+ var chunkXPQR2PJX_cjs = require('./chunk-XPQR2PJX.cjs');
18
23
  var chunkOUGRCQM7_cjs = require('./chunk-OUGRCQM7.cjs');
24
+ var chunkIPSHAMO2_cjs = require('./chunk-IPSHAMO2.cjs');
19
25
  var chunkZVEW3JBT_cjs = require('./chunk-ZVEW3JBT.cjs');
20
26
  var chunkSJSGSHIT_cjs = require('./chunk-SJSGSHIT.cjs');
21
27
  var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
22
- var chunkIN6ILI5A_cjs = require('./chunk-IN6ILI5A.cjs');
23
- var chunkVL7ZX4KQ_cjs = require('./chunk-VL7ZX4KQ.cjs');
24
- var chunkFX3K6LNZ_cjs = require('./chunk-FX3K6LNZ.cjs');
25
- var chunkEQTZQD66_cjs = require('./chunk-EQTZQD66.cjs');
26
- var chunkJN5YMHGI_cjs = require('./chunk-JN5YMHGI.cjs');
27
- var chunkIPSHAMO2_cjs = require('./chunk-IPSHAMO2.cjs');
28
28
  var chunkLIKDQBNJ_cjs = require('./chunk-LIKDQBNJ.cjs');
29
29
  var chunkYZBDHBKI_cjs = require('./chunk-YZBDHBKI.cjs');
30
30
  var chunkCVPV4I7Z_cjs = require('./chunk-CVPV4I7Z.cjs');
@@ -60,7 +60,7 @@ function resolveScopeInputs(workflow, inputs, scopeSource) {
60
60
  for (const field of workflow.inputs) {
61
61
  if (field.type !== "scope") continue;
62
62
  const raw = inputs[field.name];
63
- const scope = chunkJN5YMHGI_cjs.isWorkflowScope(raw) ? raw : { folders: [], labels: [] };
63
+ const scope = chunkXPQR2PJX_cjs.isWorkflowScope(raw) ? raw : { folders: [], labels: [] };
64
64
  next[field.name] = { ...scope, documents: scopeSource.resolveDocuments(scope) };
65
65
  }
66
66
  return next;
@@ -82,7 +82,7 @@ function workflowToSkillMarkdown(workflow) {
82
82
  if (workflow.landing !== "chat") lines.push(`landing: ${workflow.landing}`);
83
83
  if (workflow.requiresFiles) lines.push("requires_files: true");
84
84
  if (workflow.inputs.length > 0) {
85
- lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(chunkJN5YMHGI_cjs.fieldToFrontmatter))}`);
85
+ lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(chunkXPQR2PJX_cjs.fieldToFrontmatter))}`);
86
86
  }
87
87
  lines.push("---", "", run.promptTemplate.trim(), "");
88
88
  return lines.join("\n");
@@ -104,12 +104,12 @@ function workflowFromSkillMarkdown(id, text) {
104
104
  } else if (value === "true" || value === "false") frontmatter[key] = value === "true";
105
105
  else frontmatter[key] = value;
106
106
  }
107
- return chunkJN5YMHGI_cjs.workflowFromFrontmatter(id, frontmatter, body);
107
+ return chunkXPQR2PJX_cjs.workflowFromFrontmatter(id, frontmatter, body);
108
108
  }
109
109
  var errorMessage = (e) => e instanceof Error ? e.message : typeof e === "string" ? e : "Something went wrong.";
110
110
  function firstOpen(steps, states) {
111
111
  const open = steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? "pending"));
112
- return open?.id ?? (steps.length && chunkEQTZQD66_cjs.isRunFinished(steps, states) ? null : steps[0]?.id ?? null);
112
+ return open?.id ?? (steps.length && chunkI2LJ7RZ2_cjs.isRunFinished(steps, states) ? null : steps[0]?.id ?? null);
113
113
  }
114
114
  function useWorkflowView(options) {
115
115
  const { steps, states, inputs, setInput, loaded = true } = options;
@@ -125,6 +125,17 @@ function useWorkflowView(options) {
125
125
  placed.current = true;
126
126
  setCurrent(firstOpen(steps, states));
127
127
  }, [steps, states, loaded]);
128
+ const open = loaded ? firstOpen(steps, states) : null;
129
+ const lastOpen = react.useRef(open);
130
+ react.useEffect(() => {
131
+ if (open === lastOpen.current) return;
132
+ lastOpen.current = open;
133
+ const at = (id) => steps.findIndex((s) => s.id === id);
134
+ if (open && at(open) < at(current)) {
135
+ setShowErrors(false);
136
+ setCurrent(open);
137
+ }
138
+ }, [open, current, steps]);
128
139
  const step = steps.find((s) => s.id === current);
129
140
  const following = react.useCallback(
130
141
  (id) => {
@@ -137,8 +148,8 @@ function useWorkflowView(options) {
137
148
  (id) => {
138
149
  const { steps: s, states: st } = optionsRef.current;
139
150
  const i = s.findIndex((x) => x.id === id);
140
- const open = s.slice(i + 1).find((x) => !["done", "skipped"].includes(st[x.id]?.status ?? "pending"));
141
- return open?.id ?? following(id);
151
+ const open2 = s.slice(i + 1).find((x) => !["done", "skipped"].includes(st[x.id]?.status ?? "pending"));
152
+ return open2?.id ?? following(id);
142
153
  },
143
154
  [following]
144
155
  );
@@ -149,11 +160,11 @@ function useWorkflowView(options) {
149
160
  }),
150
161
  []
151
162
  );
152
- const action = busy ? "wait" : chunkEQTZQD66_cjs.nextAction(steps, states, current, actionOptions(options));
163
+ const action = busy ? "wait" : chunkI2LJ7RZ2_cjs.nextAction(steps, states, current, actionOptions(options));
153
164
  const next = react.useCallback(async () => {
154
165
  const { steps: s, states: st, inputs: values } = optionsRef.current;
155
166
  const at = s.find((x) => x.id === current);
156
- const act2 = chunkEQTZQD66_cjs.nextAction(s, st, current, actionOptions(optionsRef.current));
167
+ const act2 = chunkI2LJ7RZ2_cjs.nextAction(s, st, current, actionOptions(optionsRef.current));
157
168
  if (!at || act2 === "wait" || busy) return;
158
169
  setActionError(null);
159
170
  if (act2 === "finish") return setCurrent(null);
@@ -164,7 +175,7 @@ function useWorkflowView(options) {
164
175
  await (act2 === "start" ? optionsRef.current.start?.() : optionsRef.current.retry?.(at.id));
165
176
  return;
166
177
  }
167
- if (Object.keys(chunkEQTZQD66_cjs.validateStep(at, values)).length > 0) {
178
+ if (Object.keys(chunkI2LJ7RZ2_cjs.validateStep(at, values)).length > 0) {
168
179
  setShowErrors(true);
169
180
  return;
170
181
  }
@@ -265,10 +276,10 @@ function useWorkflowView(options) {
265
276
  inputs,
266
277
  setInput,
267
278
  stateOf: (id) => states[id],
268
- phaseOf: (id) => chunkEQTZQD66_cjs.stepPhase(steps, states, id),
269
- failedUpstreamOf: (id) => chunkEQTZQD66_cjs.failedUpstream(steps, states, id),
279
+ phaseOf: (id) => chunkI2LJ7RZ2_cjs.stepPhase(steps, states, id),
280
+ failedUpstreamOf: (id) => chunkI2LJ7RZ2_cjs.failedUpstream(steps, states, id),
270
281
  isLocked,
271
- errors: showErrors && step && !isLocked(step.id) ? chunkEQTZQD66_cjs.validateStep(step, inputs) : {},
282
+ errors: showErrors && step && !isLocked(step.id) ? chunkI2LJ7RZ2_cjs.validateStep(step, inputs) : {},
272
283
  busy,
273
284
  actionError,
274
285
  isRunning: Object.values(states).some((s) => s.status === "running"),
@@ -286,11 +297,11 @@ function useWorkflowView(options) {
286
297
  nameOf: options.nameOf,
287
298
  assigneeOf: (id) => {
288
299
  const s = steps.find((x) => x.id === id);
289
- if (!s || !chunkEQTZQD66_cjs.canAssign(s)) return void 0;
290
- return chunkEQTZQD66_cjs.assigneeName(s.assignee, {
300
+ if (!s || !chunkI2LJ7RZ2_cjs.canAssign(s)) return void 0;
301
+ return chunkI2LJ7RZ2_cjs.assigneeName(s.assignee, {
291
302
  nameOf: options.nameOf,
292
303
  inputs,
293
- fields: chunkEQTZQD66_cjs.runFieldsOf(steps),
304
+ fields: chunkI2LJ7RZ2_cjs.runFieldsOf(steps),
294
305
  announcedTo: states[id]?.announcedTo
295
306
  });
296
307
  },
@@ -496,7 +507,7 @@ function StepBarFrame({
496
507
  phase === "blocked" && "opacity-60"
497
508
  ),
498
509
  "aria-hidden": true,
499
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkVL7ZX4KQ_cjs.StepBadgeMark, { phase, icon: icon?.(s) })
510
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkKMOIE2XH_cjs.StepBadgeMark, { phase, icon: icon?.(s) })
500
511
  }
501
512
  ),
502
513
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", title: s.title, children: s.title }),
@@ -610,7 +621,7 @@ function StepBarFrame({
610
621
  phase: kind === "working" ? "running" : "failed",
611
622
  className: "min-w-0 shrink",
612
623
  children: /* @__PURE__ */ jsxRuntime.jsx(
613
- chunkVL7ZX4KQ_cjs.StepChip,
624
+ chunkKMOIE2XH_cjs.StepChip,
614
625
  {
615
626
  kind: kindOf(s),
616
627
  phase: kind === "working" ? "running" : "failed",
@@ -784,7 +795,7 @@ var DEFAULT_WORKFLOW_STEP_PARTS_LABELS = {
784
795
  someone: "someone"
785
796
  };
786
797
  var docName = (ref, nameOfDoc) => {
787
- const { id, version } = chunkEQTZQD66_cjs.splitDocRef(ref);
798
+ const { id, version } = chunkI2LJ7RZ2_cjs.splitDocRef(ref);
788
799
  const name = nameOfDoc?.(id) ?? id;
789
800
  return version ? `${name} \xB7 v${version}` : name;
790
801
  };
@@ -866,7 +877,7 @@ function SendBackControl({
866
877
  const states = Object.fromEntries(
867
878
  run.steps.map((s) => [s.id, run.stateOf(s.id) ?? { status: "pending" }])
868
879
  );
869
- const targets = chunkEQTZQD66_cjs.sendBackTargets(run.steps, states, step.id);
880
+ const targets = chunkI2LJ7RZ2_cjs.sendBackTargets(run.steps, states, step.id);
870
881
  const [open, setOpen] = react.useState(false);
871
882
  const [to, setTo] = react.useState(targets[0]?.id ?? "");
872
883
  const [note, setNote] = react.useState("");
@@ -956,7 +967,7 @@ function ApprovalEvidence({
956
967
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex flex-wrap items-center gap-1.5 text-sm font-medium", children: [
957
968
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "size-4 text-primary" }),
958
969
  approver ? l.approvedBy.replace("{name}", approver) : null,
959
- state.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground", children: l.approvedAt.replace("{date}", chunkVL7ZX4KQ_cjs.formatDate(state.at)) })
970
+ state.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground", children: l.approvedAt.replace("{date}", chunkKMOIE2XH_cjs.formatDate(state.at)) })
960
971
  ] }),
961
972
  evidence.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
962
973
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: l.approvedWhat }),
@@ -989,7 +1000,7 @@ function ApprovalEvidence({
989
1000
  ] }),
990
1001
  (step.fields ?? []).length > 0 && /* @__PURE__ */ jsxRuntime.jsx("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 text-xs", children: (step.fields ?? []).map((f) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "contents", children: [
991
1002
  /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: f.label }),
992
- /* @__PURE__ */ jsxRuntime.jsx("dd", { "data-testid": `${testId}-evidence-field-${f.name}`, children: chunkVL7ZX4KQ_cjs.shownValue(run.inputs[f.name], f, run.nameOf) })
1003
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { "data-testid": `${testId}-evidence-field-${f.name}`, children: chunkKMOIE2XH_cjs.shownValue(run.inputs[f.name], f, run.nameOf) })
993
1004
  ] }, f.name)) })
994
1005
  ] });
995
1006
  }
@@ -1085,7 +1096,7 @@ function ActionStepBody({
1085
1096
  waiting?.expires_at && phase === "waiting" && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
1086
1097
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "size-3.5" }),
1087
1098
  " ",
1088
- l.expires.replace("{date}", chunkVL7ZX4KQ_cjs.formatDate(waiting.expires_at))
1099
+ l.expires.replace("{date}", chunkKMOIE2XH_cjs.formatDate(waiting.expires_at))
1089
1100
  ] }),
1090
1101
  phase === "waiting" && mine && !declining && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-2", children: [
1091
1102
  actions?.sign && state && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1164,7 +1175,7 @@ function ActionStepBody({
1164
1175
  ] });
1165
1176
  } else if (a.type === "email_draft") {
1166
1177
  const draftId = state?.waiting?.draft_id ?? (typeof state?.output?.draft_id === "string" ? state.output.draft_id : void 0);
1167
- const gmailUrl = chunkJN5YMHGI_cjs.gmailDraftUrl(state?.waiting);
1178
+ const gmailUrl = chunkXPQR2PJX_cjs.gmailDraftUrl(state?.waiting);
1168
1179
  body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1169
1180
  underWay && working(l.preparingDraft),
1170
1181
  phase === "waiting" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: gmailUrl ? l.draftReadyInGmail : l.draftReady }),
@@ -1201,6 +1212,9 @@ function ActionStepBody({
1201
1212
  }
1202
1213
  ))
1203
1214
  ] });
1215
+ } else if (a.type === "approval") {
1216
+ const decided = state?.output?.decision;
1217
+ body = /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", "data-testid": `${testId}-approval`, children: phase === "done" ? `Decided: ${decided ?? "approved"}` : phase === "waiting" || underWay ? "Waiting for a decision on the request" : "Submits a request for approval" });
1204
1218
  } else {
1205
1219
  const tags = state?.output?.tag_ext_ids ?? a.tags;
1206
1220
  const docs = state?.output?.doc_ext_ids ?? [];
@@ -1257,7 +1271,7 @@ function WorkflowStepBar({
1257
1271
  const name = `${title} (${l.phases[phase]})`;
1258
1272
  if (s.id === DONE)
1259
1273
  return /* @__PURE__ */ jsxRuntime.jsx(
1260
- chunkVL7ZX4KQ_cjs.StepChip,
1274
+ chunkKMOIE2XH_cjs.StepChip,
1261
1275
  {
1262
1276
  inert: true,
1263
1277
  kind: "start",
@@ -1271,17 +1285,17 @@ function WorkflowStepBar({
1271
1285
  "data-testid": tid("step-done")
1272
1286
  }
1273
1287
  );
1274
- const kind = chunkVL7ZX4KQ_cjs.stepKindOf(s);
1275
- const KindIcon = chunkVL7ZX4KQ_cjs.STEP_KIND_ICONS[kind];
1288
+ const kind = chunkKMOIE2XH_cjs.stepKindOf(s);
1289
+ const KindIcon = chunkKMOIE2XH_cjs.STEP_KIND_ICONS[kind];
1276
1290
  return /* @__PURE__ */ jsxRuntime.jsx(
1277
- chunkVL7ZX4KQ_cjs.StepChip,
1291
+ chunkKMOIE2XH_cjs.StepChip,
1278
1292
  {
1279
1293
  kind,
1280
1294
  phase,
1281
1295
  icon: icon(s.icon) ?? /* @__PURE__ */ jsxRuntime.jsx(KindIcon, {}),
1282
1296
  label: s.title,
1283
1297
  current: isCurrent,
1284
- heading: chunkVL7ZX4KQ_cjs.DEFAULT_STEP_KIND_LABELS[kind],
1298
+ heading: chunkKMOIE2XH_cjs.DEFAULT_STEP_KIND_LABELS[kind],
1285
1299
  labelClassName: isCurrent ? STEP_LABEL_CURRENT : ui.cn(STEP_LABEL, STEP_LABEL_MAX),
1286
1300
  labelTestId: tid(`step-${s.id}-label`),
1287
1301
  onClick: () => run.goTo(s.id),
@@ -1314,7 +1328,7 @@ function WorkflowStepBar({
1314
1328
  isSelectable: (id) => id !== DONE,
1315
1329
  renderStep: (s) => pill(s),
1316
1330
  icon: (s) => s.id === DONE ? doneIcon : icon(s.icon),
1317
- kindOf: (s) => s.id === DONE ? "start" : chunkVL7ZX4KQ_cjs.stepKindOf(s),
1331
+ kindOf: (s) => s.id === DONE ? "start" : chunkKMOIE2XH_cjs.stepKindOf(s),
1318
1332
  disabled: run.busy,
1319
1333
  labels,
1320
1334
  tid,
@@ -1393,7 +1407,7 @@ function WorkflowRunner({
1393
1407
  const { steps, step, isComplete, action } = run;
1394
1408
  const completion = workflow.run.kind === "steps" ? workflow.run.completion : void 0;
1395
1409
  const tid = (suffix) => `${testIdPrefix}-${suffix}`;
1396
- const levels = chunkEQTZQD66_cjs.stepLevels(steps);
1410
+ const levels = chunkI2LJ7RZ2_cjs.stepLevels(steps);
1397
1411
  const icon = (key) => key && renderIcon ? renderIcon(key) : void 0;
1398
1412
  const added = step?.kind === "upload" ? (files ?? []).filter((f) => f.addedFor === step.id) : [];
1399
1413
  const unread = added.filter((f) => f.status === "processing").length;
@@ -1401,7 +1415,7 @@ function WorkflowRunner({
1401
1415
  const sending = added.filter((f) => f.status === "uploading").length;
1402
1416
  const unsent = added.filter((f) => f.status === "upload-failed").length;
1403
1417
  const uploadHold = step?.kind === "upload" && (sending > 0 || uploading || unsent > 0);
1404
- const docsWait = !!step && chunkEQTZQD66_cjs.waitingDocuments(run.stateOf(step.id)).length > 0;
1418
+ const docsWait = !!step && chunkI2LJ7RZ2_cjs.waitingDocuments(run.stateOf(step.id)).length > 0;
1405
1419
  const nextLabel = sending ? sending === 1 ? l.uploadingFile : l.uploadingFiles.replace("{count}", String(sending)) : uploadHold && uploading ? l.uploadingAny : uploadHold ? unsent === 1 ? l.uploadFailed : l.uploadsFailed.replace("{count}", String(unsent)) : reading ? l.readingFiles.replace("{current}", String(Math.min(added.length - unread + 1, added.length))).replace("{count}", String(added.length)) : action === "start" ? l.start : action === "retry" ? l.retry : action === "finish" ? l.finish : action === "complete" && step?.kind === "review" ? l.approve : action === "complete" && step?.kind === "action" ? l.markSent : action === "wait" && (run.isRunning || run.busy || docsWait) ? l.working : (step && !run.isLocked(step.id) ? step.nextLabel : void 0) ?? l.next;
1406
1420
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn(compact ? "space-y-3" : "space-y-6", className), "data-testid": testIdPrefix, children: [
1407
1421
  !hideStepBar && /* @__PURE__ */ jsxRuntime.jsx(
@@ -1433,13 +1447,13 @@ function WorkflowRunner({
1433
1447
  /* @__PURE__ */ jsxRuntime.jsx(StepNotices, { run, step, l, tid }),
1434
1448
  run.phaseOf(step.id) === "blocked" ? /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { className: ui.cn(box, "p-6"), "data-testid": tid(step.id), children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", "data-testid": tid(`${step.id}-blocked`), children: l.blocked.replace(
1435
1449
  "{steps}",
1436
- chunkEQTZQD66_cjs.stepDependencies(steps, step.id).map((d) => steps.find((s) => s.id === d)?.title ?? d).join(", ")
1450
+ chunkI2LJ7RZ2_cjs.stepDependencies(steps, step.id).map((d) => steps.find((s) => s.id === d)?.title ?? d).join(", ")
1437
1451
  ) }) }) : step.kind === "form" ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { className: ui.cn(box, "space-y-4"), "data-testid": tid(step.id), children: [
1438
1452
  /* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon: icon(step.icon), testId: tid(`${step.id}-title`) }),
1439
1453
  /* @__PURE__ */ jsxRuntime.jsx(SentBackNote, { state: run.stateOf(step.id), l: pl, testId: tid(step.id) }),
1440
1454
  /* @__PURE__ */ jsxRuntime.jsx(AssigneeLine, { run, stepId: step.id, l: pl, testId: tid(step.id) }),
1441
1455
  /* @__PURE__ */ jsxRuntime.jsx("fieldset", { disabled: run.isLocked(step.id), className: "contents", children: /* @__PURE__ */ jsxRuntime.jsx(
1442
- chunkRSQGDXAF_cjs.SchemaForm,
1456
+ chunkBSZ45U3F_cjs.SchemaForm,
1443
1457
  {
1444
1458
  fields: step.inputs,
1445
1459
  values: run.inputs,
@@ -1485,11 +1499,11 @@ function WorkflowRunner({
1485
1499
  ] }) : step.kind === "review" ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { className: ui.cn(box, "space-y-4"), "data-testid": tid(step.id), children: [
1486
1500
  /* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon: icon(step.icon) }),
1487
1501
  /* @__PURE__ */ jsxRuntime.jsx(SentBackNote, { state: run.stateOf(step.id), l: pl, testId: tid(step.id) }),
1488
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-line text-sm text-muted-foreground", children: chunkEQTZQD66_cjs.reviewInstructions(step, run.inputs) }),
1502
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-line text-sm text-muted-foreground", children: chunkI2LJ7RZ2_cjs.reviewInstructions(step, run.inputs) }),
1489
1503
  /* @__PURE__ */ jsxRuntime.jsx(AssigneeLine, { run, stepId: step.id, l: pl, testId: tid(step.id) }),
1490
1504
  !(run.phaseOf(step.id) === "done" && run.stateOf(step.id)?.by) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm", "data-testid": tid(`${step.id}-status`), children: run.phaseOf(step.id) === "done" ? l.approved : run.phaseOf(step.id) === "skipped" ? l.skipped : l.awaitingReview }),
1491
1505
  (step.fields ?? []).length > 0 && run.phaseOf(step.id) === "ready" && /* @__PURE__ */ jsxRuntime.jsx(
1492
- chunkRSQGDXAF_cjs.SchemaForm,
1506
+ chunkBSZ45U3F_cjs.SchemaForm,
1493
1507
  {
1494
1508
  fields: step.fields ?? [],
1495
1509
  values: run.inputs,
@@ -1746,8 +1760,8 @@ function AgentStepBody({
1746
1760
  }) {
1747
1761
  const state = run.stateOf(step.id);
1748
1762
  const phase = run.phaseOf(step.id);
1749
- const pending = chunkEQTZQD66_cjs.waitingDocuments(state);
1750
- const pendingNames = pending.flatMap((ref) => nameOfDoc?.(chunkEQTZQD66_cjs.splitDocRef(ref).id) ?? []);
1763
+ const pending = chunkI2LJ7RZ2_cjs.waitingDocuments(state);
1764
+ const pendingNames = pending.flatMap((ref) => nameOfDoc?.(chunkI2LJ7RZ2_cjs.splitDocRef(ref).id) ?? []);
1751
1765
  const header = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
1752
1766
  /* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon }),
1753
1767
  phase === "failed" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: run.retry && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1830,7 +1844,7 @@ function StepNotices({
1830
1844
  l,
1831
1845
  tid
1832
1846
  }) {
1833
- const notStarted = !chunkEQTZQD66_cjs.isPersonStep(step) && run.needsStart && run.phaseOf(step.id) === "ready";
1847
+ const notStarted = !chunkI2LJ7RZ2_cjs.isPersonStep(step) && run.needsStart && run.phaseOf(step.id) === "ready";
1834
1848
  const failed = run.failedUpstreamOf(step.id);
1835
1849
  if (!notStarted && failed.length === 0) return null;
1836
1850
  const why = (error) => error ? `: ${error}` : "";
@@ -1886,7 +1900,7 @@ var asForm = (step) => ({
1886
1900
  id: step.id,
1887
1901
  title: step.title,
1888
1902
  description: "",
1889
- inputs: chunkEQTZQD66_cjs.stepFields(step),
1903
+ inputs: chunkI2LJ7RZ2_cjs.stepFields(step),
1890
1904
  run: { kind: "operation" },
1891
1905
  landing: "chat"
1892
1906
  });
@@ -1904,7 +1918,8 @@ function WorkflowStepAction({
1904
1918
  onDecline,
1905
1919
  onOpenDocument,
1906
1920
  onOpenDraft,
1907
- onOpenReview
1921
+ onOpenReview,
1922
+ onOpenRequest
1908
1923
  }) {
1909
1924
  if (step.kind === "upload" && phase === "ready" && onUpload)
1910
1925
  return /* @__PURE__ */ jsxRuntime.jsx(UploadStepAction, { step, onUpload, onComplete });
@@ -1912,7 +1927,7 @@ function WorkflowStepAction({
1912
1927
  StepAction,
1913
1928
  {
1914
1929
  ...{ step, phase, steps, states, inputs, me, nameOf, onComplete, onSendBack, onDecline },
1915
- ...{ onOpenDocument, onOpenDraft, onOpenReview }
1930
+ ...{ onOpenDocument, onOpenDraft, onOpenReview, onOpenRequest }
1916
1931
  }
1917
1932
  );
1918
1933
  }
@@ -2059,15 +2074,16 @@ function StepAction({
2059
2074
  onDecline,
2060
2075
  onOpenDocument,
2061
2076
  onOpenDraft,
2062
- onOpenReview
2077
+ onOpenReview,
2078
+ onOpenRequest
2063
2079
  }) {
2064
- const fields = chunkEQTZQD66_cjs.stepFields(step);
2080
+ const fields = chunkI2LJ7RZ2_cjs.stepFields(step);
2065
2081
  const [values, setValues] = react.useState(
2066
- () => fields.length ? { ...chunkJN5YMHGI_cjs.defaultInputs(asForm(step)), ...inputs } : {}
2082
+ () => fields.length ? { ...chunkXPQR2PJX_cjs.defaultInputs(asForm(step)), ...inputs } : {}
2067
2083
  );
2068
2084
  const [open, setOpen] = react.useState(null);
2069
2085
  const [note, setNote] = react.useState("");
2070
- const targets = chunkEQTZQD66_cjs.sendBackTargets(steps, states, step.id);
2086
+ const targets = chunkI2LJ7RZ2_cjs.sendBackTargets(steps, states, step.id);
2071
2087
  const [to, setTo] = react.useState(targets[0]?.id ?? "");
2072
2088
  const [busy, setBusy] = react.useState(false);
2073
2089
  const [error, setError] = react.useState(null);
@@ -2104,7 +2120,7 @@ function StepAction({
2104
2120
  const waiting = state?.waiting;
2105
2121
  if (phase !== "waiting") return null;
2106
2122
  if (step.action.type === "email_draft") {
2107
- const gmailUrl = chunkJN5YMHGI_cjs.gmailDraftUrl(waiting);
2123
+ const gmailUrl = chunkXPQR2PJX_cjs.gmailDraftUrl(waiting);
2108
2124
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 p-1", "data-testid": tid, children: [
2109
2125
  gmailUrl ? /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", variant: "outline", className: "w-full", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
2110
2126
  "a",
@@ -2140,6 +2156,25 @@ function StepAction({
2140
2156
  errorLine
2141
2157
  ] });
2142
2158
  }
2159
+ if (step.action.type === "approval") {
2160
+ const approvers = waiting?.approvers ?? [];
2161
+ const database = waiting?.database;
2162
+ const row = waiting?.row;
2163
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 p-1", "data-testid": tid, children: [
2164
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Waiting for a decision from" }),
2165
+ approvers.map((id) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs", "data-testid": `${tid}-approver-${id}`, children: nameOf?.(id) ?? id }, id)),
2166
+ database && row && onOpenRequest && /* @__PURE__ */ jsxRuntime.jsx(
2167
+ ui.Button,
2168
+ {
2169
+ size: "sm",
2170
+ className: "w-full",
2171
+ onClick: () => onOpenRequest(database, row),
2172
+ "data-testid": `${tid}-open-request`,
2173
+ children: me && approvers.includes(me) ? "Open and decide" : "Open the request"
2174
+ }
2175
+ )
2176
+ ] });
2177
+ }
2143
2178
  if (step.action.type === "sign") {
2144
2179
  const signers = waiting?.signers ?? [];
2145
2180
  const signed = waiting?.signed ?? [];
@@ -2247,10 +2282,10 @@ function StepAction({
2247
2282
  ] });
2248
2283
  }
2249
2284
  if (fields.length && open === "form") {
2250
- const errors = chunkJN5YMHGI_cjs.validateInputs(asForm(step), values);
2285
+ const errors = chunkXPQR2PJX_cjs.validateInputs(asForm(step), values);
2251
2286
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 p-1", "data-testid": tid, children: [
2252
2287
  /* @__PURE__ */ jsxRuntime.jsx(
2253
- chunkRSQGDXAF_cjs.SchemaForm,
2288
+ chunkBSZ45U3F_cjs.SchemaForm,
2254
2289
  {
2255
2290
  fields,
2256
2291
  values,
@@ -2318,7 +2353,7 @@ function requiredLabelsOf(workflow) {
2318
2353
  return workflow.requiredLabels ?? [];
2319
2354
  }
2320
2355
  function unresolvedLabelRefs(workflow, ids = {}) {
2321
- return chunkEQTZQD66_cjs.workflowSteps(workflow).flatMap(
2356
+ return chunkI2LJ7RZ2_cjs.workflowSteps(workflow).flatMap(
2322
2357
  (step) => step.kind === "action" && step.action.type === "tabular_review" ? step.action.tags.filter((t) => {
2323
2358
  const key = labelRefKey(t);
2324
2359
  return key !== void 0 && !ids[key];
@@ -3830,7 +3865,7 @@ var SKILL_FIELD_TYPE_LABELS = {
3830
3865
  person: "A person"
3831
3866
  };
3832
3867
  function buildLibrarySkills(builtins, listings) {
3833
- const { host, skills } = chunkJN5YMHGI_cjs.mergeSkillWorkflows(builtins, listings);
3868
+ const { host, skills } = chunkXPQR2PJX_cjs.mergeSkillWorkflows(builtins, listings);
3834
3869
  const builtinIds = new Set(builtins.map((w) => w.id));
3835
3870
  const stored = new Map(listings.filter((s) => s.doc_ext_id).map((s) => [s.slug, s]));
3836
3871
  return [...host, ...skills].flatMap((workflow) => {
@@ -4457,16 +4492,16 @@ var DEFAULT_RECURRENCE_BUILDER_LABELS = {
4457
4492
  var pad2 = (n) => String(n).padStart(2, "0");
4458
4493
  function RecurrenceBuilder({ rrule, onChange, testIds, labels }) {
4459
4494
  const l = { ...DEFAULT_RECURRENCE_BUILDER_LABELS, ...labels };
4460
- const [advanced, setAdvanced] = react.useState(() => !!rrule && chunkQFXOTJ6G_cjs.parseRRule(rrule) === null);
4495
+ const [advanced, setAdvanced] = react.useState(() => !!rrule && chunkFWD4WSGR_cjs.parseRRule(rrule) === null);
4461
4496
  const [preset, setPreset] = react.useState(
4462
- () => chunkQFXOTJ6G_cjs.parseRRule(rrule) ?? chunkQFXOTJ6G_cjs.DEFAULT_RECURRENCE
4497
+ () => chunkFWD4WSGR_cjs.parseRRule(rrule) ?? chunkFWD4WSGR_cjs.DEFAULT_RECURRENCE
4463
4498
  );
4464
4499
  react.useEffect(() => {
4465
- if (!rrule) onChange(chunkQFXOTJ6G_cjs.buildRRule(chunkQFXOTJ6G_cjs.DEFAULT_RECURRENCE));
4500
+ if (!rrule) onChange(chunkFWD4WSGR_cjs.buildRRule(chunkFWD4WSGR_cjs.DEFAULT_RECURRENCE));
4466
4501
  }, []);
4467
4502
  const update = (next) => {
4468
4503
  setPreset(next);
4469
- onChange(chunkQFXOTJ6G_cjs.buildRRule(next));
4504
+ onChange(chunkFWD4WSGR_cjs.buildRRule(next));
4470
4505
  };
4471
4506
  const toggleWeekday = (day) => {
4472
4507
  const has = preset.weekdays.includes(day);
@@ -4496,9 +4531,9 @@ function RecurrenceBuilder({ rrule, onChange, testIds, labels }) {
4496
4531
  type: "button",
4497
4532
  className: "text-sm text-muted-foreground hover:text-foreground",
4498
4533
  onClick: () => {
4499
- const parsed = chunkQFXOTJ6G_cjs.parseRRule(rrule);
4500
- setPreset(parsed ?? chunkQFXOTJ6G_cjs.DEFAULT_RECURRENCE);
4501
- if (!parsed) onChange(chunkQFXOTJ6G_cjs.buildRRule(chunkQFXOTJ6G_cjs.DEFAULT_RECURRENCE));
4534
+ const parsed = chunkFWD4WSGR_cjs.parseRRule(rrule);
4535
+ setPreset(parsed ?? chunkFWD4WSGR_cjs.DEFAULT_RECURRENCE);
4536
+ if (!parsed) onChange(chunkFWD4WSGR_cjs.buildRRule(chunkFWD4WSGR_cjs.DEFAULT_RECURRENCE));
4502
4537
  setAdvanced(false);
4503
4538
  },
4504
4539
  "data-testid": chunkPLIF5CUV_cjs.testIdOr(testIds?.simple, { testId: "task-recurrence-simple" }),
@@ -4576,7 +4611,7 @@ function RecurrenceBuilder({ rrule, onChange, testIds, labels }) {
4576
4611
  ] }),
4577
4612
  preset.frequency === "weekly" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
4578
4613
  /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { children: l.on }),
4579
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1", children: chunkQFXOTJ6G_cjs.WEEKDAYS.map((day) => /* @__PURE__ */ jsxRuntime.jsx(
4614
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1", children: chunkFWD4WSGR_cjs.WEEKDAYS.map((day) => /* @__PURE__ */ jsxRuntime.jsx(
4580
4615
  ui.Button,
4581
4616
  {
4582
4617
  type: "button",
@@ -5329,7 +5364,7 @@ function TaskTable(props) {
5329
5364
  isMe: mine
5330
5365
  };
5331
5366
  };
5332
- const renderPerson = (person) => /* @__PURE__ */ jsxRuntime.jsx(chunkJJZOL5MG_cjs.PersonPill, { person });
5367
+ const renderPerson = (person) => /* @__PURE__ */ jsxRuntime.jsx(chunkRYVZDFVO_cjs.PersonPill, { person });
5333
5368
  const q = (query.trim() || (props.filterText ?? "").trim()).toLowerCase();
5334
5369
  const counts = react.useMemo(() => {
5335
5370
  const map = new Map(STATUS_ORDER.map((s) => [s, 0]));
@@ -6011,7 +6046,7 @@ function ConversationListView(p) {
6011
6046
  }
6012
6047
  ),
6013
6048
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0", children: liveProps.current.renderThread ? liveProps.current.renderThread(data) : /* @__PURE__ */ jsxRuntime.jsx(
6014
- chunkQFXOTJ6G_cjs.EntityChip,
6049
+ chunkFWD4WSGR_cjs.EntityChip,
6015
6050
  {
6016
6051
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquare, { className: "size-4", "aria-hidden": true }),
6017
6052
  label: data.title?.trim() || "Untitled thread",
@@ -6380,13 +6415,13 @@ function NewThreadDialog({
6380
6415
  ...labels
6381
6416
  };
6382
6417
  const seed = react.useMemo(
6383
- () => ({ ...chunk5A6T4W46_cjs.EMPTY_NEW_THREAD, ...initialValues }),
6418
+ () => ({ ...chunk7D4WXUBS_cjs.EMPTY_NEW_THREAD, ...initialValues }),
6384
6419
  // Seeded once per open.
6385
6420
  // eslint-disable-next-line react-hooks/exhaustive-deps
6386
6421
  [open]
6387
6422
  );
6388
6423
  const [values, setValues] = react.useState(seed);
6389
- const [detailsOpen, setDetailsOpen] = react.useState(chunk5A6T4W46_cjs.hasTaskFields(seed));
6424
+ const [detailsOpen, setDetailsOpen] = react.useState(chunk7D4WXUBS_cjs.hasTaskFields(seed));
6390
6425
  const [submitError, setSubmitError] = react.useState(null);
6391
6426
  const id = chunkPLIF5CUV_cjs.testIdOr(testId, { testId: "new-thread" });
6392
6427
  const set = (key, value) => setValues((v) => ({ ...v, [key]: value }));
@@ -6419,7 +6454,7 @@ function NewThreadDialog({
6419
6454
  setSubmitError(null);
6420
6455
  try {
6421
6456
  await onSubmit(values);
6422
- setValues(chunk5A6T4W46_cjs.EMPTY_NEW_THREAD);
6457
+ setValues(chunk7D4WXUBS_cjs.EMPTY_NEW_THREAD);
6423
6458
  setDetailsOpen(false);
6424
6459
  } catch (error) {
6425
6460
  setSubmitError(error instanceof Error ? error.message : "Could not create the thread");
@@ -6667,12 +6702,12 @@ function taskActivityHeadline(e, labels = DEFAULT_TASK_ACTIVITY_LABELS, agentNam
6667
6702
  case "step_skipped":
6668
6703
  return "Step skipped";
6669
6704
  case "step_waiting": {
6670
- const documents = chunkEQTZQD66_cjs.eventWaitingDocuments(detail);
6671
- return documents ? chunkEQTZQD66_cjs.waitingForDocumentsText(documents.length) : "Waiting on people";
6705
+ const documents = chunkI2LJ7RZ2_cjs.eventWaitingDocuments(detail);
6706
+ return documents ? chunkI2LJ7RZ2_cjs.waitingForDocumentsText(documents.length) : "Waiting on people";
6672
6707
  }
6673
6708
  case "step_progress": {
6674
- const documents = chunkEQTZQD66_cjs.eventWaitingDocuments(detail);
6675
- return documents ? chunkEQTZQD66_cjs.waitingForDocumentsText(documents.length) : detail.signed ? "Signed" : "Step moved on";
6709
+ const documents = chunkI2LJ7RZ2_cjs.eventWaitingDocuments(detail);
6710
+ return documents ? chunkI2LJ7RZ2_cjs.waitingForDocumentsText(documents.length) : detail.signed ? "Signed" : "Step moved on";
6676
6711
  }
6677
6712
  case "step_sent_back":
6678
6713
  return "Sent the work back";
@@ -6827,10 +6862,10 @@ function WorkflowRunStatus({
6827
6862
  testId = "workflow-run-status"
6828
6863
  }) {
6829
6864
  const l = { ...DEFAULT_WORKFLOW_RUN_STATUS_LABELS, ...labels };
6830
- const ordered = chunkEQTZQD66_cjs.stepLevels(steps).flat();
6831
- const phaseOf = (id) => isLoading ? "blocked" : chunkEQTZQD66_cjs.stepPhase(steps, states, id);
6832
- const finished = !isLoading && chunkEQTZQD66_cjs.isRunFinished(steps, states);
6833
- const atId = finished || isLoading ? void 0 : activeStepId(chunkEQTZQD66_cjs.stepLevels(steps), phaseOf);
6865
+ const ordered = chunkI2LJ7RZ2_cjs.stepLevels(steps).flat();
6866
+ const phaseOf = (id) => isLoading ? "blocked" : chunkI2LJ7RZ2_cjs.stepPhase(steps, states, id);
6867
+ const finished = !isLoading && chunkI2LJ7RZ2_cjs.isRunFinished(steps, states);
6868
+ const atId = finished || isLoading ? void 0 : activeStepId(chunkI2LJ7RZ2_cjs.stepLevels(steps), phaseOf);
6834
6869
  const at = ordered.find((s) => s.id === atId);
6835
6870
  const phase = at ? phaseOf(at.id) : "done";
6836
6871
  const assignee = at && ["ready", "waiting"].includes(phase) ? assigneeOf?.(at) : void 0;
@@ -6862,7 +6897,7 @@ function WorkflowRunStatus({
6862
6897
  "span",
6863
6898
  {
6864
6899
  className: ui.cn(
6865
- `wf-kind-${chunkVL7ZX4KQ_cjs.stepKindOf(s)}`,
6900
+ `wf-kind-${chunkKMOIE2XH_cjs.stepKindOf(s)}`,
6866
6901
  "h-1.5 w-3 shrink-0 rounded-full",
6867
6902
  SEGMENT[phaseOf(s.id)],
6868
6903
  s.id === atId && "w-5"
@@ -6908,7 +6943,7 @@ function groupThreadActivity(steps, items) {
6908
6943
  continue;
6909
6944
  }
6910
6945
  if (current === void 0) out.before.push(item);
6911
- else if (chunkEQTZQD66_cjs.isRunFinished(steps, states)) out.after.push(item);
6946
+ else if (chunkI2LJ7RZ2_cjs.isRunFinished(steps, states)) out.after.push(item);
6912
6947
  else {
6913
6948
  const status = states[current]?.status;
6914
6949
  const at = status === "done" || status === "skipped" ? steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? ""))?.id ?? current : current;
@@ -6931,9 +6966,9 @@ var DEFAULT_WORKFLOW_THREAD_STRIP_LABELS = {
6931
6966
  after: "After",
6932
6967
  beforeSteps: "Before the first step",
6933
6968
  afterSteps: "After the last step",
6934
- kinds: chunkVL7ZX4KQ_cjs.DEFAULT_STEP_KIND_LABELS,
6935
- documents: chunkVL7ZX4KQ_cjs.DEFAULT_STEP_DOCUMENT_LABELS,
6936
- record: chunkVL7ZX4KQ_cjs.DEFAULT_STEP_RECORD_LABELS
6969
+ kinds: chunkKMOIE2XH_cjs.DEFAULT_STEP_KIND_LABELS,
6970
+ documents: chunkKMOIE2XH_cjs.DEFAULT_STEP_DOCUMENT_LABELS,
6971
+ record: chunkKMOIE2XH_cjs.DEFAULT_STEP_RECORD_LABELS
6937
6972
  };
6938
6973
  function WorkflowThreadStartedBy({
6939
6974
  origin,
@@ -7064,7 +7099,7 @@ function EntriesChip({
7064
7099
  const latest = items.at(-1);
7065
7100
  return /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
7066
7101
  /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
7067
- chunkVL7ZX4KQ_cjs.StepChip,
7102
+ chunkKMOIE2XH_cjs.StepChip,
7068
7103
  {
7069
7104
  kind,
7070
7105
  phase: "ready",
@@ -7116,17 +7151,17 @@ function WorkflowThreadStrip({
7116
7151
  onSelectStep?.(id);
7117
7152
  };
7118
7153
  const [open, setOpen] = react.useState(null);
7119
- const phaseOf = (id) => chunkEQTZQD66_cjs.stepPhase(steps, states, id);
7154
+ const phaseOf = (id) => chunkI2LJ7RZ2_cjs.stepPhase(steps, states, id);
7120
7155
  const iconOf = (step) => step.icon && renderIcon ? renderIcon(step.icon) : void 0;
7121
7156
  const glyphOf = (step) => {
7122
- const KindIcon = chunkVL7ZX4KQ_cjs.STEP_KIND_ICONS[chunkVL7ZX4KQ_cjs.stepKindOf(step)];
7157
+ const KindIcon = chunkKMOIE2XH_cjs.STEP_KIND_ICONS[chunkKMOIE2XH_cjs.stepKindOf(step)];
7123
7158
  return iconOf(step) ?? /* @__PURE__ */ jsxRuntime.jsx(KindIcon, {});
7124
7159
  };
7125
7160
  const waitingOf = (id) => {
7126
7161
  const step = steps.find((s) => s.id === id);
7127
7162
  const phase = phaseOf(id);
7128
- const documents = chunkEQTZQD66_cjs.waitingDocuments(states[id]);
7129
- if (documents.length) return chunkEQTZQD66_cjs.waitingForDocumentsText(documents.length);
7163
+ const documents = chunkI2LJ7RZ2_cjs.waitingDocuments(states[id]);
7164
+ if (documents.length) return chunkI2LJ7RZ2_cjs.waitingForDocumentsText(documents.length);
7130
7165
  const name = step && (phase === "ready" || phase === "waiting") ? assigneeOf?.(step) : void 0;
7131
7166
  return name ? l.waitingFor.replace("{name}", name) : void 0;
7132
7167
  };
@@ -7136,8 +7171,8 @@ function WorkflowThreadStrip({
7136
7171
  const assignee = phase === "ready" || phase === "waiting" ? assigneeOf?.(step) : void 0;
7137
7172
  const waiting = waitingOf(step.id);
7138
7173
  const sentBack = states[step.id]?.sentBack;
7139
- const kind = chunkVL7ZX4KQ_cjs.stepKindOf(step);
7140
- const documents = chunkVL7ZX4KQ_cjs.stepDocuments(steps, states, step.id);
7174
+ const kind = chunkKMOIE2XH_cjs.stepKindOf(step);
7175
+ const documents = chunkKMOIE2XH_cjs.stepDocuments(steps, states, step.id);
7141
7176
  const latestDoc = onOpenDocument ? documents.at(-1) : void 0;
7142
7177
  const finished = ["done", "skipped", "failed"].includes(phase);
7143
7178
  const chip = /* @__PURE__ */ jsxRuntime.jsxs(
@@ -7150,7 +7185,7 @@ function WorkflowThreadStrip({
7150
7185
  },
7151
7186
  children: [
7152
7187
  /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
7153
- chunkVL7ZX4KQ_cjs.StepChip,
7188
+ chunkKMOIE2XH_cjs.StepChip,
7154
7189
  {
7155
7190
  kind,
7156
7191
  phase,
@@ -7199,7 +7234,7 @@ function WorkflowThreadStrip({
7199
7234
  ),
7200
7235
  sentBack && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 text-xs text-amber-700 dark:text-amber-300", children: l.sentBack }),
7201
7236
  /* @__PURE__ */ jsxRuntime.jsx(
7202
- chunkVL7ZX4KQ_cjs.StepDocumentCards,
7237
+ chunkKMOIE2XH_cjs.StepDocumentCards,
7203
7238
  {
7204
7239
  refs: documents,
7205
7240
  heading: step.kind === "review" ? phase === "done" ? l.documents.approved : l.documents.toApprove : l.documents.produced,
@@ -7210,7 +7245,7 @@ function WorkflowThreadStrip({
7210
7245
  }
7211
7246
  ),
7212
7247
  /* @__PURE__ */ jsxRuntime.jsx(
7213
- chunkVL7ZX4KQ_cjs.StepRecord,
7248
+ chunkKMOIE2XH_cjs.StepRecord,
7214
7249
  {
7215
7250
  step,
7216
7251
  state: states[step.id],
@@ -7242,10 +7277,10 @@ function WorkflowThreadStrip({
7242
7277
  return latestDoc ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center", children: [
7243
7278
  chip,
7244
7279
  /* @__PURE__ */ jsxRuntime.jsx(
7245
- chunkVL7ZX4KQ_cjs.StepDocumentButton,
7280
+ chunkKMOIE2XH_cjs.StepDocumentButton,
7246
7281
  {
7247
7282
  kind,
7248
- name: nameOfDoc?.(chunkEQTZQD66_cjs.splitDocRef(latestDoc).id) ?? latestDoc,
7283
+ name: nameOfDoc?.(chunkI2LJ7RZ2_cjs.splitDocRef(latestDoc).id) ?? latestDoc,
7249
7284
  onOpen: () => onOpenDocument?.(latestDoc),
7250
7285
  testId: `workflow-thread-step-${step.id}-open-document`
7251
7286
  }
@@ -7278,17 +7313,17 @@ function WorkflowThreadStrip({
7278
7313
  ),
7279
7314
  strays.map((s) => /* @__PURE__ */ jsxRuntime.jsx(SignalPill, { signal: s, l }, `${s.step}-${s.signal}`))
7280
7315
  ] }) : null;
7281
- const at = steps.find((s) => s.id === (selected ?? activeStepId(chunkEQTZQD66_cjs.stepLevels(steps), phaseOf)));
7282
- const headingPx = (step) => `${l.kinds[chunkVL7ZX4KQ_cjs.stepKindOf(step)]} \xB7 ${waitingOf(step.id) ?? ""}`.length * 5.6 - step.title.length * 6.5;
7316
+ const at = steps.find((s) => s.id === (selected ?? activeStepId(chunkI2LJ7RZ2_cjs.stepLevels(steps), phaseOf)));
7317
+ const headingPx = (step) => `${l.kinds[chunkKMOIE2XH_cjs.stepKindOf(step)]} \xB7 ${waitingOf(step.id) ?? ""}`.length * 5.6 - step.title.length * 6.5;
7283
7318
  const reserve = {
7284
- always: (at ? Math.max(0, headingPx(at)) : 0) + steps.filter((s) => grouped.byStep[s.id]?.length).length * BEADS_PX + (onOpenDocument ? steps.filter((s) => chunkVL7ZX4KQ_cjs.stepDocuments(steps, states, s.id).length).length * DOC_BUTTON_PX : 0),
7319
+ always: (at ? Math.max(0, headingPx(at)) : 0) + steps.filter((s) => grouped.byStep[s.id]?.length).length * BEADS_PX + (onOpenDocument ? steps.filter((s) => chunkKMOIE2XH_cjs.stepDocuments(steps, states, s.id).length).length * DOC_BUTTON_PX : 0),
7285
7320
  leading: leading ? 150 : 0,
7286
7321
  trailing: trailing ? 120 : 0
7287
7322
  };
7288
7323
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("min-w-0 flex-1", className), "data-testid": "workflow-thread-strip", children: /* @__PURE__ */ jsxRuntime.jsx(
7289
7324
  StepBarFrame,
7290
7325
  {
7291
- levels: chunkEQTZQD66_cjs.stepLevels(steps),
7326
+ levels: chunkI2LJ7RZ2_cjs.stepLevels(steps),
7292
7327
  phaseOf,
7293
7328
  current: selected,
7294
7329
  onSelect: (id) => {
@@ -7302,7 +7337,7 @@ function WorkflowThreadStrip({
7302
7337
  reservePx: reserve,
7303
7338
  maxSpan,
7304
7339
  icon: glyphOf,
7305
- kindOf: chunkVL7ZX4KQ_cjs.stepKindOf,
7340
+ kindOf: chunkKMOIE2XH_cjs.stepKindOf,
7306
7341
  labels: { waitingFor: l.waitingFor, ...barLabels },
7307
7342
  tid: (suffix) => `workflow-thread-${suffix}`
7308
7343
  }
@@ -7547,7 +7582,7 @@ function defaultTaskComposerValues(workflows, initial) {
7547
7582
  return {
7548
7583
  assignee: "me",
7549
7584
  workflowId,
7550
- inputs: workflow ? { ...chunkJN5YMHGI_cjs.defaultInputs(workflow), ...initial?.inputs } : { ...initial?.inputs },
7585
+ inputs: workflow ? { ...chunkXPQR2PJX_cjs.defaultInputs(workflow), ...initial?.inputs } : { ...initial?.inputs },
7551
7586
  when: "manual",
7552
7587
  runAt: "",
7553
7588
  rrule: "",
@@ -7655,19 +7690,19 @@ function WorkflowComposer({
7655
7690
  return !docs?.length;
7656
7691
  })
7657
7692
  );
7658
- const whatMissing = !workflow || Object.keys(chunkJN5YMHGI_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs)).length > 0;
7693
+ const whatMissing = !workflow || Object.keys(chunkXPQR2PJX_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs)).length > 0;
7659
7694
  const runAtPast = values.when === "once" && values.runAt !== "" && values.runAt !== initialValues?.runAt && new Date(values.runAt).getTime() <= Date.now();
7660
7695
  const whenMissing = missingWhen(values, runAtPast);
7661
7696
  const scheduled = values.when !== "now" && values.when !== "manual";
7662
7697
  const agentMissing = scheduled && values.agentId === "";
7663
7698
  const canSubmit = !whatMissing && !noFiles && whenMissing === null && !agentMissing && !isPending && !planDrafting;
7664
- const derivedName = workflow ? chunk5A6T4W46_cjs.deriveWorkflowName(workflow, values.inputs) : "";
7699
+ const derivedName = workflow ? chunk7D4WXUBS_cjs.deriveWorkflowName(workflow, values.inputs) : "";
7665
7700
  const pickWorkflow = (next) => {
7666
7701
  const def = workflows.find((w) => w.id === next);
7667
7702
  setValues({
7668
7703
  ...values,
7669
7704
  workflowId: next,
7670
- inputs: def ? chunkJN5YMHGI_cjs.defaultInputs(def) : {},
7705
+ inputs: def ? chunkXPQR2PJX_cjs.defaultInputs(def) : {},
7671
7706
  ...def?.documentAction ? { access: "standing" } : {}
7672
7707
  });
7673
7708
  };
@@ -7805,7 +7840,7 @@ function WorkflowComposer({
7805
7840
  }
7806
7841
  ),
7807
7842
  !noFiles && workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
7808
- chunkRSQGDXAF_cjs.SchemaForm,
7843
+ chunkBSZ45U3F_cjs.SchemaForm,
7809
7844
  {
7810
7845
  fields,
7811
7846
  values: values.inputs,
@@ -8243,7 +8278,7 @@ function WorkTaskComposer({
8243
8278
  }, [open]);
8244
8279
  const workflow = workflows.find((w) => w.id === values.workflowId);
8245
8280
  const fields = workflow?.inputs ?? [];
8246
- const errors = workflow ? chunkJN5YMHGI_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs) : {};
8281
+ const errors = workflow ? chunkXPQR2PJX_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs) : {};
8247
8282
  const hasWork = configOpen && Boolean(workflow) && Object.keys(errors).length === 0;
8248
8283
  const unattended = hasWork && values.when !== "now" && values.when !== "manual";
8249
8284
  const canConfigure = !isEdit || seed.assignee === "agent";
@@ -8251,7 +8286,7 @@ function WorkTaskComposer({
8251
8286
  const set = (key, value) => setValues({ ...values, [key]: value });
8252
8287
  const pickWorkflow = (id2) => {
8253
8288
  const next = workflows.find((w) => w.id === id2);
8254
- setValues({ ...values, workflowId: id2, inputs: next ? chunkJN5YMHGI_cjs.defaultInputs(next) : {} });
8289
+ setValues({ ...values, workflowId: id2, inputs: next ? chunkXPQR2PJX_cjs.defaultInputs(next) : {} });
8255
8290
  };
8256
8291
  const openConfigure = () => {
8257
8292
  setConfigOpen(true);
@@ -8437,7 +8472,7 @@ function WorkTaskComposer({
8437
8472
  )
8438
8473
  ] }),
8439
8474
  workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
8440
- chunkRSQGDXAF_cjs.SchemaForm,
8475
+ chunkBSZ45U3F_cjs.SchemaForm,
8441
8476
  {
8442
8477
  fields,
8443
8478
  values: values.inputs,
@@ -10045,5 +10080,5 @@ exports.useWorkflowView = useWorkflowView;
10045
10080
  exports.withLabelIds = withLabelIds;
10046
10081
  exports.workflowFromSkillMarkdown = workflowFromSkillMarkdown;
10047
10082
  exports.workflowToSkillMarkdown = workflowToSkillMarkdown;
10048
- //# sourceMappingURL=chunk-R5NTEW4L.cjs.map
10049
- //# sourceMappingURL=chunk-R5NTEW4L.cjs.map
10083
+ //# sourceMappingURL=chunk-FM46VQ5D.cjs.map
10084
+ //# sourceMappingURL=chunk-FM46VQ5D.cjs.map