sanoma 0.11.21 → 0.11.23
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.
- package/README.md +55 -14
- package/app/README.md +12 -8
- package/app/dist/api.d.ts +191 -5
- package/app/dist/api.js +125 -4
- package/app/dist/api.js.map +1 -1
- package/app/dist/build.d.ts +28 -3
- package/app/dist/build.js +154 -15
- package/app/dist/build.js.map +1 -1
- package/app/dist/bundle-build.d.ts +32 -0
- package/app/dist/bundle-build.js +127 -67
- package/app/dist/bundle-build.js.map +1 -1
- package/app/dist/client/assets/ArrowDown.es-BVRf--PS.js +1 -0
- package/app/dist/client/assets/CaretDown.es-D12mWb2j.js +1 -0
- package/app/dist/client/assets/CatchBoundary-Cb__yx-s.js +1 -0
- package/app/dist/client/assets/Check.es-b7BdqO2s.js +1 -0
- package/app/dist/client/assets/CheckCircle.es-DKXiWmAT.js +1 -0
- package/app/dist/client/assets/Copy.es-CvUujKw7.js +1 -0
- package/app/dist/client/assets/DialogTitle-5oboyLiq.js +1 -0
- package/app/dist/client/assets/FloppyDisk.es-CDyDob8p.js +1 -0
- package/app/dist/client/assets/Globe.es-C1pgZCGM.js +1 -0
- package/app/dist/client/assets/MagnifyingGlass.es-CZ3i6pz0.js +1 -0
- package/app/dist/client/assets/Play.es-DGJ1CGhp.js +1 -0
- package/app/dist/client/assets/Plug.es-BPhGL8MK.js +1 -0
- package/app/dist/client/assets/Plus.es-i3Vaa2WW.js +1 -0
- package/app/dist/client/assets/Separator-Cu9cQDBN.js +1 -0
- package/app/dist/client/assets/X.es-B7rq0E_-.js +1 -0
- package/app/dist/client/assets/_id-0_Y-lz6G.js +1 -0
- package/app/dist/client/assets/_id-3tGIwJ5T.js +1 -0
- package/app/dist/client/assets/_id-CgPVeQe8.js +1 -0
- package/app/dist/client/assets/_id-DFlFuBDE.js +1 -0
- package/app/dist/client/assets/_id-QNnNLGx_.js +1 -0
- package/app/dist/client/assets/_name-6k1yqjX8.js +1 -0
- package/app/dist/client/assets/_name-B4Qba2-o.js +4 -0
- package/app/dist/client/assets/_name-BfPXcP49.js +1 -0
- package/app/dist/client/assets/_name-CqBzHz7c.js +1 -0
- package/app/dist/client/assets/_vendor-CfHRJBG8.js +1 -0
- package/app/dist/client/assets/_vendor-Dj7KCZ74.js +1 -0
- package/app/dist/client/assets/app-chrome-CFH47gLL.js +5 -0
- package/app/dist/client/assets/app-scope-Z_2GE9oz.js +1 -0
- package/app/dist/client/assets/approval-CgksyU5L.js +1 -0
- package/app/dist/client/assets/apps-BDsPVmMY.js +1 -0
- package/app/dist/client/assets/button-D5kdANef.js +1 -0
- package/app/dist/client/assets/change-glance-D6N6Xaqu.js +1 -0
- package/app/dist/client/assets/changes-B6xxBiC0.js +1 -0
- package/app/dist/client/assets/changes-BS7eJI5T.js +1 -0
- package/app/dist/client/assets/chat-Bw3WhRE9.js +14 -0
- package/app/dist/client/assets/chat-button-DNusaP5n.js +1 -0
- package/app/dist/client/assets/chat-prompt-z0XJPDtH.js +1 -0
- package/app/dist/client/assets/{code-BVYaiQEr.js → code-CT4-YDKq.js} +2 -2
- package/app/dist/client/assets/common-DZLdx_jS.js +3 -0
- package/app/dist/client/assets/composite-CoGyvQjv.js +1 -0
- package/app/dist/client/assets/connect-BMk-KP-f.js +1 -0
- package/app/dist/client/assets/connections-TbS_jeiy.js +5 -0
- package/app/dist/client/assets/connectors-CgRpyRdd.js +1 -0
- package/app/dist/client/assets/credentials-Dxpl8sUw.js +1 -0
- package/app/dist/client/assets/css-BGIxQoYs.js +1 -0
- package/app/dist/client/assets/css-DgaLhXQH.js +1 -0
- package/app/dist/client/assets/data-lKkklNeo.js +1 -0
- package/app/dist/client/assets/decidable-w2VGgZwN.js +1 -0
- package/app/dist/client/assets/declaration-form-CAwox7F1.js +1 -0
- package/app/dist/client/assets/dialog-DDAfDsGh.js +1 -0
- package/app/dist/client/assets/diff-woXpYk--.js +1 -0
- package/app/dist/client/assets/engine-CBuzy-Ik.js +1 -0
- package/app/dist/client/assets/existing-2kDivy4p.js +1 -0
- package/app/dist/client/assets/fence-BdtS5gi0.js +157 -0
- package/app/dist/client/assets/github-dark-C-LZuMrd.js +1 -0
- package/app/dist/client/assets/github-light-EUqPIrTm.js +1 -0
- package/app/dist/client/assets/graph-BqVQ68hK.js +7 -0
- package/app/dist/client/assets/grid-diff-Jj1nTy52.js +1 -0
- package/app/dist/client/assets/held-card-DjBO8PTe.js +1 -0
- package/app/dist/client/assets/highlighted-body-JLMTFACH-Co7ss_Ht.js +1 -0
- package/app/dist/client/assets/hosting-DC7Pftfb.js +1 -0
- package/app/dist/client/assets/html-BHZv6uqE.js +1 -0
- package/app/dist/client/assets/import-DhVQArmJ.js +1 -0
- package/app/dist/client/assets/inbox-5h39e_tI.js +1 -0
- package/app/dist/client/assets/inbox-CUNaP4uz.js +1 -0
- package/app/dist/client/assets/index-CA_5CFb4.js +10 -0
- package/app/dist/client/assets/item-vV00RYfb.js +1 -0
- package/app/dist/client/assets/javascript-BzbQS41l.js +1 -0
- package/app/dist/client/assets/javascript-CpIGwZ_Y.js +1 -0
- package/app/dist/client/assets/json-qhed-kSA.js +1 -0
- package/app/dist/client/assets/jsx-Bz0zcwM4.js +1 -0
- package/app/dist/client/assets/kit-BZcdh1Xm.js +1 -0
- package/app/dist/client/assets/lazyRouteComponent-C2a8bGcK.js +1 -0
- package/app/dist/client/assets/markdown-BYOwaDjH.js +1 -0
- package/app/dist/client/assets/markdown-bsqylRZb.js +164 -0
- package/app/dist/client/assets/mermaid-WFAXDIZX-CYMnek4e.js +1 -0
- package/app/dist/client/assets/motion-D6e1hqz4.js +1 -0
- package/app/dist/client/assets/people-Bn8GAJ3z.js +1 -0
- package/app/dist/client/assets/permissions-Csf87P7b.js +2 -0
- package/app/dist/client/assets/permissions-grid-CzK64E29.js +1 -0
- package/app/dist/client/assets/preload-helper-BLdHbfdN.js +1 -0
- package/app/dist/client/assets/python-gzcpVVnB.js +1 -0
- package/app/dist/client/assets/queries-XJ-fmuYb.js +57 -0
- package/app/dist/client/assets/react-dom-D6fTz1bt.js +1 -0
- package/app/dist/client/assets/review-BjpH-tT4.js +1 -0
- package/app/dist/client/assets/route-CD2oErox.js +1 -0
- package/app/dist/client/assets/route-CRwDZE-c.js +1 -0
- package/app/dist/client/assets/routes-gbZbqIhO.js +1 -0
- package/app/dist/client/assets/runs-table-nkQLXJxG.js +1 -0
- package/app/dist/client/assets/scenario-CZ7tmap7.js +1 -0
- package/app/dist/client/assets/scenario-graph-W2XcWuur.js +1 -0
- package/app/dist/client/assets/separator-Bdtc7rou.js +1 -0
- package/app/dist/client/assets/{sheet-BYL9XU5s.js → sheet-P-hJsTeq.js} +1 -1
- package/app/dist/client/assets/shellscript-CLZ0U2zV.js +1 -0
- package/app/dist/client/assets/site-icon-1Mcc1UIb.js +1 -0
- package/app/dist/client/assets/sites.index-CXcRF_R0.js +1 -0
- package/app/dist/client/assets/spinner-XaRXIj9W.js +1 -0
- package/app/dist/client/assets/sql-CEbI0hMM.js +1 -0
- package/app/dist/client/assets/start-form-6whPfUoW.js +1 -0
- package/app/dist/client/assets/store-BT988jIX.js +1 -0
- package/app/dist/client/assets/style-DaqPHcI1.css +2 -0
- package/app/dist/client/assets/table-B81tv0LG.js +1 -0
- package/app/dist/client/assets/textarea-CRpYU-qx.js +1 -0
- package/app/dist/client/assets/tsx-udAQXfEw.js +1 -0
- package/app/dist/client/assets/typescript-bsJCZSQ-.js +1 -0
- package/app/dist/client/assets/useLoaderData-BIegJC9y.js +1 -0
- package/app/dist/client/assets/useOpenInteractionType-UhakpAXY.js +1 -0
- package/app/dist/client/assets/useRegisterFieldControl-CT8iqvDE.js +1 -0
- package/app/dist/client/assets/useValueChanged-DBqn456b.js +1 -0
- package/app/dist/client/assets/utils-BRvE9-Fo.js +1 -0
- package/app/dist/client/assets/who-are-you-_7OehU_o.js +1 -0
- package/app/dist/client/assets/workflow-DSNK0oFo.js +1 -0
- package/app/dist/client/assets/workflow-view-VFD3onJL.js +1 -0
- package/app/dist/client/assets/workflows-CT9wqMl2.js +1 -0
- package/app/dist/client/assets/yaml-rwi0_p6S.js +1 -0
- package/app/dist/components/grid/plan.d.ts +46 -262
- package/app/dist/components/grid/plan.js +134 -138
- package/app/dist/components/grid/plan.js.map +1 -1
- package/app/dist/demo-build.d.ts +58 -0
- package/app/dist/demo-build.js +440 -0
- package/app/dist/demo-build.js.map +1 -0
- package/app/dist/handler.d.ts +9 -7
- package/app/dist/handler.js +10 -10
- package/app/dist/handler.js.map +1 -1
- package/app/dist/index.d.ts +4 -4
- package/app/dist/index.js +52 -35
- package/app/dist/index.js.map +1 -1
- package/app/dist/lib/chat.d.ts +67 -20
- package/app/dist/lib/chat.js +54 -18
- package/app/dist/lib/chat.js.map +1 -1
- package/app/dist/lib/names.d.ts +7 -0
- package/app/dist/lib/names.js +6 -2
- package/app/dist/lib/names.js.map +1 -1
- package/app/dist/login/page.d.ts +1 -10
- package/app/dist/login/page.js +0 -14
- package/app/dist/login/page.js.map +1 -1
- package/app/dist/login/staff.js +3 -3
- package/app/dist/login/staff.js.map +1 -1
- package/app/dist/server/assets/{_id-wuJIq2ZZ.js → _id-B6iAc90c.js} +2 -2
- package/app/dist/server/assets/{_id-Dt9tTylX.js → _id-BlceO2iK.js} +3 -3
- package/app/dist/server/assets/{_id-wB8khGTz.js → _id-Cc0uBuJb.js} +12 -7
- package/app/dist/server/assets/{_id-ce1EGp7Y.js → _id-DYfvgveB.js} +2 -2
- package/app/dist/server/assets/{_id-BViXAagq.js → _id-Dvn0wB-1.js} +15 -330
- package/app/dist/server/assets/{_name-BGagGBjX.js → _name-3AGcE6tj.js} +7 -7
- package/app/dist/server/assets/{_name-DntbHE-b.js → _name-BIcmcEwj.js} +11 -11
- package/app/dist/server/assets/{_name-BqFwnyf7.js → _name-CfoydEzk.js} +2 -2
- package/app/dist/server/assets/{_name-D_-MhjNf.js → _name-VpcPszKf.js} +210 -63
- package/app/dist/server/assets/{_tanstack-start-manifest_v-BljuBM-G.js → _tanstack-start-manifest_v-DUL7FcJk.js} +119 -91
- package/app/dist/server/assets/{_vendor-CcEviOki.js → _vendor-Bwis2sPx.js} +2 -2
- package/app/dist/server/assets/{_vendor-CNB03LWX.js → _vendor-DUtH-Z9W.js} +8 -8
- package/app/dist/server/assets/{actor-D6iA0pDg.js → actor-DAOPjcdj.js} +1 -1
- package/app/dist/server/assets/app-chrome-B8oA4uXZ.js +2298 -0
- package/app/dist/server/assets/{app-scope-CXIgOFmi.js → app-scope-BxuIu0xV.js} +2 -2
- package/app/dist/server/assets/{apply-plan-ybBda6vQ.js → apply-plan-CHJ_Hr71.js} +8 -7
- package/app/dist/server/assets/{approval-Su315ikC.js → approval-DR_9mBcx.js} +17 -14
- package/app/dist/server/assets/{apps-xwQAehch.js → apps-CtPev5RI.js} +7 -7
- package/app/dist/server/assets/button-Xwx3rpQ0.js +43 -0
- package/app/dist/server/assets/change-glance-DGqh7Pxb.js +54 -0
- package/app/dist/server/assets/{change-glance-CpArIbGS.js → changes-C3qjEBZP.js} +2 -54
- package/app/dist/server/assets/{changes-Bc_OiDBD.js → changes-DfOnO87K.js} +8 -7
- package/app/dist/server/assets/{chat-DMN_hoKm.js → chat-B19X0_8f.js} +133 -34
- package/app/dist/server/assets/{chat-button-LtA80MoR.js → chat-button-SluTWK8R.js} +2 -2
- package/app/dist/server/assets/{code-COyt8L-n.js → code-hVpCkmAZ.js} +1 -1
- package/app/dist/server/assets/{common-CWHLj7KV.js → common-JUUJLp4v.js} +30 -82
- package/app/dist/server/assets/{connect-BpPiu5s6.js → connect-DKu1UgY-.js} +11 -10
- package/app/dist/server/assets/{connections-DBgb1bvX.js → connections-Dyedl4qi.js} +12 -11
- package/app/dist/server/assets/{connectors-5a5_SlHO.js → connectors-yojQH7WS.js} +8 -8
- package/app/dist/server/assets/{credentials-ud_Y68hx.js → credentials-2Z6EHitQ.js} +10 -9
- package/app/dist/server/assets/{data-aEdhwcqy.js → data-1padc_i_.js} +7 -7
- package/app/dist/server/assets/{declaration-form-Dfg1yNuY.js → declaration-form-MAnn_M8g.js} +7 -6
- package/app/dist/server/assets/{dialog-BGjiw3Dx.js → dialog-T0bzlKzs.js} +2 -2
- package/app/dist/server/assets/{dropdown-menu-DAC3LWas.js → dropdown-menu-RGvPORm4.js} +1 -1
- package/app/dist/server/assets/{existing-B4d4NrC8.js → existing-BZjX_7Aa.js} +8 -7
- package/app/dist/server/assets/fence-BvNu3YNO.js +130 -0
- package/app/dist/server/assets/{field-C0Xx_90s.js → field-DFpkT1id.js} +1 -1
- package/app/dist/server/assets/{functions-BvFYzabD.js → functions-wlvFaDkF.js} +246 -44
- package/app/dist/server/assets/{graph-qYOdoz2s.js → graph-DjANDk1P.js} +5 -5
- package/app/dist/server/assets/{grid-diff-jTvp-8wS.js → grid-diff-D5bQDKl2.js} +1 -1
- package/app/dist/server/assets/held-card-CCEypEau.js +75 -0
- package/app/dist/server/assets/{hosting-bbn9UvDc.js → hosting-Csr6AVC7.js} +321 -42
- package/app/dist/server/assets/{import-DIwvzHb6.js → import-CtPlwdIl.js} +12 -10
- package/app/dist/server/assets/{inbox-Dj-5FleF.js → inbox-9-WMgjdU.js} +2 -2
- package/app/dist/server/assets/{inbox-D6R6sWBB.js → inbox-BYKHV9Yh.js} +8 -8
- package/app/dist/server/assets/{input-D63gF3G2.js → input-CF-vX8Xp.js} +1 -1
- package/app/dist/server/assets/{item-BDSXoEr_.js → item-LBDNja5f.js} +1 -1
- package/app/dist/server/assets/{kit-D6EulwBe.js → kit-D5moAfcg.js} +57 -4
- package/app/dist/server/assets/markdown-B9odAiMy.js +116 -0
- package/app/dist/server/assets/{middleware-B8JRLyxx.js → middleware-C4Wn6uHO.js} +325 -285
- package/app/dist/server/assets/{native-select-DLa-He0n.js → native-select-etaMvR-i.js} +2 -9
- package/app/dist/server/assets/{people-CkU_AxrV.js → people-LpcYXtEq.js} +13 -12
- package/app/dist/server/assets/{permissions-BfMcQqQb.js → permissions-M0kzvVVm.js} +9 -8
- package/app/dist/server/assets/{permissions-grid-DWP9FAAS.js → permissions-grid-CwWWdcQA.js} +4 -4
- package/app/dist/server/assets/{button-f9Lc8qLl.js → queries-BDuQsTdU.js} +141 -59
- package/app/dist/server/assets/review-BFZCPdVZ.js +355 -0
- package/app/dist/server/assets/{route-CF_8jQYY.js → route-BJLQf4ik.js} +2 -2
- package/app/dist/server/assets/{route-BTT7nMJq.js → route-C3uFABee.js} +2 -2
- package/app/dist/server/assets/{router-BvYtxrVN.js → router-Dx7Gu0CN.js} +175 -147
- package/app/dist/server/assets/routes-iVrnGFaR.js +227 -0
- package/app/dist/server/assets/{runs-table-BBudn12Y.js → runs-table-g3QYggO3.js} +6 -6
- package/app/dist/server/assets/{scenario-BXGTSTiP.js → scenario-B5dGlEGF.js} +5 -5
- package/app/dist/server/assets/{separator-8MZ7vR3f.js → separator-Cf98V8ie.js} +1 -1
- package/app/dist/server/assets/{sheet-5Cyp-4UW.js → sheet-DTOG7OHQ.js} +2 -2
- package/app/dist/server/assets/sites.index-BNeYUQnQ.js +165 -0
- package/app/dist/server/assets/{spinner-C1ZW08lp.js → spinner-016IPVi-.js} +1 -1
- package/app/dist/server/assets/{start-CSU4irVK.js → start-CIKqNkKp.js} +2 -2
- package/app/dist/server/assets/{start-form-DI60UOrc.js → start-form-BXAi2lVm.js} +10 -9
- package/app/dist/server/assets/{table-DtPk_h_5.js → table-y-dGlLx6.js} +1 -1
- package/app/dist/server/assets/{textarea-f0Ip5ed1.js → textarea-B02joDnr.js} +1 -1
- package/app/dist/server/assets/utils-CHesvfjo.js +138 -0
- package/app/dist/server/assets/{who-are-you-ZGyMnpVi.js → who-are-you-CavnVMGe.js} +16 -10
- package/app/dist/server/assets/{workflow-Z99QWO42.js → workflow-BXhqp6S1.js} +5 -5
- package/app/dist/server/assets/{workflow-view-C8X8U11S.js → workflow-view-go1rbTSF.js} +14 -13
- package/app/dist/server/assets/{workflows-C0kJoGf1.js → workflows-BCcXZtN-.js} +14 -14
- package/app/dist/server/chat.d.ts +6 -1
- package/app/dist/server/chat.js +39 -20
- package/app/dist/server/chat.js.map +1 -1
- package/app/dist/server/core.d.ts +24 -9
- package/app/dist/server/core.js +58 -119
- package/app/dist/server/core.js.map +1 -1
- package/app/dist/server/go-live.d.ts +11 -2
- package/app/dist/server/go-live.js +27 -27
- package/app/dist/server/go-live.js.map +1 -1
- package/app/dist/server/server.js +68 -48
- package/app/dist/server/setup.js +1 -1
- package/app/dist/server/setup.js.map +1 -1
- package/app/dist/server/token-redeem.d.ts +8 -0
- package/app/dist/server/token-redeem.js +45 -0
- package/app/dist/server/token-redeem.js.map +1 -0
- package/app/dist/site-path.d.ts +15 -0
- package/app/dist/site-path.js +26 -0
- package/app/dist/site-path.js.map +1 -1
- package/app/dist/snapshot-build.js +1 -0
- package/app/dist/snapshot-build.js.map +1 -1
- package/app/dist/steps/agent/acp.d.ts +3 -97
- package/app/dist/steps/agent/acp.js +19 -49
- package/app/dist/steps/agent/acp.js.map +1 -1
- package/app/dist/steps/agent/checkout.d.ts +18 -1
- package/app/dist/steps/agent/checkout.js +17 -0
- package/app/dist/steps/agent/checkout.js.map +1 -1
- package/app/dist/steps/agent/harness.d.ts +2 -4
- package/app/dist/steps/agent/harness.js +45 -61
- package/app/dist/steps/agent/harness.js.map +1 -1
- package/app/dist/steps/agent/prompt.d.ts +1 -1
- package/app/dist/steps/agent/prompt.js +37 -16
- package/app/dist/steps/agent/prompt.js.map +1 -1
- package/app/dist/steps/agent/transcript.d.ts +10 -1
- package/app/dist/steps/agent/transcript.js +75 -2
- package/app/dist/steps/agent/transcript.js.map +1 -1
- package/app/dist/steps/agent/turn.d.ts +4 -6
- package/app/dist/steps/agent/turn.js +14 -16
- package/app/dist/steps/agent/turn.js.map +1 -1
- package/app/dist/steps/index.js +2 -2
- package/app/dist/steps/index.js.map +1 -1
- package/app/dist/steps/writes.d.ts +21 -7
- package/app/dist/steps/writes.js +100 -23
- package/app/dist/steps/writes.js.map +1 -1
- package/app/dist/stylesheet.json +1 -1
- package/app/src/api.ts +188 -4
- package/app/src/build.ts +177 -14
- package/app/src/bundle-build.ts +132 -63
- package/app/src/components/app-chrome.tsx +28 -13
- package/app/src/components/approval.tsx +1 -1
- package/app/src/components/common.tsx +18 -88
- package/app/src/components/data-grid.tsx +2 -1
- package/app/src/components/go-live-cloud.tsx +44 -0
- package/app/src/components/go-live.tsx +51 -13
- package/app/src/components/grid/columns.tsx +175 -53
- package/app/src/components/grid/grid.tsx +4 -2
- package/app/src/components/grid/plan.ts +153 -164
- package/app/src/components/grid/review.tsx +108 -118
- package/app/src/components/home.tsx +199 -0
- package/app/src/components/import/match.tsx +2 -1
- package/app/src/components/import/sheet.ts +2 -1
- package/app/src/components/kit.tsx +55 -1
- package/app/src/components/logo.tsx +25 -0
- package/app/src/components/record-form.tsx +12 -5
- package/app/src/components/shell/bar.tsx +35 -26
- package/app/src/components/shell/chat-parts.tsx +185 -126
- package/app/src/components/shell/chat-prompt.ts +6 -2
- package/app/src/components/shell/chat.tsx +154 -220
- package/app/src/components/shell/composer.tsx +140 -0
- package/app/src/components/shell/connect-agent.tsx +157 -0
- package/app/src/components/shell/draft-card.tsx +192 -45
- package/app/src/components/shell/engine-mark.tsx +9 -0
- package/app/src/components/shell/fence.tsx +25 -0
- package/app/src/components/shell/held-card.tsx +58 -0
- package/app/src/components/shell/markdown.tsx +152 -0
- package/app/src/components/shell/nav-user.tsx +11 -1
- package/app/src/components/shell/prefs.ts +12 -1
- package/app/src/components/shell/thread.tsx +174 -0
- package/app/src/components/store-move.tsx +2 -1
- package/app/src/components/ui/bubble.tsx +117 -0
- package/app/src/components/ui/code-block.tsx +235 -0
- package/app/src/components/ui/input-group.tsx +136 -0
- package/app/src/components/ui/marker.tsx +67 -0
- package/app/src/components/ui/message-scroller.tsx +117 -0
- package/app/src/components/ui/message.tsx +74 -0
- package/app/src/components/ui/radio-group.tsx +26 -0
- package/app/src/components/ui/trace.tsx +133 -0
- package/app/src/components/who-are-you.tsx +8 -3
- package/app/src/demo/api.ts +42 -0
- package/app/src/demo/client-rpc.ts +16 -0
- package/app/src/demo/demo.css +31 -0
- package/app/src/demo/mount.tsx +97 -0
- package/app/src/demo/root.tsx +31 -0
- package/app/src/demo/tailwind.css +4 -0
- package/app/src/demo-build.ts +525 -0
- package/app/src/env.d.ts +12 -0
- package/app/src/functions.ts +50 -7
- package/app/src/handler.ts +20 -14
- package/app/src/hooks/use-highlighted-code.ts +72 -0
- package/app/src/index.ts +55 -36
- package/app/src/lib/chat.ts +113 -23
- package/app/src/lib/cn-tables.ts +23 -23
- package/app/src/lib/company-state.ts +73 -0
- package/app/src/lib/highlighter.tsx +114 -0
- package/app/src/lib/names.ts +13 -2
- package/app/src/login/page.ts +1 -21
- package/app/src/login/staff.ts +3 -3
- package/app/src/queries.ts +121 -18
- package/app/src/routes/__root.tsx +24 -7
- package/app/src/routes/changes/$id.tsx +4 -3
- package/app/src/routes/connectors/index.tsx +1 -1
- package/app/src/routes/data/$name/import.tsx +2 -1
- package/app/src/routes/data/$name/index.tsx +1 -2
- package/app/src/routes/hosting/index.tsx +277 -60
- package/app/src/routes/index.tsx +15 -4
- package/app/src/routes/sites.index.tsx +41 -3
- package/app/src/routes/workflows/$name/runs/$id.tsx +3 -1
- package/app/src/server/chat.ts +41 -19
- package/app/src/server/columns.ts +44 -18
- package/app/src/server/company-state.ts +76 -0
- package/app/src/server/core.ts +72 -116
- package/app/src/server/go-live.ts +35 -27
- package/app/src/server/setup-progress.ts +28 -0
- package/app/src/server/setup.ts +1 -1
- package/app/src/server/token-redeem.ts +49 -0
- package/app/src/site-api.ts +10 -0
- package/app/src/site-path.ts +29 -0
- package/app/src/site.ts +1 -1
- package/app/src/snapshot-build.ts +1 -0
- package/app/src/steps/agent/acp.ts +10 -80
- package/app/src/steps/agent/checkout.ts +30 -0
- package/app/src/steps/agent/harness.ts +53 -78
- package/app/src/steps/agent/prompt.ts +45 -17
- package/app/src/steps/agent/transcript.ts +90 -3
- package/app/src/steps/agent/turn.ts +18 -16
- package/app/src/steps/index.ts +2 -2
- package/app/src/steps/writes.ts +121 -31
- package/app/src/worker/app.ts +17 -14
- package/dist/check.js +2 -2
- package/dist/check.js.map +1 -1
- package/dist/cli.js +81 -22
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +8 -1
- package/dist/config.js +49 -8
- package/dist/config.js.map +1 -1
- package/dist/events.d.ts +15 -1
- package/dist/events.js +7 -0
- package/dist/events.js.map +1 -1
- package/dist/init.d.ts +27 -14
- package/dist/init.js +87 -39
- package/dist/init.js.map +1 -1
- package/dist/serve.d.ts +6 -2
- package/dist/serve.js +71 -9
- package/dist/serve.js.map +1 -1
- package/dist/source.d.ts +5 -0
- package/dist/source.js +113 -23
- package/dist/source.js.map +1 -1
- package/dist/worker-port.d.ts +16 -2
- package/dist/worker-port.js +44 -5
- package/dist/worker-port.js.map +1 -1
- package/invoices/README.md +66 -0
- package/invoices/dist/calculate.d.ts +37 -0
- package/invoices/dist/calculate.js +97 -0
- package/invoices/dist/calculate.js.map +1 -0
- package/invoices/dist/index.d.ts +4 -0
- package/invoices/dist/index.js +5 -0
- package/invoices/dist/index.js.map +1 -0
- package/invoices/dist/logo.d.ts +2 -0
- package/invoices/dist/logo.js +89 -0
- package/invoices/dist/logo.js.map +1 -0
- package/invoices/dist/pdf.d.ts +33 -0
- package/invoices/dist/pdf.js +215 -0
- package/invoices/dist/pdf.js.map +1 -0
- package/invoices/dist/schema.d.ts +156 -0
- package/invoices/dist/schema.js +88 -0
- package/invoices/dist/schema.js.map +1 -0
- package/oxlint.json +18 -0
- package/package.json +42 -7
- package/template/.env.example +15 -4
- package/template/AGENTS.md +10 -6
- package/template/package.json +6 -1
- package/template/policies/policy.cedar +5 -5
- package/template/resources/people.ts +5 -13
- package/template/resources/sanoma/infra.ts +8 -0
- package/template/sanoma.config.ts +18 -11
- package/template/scenarios/record-lead/record.feature +14 -0
- package/template/secrets.ts +13 -0
- package/template/tsconfig.json +1 -0
- package/template/workflows/record-lead.ts +30 -0
- package/testing/README.md +4 -4
- package/testing/dist/build.d.ts +3 -3
- package/testing/dist/build.js +4 -4
- package/testing/dist/build.js.map +1 -1
- package/testing/dist/host.d.ts +38 -21
- package/testing/dist/host.js +159 -77
- package/testing/dist/host.js.map +1 -1
- package/testing/dist/scenarios.d.ts +2 -1
- package/testing/dist/scenarios.js +14 -4
- package/testing/dist/scenarios.js.map +1 -1
- package/workflows/CLOUD-IDENTITY.md +15 -20
- package/workflows/README.md +54 -19
- package/workflows/dist/app-steps.js +8 -0
- package/workflows/dist/app-steps.js.map +1 -1
- package/workflows/dist/app-workflows.d.ts +172 -6
- package/workflows/dist/app-workflows.js +57 -9
- package/workflows/dist/app-workflows.js.map +1 -1
- package/workflows/dist/approvals.d.ts +3 -1
- package/workflows/dist/approvals.js +3 -1
- package/workflows/dist/approvals.js.map +1 -1
- package/workflows/dist/call.d.ts +8 -40
- package/workflows/dist/call.js +24 -135
- package/workflows/dist/call.js.map +1 -1
- package/workflows/dist/change-steps.d.ts +7 -0
- package/workflows/dist/change-steps.js +37 -13
- package/workflows/dist/change-steps.js.map +1 -1
- package/workflows/dist/change-workflow.d.ts +22 -10
- package/workflows/dist/change-workflow.js +30 -12
- package/workflows/dist/change-workflow.js.map +1 -1
- package/workflows/dist/change.d.ts +233 -7
- package/workflows/dist/change.js +27 -9
- package/workflows/dist/change.js.map +1 -1
- package/workflows/dist/client.d.ts +32 -5
- package/workflows/dist/client.js +94 -35
- package/workflows/dist/client.js.map +1 -1
- package/workflows/dist/cloud-identity.d.ts +5 -2
- package/workflows/dist/cloud-identity.js +7 -4
- package/workflows/dist/cloud-identity.js.map +1 -1
- package/workflows/dist/collection-driver.d.ts +20 -0
- package/workflows/dist/collection-driver.js +201 -0
- package/workflows/dist/collection-driver.js.map +1 -0
- package/workflows/dist/collection.d.ts +126 -14
- package/workflows/dist/collection.js +45 -168
- package/workflows/dist/collection.js.map +1 -1
- package/workflows/dist/company-file.d.ts +22 -0
- package/workflows/dist/company-file.js +82 -0
- package/workflows/dist/company-file.js.map +1 -0
- package/workflows/dist/config.d.ts +34 -6
- package/workflows/dist/config.js +58 -45
- package/workflows/dist/config.js.map +1 -1
- package/workflows/dist/ctx.d.ts +101 -0
- package/workflows/dist/ctx.js +171 -0
- package/workflows/dist/ctx.js.map +1 -0
- package/workflows/dist/db/company.d.ts +115 -1
- package/workflows/dist/db/company.js +14 -1
- package/workflows/dist/db/company.js.map +1 -1
- package/workflows/dist/db/dbos.d.ts +17 -0
- package/workflows/dist/db/dbos.js +2 -0
- package/workflows/dist/db/dbos.js.map +1 -1
- package/workflows/dist/db/identity.d.ts +2 -2
- package/workflows/dist/db/identity.js +2 -2
- package/workflows/dist/db/identity.js.map +1 -1
- package/workflows/dist/db.d.ts +1 -1
- package/workflows/dist/db.js +10 -6
- package/workflows/dist/db.js.map +1 -1
- package/workflows/dist/deadlines.d.ts +14 -8
- package/workflows/dist/deadlines.js +22 -11
- package/workflows/dist/deadlines.js.map +1 -1
- package/workflows/dist/define.d.ts +0 -8
- package/workflows/dist/define.js +1 -24
- package/workflows/dist/define.js.map +1 -1
- package/workflows/dist/describe.d.ts +1 -1
- package/workflows/dist/describe.js +18 -5
- package/workflows/dist/describe.js.map +1 -1
- package/workflows/dist/description.d.ts +408 -2
- package/workflows/dist/description.js +130 -5
- package/workflows/dist/description.js.map +1 -1
- package/workflows/dist/drift.d.ts +5 -2
- package/workflows/dist/drift.js +5 -3
- package/workflows/dist/drift.js.map +1 -1
- package/workflows/dist/errors.d.ts +11 -11
- package/workflows/dist/errors.js +17 -36
- package/workflows/dist/errors.js.map +1 -1
- package/workflows/dist/fake.d.ts +0 -26
- package/workflows/dist/fake.js +0 -123
- package/workflows/dist/fake.js.map +1 -1
- package/workflows/dist/fakes.d.ts +2 -0
- package/workflows/dist/fakes.js +5 -0
- package/workflows/dist/fakes.js.map +1 -0
- package/workflows/dist/givens.d.ts +51 -0
- package/workflows/dist/givens.js +89 -0
- package/workflows/dist/givens.js.map +1 -0
- package/workflows/dist/host.d.ts +8 -7
- package/workflows/dist/host.js +1 -1
- package/workflows/dist/host.js.map +1 -1
- package/workflows/dist/identity-provisioning.d.ts +2 -5
- package/workflows/dist/identity-provisioning.js +16 -20
- package/workflows/dist/identity-provisioning.js.map +1 -1
- package/workflows/dist/import.d.ts +2 -0
- package/workflows/dist/import.js +7 -6
- package/workflows/dist/import.js.map +1 -1
- package/workflows/dist/index.d.ts +8 -7
- package/workflows/dist/index.js +4 -3
- package/workflows/dist/index.js.map +1 -1
- package/workflows/dist/ledger.js +8 -17
- package/workflows/dist/ledger.js.map +1 -1
- package/workflows/dist/lint.d.ts +2 -2
- package/workflows/dist/lint.js +8 -4
- package/workflows/dist/lint.js.map +1 -1
- package/workflows/dist/load.js +1 -1
- package/workflows/dist/load.js.map +1 -1
- package/workflows/dist/log.d.ts +0 -2
- package/workflows/dist/log.js +0 -11
- package/workflows/dist/log.js.map +1 -1
- package/workflows/dist/op.d.ts +103 -3
- package/workflows/dist/op.js +56 -6
- package/workflows/dist/op.js.map +1 -1
- package/workflows/dist/page-run.d.ts +40 -0
- package/workflows/dist/page-run.js +317 -0
- package/workflows/dist/page-run.js.map +1 -0
- package/workflows/dist/paths.d.ts +0 -13
- package/workflows/dist/paths.js +2 -46
- package/workflows/dist/paths.js.map +1 -1
- package/workflows/dist/renewal.d.ts +1 -1
- package/workflows/dist/renewal.js +1 -1
- package/workflows/dist/run.d.ts +4 -1
- package/workflows/dist/run.js.map +1 -1
- package/workflows/dist/runtime-ops.d.ts +19 -4
- package/workflows/dist/runtime-ops.js +34 -5
- package/workflows/dist/runtime-ops.js.map +1 -1
- package/workflows/dist/sandbox-runner.cjs +4 -4
- package/workflows/dist/sandbox.d.ts +0 -20
- package/workflows/dist/sandbox.js +23 -85
- package/workflows/dist/sandbox.js.map +1 -1
- package/workflows/dist/scenario.d.ts +19 -1
- package/workflows/dist/scenario.js +82 -21
- package/workflows/dist/scenario.js.map +1 -1
- package/workflows/dist/schedules.d.ts +1 -1
- package/workflows/dist/schedules.js +1 -1
- package/workflows/dist/secret.d.ts +4 -5
- package/workflows/dist/secret.js +7 -6
- package/workflows/dist/secret.js.map +1 -1
- package/workflows/dist/shared.d.ts +84 -7
- package/workflows/dist/shared.js +255 -8
- package/workflows/dist/shared.js.map +1 -1
- package/workflows/dist/sites.d.ts +5 -0
- package/workflows/dist/sites.js +7 -0
- package/workflows/dist/sites.js.map +1 -1
- package/workflows/dist/source.d.ts +40 -1
- package/workflows/dist/source.js +3 -3
- package/workflows/dist/source.js.map +1 -1
- package/workflows/dist/supervisor.d.ts +21 -18
- package/workflows/dist/supervisor.js +20 -22
- package/workflows/dist/supervisor.js.map +1 -1
- package/workflows/dist/tokens.d.ts +34 -0
- package/workflows/dist/tokens.js +70 -9
- package/workflows/dist/tokens.js.map +1 -1
- package/workflows/dist/vendor-info.d.ts +12 -3
- package/workflows/dist/vendor-info.js +21 -5
- package/workflows/dist/vendor-info.js.map +1 -1
- package/workflows/dist/version.js +1 -1
- package/workflows/dist/version.js.map +1 -1
- package/workflows/dist/wakeup-driver.js +1 -1
- package/workflows/dist/wakeup-driver.js.map +1 -1
- package/workflows/dist/wakeup-fake.d.ts +27 -0
- package/workflows/dist/wakeup-fake.js +125 -0
- package/workflows/dist/wakeup-fake.js.map +1 -0
- package/workflows/dist/wakeup-service.js +8 -24
- package/workflows/dist/wakeup-service.js.map +1 -1
- package/workflows/dist/wakeup-type.js +1 -1
- package/workflows/dist/wakeup-type.js.map +1 -1
- package/workflows/dist/worker.d.ts +19 -1
- package/workflows/dist/worker.js +67 -49
- package/workflows/dist/worker.js.map +1 -1
- package/workflows/drizzle/company/0007_token_handoffs.sql +8 -0
- package/workflows/drizzle/company/meta/0007_snapshot.json +1281 -0
- package/workflows/drizzle/company/meta/_journal.json +7 -0
- package/workflows/src/app-steps.ts +11 -0
- package/workflows/src/app-workflows.ts +100 -10
- package/workflows/src/approvals.ts +4 -2
- package/workflows/src/call.ts +37 -186
- package/workflows/src/change-steps.ts +43 -14
- package/workflows/src/change-workflow.ts +45 -16
- package/workflows/src/change.ts +39 -10
- package/workflows/src/client.ts +137 -62
- package/workflows/src/cloud-identity.ts +7 -4
- package/workflows/src/collection-driver.ts +230 -0
- package/workflows/src/collection.ts +62 -186
- package/workflows/src/company-file.ts +82 -0
- package/workflows/src/config.ts +97 -56
- package/workflows/src/ctx.ts +266 -0
- package/workflows/src/db/company.ts +15 -1
- package/workflows/src/db/dbos.ts +2 -0
- package/workflows/src/db/identity.ts +2 -2
- package/workflows/src/db.ts +10 -6
- package/workflows/src/deadlines.ts +31 -17
- package/workflows/src/define.ts +1 -24
- package/workflows/src/describe.ts +27 -5
- package/workflows/src/description.ts +152 -5
- package/workflows/src/drift.ts +8 -4
- package/workflows/src/errors.ts +19 -45
- package/workflows/src/fake.ts +4 -139
- package/workflows/src/fakes.ts +4 -0
- package/workflows/src/givens.ts +141 -0
- package/workflows/src/host.ts +8 -7
- package/workflows/src/identity-provisioning.ts +19 -30
- package/workflows/src/import.ts +8 -6
- package/workflows/src/index.ts +13 -2
- package/workflows/src/ledger.ts +8 -16
- package/workflows/src/lint.ts +12 -6
- package/workflows/src/load.ts +1 -1
- package/workflows/src/log.ts +0 -11
- package/workflows/src/op.ts +147 -12
- package/workflows/src/page-run.ts +437 -0
- package/workflows/src/paths.ts +2 -46
- package/workflows/src/renewal.ts +1 -1
- package/workflows/src/run.ts +4 -1
- package/workflows/src/runtime-ops.ts +36 -6
- package/workflows/src/sandbox.ts +31 -109
- package/workflows/src/scenario.ts +102 -19
- package/workflows/src/schedules.ts +1 -1
- package/workflows/src/secret.ts +8 -7
- package/workflows/src/shared.ts +304 -10
- package/workflows/src/sites.ts +8 -0
- package/workflows/src/source.ts +31 -5
- package/workflows/src/supervisor.ts +40 -38
- package/workflows/src/tokens.ts +100 -9
- package/workflows/src/vendor-info.ts +21 -6
- package/workflows/src/version.ts +1 -1
- package/workflows/src/wakeup-driver.ts +1 -1
- package/workflows/src/wakeup-fake.ts +138 -0
- package/workflows/src/wakeup-service.ts +8 -24
- package/workflows/src/wakeup-type.ts +1 -1
- package/workflows/src/worker.ts +121 -58
- package/app/dist/client/assets/ArrowUp.es-DOgvoS0P.js +0 -1
- package/app/dist/client/assets/Copy.es-B0D5SwiQ.js +0 -1
- package/app/dist/client/assets/DialogTitle-BgjYK22C.js +0 -1
- package/app/dist/client/assets/FloppyDisk.es-DnuNe_a8.js +0 -1
- package/app/dist/client/assets/Globe.es-B6x2e4-a.js +0 -1
- package/app/dist/client/assets/MagnifyingGlass.es-DoNoHEhT.js +0 -1
- package/app/dist/client/assets/Play.es-BwXalGBh.js +0 -1
- package/app/dist/client/assets/Plug.es-CaZsN5P-.js +0 -1
- package/app/dist/client/assets/Plus.es-w9VPpTJB.js +0 -1
- package/app/dist/client/assets/Separator-BAhKFgSd.js +0 -1
- package/app/dist/client/assets/X.es-DKMYClf-.js +0 -1
- package/app/dist/client/assets/_id-BSRAaWtO.js +0 -1
- package/app/dist/client/assets/_id-BjDP-cPH.js +0 -1
- package/app/dist/client/assets/_id-BudM76zX.js +0 -1
- package/app/dist/client/assets/_id-C37U5bBa.js +0 -1
- package/app/dist/client/assets/_id-lmg24JVh.js +0 -2
- package/app/dist/client/assets/_name-CylqFo_t.js +0 -1
- package/app/dist/client/assets/_name-D8Gl8iwy.js +0 -4
- package/app/dist/client/assets/_name-DdPCU8pt.js +0 -1
- package/app/dist/client/assets/_name-TteWQXe0.js +0 -1
- package/app/dist/client/assets/_vendor-BLxW83yk.js +0 -1
- package/app/dist/client/assets/_vendor-Bq3uZU4-.js +0 -1
- package/app/dist/client/assets/app-chrome-H8uZ4dHI.js +0 -16
- package/app/dist/client/assets/app-scope-BeUW_8Qh.js +0 -1
- package/app/dist/client/assets/approval-DpgmTc63.js +0 -1
- package/app/dist/client/assets/apps-CoWzNm8M.js +0 -1
- package/app/dist/client/assets/change-glance-DbYcBT7H.js +0 -1
- package/app/dist/client/assets/changes-DIJvP7wQ.js +0 -1
- package/app/dist/client/assets/chat-button-BgpOfYh1.js +0 -1
- package/app/dist/client/assets/chat-prompt-hiawXcK0.js +0 -1
- package/app/dist/client/assets/common-Dw2i6XKZ.js +0 -3
- package/app/dist/client/assets/composite-D9GNDzFj.js +0 -1
- package/app/dist/client/assets/connect-CIq2KJTz.js +0 -1
- package/app/dist/client/assets/connections-iqd2XbWQ.js +0 -5
- package/app/dist/client/assets/connectors-rI8_D1n1.js +0 -1
- package/app/dist/client/assets/credentials-26vu6Fv5.js +0 -1
- package/app/dist/client/assets/data-sDMlKaLV.js +0 -1
- package/app/dist/client/assets/decidable-zcYI7bY8.js +0 -1
- package/app/dist/client/assets/declaration-form-BtSVvxhq.js +0 -1
- package/app/dist/client/assets/dialog-DskpUgkl.js +0 -1
- package/app/dist/client/assets/existing-BD3VgJ_8.js +0 -1
- package/app/dist/client/assets/graph-Prxl3c55.js +0 -7
- package/app/dist/client/assets/grid-diff-SMsvea6t.js +0 -1
- package/app/dist/client/assets/hosting-BBHUppH-.js +0 -1
- package/app/dist/client/assets/import-B92fd4Tl.js +0 -1
- package/app/dist/client/assets/inbox-57oGZtxE.js +0 -1
- package/app/dist/client/assets/inbox-B2AMNtk5.js +0 -1
- package/app/dist/client/assets/index-Bn3XeKy8.js +0 -10
- package/app/dist/client/assets/kit-BsK6VZTQ.js +0 -1
- package/app/dist/client/assets/lazyRouteComponent-Uri98HNq.js +0 -1
- package/app/dist/client/assets/motion-C8lNeYvK.js +0 -1
- package/app/dist/client/assets/people-ISOMYCTu.js +0 -1
- package/app/dist/client/assets/permissions-Cenat84K.js +0 -2
- package/app/dist/client/assets/permissions-grid-B2GtGwzv.js +0 -1
- package/app/dist/client/assets/route-BP1XwaTB.js +0 -1
- package/app/dist/client/assets/route-KVU6QgwJ.js +0 -1
- package/app/dist/client/assets/runs-table-35lNzKLn.js +0 -1
- package/app/dist/client/assets/scenario-DSwsavxS.js +0 -1
- package/app/dist/client/assets/scenario-graph-CAzWOtqV.js +0 -1
- package/app/dist/client/assets/separator-BlwkzEY0.js +0 -1
- package/app/dist/client/assets/site-icon-DZvOfBvU.js +0 -1
- package/app/dist/client/assets/sites.index-CcNo6N8u.js +0 -1
- package/app/dist/client/assets/spinner-BGy6LWIW.js +0 -1
- package/app/dist/client/assets/start-form-Bgo9I63s.js +0 -1
- package/app/dist/client/assets/store-BGu0d2Ld.js +0 -57
- package/app/dist/client/assets/style-CCDLLPgG.css +0 -2
- package/app/dist/client/assets/table-DjbI5VTn.js +0 -1
- package/app/dist/client/assets/textarea-DXO0eUdp.js +0 -1
- package/app/dist/client/assets/useLoaderData-BQd5yMlA.js +0 -1
- package/app/dist/client/assets/useOpenInteractionType-Bin8RjM5.js +0 -1
- package/app/dist/client/assets/useRegisterFieldControl-CQPTOU7Z.js +0 -1
- package/app/dist/client/assets/useValueChanged-DMkuvFZG.js +0 -1
- package/app/dist/client/assets/utils-CMsCvwYQ.js +0 -1
- package/app/dist/client/assets/who-are-you-Bt1WI3Cz.js +0 -1
- package/app/dist/client/assets/workflow-BJpO61A-.js +0 -1
- package/app/dist/client/assets/workflow-view-DP-UlRiH.js +0 -1
- package/app/dist/client/assets/workflows-BLCBgxbx.js +0 -1
- package/app/dist/server/assets/app-chrome-BYS81Vnx.js +0 -1410
- package/app/dist/server/assets/sites.index-1l0BtgVf.js +0 -138
- package/app/dist/server/assets/utils-wksS9pYh.js +0 -138
- package/template/scenarios/publish-post/publish.feature +0 -28
- package/template/workflows/publish-post.ts +0 -20
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{Vr as r,j as i,rn as a,zr as o}from"./queries-XJ-fmuYb.js";import{t as s}from"./button-D5kdANef.js";import{o as c,r as l,s as u,t as d}from"./item-vV00RYfb.js";import{C as f,O as p,at as m,k as h,w as g}from"./index-CA_5CFb4.js";import{c as _,s as v}from"./app-chrome-CFH47gLL.js";import{a as y,i as b,o as x,r as S,s as C,t as w}from"./dialog-DDAfDsGh.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:r(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({...i(),select:O}),n=t.length===1?t[0].id:void 0;return(0,E.useEffect)(()=>{n&&e(n)},[n,e]),n?null:(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)(p,{children:(0,D.jsxs)(g,{children:[(0,D.jsx)(h,{htmlFor:`who-name`,children:`Your name`}),(0,D.jsx)(f,{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{$ as r,X as i,fi as a,j as o,rn as s,xt as c}from"./queries-XJ-fmuYb.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-DZLdx_jS.js";import{J as v,s as y}from"./kit-BZcdh1Xm.js";import{t as b}from"./separator-Bdtc7rou.js";import{a as x,i as S,r as C,t as w}from"./item-vV00RYfb.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)(a,{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({...i(),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:r(t),sites:c(t,`workflow`,e.name)}),[e.name]),{data:{ops:n,sites:i}}=s({...o(),select:t}),a=(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:a?a.length===0?(0,D.jsx)(p,{children:`No fields.`}):(0,D.jsx)(N,{fields:a}):(0,D.jsx)(h,{value:e.input})}),(0,D.jsx)(b,{}),(0,D.jsx)(f,{title:`Used by`,children:(0,D.jsx)(m,{sites:i})})]})}),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{$ as r,At as i,Br as a,Fr as o,Ir as s,Mt as c,Pr as l,St as u,Vn as d,_t as f,fi as p,ht as m,it as h,j as g,kr as ee,pi as te,rn as _,xr as ne,zn as re}from"./queries-XJ-fmuYb.js";import{D as v,Dt as ie,Et as ae,F as y,H as b,N as x,P as S,T as C,U as w,W as T,_ as oe,a as E,b as D,c as se,d as O,dt as ce,ft as le,j as k,l as A,m as ue,mt as de,pt as fe,r as j,t as M,u as N,y as P}from"./common-DZLdx_jS.js";import{B as F,G as I,H as L,M as pe,N as R,U as z,W as B,a as me,d as V,h as he,i as H,l as ge,n as _e,o as U,p as W,q as ve,r as G,s as K,t as ye,z as be}from"./kit-BZcdh1Xm.js";import{i as xe}from"./lazyRouteComponent-C2a8bGcK.js";import{r as Se}from"./start-form-6whPfUoW.js";import{V as Ce,t as we}from"./button-D5kdANef.js";import{n as Te,t as q}from"./utils-BRvE9-Fo.js";import{t as Ee}from"./separator-Bdtc7rou.js";import{a as J,i as De,n as Oe,r as ke,s as Ae,t as je}from"./item-vV00RYfb.js";import{S as Me,at as Ne,x as Pe}from"./index-CA_5CFb4.js";import{t as Fe}from"./X.es-B7rq0E_-.js";import{t as Ie}from"./Globe.es-C1pgZCGM.js";import{t as Le}from"./changes-B6xxBiC0.js";import{n as Re}from"./lines-DuFrbGkQ.js";import{i as ze,t as Be}from"./motion-D6e1hqz4.js";import{n as Ve,t as He}from"./approval-CgksyU5L.js";import{r as Ue,t as We}from"./scenario-graph-W2XcWuur.js";import{n as Ge}from"./workflow-DSNK0oFo.js";var Y=n(e(),1),Ke=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M160,128a32,32,0,1,1-32-32A32,32,0,0,1,160,128Z`,opacity:`0.2`}),Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`}))]]),qe=Y.forwardRef((e,t)=>Y.createElement(Ce,{ref:t,...e,weights:Ke}));qe.displayName=`CrosshairIcon`;var X=t(),Je=2e3,Z;function Ye(e,t){let n=document.getElementById(et(e));n&&(n.scrollIntoView({behavior:t?`auto`:`smooth`,block:`center`}),Z&&(clearTimeout(Z.timer),delete Z.item.dataset.highlighted),n.dataset.highlighted=``,Z={item:n,timer:setTimeout(()=>{delete n.dataset.highlighted,Z=void 0},Je)})}function Xe({check:e}){let t=e.settled?e.ok?`ok`:`bad`:`waiting`,n=e.settled?e.detail:`not yet`;return(0,X.jsx)(je,{role:`listitem`,variant:`outline`,size:`sm`,children:(0,X.jsxs)(ke,{className:`min-w-0`,children:[(0,X.jsxs)(Ae,{children:[(0,X.jsx)(V,{tone:t}),e.step]}),n&&(0,X.jsx)(De,{children:n})]})})}function Ze({error:e,then:t}){let n=[e.status===void 0?``:`status ${e.status}`,e.vendorCode??``].filter(Boolean).join(`, `);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`p`,{className:`text-destructive`,children:[e.message,n&&(0,X.jsxs)(`span`,{className:`text-muted-foreground`,children:[` (`,n,`)`]})]}),t&&(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:t})]})}function Qe(e,t,n,r){if(e>1||n?.idempotent)return`Tried ${Te(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 $e({value:e,sealed:t=!1}){if(e===void 0)return(0,X.jsx)(C,{});if(typeof e!=`object`||!e||Array.isArray(e))return(0,X.jsx)(D,{value:e});let n=Object.entries(e);return n.length===0?(0,X.jsx)(C,{children:`No fields.`}):(0,X.jsx)(H,{children:n.map(([e,n])=>(0,X.jsx)(G,{label:e,children:t&&e===`code`&&typeof n==`string`?(0,X.jsxs)(`span`,{children:[`sealed · `,(0,X.jsxs)(`code`,{className:`text-xs`,children:[n.slice(0,4),`…`]}),` `,(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:`codes never enter the ledger`})]}):typeof n==`string`?n:(0,X.jsx)(`code`,{className:`text-xs`,children:JSON.stringify(n)})},e))})}var et=e=>`ledger-${e}`,tt=(0,Y.memo)(function({record:e,titles:t,onShow:n,anchor:i=!0}){let a=e=>t.get(e)??e,{data:o}=_({...g(),select:r}),{data:s}=_({...g(),select:e=>e.vendors}),c=``,l;switch(e.type){case`run.started`:c=`started`,l=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`p`,{children:[`Started by `,e.actor.id,e.scheduledFor&&(0,X.jsxs)(X.Fragment,{children:[`, on its schedule for `,(0,X.jsx)(b,{at:e.scheduledFor})]})]}),e.workflow===`login-code`?(0,X.jsx)(N,{label:`Input`,open:!0,children:(0,X.jsx)($e,{value:e.input,sealed:!0})}):(0,X.jsx)(O,{label:`Input`,value:e.input})]});break;case`op.called`:c=`called`,l=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`p`,{className:`flex flex-wrap items-center gap-2`,children:[(0,X.jsx)(v,{id:e.op,op:o.get(e.op),effect:e.effect}),(0,X.jsx)(se,{decision:e.decision}),(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:`${e.durationMs} ms${e.attempt&&e.attempt>1?`, attempt ${e.attempt}`:``}`})]}),e.error&&(0,X.jsx)(Ze,{error:e.error,then:Qe(e.attempt??1,e.error,o.get(e.op),s)}),(0,X.jsx)(O,{label:`Input`,value:e.input,open:e.workflow===ne,redacted:!0}),`output`in e&&(0,X.jsx)(O,{label:`Output`,value:e.output})]});break;case`approval.requested`:c=`asked`,l=(0,X.jsxs)(`p`,{children:[`“`,e.title,`” asked of `,ee(e.approver),` by`,` `,(0,X.jsx)(k,{requestedBy:e.requestedBy,op:e.op,reasons:e.reasons})]});break;case`approval.decided`:c=e.decision===`approve`?`approved`:`rejected`,l=(0,X.jsxs)(`p`,{children:[e.by,` `,e.decision===`approve`?`approved`:`rejected`,` “`,a(e.approval),`”`,e.alone?M:null,e.note?(0,X.jsx)(A,{note:e.note}):null]});break;case`approval.withdrawn`:c=`withdrawn`,l=(0,X.jsx)(`p`,{children:nt(e,a)});break;case`approval.refused`:c=`ignored`,l=(0,X.jsxs)(`p`,{children:[`Ignored a message from `,e.by??`someone`,` on “`,a(e.approval),`”: `,e.reason]});break;case`scenario.seeded`:c=`seeded`,l=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`p`,{children:[`Seeded `,e.seeds.length,` from scenario “`,e.scenario,`”`]}),e.seeds.length>0&&(0,X.jsx)(O,{label:`Seeds`,value:e.seeds})]});break;case`sleep.started`:c=`sleeping`,l=(0,X.jsxs)(`p`,{children:[`Until `,(0,X.jsx)(b,{at:e.until})]});break;case`run.finished`:c=`finished`,l=(0,X.jsx)(O,{label:`Output`,value:e.output});break;case`run.failed`:c=`failed`,l=(0,X.jsx)(Ze,{error:e.error})}return(0,X.jsxs)(je,{role:`listitem`,variant:`outline`,size:`sm`,id:i?et(e.id):void 0,className:`scroll-mt-24 data-highlighted:bg-muted data-highlighted:ring-2 data-highlighted:ring-ring`,children:[(0,X.jsxs)(ke,{className:`min-w-0`,children:[(0,X.jsxs)(Ae,{children:[(0,X.jsx)(V,{tone:T(e)}),c]}),(0,X.jsx)(`div`,{className:`flex flex-col gap-1`,children:l})]}),(0,X.jsx)(P,{at:e.at}),n&&(0,X.jsx)(Oe,{className:`self-start`,children:(0,X.jsx)(W,{tip:`Show in graph`,size:`icon-xs`,onClick:()=>n(e.id),children:(0,X.jsx)(qe,{"aria-hidden":`true`})})})]})});function nt(e,t){switch(e.type){case`run.started`:return`Started by ${e.actor.id}`;case`op.called`:return(0,X.jsxs)(X.Fragment,{children:[e.name&&e.name!==e.op&&(0,X.jsxs)(X.Fragment,{children:[e.name,` `]}),(0,X.jsx)(`code`,{className:`text-xs text-muted-foreground`,children:e.op}),e.error&&(0,X.jsx)(`span`,{className:`text-destructive`,children:` failed`})]});case`approval.requested`:return`Asked ${ee(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 ${F(e.until)}`;case`run.finished`:return`Finished`;case`run.failed`:return(0,X.jsxs)(`span`,{className:`text-destructive`,children:[`Failed: `,e.error.message]})}}function rt({ledger:e,titles:t}){let n=e=>t.get(e)??e;return(0,X.jsx)(`ol`,{"aria-label":`Ledger`,className:`flex flex-col gap-1.5`,children:e.map(e=>(0,X.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,X.jsx)(V,{tone:T(e),className:`mt-1.5`}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 wrap-anywhere`,children:nt(e,n)}),(0,X.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:(0,X.jsx)(he,{at:e.at})})]},e.id))})}var it={end:{label:`end`}},Q=e=>({...e.state&&{state:e.state},...e.span&&{span:e.span}});function at(e,t=it){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,...Q(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,...Q(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,...Q(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=s(t.status),a=new Map(t.approvals.map(e=>[e.id,e])),c=[],l=new Map,u=new Map,d={tone:`ok`},f,p=new Map(o(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){c.push(e);return}let i=u.get(n.id);i||(i={step:{kind:`all`,branches:[]},size:n.size},u.set(n.id,i),c.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=a.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`:R[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 ${F(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===c.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:be[t.status]}}:{label:`pending`,pending:!0,state:{tone:g?`active`:`off`}},at(c,{start:d,end:f})}function ct(e,t){switch(e.kind){case`op`:return t.kind===`op`&&l(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`?R[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:Le(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}=Ne(),{data:n}=_({...g(),select:e=>e.policy}),{data:i}=_({...g(),select:r}),o=(0,Y.useMemo)(()=>a(e,i),[e,i]),{data:s}=ie({...h(t??``,e.name,o),enabled:n.defined&&!!t}),c=s&&ht(o,s);return c?(0,X.jsx)(I,{children:c}):null}function _t({workflow:e}){let{name:t}=e,n=xe({from:`/workflows/$name`,select:e=>e.scenario}),r=te(),i=(0,Y.useMemo)(()=>m(t),[t]),{data:{scenarios:a}}=_({...f(),select:i}),o=n!==void 0,s=a.find(e=>e.name===n),c=a.length===0;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,X.jsxs)(y,{label:`Mode`,children:[(0,X.jsx)(S,{children:(0,X.jsxs)(p,{to:`.`,search:e=>({...e,scenario:void 0}),activeOptions:{exact:!0},replace:!0,children:[(0,X.jsx)(Ie,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Live vendors`]})}),(0,X.jsx)(S,{children:(0,X.jsxs)(p,{to:`.`,search:e=>({...e,scenario:e.scenario??a[0]?.name}),disabled:c,replace:!0,children:[(0,X.jsx)(Ue,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Sandbox`]})})]}),c&&(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No scenarios for this workflow yet`})]}),o&&!c&&(0,X.jsxs)(Pe,{"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,X.jsx)(Me,{value:``,disabled:!0,children:`Choose a scenario`}),a.map(e=>(0,X.jsx)(Me,{value:e.name,children:e.name},e.name))]}),o&&!s?(0,X.jsx)(U,{title:`No scenario named “${n}”`,children:!c&&`Choose one of this workflow’s scenarios above.`}):(0,X.jsxs)(X.Fragment,{children:[s?(0,X.jsx)(K,{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,X.jsx)(vt,{name:t}),(0,X.jsx)(gt,{workflow:e}),(0,X.jsx)(Se,{workflow:e,scenario:s},s?.name??`live`),s&&(0,X.jsx)(N,{label:`Scenario`,children:(0,X.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,Y.useMemo)(()=>i(e),[e]),{data:n}=_({...g(),select:t});return n.length===0?null:(0,X.jsxs)(K,{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,X.jsx)(W,{tip:`Close`,size:`icon-sm`,onClick:a,children:(0,X.jsx)(Fe,{"aria-hidden":`true`})});if(n&&e)return(0,X.jsx)($,{title:`New run`,className:s,action:(0,X.jsx)(ye,{variant:`ghost`,size:`icon-sm`,children:(0,X.jsxs)(p,{to:`.`,search:e=>({...e,new:void 0}),children:[(0,X.jsx)(Fe,{"aria-hidden":`true`}),(0,X.jsx)(`span`,{className:`sr-only`,children:`Close`})]})}),children:(0,X.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,X.jsxs)($,{title:yt[r.kind]??r.kind,description:Dt(r),className:s,action:c,children:[(r.kind===`op`||r.span)&&(0,X.jsx)(xt,{node:r,text:i,onLines:o}),t&&e?.status===`pending`&&(0,X.jsx)(Et,{run:t.run,approval:e}),t&&n.length>0&&(0,X.jsx)(Tt,{records:n,titles:t.titles})]})}if(t){let{run:e,approvals:n}=t;return(0,X.jsxs)($,{title:`Run`,className:s,action:c,children:[(0,X.jsxs)(H,{children:[(0,X.jsx)(G,{label:`Started by`,children:d(e)}),(0,X.jsx)(G,{label:`Started`,children:(0,X.jsx)(he,{at:e.createdAt})}),(0,X.jsx)(G,{label:`Run id`,children:(0,X.jsx)(`code`,{className:`break-all`,children:e.runId})})]}),n.length===0?(0,X.jsx)(x,{title:`Approvals`,children:(0,X.jsx)(C,{children:`None asked for.`})}):n.map(t=>(0,X.jsx)(Et,{run:e,approval:t},t.id))]})}return e?(0,X.jsx)($,{title:`About`,className:s,action:c,children:(0,X.jsx)(Ge,{workflow:e})}):null}function $({title:e,description:t,action:n,className:r,children:i}){return(0,X.jsxs)(me,{"aria-label":`Inspector`,role:`region`,className:q(`gap-0 py-0`,r),children:[(0,X.jsxs)(ve,{className:`border-b py-2 compact:py-1 [.border-b]:pb-2 compact:[.border-b]:pb-1`,children:[(0,X.jsx)(_e,{className:`self-center text-sm`,children:e}),t&&(0,X.jsx)(I,{className:`wrap-anywhere`,children:t}),n&&(0,X.jsx)(z,{className:`self-center`,children:n})]}),(0,X.jsx)(B,{className:`flex min-h-0 flex-1 flex-col gap-(--card-spacing) overflow-y-auto py-(--card-spacing)`,children:Y.Children.toArray(i).map((e,t)=>(0,X.jsxs)(Y.Fragment,{children:[t>0&&(0,X.jsx)(Ee,{}),e]},(0,Y.isValidElement)(e)?e.key:t))})]})}function xt({node:e,text:t,onLines:n}){let{data:i}=_({...g(),select:r}),{data:a}=_({...g(),select:e=>e.vendors}),o=e.kind===`op`?i.get(e.label):void 0;return(0,X.jsxs)(H,{children:[e.kind===`op`&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(G,{label:`Calls`,children:(0,X.jsx)(`span`,{className:`flex flex-wrap items-center gap-2`,children:(0,X.jsx)(v,{id:e.label,op:o})})}),o&&(0,X.jsx)(G,{label:`Vendor`,children:(0,X.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(w,{vendor:o.vendor,alt:``}),a[o.vendor]?.title??o.vendor]})}),o?.description&&(0,X.jsx)(G,{label:`Does`,children:o.description}),e.ops&&e.ops.length>0&&(0,X.jsx)(G,{label:`Can reach`,children:(0,X.jsx)(`span`,{className:`flex flex-col`,children:e.ops.map(e=>(0,X.jsx)(`code`,{children:e},e))})})]}),e.span&&(0,X.jsx)(G,{label:`Source`,children:(0,X.jsx)(Y.Suspense,{fallback:`…`,children:(0,X.jsx)(St,{span:e.span,text:t,onClick:n})})})]})}function St({span:e,text:t,onClick:n}){return`file`in t?(0,X.jsx)(Ct,{file:t.file,span:e,onClick:n}):t.source==null?null:(0,X.jsx)(wt,{lines:Re(t.source,e),onClick:n})}function Ct({file:e,span:t,onClick:n}){let{data:r}=_(u(e));return r.source==null?null:(0,X.jsx)(wt,{lines:Re(r.source,t),onClick:n})}function wt({lines:[e,t],onClick:n}){return(0,X.jsx)(we,{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,X.jsx)(x,{title:`Ledger`,children:(0,X.jsx)(J,{"aria-label":`Its ledger records`,children:e.map(e=>(0,X.jsx)(tt,{record:e,titles:t,anchor:!1},e.id))})})}function Et({run:e,approval:t}){return(0,X.jsxs)(x,{title:(0,X.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[t.title,(0,X.jsx)(j,{status:t.status})]}),children:[(0,X.jsx)(Ve,{run:e,approval:t}),t.status===`pending`&&(0,X.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:(0,X.jsx)(He,{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:i=`graph`}){let a=t?.outline,o=a&&`nodes`in a?a.nodes:void 0,s=n?.ledger,l=n?.run,u=n?.at??0,d=(0,Y.useMemo)(()=>{if(s&&l)return st(s,l,u,o);let e=o&&at(o);return e&&r?We(e,r):e},[s,l,u,o,r]),f=(0,Y.useMemo)(()=>d&&s?dt(d.nodes,s):void 0,[d,s]),p=(0,Y.useMemo)(()=>new Map(n?.approvals.map(e=>[e.id,e.title])),[n?.approvals]),m=(0,Y.useMemo)(()=>n&&{run:n.run,ledger:n.ledger,approvals:n.approvals,titles:p},[n,p]),h=xe({from:`/workflows/$name`,select:e=>e.new===!0}),[g,_]=(0,Y.useState)(`ledger`),[ne,v]=(0,Y.useState)(),[ie,y]=(0,Y.useState)(!1),b=d?.nodes.find(e=>e.id===ne),x=te(),S=(0,Y.useCallback)(e=>{v(e),e!==void 0&&(y(!1),h&&x({to:`.`,search:e=>({...e,new:void 0}),replace:!0}))},[h,x]),C=(0,Y.useCallback)(()=>{v(void 0),y(!0)},[]),w=Be(),T=(0,Y.useCallback)(e=>{S(e?.id);let t=e&&`state`in e?e.state?.recordId:void 0;n&&t&&g===`ledger`&&Ye(t,w)},[S,n,g,w]),E=(0,Y.useCallback)(e=>T(d&&ze(d.nodes,e)),[d,T]),D=(0,Y.useRef)(null),se=(0,Y.useCallback)(e=>{S(f?.get(e)),D.current?.scrollIntoView({behavior:w?`auto`:`smooth`,block:`nearest`})},[S,f,w]),O=(0,Y.useCallback)(()=>{n?_(`code`):x({to:`.`,search:e=>({...e,view:`code`})})},[n,x]),k=(0,Y.useMemo)(()=>b?.span&&[b.span],[b]),A=a===void 0?`This config has no workflow named ${e}`:`error`in a?a.error:void 0,j=A!==void 0&&(0,X.jsx)(U,{title:`No source to show`,children:A});if(!d)return j;let M=a&&c({outline:a}),N=M===void 0?{source:t?.source}:{file:M},P=l?.status===`waiting`?re(l)[0]:void 0,F=P&&d.nodes.find(e=>`state`in e&&e.state&&`approval`in e.state&&e.state.approval?.id===P.id),I=(0,X.jsx)(Y.Suspense,{fallback:(0,X.jsx)(ae,{role:`status`,"aria-label":`Loading the source`,className:`size-full rounded-none`}),children:j||(M===void 0?(0,X.jsx)(jt,{source:t?.source,highlight:k,onSelect:E}):(0,X.jsx)(At,{file:M,highlight:k,onSelect:E}))}),R=!n&&i===`code`,z=h&&t!==void 0||b!==void 0||!R&&!ie,B=z&&(0,X.jsx)(bt,{workflow:t,run:m,newRun:h,node:b,text:N,onClose:C,onLines:O,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,X.jsxs)(`div`,{className:`flex flex-col gap-(--gap-region)`,children:[P&&(0,X.jsx)(K,{children:(0,X.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[`Waiting on `,ee(P.approver),` for “`,P.title,`”`,F&&(0,X.jsx)(we,{variant:`outline`,size:`xs`,onClick:()=>T(F),children:`Show approval`})]})}),l?.error&&(0,X.jsx)(K,{variant:`destructive`,children:l.error}),R?(0,X.jsxs)(L,{role:`region`,"aria-label":`Code`,className:q(ue,`gap-0 py-0`),children:[(0,X.jsx)(`div`,{className:q(`h-(--pane)`,z&&`@3xl/float:pr-[calc(var(--float-width)+1.5rem)]`),children:I}),B]}):(0,X.jsxs)(L,{ref:D,role:`region`,"aria-label":`Graph`,className:q(ue,`scroll-mt-4 gap-0 py-0`),children:[(0,X.jsx)(`div`,{className:`h-(--pane-tall)`,children:(0,X.jsx)(oe,{graph:d,show:n?`end`:`start`,selected:ne,onSelect:T})}),B||(0,X.jsx)(W,{tip:n?`Show the run`:`About this workflow`,variant:`outline`,size:`icon-sm`,className:`absolute top-3 right-3`,onClick:()=>y(!1),children:(0,X.jsx)(pe,{"aria-hidden":`true`})})]}),n&&(0,X.jsxs)(ce,{value:g,onValueChange:e=>_(e),className:`gap-(--gap-section)`,children:[(0,X.jsxs)(fe,{children:[(0,X.jsx)(de,{value:`ledger`,children:`Ledger`}),(0,X.jsx)(de,{value:`code`,children:`Code`})]}),(0,X.jsx)(le,{value:`ledger`,className:`flex flex-col gap-(--gap-region)`,children:(0,X.jsx)(kt,{run:n,titles:p,nodeOf:f,onShow:se})}),(0,X.jsx)(le,{value:`code`,children:(0,X.jsx)(L,{className:`h-(--pane) gap-0 py-0`,children:I})})]})]})}function kt({run:{ledger:e,ledgerError:t,checks:n,checksError:r},titles:i,nodeOf:a,onShow:o}){return(0,X.jsxs)(X.Fragment,{children:[(n||r)&&(0,X.jsxs)(ge,{title:`Checks`,children:[r&&(0,X.jsx)(K,{variant:`destructive`,children:(0,X.jsxs)(`span`,{className:`whitespace-pre-wrap`,children:[`Could not check the run against its scenario: `,r]})}),n&&(0,X.jsx)(J,{"aria-label":`Checks`,children:n.map((e,t)=>(0,X.jsx)(Xe,{check:e},t))})]}),t&&(0,X.jsxs)(K,{variant:`destructive`,children:[`Could not read the ledger: `,t]}),e.length===0&&!t&&(0,X.jsx)(U,{title:`Nothing recorded yet`}),e.length>0&&(0,X.jsx)(J,{"aria-label":`Ledger`,children:e.map(e=>(0,X.jsx)(tt,{record:e,titles:i,onShow:a?.has(e.id)?o:void 0},e.id))})]})}function At({file:e,...t}){let{data:n}=_(u(e));return(0,X.jsx)(jt,{source:n.source,...t})}function jt({source:e,...t}){return e==null?(0,X.jsx)(U,{title:`No source to show`}):(0,X.jsx)(E,{source:e,...t})}export{rt as n,$e 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{J as r,Pn as i,fi as a,j as o,kt as s,rn as c,wr as l}from"./queries-XJ-fmuYb.js";import{C as u,U as d,k as f,s as p,w as m,x as h}from"./common-DZLdx_jS.js";import{H as g,J as _,m as v,o as y,s as b,t as x}from"./kit-BZcdh1Xm.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{C as k,S as A,c as j,l as M,o as N,s as P,x as F}from"./index-CA_5CFb4.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-nkQLXJxG.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-Z_2GE9oz.js";import{i as K,t as q}from"./inbox-CUNaP4uz.js";import{r as J}from"./workflow-DSNK0oFo.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:s}=N.useSearch(),{data:l}=c(o()),d=U(l.apps,l.workflows,e=>e.app),{tab:h,shown:g}=H(d,s),_=g.flatMap(e=>e.items),{pending:v,mine:y}=K(),b=q(y),{data:x}=c(r()),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:[j.map(e=>(0,X.jsx)(u,{value:e,link:(0,X.jsx)(a,{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)(a,{to:`/workflows`,search:{view:`runs`}}),children:`All runs`})]}),!C&&(0,X.jsx)(W,{groups:d,tab:h,link:e=>(0,X.jsx)(a,{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:r,last:i}){let[a,l]=(0,Y.useState)(``),{data:u}=c({...o(),select:s});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,a.trim())).toSorted((e,t)=>(r[t.name]??0)-(r[e.name]??0)||(i[t.name]?.createdAt??0)-(i[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)(k,{type:`search`,"aria-label":`Find a workflow`,placeholder:`Find a workflow`,value:a,onChange:e=>l(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:i[e.name],waiting:n[e.name]??0,yours:r[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:o}=e;return(0,X.jsxs)(B,{link:{to:`/workflows/$name`,params:{name:o}},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)(a,{to:`/workflows/$name`,params:{name:o},onClick:e=>e.stopPropagation(),children:e.title??o}),(0,X.jsx)(`code`,{className:`text-xs font-normal text-muted-foreground`,children:o}),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=N.useNavigate(),{data:r,error:o}=c(M(e,t));return(0,X.jsxs)(X.Fragment,{children:[o&&(0,X.jsxs)(b,{variant:`destructive`,children:[`Could not refresh runs: `,o.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)(F,{size:`sm`,"aria-label":`Status`,value:e??``,onChange:e=>void n({search:t=>({...t,status:P.shape.status.parse(e.target.value)}),replace:!0}),children:[(0,X.jsx)(A,{value:``,children:`Any status`}),l.map(e=>(0,X.jsx)(A,{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)(a,{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};
|
|
@@ -1,252 +1,13 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CollectionEntry, type ColumnType, type ReshapeOutput, type TableChange, type TableChangePlan } from "sanoma/workflows/description";
|
|
2
2
|
import { type Saved } from "sanoma/workflows/shared";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
/**
|
|
5
|
-
declare const
|
|
6
|
-
boolean: "boolean";
|
|
7
|
-
date: "date";
|
|
8
|
-
json: "json";
|
|
9
|
-
number: "number";
|
|
10
|
-
person: "person";
|
|
11
|
-
text: "text";
|
|
12
|
-
}>, z.ZodObject<{
|
|
13
|
-
enum: z.ZodArray<z.ZodString>;
|
|
14
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
15
|
-
link: z.ZodString;
|
|
16
|
-
}, z.core.$strict>]>;
|
|
17
|
-
export type FieldType = z.infer<typeof FieldTypeSchema>;
|
|
18
|
-
/** What becomes of the rows a retype cannot convert: kept as text, cleared, or the change called off. */
|
|
19
|
-
declare const RetypeDecisionSchema: z.ZodEnum<{
|
|
20
|
-
cancel: "cancel";
|
|
21
|
-
"clear-unconvertible": "clear-unconvertible";
|
|
22
|
-
"keep-text": "keep-text";
|
|
23
|
-
}>;
|
|
24
|
-
export type RetypeDecision = z.infer<typeof RetypeDecisionSchema>;
|
|
25
|
-
/** One change to a table, with the rows it touches counted (`empty`, `filled`, `unmatched`, `wontConvert.count`). */
|
|
26
|
-
declare const TableChangeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
|
-
kind: z.ZodLiteral<"add">;
|
|
28
|
-
field: z.ZodString;
|
|
29
|
-
type: z.ZodUnion<readonly [z.ZodEnum<{
|
|
30
|
-
boolean: "boolean";
|
|
31
|
-
date: "date";
|
|
32
|
-
json: "json";
|
|
33
|
-
number: "number";
|
|
34
|
-
person: "person";
|
|
35
|
-
text: "text";
|
|
36
|
-
}>, z.ZodObject<{
|
|
37
|
-
enum: z.ZodArray<z.ZodString>;
|
|
38
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
39
|
-
link: z.ZodString;
|
|
40
|
-
}, z.core.$strict>]>;
|
|
41
|
-
required: z.ZodBoolean;
|
|
42
|
-
empty: z.ZodNumber;
|
|
43
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
-
kind: z.ZodLiteral<"rename">;
|
|
45
|
-
from: z.ZodString;
|
|
46
|
-
to: z.ZodString;
|
|
47
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
48
|
-
kind: z.ZodLiteral<"retype">;
|
|
49
|
-
field: z.ZodString;
|
|
50
|
-
from: z.ZodUnion<readonly [z.ZodEnum<{
|
|
51
|
-
boolean: "boolean";
|
|
52
|
-
date: "date";
|
|
53
|
-
json: "json";
|
|
54
|
-
number: "number";
|
|
55
|
-
person: "person";
|
|
56
|
-
text: "text";
|
|
57
|
-
}>, z.ZodObject<{
|
|
58
|
-
enum: z.ZodArray<z.ZodString>;
|
|
59
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
60
|
-
link: z.ZodString;
|
|
61
|
-
}, z.core.$strict>]>;
|
|
62
|
-
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
63
|
-
boolean: "boolean";
|
|
64
|
-
date: "date";
|
|
65
|
-
json: "json";
|
|
66
|
-
number: "number";
|
|
67
|
-
person: "person";
|
|
68
|
-
text: "text";
|
|
69
|
-
}>, z.ZodObject<{
|
|
70
|
-
enum: z.ZodArray<z.ZodString>;
|
|
71
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
72
|
-
link: z.ZodString;
|
|
73
|
-
}, z.core.$strict>]>;
|
|
74
|
-
wontConvert: z.ZodObject<{
|
|
75
|
-
count: z.ZodNumber;
|
|
76
|
-
sample: z.ZodArray<z.ZodObject<{
|
|
77
|
-
key: z.ZodString;
|
|
78
|
-
value: z.ZodUnknown;
|
|
79
|
-
}, z.core.$strip>>;
|
|
80
|
-
}, z.core.$strip>;
|
|
81
|
-
decision: z.ZodOptional<z.ZodEnum<{
|
|
82
|
-
cancel: "cancel";
|
|
83
|
-
"clear-unconvertible": "clear-unconvertible";
|
|
84
|
-
"keep-text": "keep-text";
|
|
85
|
-
}>>;
|
|
86
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
87
|
-
kind: z.ZodLiteral<"require">;
|
|
88
|
-
field: z.ZodString;
|
|
89
|
-
empty: z.ZodNumber;
|
|
90
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
-
kind: z.ZodLiteral<"delete">;
|
|
92
|
-
field: z.ZodString;
|
|
93
|
-
filled: z.ZodNumber;
|
|
94
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
95
|
-
kind: z.ZodLiteral<"link">;
|
|
96
|
-
field: z.ZodString;
|
|
97
|
-
to: z.ZodString;
|
|
98
|
-
unmatched: z.ZodNumber;
|
|
99
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
100
|
-
kind: z.ZodLiteral<"convert">;
|
|
101
|
-
field: z.ZodString;
|
|
102
|
-
key: z.ZodString;
|
|
103
|
-
type: z.ZodUnion<readonly [z.ZodEnum<{
|
|
104
|
-
boolean: "boolean";
|
|
105
|
-
date: "date";
|
|
106
|
-
json: "json";
|
|
107
|
-
number: "number";
|
|
108
|
-
person: "person";
|
|
109
|
-
text: "text";
|
|
110
|
-
}>, z.ZodObject<{
|
|
111
|
-
enum: z.ZodArray<z.ZodString>;
|
|
112
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
113
|
-
link: z.ZodString;
|
|
114
|
-
}, z.core.$strict>]>;
|
|
115
|
-
wontConvert: z.ZodObject<{
|
|
116
|
-
count: z.ZodNumber;
|
|
117
|
-
sample: z.ZodArray<z.ZodObject<{
|
|
118
|
-
key: z.ZodString;
|
|
119
|
-
value: z.ZodUnknown;
|
|
120
|
-
}, z.core.$strip>>;
|
|
121
|
-
}, z.core.$strip>;
|
|
122
|
-
}, z.core.$strip>], "kind">;
|
|
123
|
-
export type TableChange = z.infer<typeof TableChangeSchema>;
|
|
4
|
+
/** Why a link or a free-form column cannot be proposed. */
|
|
5
|
+
export declare const UNAVAILABLE = "Links and free-form columns aren't available yet";
|
|
124
6
|
/**
|
|
125
|
-
* A
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* convert and no decision. A change's page reads the plan it carries through this, as anything
|
|
129
|
-
* else starting a `patch` could have written it.
|
|
7
|
+
* A change to a collection's columns, as the grid proposes it: a `TableChange` before its rows are
|
|
8
|
+
* counted, a retype's or a conversion's `decision` for the values that won't convert the person's
|
|
9
|
+
* choice in the column panel.
|
|
130
10
|
*/
|
|
131
|
-
export declare const TableChangePlan: z.ZodObject<{
|
|
132
|
-
collection: z.ZodString;
|
|
133
|
-
changes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
134
|
-
kind: z.ZodLiteral<"add">;
|
|
135
|
-
field: z.ZodString;
|
|
136
|
-
type: z.ZodUnion<readonly [z.ZodEnum<{
|
|
137
|
-
boolean: "boolean";
|
|
138
|
-
date: "date";
|
|
139
|
-
json: "json";
|
|
140
|
-
number: "number";
|
|
141
|
-
person: "person";
|
|
142
|
-
text: "text";
|
|
143
|
-
}>, z.ZodObject<{
|
|
144
|
-
enum: z.ZodArray<z.ZodString>;
|
|
145
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
146
|
-
link: z.ZodString;
|
|
147
|
-
}, z.core.$strict>]>;
|
|
148
|
-
required: z.ZodBoolean;
|
|
149
|
-
empty: z.ZodNumber;
|
|
150
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
151
|
-
kind: z.ZodLiteral<"rename">;
|
|
152
|
-
from: z.ZodString;
|
|
153
|
-
to: z.ZodString;
|
|
154
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
155
|
-
kind: z.ZodLiteral<"retype">;
|
|
156
|
-
field: z.ZodString;
|
|
157
|
-
from: z.ZodUnion<readonly [z.ZodEnum<{
|
|
158
|
-
boolean: "boolean";
|
|
159
|
-
date: "date";
|
|
160
|
-
json: "json";
|
|
161
|
-
number: "number";
|
|
162
|
-
person: "person";
|
|
163
|
-
text: "text";
|
|
164
|
-
}>, z.ZodObject<{
|
|
165
|
-
enum: z.ZodArray<z.ZodString>;
|
|
166
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
167
|
-
link: z.ZodString;
|
|
168
|
-
}, z.core.$strict>]>;
|
|
169
|
-
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
170
|
-
boolean: "boolean";
|
|
171
|
-
date: "date";
|
|
172
|
-
json: "json";
|
|
173
|
-
number: "number";
|
|
174
|
-
person: "person";
|
|
175
|
-
text: "text";
|
|
176
|
-
}>, z.ZodObject<{
|
|
177
|
-
enum: z.ZodArray<z.ZodString>;
|
|
178
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
179
|
-
link: z.ZodString;
|
|
180
|
-
}, z.core.$strict>]>;
|
|
181
|
-
wontConvert: z.ZodObject<{
|
|
182
|
-
count: z.ZodNumber;
|
|
183
|
-
sample: z.ZodArray<z.ZodObject<{
|
|
184
|
-
key: z.ZodString;
|
|
185
|
-
value: z.ZodUnknown;
|
|
186
|
-
}, z.core.$strip>>;
|
|
187
|
-
}, z.core.$strip>;
|
|
188
|
-
decision: z.ZodOptional<z.ZodEnum<{
|
|
189
|
-
cancel: "cancel";
|
|
190
|
-
"clear-unconvertible": "clear-unconvertible";
|
|
191
|
-
"keep-text": "keep-text";
|
|
192
|
-
}>>;
|
|
193
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
194
|
-
kind: z.ZodLiteral<"require">;
|
|
195
|
-
field: z.ZodString;
|
|
196
|
-
empty: z.ZodNumber;
|
|
197
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
198
|
-
kind: z.ZodLiteral<"delete">;
|
|
199
|
-
field: z.ZodString;
|
|
200
|
-
filled: z.ZodNumber;
|
|
201
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
202
|
-
kind: z.ZodLiteral<"link">;
|
|
203
|
-
field: z.ZodString;
|
|
204
|
-
to: z.ZodString;
|
|
205
|
-
unmatched: z.ZodNumber;
|
|
206
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
207
|
-
kind: z.ZodLiteral<"convert">;
|
|
208
|
-
field: z.ZodString;
|
|
209
|
-
key: z.ZodString;
|
|
210
|
-
type: z.ZodUnion<readonly [z.ZodEnum<{
|
|
211
|
-
boolean: "boolean";
|
|
212
|
-
date: "date";
|
|
213
|
-
json: "json";
|
|
214
|
-
number: "number";
|
|
215
|
-
person: "person";
|
|
216
|
-
text: "text";
|
|
217
|
-
}>, z.ZodObject<{
|
|
218
|
-
enum: z.ZodArray<z.ZodString>;
|
|
219
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
220
|
-
link: z.ZodString;
|
|
221
|
-
}, z.core.$strict>]>;
|
|
222
|
-
wontConvert: z.ZodObject<{
|
|
223
|
-
count: z.ZodNumber;
|
|
224
|
-
sample: z.ZodArray<z.ZodObject<{
|
|
225
|
-
key: z.ZodString;
|
|
226
|
-
value: z.ZodUnknown;
|
|
227
|
-
}, z.core.$strip>>;
|
|
228
|
-
}, z.core.$strip>;
|
|
229
|
-
}, z.core.$strip>], "kind">>;
|
|
230
|
-
rows: z.ZodNumber;
|
|
231
|
-
sql: z.ZodArray<z.ZodString>;
|
|
232
|
-
blocked: z.ZodBoolean;
|
|
233
|
-
}, z.core.$strip>;
|
|
234
|
-
export type TableChangePlan = z.infer<typeof TableChangePlan>;
|
|
235
|
-
/** Why a link or a free-form column cannot be proposed yet. */
|
|
236
|
-
export declare const NOT_YET = "Links and free-form columns arrive with real tables";
|
|
237
|
-
/** What the review says in place of the SQL until the runtime plans a table change. */
|
|
238
|
-
export declare const NO_SQL = "SQL is shown once the table change lands";
|
|
239
|
-
/**
|
|
240
|
-
* What a draft plan (no SQL) changes, said beside it: only the data file, so the records keep
|
|
241
|
-
* what they hold until the runtime plans and applies a table change.
|
|
242
|
-
*/
|
|
243
|
-
export declare const FILE_ONLY = "Until real tables land, this changes resources/data.ts only: each record keeps what it holds, and one the new declaration no longer fits shows as needs fixing.";
|
|
244
|
-
/**
|
|
245
|
-
* Whether `FILE_ONLY` goes beside a plan: a draft (no SQL) whose change touches what the records
|
|
246
|
-
* hold, anything but an optional new column.
|
|
247
|
-
*/
|
|
248
|
-
export declare const fileOnly: (plan: TableChangePlan) => boolean;
|
|
249
|
-
/** A change to a collection's columns, as the grid proposes it: a `TableChange` before its rows are counted. */
|
|
250
11
|
export declare const ColumnChange: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
251
12
|
kind: z.ZodLiteral<"add">;
|
|
252
13
|
field: z.ZodString;
|
|
@@ -282,11 +43,15 @@ export declare const ColumnChange: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
282
43
|
}, z.core.$strict>, z.ZodObject<{
|
|
283
44
|
link: z.ZodString;
|
|
284
45
|
}, z.core.$strict>]>;
|
|
46
|
+
decision: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
clear: "clear";
|
|
48
|
+
keep: "keep";
|
|
49
|
+
}>>;
|
|
285
50
|
}, z.core.$strict>, z.ZodObject<{
|
|
286
51
|
kind: z.ZodLiteral<"require">;
|
|
287
52
|
field: z.ZodString;
|
|
288
53
|
}, z.core.$strict>, z.ZodObject<{
|
|
289
|
-
kind: z.ZodLiteral<"
|
|
54
|
+
kind: z.ZodLiteral<"hide">;
|
|
290
55
|
field: z.ZodString;
|
|
291
56
|
}, z.core.$strict>, z.ZodObject<{
|
|
292
57
|
kind: z.ZodLiteral<"link">;
|
|
@@ -308,18 +73,26 @@ export declare const ColumnChange: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
308
73
|
}, z.core.$strict>, z.ZodObject<{
|
|
309
74
|
link: z.ZodString;
|
|
310
75
|
}, z.core.$strict>]>;
|
|
76
|
+
decision: z.ZodOptional<z.ZodEnum<{
|
|
77
|
+
clear: "clear";
|
|
78
|
+
keep: "keep";
|
|
79
|
+
}>>;
|
|
311
80
|
}, z.core.$strict>], "kind">;
|
|
312
81
|
export type ColumnChange = z.infer<typeof ColumnChange>;
|
|
313
82
|
/** A field as `collection()` declares it. */
|
|
314
83
|
type Field = CollectionEntry["fields"][string];
|
|
315
84
|
/** A declared field's type. */
|
|
316
|
-
export declare const typeOf: (field: Field) =>
|
|
85
|
+
export declare const typeOf: (field: Field) => ColumnType;
|
|
317
86
|
/** Whether a declared field is required: not marked `optional`. */
|
|
318
87
|
export declare const requiredOf: (field: Field) => boolean;
|
|
88
|
+
/** Whether a declared field is hidden: removed from the columns for everyone, its values kept. */
|
|
89
|
+
export declare const isHidden: (field: Field | undefined) => boolean;
|
|
90
|
+
/** The fields the grid and the forms show, in their declared order: every one but the hidden. */
|
|
91
|
+
export declare const shownFields: (fields: CollectionEntry["fields"]) => string[];
|
|
319
92
|
/** A field's declaration of `type`, required or `optional: true`, as the data file writes it. */
|
|
320
|
-
declare function fieldOf(type:
|
|
321
|
-
/** Whether
|
|
322
|
-
export declare const takenToday: (type:
|
|
93
|
+
declare function fieldOf(type: ColumnType, required: boolean): string | Record<string, unknown>;
|
|
94
|
+
/** Whether a column of `type` can be proposed: not a link or free-form, which `collection()` takes neither of yet. */
|
|
95
|
+
export declare const takenToday: (type: ColumnType) => boolean;
|
|
323
96
|
/** Each key of the objects in a free-form field, with how many of the rows have it, the most first. */
|
|
324
97
|
export declare function keysIn(rows: readonly Saved[], field: string): {
|
|
325
98
|
key: string;
|
|
@@ -332,9 +105,9 @@ export declare function keysIn(rows: readonly Saved[], field: string): {
|
|
|
332
105
|
*/
|
|
333
106
|
export declare function problemOf({ key, fields }: Pick<CollectionEntry, "key" | "fields">, change: ColumnChange): string | undefined;
|
|
334
107
|
/**
|
|
335
|
-
* The
|
|
336
|
-
*
|
|
337
|
-
*
|
|
108
|
+
* The plan of `change` to `collection`, over `rows`, the records read for it: each row's value
|
|
109
|
+
* counted, a retype's or a conversion's values that will not convert (`reshaped`) sampled, with
|
|
110
|
+
* the person's decision for them when there are some.
|
|
338
111
|
*/
|
|
339
112
|
export declare function planOf(collection: CollectionEntry, rows: readonly Saved[], change: ColumnChange): TableChangePlan;
|
|
340
113
|
/** What `patch` takes: the fields to set, and those to rename or remove. */
|
|
@@ -349,19 +122,30 @@ interface DeclarationEdit {
|
|
|
349
122
|
*/
|
|
350
123
|
export declare function declarationEdit(fields: CollectionEntry["fields"], change: ColumnChange | TableChange): DeclarationEdit;
|
|
351
124
|
/** A type in words: "text", "a number", "a choice: High, Normal or Low". */
|
|
352
|
-
export declare function typeWords(type:
|
|
125
|
+
export declare function typeWords(type: ColumnType): string;
|
|
353
126
|
/** A plan's records as a sentence's subject: "No records", "The record", "All 12 records". */
|
|
354
127
|
export declare const allRecords: ({ rows }: TableChangePlan) => string;
|
|
355
|
-
/**
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
128
|
+
/** A rename's records, said: each value moves to the new name when the change lands. */
|
|
129
|
+
export declare const renamed: (plan: TableChangePlan) => string;
|
|
130
|
+
/** The two choices for the `n` values a retype or a conversion cannot convert, as the column panel offers them. */
|
|
131
|
+
export declare const DECIDED: {
|
|
132
|
+
readonly clear: (n: number) => string;
|
|
133
|
+
readonly keep: (n: number) => string;
|
|
134
|
+
};
|
|
135
|
+
/** What each choice does to those values, in a sentence. */
|
|
136
|
+
export declare const DOES: {
|
|
137
|
+
readonly clear: "This removes what they hold now.";
|
|
138
|
+
readonly keep: "They show as needs fixing in the grid until someone edits them.";
|
|
139
|
+
};
|
|
363
140
|
/** What a plan's change will do, in a sentence: the New column panel's "What will happen". */
|
|
364
141
|
export declare function happens(plan: TableChangePlan): string;
|
|
142
|
+
/**
|
|
143
|
+
* What became of the records once `plan` landed (`counts`, `sanoma.records.reshape`'s answer), in
|
|
144
|
+
* sentences: a rename's records under the new name, then the values converted, left empty or kept
|
|
145
|
+
* to fix. Counted by the plan's one change that brings the records along; a plan of several says
|
|
146
|
+
* the counts together.
|
|
147
|
+
*/
|
|
148
|
+
export declare function landed(plan: TableChangePlan, counts: ReshapeOutput): string;
|
|
365
149
|
/**
|
|
366
150
|
* The lines of the collection's `fields` a plan's changes remove (`-`) and add (`+`), from its
|
|
367
151
|
* fields as declared on main (`fields`): the review's diff of the data file.
|