sanoma 0.11.21 → 0.11.22

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 (417) hide show
  1. package/README.md +2 -0
  2. package/app/README.md +2 -2
  3. package/app/dist/api.d.ts +16 -2
  4. package/app/dist/api.js +1 -1
  5. package/app/dist/client/assets/ArrowDown.es-BOfBLlTP.js +1 -0
  6. package/app/dist/client/assets/CaretDown.es-D12mWb2j.js +1 -0
  7. package/app/dist/client/assets/CatchBoundary-Cb__yx-s.js +1 -0
  8. package/app/dist/client/assets/Copy.es-CvUujKw7.js +1 -0
  9. package/app/dist/client/assets/DialogTitle-Dz3loDe5.js +1 -0
  10. package/app/dist/client/assets/FloppyDisk.es-CDyDob8p.js +1 -0
  11. package/app/dist/client/assets/Globe.es-C1pgZCGM.js +1 -0
  12. package/app/dist/client/assets/MagnifyingGlass.es-CZ3i6pz0.js +1 -0
  13. package/app/dist/client/assets/Play.es-DGJ1CGhp.js +1 -0
  14. package/app/dist/client/assets/Plug.es-BPhGL8MK.js +1 -0
  15. package/app/dist/client/assets/Plus.es-i3Vaa2WW.js +1 -0
  16. package/app/dist/client/assets/Separator-Cu9cQDBN.js +1 -0
  17. package/app/dist/client/assets/X.es-B7rq0E_-.js +1 -0
  18. package/app/dist/client/assets/_id-C4bMZ73g.js +1 -0
  19. package/app/dist/client/assets/_id-CUaJYD_3.js +1 -0
  20. package/app/dist/client/assets/_id-DRetx-BJ.js +1 -0
  21. package/app/dist/client/assets/_id-mm7bTIIl.js +2 -0
  22. package/app/dist/client/assets/_id-tN6nFEpD.js +1 -0
  23. package/app/dist/client/assets/_name-BOi2qVWk.js +1 -0
  24. package/app/dist/client/assets/_name-CBI1waPs.js +4 -0
  25. package/app/dist/client/assets/_name-CrsiaFT6.js +1 -0
  26. package/app/dist/client/assets/_name-TzQfjXo8.js +1 -0
  27. package/app/dist/client/assets/_vendor-C3TGvx4w.js +1 -0
  28. package/app/dist/client/assets/_vendor-sHwAlFSF.js +1 -0
  29. package/app/dist/client/assets/app-chrome-_ahvxx73.js +5 -0
  30. package/app/dist/client/assets/app-scope-Bht7PIkQ.js +1 -0
  31. package/app/dist/client/assets/approval-BFFM_yEl.js +1 -0
  32. package/app/dist/client/assets/apps-CpdXjc1j.js +1 -0
  33. package/app/dist/client/assets/button-D5kdANef.js +1 -0
  34. package/app/dist/client/assets/change-glance-CdkbSGxZ.js +1 -0
  35. package/app/dist/client/assets/changes-C_K2tazO.js +1 -0
  36. package/app/dist/client/assets/changes-DFcdyDL_.js +1 -0
  37. package/app/dist/client/assets/chat-Djbdaxw8.js +14 -0
  38. package/app/dist/client/assets/chat-button-DNusaP5n.js +1 -0
  39. package/app/dist/client/assets/chat-prompt-z0XJPDtH.js +1 -0
  40. package/app/dist/client/assets/{code-BVYaiQEr.js → code-CT4-YDKq.js} +2 -2
  41. package/app/dist/client/assets/common-DHOhx6Zn.js +3 -0
  42. package/app/dist/client/assets/composite-9cNA7N0P.js +1 -0
  43. package/app/dist/client/assets/connect-DHUdrwwW.js +1 -0
  44. package/app/dist/client/assets/connections-fGNKJl3J.js +5 -0
  45. package/app/dist/client/assets/connectors-CuS1paNm.js +1 -0
  46. package/app/dist/client/assets/credentials-Cb7Lnfxk.js +1 -0
  47. package/app/dist/client/assets/css-BGIxQoYs.js +1 -0
  48. package/app/dist/client/assets/css-DgaLhXQH.js +1 -0
  49. package/app/dist/client/assets/data-DZ-ufRXn.js +1 -0
  50. package/app/dist/client/assets/decidable-OFQBEcco.js +1 -0
  51. package/app/dist/client/assets/declaration-form-D2ZMEVC6.js +1 -0
  52. package/app/dist/client/assets/dialog-B5pmfCdJ.js +1 -0
  53. package/app/dist/client/assets/diff-woXpYk--.js +1 -0
  54. package/app/dist/client/assets/engine-CBuzy-Ik.js +1 -0
  55. package/app/dist/client/assets/existing-BaPrTDs8.js +1 -0
  56. package/app/dist/client/assets/fence-CMhOJv7H.js +157 -0
  57. package/app/dist/client/assets/github-dark-C-LZuMrd.js +1 -0
  58. package/app/dist/client/assets/github-light-EUqPIrTm.js +1 -0
  59. package/app/dist/client/assets/graph-B5TYhcqD.js +7 -0
  60. package/app/dist/client/assets/grid-diff-wo26YSgM.js +1 -0
  61. package/app/dist/client/assets/held-card-HrJ6QpRY.js +1 -0
  62. package/app/dist/client/assets/highlighted-body-JLMTFACH-CjeaSnZq.js +1 -0
  63. package/app/dist/client/assets/hosting-Beoi95m6.js +1 -0
  64. package/app/dist/client/assets/html-BHZv6uqE.js +1 -0
  65. package/app/dist/client/assets/import-8WDFPfe6.js +1 -0
  66. package/app/dist/client/assets/inbox-B9hsZPsC.js +1 -0
  67. package/app/dist/client/assets/inbox-DM2npRZI.js +1 -0
  68. package/app/dist/client/assets/index-CHKfukjt.js +10 -0
  69. package/app/dist/client/assets/item-B4QRpXse.js +1 -0
  70. package/app/dist/client/assets/javascript-BzbQS41l.js +1 -0
  71. package/app/dist/client/assets/javascript-CpIGwZ_Y.js +1 -0
  72. package/app/dist/client/assets/json-qhed-kSA.js +1 -0
  73. package/app/dist/client/assets/jsx-Bz0zcwM4.js +1 -0
  74. package/app/dist/client/assets/kit-n8CE0xEs.js +1 -0
  75. package/app/dist/client/assets/lazyRouteComponent-DezoGNoN.js +1 -0
  76. package/app/dist/client/assets/markdown-BYOwaDjH.js +1 -0
  77. package/app/dist/client/assets/markdown-DS_nKu0s.js +164 -0
  78. package/app/dist/client/assets/mermaid-WFAXDIZX-DQBKIf0O.js +1 -0
  79. package/app/dist/client/assets/motion-D6e1hqz4.js +1 -0
  80. package/app/dist/client/assets/people-BiiQfYJ8.js +1 -0
  81. package/app/dist/client/assets/permissions-BmKxEfBi.js +2 -0
  82. package/app/dist/client/assets/permissions-grid-B755bq5J.js +1 -0
  83. package/app/dist/client/assets/preload-helper-BLdHbfdN.js +1 -0
  84. package/app/dist/client/assets/python-gzcpVVnB.js +1 -0
  85. package/app/dist/client/assets/queries-DGlVu9wp.js +57 -0
  86. package/app/dist/client/assets/react-dom-D6fTz1bt.js +1 -0
  87. package/app/dist/client/assets/route-BSe5L2p4.js +1 -0
  88. package/app/dist/client/assets/route-Ds87ixtB.js +1 -0
  89. package/app/dist/client/assets/runs-table-DMiD4HeY.js +1 -0
  90. package/app/dist/client/assets/scenario-DrgmfuFx.js +1 -0
  91. package/app/dist/client/assets/scenario-graph-Blv2e1PV.js +1 -0
  92. package/app/dist/client/assets/separator-Bdtc7rou.js +1 -0
  93. package/app/dist/client/assets/{sheet-BYL9XU5s.js → sheet-BKUFUA1l.js} +1 -1
  94. package/app/dist/client/assets/shellscript-CLZ0U2zV.js +1 -0
  95. package/app/dist/client/assets/site-icon-1Mcc1UIb.js +1 -0
  96. package/app/dist/client/assets/sites.index-K4mrFsLr.js +1 -0
  97. package/app/dist/client/assets/spinner-XaRXIj9W.js +1 -0
  98. package/app/dist/client/assets/sql-CEbI0hMM.js +1 -0
  99. package/app/dist/client/assets/start-form-CJ6VmNPY.js +1 -0
  100. package/app/dist/client/assets/store-BT988jIX.js +1 -0
  101. package/app/dist/client/assets/style-CTcG_5y0.css +2 -0
  102. package/app/dist/client/assets/table-B81tv0LG.js +1 -0
  103. package/app/dist/client/assets/textarea-CRpYU-qx.js +1 -0
  104. package/app/dist/client/assets/tsx-udAQXfEw.js +1 -0
  105. package/app/dist/client/assets/typescript-bsJCZSQ-.js +1 -0
  106. package/app/dist/client/assets/{useLoaderData-BQd5yMlA.js → useLoaderData-BsksXf-p.js} +1 -1
  107. package/app/dist/client/assets/useOpenInteractionType-UhakpAXY.js +1 -0
  108. package/app/dist/client/assets/useRegisterFieldControl-DIkKUJkh.js +1 -0
  109. package/app/dist/client/assets/useValueChanged-DBqn456b.js +1 -0
  110. package/app/dist/client/assets/utils-BRvE9-Fo.js +1 -0
  111. package/app/dist/client/assets/who-are-you-DUoVqvfP.js +1 -0
  112. package/app/dist/client/assets/workflow-lQtyyxKx.js +1 -0
  113. package/app/dist/client/assets/workflow-view-hk_RU9WF.js +1 -0
  114. package/app/dist/client/assets/workflows-DFB7lzzN.js +1 -0
  115. package/app/dist/client/assets/yaml-rwi0_p6S.js +1 -0
  116. package/app/dist/index.d.ts +4 -4
  117. package/app/dist/lib/chat.d.ts +64 -19
  118. package/app/dist/lib/chat.js +54 -18
  119. package/app/dist/lib/chat.js.map +1 -1
  120. package/app/dist/server/assets/{_id-wuJIq2ZZ.js → _id--MWJXj9R.js} +2 -2
  121. package/app/dist/server/assets/{_id-ce1EGp7Y.js → _id-BEGe86NW.js} +2 -2
  122. package/app/dist/server/assets/{_id-BViXAagq.js → _id-CbO7Ok0w.js} +12 -10
  123. package/app/dist/server/assets/{_id-Dt9tTylX.js → _id-DwdpIYKk.js} +2 -2
  124. package/app/dist/server/assets/{_id-wB8khGTz.js → _id-fK_nPFHK.js} +6 -6
  125. package/app/dist/server/assets/{_name-D_-MhjNf.js → _name-BzD9TxVC.js} +17 -17
  126. package/app/dist/server/assets/{_name-BqFwnyf7.js → _name-ClgMsl5m.js} +2 -2
  127. package/app/dist/server/assets/{_name-BGagGBjX.js → _name-DdFVsjcj.js} +7 -7
  128. package/app/dist/server/assets/{_name-DntbHE-b.js → _name-Dyh4G9Oy.js} +10 -11
  129. package/app/dist/server/assets/{_tanstack-start-manifest_v-BljuBM-G.js → _tanstack-start-manifest_v-DUtnBg7y.js} +101 -91
  130. package/app/dist/server/assets/{_vendor-CNB03LWX.js → _vendor-DyeUY8kH.js} +8 -8
  131. package/app/dist/server/assets/{_vendor-CcEviOki.js → _vendor-W3KKSusM.js} +2 -2
  132. package/app/dist/server/assets/{actor-D6iA0pDg.js → actor-BlaOwG6A.js} +1 -1
  133. package/app/dist/server/assets/app-chrome-BJlxsc9y.js +2116 -0
  134. package/app/dist/server/assets/{app-scope-CXIgOFmi.js → app-scope-ASuhE3xI.js} +2 -2
  135. package/app/dist/server/assets/{apply-plan-ybBda6vQ.js → apply-plan-Djw1tNPD.js} +8 -7
  136. package/app/dist/server/assets/{approval-Su315ikC.js → approval-BjTnfr1U.js} +15 -13
  137. package/app/dist/server/assets/{apps-xwQAehch.js → apps-C28F9Y5C.js} +7 -7
  138. package/app/dist/server/assets/button-Xwx3rpQ0.js +43 -0
  139. package/app/dist/server/assets/change-glance-Bc4htVPy.js +54 -0
  140. package/app/dist/server/assets/{change-glance-CpArIbGS.js → changes-B5P8BJSf.js} +2 -54
  141. package/app/dist/server/assets/{changes-Bc_OiDBD.js → changes-tbeMKxjY.js} +8 -7
  142. package/app/dist/server/assets/{chat-DMN_hoKm.js → chat-BNMeLc9V.js} +108 -30
  143. package/app/dist/server/assets/{chat-button-LtA80MoR.js → chat-button-SluTWK8R.js} +2 -2
  144. package/app/dist/server/assets/{code-COyt8L-n.js → code-hVpCkmAZ.js} +1 -1
  145. package/app/dist/server/assets/{common-CWHLj7KV.js → common-DpZcJvCy.js} +26 -24
  146. package/app/dist/server/assets/{connect-BpPiu5s6.js → connect-Cljunav2.js} +11 -10
  147. package/app/dist/server/assets/{connections-DBgb1bvX.js → connections-Cfz5LMy5.js} +12 -11
  148. package/app/dist/server/assets/{connectors-5a5_SlHO.js → connectors-tt9BF9L1.js} +8 -8
  149. package/app/dist/server/assets/{credentials-ud_Y68hx.js → credentials-CYUFAVU8.js} +10 -9
  150. package/app/dist/server/assets/{data-aEdhwcqy.js → data-D91ZZ5St.js} +7 -7
  151. package/app/dist/server/assets/{declaration-form-Dfg1yNuY.js → declaration-form-BzISD6gw.js} +7 -6
  152. package/app/dist/server/assets/{dialog-BGjiw3Dx.js → dialog-T0bzlKzs.js} +2 -2
  153. package/app/dist/server/assets/{dropdown-menu-DAC3LWas.js → dropdown-menu-RGvPORm4.js} +1 -1
  154. package/app/dist/server/assets/{existing-B4d4NrC8.js → existing-BZym0xE2.js} +8 -7
  155. package/app/dist/server/assets/fence-Br7MPP41.js +130 -0
  156. package/app/dist/server/assets/{field-C0Xx_90s.js → field-DFpkT1id.js} +1 -1
  157. package/app/dist/server/assets/{functions-BvFYzabD.js → functions-sf07C1qn.js} +2 -2
  158. package/app/dist/server/assets/{graph-qYOdoz2s.js → graph-C1Cl7owl.js} +5 -5
  159. package/app/dist/server/assets/{grid-diff-jTvp-8wS.js → grid-diff-D5bQDKl2.js} +1 -1
  160. package/app/dist/server/assets/held-card-CDewk4rs.js +75 -0
  161. package/app/dist/server/assets/{hosting-bbn9UvDc.js → hosting-O-l2L0ec.js} +16 -14
  162. package/app/dist/server/assets/{import-DIwvzHb6.js → import-qvpEIYFx.js} +8 -8
  163. package/app/dist/server/assets/{inbox-D6R6sWBB.js → inbox-BcJxCIPm.js} +8 -8
  164. package/app/dist/server/assets/{inbox-Dj-5FleF.js → inbox-BvpSeC3M.js} +2 -2
  165. package/app/dist/server/assets/{input-D63gF3G2.js → input-CF-vX8Xp.js} +1 -1
  166. package/app/dist/server/assets/{item-BDSXoEr_.js → item-LBDNja5f.js} +1 -1
  167. package/app/dist/server/assets/{kit-D6EulwBe.js → kit-DlT_THim.js} +2 -2
  168. package/app/dist/server/assets/markdown-BExKjghi.js +116 -0
  169. package/app/dist/server/assets/{middleware-B8JRLyxx.js → middleware-B6RPW0fH.js} +1 -1
  170. package/app/dist/server/assets/{people-CkU_AxrV.js → people-C8VXQrKg.js} +13 -12
  171. package/app/dist/server/assets/{permissions-BfMcQqQb.js → permissions-COAiOoCB.js} +9 -8
  172. package/app/dist/server/assets/{permissions-grid-DWP9FAAS.js → permissions-grid-CcYUiqhD.js} +4 -4
  173. package/app/dist/server/assets/{button-f9Lc8qLl.js → queries-DJcZ4mzA.js} +3 -45
  174. package/app/dist/server/assets/{route-BTT7nMJq.js → route-DOqitvxL.js} +2 -2
  175. package/app/dist/server/assets/{route-CF_8jQYY.js → route-aa9MThMA.js} +2 -2
  176. package/app/dist/server/assets/{router-BvYtxrVN.js → router-Co6gRNI1.js} +80 -46
  177. package/app/dist/server/assets/{runs-table-BBudn12Y.js → runs-table-BtGm2KOO.js} +6 -6
  178. package/app/dist/server/assets/{scenario-BXGTSTiP.js → scenario-DidUafqw.js} +5 -5
  179. package/app/dist/server/assets/{separator-8MZ7vR3f.js → separator-Cf98V8ie.js} +1 -1
  180. package/app/dist/server/assets/{sheet-5Cyp-4UW.js → sheet-DTOG7OHQ.js} +2 -2
  181. package/app/dist/server/assets/{sites.index-1l0BtgVf.js → sites.index-4TK8c0QC.js} +4 -4
  182. package/app/dist/server/assets/{spinner-C1ZW08lp.js → spinner-016IPVi-.js} +1 -1
  183. package/app/dist/server/assets/{start-CSU4irVK.js → start-VfVsXenI.js} +2 -2
  184. package/app/dist/server/assets/{start-form-DI60UOrc.js → start-form-CUeEdeP7.js} +10 -9
  185. package/app/dist/server/assets/{table-DtPk_h_5.js → table-y-dGlLx6.js} +1 -1
  186. package/app/dist/server/assets/{textarea-f0Ip5ed1.js → textarea-B02joDnr.js} +1 -1
  187. package/app/dist/server/assets/utils-CHesvfjo.js +138 -0
  188. package/app/dist/server/assets/{who-are-you-ZGyMnpVi.js → who-are-you-DW5qmIzp.js} +8 -7
  189. package/app/dist/server/assets/{workflow-Z99QWO42.js → workflow-BRu7ljgU.js} +5 -5
  190. package/app/dist/server/assets/{workflow-view-C8X8U11S.js → workflow-view-yF48p1lu.js} +14 -13
  191. package/app/dist/server/assets/{workflows-C0kJoGf1.js → workflows-DL-TJFLt.js} +13 -14
  192. package/app/dist/server/chat.d.ts +6 -1
  193. package/app/dist/server/chat.js +39 -20
  194. package/app/dist/server/chat.js.map +1 -1
  195. package/app/dist/server/server.js +48 -48
  196. package/app/dist/steps/agent/acp.d.ts +3 -97
  197. package/app/dist/steps/agent/acp.js +19 -49
  198. package/app/dist/steps/agent/acp.js.map +1 -1
  199. package/app/dist/steps/agent/checkout.d.ts +18 -1
  200. package/app/dist/steps/agent/checkout.js +17 -0
  201. package/app/dist/steps/agent/checkout.js.map +1 -1
  202. package/app/dist/steps/agent/harness.d.ts +2 -4
  203. package/app/dist/steps/agent/harness.js +45 -61
  204. package/app/dist/steps/agent/harness.js.map +1 -1
  205. package/app/dist/steps/agent/prompt.d.ts +1 -1
  206. package/app/dist/steps/agent/prompt.js +35 -14
  207. package/app/dist/steps/agent/prompt.js.map +1 -1
  208. package/app/dist/steps/agent/transcript.d.ts +10 -1
  209. package/app/dist/steps/agent/transcript.js +75 -2
  210. package/app/dist/steps/agent/transcript.js.map +1 -1
  211. package/app/dist/steps/agent/turn.d.ts +4 -6
  212. package/app/dist/steps/agent/turn.js +14 -16
  213. package/app/dist/steps/agent/turn.js.map +1 -1
  214. package/app/dist/stylesheet.json +1 -1
  215. package/app/src/api.ts +1 -1
  216. package/app/src/components/app-chrome.tsx +28 -13
  217. package/app/src/components/common.tsx +1 -24
  218. package/app/src/components/logo.tsx +25 -0
  219. package/app/src/components/shell/chat-parts.tsx +185 -126
  220. package/app/src/components/shell/chat-prompt.ts +6 -2
  221. package/app/src/components/shell/chat.tsx +154 -220
  222. package/app/src/components/shell/composer.tsx +140 -0
  223. package/app/src/components/shell/connect-agent.tsx +157 -0
  224. package/app/src/components/shell/engine-mark.tsx +9 -0
  225. package/app/src/components/shell/fence.tsx +25 -0
  226. package/app/src/components/shell/held-card.tsx +58 -0
  227. package/app/src/components/shell/markdown.tsx +152 -0
  228. package/app/src/components/shell/nav-user.tsx +11 -1
  229. package/app/src/components/shell/prefs.ts +9 -1
  230. package/app/src/components/shell/thread.tsx +174 -0
  231. package/app/src/components/ui/bubble.tsx +117 -0
  232. package/app/src/components/ui/code-block.tsx +235 -0
  233. package/app/src/components/ui/input-group.tsx +136 -0
  234. package/app/src/components/ui/marker.tsx +67 -0
  235. package/app/src/components/ui/message-scroller.tsx +117 -0
  236. package/app/src/components/ui/message.tsx +74 -0
  237. package/app/src/components/ui/trace.tsx +133 -0
  238. package/app/src/hooks/use-highlighted-code.ts +72 -0
  239. package/app/src/index.ts +4 -4
  240. package/app/src/lib/chat.ts +110 -22
  241. package/app/src/lib/cn-tables.ts +23 -23
  242. package/app/src/lib/highlighter.tsx +114 -0
  243. package/app/src/routes/__root.tsx +7 -4
  244. package/app/src/routes/connectors/index.tsx +1 -1
  245. package/app/src/routes/hosting/index.tsx +6 -9
  246. package/app/src/server/chat.ts +41 -19
  247. package/app/src/steps/agent/acp.ts +10 -80
  248. package/app/src/steps/agent/checkout.ts +30 -0
  249. package/app/src/steps/agent/harness.ts +53 -78
  250. package/app/src/steps/agent/prompt.ts +42 -14
  251. package/app/src/steps/agent/transcript.ts +90 -3
  252. package/app/src/steps/agent/turn.ts +18 -16
  253. package/app/src/worker/app.ts +6 -5
  254. package/dist/cli.js +18 -6
  255. package/dist/cli.js.map +1 -1
  256. package/dist/serve.js +1 -1
  257. package/dist/serve.js.map +1 -1
  258. package/dist/worker-port.d.ts +16 -2
  259. package/dist/worker-port.js +44 -5
  260. package/dist/worker-port.js.map +1 -1
  261. package/package.json +7 -3
  262. package/testing/README.md +3 -3
  263. package/testing/dist/build.d.ts +3 -3
  264. package/testing/dist/build.js +4 -4
  265. package/testing/dist/build.js.map +1 -1
  266. package/testing/dist/host.d.ts +34 -21
  267. package/testing/dist/host.js +135 -75
  268. package/testing/dist/host.js.map +1 -1
  269. package/workflows/CLOUD-IDENTITY.md +15 -20
  270. package/workflows/README.md +9 -7
  271. package/workflows/dist/client.d.ts +5 -3
  272. package/workflows/dist/client.js +4 -3
  273. package/workflows/dist/client.js.map +1 -1
  274. package/workflows/dist/cloud-identity.d.ts +5 -2
  275. package/workflows/dist/cloud-identity.js +7 -4
  276. package/workflows/dist/cloud-identity.js.map +1 -1
  277. package/workflows/dist/config.d.ts +7 -1
  278. package/workflows/dist/config.js +24 -1
  279. package/workflows/dist/config.js.map +1 -1
  280. package/workflows/dist/db/company.d.ts +1 -1
  281. package/workflows/dist/db/company.js +1 -1
  282. package/workflows/dist/db/identity.d.ts +2 -2
  283. package/workflows/dist/db/identity.js +2 -2
  284. package/workflows/dist/db/identity.js.map +1 -1
  285. package/workflows/dist/deadlines.d.ts +7 -2
  286. package/workflows/dist/deadlines.js +14 -5
  287. package/workflows/dist/deadlines.js.map +1 -1
  288. package/workflows/dist/describe.js +15 -3
  289. package/workflows/dist/describe.js.map +1 -1
  290. package/workflows/dist/description.d.ts +37 -2
  291. package/workflows/dist/description.js +22 -1
  292. package/workflows/dist/description.js.map +1 -1
  293. package/workflows/dist/host.d.ts +7 -6
  294. package/workflows/dist/host.js +1 -1
  295. package/workflows/dist/host.js.map +1 -1
  296. package/workflows/dist/identity-provisioning.d.ts +2 -5
  297. package/workflows/dist/identity-provisioning.js +16 -20
  298. package/workflows/dist/identity-provisioning.js.map +1 -1
  299. package/workflows/dist/index.d.ts +3 -3
  300. package/workflows/dist/index.js +1 -1
  301. package/workflows/dist/index.js.map +1 -1
  302. package/workflows/dist/op.d.ts +92 -1
  303. package/workflows/dist/op.js +19 -6
  304. package/workflows/dist/op.js.map +1 -1
  305. package/workflows/dist/renewal.d.ts +1 -1
  306. package/workflows/dist/renewal.js +1 -1
  307. package/workflows/dist/runtime-ops.d.ts +3 -4
  308. package/workflows/dist/runtime-ops.js +4 -4
  309. package/workflows/dist/runtime-ops.js.map +1 -1
  310. package/workflows/dist/schedules.d.ts +1 -1
  311. package/workflows/dist/schedules.js +1 -1
  312. package/workflows/dist/supervisor.d.ts +21 -18
  313. package/workflows/dist/supervisor.js +20 -22
  314. package/workflows/dist/supervisor.js.map +1 -1
  315. package/workflows/dist/vendor-info.d.ts +12 -3
  316. package/workflows/dist/vendor-info.js +20 -4
  317. package/workflows/dist/vendor-info.js.map +1 -1
  318. package/workflows/dist/worker.d.ts +11 -1
  319. package/workflows/dist/worker.js +9 -3
  320. package/workflows/dist/worker.js.map +1 -1
  321. package/workflows/src/client.ts +9 -6
  322. package/workflows/src/cloud-identity.ts +7 -4
  323. package/workflows/src/config.ts +36 -1
  324. package/workflows/src/db/company.ts +1 -1
  325. package/workflows/src/db/identity.ts +2 -2
  326. package/workflows/src/deadlines.ts +18 -8
  327. package/workflows/src/describe.ts +16 -3
  328. package/workflows/src/description.ts +25 -1
  329. package/workflows/src/host.ts +7 -6
  330. package/workflows/src/identity-provisioning.ts +19 -30
  331. package/workflows/src/index.ts +7 -1
  332. package/workflows/src/op.ts +104 -10
  333. package/workflows/src/renewal.ts +1 -1
  334. package/workflows/src/runtime-ops.ts +5 -5
  335. package/workflows/src/schedules.ts +1 -1
  336. package/workflows/src/supervisor.ts +40 -38
  337. package/workflows/src/vendor-info.ts +20 -5
  338. package/workflows/src/worker.ts +22 -5
  339. package/app/dist/client/assets/ArrowUp.es-DOgvoS0P.js +0 -1
  340. package/app/dist/client/assets/Copy.es-B0D5SwiQ.js +0 -1
  341. package/app/dist/client/assets/DialogTitle-BgjYK22C.js +0 -1
  342. package/app/dist/client/assets/FloppyDisk.es-DnuNe_a8.js +0 -1
  343. package/app/dist/client/assets/Globe.es-B6x2e4-a.js +0 -1
  344. package/app/dist/client/assets/MagnifyingGlass.es-DoNoHEhT.js +0 -1
  345. package/app/dist/client/assets/Play.es-BwXalGBh.js +0 -1
  346. package/app/dist/client/assets/Plug.es-CaZsN5P-.js +0 -1
  347. package/app/dist/client/assets/Plus.es-w9VPpTJB.js +0 -1
  348. package/app/dist/client/assets/Separator-BAhKFgSd.js +0 -1
  349. package/app/dist/client/assets/X.es-DKMYClf-.js +0 -1
  350. package/app/dist/client/assets/_id-BSRAaWtO.js +0 -1
  351. package/app/dist/client/assets/_id-BjDP-cPH.js +0 -1
  352. package/app/dist/client/assets/_id-BudM76zX.js +0 -1
  353. package/app/dist/client/assets/_id-C37U5bBa.js +0 -1
  354. package/app/dist/client/assets/_id-lmg24JVh.js +0 -2
  355. package/app/dist/client/assets/_name-CylqFo_t.js +0 -1
  356. package/app/dist/client/assets/_name-D8Gl8iwy.js +0 -4
  357. package/app/dist/client/assets/_name-DdPCU8pt.js +0 -1
  358. package/app/dist/client/assets/_name-TteWQXe0.js +0 -1
  359. package/app/dist/client/assets/_vendor-BLxW83yk.js +0 -1
  360. package/app/dist/client/assets/_vendor-Bq3uZU4-.js +0 -1
  361. package/app/dist/client/assets/app-chrome-H8uZ4dHI.js +0 -16
  362. package/app/dist/client/assets/app-scope-BeUW_8Qh.js +0 -1
  363. package/app/dist/client/assets/approval-DpgmTc63.js +0 -1
  364. package/app/dist/client/assets/apps-CoWzNm8M.js +0 -1
  365. package/app/dist/client/assets/change-glance-DbYcBT7H.js +0 -1
  366. package/app/dist/client/assets/changes-DIJvP7wQ.js +0 -1
  367. package/app/dist/client/assets/chat-button-BgpOfYh1.js +0 -1
  368. package/app/dist/client/assets/chat-prompt-hiawXcK0.js +0 -1
  369. package/app/dist/client/assets/common-Dw2i6XKZ.js +0 -3
  370. package/app/dist/client/assets/composite-D9GNDzFj.js +0 -1
  371. package/app/dist/client/assets/connect-CIq2KJTz.js +0 -1
  372. package/app/dist/client/assets/connections-iqd2XbWQ.js +0 -5
  373. package/app/dist/client/assets/connectors-rI8_D1n1.js +0 -1
  374. package/app/dist/client/assets/credentials-26vu6Fv5.js +0 -1
  375. package/app/dist/client/assets/data-sDMlKaLV.js +0 -1
  376. package/app/dist/client/assets/decidable-zcYI7bY8.js +0 -1
  377. package/app/dist/client/assets/declaration-form-BtSVvxhq.js +0 -1
  378. package/app/dist/client/assets/dialog-DskpUgkl.js +0 -1
  379. package/app/dist/client/assets/existing-BD3VgJ_8.js +0 -1
  380. package/app/dist/client/assets/graph-Prxl3c55.js +0 -7
  381. package/app/dist/client/assets/grid-diff-SMsvea6t.js +0 -1
  382. package/app/dist/client/assets/hosting-BBHUppH-.js +0 -1
  383. package/app/dist/client/assets/import-B92fd4Tl.js +0 -1
  384. package/app/dist/client/assets/inbox-57oGZtxE.js +0 -1
  385. package/app/dist/client/assets/inbox-B2AMNtk5.js +0 -1
  386. package/app/dist/client/assets/index-Bn3XeKy8.js +0 -10
  387. package/app/dist/client/assets/kit-BsK6VZTQ.js +0 -1
  388. package/app/dist/client/assets/lazyRouteComponent-Uri98HNq.js +0 -1
  389. package/app/dist/client/assets/motion-C8lNeYvK.js +0 -1
  390. package/app/dist/client/assets/people-ISOMYCTu.js +0 -1
  391. package/app/dist/client/assets/permissions-Cenat84K.js +0 -2
  392. package/app/dist/client/assets/permissions-grid-B2GtGwzv.js +0 -1
  393. package/app/dist/client/assets/route-BP1XwaTB.js +0 -1
  394. package/app/dist/client/assets/route-KVU6QgwJ.js +0 -1
  395. package/app/dist/client/assets/runs-table-35lNzKLn.js +0 -1
  396. package/app/dist/client/assets/scenario-DSwsavxS.js +0 -1
  397. package/app/dist/client/assets/scenario-graph-CAzWOtqV.js +0 -1
  398. package/app/dist/client/assets/separator-BlwkzEY0.js +0 -1
  399. package/app/dist/client/assets/site-icon-DZvOfBvU.js +0 -1
  400. package/app/dist/client/assets/sites.index-CcNo6N8u.js +0 -1
  401. package/app/dist/client/assets/spinner-BGy6LWIW.js +0 -1
  402. package/app/dist/client/assets/start-form-Bgo9I63s.js +0 -1
  403. package/app/dist/client/assets/store-BGu0d2Ld.js +0 -57
  404. package/app/dist/client/assets/style-CCDLLPgG.css +0 -2
  405. package/app/dist/client/assets/table-DjbI5VTn.js +0 -1
  406. package/app/dist/client/assets/textarea-DXO0eUdp.js +0 -1
  407. package/app/dist/client/assets/useOpenInteractionType-Bin8RjM5.js +0 -1
  408. package/app/dist/client/assets/useRegisterFieldControl-CQPTOU7Z.js +0 -1
  409. package/app/dist/client/assets/useValueChanged-DMkuvFZG.js +0 -1
  410. package/app/dist/client/assets/utils-CMsCvwYQ.js +0 -1
  411. package/app/dist/client/assets/who-are-you-Bt1WI3Cz.js +0 -1
  412. package/app/dist/client/assets/workflow-BJpO61A-.js +0 -1
  413. package/app/dist/client/assets/workflow-view-DP-UlRiH.js +0 -1
  414. package/app/dist/client/assets/workflows-BLCBgxbx.js +0 -1
  415. package/app/dist/server/assets/app-chrome-BYS81Vnx.js +0 -1410
  416. package/app/dist/server/assets/native-select-DLa-He0n.js +0 -37
  417. package/app/dist/server/assets/utils-wksS9pYh.js +0 -138
