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,101 @@
|
|
|
1
|
+
import type { CheckedApproval } from "./approvals.ts";
|
|
2
|
+
import type { ConnectionRef } from "./connection.ts";
|
|
3
|
+
import { type ApprovalRequest, type ApprovalResult, type Principal, type SleepRequest, type WorkflowDefinition } from "./define.ts";
|
|
4
|
+
import type { LedgerBody, LedgerGroup, LedgerRecord } from "./ledger.ts";
|
|
5
|
+
import { type Op } from "./op.ts";
|
|
6
|
+
import type { CallNode } from "./outline.ts";
|
|
7
|
+
/**
|
|
8
|
+
* Where a call is, as its records say: its outline node's `path`, none in a page (which reads no
|
|
9
|
+
* outline), and the step's name, as the outline resolved it (`OutlineNode`'s `name`), or for a
|
|
10
|
+
* call the outline could not name, the operation a computed id called, or an approval's title
|
|
11
|
+
* that is no literal.
|
|
12
|
+
*/
|
|
13
|
+
export interface Placed {
|
|
14
|
+
node?: string;
|
|
15
|
+
name: string;
|
|
16
|
+
}
|
|
17
|
+
/** How a run's `ctx` members are carried out: what `ctxOf` calls, once it has placed a call. */
|
|
18
|
+
export interface CtxRunner {
|
|
19
|
+
/**
|
|
20
|
+
* The outline node `member`, the `ctx` member called as `what` (`ghost.post.create`,
|
|
21
|
+
* `approval`, `all`), was called at; a refusal throws. None where the run reads no outline.
|
|
22
|
+
*/
|
|
23
|
+
place(member: Function, what: string): CallNode | undefined;
|
|
24
|
+
op(op: Op, input: unknown, at: Placed, connection?: ConnectionRef): Promise<unknown>;
|
|
25
|
+
/** The run's clock. */
|
|
26
|
+
now(): Promise<number>;
|
|
27
|
+
approval(title: string, request: ApprovalRequest, at: Placed): Promise<ApprovalResult>;
|
|
28
|
+
sleep(request: unknown, at: Placed): Promise<void>;
|
|
29
|
+
all(members: unknown, at: Placed): Promise<unknown[]>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The run's `ctx`: the operations and built-ins its workflow `uses`, and nothing else. Every
|
|
33
|
+
* member that writes a record is placed where the workflow calls it (`CtxRunner.place`) and
|
|
34
|
+
* named (the outline's name, else `fallback`'s), then made by the runner; `ctx.now()` only reads
|
|
35
|
+
* the run's clock, and `ctx.runId` and `ctx.startedBy` are values.
|
|
36
|
+
*/
|
|
37
|
+
export declare function ctxOf(wf: WorkflowDefinition<any, any>, run: {
|
|
38
|
+
id: string;
|
|
39
|
+
actor: Principal;
|
|
40
|
+
}, runner: CtxRunner): any;
|
|
41
|
+
/**
|
|
42
|
+
* Checks a `ctx.approval` request before the runner acts on it, so a bad one fails the run with
|
|
43
|
+
* `invalid_input`: who may decide it, and the operations it covers, as ids (none unless named).
|
|
44
|
+
*/
|
|
45
|
+
export declare function checkApproval(title: string, req: ApprovalRequest): CheckedApproval;
|
|
46
|
+
/** Checks a sleep request before the runner acts on it, so a bad one fails the run with `invalid_input`. */
|
|
47
|
+
export declare function checkSleep(req: unknown): SleepRequest;
|
|
48
|
+
/** When a sleep that starts at `started` ends, in ms since the epoch: the time asked for, or `started` plus the duration. */
|
|
49
|
+
export declare const untilOf: (req: SleepRequest, started: number) => number;
|
|
50
|
+
/**
|
|
51
|
+
* The value as the ledger records it: each of the operation's `opaque` fields as `"<name>"`, and
|
|
52
|
+
* in a run of `workflow` `login-code`, the mail's `text` and `html` too, so no colleague reads another's code.
|
|
53
|
+
*/
|
|
54
|
+
export declare function recorded(op: Op, value: unknown, workflow?: string): unknown;
|
|
55
|
+
/** The resource instance the call acts on, from the operation's `target`, when it declares one. */
|
|
56
|
+
export declare function targetOf(op: Op, input: unknown): {
|
|
57
|
+
target?: string;
|
|
58
|
+
};
|
|
59
|
+
/** One call as the policy decides it and the ledger records it: an operation and its parsed input. */
|
|
60
|
+
export interface Call {
|
|
61
|
+
op: Op;
|
|
62
|
+
input: unknown;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The calls a call makes: a collection's `saveMany` (`isBatch`) makes one per entry, the
|
|
66
|
+
* collection's `save` or `delete` with the entry as its input, and these are what the policy
|
|
67
|
+
* decides and the ledger records, so a record's history reads the same whether it was saved
|
|
68
|
+
* alone or in a batch; any other call makes itself.
|
|
69
|
+
*/
|
|
70
|
+
export declare function callsOf(op: Op, input: unknown, ops: ReadonlyMap<string, Op>): Call[];
|
|
71
|
+
/**
|
|
72
|
+
* What a call's `op.called` record says of the call itself, wherever it was made (a worker's run,
|
|
73
|
+
* a direct call, a page's run): its operation, the instance it acted on, its effect and its
|
|
74
|
+
* input as the ledger records it (`recorded`).
|
|
75
|
+
*/
|
|
76
|
+
export declare const opCalled: (c: Call, workflow?: string) => {
|
|
77
|
+
target?: string;
|
|
78
|
+
type: "op.called";
|
|
79
|
+
op: `${string}.${string}.${string}`;
|
|
80
|
+
effect: import("./op.ts").Effect;
|
|
81
|
+
input: unknown;
|
|
82
|
+
};
|
|
83
|
+
/** A call's input as its operation's schema takes it: `invalid_input` naming the operation when it does not. */
|
|
84
|
+
export declare const inputOf: (op: Op, input: unknown) => unknown;
|
|
85
|
+
/**
|
|
86
|
+
* A run's record of `app`: `body` with what every record carries, its id `<runId>:<type>:<key>`
|
|
87
|
+
* (the `seq` unless a key is given), tagged with the `ctx.all` member it is written in. A
|
|
88
|
+
* worker's (`entry` in `ledger.ts`) and a page's.
|
|
89
|
+
*/
|
|
90
|
+
export declare function recordOf(run: {
|
|
91
|
+
id: string;
|
|
92
|
+
workflow: string;
|
|
93
|
+
actor: Principal;
|
|
94
|
+
}, app: string, body: LedgerBody, { seq, at, key, group }: {
|
|
95
|
+
seq: number;
|
|
96
|
+
at: number;
|
|
97
|
+
key?: string | undefined;
|
|
98
|
+
group?: LedgerGroup | undefined;
|
|
99
|
+
}): LedgerRecord;
|
|
100
|
+
/** The outputs of the calls a call made, from its output: a batch's, one per entry, in order. */
|
|
101
|
+
export declare const outputsOf: (op: Op, output: unknown) => unknown[];
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { ApprovalRequestSchema, SleepFor, SleepUntil, } from "./define.js";
|
|
2
|
+
import { parseOrThrow } from "./errors.js";
|
|
3
|
+
import { isOp } from "./op.js";
|
|
4
|
+
import { DEFAULT_SLEEP_NAME, entryOpsOf, isBatch, isRecord, LOGIN_CODE_WORKFLOW, shown } from "./shared.js";
|
|
5
|
+
/** The step's name the outline gives a call's node: none for a computed op without one, or an approval's title that is no literal. */
|
|
6
|
+
const named = (node) => ("name" in node ? node.name : undefined);
|
|
7
|
+
/**
|
|
8
|
+
* The run's `ctx`: the operations and built-ins its workflow `uses`, and nothing else. Every
|
|
9
|
+
* member that writes a record is placed where the workflow calls it (`CtxRunner.place`) and
|
|
10
|
+
* named (the outline's name, else `fallback`'s), then made by the runner; `ctx.now()` only reads
|
|
11
|
+
* the run's clock, and `ctx.runId` and `ctx.startedBy` are values.
|
|
12
|
+
*/
|
|
13
|
+
export function ctxOf(wf, run, runner) {
|
|
14
|
+
const uses = wf.uses;
|
|
15
|
+
/** A member placed where it is called, then `call`ed there. A refusal rejects, as a member's failure always has. */
|
|
16
|
+
const placed = (what, fallback, call) => async function member(...args) {
|
|
17
|
+
const node = runner.place(member, what);
|
|
18
|
+
const name = (node && named(node)) ?? fallback(...args);
|
|
19
|
+
return call({ ...(node && { node: node.path }), name }, ...args);
|
|
20
|
+
};
|
|
21
|
+
const members = {};
|
|
22
|
+
for (const op of uses.filter(isOp)) {
|
|
23
|
+
// By the id's segments: an app's collection, `data.crm.contacts.get`, is `ctx.data.crm.contacts.get`.
|
|
24
|
+
const group = op.id
|
|
25
|
+
.split(".")
|
|
26
|
+
.slice(0, -1)
|
|
27
|
+
.reduce((at, key) => (at[key] ??= {}), members);
|
|
28
|
+
group[op.name] = placed(op.id,
|
|
29
|
+
// Where no outline places the call (a page), the name it gives, which the outline holds to a literal.
|
|
30
|
+
(_input, options) => options?.name ?? op.id, (at, input, options) => runner.op(op, input, at, options?.connection));
|
|
31
|
+
}
|
|
32
|
+
members.runId = run.id;
|
|
33
|
+
members.now = runner.now;
|
|
34
|
+
if (uses.includes("approval")) {
|
|
35
|
+
members.approval = placed("approval", (title) => title, (at, title, req) => runner.approval(title, req, at));
|
|
36
|
+
}
|
|
37
|
+
if (uses.includes("sleep")) {
|
|
38
|
+
// The outline names every sleep; where there is none, the sleep's own name does.
|
|
39
|
+
members.sleep = placed("sleep", (_req, options) => options?.name ?? DEFAULT_SLEEP_NAME, (at, req) => runner.sleep(req, at));
|
|
40
|
+
}
|
|
41
|
+
if (uses.includes("all"))
|
|
42
|
+
members.all = placed("all", () => "all", (at, list) => runner.all(list, at));
|
|
43
|
+
return guarded(members, "ctx", wf.name, { startedBy: startedByOf(run.actor) });
|
|
44
|
+
}
|
|
45
|
+
/** Who started the run, as `ctx.startedBy` shows it: a plain frozen record, whose absent fields read as undefined. */
|
|
46
|
+
const startedByOf = ({ id, email, github, subject }) => Object.freeze({ id, ...(email && { email }), ...(github && { github }), ...(subject && { subject }) });
|
|
47
|
+
/** `members`, each object in it included, refusing any member not in it (`strict`), with `plain`'s as they are. */
|
|
48
|
+
function guarded(members, path, workflow, plain = {}) {
|
|
49
|
+
const out = {};
|
|
50
|
+
for (const [key, value] of Object.entries(members)) {
|
|
51
|
+
out[key] =
|
|
52
|
+
typeof value === "object" && value !== null
|
|
53
|
+
? guarded(value, `${path}.${key}`, workflow)
|
|
54
|
+
: value;
|
|
55
|
+
}
|
|
56
|
+
return strict({ ...out, ...plain }, path, workflow);
|
|
57
|
+
}
|
|
58
|
+
/** Refuses anything not declared in `uses`, with a message that says so. */
|
|
59
|
+
function strict(obj, path, workflow) {
|
|
60
|
+
return new Proxy(obj, {
|
|
61
|
+
get(target, key, receiver) {
|
|
62
|
+
if (typeof key === "symbol" || key === "then" || key in target)
|
|
63
|
+
return Reflect.get(target, key, receiver);
|
|
64
|
+
throw new Error(`${path}.${key} is not available: add it to \`uses\` in workflow "${workflow}"`);
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Checks a `ctx.approval` request before the runner acts on it, so a bad one fails the run with
|
|
70
|
+
* `invalid_input`: who may decide it, and the operations it covers, as ids (none unless named).
|
|
71
|
+
*/
|
|
72
|
+
export function checkApproval(title, req) {
|
|
73
|
+
const checked = parseOrThrow(ApprovalRequestSchema, req, `ctx.approval("${title}")`, { title });
|
|
74
|
+
return { ...checked, covers: checked.covers ?? [] };
|
|
75
|
+
}
|
|
76
|
+
/** Checks a sleep request before the runner acts on it, so a bad one fails the run with `invalid_input`. */
|
|
77
|
+
export function checkSleep(req) {
|
|
78
|
+
const timed = typeof req === "object" && req !== null && "until" in req;
|
|
79
|
+
return parseOrThrow(timed ? SleepUntil : SleepFor, req, `ctx.sleep(${shown(req)})`);
|
|
80
|
+
}
|
|
81
|
+
/** When a sleep that starts at `started` ends, in ms since the epoch: the time asked for, or `started` plus the duration. */
|
|
82
|
+
export const untilOf = (req, started) => "until" in req
|
|
83
|
+
? typeof req.until === "number"
|
|
84
|
+
? req.until
|
|
85
|
+
: Date.parse(req.until)
|
|
86
|
+
: started +
|
|
87
|
+
(req.ms ?? 0) +
|
|
88
|
+
(req.seconds ?? 0) * 1_000 +
|
|
89
|
+
(req.minutes ?? 0) * 60_000 +
|
|
90
|
+
(req.hours ?? 0) * 3_600_000 +
|
|
91
|
+
(req.days ?? 0) * 86_400_000;
|
|
92
|
+
/** The fields of a mail a `login-code` run sends that the ledger never shows: its body, which holds the code. */
|
|
93
|
+
const LOGIN_CODE_BODY = ["text", "html"];
|
|
94
|
+
/**
|
|
95
|
+
* The value as the ledger records it: each of the operation's `opaque` fields as `"<name>"`, and
|
|
96
|
+
* in a run of `workflow` `login-code`, the mail's `text` and `html` too, so no colleague reads another's code.
|
|
97
|
+
*/
|
|
98
|
+
export function recorded(op, value, workflow) {
|
|
99
|
+
const hidden = [...(op.opaque ?? []), ...(workflow === LOGIN_CODE_WORKFLOW ? LOGIN_CODE_BODY : [])];
|
|
100
|
+
return hidden.reduce((out, path) => hide(out, path.split(".")), value);
|
|
101
|
+
}
|
|
102
|
+
/** `value` with the field at `path` as `"<name>"`, in each item of a list it meets on the way. */
|
|
103
|
+
function hide(value, path) {
|
|
104
|
+
if (Array.isArray(value))
|
|
105
|
+
return value.map((item) => hide(item, path));
|
|
106
|
+
const [name, ...rest] = path;
|
|
107
|
+
if (!isRecord(value) || value[name] === undefined)
|
|
108
|
+
return value;
|
|
109
|
+
return { ...value, [name]: rest.length ? hide(value[name], rest) : `<${name}>` };
|
|
110
|
+
}
|
|
111
|
+
/** The resource instance the call acts on, from the operation's `target`, when it declares one. */
|
|
112
|
+
export function targetOf(op, input) {
|
|
113
|
+
if (!op.target)
|
|
114
|
+
return {};
|
|
115
|
+
const target = op.target(input);
|
|
116
|
+
if (typeof target !== "string") {
|
|
117
|
+
throw new Error(`${op.id}: \`target\` returned ${typeof target}, not a string`);
|
|
118
|
+
}
|
|
119
|
+
return { target };
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The calls a call makes: a collection's `saveMany` (`isBatch`) makes one per entry, the
|
|
123
|
+
* collection's `save` or `delete` with the entry as its input, and these are what the policy
|
|
124
|
+
* decides and the ledger records, so a record's history reads the same whether it was saved
|
|
125
|
+
* alone or in a batch; any other call makes itself.
|
|
126
|
+
*/
|
|
127
|
+
export function callsOf(op, input, ops) {
|
|
128
|
+
if (!isBatch(op))
|
|
129
|
+
return [{ op, input }];
|
|
130
|
+
const { records, deletes } = input;
|
|
131
|
+
const [save, remove] = entryOpsOf(op).map((id) => ops.get(id));
|
|
132
|
+
return [...records.map((e) => ({ op: save, input: e })), ...deletes.map((e) => ({ op: remove, input: e }))];
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* What a call's `op.called` record says of the call itself, wherever it was made (a worker's run,
|
|
136
|
+
* a direct call, a page's run): its operation, the instance it acted on, its effect and its
|
|
137
|
+
* input as the ledger records it (`recorded`).
|
|
138
|
+
*/
|
|
139
|
+
export const opCalled = (c, workflow) => ({
|
|
140
|
+
type: "op.called",
|
|
141
|
+
op: c.op.id,
|
|
142
|
+
...targetOf(c.op, c.input),
|
|
143
|
+
effect: c.op.effect,
|
|
144
|
+
input: recorded(c.op, c.input, workflow),
|
|
145
|
+
});
|
|
146
|
+
/** A call's input as its operation's schema takes it: `invalid_input` naming the operation when it does not. */
|
|
147
|
+
export const inputOf = (op, input) => parseOrThrow(op.input, input, `The input to ${op.id} does not match its schema`, { op: op.id });
|
|
148
|
+
/**
|
|
149
|
+
* A run's record of `app`: `body` with what every record carries, its id `<runId>:<type>:<key>`
|
|
150
|
+
* (the `seq` unless a key is given), tagged with the `ctx.all` member it is written in. A
|
|
151
|
+
* worker's (`entry` in `ledger.ts`) and a page's.
|
|
152
|
+
*/
|
|
153
|
+
export function recordOf(run, app, body, { seq, at, key, group }) {
|
|
154
|
+
const record = {
|
|
155
|
+
v: 1,
|
|
156
|
+
app,
|
|
157
|
+
id: `${run.id}:${body.type}:${key ?? seq}`,
|
|
158
|
+
runId: run.id,
|
|
159
|
+
seq,
|
|
160
|
+
at,
|
|
161
|
+
actor: run.actor,
|
|
162
|
+
workflow: run.workflow,
|
|
163
|
+
...body,
|
|
164
|
+
};
|
|
165
|
+
if (group)
|
|
166
|
+
record.group = group;
|
|
167
|
+
return record;
|
|
168
|
+
}
|
|
169
|
+
/** The outputs of the calls a call made, from its output: a batch's, one per entry, in order. */
|
|
170
|
+
export const outputsOf = (op, output) => (isBatch(op) ? output : [output]);
|
|
171
|
+
//# sourceMappingURL=ctx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ctx.js","sourceRoot":"","sources":["../src/ctx.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,qBAAqB,EAGrB,QAAQ,EAER,UAAU,GAKX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAW,MAAM,SAAS,CAAC;AAExC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAgC5G,sIAAsI;AACtI,MAAM,KAAK,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,UAAU,KAAK,CAAC,EAAgC,EAAE,GAAqC,EAAE,MAAiB;IAC9G,MAAM,IAAI,GAAG,EAAE,CAAC,IAAsB,CAAC;IACvC,oHAAoH;IACpH,MAAM,MAAM,GAAG,CACb,IAAY,EACZ,QAAoC,EACpC,IAA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AC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC;CACzC,CAAC,CAAC;AAEH,gHAAgH;AAChH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAM,EAAE,KAAc,EAAW,EAAE,CACzD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC,EAAE,4BAA4B,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAElG;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CACtB,GAAuD,EACvD,GAAW,EACX,IAAgB,EAChB,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAA0F;IAE/G,MAAM,MAAM,GAAG;QACb,CAAC,EAAE,CAAC;QACJ,GAAG;QACH,EAAE,EAAE,GAAG,GAAG,CAAC,EAAE,IAAI,IAAI,CAAC,IAAI,IAAI,GAAG,IAAI,GAAG,EAAE;QAC1C,KAAK,EAAE,GAAG,CAAC,EAAE;QACb,GAAG;QACH,EAAE;QACF,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,GAAG,IAAI;KACQ,CAAC;IAClB,IAAI,KAAK;QAAE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IAChC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,iGAAiG;AACjG,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAM,EAAE,MAAe,EAAa,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,MAAoB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -808,6 +808,120 @@ export declare const apiTokens: import("drizzle-orm/pg-core").PgTableWithColumns
|
|
|
808
808
|
};
|
|
809
809
|
dialect: 'pg';
|
|
810
810
|
}>;
|
|
811
|
+
/**
|
|
812
|
+
* The api tokens' one-time handoffs (`Tokens.handoff`): each code's SHA-256, never the code, the
|
|
813
|
+
* secret holding the token it hands off and that token's id, its PKCE challenge, and when it
|
|
814
|
+
* expires or was redeemed. Swept once expired.
|
|
815
|
+
*/
|
|
816
|
+
export declare const tokenHandoffs: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
817
|
+
name: "sanoma_token_handoffs";
|
|
818
|
+
schema: undefined;
|
|
819
|
+
columns: {
|
|
820
|
+
codeHash: import("drizzle-orm/pg-core").PgColumn<{
|
|
821
|
+
name: "codeHash";
|
|
822
|
+
tableName: "sanoma_token_handoffs";
|
|
823
|
+
dataType: "string";
|
|
824
|
+
columnType: "PgText";
|
|
825
|
+
data: string;
|
|
826
|
+
driverParam: string;
|
|
827
|
+
notNull: true;
|
|
828
|
+
hasDefault: false;
|
|
829
|
+
isPrimaryKey: true;
|
|
830
|
+
isAutoincrement: false;
|
|
831
|
+
hasRuntimeDefault: false;
|
|
832
|
+
enumValues: [string, ...string[]];
|
|
833
|
+
baseColumn: never;
|
|
834
|
+
identity: undefined;
|
|
835
|
+
generated: undefined;
|
|
836
|
+
}, {}, {}>;
|
|
837
|
+
store: import("drizzle-orm/pg-core").PgColumn<{
|
|
838
|
+
name: "store";
|
|
839
|
+
tableName: "sanoma_token_handoffs";
|
|
840
|
+
dataType: "string";
|
|
841
|
+
columnType: "PgText";
|
|
842
|
+
data: string;
|
|
843
|
+
driverParam: string;
|
|
844
|
+
notNull: true;
|
|
845
|
+
hasDefault: false;
|
|
846
|
+
isPrimaryKey: false;
|
|
847
|
+
isAutoincrement: false;
|
|
848
|
+
hasRuntimeDefault: false;
|
|
849
|
+
enumValues: [string, ...string[]];
|
|
850
|
+
baseColumn: never;
|
|
851
|
+
identity: undefined;
|
|
852
|
+
generated: undefined;
|
|
853
|
+
}, {}, {}>;
|
|
854
|
+
tokenId: import("drizzle-orm/pg-core").PgColumn<{
|
|
855
|
+
name: "tokenId";
|
|
856
|
+
tableName: "sanoma_token_handoffs";
|
|
857
|
+
dataType: "string";
|
|
858
|
+
columnType: "PgText";
|
|
859
|
+
data: string;
|
|
860
|
+
driverParam: string;
|
|
861
|
+
notNull: true;
|
|
862
|
+
hasDefault: false;
|
|
863
|
+
isPrimaryKey: false;
|
|
864
|
+
isAutoincrement: false;
|
|
865
|
+
hasRuntimeDefault: false;
|
|
866
|
+
enumValues: [string, ...string[]];
|
|
867
|
+
baseColumn: never;
|
|
868
|
+
identity: undefined;
|
|
869
|
+
generated: undefined;
|
|
870
|
+
}, {}, {}>;
|
|
871
|
+
challenge: import("drizzle-orm/pg-core").PgColumn<{
|
|
872
|
+
name: "challenge";
|
|
873
|
+
tableName: "sanoma_token_handoffs";
|
|
874
|
+
dataType: "string";
|
|
875
|
+
columnType: "PgText";
|
|
876
|
+
data: string;
|
|
877
|
+
driverParam: string;
|
|
878
|
+
notNull: true;
|
|
879
|
+
hasDefault: false;
|
|
880
|
+
isPrimaryKey: false;
|
|
881
|
+
isAutoincrement: false;
|
|
882
|
+
hasRuntimeDefault: false;
|
|
883
|
+
enumValues: [string, ...string[]];
|
|
884
|
+
baseColumn: never;
|
|
885
|
+
identity: undefined;
|
|
886
|
+
generated: undefined;
|
|
887
|
+
}, {}, {}>;
|
|
888
|
+
expiresAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
889
|
+
name: "expiresAt";
|
|
890
|
+
tableName: "sanoma_token_handoffs";
|
|
891
|
+
dataType: "date";
|
|
892
|
+
columnType: "PgTimestamp";
|
|
893
|
+
data: Date;
|
|
894
|
+
driverParam: string;
|
|
895
|
+
notNull: true;
|
|
896
|
+
hasDefault: false;
|
|
897
|
+
isPrimaryKey: false;
|
|
898
|
+
isAutoincrement: false;
|
|
899
|
+
hasRuntimeDefault: false;
|
|
900
|
+
enumValues: undefined;
|
|
901
|
+
baseColumn: never;
|
|
902
|
+
identity: undefined;
|
|
903
|
+
generated: undefined;
|
|
904
|
+
}, {}, {}>;
|
|
905
|
+
redeemedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
906
|
+
name: "redeemedAt";
|
|
907
|
+
tableName: "sanoma_token_handoffs";
|
|
908
|
+
dataType: "date";
|
|
909
|
+
columnType: "PgTimestamp";
|
|
910
|
+
data: Date;
|
|
911
|
+
driverParam: string;
|
|
912
|
+
notNull: false;
|
|
913
|
+
hasDefault: false;
|
|
914
|
+
isPrimaryKey: false;
|
|
915
|
+
isAutoincrement: false;
|
|
916
|
+
hasRuntimeDefault: false;
|
|
917
|
+
enumValues: undefined;
|
|
918
|
+
baseColumn: never;
|
|
919
|
+
identity: undefined;
|
|
920
|
+
generated: undefined;
|
|
921
|
+
}, {}, {}>;
|
|
922
|
+
};
|
|
923
|
+
dialect: 'pg';
|
|
924
|
+
}>;
|
|
811
925
|
/** The nonces of sealed invite requests spent (`spendInviteRequest`), each until it expires. */
|
|
812
926
|
export declare const inviteRequests: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
813
927
|
name: "sanoma_invite_requests";
|
|
@@ -1566,7 +1680,7 @@ export declare const connectionAttempts: import("drizzle-orm/pg-core").PgTableWi
|
|
|
1566
1680
|
* Each OAuth connection's renewal (`renewal.ts`): the lease one process holds while it renews the
|
|
1567
1681
|
* grant (`holder`, until `leaseUntil`; `sentAt` once the refresh request may have reached the
|
|
1568
1682
|
* provider), when it was last renewed and how that ended, and when the next renewal is due, the
|
|
1569
|
-
* deadline a worker that stops when
|
|
1683
|
+
* deadline a worker that stops when idle registers with its wakeup. Metadata only, never a token.
|
|
1570
1684
|
*/
|
|
1571
1685
|
export declare const connectionRenewals: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1572
1686
|
name: "sanoma_connection_renewals";
|
|
@@ -97,6 +97,19 @@ export const apiTokens = pgTable("sanoma_api_tokens", {
|
|
|
97
97
|
createdAt: when().notNull().defaultNow(),
|
|
98
98
|
revokedAt: when(),
|
|
99
99
|
});
|
|
100
|
+
/**
|
|
101
|
+
* The api tokens' one-time handoffs (`Tokens.handoff`): each code's SHA-256, never the code, the
|
|
102
|
+
* secret holding the token it hands off and that token's id, its PKCE challenge, and when it
|
|
103
|
+
* expires or was redeemed. Swept once expired.
|
|
104
|
+
*/
|
|
105
|
+
export const tokenHandoffs = pgTable("sanoma_token_handoffs", {
|
|
106
|
+
codeHash: text().primaryKey(),
|
|
107
|
+
store: text().notNull(),
|
|
108
|
+
tokenId: text().notNull(),
|
|
109
|
+
challenge: text().notNull(),
|
|
110
|
+
expiresAt: when().notNull(),
|
|
111
|
+
redeemedAt: when(),
|
|
112
|
+
});
|
|
100
113
|
/** The nonces of sealed invite requests spent (`spendInviteRequest`), each until it expires. */
|
|
101
114
|
export const inviteRequests = pgTable("sanoma_invite_requests", {
|
|
102
115
|
nonce: text().primaryKey(),
|
|
@@ -166,7 +179,7 @@ export const connectionAttempts = pgTable("sanoma_connection_attempts", {
|
|
|
166
179
|
* Each OAuth connection's renewal (`renewal.ts`): the lease one process holds while it renews the
|
|
167
180
|
* grant (`holder`, until `leaseUntil`; `sentAt` once the refresh request may have reached the
|
|
168
181
|
* provider), when it was last renewed and how that ended, and when the next renewal is due, the
|
|
169
|
-
* deadline a worker that stops when
|
|
182
|
+
* deadline a worker that stops when idle registers with its wakeup. Metadata only, never a token.
|
|
170
183
|
*/
|
|
171
184
|
export const connectionRenewals = pgTable("sanoma_connection_renewals", {
|
|
172
185
|
connectionId: text().primaryKey(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company.js","sourceRoot":"","sources":["../../src/db/company.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,UAAU,EACV,IAAI,EACJ,SAAS,GACV,MAAM,qBAAqB,CAAC;AAS7B,gGAAgG;AAChG,gGAAgG;AAChG,oFAAoF;AACpF,+EAA+E;AAC/E,qCAAqC;AAErC,MAAM,IAAI,GAAG,GAAG,EAAE,CA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EAAE,OAAO,EAAE;IAChB,qGAAqG;IACrG,MAAM,EAAE,IAAI,EAAE,CAAC,KAAK,EAAkB,CAAC,OAAO,EAAE;IAChD,mFAAmF;IACnF,WAAW,EAAE,IAAI,EAAE,CAAC,KAAK,EAAuC;IAChE,aAAa,EAAE,IAAI,EAAE;IACrB,kBAAkB,EAAE,IAAI,EAAE;IAC1B,KAAK,EAAE,IAAI,EAAE,CAAC,KAAK,EAAiB,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;CAClE,EACD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CACrD,CAAC"}
|
|
@@ -106,6 +106,23 @@ export declare const workflowStatus: import("drizzle-orm/pg-core").PgTableWithCo
|
|
|
106
106
|
identity: undefined;
|
|
107
107
|
generated: undefined;
|
|
108
108
|
}, {}, {}>;
|
|
109
|
+
parentWorkflowId: import("drizzle-orm/pg-core").PgColumn<{
|
|
110
|
+
name: "parentWorkflowId";
|
|
111
|
+
tableName: "workflow_status";
|
|
112
|
+
dataType: "string";
|
|
113
|
+
columnType: "PgText";
|
|
114
|
+
data: string;
|
|
115
|
+
driverParam: string;
|
|
116
|
+
notNull: false;
|
|
117
|
+
hasDefault: false;
|
|
118
|
+
isPrimaryKey: false;
|
|
119
|
+
isAutoincrement: false;
|
|
120
|
+
hasRuntimeDefault: false;
|
|
121
|
+
enumValues: [string, ...string[]];
|
|
122
|
+
baseColumn: never;
|
|
123
|
+
identity: undefined;
|
|
124
|
+
generated: undefined;
|
|
125
|
+
}, {}, {}>;
|
|
109
126
|
};
|
|
110
127
|
dialect: 'pg';
|
|
111
128
|
}>;
|
|
@@ -11,5 +11,7 @@ export const workflowStatus = dbos.table("workflow_status", {
|
|
|
11
11
|
applicationName: text(),
|
|
12
12
|
applicationVersion: text(),
|
|
13
13
|
queueName: text(),
|
|
14
|
+
/** The run that started this one as its child (`WorkerState.startRun`), when one did. */
|
|
15
|
+
parentWorkflowId: text(),
|
|
14
16
|
});
|
|
15
17
|
//# sourceMappingURL=dbos.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dbos.js","sourceRoot":"","sources":["../../src/db/dbos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAErD,2FAA2F;AAC3F,kGAAkG;AAClG,8FAA8F;AAE9F,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;AAErC,6BAA6B;AAC7B,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE;IAC1D,YAAY,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE;IACjC,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE;IACxB,IAAI,EAAE,IAAI,EAAE;IACZ,eAAe,EAAE,IAAI,EAAE;IACvB,kBAAkB,EAAE,IAAI,EAAE;IAC1B,SAAS,EAAE,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"dbos.js","sourceRoot":"","sources":["../../src/db/dbos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAErD,2FAA2F;AAC3F,kGAAkG;AAClG,8FAA8F;AAE9F,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;AAErC,6BAA6B;AAC7B,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE;IAC1D,YAAY,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE;IACjC,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE;IACxB,IAAI,EAAE,IAAI,EAAE;IACZ,eAAe,EAAE,IAAI,EAAE;IACvB,kBAAkB,EAAE,IAAI,EAAE;IAC1B,SAAS,EAAE,IAAI,EAAE;IACjB,yFAAyF;IACzF,gBAAgB,EAAE,IAAI,EAAE;CACzB,CAAC,CAAC"}
|
|
@@ -92,7 +92,7 @@ export declare const identityDeployments: import("drizzle-orm/pg-core").PgTableW
|
|
|
92
92
|
};
|
|
93
93
|
dialect: 'pg';
|
|
94
94
|
}>;
|
|
95
|
-
/** Each deployment credential's hash, never the credential, with its generation and validity. */
|
|
95
|
+
/** Each deployment credential's hash, never the credential, with its generation and validity (no end: no expiry). */
|
|
96
96
|
export declare const identityCredentials: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
97
97
|
name: "credentials";
|
|
98
98
|
schema: "sanoma_identity";
|
|
@@ -172,7 +172,7 @@ export declare const identityCredentials: import("drizzle-orm/pg-core").PgTableW
|
|
|
172
172
|
columnType: "PgTimestamp";
|
|
173
173
|
data: Date;
|
|
174
174
|
driverParam: string;
|
|
175
|
-
notNull:
|
|
175
|
+
notNull: false;
|
|
176
176
|
hasDefault: false;
|
|
177
177
|
isPrimaryKey: false;
|
|
178
178
|
isAutoincrement: false;
|
|
@@ -14,7 +14,7 @@ export const identityDeployments = identity.table("deployments", {
|
|
|
14
14
|
serviceAccount: text().notNull(),
|
|
15
15
|
enabled: boolean().notNull().default(true),
|
|
16
16
|
});
|
|
17
|
-
/** Each deployment credential's hash, never the credential, with its generation and validity. */
|
|
17
|
+
/** Each deployment credential's hash, never the credential, with its generation and validity (no end: no expiry). */
|
|
18
18
|
export const identityCredentials = identity.table("credentials", {
|
|
19
19
|
hash: text().primaryKey(),
|
|
20
20
|
deployment: text()
|
|
@@ -22,7 +22,7 @@ export const identityCredentials = identity.table("credentials", {
|
|
|
22
22
|
.references(() => identityDeployments.id),
|
|
23
23
|
generation: bigint({ mode: "number" }).notNull(),
|
|
24
24
|
validFrom: when().notNull().defaultNow(),
|
|
25
|
-
validUntil: when()
|
|
25
|
+
validUntil: when(),
|
|
26
26
|
revoked: boolean().notNull().default(false),
|
|
27
27
|
}, (t) => [
|
|
28
28
|
unique("credentials_deployment_generation").on(t.deployment, t.generation),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/db/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEtG,gGAAgG;AAChG,iFAAiF;AACjF,+FAA+F;AAC/F,sFAAsF;AAEtF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAEpD,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AAErD,sEAAsE;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,KAAK,CAAC,aAAa,EAAE;IAC/D,EAAE,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE;IACvB,OAAO,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE;IACzB,WAAW,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE;IAC7B,cAAc,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE;IAChC,OAAO,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CAC3C,CAAC,CAAC;AAEH,
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/db/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAA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42
42
|
};
|
|
43
43
|
/**
|
|
44
|
-
* Stamps the change
|
|
44
|
+
* Stamps the apply, change, store-move and child runs `ids` still unfinished on another version with the application version
|
|
45
45
|
* `version`, so DBOS gives them to a worker of that version: those it stamped, each with its status
|
|
46
46
|
* (a PENDING one is the caller's to queue again). DBOS has no call for it (a run's version is set at
|
|
47
47
|
* its start, `forkWorkflow` makes a new id, `rewindWorkflow` takes only an ended run), so this is the
|
package/workflows/dist/db.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DBOS, DBOSClient } from "@dbos-inc/dbos-sdk";
|
|
2
2
|
import { setTimeout as delay } from "node:timers/promises";
|
|
3
|
-
import { and, eq, inArray, lte, ne, notInArray, sql } from "drizzle-orm";
|
|
3
|
+
import { and, eq, inArray, isNotNull, lte, ne, notInArray, or, sql } from "drizzle-orm";
|
|
4
4
|
import { DrizzleQueryError } from "drizzle-orm/errors";
|
|
5
5
|
import { drizzle } from "drizzle-orm/node-postgres";
|
|
6
6
|
import { PgPreparedQuery } from "drizzle-orm/pg-core";
|
|
@@ -9,7 +9,7 @@ import { appBehind, inviteRequests, runChecks } from "./db/company.js";
|
|
|
9
9
|
import { workflowStatus } from "./db/dbos.js";
|
|
10
10
|
import { applyMigrations, COMPANY_MIGRATIONS, migrationsApplied } from "./db/migrate.js";
|
|
11
11
|
import { warn } from "./log.js";
|
|
12
|
-
import { errorMessage, MIGRATE_STORE_WORKFLOW } from "./shared.js";
|
|
12
|
+
import { APPLY_WORKFLOW, errorMessage, MIGRATE_STORE_WORKFLOW } from "./shared.js";
|
|
13
13
|
/**
|
|
14
14
|
* Drizzle over `client`, a `pg` pool or connection the caller owns and ends (`db.$client`). Column
|
|
15
15
|
* names are the schema's properties in snake_case (`casing`), as the generated migrations write them.
|
|
@@ -73,10 +73,14 @@ export function openPool(databaseUrl, what) {
|
|
|
73
73
|
* on the database instead. Remove the switch when DBOS awaits its `SET`.
|
|
74
74
|
*/
|
|
75
75
|
export const DBOS_DATABASE_OPTIONS = { systemDatabaseIdleTransactionTimeoutMs: 0 };
|
|
76
|
-
/** The built-in runs that wait across a deploy, and so are carried onto the next version: a change, and a move between stores. */
|
|
77
|
-
const CARRIED = ["change", MIGRATE_STORE_WORKFLOW];
|
|
78
76
|
/**
|
|
79
|
-
*
|
|
77
|
+
* The built-in runs that wait across a deploy, and so are carried onto the next version: an apply, a
|
|
78
|
+
* change, and a move between stores; and a built-in's child run (a change's drift, which it waits
|
|
79
|
+
* for), started with the code that carries it.
|
|
80
|
+
*/
|
|
81
|
+
const CARRIED = [APPLY_WORKFLOW, "change", MIGRATE_STORE_WORKFLOW];
|
|
82
|
+
/**
|
|
83
|
+
* Stamps the apply, change, store-move and child runs `ids` still unfinished on another version with the application version
|
|
80
84
|
* `version`, so DBOS gives them to a worker of that version: those it stamped, each with its status
|
|
81
85
|
* (a PENDING one is the caller's to queue again). DBOS has no call for it (a run's version is set at
|
|
82
86
|
* its start, `forkWorkflow` makes a new id, `rewindWorkflow` takes only an ended run), so this is the
|
|
@@ -87,7 +91,7 @@ export async function stampVersion(db, ids, version) {
|
|
|
87
91
|
const stamped = await db
|
|
88
92
|
.update(workflowStatus)
|
|
89
93
|
.set({ applicationVersion: version })
|
|
90
|
-
.where(and(inArray(workflowStatus.workflowUuid, [...ids]), inArray(workflowStatus.name, CARRIED), inArray(workflowStatus.status, ["PENDING", "ENQUEUED"]), ne(workflowStatus.applicationVersion, version)))
|
|
94
|
+
.where(and(inArray(workflowStatus.workflowUuid, [...ids]), or(inArray(workflowStatus.name, CARRIED), isNotNull(workflowStatus.parentWorkflowId)), inArray(workflowStatus.status, ["PENDING", "ENQUEUED"]), ne(workflowStatus.applicationVersion, version)))
|
|
91
95
|
.returning({ id: workflowStatus.workflowUuid, status: workflowStatus.status });
|
|
92
96
|
return stamped.map((r) => ({ id: r.id, pending: r.status === "PENDING" }));
|
|
93
97
|
}
|