@@ -0,0 +1 @@
1
+ import{n as e}from"./engine-CBuzy-Ik.js";var t=48,n=(e,n=0)=>{let r=new Int32Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i)-t-n;return r},r=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},i=e=>{let n=new Int32Array(e.length),r=0;for(let i=0;i<e.length;i++){let a=e.charCodeAt(i)-t;r+=a>>>1^-(a&1),n[i]=r}return n},a=192,o=[],s=r(n(`D0400004200002160000000221200200020003200002120021200001300022002100:20100020000000030200060000002200301300012005202012002000200030020202001000`)),c=r(n(`:111141115111111191146581131;34411117111512234337723313211112214411111152226311311111111711616341111111132451111123411354343324444113225255117`)),l=`@containerabcdeasefghinsetlmoprstunderlinewzlignnimatespectuto-rowsaglurockdrop-blursisrderttom-blrspacingtyoursorlnt-spantartainentivide-yurationillexontlterapr-xyidow-colsrows-sxyeiadingftnest-clampax-bein-lrstxyhw-screenhwpacityrutlinederiginblrtxyioghtngtateundedw-brt-spantartchizepace-tartaleroll-mtbar-thumbrackadowrinkxyextoprackingnsitionlate-xy-offset`,u=(()=>{let e=s.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=s[n];i<s[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(s[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=s[i];a<s[i+1];a++)n[r++]=e,e+=t[e]}return n})(),d=n(`020000000700:0;0=>?0AB000000000000I00000M–0000000–000V000000000000000000b0000000000000000p0000000000z00}0~€00000000000000‡ˆ00000000000000§000`,1),f=r(n(`1233353634333535136`)),p=n(`932423325832483250325B:0325B:4325632532542H<C=153;8432588GA8B:032`),m=n(`011123456478883889::1118;161<=333::;9999939>139?@339?333333;:17333333397;4444::;366A;933B91199;?:`),h=i(`02020202002002002000020020020020020020020020020020020002002002020202002002020020200202002002002002002002002000200020002000200020020002002020020002000002002002000200002002002002002002002002002020020020020020020020020020020002002002002002002002002002002002002002002002002000200200200200200020202000200020020000200`),g=(()=>{let e=new Int32Array(143).fill(-1),t=i(`0242226222442222226424224226222442822224226262242222422222224422222222262424222426462422422424442422`),n=i(`022222222222222222202222222222222222222222222222222222222222222222222222222222202222222222‘”22222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),_=` block contents flow-root hidden inline inline-block inline-flex inline-grid inline-table table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|isolat e ion-auto|object- contain cover fill none scale-down|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch| italic not-italic| proportional-nums tabular-nums| no-underline overline|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|appearance- auto none|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|touch- auto manipulation none|select- all auto none text| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px|clip- border content padding text|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out|initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| loose none normal px relaxed snug tight|through |item | decimal disc none| auto px| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| first last none| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right|inset | 2xl 3xl 4xl full lg md none sm xl|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw| bar base reply| center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| all colors none opacity shadow transform| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),v=i(`0000000000000000000000000000000242226220240:664242026262200244282424226242202424242222222822222222262424222426420:4422400024442422`),y=i(`ú222222222222222222222222222222ij222222Ī2ħĪ2ğ620222Ĕđ4222Ċ2ĉ2422224222222ÄÁ\xA0222222222222242ÊÃ2222222¸±222220222¤2Ÿ422“–˜_b•2222222`),b=i(`022222222222222222222222222222222222222258229<214AD222I0L222E00H02S000VUXY\\2222302450000082a40000009jkn000_21=<d222i09v222{~220uxw`),x=new Int32Array(572),S=new Int32Array(572),C=new Int32Array(572),w=``,T=new Int32Array(660);{let e=new Map,t=0,n=0;for(let r=0;r<v.length;r++)for(let i of _[b[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),T[a*2]=w.length,T[a*2+1]=i.length,w+=i),x[n]=v[r],S[n]=y[r],C[n]=a,n++}}var E=i(`0D2848@6>4264F2<:2:222B6L6BJ`),D=r(n(`1::24432:442:44:44>222212213`)),O=i(`2ƂšŤ222ū332Ŵ222222222O282ū7Ɛ222Ɵl”›2>2Ă2ćĊŸY›d7ĊÉgþ2ÅÖ8259þ2ó3984981ø2ó=X2Î222×132Ö2Õ1Ú2×5æ2Í11Ô22222222123232³©:®2|2Dj22`),k=n(`‹`),A=n(`[`),j=n(`1`),M=e({GROUP_COUNT:a,customValidatorNames:o,edgeStart:s,labelStart:c,labelText:l,edgeTarget:u,nodeGroup:d,nodeVlist:g,vlistPat:f,vlistOps:p,vlistRef:m,vlistGroup:h,litAnchor:x,litGroup:S,litPool:C,poolOffsets:T,poolText:w,adjGid:E,adjStart:D,adjTgt:O,patGid:k,patTgt:A,postfixLookupGroups:j,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`}),N=(e,t)=>`${e} ${t}${e===1?``:`s`}`;export{N as n,M as t};
@@ -0,0 +1 @@
1
+ import{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{A as r,Nr as i,Zt as a,jr as o}from"./queries-DGlVu9wp.js";import{t as s}from"./button-D5kdANef.js";import{o as c,r as l,s as u,t as d}from"./item-B4QRpXse.js";import{T as f,b as p,et as m,w as h,y as g}from"./index-CHKfukjt.js";import{c as _,s as v}from"./app-chrome-_ahvxx73.js";import{a as y,i as b,o as x,r as S,s as C,t as w}from"./dialog-B5pmfCdJ.js";import{n as T}from"./names-COx1nqcj.js";var E=n(e(),1),D=t(),O=e=>o(e.resources).map(t=>({id:t.id,name:t.name??t.id,groups:i(t.id,e.resources)?.groups??[]})),k=`On this machine, whoever is here is the company. No sign-in.`;function A(){let{setActor:e}=m(),{data:t}=a({...r(),select:O});return(0,D.jsx)(w,{open:!0,children:(0,D.jsx)(S,{showCloseButton:!1,children:t.length>0?(0,D.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,D.jsxs)(x,{children:[(0,D.jsx)(C,{children:`Who are you?`}),(0,D.jsxs)(b,{children:[`Runs you start and approvals you decide are recorded as you: one of the people`,` `,(0,D.jsx)(`code`,{children:`resources/people.ts`}),` declares.`]})]}),(0,D.jsx)(`div`,{className:`flex flex-col gap-2`,children:t.map(t=>(0,D.jsxs)(d,{variant:`outline`,size:`sm`,className:`text-left hover:bg-muted`,render:(0,D.jsx)(`button`,{type:`button`,onClick:()=>e(t.id)}),children:[(0,D.jsx)(c,{children:(0,D.jsx)(v,{size:`sm`,children:(0,D.jsx)(_,{className:`text-xs font-semibold`,children:T(t.name)})})}),(0,D.jsxs)(l,{className:`flex-row flex-wrap gap-1`,children:[(0,D.jsx)(u,{children:t.name}),t.groups.length>0&&(0,D.jsxs)(`span`,{className:`text-muted-foreground`,children:[`· `,t.groups.join(`, `)]})]})]},t.id))}),(0,D.jsx)(`p`,{className:`border-t pt-3 text-xs text-muted-foreground`,children:k})]}):(0,D.jsx)(j,{onName:e})})})}function j({onName:e}){let[t,n]=(0,E.useState)(``);return(0,D.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:n=>{n.preventDefault(),t.trim()&&e(t.trim())},children:[(0,D.jsxs)(x,{children:[(0,D.jsx)(C,{children:`Who are you?`}),(0,D.jsxs)(b,{children:[`Runs you start and approvals you decide are recorded under this name. Use the name approvals ask for, such as`,` `,(0,D.jsx)(`code`,{children:`marketing-lead`}),`; people declared in `,(0,D.jsx)(`code`,{children:`resources/people.ts`}),` make this a choice of them.`]})]}),(0,D.jsx)(h,{children:(0,D.jsxs)(p,{children:[(0,D.jsx)(f,{htmlFor:`who-name`,children:`Your name`}),(0,D.jsx)(g,{id:`who-name`,autoFocus:!0,autoComplete:`off`,value:t,onChange:e=>n(e.target.value),placeholder:`marketing-lead`})]})}),(0,D.jsx)(`p`,{className:`border-t pt-3 text-xs text-muted-foreground`,children:k}),(0,D.jsx)(y,{children:(0,D.jsx)(s,{type:`submit`,disabled:!t.trim(),children:`Continue`})})]})}export{A as default};
@@ -0,0 +1 @@
1
+ import{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{A as r,Q as i,Y as a,Zt as o,_t as s,ri as c}from"./queries-DGlVu9wp.js";import{Dt as l,E as u,H as d,N as f,T as p,V as m,b as h,i as g,v as _}from"./common-DHOhx6Zn.js";import{K as v,s as y}from"./kit-n8CE0xEs.js";import{t as b}from"./separator-Bdtc7rou.js";import{a as x,i as S,r as C,t as w}from"./item-B4QRpXse.js";import{n as T}from"./schema-BpqanhX0.js";var E=n(e(),1),D=t();function O({name:e}){return(0,D.jsxs)(y,{children:[`This config has no workflow named `,(0,D.jsx)(`code`,{children:e}),`. Its past runs are under`,` `,(0,D.jsx)(c,{to:`/workflows/$name`,params:{name:e},search:{view:`runs`},children:`Runs`}),`.`]})}var k=e=>e===`manual`?`By hand`:`Runs ${e.schedule} (${e.timezone??`UTC`})`;function A({workflow:e}){let{data:t}=l({...a(),select:t=>t[e.name],enabled:e.trigger!==`manual`});return(0,D.jsx)(f,{title:`Starts`,children:(0,D.jsxs)(`p`,{children:[k(e.trigger),t&&(0,D.jsxs)(D.Fragment,{children:[`, next `,(0,D.jsx)(d,{at:t})]})]})})}var j=(0,E.memo)(function({workflow:e}){let t=(0,E.useCallback)(t=>({ops:i(t),sites:s(t,`workflow`,e.name)}),[e.name]),{data:{ops:n,sites:a}}=o({...r(),select:t}),c=(0,E.useMemo)(()=>T(e.input),[e.input]);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(A,{workflow:e}),(0,D.jsx)(b,{}),(0,D.jsx)(f,{title:`Operations it may call`,children:e.ops.length===0?(0,D.jsx)(p,{}):(0,D.jsx)(x,{children:e.ops.map(e=>(0,D.jsx)(u,{id:e,op:n.get(e)},e))})}),(0,D.jsx)(b,{}),(0,D.jsx)(f,{title:`Built-ins`,children:e.builtins.length?(0,D.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.builtins.map(e=>{let t=g[e];return(0,D.jsxs)(v,{variant:`outline`,children:[(0,D.jsx)(t,{"aria-hidden":`true`,"data-icon":`inline-start`}),e]},e)})}):(0,D.jsx)(p,{})}),(0,D.jsx)(b,{}),(0,D.jsx)(f,{title:`Input`,children:c?c.length===0?(0,D.jsx)(p,{children:`No fields.`}):(0,D.jsx)(N,{fields:c}):(0,D.jsx)(h,{value:e.input})}),(0,D.jsx)(b,{}),(0,D.jsx)(f,{title:`Used by`,children:(0,D.jsx)(m,{sites:a})})]})}),M=e=>e.kind===`array`?`list of ${M(e.item)}`:e.kind===`json`?`JSON`:e.kind;function N({fields:e}){return(0,D.jsx)(x,{children:e.map(e=>(0,D.jsx)(w,{role:`listitem`,variant:`outline`,size:`xs`,children:(0,D.jsxs)(C,{children:[(0,D.jsxs)(_,{children:[(0,D.jsx)(`code`,{children:e.key}),(0,D.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:M(e)}),e.required&&(0,D.jsx)(v,{variant:`outline`,children:`required`})]}),(e.description||e.default!==void 0)&&(0,D.jsx)(S,{children:[e.description,e.default!==void 0&&`default ${JSON.stringify(e.default)}`].filter(Boolean).join(` · `)}),e.kind===`object`&&(0,D.jsx)(N,{fields:e.fields})]})},e.key))})}export{j as n,k as r,O as t};
@@ -0,0 +1 @@
1
+ import{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{A as r,Dt as i,Er as a,Mn as o,Mr as s,Or as c,Pn as l,Q as u,Tr as d,Tt as f,Zt as p,br as m,fr as h,ft as g,ii as ee,mt as _,ri as v,rt as y,vt as b}from"./queries-DGlVu9wp.js";import{D as x,Dt as te,Et as ne,F as S,G as C,H as w,N as T,P as E,Q as D,T as O,U as k,W as A,_ as re,a as ie,b as ae,c as j,d as M,gt as oe,ht as se,j as N,l as P,m as ce,mt as le,pt as ue,r as de,t as F,u as I,y as L}from"./common-DHOhx6Zn.js";import{B as R,G as z,H as B,M as V,R as fe,U as pe,V as me,a as he,d as H,i as U,j as ge,l as _e,n as ve,o as W,p as G,r as K,s as q,t as ye}from"./kit-n8CE0xEs.js";import{i as be}from"./lazyRouteComponent-DezoGNoN.js";import{r as xe}from"./start-form-CJ6VmNPY.js";import{V as Se,t as Ce}from"./button-D5kdANef.js";import{n as we,t as J}from"./utils-BRvE9-Fo.js";import{t as Te}from"./separator-Bdtc7rou.js";import{a as Y,i as Ee,n as De,r as Oe,s as ke,t as Ae}from"./item-B4QRpXse.js";import{_ as je,et as Me,v as Ne}from"./index-CHKfukjt.js";import{t as Pe}from"./X.es-B7rq0E_-.js";import{t as Fe}from"./Globe.es-C1pgZCGM.js";import{t as Ie}from"./changes-DFcdyDL_.js";import{n as Le}from"./lines-DuFrbGkQ.js";import{i as Re,t as ze}from"./motion-D6e1hqz4.js";import{n as Be,t as Ve}from"./approval-BFFM_yEl.js";import{r as He,t as Ue}from"./scenario-graph-Blv2e1PV.js";import{n as We}from"./workflow-lQtyyxKx.js";var X=n(e(),1),Ge=new Map([[`bold`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M232,116h-4.72A100.21,100.21,0,0,0,140,28.72V24a12,12,0,0,0-24,0v4.72A100.21,100.21,0,0,0,28.72,116H24a12,12,0,0,0,0,24h4.72A100.21,100.21,0,0,0,116,227.28V232a12,12,0,0,0,24,0v-4.72A100.21,100.21,0,0,0,227.28,140H232a12,12,0,0,0,0-24Zm-92,87v-3a12,12,0,0,0-24,0v3a76.15,76.15,0,0,1-63-63h3a12,12,0,0,0,0-24H53a76.15,76.15,0,0,1,63-63v3a12,12,0,0,0,24,0V53a76.15,76.15,0,0,1,63,63h-3a12,12,0,0,0,0,24h3A76.15,76.15,0,0,1,140,203ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z`}))],[`duotone`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M160,128a32,32,0,1,1-32-32A32,32,0,0,1,160,128Z`,opacity:`0.2`}),X.createElement(`path`,{d:`M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-96,87.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16h7.6A80.15,80.15,0,0,1,136,207.6ZM128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Z`}))],[`fill`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-32,16h7.6A80.15,80.15,0,0,1,136,207.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16Zm-32-8a40,40,0,1,1-40-40A40,40,0,0,1,168,128Z`}))],[`light`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M232,122H221.8A94.13,94.13,0,0,0,134,34.2V24a6,6,0,0,0-12,0V34.2A94.13,94.13,0,0,0,34.2,122H24a6,6,0,0,0,0,12H34.2A94.13,94.13,0,0,0,122,221.8V232a6,6,0,0,0,12,0V221.8A94.13,94.13,0,0,0,221.8,134H232a6,6,0,0,0,0-12Zm-98,87.76V200a6,6,0,0,0-12,0v9.76A82.09,82.09,0,0,1,46.24,134H56a6,6,0,0,0,0-12H46.24A82.09,82.09,0,0,1,122,46.24V56a6,6,0,0,0,12,0V46.24A82.09,82.09,0,0,1,209.76,122H200a6,6,0,0,0,0,12h9.76A82.09,82.09,0,0,1,134,209.76ZM128,90a38,38,0,1,0,38,38A38,38,0,0,0,128,90Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,128,154Z`}))],[`regular`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-96,87.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16h7.6A80.15,80.15,0,0,1,136,207.6ZM128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Z`}))],[`thin`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M232,124H219.91A92.13,92.13,0,0,0,132,36.09V24a4,4,0,0,0-8,0V36.09A92.13,92.13,0,0,0,36.09,124H24a4,4,0,0,0,0,8H36.09A92.13,92.13,0,0,0,124,219.91V232a4,4,0,0,0,8,0V219.91A92.13,92.13,0,0,0,219.91,132H232a4,4,0,0,0,0-8ZM132,211.9V200a4,4,0,0,0-8,0v11.9A84.11,84.11,0,0,1,44.1,132H56a4,4,0,0,0,0-8H44.1A84.11,84.11,0,0,1,124,44.1V56a4,4,0,0,0,8,0V44.1A84.11,84.11,0,0,1,211.9,124H200a4,4,0,0,0,0,8h11.9A84.11,84.11,0,0,1,132,211.9ZM128,92a36,36,0,1,0,36,36A36,36,0,0,0,128,92Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,128,156Z`}))]]),Ke=X.forwardRef((e,t)=>X.createElement(Se,{ref:t,...e,weights:Ge}));Ke.displayName=`CrosshairIcon`;var Z=t(),qe=2e3,Q;function Je(e,t){let n=document.getElementById($e(e));n&&(n.scrollIntoView({behavior:t?`auto`:`smooth`,block:`center`}),Q&&(clearTimeout(Q.timer),delete Q.item.dataset.highlighted),n.dataset.highlighted=``,Q={item:n,timer:setTimeout(()=>{delete n.dataset.highlighted,Q=void 0},qe)})}function Ye({check:e}){let t=e.settled?e.ok?`ok`:`bad`:`waiting`,n=e.settled?e.detail:`not yet`;return(0,Z.jsx)(Ae,{role:`listitem`,variant:`outline`,size:`sm`,children:(0,Z.jsxs)(Oe,{className:`min-w-0`,children:[(0,Z.jsxs)(ke,{children:[(0,Z.jsx)(H,{tone:t}),e.step]}),n&&(0,Z.jsx)(Ee,{children:n})]})})}function Xe({error:e,then:t}){let n=[e.status===void 0?``:`status ${e.status}`,e.vendorCode??``].filter(Boolean).join(`, `);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`p`,{className:`text-destructive`,children:[e.message,n&&(0,Z.jsxs)(`span`,{className:`text-muted-foreground`,children:[` (`,n,`)`]})]}),t&&(0,Z.jsx)(`p`,{className:`text-muted-foreground`,children:t})]})}function Ze(e,t,n,r){if(e>1||n?.idempotent)return`Tried ${we(e,`time`)}`;if(!n)return;let i=r[n.vendor]?.title??n.vendor;return t.vendorCode===`secret_not_set`?`Not retried: it stopped before changing anything at ${i}.`:`Not retried: this operation is not safe to repeat. Check ${i} before starting again.`}function Qe({value:e,sealed:t=!1}){if(e===void 0)return(0,Z.jsx)(O,{});if(typeof e!=`object`||!e||Array.isArray(e))return(0,Z.jsx)(ae,{value:e});let n=Object.entries(e);return n.length===0?(0,Z.jsx)(O,{children:`No fields.`}):(0,Z.jsx)(U,{children:n.map(([e,n])=>(0,Z.jsx)(K,{label:e,children:t&&e===`code`&&typeof n==`string`?(0,Z.jsxs)(`span`,{children:[`sealed · `,(0,Z.jsxs)(`code`,{className:`text-xs`,children:[n.slice(0,4),`…`]}),` `,(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:`codes never enter the ledger`})]}):typeof n==`string`?n:(0,Z.jsx)(`code`,{className:`text-xs`,children:JSON.stringify(n)})},e))})}var $e=e=>`ledger-${e}`,et=(0,X.memo)(function({record:e,titles:t,onShow:n,anchor:i=!0}){let a=e=>t.get(e)??e,{data:o}=p({...r(),select:u}),{data:s}=p({...r(),select:e=>e.vendors}),c=``,l;switch(e.type){case`run.started`:c=`started`,l=(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`p`,{children:[`Started by `,e.actor.id,e.scheduledFor&&(0,Z.jsxs)(Z.Fragment,{children:[`, on its schedule for `,(0,Z.jsx)(w,{at:e.scheduledFor})]})]}),e.workflow===`login-code`?(0,Z.jsx)(I,{label:`Input`,open:!0,children:(0,Z.jsx)(Qe,{value:e.input,sealed:!0})}):(0,Z.jsx)(M,{label:`Input`,value:e.input})]});break;case`op.called`:c=`called`,l=(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`p`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Z.jsx)(x,{id:e.op,op:o.get(e.op),effect:e.effect}),(0,Z.jsx)(j,{decision:e.decision}),(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:`${e.durationMs} ms${e.attempt&&e.attempt>1?`, attempt ${e.attempt}`:``}`})]}),e.error&&(0,Z.jsx)(Xe,{error:e.error,then:Ze(e.attempt??1,e.error,o.get(e.op),s)}),(0,Z.jsx)(M,{label:`Input`,value:e.input,open:e.workflow===h,redacted:!0}),`output`in e&&(0,Z.jsx)(M,{label:`Output`,value:e.output})]});break;case`approval.requested`:c=`asked`,l=(0,Z.jsxs)(`p`,{children:[`“`,e.title,`” asked of `,m(e.approver),` by`,` `,(0,Z.jsx)(N,{requestedBy:e.requestedBy,op:e.op,reasons:e.reasons})]});break;case`approval.decided`:c=e.decision===`approve`?`approved`:`rejected`,l=(0,Z.jsxs)(`p`,{children:[e.by,` `,e.decision===`approve`?`approved`:`rejected`,` “`,a(e.approval),`”`,e.alone?F:null,e.note?(0,Z.jsx)(P,{note:e.note}):null]});break;case`approval.withdrawn`:c=`withdrawn`,l=(0,Z.jsx)(`p`,{children:tt(e,a)});break;case`approval.refused`:c=`ignored`,l=(0,Z.jsxs)(`p`,{children:[`Ignored a message from `,e.by??`someone`,` on “`,a(e.approval),`”: `,e.reason]});break;case`scenario.seeded`:c=`seeded`,l=(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`p`,{children:[`Seeded `,e.seeds.length,` from scenario “`,e.scenario,`”`]}),e.seeds.length>0&&(0,Z.jsx)(M,{label:`Seeds`,value:e.seeds})]});break;case`sleep.started`:c=`sleeping`,l=(0,Z.jsxs)(`p`,{children:[`Until `,(0,Z.jsx)(w,{at:e.until})]});break;case`run.finished`:c=`finished`,l=(0,Z.jsx)(M,{label:`Output`,value:e.output});break;case`run.failed`:c=`failed`,l=(0,Z.jsx)(Xe,{error:e.error})}return(0,Z.jsxs)(Ae,{role:`listitem`,variant:`outline`,size:`sm`,id:i?$e(e.id):void 0,className:`scroll-mt-24 data-highlighted:bg-muted data-highlighted:ring-2 data-highlighted:ring-ring`,children:[(0,Z.jsxs)(Oe,{className:`min-w-0`,children:[(0,Z.jsxs)(ke,{children:[(0,Z.jsx)(H,{tone:C(e)}),c]}),(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:l})]}),(0,Z.jsx)(L,{at:e.at}),n&&(0,Z.jsx)(De,{className:`self-start`,children:(0,Z.jsx)(G,{tip:`Show in graph`,size:`icon-xs`,onClick:()=>n(e.id),children:(0,Z.jsx)(Ke,{"aria-hidden":`true`})})})]})});function tt(e,t){switch(e.type){case`run.started`:return`Started by ${e.actor.id}`;case`op.called`:return(0,Z.jsxs)(Z.Fragment,{children:[e.name&&e.name!==e.op&&(0,Z.jsxs)(Z.Fragment,{children:[e.name,` `]}),(0,Z.jsx)(`code`,{className:`text-xs text-muted-foreground`,children:e.op}),e.error&&(0,Z.jsx)(`span`,{className:`text-destructive`,children:` failed`})]});case`approval.requested`:return`Asked ${m(e.approver)}: “${e.title}”`;case`approval.decided`:return`${e.by} ${e.decision===`approve`?`approved`:`rejected`} “${t(e.approval)}”`;case`approval.withdrawn`:return`${e.by??`The run`} withdrew “${t(e.approval)}”: ${e.reason}`;case`approval.refused`:return`Ignored a message on “${t(e.approval)}”`;case`scenario.seeded`:return`Seeded from scenario “${e.scenario}”`;case`sleep.started`:return`${e.name??`Sleep`} until ${D(e.until)}`;case`run.finished`:return`Finished`;case`run.failed`:return(0,Z.jsxs)(`span`,{className:`text-destructive`,children:[`Failed: `,e.error.message]})}}function nt({ledger:e,titles:t}){let n=e=>t.get(e)??e;return(0,Z.jsx)(`ol`,{"aria-label":`Ledger`,className:`flex flex-col gap-1.5`,children:e.map(e=>(0,Z.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(H,{tone:C(e),className:`mt-1.5`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 wrap-anywhere`,children:tt(e,n)}),(0,Z.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:(0,Z.jsx)(A,{at:e.at})})]},e.id))})}var rt={end:{label:`end`}},it=e=>({...e.state&&{state:e.state},...e.span&&{span:e.span}});function at(e,t=rt){let n=[],r=[],i=0,a=(e,t)=>r.push({id:`${e}->${t}`,source:e,target:t}),o=(e,t)=>{n.push(e);for(let n of t)a(n,e.id);return e.id},s=(e,t)=>t??`${e}:${i++}`;function c(e,t,n){let r=n===void 0?{}:{parent:n},i=(e,t)=>[...new Set(e.flatMap(e=>c(e,t,n)))],l=(e,n)=>{let i=o({id:s(`cluster`,void 0),kind:`cluster`,label:e,...r},t);for(let e of c(n,[i],i))a(e,i);return[i]};for(let a of e)switch(a.kind){case`op`:t=[o({id:s(`op`,a.key),kind:`op`,label:a.id,...a.name&&a.name!==a.id&&{name:a.name},...a.ops&&{ops:a.ops},...r,...it(a)},t)];break;case`approval`:{let e=a.title===void 0?`approval`:`“${a.title}”`;t=[o({id:s(`approval`,a.key),kind:`approval`,label:e,...r,...it(a)},t)];break}case`sleep`:{let e=a.label??`sleep`,n=a.name&&a.name!==`Sleep`?{name:a.name}:{};t=[o({id:s(`sleep`,a.key),kind:`sleep`,label:e,...n,...r,...it(a)},t)];break}case`pending`:t=[o({id:a.key,kind:`pending`,label:`not started`,...r},t)];break;case`all`:a.branches.length&&(t=i(a.branches,t));break;case`each`:case`repeat`:t=l(a.label,a.body);break;case`try`:{let e=c(a.body,t,n);t=a.handler.length?[...e,...l(`on error`,a.handler)]:e;break}case`branch`:{let e=o({id:s(`split`,void 0),kind:`split`,label:`branch`,...r},t);t=[...new Set(a.cases.flatMap(t=>t.length?c(t,[e],n):[o({id:s(`skip`,void 0),kind:`skip`,label:`otherwise`,...r},[e])]))];break}}return t}o({id:`start`,kind:`start`,label:`start`,...t.start&&{state:t.start}},[]);let l=c(e,[`start`]);return o({id:`end`,kind:`end`,...t.end},l),{nodes:n,edges:r}}var ot=(e,t)=>e===void 0||e===t?{}:{name:e};function st(e,t,n,r=[]){let i=c(t.status),o=new Map(t.approvals.map(e=>[e.id,e])),s=[],l=new Map,u=new Map,d={tone:`ok`},f,p=new Map(a(r).map(e=>[e.path,e])),m=(e,t,n)=>{let r=t===void 0?void 0:p.get(t);if(r&&ct(r,e)&&(e.span=r.span),!n){s.push(e);return}let i=u.get(n.id);i||(i={step:{kind:`all`,branches:[]},size:n.size},u.set(n.id,i),s.push(i.step)),(i.step.branches[n.index]??=[]).push(e)};for(let t of e)switch(t.type){case`run.started`:d={tone:`ok`,recordId:t.id};break;case`op.called`:{let e=t.error!==void 0||t.decision.kind===`deny`,n={kind:`op`,id:t.op,...ot(t.name,t.op),key:`op:${t.seq}`,state:{tone:e?`bad`:`ok`,recordId:t.id,decision:t.decision.kind,durationMs:t.durationMs,...t.error?.code&&{errorCode:t.error.code}}};l.set(t.seq,n),m(n,t.node,t.group);break}case`approval.requested`:{let e=o.get(t.approval),n=e?.status??`pending`;if(t.op!==void 0&&t.opSeq!==void 0){let r=l.get(t.opSeq);if(r)e&&(r.state={...r.state,approval:e});else{let r={kind:`op`,id:t.op,...ot(t.name,t.op),key:`op:${t.opSeq}`,state:{tone:lt(n,i),recordId:t.id,...e&&{approval:e}}};l.set(t.opSeq,r),m(r,t.node,t.group)}}else{let r=i&&n===`pending`?`off`:V[n];m({kind:`approval`,title:t.title,key:`approval:${t.approval}`,state:{tone:r,recordId:t.id,...e&&{approval:e}}},t.node,t.group)}break}case`sleep.started`:{let r=!i&&t===e.at(-1)&&t.until>n;m({kind:`sleep`,key:`sleep:${t.seq}`,label:`until ${D(t.until)}`,...t.name!==void 0&&{name:t.name},state:{tone:r?`waiting`:`ok`,recordId:t.id}},t.node,t.group);break}case`run.finished`:case`run.failed`:{let e=t.type===`run.finished`;f={label:e?`finished`:`failed`,state:{tone:e?`ok`:`bad`,recordId:t.id}};break}}for(let[e,{step:t,size:n}]of u){if(!i&&t===s.at(-1))for(let r=t.branches.length;r<n;r++)t.branches[r]=[{kind:`pending`,key:`pending:${e}:${r}`}];t.branches=t.branches.filter(Boolean)}let h=e.at(-1),g=h?.type===`sleep.started`&&h.until<=n;return f??=i?{label:t.status,state:{tone:fe[t.status]}}:{label:`pending`,pending:!0,state:{tone:g?`active`:`off`}},at(s,{start:d,end:f})}function ct(e,t){switch(e.kind){case`op`:return t.kind===`op`&&d(e.id,t.id);case`approval`:return t.kind===`approval`&&(e.title===void 0||e.title===t.title);case`sleep`:return t.kind===`sleep`;default:return!1}}function lt(e,t){return e===`rejected`||e===`withdrawn`?V[e]:t?`off`:e===`approved`?`active`:`waiting`}function ut(e,t){let n=`state`in e?e.state?.recordId:void 0,r=n===void 0?void 0:t.find(e=>e.id===n);if(!r)return[];let i=new Set,a;if(r.type===`op.called`&&(a=r.seq),r.type===`approval.requested`&&(i.add(r.approval),a=r.opSeq),a!==void 0)for(let e of t)e.type===`approval.requested`&&e.opSeq===a&&i.add(e.approval);return t.filter(e=>{let t=ft(e);return e===r||t!==void 0&&i.has(t)})}function dt(e,t){let n=new Map;for(let r of e)for(let e of ut(r,t))n.set(e.id,r.id);return n}var ft=e=>e.type===`approval.requested`||e.type===`approval.decided`||e.type===`approval.withdrawn`||e.type===`approval.refused`?e.approval:void 0,pt=new Intl.ListFormat(`en`,{type:`conjunction`}),mt=e=>e.startsWith(`workflow:`)?`the start`:e;function ht(e,t){let n=new Map,r=[];t.forEach((t,i)=>{let a=mt(e[i].action.id);if(t.answer===`allow`)return;let o=t.rule?t.rule.title??t.rule.id:`The policy`;if(t.answer===`hold`){let e=JSON.stringify(t.approver),r=n.get(e)??{who:Ie(t.approver),actions:[]};r.actions.push(a),n.set(e,r)}else t.answer===`deny`?r.push(`${o} refuses ${a}${t.rule?.reason?`: ${t.rule.reason}`:``}`):r.push(`${o} may hold ${a}, depending on the input`)});let i=[...[...n.values()].map(({who:e,actions:t})=>`Will ask ${e} before ${pt.format(t)}`),...r];return i.length?`${i.join(`. `)}.`:void 0}function gt({workflow:e}){let{actor:t}=Me(),{data:n}=p({...r(),select:e=>e.policy}),{data:i}=p({...r(),select:u}),a=(0,X.useMemo)(()=>s(e,i),[e,i]),{data:o}=te({...y(t??``,e.name,a),enabled:n.defined&&!!t}),c=o&&ht(a,o);return c?(0,Z.jsx)(pe,{children:c}):null}function _t({workflow:e}){let{name:t}=e,n=be({from:`/workflows/$name`,select:e=>e.scenario}),r=ee(),i=(0,X.useMemo)(()=>g(t),[t]),{data:{scenarios:a}}=p({..._(),select:i}),o=n!==void 0,s=a.find(e=>e.name===n),c=a.length===0;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,Z.jsxs)(S,{label:`Mode`,children:[(0,Z.jsx)(E,{children:(0,Z.jsxs)(v,{to:`.`,search:e=>({...e,scenario:void 0}),activeOptions:{exact:!0},replace:!0,children:[(0,Z.jsx)(Fe,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Live vendors`]})}),(0,Z.jsx)(E,{children:(0,Z.jsxs)(v,{to:`.`,search:e=>({...e,scenario:e.scenario??a[0]?.name}),disabled:c,replace:!0,children:[(0,Z.jsx)(He,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Sandbox`]})})]}),c&&(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No scenarios for this workflow yet`})]}),o&&!c&&(0,Z.jsxs)(je,{"aria-label":`Scenario`,className:`w-full`,value:s?.name??``,onChange:e=>void r({to:`.`,search:t=>({...t,scenario:e.target.value}),replace:!0}),children:[!s&&(0,Z.jsx)(Ne,{value:``,disabled:!0,children:`Choose a scenario`}),a.map(e=>(0,Z.jsx)(Ne,{value:e.name,children:e.name},e.name))]}),o&&!s?(0,Z.jsx)(W,{title:`No scenario named “${n}”`,children:!c&&`Choose one of this workflow’s scenarios above.`}):(0,Z.jsxs)(Z.Fragment,{children:[s?(0,Z.jsx)(q,{children:`Nothing leaves Sanoma: the scenario supplies the input and the fakes answer the calls. Its approvals wait for people, as a live run’s do.`}):(0,Z.jsx)(vt,{name:t}),(0,Z.jsx)(gt,{workflow:e}),(0,Z.jsx)(xe,{workflow:e,scenario:s},s?.name??`live`),s&&(0,Z.jsx)(I,{label:`Scenario`,children:(0,Z.jsx)(`pre`,{className:`mt-1 overflow-x-auto rounded-md bg-muted p-3 font-mono text-xs`,children:s.text})})]})]})}function vt({name:e}){let t=(0,X.useMemo)(()=>f(e),[e]),{data:n}=p({...r(),select:t});return n.length===0?null:(0,Z.jsxs)(q,{children:[`Calls `,n.map(e=>e.title).join(`, `),` for real`]})}var yt={start:`Start`,end:`End`,op:`Operation`,approval:`Approval`,sleep:`Sleep`};function bt({workflow:e,run:t,newRun:n,node:r,text:i,onClose:a,onLines:o,className:s}){let c=(0,Z.jsx)(G,{tip:`Close`,size:`icon-sm`,onClick:a,children:(0,Z.jsx)(Pe,{"aria-hidden":`true`})});if(n&&e)return(0,Z.jsx)($,{title:`New run`,className:s,action:(0,Z.jsx)(ye,{variant:`ghost`,size:`icon-sm`,children:(0,Z.jsxs)(v,{to:`.`,search:e=>({...e,new:void 0}),children:[(0,Z.jsx)(Pe,{"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:`Close`})]})}),children:(0,Z.jsx)(_t,{workflow:e})});if(r){let e=t&&`state`in r&&r.state&&`approval`in r.state?r.state.approval:void 0,n=t?ut(r,t.ledger):[];return(0,Z.jsxs)($,{title:yt[r.kind]??r.kind,description:Dt(r),className:s,action:c,children:[(r.kind===`op`||r.span)&&(0,Z.jsx)(xt,{node:r,text:i,onLines:o}),t&&e?.status===`pending`&&(0,Z.jsx)(Et,{run:t.run,approval:e}),t&&n.length>0&&(0,Z.jsx)(Tt,{records:n,titles:t.titles})]})}if(t){let{run:e,approvals:n}=t;return(0,Z.jsxs)($,{title:`Run`,className:s,action:c,children:[(0,Z.jsxs)(U,{children:[(0,Z.jsx)(K,{label:`Started by`,children:l(e)}),(0,Z.jsx)(K,{label:`Started`,children:(0,Z.jsx)(A,{at:e.createdAt})}),(0,Z.jsx)(K,{label:`Run id`,children:(0,Z.jsx)(`code`,{className:`break-all`,children:e.runId})})]}),n.length===0?(0,Z.jsx)(T,{title:`Approvals`,children:(0,Z.jsx)(O,{children:`None asked for.`})}):n.map(t=>(0,Z.jsx)(Et,{run:e,approval:t},t.id))]})}return e?(0,Z.jsx)($,{title:`About`,className:s,action:c,children:(0,Z.jsx)(We,{workflow:e})}):null}function $({title:e,description:t,action:n,className:r,children:i}){return(0,Z.jsxs)(he,{"aria-label":`Inspector`,role:`region`,className:J(`gap-0 py-0`,r),children:[(0,Z.jsxs)(z,{className:`border-b py-2 compact:py-1 [.border-b]:pb-2 compact:[.border-b]:pb-1`,children:[(0,Z.jsx)(ve,{className:`self-center text-sm`,children:e}),t&&(0,Z.jsx)(pe,{className:`wrap-anywhere`,children:t}),n&&(0,Z.jsx)(me,{className:`self-center`,children:n})]}),(0,Z.jsx)(B,{className:`flex min-h-0 flex-1 flex-col gap-(--card-spacing) overflow-y-auto py-(--card-spacing)`,children:X.Children.toArray(i).map((e,t)=>(0,Z.jsxs)(X.Fragment,{children:[t>0&&(0,Z.jsx)(Te,{}),e]},(0,X.isValidElement)(e)?e.key:t))})]})}function xt({node:e,text:t,onLines:n}){let{data:i}=p({...r(),select:u}),{data:a}=p({...r(),select:e=>e.vendors}),o=e.kind===`op`?i.get(e.label):void 0;return(0,Z.jsxs)(U,{children:[e.kind===`op`&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(K,{label:`Calls`,children:(0,Z.jsx)(`span`,{className:`flex flex-wrap items-center gap-2`,children:(0,Z.jsx)(x,{id:e.label,op:o})})}),o&&(0,Z.jsx)(K,{label:`Vendor`,children:(0,Z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(k,{vendor:o.vendor,alt:``}),a[o.vendor]?.title??o.vendor]})}),o?.description&&(0,Z.jsx)(K,{label:`Does`,children:o.description}),e.ops&&e.ops.length>0&&(0,Z.jsx)(K,{label:`Can reach`,children:(0,Z.jsx)(`span`,{className:`flex flex-col`,children:e.ops.map(e=>(0,Z.jsx)(`code`,{children:e},e))})})]}),e.span&&(0,Z.jsx)(K,{label:`Source`,children:(0,Z.jsx)(X.Suspense,{fallback:`…`,children:(0,Z.jsx)(St,{span:e.span,text:t,onClick:n})})})]})}function St({span:e,text:t,onClick:n}){return`file`in t?(0,Z.jsx)(Ct,{file:t.file,span:e,onClick:n}):t.source==null?null:(0,Z.jsx)(wt,{lines:Le(t.source,e),onClick:n})}function Ct({file:e,span:t,onClick:n}){let{data:r}=p(b(e));return r.source==null?null:(0,Z.jsx)(wt,{lines:Le(r.source,t),onClick:n})}function wt({lines:[e,t],onClick:n}){return(0,Z.jsx)(Ce,{variant:`link`,size:`xs`,className:`h-auto p-0`,onClick:n,children:e===t?`Line ${e}`:`Lines ${e}–${t}`})}function Tt({records:e,titles:t}){return(0,Z.jsx)(T,{title:`Ledger`,children:(0,Z.jsx)(Y,{"aria-label":`Its ledger records`,children:e.map(e=>(0,Z.jsx)(et,{record:e,titles:t,anchor:!1},e.id))})})}function Et({run:e,approval:t}){return(0,Z.jsxs)(T,{title:(0,Z.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[t.title,(0,Z.jsx)(de,{status:t.status})]}),children:[(0,Z.jsx)(Be,{run:e,approval:t}),t.status===`pending`&&(0,Z.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:(0,Z.jsx)(Ve,{run:e,approval:t})})]})}function Dt(e){return[e.kind===`op`||e.kind===`sleep`?e.name:void 0,e.kind===`op`||e.label===e.kind?void 0:e.label].filter(Boolean).join(` · `)||void 0}function Ot({name:e,workflow:t,run:n,scenario:r,view:a=`graph`}){let s=t?.outline,c=s&&`nodes`in s?s.nodes:void 0,l=n?.ledger,u=n?.run,d=n?.at??0,f=(0,X.useMemo)(()=>{if(l&&u)return st(l,u,d,c);let e=c&&at(c);return e&&r?Ue(e,r):e},[l,u,d,c,r]),p=(0,X.useMemo)(()=>f&&l?dt(f.nodes,l):void 0,[f,l]),h=(0,X.useMemo)(()=>new Map(n?.approvals.map(e=>[e.id,e.title])),[n?.approvals]),g=(0,X.useMemo)(()=>n&&{run:n.run,ledger:n.ledger,approvals:n.approvals,titles:h},[n,h]),_=be({from:`/workflows/$name`,select:e=>e.new===!0}),[v,y]=(0,X.useState)(`ledger`),[b,x]=(0,X.useState)(),[te,S]=(0,X.useState)(!1),C=f?.nodes.find(e=>e.id===b),w=ee(),T=(0,X.useCallback)(e=>{x(e),e!==void 0&&(S(!1),_&&w({to:`.`,search:e=>({...e,new:void 0}),replace:!0}))},[_,w]),E=(0,X.useCallback)(()=>{x(void 0),S(!0)},[]),D=ze(),O=(0,X.useCallback)(e=>{T(e?.id);let t=e&&`state`in e?e.state?.recordId:void 0;n&&t&&v===`ledger`&&Je(t,D)},[T,n,v,D]),k=(0,X.useCallback)(e=>O(f&&Re(f.nodes,e)),[f,O]),A=(0,X.useRef)(null),ie=(0,X.useCallback)(e=>{T(p?.get(e)),A.current?.scrollIntoView({behavior:D?`auto`:`smooth`,block:`nearest`})},[T,p,D]),ae=(0,X.useCallback)(()=>{n?y(`code`):w({to:`.`,search:e=>({...e,view:`code`})})},[n,w]),j=(0,X.useMemo)(()=>C?.span&&[C.span],[C]),M=s===void 0?`This config has no workflow named ${e}`:`error`in s?s.error:void 0,N=M!==void 0&&(0,Z.jsx)(W,{title:`No source to show`,children:M});if(!f)return N;let P=s&&i({outline:s}),de=P===void 0?{source:t?.source}:{file:P},F=u?.status===`waiting`?o(u)[0]:void 0,I=F&&f.nodes.find(e=>`state`in e&&e.state&&`approval`in e.state&&e.state.approval?.id===F.id),L=(0,Z.jsx)(X.Suspense,{fallback:(0,Z.jsx)(ne,{role:`status`,"aria-label":`Loading the source`,className:`size-full rounded-none`}),children:N||(P===void 0?(0,Z.jsx)(jt,{source:t?.source,highlight:j,onSelect:k}):(0,Z.jsx)(At,{file:P,highlight:j,onSelect:k}))}),z=!n&&a===`code`,B=_&&t!==void 0||C!==void 0||!z&&!te,V=B&&(0,Z.jsx)(bt,{workflow:t,run:g,newRun:_,node:C,text:de,onClose:E,onLines:ae,className:`m-3 @3xl/float:absolute @3xl/float:top-3 @3xl/float:right-3 @3xl/float:m-0 @3xl/float:max-h-[calc(100%-1.5rem)] @3xl/float:w-(--float-width)`});return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-(--gap-region)`,children:[F&&(0,Z.jsx)(q,{children:(0,Z.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[`Waiting on `,m(F.approver),` for “`,F.title,`”`,I&&(0,Z.jsx)(Ce,{variant:`outline`,size:`xs`,onClick:()=>O(I),children:`Show approval`})]})}),u?.error&&(0,Z.jsx)(q,{variant:`destructive`,children:u.error}),z?(0,Z.jsxs)(R,{role:`region`,"aria-label":`Code`,className:J(ce,`gap-0 py-0`),children:[(0,Z.jsx)(`div`,{className:J(`h-(--pane)`,B&&`@3xl/float:pr-[calc(var(--float-width)+1.5rem)]`),children:L}),V]}):(0,Z.jsxs)(R,{ref:A,role:`region`,"aria-label":`Graph`,className:J(ce,`scroll-mt-4 gap-0 py-0`),children:[(0,Z.jsx)(`div`,{className:`h-(--pane-tall)`,children:(0,Z.jsx)(re,{graph:f,show:n?`end`:`start`,selected:b,onSelect:O})}),V||(0,Z.jsx)(G,{tip:n?`Show the run`:`About this workflow`,variant:`outline`,size:`icon-sm`,className:`absolute top-3 right-3`,onClick:()=>S(!1),children:(0,Z.jsx)(ge,{"aria-hidden":`true`})})]}),n&&(0,Z.jsxs)(ue,{value:v,onValueChange:e=>y(e),className:`gap-(--gap-section)`,children:[(0,Z.jsxs)(se,{children:[(0,Z.jsx)(oe,{value:`ledger`,children:`Ledger`}),(0,Z.jsx)(oe,{value:`code`,children:`Code`})]}),(0,Z.jsx)(le,{value:`ledger`,className:`flex flex-col gap-(--gap-region)`,children:(0,Z.jsx)(kt,{run:n,titles:h,nodeOf:p,onShow:ie})}),(0,Z.jsx)(le,{value:`code`,children:(0,Z.jsx)(R,{className:`h-(--pane) gap-0 py-0`,children:L})})]})]})}function kt({run:{ledger:e,ledgerError:t,checks:n,checksError:r},titles:i,nodeOf:a,onShow:o}){return(0,Z.jsxs)(Z.Fragment,{children:[(n||r)&&(0,Z.jsxs)(_e,{title:`Checks`,children:[r&&(0,Z.jsx)(q,{variant:`destructive`,children:(0,Z.jsxs)(`span`,{className:`whitespace-pre-wrap`,children:[`Could not check the run against its scenario: `,r]})}),n&&(0,Z.jsx)(Y,{"aria-label":`Checks`,children:n.map((e,t)=>(0,Z.jsx)(Ye,{check:e},t))})]}),t&&(0,Z.jsxs)(q,{variant:`destructive`,children:[`Could not read the ledger: `,t]}),e.length===0&&!t&&(0,Z.jsx)(W,{title:`Nothing recorded yet`}),e.length>0&&(0,Z.jsx)(Y,{"aria-label":`Ledger`,children:e.map(e=>(0,Z.jsx)(et,{record:e,titles:i,onShow:a?.has(e.id)?o:void 0},e.id))})]})}function At({file:e,...t}){let{data:n}=p(b(e));return(0,Z.jsx)(jt,{source:n.source,...t})}function jt({source:e,...t}){return e==null?(0,Z.jsx)(W,{title:`No source to show`}):(0,Z.jsx)(ie,{source:e,...t})}export{nt as n,Qe as r,Ot as t};
@@ -0,0 +1 @@
1
+ import{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{A as r,On as i,Zt as a,hr as o,q as s,ri as c,wt as l}from"./queries-DGlVu9wp.js";import{C as u,U as d,k as f,s as p,w as m,x as h}from"./common-DHOhx6Zn.js";import{B as g,K as _,m as v,o as y,s as b,t as x}from"./kit-n8CE0xEs.js";import{n as S}from"./utils-BRvE9-Fo.js";import{a as C,i as w,n as T,o as E,r as D,t as O}from"./table-B81tv0LG.js";import{_ as k,c as A,l as j,o as M,s as N,v as P,y as F}from"./index-CHKfukjt.js";import{t as I}from"./X.es-B7rq0E_-.js";import{t as L}from"./Plus.es-i3Vaa2WW.js";import{t as R}from"./chat-button-DNusaP5n.js";import{n as z,t as B}from"./runs-table-DMiD4HeY.js";import{t as V}from"./MagnifyingGlass.es-CZ3i6pz0.js";import{a as H,i as U,r as W,t as G}from"./app-scope-Bht7PIkQ.js";import{i as K,t as q}from"./inbox-DM2npRZI.js";import{r as J}from"./workflow-lQtyyxKx.js";var Y=n(e()),X=t(),Z={explicitUndefined:!0},Q={all:`All`,waiting:`Waiting on you`,failed:`Failed last run`,builtin:`Built-in`};function $(){let{view:e,status:t,workflow:n,filter:i=`all`,app:o}=M.useSearch(),{data:l}=a(r()),d=U(l.apps,l.workflows,e=>e.app),{tab:h,shown:g}=H(d,o),_=g.flatMap(e=>e.items),{pending:v,mine:y}=K(),b=q(y),{data:x}=a(s()),S={all:()=>!0,waiting:e=>!!b[e.name],failed:e=>x[e.name]?.status===`failed`,builtin:e=>!!e.builtin},C=e===`runs`;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(p,{count:l.workflows.length,action:(0,X.jsxs)(R,{prompt:`Make a workflow that `,children:[(0,X.jsx)(L,{"aria-hidden":`true`,"data-icon":`inline-start`}),`New workflow`]}),children:[(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 text-sm text-muted-foreground`,children:[`Version`,(0,X.jsx)(`code`,{className:`max-w-48 truncate`,title:l.version,children:l.version})]}),!l.policy.defined&&(0,X.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`No policy: every operation call is allowed`})]}),l.policy.problems&&(0,X.jsx)(f,{}),(0,X.jsxs)(m,{label:`Show`,value:C?`runs`:i,children:[A.map(e=>(0,X.jsx)(u,{value:e,link:(0,X.jsx)(c,{to:`/workflows`,search:{filter:e===`all`?void 0:e,view:void 0,app:h},activeOptions:Z}),count:_.filter(S[e]).length,children:Q[e]},e)),(0,X.jsx)(u,{value:`runs`,link:(0,X.jsx)(c,{to:`/workflows`,search:{view:`runs`}}),children:`All runs`})]}),!C&&(0,X.jsx)(W,{groups:d,tab:h,link:e=>(0,X.jsx)(c,{to:`/workflows`,search:{filter:i===`all`?void 0:i,app:e}})}),C?(0,X.jsx)(ie,{status:t,workflow:n}):(0,X.jsx)(te,{groups:g.map(e=>({...e,items:e.items.filter(S[i])})),none:l.workflows.length===0,waiting:q(v),yours:b,last:x})]})}var ee=(e,t)=>t===``||`${e.title??``} ${e.name}`.toLocaleLowerCase(`en`).includes(t.toLocaleLowerCase(`en`));function te({groups:e,none:t,waiting:n,yours:i,last:o}){let[s,c]=(0,Y.useState)(``),{data:u}=a({...r(),select:l});if(t)return(0,X.jsx)(g,{className:`py-0`,children:(0,X.jsx)(y,{className:`border-0`,title:`This config has no workflows`})});let d=e.map(e=>({...e,items:e.items.filter(e=>ee(e,s.trim())).toSorted((e,t)=>(i[t.name]??0)-(i[e.name]??0)||(o[t.name]?.createdAt??0)-(o[e.name]?.createdAt??0))})).filter(e=>e.items.length>0);return(0,X.jsxs)(g,{className:`gap-0 py-0`,children:[(0,X.jsx)(`div`,{className:`flex items-center gap-2 p-3`,children:(0,X.jsxs)(`div`,{className:`relative w-full max-w-64`,children:[(0,X.jsx)(V,{"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground`}),(0,X.jsx)(F,{type:`search`,"aria-label":`Find a workflow`,placeholder:`Find a workflow`,value:s,onChange:e=>c(e.target.value),className:`pl-8`})]})}),d.length===0?(0,X.jsx)(y,{className:`border-0 border-t`,title:`No workflow matches`}):(0,X.jsxs)(O,{className:`border-t`,children:[(0,X.jsx)(C,{children:(0,X.jsxs)(E,{children:[(0,X.jsx)(w,{children:`Workflow`}),(0,X.jsx)(w,{children:`Starts`}),(0,X.jsx)(w,{children:`Uses`}),(0,X.jsx)(w,{children:`Last run`}),(0,X.jsx)(w,{className:`text-right`,children:`Waiting`})]})}),(0,X.jsx)(T,{children:d.map(e=>(0,X.jsxs)(Y.Fragment,{children:[d.length>1&&(0,X.jsx)(G,{group:e,columns:5}),e.items.map(e=>(0,X.jsx)(re,{workflow:e,vendors:u[e.name]??ne,last:o[e.name],waiting:n[e.name]??0,yours:i[e.name]??0},e.name))]},e.key))})]})]})}var ne=[],re=(0,Y.memo)(function({workflow:e,vendors:t,last:n,waiting:r,yours:i}){let{name:a}=e;return(0,X.jsxs)(B,{link:{to:`/workflows/$name`,params:{name:a}},children:[(0,X.jsx)(D,{className:`font-medium`,children:(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,X.jsx)(c,{to:`/workflows/$name`,params:{name:a},onClick:e=>e.stopPropagation(),children:e.title??a}),(0,X.jsx)(`code`,{className:`text-xs font-normal text-muted-foreground`,children:a}),e.builtin&&(0,X.jsx)(_,{variant:`secondary`,children:`built-in`}),i>0&&(0,X.jsxs)(v,{tone:`waiting`,dot:!0,children:[i,` waiting on you`]})]})}),(0,X.jsx)(D,{className:`text-muted-foreground`,children:J(e.trigger)}),(0,X.jsx)(D,{children:(0,X.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:t.map(e=>(0,X.jsxs)(_,{variant:`outline`,children:[(0,X.jsx)(d,{vendor:e.id,alt:``,className:`size-3`}),e.title]},e.id))})}),(0,X.jsx)(D,{children:(0,X.jsx)(h,{run:n})}),(0,X.jsx)(D,{className:`text-right`,children:r>0?(0,X.jsx)(`span`,{className:`tabular-nums`,children:S(r,`approval`)}):(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:`-`})})]})});function ie({status:e,workflow:t}){let n=M.useNavigate(),{data:r,error:s}=a(j(e,t));return(0,X.jsxs)(X.Fragment,{children:[s&&(0,X.jsxs)(b,{variant:`destructive`,children:[`Could not refresh runs: `,s.message]}),(0,X.jsxs)(g,{className:`gap-0 py-0`,children:[(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 p-3`,children:[(0,X.jsxs)(k,{size:`sm`,"aria-label":`Status`,value:e??``,onChange:e=>void n({search:t=>({...t,status:N.shape.status.parse(e.target.value)}),replace:!0}),children:[(0,X.jsx)(P,{value:``,children:`Any status`}),o.map(e=>(0,X.jsx)(P,{value:e,children:e},e))]}),t!==void 0&&(0,X.jsxs)(_,{variant:`outline`,className:`h-7 gap-1 pr-0.5`,children:[`Workflow: `,(0,X.jsx)(`code`,{children:t}),(0,X.jsx)(x,{variant:`ghost`,size:`icon-xs`,className:`size-5`,children:(0,X.jsxs)(c,{to:`.`,search:e=>({...e,workflow:void 0}),replace:!0,children:[(0,X.jsx)(I,{"aria-hidden":`true`}),(0,X.jsx)(`span`,{className:`sr-only`,children:`Any workflow`})]})})]})]}),r.length===0?(0,X.jsx)(y,{className:`border-0 border-t`,title:e?`No runs with that status`:t===void 0?`No runs yet`:`No runs of that workflow`}):(0,X.jsx)(z,{runs:r,className:`border-t`}),r.length===i.default&&(0,X.jsxs)(`p`,{className:`border-t px-4 py-2 text-xs text-muted-foreground`,children:[`Showing the latest `,i.default]})]})]})}export{$ as component};
@@ -0,0 +1 @@
1
+ var e=[Object.freeze(JSON.parse(`{"displayName":"YAML","fileTypes":["yaml","yml","rviz","reek","clang-format","yaml-tmlanguage","syntax","sublime-syntax"],"firstLineMatch":"^%YAML( ?1.\\\\d+)?","name":"yaml","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#directive"},{"match":"^---","name":"entity.other.document.begin.yaml"},{"match":"^\\\\.{3}","name":"entity.other.document.end.yaml"},{"include":"#node"}],"repository":{"block-collection":{"patterns":[{"include":"#block-sequence"},{"include":"#block-mapping"}]},"block-mapping":{"patterns":[{"include":"#block-pair"}]},"block-node":{"patterns":[{"include":"#prototype"},{"include":"#block-scalar"},{"include":"#block-collection"},{"include":"#flow-scalar-plain-out"},{"include":"#flow-node"}]},"block-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"1":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=\\\\?)|^ *(:)|(:)","endCaptures":{"1":{"name":"punctuation.separator.key-value.mapping.yaml"},"2":{"name":"invalid.illegal.expected-newline.yaml"}},"name":"meta.block-mapping.yaml","patterns":[{"include":"#block-node"}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},{"match":":(?=\\\\s|$)","name":"punctuation.separator.key-value.mapping.yaml"}]},"block-scalar":{"begin":"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)","beginCaptures":{"1":{"name":"keyword.control.flow.block-scalar.literal.yaml"},"2":{"name":"keyword.control.flow.block-scalar.folded.yaml"},"3":{"name":"constant.numeric.indentation-indicator.yaml"},"4":{"name":"storage.modifier.chomping-indicator.yaml"},"5":{"patterns":[{"include":"#comment"},{"match":".+","name":"invalid.illegal.expected-comment-or-newline.yaml"}]}},"end":"^(?=\\\\S)|(?!\\\\G)","patterns":[{"begin":"^( +)(?! )","end":"^(?!\\\\1|\\\\s*$)","name":"string.unquoted.block.yaml"}]},"block-sequence":{"match":"(-)(?!\\\\S)","name":"punctuation.definition.block.sequence.item.yaml"},"comment":{"begin":"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.yaml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.yaml"}},"end":"\\\\n","name":"comment.line.number-sign.yaml"}]},"directive":{"begin":"^%","beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.yaml"}},"end":"(?=$|[\\\\t ]+($|#))","name":"meta.directive.yaml","patterns":[{"captures":{"1":{"name":"keyword.other.directive.yaml.yaml"},"2":{"name":"constant.numeric.yaml-version.yaml"}},"match":"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)"},{"captures":{"1":{"name":"keyword.other.directive.tag.yaml"},"2":{"name":"storage.type.tag-handle.yaml"},"3":{"name":"support.type.tag-prefix.yaml"}},"match":"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?"},{"captures":{"1":{"name":"support.other.directive.reserved.yaml"},"2":{"name":"string.unquoted.directive-name.yaml"},"3":{"name":"string.unquoted.directive-parameter.yaml"}},"match":"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?"},{"match":"\\\\S+","name":"invalid.illegal.unrecognized.yaml"}]},"flow-alias":{"captures":{"1":{"name":"keyword.control.flow.alias.yaml"},"2":{"name":"punctuation.definition.alias.yaml"},"3":{"name":"variable.other.alias.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?"},"flow-collection":{"patterns":[{"include":"#flow-sequence"},{"include":"#flow-mapping"}]},"flow-mapping":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.mapping.begin.yaml"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.mapping.end.yaml"}},"name":"meta.flow-mapping.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.mapping.yaml"},{"include":"#flow-pair"}]},"flow-node":{"patterns":[{"include":"#prototype"},{"include":"#flow-alias"},{"include":"#flow-collection"},{"include":"#flow-scalar"}]},"flow-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"0":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.explicit.yaml","patterns":[{"include":"#prototype"},{"include":"#flow-pair"},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","beginCaptures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","patterns":[{"include":"#flow-value"}]}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"meta.flow-pair.key.yaml","patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","captures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.yaml","patterns":[{"include":"#flow-value"}]}]},"flow-scalar":{"patterns":[{"include":"#flow-scalar-double-quoted"},{"include":"#flow-scalar-single-quoted"},{"include":"#flow-scalar-plain-in"}]},"flow-scalar-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.double.yaml","patterns":[{"match":"\\\\\\\\([ \\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})","name":"constant.character.escape.yaml"},{"match":"\\\\\\\\\\\\n","name":"constant.character.escape.double-quoted.newline.yaml"}]},"flow-scalar-plain-in":{"patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},"flow-scalar-plain-in-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])"}]},"flow-scalar-plain-out":{"patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},"flow-scalar-plain-out-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))"}]},"flow-scalar-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"'(?!')","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.single.yaml","patterns":[{"match":"''","name":"constant.character.escape.single-quoted.yaml"}]},"flow-sequence":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.sequence.begin.yaml"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.sequence.end.yaml"}},"name":"meta.flow-sequence.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.sequence.yaml"},{"include":"#flow-pair"},{"include":"#flow-node"}]},"flow-value":{"patterns":[{"begin":"\\\\G(?![],}])","end":"(?=[],}])","name":"meta.flow-pair.value.yaml","patterns":[{"include":"#flow-node"}]}]},"node":{"patterns":[{"include":"#block-node"}]},"property":{"begin":"(?=[!\\\\&])","end":"(?!\\\\G)","name":"meta.property.yaml","patterns":[{"captures":{"1":{"name":"keyword.control.property.anchor.yaml"},"2":{"name":"punctuation.definition.anchor.yaml"},"3":{"name":"entity.name.type.anchor.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?"},{"match":"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)","name":"storage.type.tag-handle.yaml"},{"match":"\\\\S+","name":"invalid.illegal.tag-handle.yaml"}]},"prototype":{"patterns":[{"include":"#comment"},{"include":"#property"}]}},"scopeName":"source.yaml","aliases":["yml"]}`))];export{e as default};
@@ -56,10 +56,10 @@ export interface AppOptions {
56
56
  */
57
57
  ingress?: readonly IngressRoute[];
58
58
  /**
59
- * Called right before each change a worker must run that the app makes: a run's start (drift,
60
- * apply and a held call are starts) and an approval's decision; never for a read
61
- * (`ClientOptions.onWrite`). `sanoma serve` starts its worker again with it once the worker
62
- * stopped itself. Must not throw.
59
+ * Called right after each change a worker must run that the app makes commits: a run's start
60
+ * (drift, apply and a held call are starts) and an approval's decision; never for a read
61
+ * (`ClientOptions.onWrite`). `sanoma serve` wakes its worker with it (`Supervisor.wake`). Must
62
+ * not throw.
63
63
  */
64
64
  onWrite?: () => void;
65
65
  }
@@ -1,5 +1,7 @@
1
1
  import type { CheckResult } from "sanoma/workflows";
2
- import { DefaultChatTransport, type InferUITools, type UIMessage } from "ai";
2
+ import type { AgentEntry } from "sanoma/workflows/description";
3
+ import { type ChatStatus, DefaultChatTransport, type InferUITools, type UIMessage } from "ai";
4
+ import type { AppConfig } from "../api.ts";
3
5
  import type { LoopTools } from "../steps/agent/tools.ts";
4
6
  /**
5
7
  * The draft card's data, the `data-draft` part an engine writes (one per reply, by the id
@@ -33,35 +35,66 @@ export interface SignInCard {
33
35
  /** What to do in the command's own terminal once it starts, for `once`. */
34
36
  after?: string;
35
37
  }
38
+ /** The account a chat's agent runs on: the company's key (our loop's model, or an agent's `onKey`), or the person's own plan over ACP (`own`). */
39
+ export type Plan = "onKey" | "own";
36
40
  /**
37
- * The engines a chat can open on, by the name its row keeps, with the name the chat shows: our
38
- * loop, an existing coding agent through `HarnessAgent` on the company's key, or a person's own
39
- * coding agent over ACP on their own plan (`acp-<agent>`, `ownPlan`).
41
+ * What a chat runs on: the agent (`loop`, our own, or a coding agent's id,
42
+ * `ConfigDescription.agents`) and the account it runs on. A chat's row and the engine cookie keep
43
+ * it as one name (`engineName`), which every chat ever opened reads back with `engineOf`: `loop`,
44
+ * `<id>` on the company's key, `acp-<id>` on a person's own plan.
40
45
  */
41
- export declare const ENGINE_NAMES: {
42
- readonly loop: "Sanoma";
43
- readonly pi: "Pi";
44
- readonly "claude-code": "Claude Code";
45
- readonly "acp-copilot": "Copilot (your plan)";
46
- readonly "acp-opencode": "OpenCode (your plan)";
47
- readonly "acp-pi": "Pi (your plan)";
48
- readonly "acp-claude-code": "Claude Code (your plan)";
49
- readonly "acp-codex": "Codex (your plan)";
50
- };
51
- /** Whether an engine spends the person's own plan: their own agent over ACP. */
52
- export declare const ownPlan: (engine: string) => boolean;
46
+ export interface ChatEngine {
47
+ agent: string;
48
+ plan: Plan;
49
+ }
50
+ /** A chat's engine, from the name its row or the cookie keeps (`engineName`). */
51
+ export declare const engineOf: (name: string) => ChatEngine;
52
+ /** The name a chat's row and the cookie keep for an engine (`engineOf` reads it). */
53
+ export declare const engineName: ({ agent, plan }: ChatEngine) => string;
54
+ /** An engine as the chat offers and labels it: its name, its agent's title and mark (from its connector; none for our loop, whose mark is Sanoma's), and its label, the title with the plan. */
55
+ export interface EngineOption extends ChatEngine {
56
+ name: string;
57
+ title: string;
58
+ label: string;
59
+ mark?: AgentEntry["mark"];
60
+ /** A person's own plan whose sign-in is a command they run once on their computer (`AgentEntry.once`). */
61
+ once?: true;
62
+ }
63
+ /**
64
+ * The company's engines: our loop, then each coding agent its connectors give
65
+ * (`ConfigDescription.agents`) on the company's key, then each on a person's own plan.
66
+ */
67
+ export declare function enginesOf(agents: AgentEntry[]): EngineOption[];
68
+ /**
69
+ * Whether a live instance declares no box for the coding agents, which run in one there
70
+ * (`DECLARE_BOX`): no resource whose type meets the `sandbox` contract.
71
+ */
72
+ export declare const boxless: (config: Pick<AppConfig, "place" | "resources" | "resourceTypes">) => boolean;
73
+ /**
74
+ * The engines a chat can open on here, in `enginesOf`'s order: on a live instance, no coding
75
+ * agent while it declares no box (`boxless`), and no own plan whose sign-in runs once on the
76
+ * person's computer. A turn on any other fails, saying why.
77
+ */
78
+ export declare function enginesHere(config: AppConfig): EngineOption[];
53
79
  /** Whether an engine answers on the company's model connector (`chatModel`): our loop; a coding agent says what it lacks itself. */
54
80
  export declare const onModelConnector: (engine: string) => engine is "loop";
55
81
  /** The connector a company without a model adds: Anthropic's, which the template installs. */
56
82
  export declare const MODEL_CONNECTOR = "@sanoma-ai/connector-anthropic";
57
83
  /** The file a coding agent's built-in call names: the cross-harness `file_path`, or an adapter's own field. */
58
84
  export declare function pathOf(input: unknown): string | undefined;
59
- /** An engine's name, as a chat's row keeps it. */
60
- export type EngineName = keyof typeof ENGINE_NAMES;
85
+ /**
86
+ * What a reply suggests the person ask next, the `data-suggestions` part (by the id `suggestions`)
87
+ * every engine's reply gets from the asks its text ends with (`suggestedAsks`): each worded as the
88
+ * person would type it, which the chat shows as a button that sends it.
89
+ */
90
+ export interface Suggestions {
91
+ asks: string[];
92
+ }
61
93
  /** The data parts of a chat message, by name: `data-<name>`. */
62
94
  export type ChatData = {
63
95
  draft: DraftCard;
64
96
  signIn: SignInCard;
97
+ suggestions: Suggestions;
65
98
  };
66
99
  /**
67
100
  * A message of the operator agent's chat: our loop's tools typed (`InferAgentUIMessage` of its
@@ -88,8 +121,19 @@ export declare function errorParts(text: string): {
88
121
  text: string;
89
122
  vendor?: string;
90
123
  };
124
+ /**
125
+ * Whether a message is the cue for the agent to speak first (`POST /api/chat`'s `start`): the
126
+ * app's own, kept in the transcript as the turn's message but never shown.
127
+ */
128
+ export declare const isIntro: (message: UIMessage) => boolean;
129
+ /** Whether the person has written in a chat: a message of theirs that is not the agent's cue (`isIntro`). */
130
+ export declare const written: (messages: UIMessage[]) => boolean;
91
131
  /** A message's text, its text parts joined by `separator`. */
92
132
  export declare const textOf: (message: UIMessage, separator?: string) => string;
133
+ /** Whether a turn is under way. */
134
+ export declare const isBusy: (status: ChatStatus) => status is "streaming" | "submitted";
135
+ /** What a reply suggests the person ask next: its last `data-suggestions` part's asks, else none. */
136
+ export declare const suggestionsOf: (message: ChatMessage) => string[];
93
137
  /**
94
138
  * A part a turn left under way: text still streaming, a tool call without its result, or a held
95
139
  * lookup's preliminary output. The chat offers Continue after one; the server settles it (`settle`).
@@ -99,6 +143,7 @@ export declare const unfinished: (part: UIMessage["parts"][number]) => boolean;
99
143
  * The chat's transport to `POST /api/chat` (`api`), as the chat column makes it: only the new
100
144
  * message is sent, the server reading the rest from the chat's transcript, with the engine a new
101
145
  * chat opens on when the send names one (`sendMessage(message, { body: { engine } })`; a chat
102
- * keeps the one it opened on).
146
+ * keeps the one it opened on), and `start` when the message is the agent's cue to speak first
147
+ * (`sendMessage({ text: "", metadata: { intro: true } }, { body: { engine, start: true } })`).
103
148
  */
104
149
  export declare const chatTransport: (api: string, headers: () => Record<string, string>) => DefaultChatTransport<ChatMessage>;
@@ -1,21 +1,45 @@
1
- import { DefaultChatTransport, isTextUIPart, isToolUIPart } from "ai";
1
+ import { DefaultChatTransport, isTextUIPart, isToolUIPart, } from "ai";
2
+ /** A chat's engine, from the name its row or the cookie keeps (`engineName`). */
3
+ export const engineOf = (name) => name.startsWith("acp-") ? { agent: name.slice("acp-".length), plan: "own" } : { agent: name, plan: "onKey" };
4
+ /** The name a chat's row and the cookie keep for an engine (`engineOf` reads it). */
5
+ export const engineName = ({ agent, plan }) => (plan === "own" ? `acp-${agent}` : agent);
6
+ /** A coding agent's engine on `plan`. */
7
+ const agentEngine = (agent, plan) => ({
8
+ name: engineName({ agent: agent.id, plan }),
9
+ agent: agent.id,
10
+ plan,
11
+ title: agent.title,
12
+ label: plan === "own" ? `${agent.title} (your plan)` : agent.title,
13
+ ...(agent.mark && { mark: agent.mark }),
14
+ ...(plan === "own" && agent.once && { once: true }),
15
+ });
2
16
  /**
3
- * The engines a chat can open on, by the name its row keeps, with the name the chat shows: our
4
- * loop, an existing coding agent through `HarnessAgent` on the company's key, or a person's own
5
- * coding agent over ACP on their own plan (`acp-<agent>`, `ownPlan`).
17
+ * The company's engines: our loop, then each coding agent its connectors give
18
+ * (`ConfigDescription.agents`) on the company's key, then each on a person's own plan.
6
19
  */
7
- export const ENGINE_NAMES = {
8
- loop: "Sanoma",
9
- pi: "Pi",
10
- "claude-code": "Claude Code",
11
- "acp-copilot": "Copilot (your plan)",
12
- "acp-opencode": "OpenCode (your plan)",
13
- "acp-pi": "Pi (your plan)",
14
- "acp-claude-code": "Claude Code (your plan)",
15
- "acp-codex": "Codex (your plan)",
16
- };
17
- /** Whether an engine spends the person's own plan: their own agent over ACP. */
18
- export const ownPlan = (engine) => engine.startsWith("acp-");
20
+ export function enginesOf(agents) {
21
+ return [
22
+ { name: "loop", agent: "loop", plan: "onKey", title: "Sanoma", label: "Sanoma" },
23
+ ...agents.filter((agent) => agent.onKey).map((agent) => agentEngine(agent, "onKey")),
24
+ ...agents.filter((agent) => agent.own).map((agent) => agentEngine(agent, "own")),
25
+ ];
26
+ }
27
+ /**
28
+ * Whether a live instance declares no box for the coding agents, which run in one there
29
+ * (`DECLARE_BOX`): no resource whose type meets the `sandbox` contract.
30
+ */
31
+ export const boxless = (config) => config.place === "live" &&
32
+ !config.resources.some((r) => config.resourceTypes.find((t) => t.id === `${r.vendor}.${r.type}`)?.capabilities?.includes("sandbox"));
33
+ /**
34
+ * The engines a chat can open on here, in `enginesOf`'s order: on a live instance, no coding
35
+ * agent while it declares no box (`boxless`), and no own plan whose sign-in runs once on the
36
+ * person's computer. A turn on any other fails, saying why.
37
+ */
38
+ export function enginesHere(config) {
39
+ const live = config.place === "live";
40
+ const box = !boxless(config);
41
+ return enginesOf(config.agents).filter((e) => e.agent === "loop" || (box && !(live && e.once)));
42
+ }
19
43
  /** Whether an engine answers on the company's model connector (`chatModel`): our loop; a coding agent says what it lacks itself. */
20
44
  export const onModelConnector = (engine) => engine === "loop";
21
45
  /** The connector a company without a model adds: Anthropic's, which the template installs. */
@@ -42,11 +66,22 @@ export function errorParts(text) {
42
66
  const found = / \[connector:([\w-]+)\]$/.exec(text);
43
67
  return found ? { text: text.slice(0, found.index), vendor: found[1] } : { text };
44
68
  }
69
+ /**
70
+ * Whether a message is the cue for the agent to speak first (`POST /api/chat`'s `start`): the
71
+ * app's own, kept in the transcript as the turn's message but never shown.
72
+ */
73
+ export const isIntro = (message) => message.metadata?.intro === true;
74
+ /** Whether the person has written in a chat: a message of theirs that is not the agent's cue (`isIntro`). */
75
+ export const written = (messages) => messages.some((m) => m.role === "user" && !isIntro(m));
45
76
  /** A message's text, its text parts joined by `separator`. */
46
77
  export const textOf = (message, separator = "\n\n") => message.parts
47
78
  .filter(isTextUIPart)
48
79
  .map((part) => part.text)
49
80
  .join(separator);
81
+ /** Whether a turn is under way. */
82
+ export const isBusy = (status) => status === "submitted" || status === "streaming";
83
+ /** What a reply suggests the person ask next: its last `data-suggestions` part's asks, else none. */
84
+ export const suggestionsOf = (message) => message.parts.findLast((part) => part.type === "data-suggestions")?.data.asks ?? [];
50
85
  /**
51
86
  * A part a turn left under way: text still streaming, a tool call without its result, or a held
52
87
  * lookup's preliminary output. The chat offers Continue after one; the server settles it (`settle`).
@@ -60,13 +95,14 @@ export const unfinished = (part) => isToolUIPart(part)
60
95
  * The chat's transport to `POST /api/chat` (`api`), as the chat column makes it: only the new
61
96
  * message is sent, the server reading the rest from the chat's transcript, with the engine a new
62
97
  * chat opens on when the send names one (`sendMessage(message, { body: { engine } })`; a chat
63
- * keeps the one it opened on).
98
+ * keeps the one it opened on), and `start` when the message is the agent's cue to speak first
99
+ * (`sendMessage({ text: "", metadata: { intro: true } }, { body: { engine, start: true } })`).
64
100
  */
65
101
  export const chatTransport = (api, headers) => new DefaultChatTransport({
66
102
  api,
67
103
  headers,
68
104
  prepareSendMessagesRequest: ({ id, messages, body }) => ({
69
- body: { id, message: messages.at(-1), engine: body?.engine },
105
+ body: { id, message: messages.at(-1), engine: body?.engine, start: body?.start },
70
106
  }),
71
107
  });
72
108
  //# s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AAE,OAAqC,EAAE,EAAE,CAClF,IAAI,oBAAoB,CAAc;IACpC,GAAG;IACH,OAAO;IACP,0BAA0B,EAAE,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QACvD,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE;KACjF,CAAC;CACH,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
- import { s as Notice } from "./kit-D6EulwBe.js";
2
- import { d as Route } from "./router-BvYtxrVN.js";
1
+ import { s as Notice } from "./kit-DlT_THim.js";
2
+ import { d as Route } from "./router-Co6gRNI1.js";
3
3
  import { jsxs } from "react/jsx-runtime";
4
4
  // src/routes/runs/$id.tsx?tsr-split=notFoundComponent
5
5
  var SplitNotFoundComponent = () => /* @__PURE__ */ jsxs(Notice, {
@@ -1,5 +1,5 @@
1
- import { s as Notice } from "./kit-D6EulwBe.js";
2
- import { C as Route } from "./router-BvYtxrVN.js";
1
+ import { s as Notice } from "./kit-DlT_THim.js";
2
+ import { T as Route } from "./router-Co6gRNI1.js";
3
3
  import { jsxs } from "react/jsx-runtime";
4
4
  // src/routes/changes/$id.tsx?tsr-split=notFoundComponent
5
5
  /**
@@ -1,13 +1,15 @@
1
- import { n as plural, t as cn } from "./utils-wksS9pYh.js";
2
- import { N as CardFooter, P as CardHeader, a as FloatingCard, i as Facts, j as CardContent, k as Card, l as Region, m as ToneBadge, n as CardHeading, r as Fact, s as Notice, v as CHANGE_TONE, x as GRID_CHANGE_TONE } from "./kit-D6EulwBe.js";
3
- import { Ct as TableChangePlan, Dt as fileOnly, Et as diffLines, It as typeWords, Mt as renamed, St as NO_SQL, _t as runName, vt as starterName, wt as allRecords } from "./middleware-B8JRLyxx.js";
4
- import { M as configQuery, Nt as workflowTitles, T as changeQuery, j as collectionNamed, rt as permissionsQuery, t as Button, ut as runLink } from "./button-f9Lc8qLl.js";
5
- import { G as When, P as Section, g as FloatHost, it as CollapsibleTrigger, nt as Collapsible, o as Commit, p as FLOAT, rt as CollapsibleContent, s as CrumbHeader } from "./common-CWHLj7KV.js";
6
- import { a as filesOf, c as phaseLabel, l as ruleOf, n as PullRequestLink, o as groupFiles, r as approverName, s as isSettled } from "./change-glance-CpArIbGS.js";
7
- import { a as diffGrids, n as cellSpoken, o as diffSummary, r as cellWords, s as onlyChanged, t as answerWords } from "./grid-diff-jTvp-8wS.js";
8
- import { r as PUBLISH_VERBS, t as ApprovalDecision } from "./approval-Su315ikC.js";
9
- import { C as Route } from "./router-BvYtxrVN.js";
10
- import { n as PermissionsTable } from "./permissions-grid-DWP9FAAS.js";
1
+ import { n as plural, t as cn } from "./utils-CHesvfjo.js";
2
+ import { N as CardFooter, P as CardHeader, a as FloatingCard, i as Facts, j as CardContent, k as Card, l as Region, m as ToneBadge, n as CardHeading, r as Fact, s as Notice, v as CHANGE_TONE, x as GRID_CHANGE_TONE } from "./kit-DlT_THim.js";
3
+ import { Ct as TableChangePlan, Dt as fileOnly, Et as diffLines, It as typeWords, Mt as renamed, St as NO_SQL, _t as runName, vt as starterName, wt as allRecords } from "./middleware-B6RPW0fH.js";
4
+ import { A as configQuery, C as changeQuery, ct as runLink, jt as workflowTitles, k as collectionNamed, tt as permissionsQuery } from "./queries-DJcZ4mzA.js";
5
+ import { t as Button } from "./button-Xwx3rpQ0.js";
6
+ import { N as Section, W as When, g as FloatHost, it as CollapsibleTrigger, nt as Collapsible, o as Commit, p as FLOAT, rt as CollapsibleContent, s as CrumbHeader } from "./common-DpZcJvCy.js";
7
+ import { a as isSettled, i as groupFiles, o as phaseLabel, r as filesOf, s as ruleOf, t as approverName } from "./changes-B5P8BJSf.js";
8
+ import { a as diffGrids, n as cellSpoken, o as diffSummary, r as cellWords, s as onlyChanged, t as answerWords } from "./grid-diff-D5bQDKl2.js";
9
+ import { n as PullRequestLink } from "./change-glance-Bc4htVPy.js";
10
+ import { r as PUBLISH_VERBS, t as ApprovalDecision } from "./approval-BjTnfr1U.js";
11
+ import { T as Route } from "./router-Co6gRNI1.js";
12
+ import { n as PermissionsTable } from "./permissions-grid-CcYUiqhD.js";
11
13
  import { useMemo, useState } from "react";
12
14
  import { Link, notFound } from "@tanstack/react-router";
13
15
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { s as Notice } from "./kit-D6EulwBe.js";
2
- import { n as Route } from "./router-BvYtxrVN.js";
1
+ import { s as Notice } from "./kit-DlT_THim.js";
2
+ import { n as Route } from "./router-Co6gRNI1.js";
3
3
  import { jsxs } from "react/jsx-runtime";
4
4
  // src/routes/workflows/$name/runs/$id.tsx?tsr-split=notFoundComponent
5
5
  /**
@@ -1,9 +1,9 @@
1
- import { C as RUN_TONE, m as ToneBadge, s as Notice, t as ButtonLink } from "./kit-D6EulwBe.js";
2
- import { vt as starterName } from "./middleware-B8JRLyxx.js";
3
- import { dt as runQuery, wt as useWorkflow } from "./button-f9Lc8qLl.js";
4
- import { G as When, N as SandboxBadge, s as CrumbHeader } from "./common-CWHLj7KV.js";
5
- import { n as Route } from "./router-BvYtxrVN.js";
6
- import { t as WorkflowView } from "./workflow-view-C8X8U11S.js";
1
+ import { C as RUN_TONE, m as ToneBadge, s as Notice, t as ButtonLink } from "./kit-DlT_THim.js";
2
+ import { vt as starterName } from "./middleware-B6RPW0fH.js";
3
+ import { St as useWorkflow, lt as runQuery } from "./queries-DJcZ4mzA.js";
4
+ import { M as SandboxBadge, W as When, s as CrumbHeader } from "./common-DpZcJvCy.js";
5
+ import { n as Route } from "./router-Co6gRNI1.js";
6
+ import { t as WorkflowView } from "./workflow-view-yF48p1lu.js";
7
7
  import { useMemo } from "react";
8
8
  import { Link } from "@tanstack/react-router";
9
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1,21 +1,21 @@
1
- import { n as plural, t as cn } from "./utils-wksS9pYh.js";
2
- import { A as CardAction, P as CardHeader, a as FloatingCard, d as StatusDot, f as Tip, j as CardContent, k as Card, m as ToneBadge, n as CardHeading, o as Nothing, p as TipButton, s as Notice, t as ButtonLink, x as GRID_CHANGE_TONE, z as Badge } from "./kit-D6EulwBe.js";
3
- import { At as planOf, Dt as fileOnly, Ft as typeOf, Nt as requiredOf, Ot as happens, Pt as takenToday, jt as problemOf, kt as keysIn, mt as errorBodyOf, yt as ColumnChange } from "./middleware-B8JRLyxx.js";
4
- import { r as useActor } from "./actor-D6iA0pDg.js";
5
- import { $ as openRecord, A as closeRecord, G as historyQuery, I as countQuery, M as configQuery, Q as openColumn, Tt as usedBy, Ut as proposeColumnChangeFn, V as enumFields, W as heldQuery, X as listQueryOf, ct as refreshWritten, j as collectionNamed, l as LIMIT_CHOICES, lt as remoteQuery, st as recordsQuery, t as Button, ut as runLink, y as api } from "./button-f9Lc8qLl.js";
6
- import { E as None, G as When, J as toastIfHeld, V as UsedBy, m as FLOAT_CARD, p as FLOAT, s as CrumbHeader, tt as Skeleton } from "./common-CWHLj7KV.js";
7
- import { a as DropdownMenuItem, i as DropdownMenuGroup, l as DropdownMenuSeparator, n as DropdownMenuCheckboxItem, o as DropdownMenuLabel, r as DropdownMenuContent, t as DropdownMenu, u as DropdownMenuTrigger } from "./dropdown-menu-DAC3LWas.js";
8
- import { r as NativeSelectOption, t as NativeSelect } from "./native-select-DLa-He0n.js";
9
- import { t as Spinner } from "./spinner-C1ZW08lp.js";
10
- import { t as Textarea } from "./textarea-f0Ip5ed1.js";
11
- import { t as Input } from "./input-D63gF3G2.js";
12
- import { a as DialogFooter, i as DialogDescription, n as DialogClose, o as DialogHeader, r as DialogContent, s as DialogTitle, t as Dialog } from "./dialog-BGjiw3Dx.js";
13
- import { a as FieldGroup, c as FieldSet, o as FieldLabel, r as FieldDescription, s as FieldLegend, t as Field } from "./field-C0Xx_90s.js";
14
- import { a as TableHeader, i as TableHead, n as TableBody, o as TableRow, r as TableCell } from "./table-DtPk_h_5.js";
15
- import { a as Route } from "./router-BvYtxrVN.js";
1
+ import { n as plural, t as cn } from "./utils-CHesvfjo.js";
2
+ import { A as CardAction, P as CardHeader, a as FloatingCard, d as StatusDot, f as Tip, j as CardContent, k as Card, m as ToneBadge, n as CardHeading, o as Nothing, p as TipButton, s as Notice, t as ButtonLink, x as GRID_CHANGE_TONE, z as Badge } from "./kit-DlT_THim.js";
3
+ import { At as planOf, Dt as fileOnly, Ft as typeOf, Nt as requiredOf, Ot as happens, Pt as takenToday, jt as problemOf, kt as keysIn, mt as errorBodyOf, yt as ColumnChange } from "./middleware-B6RPW0fH.js";
4
+ import { r as useActor } from "./actor-BlaOwG6A.js";
5
+ import { A as configQuery, Ct as usedBy, H as heldQuery, J as listQueryOf, O as closeRecord, P as countQuery, U as historyQuery, Vt as proposeColumnChangeFn, X as openColumn, Z as openRecord, _ as api, at as recordsQuery, ct as runLink, k as collectionNamed, ot as refreshWritten, s as LIMIT_CHOICES, st as remoteQuery, z as enumFields } from "./queries-DJcZ4mzA.js";
6
+ import { t as Button } from "./button-Xwx3rpQ0.js";
7
+ import { B as UsedBy, T as None, W as When, m as FLOAT_CARD, p as FLOAT, q as toastIfHeld, s as CrumbHeader, tt as Skeleton } from "./common-DpZcJvCy.js";
8
+ import { a as DropdownMenuItem, i as DropdownMenuGroup, l as DropdownMenuSeparator, n as DropdownMenuCheckboxItem, o as DropdownMenuLabel, r as DropdownMenuContent, t as DropdownMenu, u as DropdownMenuTrigger } from "./dropdown-menu-RGvPORm4.js";
9
+ import { t as Spinner } from "./spinner-016IPVi-.js";
10
+ import { t as Input } from "./input-CF-vX8Xp.js";
11
+ import { t as Textarea } from "./textarea-B02joDnr.js";
12
+ import { a as DialogFooter, i as DialogDescription, n as DialogClose, o as DialogHeader, r as DialogContent, s as DialogTitle, t as Dialog } from "./dialog-T0bzlKzs.js";
13
+ import { a as FieldGroup, c as FieldSet, o as FieldLabel, r as FieldDescription, s as FieldLegend, t as Field } from "./field-DFpkT1id.js";
14
+ import { a as TableHeader, i as TableHead, n as TableBody, o as TableRow, r as TableCell } from "./table-y-dGlLx6.js";
15
+ import { a as Route, g as NativeSelectOption, h as NativeSelect } from "./router-Co6gRNI1.js";
16
16
  import { i as delimited, n as cellsOf, r as csv, t as cellText } from "./clipboard-lnKxNXLI.js";
17
17
  import { a as initialValues, i as initialValue, n as fieldsOf, s as issueText, t as buildInput } from "./schema-DBT8KJsP.js";
18
- import { a as useSchemaForm, i as errorsOf, n as FormFoot, o as Checkbox, t as FieldView } from "./start-form-DI60UOrc.js";
18
+ import { a as useSchemaForm, i as errorsOf, n as FormFoot, o as Checkbox, t as FieldView } from "./start-form-CUeEdeP7.js";
19
19
  import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
20
20
  import { Link, notFound, useBlocker, useHydrated, useNavigate } from "@tanstack/react-router";
21
21
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -27,8 +27,8 @@ import { XIcon } from "@phosphor-icons/react/dist/csr/X";
27
27
  import { PlusIcon } from "@phosphor-icons/react/dist/csr/Plus";
28
28
  import { ArrowUpIcon } from "@phosphor-icons/react/dist/csr/ArrowUp";
29
29
  import { CaretDownIcon } from "@phosphor-icons/react/dist/csr/CaretDown";
30
- import { UploadSimpleIcon } from "@phosphor-icons/react/dist/csr/UploadSimple";
31
30
  import { ArrowDownIcon } from "@phosphor-icons/react/dist/csr/ArrowDown";
31
+ import { UploadSimpleIcon } from "@phosphor-icons/react/dist/csr/UploadSimple";
32
32
  import { ArrowsDownUpIcon } from "@phosphor-icons/react/dist/csr/ArrowsDownUp";
33
33
  import { EyeSlashIcon } from "@phosphor-icons/react/dist/csr/EyeSlash";
34
34
  import { MagnifyingGlassIcon } from "@phosphor-icons/react/dist/csr/MagnifyingGlass";
@@ -1,5 +1,5 @@
1
- import { s as Notice } from "./kit-D6EulwBe.js";
2
- import { T as Route } from "./router-BvYtxrVN.js";
1
+ import { s as Notice } from "./kit-DlT_THim.js";
2
+ import { D as Route } from "./router-Co6gRNI1.js";
3
3
  import { jsxs } from "react/jsx-runtime";
4
4
  // src/routes/apps/$name.tsx?tsr-split=notFoundComponent
5
5
  /**
@@ -1,11 +1,11 @@
1
- import { n as plural } from "./utils-wksS9pYh.js";
2
- import { k as Card, z as Badge } from "./kit-D6EulwBe.js";
3
- import { M as configQuery, Y as lastRunsQuery, et as opsById, gt as scenariosQuery } from "./button-f9Lc8qLl.js";
4
- import { O as OpName, R as SiteLink, f as ExternalLink, n as AppBehind, s as CrumbHeader, x as LastRun } from "./common-CWHLj7KV.js";
5
- import { a as TableHeader, i as TableHead, n as TableBody, o as TableRow, r as TableCell, t as Table } from "./table-DtPk_h_5.js";
6
- import { T as Route } from "./router-BvYtxrVN.js";
1
+ import { n as plural } from "./utils-CHesvfjo.js";
2
+ import { k as Card, z as Badge } from "./kit-DlT_THim.js";
3
+ import { A as configQuery, Q as opsById, mt as scenariosQuery, q as lastRunsQuery } from "./queries-DJcZ4mzA.js";
4
+ import { D as OpName, L as SiteLink, f as ExternalLink, n as AppBehind, s as CrumbHeader, x as LastRun } from "./common-DpZcJvCy.js";
5
+ import { a as TableHeader, i as TableHead, n as TableBody, o as TableRow, r as TableCell, t as Table } from "./table-y-dGlLx6.js";
6
+ import { D as Route } from "./router-Co6gRNI1.js";
7
7
  import { n as updateAppPrompt } from "./apps-Dbg2f5Lh.js";
8
- import { t as ChatButton } from "./chat-button-LtA80MoR.js";
8
+ import { t as ChatButton } from "./chat-button-SluTWK8R.js";
9
9
  import { useMemo } from "react";
10
10
  import { Link, notFound } from "@tanstack/react-router";
11
11
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";