sanoma 0.11.18 → 0.11.21
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 +22 -22
- package/app/README.md +548 -0
- package/app/dist/api.d.ts +984 -0
- package/app/dist/api.js +261 -0
- package/app/dist/api.js.map +1 -0
- package/app/dist/app-bundle.d.ts +81 -0
- package/app/dist/app-bundle.js +13 -0
- package/app/dist/app-bundle.js.map +1 -0
- package/app/dist/build.d.ts +89 -0
- package/app/dist/build.js +843 -0
- package/app/dist/build.js.map +1 -0
- package/app/dist/bundle-build.d.ts +39 -0
- package/app/dist/bundle-build.js +585 -0
- package/app/dist/bundle-build.js.map +1 -0
- package/app/dist/client/assets/ArrowUp.es-DOgvoS0P.js +1 -0
- package/app/dist/client/assets/Copy.es-B0D5SwiQ.js +1 -0
- package/app/dist/client/assets/DialogTitle-BgjYK22C.js +1 -0
- package/app/dist/client/assets/FloppyDisk.es-DnuNe_a8.js +1 -0
- package/app/dist/client/assets/Globe.es-B6x2e4-a.js +1 -0
- package/app/dist/client/assets/MagnifyingGlass.es-DoNoHEhT.js +1 -0
- package/app/dist/client/assets/Play.es-BwXalGBh.js +1 -0
- package/app/dist/client/assets/Plug.es-CaZsN5P-.js +1 -0
- package/app/dist/client/assets/Plus.es-w9VPpTJB.js +1 -0
- package/app/dist/client/assets/Separator-BAhKFgSd.js +1 -0
- package/app/dist/client/assets/X.es-DKMYClf-.js +1 -0
- package/app/dist/client/assets/_id-BSRAaWtO.js +1 -0
- package/app/dist/client/assets/_id-BjDP-cPH.js +1 -0
- package/app/dist/client/assets/_id-BudM76zX.js +1 -0
- package/app/dist/client/assets/_id-C37U5bBa.js +1 -0
- package/app/dist/client/assets/_id-lmg24JVh.js +2 -0
- package/app/dist/client/assets/_name-CylqFo_t.js +1 -0
- package/app/dist/client/assets/_name-D8Gl8iwy.js +4 -0
- package/app/dist/client/assets/_name-DdPCU8pt.js +1 -0
- package/app/dist/client/assets/_name-TteWQXe0.js +1 -0
- package/app/dist/client/assets/_vendor-BLxW83yk.js +1 -0
- package/app/dist/client/assets/_vendor-Bq3uZU4-.js +1 -0
- package/app/dist/client/assets/app-chrome-H8uZ4dHI.js +16 -0
- package/app/dist/client/assets/app-scope-BeUW_8Qh.js +1 -0
- package/app/dist/client/assets/approval-DpgmTc63.js +1 -0
- package/app/dist/client/assets/apps-71ZEzcL9.js +1 -0
- package/app/dist/client/assets/apps-CoWzNm8M.js +1 -0
- package/app/dist/client/assets/change-glance-DbYcBT7H.js +1 -0
- package/app/dist/client/assets/changes-DIJvP7wQ.js +1 -0
- package/app/dist/client/assets/chat-button-BgpOfYh1.js +1 -0
- package/app/dist/client/assets/chat-prompt-hiawXcK0.js +1 -0
- package/app/dist/client/assets/clipboard-Zb0yr0Ja.js +3 -0
- package/app/dist/client/assets/code-BVYaiQEr.js +32 -0
- package/app/dist/client/assets/common-Dw2i6XKZ.js +3 -0
- package/app/dist/client/assets/composite-D9GNDzFj.js +1 -0
- package/app/dist/client/assets/connect-CIq2KJTz.js +1 -0
- package/app/dist/client/assets/connections-iqd2XbWQ.js +5 -0
- package/app/dist/client/assets/connectors-rI8_D1n1.js +1 -0
- package/app/dist/client/assets/content-DOwCrGXH.js +1 -0
- package/app/dist/client/assets/credentials-26vu6Fv5.js +1 -0
- package/app/dist/client/assets/data-sDMlKaLV.js +1 -0
- package/app/dist/client/assets/decidable-zcYI7bY8.js +1 -0
- package/app/dist/client/assets/declaration-form-BtSVvxhq.js +1 -0
- package/app/dist/client/assets/dialog-DskpUgkl.js +1 -0
- package/app/dist/client/assets/existing-BD3VgJ_8.js +1 -0
- package/app/dist/client/assets/fraunces-latin-ext-wght-normal-Ca2vKHc0.woff2 +0 -0
- package/app/dist/client/assets/fraunces-latin-wght-normal-ukD16Tqj.woff2 +0 -0
- package/app/dist/client/assets/fraunces-vietnamese-wght-normal-CnvboYUG.woff2 +0 -0
- package/app/dist/client/assets/graph-BBLU_iSl.css +1 -0
- package/app/dist/client/assets/graph-Prxl3c55.js +7 -0
- package/app/dist/client/assets/grid-diff-SMsvea6t.js +1 -0
- package/app/dist/client/assets/hosting-BBHUppH-.js +1 -0
- package/app/dist/client/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/app/dist/client/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-sans-cyrillic-ext-wght-italic-O9KpBTMP.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-sans-cyrillic-ext-wght-normal-d45eAU9y.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-sans-cyrillic-wght-italic-BC1D_hcE.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-sans-cyrillic-wght-normal-BAAhND-U.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-sans-greek-wght-italic-BOZ1G-_q.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-sans-greek-wght-normal-CmyJS8uq.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-sans-latin-ext-wght-italic-QwKXLQRc.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-sans-latin-wght-italic-DKUSOBgV.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-sans-vietnamese-wght-italic-CKSJVnJa.woff2 +0 -0
- package/app/dist/client/assets/ibm-plex-sans-vietnamese-wght-normal-Dg1JeJN0.woff2 +0 -0
- package/app/dist/client/assets/import-B92fd4Tl.js +1 -0
- package/app/dist/client/assets/inbox-57oGZtxE.js +1 -0
- package/app/dist/client/assets/inbox-B2AMNtk5.js +1 -0
- package/app/dist/client/assets/index-Bn3XeKy8.js +10 -0
- package/app/dist/client/assets/kit-BsK6VZTQ.js +1 -0
- package/app/dist/client/assets/lazyRouteComponent-Uri98HNq.js +1 -0
- package/app/dist/client/assets/lines-DuFrbGkQ.js +3 -0
- package/app/dist/client/assets/motion-C8lNeYvK.js +1 -0
- package/app/dist/client/assets/names-COx1nqcj.js +1 -0
- package/app/dist/client/assets/people-ISOMYCTu.js +1 -0
- package/app/dist/client/assets/permissions-Cenat84K.js +2 -0
- package/app/dist/client/assets/permissions-grid-B2GtGwzv.js +1 -0
- package/app/dist/client/assets/route-BP1XwaTB.js +1 -0
- package/app/dist/client/assets/route-KVU6QgwJ.js +1 -0
- package/app/dist/client/assets/runs-table-35lNzKLn.js +1 -0
- package/app/dist/client/assets/scenario-DSwsavxS.js +1 -0
- package/app/dist/client/assets/scenario-graph-CAzWOtqV.js +1 -0
- package/app/dist/client/assets/schema-BpqanhX0.js +1 -0
- package/app/dist/client/assets/separator-BlwkzEY0.js +1 -0
- package/app/dist/client/assets/sheet-BYL9XU5s.js +1 -0
- package/app/dist/client/assets/site-icon-DZvOfBvU.js +1 -0
- package/app/dist/client/assets/sites.index-CcNo6N8u.js +1 -0
- package/app/dist/client/assets/spinner-BGy6LWIW.js +1 -0
- package/app/dist/client/assets/start-form-Bgo9I63s.js +1 -0
- package/app/dist/client/assets/store-BGu0d2Ld.js +57 -0
- package/app/dist/client/assets/style-CCDLLPgG.css +2 -0
- package/app/dist/client/assets/table-DjbI5VTn.js +1 -0
- package/app/dist/client/assets/textarea-DXO0eUdp.js +1 -0
- package/app/dist/client/assets/useLoaderData-BQd5yMlA.js +1 -0
- package/app/dist/client/assets/useOpenInteractionType-Bin8RjM5.js +1 -0
- package/app/dist/client/assets/useRegisterFieldControl-CQPTOU7Z.js +1 -0
- package/app/dist/client/assets/useValueChanged-DMkuvFZG.js +1 -0
- package/app/dist/client/assets/utils-CMsCvwYQ.js +1 -0
- package/app/dist/client/assets/who-are-you-Bt1WI3Cz.js +1 -0
- package/app/dist/client/assets/workflow-BJpO61A-.js +1 -0
- package/app/dist/client/assets/workflow-view-DP-UlRiH.js +1 -0
- package/app/dist/client/assets/workflows-BLCBgxbx.js +1 -0
- package/app/dist/components/grid/plan.d.ts +373 -0
- package/app/dist/components/grid/plan.js +347 -0
- package/app/dist/components/grid/plan.js.map +1 -0
- package/app/dist/content-files.d.ts +59 -0
- package/app/dist/content-files.js +218 -0
- package/app/dist/content-files.js.map +1 -0
- package/app/dist/content-types.d.ts +39 -0
- package/app/dist/content-types.js +16 -0
- package/app/dist/content-types.js.map +1 -0
- package/app/dist/context.d.ts +92 -0
- package/app/dist/context.js +2 -0
- package/app/dist/context.js.map +1 -0
- package/app/dist/handler.d.ts +72 -0
- package/app/dist/handler.js +179 -0
- package/app/dist/handler.js.map +1 -0
- package/app/dist/index.d.ts +81 -0
- package/app/dist/index.js +345 -0
- package/app/dist/index.js.map +1 -0
- package/app/dist/lib/apply-plan.d.ts +29 -0
- package/app/dist/lib/apply-plan.js +65 -0
- package/app/dist/lib/apply-plan.js.map +1 -0
- package/app/dist/lib/chat.d.ts +104 -0
- package/app/dist/lib/chat.js +72 -0
- package/app/dist/lib/chat.js.map +1 -0
- package/app/dist/lib/names.d.ts +4 -0
- package/app/dist/lib/names.js +11 -0
- package/app/dist/lib/names.js.map +1 -0
- package/app/dist/login/admission.d.ts +16 -0
- package/app/dist/login/admission.js +63 -0
- package/app/dist/login/admission.js.map +1 -0
- package/app/dist/login/keys.d.ts +32 -0
- package/app/dist/login/keys.js +60 -0
- package/app/dist/login/keys.js.map +1 -0
- package/app/dist/login/page.d.ts +23 -0
- package/app/dist/login/page.js +95 -0
- package/app/dist/login/page.js.map +1 -0
- package/app/dist/login/public.d.ts +30 -0
- package/app/dist/login/public.js +101 -0
- package/app/dist/login/public.js.map +1 -0
- package/app/dist/login/staff.d.ts +23 -0
- package/app/dist/login/staff.js +330 -0
- package/app/dist/login/staff.js.map +1 -0
- package/app/dist/loopback.d.ts +32 -0
- package/app/dist/loopback.js +84 -0
- package/app/dist/loopback.js.map +1 -0
- package/app/dist/seo.d.ts +33 -0
- package/app/dist/seo.js +66 -0
- package/app/dist/seo.js.map +1 -0
- package/app/dist/server/assets/_id-BViXAagq.js +689 -0
- package/app/dist/server/assets/_id-Dt9tTylX.js +19 -0
- package/app/dist/server/assets/_id-ce1EGp7Y.js +30 -0
- package/app/dist/server/assets/_id-wB8khGTz.js +82 -0
- package/app/dist/server/assets/_id-wuJIq2ZZ.js +13 -0
- package/app/dist/server/assets/_name-BGagGBjX.js +371 -0
- package/app/dist/server/assets/_name-BqFwnyf7.js +30 -0
- package/app/dist/server/assets/_name-D_-MhjNf.js +2951 -0
- package/app/dist/server/assets/_name-DntbHE-b.js +350 -0
- package/app/dist/server/assets/_tanstack-start-manifest_v-BljuBM-G.js +259 -0
- package/app/dist/server/assets/_vendor-CNB03LWX.js +137 -0
- package/app/dist/server/assets/_vendor-CcEviOki.js +20 -0
- package/app/dist/server/assets/actor-D6iA0pDg.js +94 -0
- package/app/dist/server/assets/app-chrome-BYS81Vnx.js +1410 -0
- package/app/dist/server/assets/app-scope-CXIgOFmi.js +79 -0
- package/app/dist/server/assets/apply-plan-ybBda6vQ.js +265 -0
- package/app/dist/server/assets/approval-Su315ikC.js +315 -0
- package/app/dist/server/assets/apps-Dbg2f5Lh.js +6 -0
- package/app/dist/server/assets/apps-xwQAehch.js +184 -0
- package/app/dist/server/assets/button-f9Lc8qLl.js +906 -0
- package/app/dist/server/assets/change-glance-CpArIbGS.js +142 -0
- package/app/dist/server/assets/changes-Bc_OiDBD.js +103 -0
- package/app/dist/server/assets/chat-DMN_hoKm.js +857 -0
- package/app/dist/server/assets/chat-button-LtA80MoR.js +19 -0
- package/app/dist/server/assets/chat-prompt-BYwbMxR6.js +10 -0
- package/app/dist/server/assets/clipboard-lnKxNXLI.js +70 -0
- package/app/dist/server/assets/code-COyt8L-n.js +123 -0
- package/app/dist/server/assets/common-CWHLj7KV.js +1036 -0
- package/app/dist/server/assets/connect-BpPiu5s6.js +165 -0
- package/app/dist/server/assets/connections-DBgb1bvX.js +1197 -0
- package/app/dist/server/assets/connectors-5a5_SlHO.js +186 -0
- package/app/dist/server/assets/content-B9KP-eh3.js +3 -0
- package/app/dist/server/assets/credentials-ud_Y68hx.js +187 -0
- package/app/dist/server/assets/data-aEdhwcqy.js +168 -0
- package/app/dist/server/assets/decidable-Dj5xIrIc.js +13 -0
- package/app/dist/server/assets/declaration-form-Dfg1yNuY.js +183 -0
- package/app/dist/server/assets/dialog-BGjiw3Dx.js +84 -0
- package/app/dist/server/assets/dropdown-menu-DAC3LWas.js +97 -0
- package/app/dist/server/assets/empty-plugin-adapters-CeuNAGfU.js +4 -0
- package/app/dist/server/assets/existing-B4d4NrC8.js +125 -0
- package/app/dist/server/assets/field-C0Xx_90s.js +94 -0
- package/app/dist/server/assets/functions-BvFYzabD.js +824 -0
- package/app/dist/server/assets/graph-qYOdoz2s.js +926 -0
- package/app/dist/server/assets/grid-diff-jTvp-8wS.js +171 -0
- package/app/dist/server/assets/hosting-bbn9UvDc.js +718 -0
- package/app/dist/server/assets/import-DIwvzHb6.js +730 -0
- package/app/dist/server/assets/inbox-D6R6sWBB.js +268 -0
- package/app/dist/server/assets/inbox-Dj-5FleF.js +65 -0
- package/app/dist/server/assets/input-D63gF3G2.js +14 -0
- package/app/dist/server/assets/item-BDSXoEr_.js +97 -0
- package/app/dist/server/assets/kit-D6EulwBe.js +489 -0
- package/app/dist/server/assets/lines-B4w04QZ0.js +27 -0
- package/app/dist/server/assets/middleware-B8JRLyxx.js +1420 -0
- package/app/dist/server/assets/motion-CAc7ab9u.js +35 -0
- package/app/dist/server/assets/names-B04Si-sV.js +9 -0
- package/app/dist/server/assets/native-select-DLa-He0n.js +37 -0
- package/app/dist/server/assets/people-CkU_AxrV.js +553 -0
- package/app/dist/server/assets/permissions-BfMcQqQb.js +256 -0
- package/app/dist/server/assets/permissions-grid-DWP9FAAS.js +91 -0
- package/app/dist/server/assets/route-BTT7nMJq.js +17 -0
- package/app/dist/server/assets/route-CF_8jQYY.js +22 -0
- package/app/dist/server/assets/router-BvYtxrVN.js +2334 -0
- package/app/dist/server/assets/runs-table-BBudn12Y.js +87 -0
- package/app/dist/server/assets/scenario-BXGTSTiP.js +141 -0
- package/app/dist/server/assets/scenario-graph-BErXIRgF.js +46 -0
- package/app/dist/server/assets/schema-DBT8KJsP.js +204 -0
- package/app/dist/server/assets/separator-8MZ7vR3f.js +13 -0
- package/app/dist/server/assets/sheet-5Cyp-4UW.js +74 -0
- package/app/dist/server/assets/site-icon-DJisMQUK.js +22 -0
- package/app/dist/server/assets/sites.index-1l0BtgVf.js +138 -0
- package/app/dist/server/assets/spinner-C1ZW08lp.js +15 -0
- package/app/dist/server/assets/start-CSU4irVK.js +75 -0
- package/app/dist/server/assets/start-form-DI60UOrc.js +399 -0
- package/app/dist/server/assets/table-DtPk_h_5.js +51 -0
- package/app/dist/server/assets/textarea-f0Ip5ed1.js +12 -0
- package/app/dist/server/assets/utils-wksS9pYh.js +138 -0
- package/app/dist/server/assets/who-are-you-ZGyMnpVi.js +122 -0
- package/app/dist/server/assets/workflow-Z99QWO42.js +115 -0
- package/app/dist/server/assets/workflow-view-C8X8U11S.js +1427 -0
- package/app/dist/server/assets/workflows-C0kJoGf1.js +344 -0
- package/app/dist/server/chat.d.ts +35 -0
- package/app/dist/server/chat.js +231 -0
- package/app/dist/server/chat.js.map +1 -0
- package/app/dist/server/core.d.ts +186 -0
- package/app/dist/server/core.js +716 -0
- package/app/dist/server/core.js.map +1 -0
- package/app/dist/server/go-live.d.ts +90 -0
- package/app/dist/server/go-live.js +351 -0
- package/app/dist/server/go-live.js.map +1 -0
- package/app/dist/server/models.d.ts +24 -0
- package/app/dist/server/models.js +42 -0
- package/app/dist/server/models.js.map +1 -0
- package/app/dist/server/people.d.ts +14 -0
- package/app/dist/server/people.js +41 -0
- package/app/dist/server/people.js.map +1 -0
- package/app/dist/server/secrets.d.ts +3 -0
- package/app/dist/server/secrets.js +5 -0
- package/app/dist/server/secrets.js.map +1 -0
- package/app/dist/server/server.js +7024 -0
- package/app/dist/server/setup.d.ts +75 -0
- package/app/dist/server/setup.js +308 -0
- package/app/dist/server/setup.js.map +1 -0
- package/app/dist/server/webhooks.d.ts +11 -0
- package/app/dist/server/webhooks.js +40 -0
- package/app/dist/server/webhooks.js.map +1 -0
- package/app/dist/site-path.d.ts +24 -0
- package/app/dist/site-path.js +27 -0
- package/app/dist/site-path.js.map +1 -0
- package/app/dist/snapshot-build.d.ts +23 -0
- package/app/dist/snapshot-build.js +255 -0
- package/app/dist/snapshot-build.js.map +1 -0
- package/app/dist/snapshot.d.ts +56 -0
- package/app/dist/snapshot.js +19 -0
- package/app/dist/snapshot.js.map +1 -0
- package/app/dist/steps/agent/acp.d.ts +116 -0
- package/app/dist/steps/agent/acp.js +788 -0
- package/app/dist/steps/agent/acp.js.map +1 -0
- package/app/dist/steps/agent/box-session.d.ts +46 -0
- package/app/dist/steps/agent/box-session.js +179 -0
- package/app/dist/steps/agent/box-session.js.map +1 -0
- package/app/dist/steps/agent/carrier.d.ts +56 -0
- package/app/dist/steps/agent/carrier.js +215 -0
- package/app/dist/steps/agent/carrier.js.map +1 -0
- package/app/dist/steps/agent/checkout.d.ts +73 -0
- package/app/dist/steps/agent/checkout.js +167 -0
- package/app/dist/steps/agent/checkout.js.map +1 -0
- package/app/dist/steps/agent/harness.d.ts +5 -0
- package/app/dist/steps/agent/harness.js +199 -0
- package/app/dist/steps/agent/harness.js.map +1 -0
- package/app/dist/steps/agent/local-box.d.ts +16 -0
- package/app/dist/steps/agent/local-box.js +37 -0
- package/app/dist/steps/agent/local-box.js.map +1 -0
- package/app/dist/steps/agent/loop.d.ts +3 -0
- package/app/dist/steps/agent/loop.js +60 -0
- package/app/dist/steps/agent/loop.js.map +1 -0
- package/app/dist/steps/agent/prompt.d.ts +9 -0
- package/app/dist/steps/agent/prompt.js +107 -0
- package/app/dist/steps/agent/prompt.js.map +1 -0
- package/app/dist/steps/agent/tools.d.ts +2814 -0
- package/app/dist/steps/agent/tools.js +248 -0
- package/app/dist/steps/agent/tools.js.map +1 -0
- package/app/dist/steps/agent/transcript.d.ts +19 -0
- package/app/dist/steps/agent/transcript.js +66 -0
- package/app/dist/steps/agent/transcript.js.map +1 -0
- package/app/dist/steps/agent/turn.d.ts +17 -0
- package/app/dist/steps/agent/turn.js +59 -0
- package/app/dist/steps/agent/turn.js.map +1 -0
- package/app/dist/steps/connect.d.ts +25 -0
- package/app/dist/steps/connect.js +141 -0
- package/app/dist/steps/connect.js.map +1 -0
- package/app/dist/steps/go-live.d.ts +40 -0
- package/app/dist/steps/go-live.js +310 -0
- package/app/dist/steps/go-live.js.map +1 -0
- package/app/dist/steps/index.d.ts +3 -0
- package/app/dist/steps/index.js +11 -0
- package/app/dist/steps/index.js.map +1 -0
- package/app/dist/steps/writes.d.ts +29 -0
- package/app/dist/steps/writes.js +174 -0
- package/app/dist/steps/writes.js.map +1 -0
- package/app/dist/stylesheet.json +1 -0
- package/app/src/actor.ts +130 -0
- package/app/src/api-client.ts +73 -0
- package/app/src/api.ts +686 -0
- package/app/src/app-bundle.ts +77 -0
- package/app/src/build.ts +907 -0
- package/app/src/bundle-build.ts +661 -0
- package/app/src/components/app-chrome.tsx +107 -0
- package/app/src/components/app-scope.tsx +98 -0
- package/app/src/components/apply-plan.tsx +191 -0
- package/app/src/components/approval.tsx +367 -0
- package/app/src/components/base-node.tsx +12 -0
- package/app/src/components/boundaries.tsx +64 -0
- package/app/src/components/change-decision.tsx +123 -0
- package/app/src/components/change-glance.tsx +44 -0
- package/app/src/components/chat-button.tsx +20 -0
- package/app/src/components/code.tsx +116 -0
- package/app/src/components/common.tsx +895 -0
- package/app/src/components/connections.tsx +844 -0
- package/app/src/components/credentials.tsx +219 -0
- package/app/src/components/data-grid.tsx +247 -0
- package/app/src/components/declaration-form.tsx +194 -0
- package/app/src/components/density.tsx +44 -0
- package/app/src/components/field-diff.tsx +91 -0
- package/app/src/components/go-live.tsx +669 -0
- package/app/src/components/graph.css +14 -0
- package/app/src/components/graph.tsx +563 -0
- package/app/src/components/grid/cell.tsx +149 -0
- package/app/src/components/grid/clipboard.ts +83 -0
- package/app/src/components/grid/collection.ts +476 -0
- package/app/src/components/grid/columns.tsx +357 -0
- package/app/src/components/grid/conflicts.tsx +81 -0
- package/app/src/components/grid/gestures.ts +169 -0
- package/app/src/components/grid/grid.tsx +760 -0
- package/app/src/components/grid/keys.ts +83 -0
- package/app/src/components/grid/plan.ts +389 -0
- package/app/src/components/grid/review.tsx +340 -0
- package/app/src/components/grid/staged.tsx +454 -0
- package/app/src/components/import/match.tsx +212 -0
- package/app/src/components/import/review.tsx +121 -0
- package/app/src/components/import/sheet.ts +166 -0
- package/app/src/components/import/upload.tsx +116 -0
- package/app/src/components/inspector.tsx +310 -0
- package/app/src/components/kit.tsx +276 -0
- package/app/src/components/ledger.tsx +344 -0
- package/app/src/components/new-run.tsx +114 -0
- package/app/src/components/permissions-diff.tsx +66 -0
- package/app/src/components/permissions-grid.tsx +133 -0
- package/app/src/components/record-form.tsx +208 -0
- package/app/src/components/record-history.tsx +119 -0
- package/app/src/components/runs-table.tsx +111 -0
- package/app/src/components/scenario.tsx +102 -0
- package/app/src/components/shell/bar.tsx +285 -0
- package/app/src/components/shell/chat-parts.tsx +326 -0
- package/app/src/components/shell/chat-prompt.ts +26 -0
- package/app/src/components/shell/chat.tsx +375 -0
- package/app/src/components/shell/draft-card.tsx +123 -0
- package/app/src/components/shell/nav-user.tsx +174 -0
- package/app/src/components/shell/prefs.ts +28 -0
- package/app/src/components/site-icon.tsx +17 -0
- package/app/src/components/store-move.tsx +313 -0
- package/app/src/components/ui/alert.tsx +55 -0
- package/app/src/components/ui/avatar.tsx +90 -0
- package/app/src/components/ui/badge.tsx +48 -0
- package/app/src/components/ui/breadcrumb.tsx +92 -0
- package/app/src/components/ui/button-group.tsx +78 -0
- package/app/src/components/ui/button.tsx +49 -0
- package/app/src/components/ui/card.tsx +69 -0
- package/app/src/components/ui/checkbox.tsx +25 -0
- package/app/src/components/ui/collapsible.tsx +15 -0
- package/app/src/components/ui/dialog.tsx +132 -0
- package/app/src/components/ui/dropdown-menu.tsx +252 -0
- package/app/src/components/ui/empty.tsx +86 -0
- package/app/src/components/ui/field.tsx +218 -0
- package/app/src/components/ui/input.tsx +19 -0
- package/app/src/components/ui/item.tsx +179 -0
- package/app/src/components/ui/label.tsx +17 -0
- package/app/src/components/ui/native-select.tsx +47 -0
- package/app/src/components/ui/popover.tsx +62 -0
- package/app/src/components/ui/separator.tsx +18 -0
- package/app/src/components/ui/sheet.tsx +102 -0
- package/app/src/components/ui/skeleton.tsx +7 -0
- package/app/src/components/ui/slider.tsx +40 -0
- package/app/src/components/ui/sonner.tsx +41 -0
- package/app/src/components/ui/spinner.tsx +17 -0
- package/app/src/components/ui/table.tsx +72 -0
- package/app/src/components/ui/tabs.tsx +68 -0
- package/app/src/components/ui/textarea.tsx +17 -0
- package/app/src/components/ui/tooltip.tsx +51 -0
- package/app/src/components/who-are-you.tsx +128 -0
- package/app/src/components/workflow-runs.tsx +213 -0
- package/app/src/components/workflow-view.tsx +293 -0
- package/app/src/components/workflow.tsx +142 -0
- package/app/src/components/zoom-slider.tsx +69 -0
- package/app/src/content-files.ts +248 -0
- package/app/src/content-types.ts +49 -0
- package/app/src/content.ts +49 -0
- package/app/src/context.ts +91 -0
- package/app/src/dev-imports.ts +5 -0
- package/app/src/env.d.ts +48 -0
- package/app/src/form/run-form.tsx +45 -0
- package/app/src/form/schema.ts +308 -0
- package/app/src/form/secure-fields.ts +42 -0
- package/app/src/form/start-form.tsx +427 -0
- package/app/src/form/will-ask.tsx +25 -0
- package/app/src/functions.ts +300 -0
- package/app/src/graph/layout.ts +238 -0
- package/app/src/graph/outline-graph.ts +123 -0
- package/app/src/graph/run-graph.ts +193 -0
- package/app/src/graph/scenario-graph.ts +48 -0
- package/app/src/graph/types.ts +144 -0
- package/app/src/graph/wildcard.ts +40 -0
- package/app/src/handler.ts +257 -0
- package/app/src/icon-small.svg +1 -0
- package/app/src/icon.svg +1 -0
- package/app/src/index.ts +455 -0
- package/app/src/lib/apply-plan.ts +79 -0
- package/app/src/lib/apps.ts +10 -0
- package/app/src/lib/changes.ts +86 -0
- package/app/src/lib/chat.ts +146 -0
- package/app/src/lib/cn-tables.ts +116 -0
- package/app/src/lib/decidable.ts +21 -0
- package/app/src/lib/desktop.ts +52 -0
- package/app/src/lib/grid-diff.ts +205 -0
- package/app/src/lib/inbox.ts +59 -0
- package/app/src/lib/lines.ts +31 -0
- package/app/src/lib/locales.ts +101 -0
- package/app/src/lib/motion.ts +17 -0
- package/app/src/lib/names.ts +12 -0
- package/app/src/lib/preview.ts +49 -0
- package/app/src/lib/records.ts +56 -0
- package/app/src/lib/sites.ts +92 -0
- package/app/src/lib/time.ts +10 -0
- package/app/src/lib/tone.ts +78 -0
- package/app/src/lib/utils.ts +13 -0
- package/app/src/login/admission.ts +72 -0
- package/app/src/login/keys.ts +65 -0
- package/app/src/login/page.ts +119 -0
- package/app/src/login/public.ts +138 -0
- package/app/src/login/staff.ts +399 -0
- package/app/src/loopback.ts +96 -0
- package/app/src/middleware.ts +26 -0
- package/app/src/public-fns.ts +5 -0
- package/app/src/queries.ts +859 -0
- package/app/src/router.tsx +45 -0
- package/app/src/routes/__root.tsx +223 -0
- package/app/src/routes/api/call.ts +17 -0
- package/app/src/routes/api/chat.ts +15 -0
- package/app/src/routes/api/sign-in.ts +14 -0
- package/app/src/routes/apps/$name.tsx +380 -0
- package/app/src/routes/apps/index.tsx +204 -0
- package/app/src/routes/apps/route.tsx +8 -0
- package/app/src/routes/changes/$id.tsx +205 -0
- package/app/src/routes/changes/index.tsx +103 -0
- package/app/src/routes/changes/route.tsx +8 -0
- package/app/src/routes/connect/$vendor/callback.ts +9 -0
- package/app/src/routes/connectors/$vendor.tsx +184 -0
- package/app/src/routes/connectors/index.tsx +194 -0
- package/app/src/routes/connectors/route.tsx +8 -0
- package/app/src/routes/data/$name/import.tsx +177 -0
- package/app/src/routes/data/$name/index.tsx +266 -0
- package/app/src/routes/data/$name/route.tsx +18 -0
- package/app/src/routes/data/index.tsx +178 -0
- package/app/src/routes/data/route.tsx +11 -0
- package/app/src/routes/hosting/connect.tsx +156 -0
- package/app/src/routes/hosting/existing.tsx +115 -0
- package/app/src/routes/hosting/index.tsx +845 -0
- package/app/src/routes/hosting/route.tsx +11 -0
- package/app/src/routes/inbox.tsx +310 -0
- package/app/src/routes/index.tsx +8 -0
- package/app/src/routes/people.tsx +624 -0
- package/app/src/routes/permissions.tsx +284 -0
- package/app/src/routes/resources.tsx +10 -0
- package/app/src/routes/runs/$id.tsx +14 -0
- package/app/src/routes/runs/index.tsx +8 -0
- package/app/src/routes/setup/connect.tsx +10 -0
- package/app/src/routes/setup/existing.tsx +8 -0
- package/app/src/routes/setup/github/callback.ts +7 -0
- package/app/src/routes/setup/github/manifest.ts +7 -0
- package/app/src/routes/setup/index.tsx +8 -0
- package/app/src/routes/sites.index.tsx +131 -0
- package/app/src/routes/start.tsx +15 -0
- package/app/src/routes/workflows/$name/index.tsx +140 -0
- package/app/src/routes/workflows/$name/new.tsx +11 -0
- package/app/src/routes/workflows/$name/route.tsx +58 -0
- package/app/src/routes/workflows/$name/runs/$id.tsx +97 -0
- package/app/src/routes/workflows/index.tsx +413 -0
- package/app/src/routes/workflows/route.tsx +11 -0
- package/app/src/seo.ts +94 -0
- package/app/src/server/available.ts +89 -0
- package/app/src/server/chat.ts +249 -0
- package/app/src/server/columns.ts +52 -0
- package/app/src/server/connect.ts +89 -0
- package/app/src/server/core.ts +889 -0
- package/app/src/server/go-live.ts +420 -0
- package/app/src/server/host-derived.ts +72 -0
- package/app/src/server/models.ts +52 -0
- package/app/src/server/people.ts +51 -0
- package/app/src/server/secrets.ts +6 -0
- package/app/src/server/setup.ts +335 -0
- package/app/src/server/webhooks.ts +38 -0
- package/app/src/server.ts +4 -0
- package/app/src/site-path.ts +35 -0
- package/app/src/site-url.ts +53 -0
- package/app/src/site.ts +154 -0
- package/app/src/snapshot-build.ts +288 -0
- package/app/src/snapshot.ts +69 -0
- package/app/src/start.ts +63 -0
- package/app/src/steps/agent/acp.ts +918 -0
- package/app/src/steps/agent/box-session.ts +230 -0
- package/app/src/steps/agent/carrier.ts +242 -0
- package/app/src/steps/agent/checkout.ts +222 -0
- package/app/src/steps/agent/harness.ts +265 -0
- package/app/src/steps/agent/local-box.ts +40 -0
- package/app/src/steps/agent/loop.ts +80 -0
- package/app/src/steps/agent/prompt.ts +124 -0
- package/app/src/steps/agent/tools.ts +300 -0
- package/app/src/steps/agent/transcript.ts +95 -0
- package/app/src/steps/agent/turn.ts +63 -0
- package/app/src/steps/connect.ts +151 -0
- package/app/src/steps/go-live.ts +358 -0
- package/app/src/steps/index.ts +13 -0
- package/app/src/steps/writes.ts +200 -0
- package/app/src/style.css +69 -0
- package/app/src/ui.css +301 -0
- package/app/src/ui.ts +147 -0
- package/app/src/worker/app.ts +189 -0
- package/app/src/worker/assets.ts +12 -0
- package/app/src/worker/main.ts +32 -0
- package/app/src/worker/missing.js +13 -0
- package/app/tsconfig.site.json +20 -0
- package/better-auth/README.md +115 -0
- package/better-auth/dist/connector.d.ts +5 -0
- package/better-auth/dist/connector.js +14 -0
- package/better-auth/dist/connector.js.map +1 -0
- package/better-auth/dist/db/staff.d.ts +695 -0
- package/better-auth/dist/db/staff.js +4 -0
- package/better-auth/dist/db/staff.js.map +1 -0
- package/better-auth/dist/db/tables.d.ts +702 -0
- package/better-auth/dist/db/tables.js +69 -0
- package/better-auth/dist/db/tables.js.map +1 -0
- package/better-auth/dist/db/visitors.d.ts +695 -0
- package/better-auth/dist/db/visitors.js +4 -0
- package/better-auth/dist/db/visitors.js.map +1 -0
- package/better-auth/dist/index.d.ts +11 -0
- package/better-auth/dist/index.js +16 -0
- package/better-auth/dist/index.js.map +1 -0
- package/better-auth/dist/instance.d.ts +716 -0
- package/better-auth/dist/instance.js +210 -0
- package/better-auth/dist/instance.js.map +1 -0
- package/better-auth/dist/login.d.ts +13 -0
- package/better-auth/dist/login.js +139 -0
- package/better-auth/dist/login.js.map +1 -0
- package/better-auth/dist/staff.d.ts +12 -0
- package/better-auth/dist/staff.js +254 -0
- package/better-auth/dist/staff.js.map +1 -0
- package/better-auth/drizzle/staff/0000_closed_toro.sql +64 -0
- package/better-auth/drizzle/staff/meta/0000_snapshot.json +431 -0
- package/better-auth/drizzle/staff/meta/_journal.json +13 -0
- package/better-auth/drizzle/visitors/0000_natural_dexter_bennett.sql +64 -0
- package/better-auth/drizzle/visitors/meta/0000_snapshot.json +431 -0
- package/better-auth/drizzle/visitors/meta/_journal.json +13 -0
- package/bridge/README.md +146 -0
- package/bridge/dist/bin.d.ts +20 -0
- package/bridge/dist/bin.js +37 -0
- package/bridge/dist/bin.js.map +1 -0
- package/bridge/dist/bridge.d.ts +159 -0
- package/bridge/dist/bridge.js +189 -0
- package/bridge/dist/bridge.js.map +1 -0
- package/bridge/dist/client.d.ts +37 -0
- package/bridge/dist/client.js +118 -0
- package/bridge/dist/client.js.map +1 -0
- package/bridge/dist/configure.d.ts +5 -0
- package/bridge/dist/configure.js +17 -0
- package/bridge/dist/configure.js.map +1 -0
- package/bridge/dist/connector.d.ts +164 -0
- package/bridge/dist/connector.js +335 -0
- package/bridge/dist/connector.js.map +1 -0
- package/bridge/dist/fake.d.ts +4 -0
- package/bridge/dist/fake.js +4 -0
- package/bridge/dist/fake.js.map +1 -0
- package/bridge/dist/fixtures.d.ts +36 -0
- package/bridge/dist/fixtures.js +18 -0
- package/bridge/dist/fixtures.js.map +1 -0
- package/bridge/dist/gen/bridge/v1/bridge_pb.d.ts +694 -0
- package/bridge/dist/gen/bridge/v1/bridge_pb.js +173 -0
- package/bridge/dist/gen/bridge/v1/bridge_pb.js.map +1 -0
- package/bridge/dist/index.d.ts +6 -0
- package/bridge/dist/index.js +7 -0
- package/bridge/dist/index.js.map +1 -0
- package/bridge/dist/json.d.ts +7 -0
- package/bridge/dist/json.js +5 -0
- package/bridge/dist/json.js.map +1 -0
- package/bridge/dist/lazy.d.ts +20 -0
- package/bridge/dist/lazy.js +60 -0
- package/bridge/dist/lazy.js.map +1 -0
- package/bridge/dist/pins.d.ts +12 -0
- package/bridge/dist/pins.js +17 -0
- package/bridge/dist/pins.js.map +1 -0
- package/bridge/dist/replies.d.ts +79 -0
- package/bridge/dist/replies.js +217 -0
- package/bridge/dist/replies.js.map +1 -0
- package/bridge/dist/schema.d.ts +65 -0
- package/bridge/dist/schema.js +9 -0
- package/bridge/dist/schema.js.map +1 -0
- package/bridge/dist/tffake.d.ts +57 -0
- package/bridge/dist/tffake.js +105 -0
- package/bridge/dist/tffake.js.map +1 -0
- package/bridge/dist/tfschema/cli.d.ts +10 -0
- package/bridge/dist/tfschema/cli.js +57 -0
- package/bridge/dist/tfschema/cli.js.map +1 -0
- package/bridge/dist/tfschema/ctyToZod.d.ts +20 -0
- package/bridge/dist/tfschema/ctyToZod.js +49 -0
- package/bridge/dist/tfschema/ctyToZod.js.map +1 -0
- package/bridge/dist/tfschema/generate.d.ts +16 -0
- package/bridge/dist/tfschema/generate.js +159 -0
- package/bridge/dist/tfschema/generate.js.map +1 -0
- package/bridge/dist/tfschema/state.d.ts +14 -0
- package/bridge/dist/tfschema/state.js +51 -0
- package/bridge/dist/tfschema/state.js.map +1 -0
- package/bridge/dist/tfschema/types.d.ts +52 -0
- package/bridge/dist/tfschema/types.js +2 -0
- package/bridge/dist/tfschema/types.js.map +1 -0
- package/bridge/dist/tfschema.d.ts +4 -0
- package/bridge/dist/tfschema.js +8 -0
- package/bridge/dist/tfschema.js.map +1 -0
- package/bridge/testdata/README.md +64 -0
- package/bridge/testdata/pins.json +27 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_branch_protection/provider-bridge_main/import.json +32 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/provider-bridge/import.json +30 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/provider-bridge/read.json +29 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma/import.json +30 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma/read.json +29 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma-apply-test/apply.json +29 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma-apply-test/plan.json +40 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma-apply-test-delete/apply.json +23 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma-apply-test-delete/plan.json +25 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma-apply-test-update-1/apply.json +33 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma-apply-test-update-1/plan.json +32 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/provider-bridge_notsaltylol/import.json +29 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/provider-bridge_notsaltylol/read.json +28 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/provider-bridge_octocat/import.json +27 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator/apply.json +28 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator/plan.json +29 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator-delete/apply.json +21 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator-delete/plan.json +23 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator-update-1/apply-delete.json +21 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator-update-1/apply.json +28 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator-update-1/plan.json +33 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test_octocat/import.json +29 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test_octocat/read.json +28 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_deploy_key/sanoma-apply-test-key/apply.json +27 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_deploy_key/sanoma-apply-test-key/plan.json +29 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_deploy_key/sanoma-apply-test-key-delete/apply.json +21 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_deploy_key/sanoma-apply-test-key-delete/plan.json +23 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_deploy_key/sanoma-apply-test_1000000101/import.json +28 -0
- package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_deploy_key/sanoma-apply-test_1000000101/read.json +26 -0
- package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/484189f591100781981bb24cb4e365c4ae74db9eb1a0ff03489a7e061b339132/import.json +28 -0
- package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/484189f591100781981bb24cb4e365c4ae74db9eb1a0ff03489a7e061b339132-aede5c47/apply-delete.json +21 -0
- package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/484189f591100781981bb24cb4e365c4ae74db9eb1a0ff03489a7e061b339132-aede5c47/apply.json +28 -0
- package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/484189f591100781981bb24cb4e365c4ae74db9eb1a0ff03489a7e061b339132-aede5c47/plan.json +49 -0
- package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/484189f591100781981bb24cb4e365c4ae74db9eb1a0ff03489a7e061b339132-c0239934/plan.json +27 -0
- package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/8a4dfc1ebfe1b74d277a6e4017921d06e302d4c10fe6999e8ab5cb1522dcb2ad/import.json +25 -0
- package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/8a4dfc1ebfe1b74d277a6e4017921d06e302d4c10fe6999e8ab5cb1522dcb2ad-delete/apply.json +21 -0
- package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/8a4dfc1ebfe1b74d277a6e4017921d06e302d4c10fe6999e8ab5cb1522dcb2ad-delete/plan.json +23 -0
- package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/create-2463512b/apply.json +28 -0
- package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/create-2463512b/plan.json +42 -0
- package/bridge/testdata/schemas/integrations_github_6.13.0.json +10680 -0
- package/bridge/testdata/schemas/kreuzwerker_docker_4.6.0.json +4833 -0
- package/bridge/testdata/schemas/stripe_stripe_0.3.0.json +55612 -0
- package/bridge/testdata/schemas/supabase_supabase_1.11.0.json +790 -0
- package/dev/README.md +33 -0
- package/dev/dist/cli.d.ts +5 -0
- package/dev/dist/cli.js +120 -0
- package/dev/dist/cli.js.map +1 -0
- package/dev/dist/links.d.ts +33 -0
- package/dev/dist/links.js +86 -0
- package/dev/dist/links.js.map +1 -0
- package/dist/check.d.ts +1 -1
- package/dist/check.js +8 -8
- package/dist/check.js.map +1 -1
- package/dist/cli.js +29 -25
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +1 -4
- package/dist/config.js +2 -4
- package/dist/config.js.map +1 -1
- package/dist/dev.d.ts +5 -8
- package/dist/dev.js +13 -50
- package/dist/dev.js.map +1 -1
- package/dist/env.js +1 -1
- package/dist/env.js.map +1 -1
- package/dist/events.d.ts +1 -1
- package/dist/identity.js +1 -1
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +4 -6
- package/dist/init.js +21 -15
- package/dist/init.js.map +1 -1
- package/dist/key.js +1 -1
- package/dist/key.js.map +1 -1
- package/dist/ledger.d.ts +1 -1
- package/dist/ledger.js +1 -1
- package/dist/ledger.js.map +1 -1
- package/dist/listen.d.ts +1 -1
- package/dist/listen.js +1 -1
- package/dist/listen.js.map +1 -1
- package/dist/oxlint-plugin.js +2 -2
- package/dist/oxlint-plugin.js.map +1 -1
- package/dist/postgres.js +1 -1
- package/dist/postgres.js.map +1 -1
- package/dist/serve.d.ts +4 -4
- package/dist/serve.js +9 -10
- package/dist/serve.js.map +1 -1
- package/dist/sites.d.ts +2 -7
- package/dist/sites.js +4 -10
- package/dist/sites.js.map +1 -1
- package/dist/source.d.ts +2 -1
- package/dist/source.js +54 -3
- package/dist/source.js.map +1 -1
- package/dist/wakeup.js +1 -1
- package/dist/wakeup.js.map +1 -1
- package/dist/worker-port.d.ts +2 -2
- package/dist/worker-port.js +2 -2
- package/dist/worker-port.js.map +1 -1
- package/oxlint.json +283 -47
- package/package.json +321 -34
- package/template/AGENTS.md +2 -2
- package/testing/README.md +261 -0
- package/testing/dist/build.d.ts +16 -0
- package/testing/dist/build.js +95 -0
- package/testing/dist/build.js.map +1 -0
- package/testing/dist/database.d.ts +96 -0
- package/testing/dist/database.js +213 -0
- package/testing/dist/database.js.map +1 -0
- package/testing/dist/features.d.ts +25 -0
- package/testing/dist/features.js +176 -0
- package/testing/dist/features.js.map +1 -0
- package/testing/dist/harness.d.ts +27 -0
- package/testing/dist/harness.js +63 -0
- package/testing/dist/harness.js.map +1 -0
- package/testing/dist/host.d.ts +229 -0
- package/testing/dist/host.js +738 -0
- package/testing/dist/host.js.map +1 -0
- package/testing/dist/index.d.ts +36 -0
- package/testing/dist/index.js +41 -0
- package/testing/dist/index.js.map +1 -0
- package/testing/dist/replay.d.ts +44 -0
- package/testing/dist/replay.js +95 -0
- package/testing/dist/replay.js.map +1 -0
- package/testing/dist/sandbox.d.ts +59 -0
- package/testing/dist/sandbox.js +201 -0
- package/testing/dist/sandbox.js.map +1 -0
- package/testing/dist/scenarios.d.ts +17 -0
- package/testing/dist/scenarios.js +64 -0
- package/testing/dist/scenarios.js.map +1 -0
- package/testing/dist/sentinel.d.ts +19 -0
- package/testing/dist/sentinel.js +54 -0
- package/testing/dist/sentinel.js.map +1 -0
- package/testing/dist/wakeup.d.ts +114 -0
- package/testing/dist/wakeup.js +288 -0
- package/testing/dist/wakeup.js.map +1 -0
- package/workflows/CLOUD-IDENTITY.md +333 -0
- package/workflows/KMS-SECRETS.md +167 -0
- package/workflows/README.md +990 -0
- package/workflows/SECRET-SUPPORT.md +72 -0
- package/workflows/dist/app-steps.d.ts +17 -0
- package/workflows/dist/app-steps.js +43 -0
- package/workflows/dist/app-steps.js.map +1 -0
- package/workflows/dist/app-workflows.d.ts +174 -0
- package/workflows/dist/app-workflows.js +117 -0
- package/workflows/dist/app-workflows.js.map +1 -0
- package/workflows/dist/apply-steps.d.ts +8 -0
- package/workflows/dist/apply-steps.js +92 -0
- package/workflows/dist/apply-steps.js.map +1 -0
- package/workflows/dist/apply.d.ts +213 -0
- package/workflows/dist/apply.js +634 -0
- package/workflows/dist/apply.js.map +1 -0
- package/workflows/dist/approvals.d.ts +77 -0
- package/workflows/dist/approvals.js +211 -0
- package/workflows/dist/approvals.js.map +1 -0
- package/workflows/dist/apps-list.d.ts +116 -0
- package/workflows/dist/apps-list.js +150 -0
- package/workflows/dist/apps-list.js.map +1 -0
- package/workflows/dist/apps.d.ts +31 -0
- package/workflows/dist/apps.js +138 -0
- package/workflows/dist/apps.js.map +1 -0
- package/workflows/dist/ast.d.ts +59 -0
- package/workflows/dist/ast.js +83 -0
- package/workflows/dist/ast.js.map +1 -0
- package/workflows/dist/authentication.d.ts +140 -0
- package/workflows/dist/authentication.js +190 -0
- package/workflows/dist/authentication.js.map +1 -0
- package/workflows/dist/bundled.d.ts +39 -0
- package/workflows/dist/bundled.js +16 -0
- package/workflows/dist/bundled.js.map +1 -0
- package/workflows/dist/call-workflow.d.ts +21 -0
- package/workflows/dist/call-workflow.js +35 -0
- package/workflows/dist/call-workflow.js.map +1 -0
- package/workflows/dist/call.d.ts +104 -0
- package/workflows/dist/call.js +660 -0
- package/workflows/dist/call.js.map +1 -0
- package/workflows/dist/cedar.d.ts +109 -0
- package/workflows/dist/cedar.js +533 -0
- package/workflows/dist/cedar.js.map +1 -0
- package/workflows/dist/change-steps.d.ts +10 -0
- package/workflows/dist/change-steps.js +200 -0
- package/workflows/dist/change-steps.js.map +1 -0
- package/workflows/dist/change-workflow.d.ts +54 -0
- package/workflows/dist/change-workflow.js +161 -0
- package/workflows/dist/change-workflow.js.map +1 -0
- package/workflows/dist/change.d.ts +330 -0
- package/workflows/dist/change.js +351 -0
- package/workflows/dist/change.js.map +1 -0
- package/workflows/dist/chat-steps.d.ts +5 -0
- package/workflows/dist/chat-steps.js +107 -0
- package/workflows/dist/chat-steps.js.map +1 -0
- package/workflows/dist/chat-workflow.d.ts +43 -0
- package/workflows/dist/chat-workflow.js +47 -0
- package/workflows/dist/chat-workflow.js.map +1 -0
- package/workflows/dist/chats.d.ts +62 -0
- package/workflows/dist/chats.js +109 -0
- package/workflows/dist/chats.js.map +1 -0
- package/workflows/dist/claims.d.ts +58 -0
- package/workflows/dist/claims.js +27 -0
- package/workflows/dist/claims.js.map +1 -0
- package/workflows/dist/client.d.ts +563 -0
- package/workflows/dist/client.js +1464 -0
- package/workflows/dist/client.js.map +1 -0
- package/workflows/dist/cloud-identity.d.ts +56 -0
- package/workflows/dist/cloud-identity.js +160 -0
- package/workflows/dist/cloud-identity.js.map +1 -0
- package/workflows/dist/collection.d.ts +139 -0
- package/workflows/dist/collection.js +522 -0
- package/workflows/dist/collection.js.map +1 -0
- package/workflows/dist/config.d.ts +328 -0
- package/workflows/dist/config.js +857 -0
- package/workflows/dist/config.js.map +1 -0
- package/workflows/dist/connect-workflow.d.ts +6 -0
- package/workflows/dist/connect-workflow.js +35 -0
- package/workflows/dist/connect-workflow.js.map +1 -0
- package/workflows/dist/connection.d.ts +669 -0
- package/workflows/dist/connection.js +1228 -0
- package/workflows/dist/connection.js.map +1 -0
- package/workflows/dist/constructors.d.ts +38 -0
- package/workflows/dist/constructors.js +9 -0
- package/workflows/dist/constructors.js.map +1 -0
- package/workflows/dist/credentials.d.ts +24 -0
- package/workflows/dist/credentials.js +168 -0
- package/workflows/dist/credentials.js.map +1 -0
- package/workflows/dist/cucumber.d.ts +66 -0
- package/workflows/dist/cucumber.js +163 -0
- package/workflows/dist/cucumber.js.map +1 -0
- package/workflows/dist/data.d.ts +2 -0
- package/workflows/dist/data.js +3 -0
- package/workflows/dist/data.js.map +1 -0
- package/workflows/dist/database.d.ts +83 -0
- package/workflows/dist/database.js +95 -0
- package/workflows/dist/database.js.map +1 -0
- package/workflows/dist/db/company.d.ts +2351 -0
- package/workflows/dist/db/company.js +245 -0
- package/workflows/dist/db/company.js.map +1 -0
- package/workflows/dist/db/dbos.d.ts +111 -0
- package/workflows/dist/db/dbos.js +15 -0
- package/workflows/dist/db/dbos.js.map +1 -0
- package/workflows/dist/db/identity.d.ts +367 -0
- package/workflows/dist/db/identity.js +48 -0
- package/workflows/dist/db/identity.js.map +1 -0
- package/workflows/dist/db/index.d.ts +7 -0
- package/workflows/dist/db/index.js +12 -0
- package/workflows/dist/db/index.js.map +1 -0
- package/workflows/dist/db/kms.d.ts +224 -0
- package/workflows/dist/db/kms.js +29 -0
- package/workflows/dist/db/kms.js.map +1 -0
- package/workflows/dist/db/migrate.d.ts +66 -0
- package/workflows/dist/db/migrate.js +39 -0
- package/workflows/dist/db/migrate.js.map +1 -0
- package/workflows/dist/db/wakeup.d.ts +271 -0
- package/workflows/dist/db/wakeup.js +34 -0
- package/workflows/dist/db/wakeup.js.map +1 -0
- package/workflows/dist/db.d.ts +117 -0
- package/workflows/dist/db.js +375 -0
- package/workflows/dist/db.js.map +1 -0
- package/workflows/dist/deadlines.d.ts +107 -0
- package/workflows/dist/deadlines.js +208 -0
- package/workflows/dist/deadlines.js.map +1 -0
- package/workflows/dist/define.d.ts +288 -0
- package/workflows/dist/define.js +152 -0
- package/workflows/dist/define.js.map +1 -0
- package/workflows/dist/definitions.d.ts +25 -0
- package/workflows/dist/definitions.js +16 -0
- package/workflows/dist/definitions.js.map +1 -0
- package/workflows/dist/deployment-key.d.ts +24 -0
- package/workflows/dist/deployment-key.js +54 -0
- package/workflows/dist/deployment-key.js.map +1 -0
- package/workflows/dist/describe.d.ts +40 -0
- package/workflows/dist/describe.js +435 -0
- package/workflows/dist/describe.js.map +1 -0
- package/workflows/dist/description.d.ts +555 -0
- package/workflows/dist/description.js +389 -0
- package/workflows/dist/description.js.map +1 -0
- package/workflows/dist/direct.d.ts +10 -0
- package/workflows/dist/direct.js +26 -0
- package/workflows/dist/direct.js.map +1 -0
- package/workflows/dist/dns.d.ts +20 -0
- package/workflows/dist/dns.js +26 -0
- package/workflows/dist/dns.js.map +1 -0
- package/workflows/dist/drift.d.ts +136 -0
- package/workflows/dist/drift.js +188 -0
- package/workflows/dist/drift.js.map +1 -0
- package/workflows/dist/env.d.ts +51 -0
- package/workflows/dist/env.js +83 -0
- package/workflows/dist/env.js.map +1 -0
- package/workflows/dist/errors.d.ts +115 -0
- package/workflows/dist/errors.js +193 -0
- package/workflows/dist/errors.js.map +1 -0
- package/workflows/dist/expectations.d.ts +26 -0
- package/workflows/dist/expectations.js +171 -0
- package/workflows/dist/expectations.js.map +1 -0
- package/workflows/dist/fake.d.ts +93 -0
- package/workflows/dist/fake.js +280 -0
- package/workflows/dist/fake.js.map +1 -0
- package/workflows/dist/fill.d.ts +17 -0
- package/workflows/dist/fill.js +39 -0
- package/workflows/dist/fill.js.map +1 -0
- package/workflows/dist/folded.d.ts +7 -0
- package/workflows/dist/folded.js +28 -0
- package/workflows/dist/folded.js.map +1 -0
- package/workflows/dist/follow-steps.d.ts +8 -0
- package/workflows/dist/follow-steps.js +113 -0
- package/workflows/dist/follow-steps.js.map +1 -0
- package/workflows/dist/follow-workflow.d.ts +56 -0
- package/workflows/dist/follow-workflow.js +50 -0
- package/workflows/dist/follow-workflow.js.map +1 -0
- package/workflows/dist/grid.d.ts +34 -0
- package/workflows/dist/grid.js +63 -0
- package/workflows/dist/grid.js.map +1 -0
- package/workflows/dist/host-derive.d.ts +162 -0
- package/workflows/dist/host-derive.js +438 -0
- package/workflows/dist/host-derive.js.map +1 -0
- package/workflows/dist/host.d.ts +158 -0
- package/workflows/dist/host.js +112 -0
- package/workflows/dist/host.js.map +1 -0
- package/workflows/dist/identity-broker.d.ts +14 -0
- package/workflows/dist/identity-broker.js +84 -0
- package/workflows/dist/identity-broker.js.map +1 -0
- package/workflows/dist/identity-provisioning.d.ts +50 -0
- package/workflows/dist/identity-provisioning.js +304 -0
- package/workflows/dist/identity-provisioning.js.map +1 -0
- package/workflows/dist/identity-service.d.ts +25 -0
- package/workflows/dist/identity-service.js +152 -0
- package/workflows/dist/identity-service.js.map +1 -0
- package/workflows/dist/import-workflow.d.ts +4 -0
- package/workflows/dist/import-workflow.js +120 -0
- package/workflows/dist/import-workflow.js.map +1 -0
- package/workflows/dist/import.d.ts +94 -0
- package/workflows/dist/import.js +161 -0
- package/workflows/dist/import.js.map +1 -0
- package/workflows/dist/index.d.ts +66 -0
- package/workflows/dist/index.js +73 -0
- package/workflows/dist/index.js.map +1 -0
- package/workflows/dist/kms-secrets.d.ts +48 -0
- package/workflows/dist/kms-secrets.js +320 -0
- package/workflows/dist/kms-secrets.js.map +1 -0
- package/workflows/dist/ledger.d.ts +281 -0
- package/workflows/dist/ledger.js +335 -0
- package/workflows/dist/ledger.js.map +1 -0
- package/workflows/dist/lint.d.ts +24 -0
- package/workflows/dist/lint.js +185 -0
- package/workflows/dist/lint.js.map +1 -0
- package/workflows/dist/load.d.ts +85 -0
- package/workflows/dist/load.js +407 -0
- package/workflows/dist/load.js.map +1 -0
- package/workflows/dist/local-sandbox.d.ts +17 -0
- package/workflows/dist/local-sandbox.js +131 -0
- package/workflows/dist/local-sandbox.js.map +1 -0
- package/workflows/dist/lockfile.d.ts +38 -0
- package/workflows/dist/lockfile.js +74 -0
- package/workflows/dist/lockfile.js.map +1 -0
- package/workflows/dist/log.d.ts +24 -0
- package/workflows/dist/log.js +83 -0
- package/workflows/dist/log.js.map +1 -0
- package/workflows/dist/login-code.d.ts +23 -0
- package/workflows/dist/login-code.js +37 -0
- package/workflows/dist/login-code.js.map +1 -0
- package/workflows/dist/oauth.d.ts +112 -0
- package/workflows/dist/oauth.js +301 -0
- package/workflows/dist/oauth.js.map +1 -0
- package/workflows/dist/op.d.ts +465 -0
- package/workflows/dist/op.js +249 -0
- package/workflows/dist/op.js.map +1 -0
- package/workflows/dist/outline.d.ts +186 -0
- package/workflows/dist/outline.js +554 -0
- package/workflows/dist/outline.js.map +1 -0
- package/workflows/dist/paths.d.ts +56 -0
- package/workflows/dist/paths.js +124 -0
- package/workflows/dist/paths.js.map +1 -0
- package/workflows/dist/person.d.ts +66 -0
- package/workflows/dist/person.js +71 -0
- package/workflows/dist/person.js.map +1 -0
- package/workflows/dist/plugin.d.ts +45 -0
- package/workflows/dist/plugin.js +61 -0
- package/workflows/dist/plugin.js.map +1 -0
- package/workflows/dist/policy.d.ts +126 -0
- package/workflows/dist/policy.js +50 -0
- package/workflows/dist/policy.js.map +1 -0
- package/workflows/dist/preview.d.ts +26 -0
- package/workflows/dist/preview.js +29 -0
- package/workflows/dist/preview.js.map +1 -0
- package/workflows/dist/provisioning-identity.d.ts +27 -0
- package/workflows/dist/provisioning-identity.js +81 -0
- package/workflows/dist/provisioning-identity.js.map +1 -0
- package/workflows/dist/renewal.d.ts +102 -0
- package/workflows/dist/renewal.js +186 -0
- package/workflows/dist/renewal.js.map +1 -0
- package/workflows/dist/resource.d.ts +506 -0
- package/workflows/dist/resource.js +600 -0
- package/workflows/dist/resource.js.map +1 -0
- package/workflows/dist/resources.d.ts +97 -0
- package/workflows/dist/resources.js +384 -0
- package/workflows/dist/resources.js.map +1 -0
- package/workflows/dist/run-status.d.ts +10 -0
- package/workflows/dist/run-status.js +27 -0
- package/workflows/dist/run-status.js.map +1 -0
- package/workflows/dist/run.d.ts +173 -0
- package/workflows/dist/run.js +22 -0
- package/workflows/dist/run.js.map +1 -0
- package/workflows/dist/runner-box.d.ts +23 -0
- package/workflows/dist/runner-box.js +181 -0
- package/workflows/dist/runner-box.js.map +1 -0
- package/workflows/dist/runner-protocol.d.ts +73 -0
- package/workflows/dist/runner-protocol.js +34 -0
- package/workflows/dist/runner-protocol.js.map +1 -0
- package/workflows/dist/runtime-ops.d.ts +242 -0
- package/workflows/dist/runtime-ops.js +354 -0
- package/workflows/dist/runtime-ops.js.map +1 -0
- package/workflows/dist/sandbox-contract.d.ts +109 -0
- package/workflows/dist/sandbox-contract.js +26 -0
- package/workflows/dist/sandbox-contract.js.map +1 -0
- package/workflows/dist/sandbox-runner.cjs +7 -0
- package/workflows/dist/sandbox.d.ts +46 -0
- package/workflows/dist/sandbox.js +215 -0
- package/workflows/dist/sandbox.js.map +1 -0
- package/workflows/dist/scenario.d.ts +262 -0
- package/workflows/dist/scenario.js +1281 -0
- package/workflows/dist/scenario.js.map +1 -0
- package/workflows/dist/scenarios.d.ts +59 -0
- package/workflows/dist/scenarios.js +82 -0
- package/workflows/dist/scenarios.js.map +1 -0
- package/workflows/dist/schedules.d.ts +74 -0
- package/workflows/dist/schedules.js +168 -0
- package/workflows/dist/schedules.js.map +1 -0
- package/workflows/dist/schema.d.ts +49 -0
- package/workflows/dist/schema.js +256 -0
- package/workflows/dist/schema.js.map +1 -0
- package/workflows/dist/sdk.d.ts +34 -0
- package/workflows/dist/sdk.js +182 -0
- package/workflows/dist/sdk.js.map +1 -0
- package/workflows/dist/seal.d.ts +42 -0
- package/workflows/dist/seal.js +103 -0
- package/workflows/dist/seal.js.map +1 -0
- package/workflows/dist/secret-store-check.d.ts +11 -0
- package/workflows/dist/secret-store-check.js +76 -0
- package/workflows/dist/secret-store-check.js.map +1 -0
- package/workflows/dist/secret-store.d.ts +142 -0
- package/workflows/dist/secret-store.js +273 -0
- package/workflows/dist/secret-store.js.map +1 -0
- package/workflows/dist/secret.d.ts +54 -0
- package/workflows/dist/secret.js +115 -0
- package/workflows/dist/secret.js.map +1 -0
- package/workflows/dist/shared.d.ts +495 -0
- package/workflows/dist/shared.js +558 -0
- package/workflows/dist/shared.js.map +1 -0
- package/workflows/dist/sites.d.ts +62 -0
- package/workflows/dist/sites.js +498 -0
- package/workflows/dist/sites.js.map +1 -0
- package/workflows/dist/source.d.ts +327 -0
- package/workflows/dist/source.js +99 -0
- package/workflows/dist/source.js.map +1 -0
- package/workflows/dist/ssh-key.d.ts +11 -0
- package/workflows/dist/ssh-key.js +44 -0
- package/workflows/dist/ssh-key.js.map +1 -0
- package/workflows/dist/steps.d.ts +81 -0
- package/workflows/dist/steps.js +23 -0
- package/workflows/dist/steps.js.map +1 -0
- package/workflows/dist/storage-provisioning.d.ts +27 -0
- package/workflows/dist/storage-provisioning.js +222 -0
- package/workflows/dist/storage-provisioning.js.map +1 -0
- package/workflows/dist/store-move-workflow.d.ts +14 -0
- package/workflows/dist/store-move-workflow.js +77 -0
- package/workflows/dist/store-move-workflow.js.map +1 -0
- package/workflows/dist/store-move.d.ts +361 -0
- package/workflows/dist/store-move.js +744 -0
- package/workflows/dist/store-move.js.map +1 -0
- package/workflows/dist/supervisor.d.ts +39 -0
- package/workflows/dist/supervisor.js +68 -0
- package/workflows/dist/supervisor.js.map +1 -0
- package/workflows/dist/tokens.d.ts +45 -0
- package/workflows/dist/tokens.js +120 -0
- package/workflows/dist/tokens.js.map +1 -0
- package/workflows/dist/vendor-info.d.ts +19 -0
- package/workflows/dist/vendor-info.js +49 -0
- package/workflows/dist/vendor-info.js.map +1 -0
- package/workflows/dist/version.d.ts +44 -0
- package/workflows/dist/version.js +92 -0
- package/workflows/dist/version.js.map +1 -0
- package/workflows/dist/wakeup-driver.d.ts +128 -0
- package/workflows/dist/wakeup-driver.js +225 -0
- package/workflows/dist/wakeup-driver.js.map +1 -0
- package/workflows/dist/wakeup-service.d.ts +79 -0
- package/workflows/dist/wakeup-service.js +419 -0
- package/workflows/dist/wakeup-service.js.map +1 -0
- package/workflows/dist/wakeup-type.d.ts +43 -0
- package/workflows/dist/wakeup-type.js +82 -0
- package/workflows/dist/wakeup-type.js.map +1 -0
- package/workflows/dist/wakeup.d.ts +95 -0
- package/workflows/dist/wakeup.js +79 -0
- package/workflows/dist/wakeup.js.map +1 -0
- package/workflows/dist/worker.d.ts +85 -0
- package/workflows/dist/worker.js +535 -0
- package/workflows/dist/worker.js.map +1 -0
- package/workflows/dist/writer.d.ts +83 -0
- package/workflows/dist/writer.js +349 -0
- package/workflows/dist/writer.js.map +1 -0
- package/workflows/drizzle/company/0000_tables.sql +104 -0
- package/workflows/drizzle/company/0001_wakeup_row.sql +2 -0
- package/workflows/drizzle/company/0002_runs_tell_the_app.sql +27 -0
- package/workflows/drizzle/company/0003_ledger_target.sql +2 -0
- package/workflows/drizzle/company/0004_oauth_attempts.sql +19 -0
- package/workflows/drizzle/company/0005_connection_renewals.sql +9 -0
- package/workflows/drizzle/company/0006_secret_moves.sql +35 -0
- package/workflows/drizzle/company/meta/0000_snapshot.json +652 -0
- package/workflows/drizzle/company/meta/0001_snapshot.json +652 -0
- package/workflows/drizzle/company/meta/0002_snapshot.json +819 -0
- package/workflows/drizzle/company/meta/0003_snapshot.json +845 -0
- package/workflows/drizzle/company/meta/0004_snapshot.json +955 -0
- package/workflows/drizzle/company/meta/0005_snapshot.json +1010 -0
- package/workflows/drizzle/company/meta/0006_snapshot.json +1232 -0
- package/workflows/drizzle/company/meta/_journal.json +55 -0
- package/workflows/drizzle/wakeup/0000_tables.sql +26 -0
- package/workflows/drizzle/wakeup/meta/0000_snapshot.json +200 -0
- package/workflows/drizzle/wakeup/meta/_journal.json +13 -0
- package/workflows/oxlint.json +117 -0
- package/workflows/src/app-steps.ts +67 -0
- package/workflows/src/app-workflows.ts +261 -0
- package/workflows/src/apply-steps.ts +108 -0
- package/workflows/src/apply.ts +868 -0
- package/workflows/src/approvals.ts +274 -0
- package/workflows/src/apps-list.ts +168 -0
- package/workflows/src/apps.ts +147 -0
- package/workflows/src/ast.ts +115 -0
- package/workflows/src/authentication.ts +316 -0
- package/workflows/src/bundled.ts +49 -0
- package/workflows/src/call-workflow.ts +53 -0
- package/workflows/src/call.ts +848 -0
- package/workflows/src/cedar.ts +681 -0
- package/workflows/src/change-steps.ts +270 -0
- package/workflows/src/change-workflow.ts +198 -0
- package/workflows/src/change.ts +483 -0
- package/workflows/src/chat-steps.ts +117 -0
- package/workflows/src/chat-workflow.ts +69 -0
- package/workflows/src/chats.ts +179 -0
- package/workflows/src/claims.ts +79 -0
- package/workflows/src/client.ts +1924 -0
- package/workflows/src/cloud-identity.ts +205 -0
- package/workflows/src/collection.ts +688 -0
- package/workflows/src/config.ts +1178 -0
- package/workflows/src/connect-workflow.ts +38 -0
- package/workflows/src/connection.ts +1522 -0
- package/workflows/src/constructors.ts +10 -0
- package/workflows/src/credentials.ts +189 -0
- package/workflows/src/cucumber.ts +243 -0
- package/workflows/src/data.ts +10 -0
- package/workflows/src/database.ts +154 -0
- package/workflows/src/db/company.ts +331 -0
- package/workflows/src/db/dbos.ts +17 -0
- package/workflows/src/db/identity.ts +61 -0
- package/workflows/src/db/index.ts +12 -0
- package/workflows/src/db/kms.ts +41 -0
- package/workflows/src/db/migrate.ts +71 -0
- package/workflows/src/db/wakeup.ts +41 -0
- package/workflows/src/db.ts +430 -0
- package/workflows/src/deadlines.ts +283 -0
- package/workflows/src/define.ts +416 -0
- package/workflows/src/definitions.ts +36 -0
- package/workflows/src/deployment-key.ts +57 -0
- package/workflows/src/describe.ts +525 -0
- package/workflows/src/description.ts +434 -0
- package/workflows/src/direct.ts +31 -0
- package/workflows/src/dns.ts +29 -0
- package/workflows/src/drift.ts +289 -0
- package/workflows/src/env.ts +124 -0
- package/workflows/src/errors.ts +255 -0
- package/workflows/src/expectations.ts +200 -0
- package/workflows/src/fake.ts +364 -0
- package/workflows/src/fill.ts +47 -0
- package/workflows/src/folded.ts +28 -0
- package/workflows/src/follow-steps.ts +129 -0
- package/workflows/src/follow-workflow.ts +88 -0
- package/workflows/src/grid.ts +102 -0
- package/workflows/src/host-derive.ts +540 -0
- package/workflows/src/host.ts +234 -0
- package/workflows/src/identity-broker.ts +94 -0
- package/workflows/src/identity-provisioning.ts +337 -0
- package/workflows/src/identity-service.ts +180 -0
- package/workflows/src/import-workflow.ts +153 -0
- package/workflows/src/import.ts +222 -0
- package/workflows/src/index.ts +415 -0
- package/workflows/src/kms-secrets.ts +385 -0
- package/workflows/src/ledger.ts +559 -0
- package/workflows/src/lint.ts +226 -0
- package/workflows/src/load.ts +489 -0
- package/workflows/src/local-sandbox.ts +133 -0
- package/workflows/src/lockfile.ts +102 -0
- package/workflows/src/log.ts +82 -0
- package/workflows/src/login-code.ts +58 -0
- package/workflows/src/oauth.ts +402 -0
- package/workflows/src/op.ts +646 -0
- package/workflows/src/outline.ts +675 -0
- package/workflows/src/paths.ts +135 -0
- package/workflows/src/person.ts +78 -0
- package/workflows/src/plugin.ts +85 -0
- package/workflows/src/policy.ts +162 -0
- package/workflows/src/preview.ts +57 -0
- package/workflows/src/provisioning-identity.ts +106 -0
- package/workflows/src/renewal.ts +272 -0
- package/workflows/src/resource.ts +964 -0
- package/workflows/src/resources.ts +459 -0
- package/workflows/src/run-status.ts +39 -0
- package/workflows/src/run.ts +179 -0
- package/workflows/src/runner-box.ts +218 -0
- package/workflows/src/runner-protocol.ts +61 -0
- package/workflows/src/runtime-ops.ts +391 -0
- package/workflows/src/sandbox-contract.ts +121 -0
- package/workflows/src/sandbox-runner.ts +187 -0
- package/workflows/src/sandbox.ts +253 -0
- package/workflows/src/scenario.ts +1624 -0
- package/workflows/src/scenarios.ts +125 -0
- package/workflows/src/schedules.ts +219 -0
- package/workflows/src/schema.ts +311 -0
- package/workflows/src/sdk.ts +225 -0
- package/workflows/src/seal.ts +127 -0
- package/workflows/src/secret-store-check.ts +93 -0
- package/workflows/src/secret-store.ts +382 -0
- package/workflows/src/secret.ts +151 -0
- package/workflows/src/shared.ts +798 -0
- package/workflows/src/sites.ts +559 -0
- package/workflows/src/source.ts +353 -0
- package/workflows/src/ssh-key.ts +48 -0
- package/workflows/src/steps.ts +93 -0
- package/workflows/src/storage-provisioning.ts +252 -0
- package/workflows/src/store-move-workflow.ts +80 -0
- package/workflows/src/store-move.ts +870 -0
- package/workflows/src/supervisor.ts +102 -0
- package/workflows/src/tokens.ts +163 -0
- package/workflows/src/vendor-info.ts +53 -0
- package/workflows/src/version.ts +103 -0
- package/workflows/src/wakeup-driver.ts +286 -0
- package/workflows/src/wakeup-service.ts +484 -0
- package/workflows/src/wakeup-type.ts +92 -0
- package/workflows/src/wakeup.ts +145 -0
- package/workflows/src/worker.ts +667 -0
- package/workflows/src/writer.ts +392 -0
- package/dist/claims.d.ts +0 -1
- package/dist/claims.js +0 -6
- package/dist/claims.js.map +0 -1
- package/dist/data.d.ts +0 -1
- package/dist/data.js +0 -4
- package/dist/data.js.map +0 -1
- package/dist/resources.d.ts +0 -1
- package/dist/resources.js +0 -5
- package/dist/resources.js.map +0 -1
- package/dist/secrets.d.ts +0 -2
- package/dist/secrets.js +0 -3
- package/dist/secrets.js.map +0 -1
- package/identity/Dockerfile +0 -14
- package/site.d.ts +0 -3
- package/site.js +0 -3
- package/ui.css +0 -2
- package/ui.d.ts +0 -3
- package/ui.js +0 -3
package/app/README.md
ADDED
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
# sanoma/app
|
|
2
|
+
|
|
3
|
+
A web UI for a [Sanoma](https://github.com/Sanoma-AI/sanoma) config: the runs, each run's ledger and approvals, a form to start a workflow, and what each workflow may call. It reads the same `sanoma.config.ts` your worker runs, so it shows exactly what the worker enforces: it renders from `describeConfig(config)`, the config's ledger store and Postgres. The only workflow code it reads is each workflow's `run`, once at start, to draw its outline. It runs no workflows itself. The page talks to the server through TanStack Start server functions, its only HTTP surface besides the login's routes and the GitHub App's manifest flow (`/setup/github/`), and on a [public site's](#public-sites) own host only two of them, `callFn` and `getActor`, beside the site's login's routes and its robots.txt and sitemap; scripts and agents reach the same runs through [`SanomaClient`](https://github.com/Sanoma-AI/sanoma/blob/main/packages/sanoma/workflows/README.md#building-your-own-ui), over the same Postgres.
|
|
4
|
+
|
|
5
|
+
It is a [TanStack Start](https://tanstack.com/start) app (React, TanStack Router, Query and Form): one fetch handler (`appHandler`) over the company's [snapshot](#the-app-bundle) and its client, served by `startApp` from Node, and by Cloudflare's workerd from [the app bundle](#the-app-bundle).
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install sanoma
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The [`sanoma`](https://www.npmjs.com/package/sanoma) bin runs the app beside the worker over a repo's `sanoma.config.ts`; `startApp` remains for a custom host. Run it beside the worker, from the same config:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { startApp } from "sanoma/app";
|
|
17
|
+
import config from "./sanoma.config.ts";
|
|
18
|
+
|
|
19
|
+
const app = await startApp(config, { port: 3000 });
|
|
20
|
+
console.log(app.url); // http://127.0.0.1:3000
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`startApp` checks the config first and throws what the worker would refuse (missing credentials refuse nothing: the connector pages show and set them). The worker and the app share the config's Postgres (`databaseUrl`, else `SANOMA_DATABASE_URL`): the runs, connection metadata, built-in stored credentials and, by default, the ledger, which `postgresLedger` keeps in a table there, so the app reads what a worker in any process records. A config with a `jsonlLedger` shares its directory instead, and a `memoryLedger` is visible only in the process that wrote it. A run that has started but has no records in the app's ledger says so on its page, since the likeliest cause is an app on another ledger than the worker's (another database, or a `jsonlLedger` directory relative to another working directory). Without `port`, the app takes any free port and reports it in `app.url`. `app.close()` stops it.
|
|
24
|
+
|
|
25
|
+
## Sites
|
|
26
|
+
|
|
27
|
+
A company repo's `sites/<name>/routes/` are TanStack Router file routes the app serves under `/sites/<name>/`, inside its shell, and an app's `apps/<app>/sites/<name>/routes/` under `/sites/<app>/<name>/` (the site `<app>/<name>`, its route ids `/sites/<app>/<name>/…`; a public one answers at `<name>.<app>.localhost`). The package ships its source for that, and a Node-only entry, `sanoma/app/build`, which the `sanoma` bin calls:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { buildApp } from "sanoma/app/build";
|
|
31
|
+
import { startApp } from "sanoma/app";
|
|
32
|
+
|
|
33
|
+
const { distDir, built } = await buildApp(repo, { log: console.log });
|
|
34
|
+
const app = await startApp(config, { distDir });
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`buildApp(repo)` builds the app's routes and every site as one TanStack Start build with the repo as Vite's root, and writes only under the repo: `.sanoma/app/routeTree.gen.ts`, Vite's cache in `.sanoma/app/vite/`, and the build in `.sanoma/app/build/<key>/` (`client/` and `server/server.js`), where the key covers the app's version and source directory and every file under `sites/` and `content/`. All of `.sanoma/app/` is ignored by its own `.gitignore` (`*`), which Tailwind's scan of the repo honours too, so a build never reads its own output, whatever the repo's `.gitignore` says. A build with the same key is reused (`built: false`), and a new one is built beside it and moved into place, so an app serving the old one keeps it. The server bundle holds everything but the runtime (`sanoma/workflows`, `sanoma/internal/bridge`, DBOS, `pg`, `zod`), which it imports by file URL, resolved from the `sanoma` package's own `package.json` (`manifestFile`), so the worker and the app share one copy.
|
|
38
|
+
|
|
39
|
+
- A site is client code: a site importing the runtime, a connector, DBOS, `pg` or a `*.server.*` file fails the build with "Import denied".
|
|
40
|
+
- A site imports React, TanStack's packages and this app as the app does, from the app's own install: the company repo depends only on `sanoma`.
|
|
41
|
+
- A folder is a site when it has `routes/` and its name is one URL segment (`/^[a-z][a-z0-9-]*$/`); `sitesOf(repo)` lists the sites and the refused folders, which the build logs and leaves out. Two pages claiming one path fail the build, naming the path and both files.
|
|
42
|
+
- `writeSiteFiles(repo)`, which `buildApp` calls first, writes `sites/__virtual.ts` (the listing the route generator reads; committed, never edited), `sites/tsconfig.json` when missing, `.sanoma/app/tsconfig.json` every time: the app's compiler options (`tsconfig.site.json`, shipped) with its React, TanStack and route tree, so `tsc -p sites/tsconfig.json` checks a site's links against every page; and `.sanoma/content.ts`, the types of [`content`](#content).
|
|
43
|
+
- `appViteConfig({ repo })` is the build's Vite config; `appViteConfig()` is this package's own (its `vite.config.ts`), the same pipeline with no sites. `appSources()` gives the app's `src` and `tsconfig.site.json` by real path.
|
|
44
|
+
|
|
45
|
+
`startApp(config, { dev: { repo } })` serves the app and the repo's sites from Vite's dev server instead of a build, behind the same `/healthz` and login: `appDevServer(repo, http)` from `sanoma/app/build` is the build's Vite config (`appViteConfig({ repo })`, so the route generator's options are the build's) in middleware mode, with hot updates over the app's own HTTP server, and Start's server entry imported for each request and handed the same context. On the server, Vite compiles the app's source and `sanoma` (whose `sanoma/site` and `sanoma/ui` are that source), and leaves the runtime to Node, the copy `startApp`'s context holds. An edit to a site or to the app's source shows without a reload, a Tailwind class in a new file under `sites/` is in the app's stylesheet and each site's own, and a new site folder is live once it has a route file; a change to `sites/__virtual.ts` itself needs a restart. It writes the sites' generated files and Vite's cache under `.sanoma/app/`, and no build. It listens on this machine only: the hot updates' websocket does not pass the login, so `startApp` refuses `dev` with any other `host`. `dev.onFileChange`, when given, is called with each file the dev server's watcher sees added, changed or removed (`sanoma` writes `.sanoma/api.ts` again on a change to what the config is read from).
|
|
46
|
+
|
|
47
|
+
A company repo is an ES module package (`"type": "module"`, as `sanoma init` writes it): Vite names the server entry `server.mjs` otherwise.
|
|
48
|
+
|
|
49
|
+
### A site's imports
|
|
50
|
+
|
|
51
|
+
A site's route file imports `createFileRoute` from `@tanstack/react-router` (the route generator rewrites the path there, and only there) and the rest from `sanoma/site`, which is this package's `sanoma/site`: the app's own router's `Link`, `Outlet`, `useNavigate`, `useParams`, `useSearch`, `useRouter`, `useRouterState`, `getRouteApi`, `linkOptions`, `redirect` and `notFound` (and their types), `defineSite`, `api` with `ApiError` and `errorBodyOf` ([Calling operations and workflows](#calling-operations-and-workflows)), `content`, the repo's Markdown ([Content](#content)), a public site's languages, `defineMessages`, `useMessages`, `useLocale` and `useLocales` ([Languages](#languages)), `siteOrigin` and `siteUrl`, a page's absolute URLs ([Public sites](#public-sites)), and the pieces that talk to the app, `RunForm` and `useActor` ([The kit and RunForm](#the-kit-and-runform)). How a page looks comes from `sanoma/ui`. `sites/<name>/site.ts`, optional, names the site, and may give it an icon, a [Lucide](https://lucide.dev/icons) icon's name as a literal (`icon: "kanban"`), read without running the file (one that is not a literal is no icon):
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
// sites/help/site.ts
|
|
55
|
+
import { defineSite } from "sanoma/site";
|
|
56
|
+
|
|
57
|
+
export default defineSite({ title: "Help desk", icon: "life-buoy" });
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
// sites/help/routes/index.tsx
|
|
62
|
+
import { createFileRoute } from "@tanstack/react-router";
|
|
63
|
+
import { Link } from "sanoma/site";
|
|
64
|
+
|
|
65
|
+
export const Route = createFileRoute("/sites/help/")({ component: Home });
|
|
66
|
+
|
|
67
|
+
function Home() {
|
|
68
|
+
return <Link to="/workflows">Workflows</Link>;
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`title` names the site in the app (its folder's name without one) and `icon` is its tile's icon in the bar, a [Lucide](https://lucide.dev/icons) icon's name (without one, a globe for a public site and a window for one in the app only). A site for visitors rather than people says so in `site.ts`: `defineSite({ title: "Website", public: true, login: "auth0" })`. `public: true` makes it a public site, served at the root of its own host to visitors; `login`, for a public site only, names the connector in `sanoma.config.ts` whose login half signs a visitor in (`withSetup`'s `login`, in [the workflows README](https://github.com/Sanoma-AI/sanoma/blob/main/packages/sanoma/workflows/README.md#usage)), and without it every page runs as `anonymous`. `locales`, for a public site with no login, names its languages ([Languages](#languages)). `sanoma` loads `site.ts` (`defineSite` served by the runtime's loader) and checks its default export, `defineSite({ … })`, against these options: a key it does not take, a value of the wrong kind, a `login` naming no login half or `locales` where they do not apply is a problem `sanoma check` names. A public site is served at the root of its own host too ([Public sites](#public-sites)).
|
|
73
|
+
|
|
74
|
+
### The kit and RunForm
|
|
75
|
+
|
|
76
|
+
A site imports how its pages look from `sanoma/ui`, which is this package's `sanoma/ui`: the app's own components, so its pages look like the app's (Tailwind's classes and the theme's tokens apply to a site's files too: `bg-card`, `text-muted-foreground`, `bg-primary/10`; the app's theme has only its tokens, so Tailwind's default palette, `bg-white` or `text-red-500`, generates nothing there, only in [a site's own stylesheet](#a-sites-own-stylesheet) without [the kit's](#the-kit-on-a-site)). It is presentational only: nothing in it talks to the running app (its queries, server functions, actor or config), so it could ship as a package of its own. It is an explicit list, and nothing else of the app is public:
|
|
77
|
+
|
|
78
|
+
- the shadcn components the app is built from: `Button`, `Input`, `Label`, `Textarea`, `Checkbox`, `NativeSelect`, `Slider`, `Badge`, `Separator`, `Skeleton`, `Spinner`, and the parts of `Field`, `Card`, `Alert`, `Table`, `Tabs`, `Dialog`, `Sheet`, `Popover`, `Tooltip`, `DropdownMenu`, `Empty`, `Item`, `ButtonGroup`, `Collapsible`, `Breadcrumb` and `Avatar`; and sonner's `toast`, shown by the app's toaster;
|
|
79
|
+
- the app's own pieces: `PageHeader` (a page's `<h1>`, its `title`), `Region`, `Facts` and `Fact`, `Tip`, `ButtonLink`, `ToneBadge` (with `dot`, a status pill), `toneBadge`, `effectBadge`, `StatusDot` (and the `Tone` type), `Notice`, `Nothing`, and `FloatingCard` (the one card with a shadow, for a selection shown over a page's card, placed by its `className`);
|
|
80
|
+
- the hook `useDensity` (Compact or not).
|
|
81
|
+
|
|
82
|
+
What talks to the app comes from `sanoma/site`, beside `api`:
|
|
83
|
+
|
|
84
|
+
- `RunForm({ workflow })`, the app's start form for a workflow, its fields drawn from the workflow's input schema;
|
|
85
|
+
- the hook `useActor()`, who is signed in (`actor`, `groups`, and `signOut` when the login has its own routes; the `ActorState` type).
|
|
86
|
+
|
|
87
|
+
`RunForm` names the workflow with a link to its page, starts a live run, with the server's complaints shown on the fields they name, and once the run starts stays on the page and links to the run, where its graph, ledger and approvals are. A name the config does not have renders a notice saying so.
|
|
88
|
+
|
|
89
|
+
```tsx
|
|
90
|
+
// sites/launches/routes/index.tsx
|
|
91
|
+
import { createFileRoute } from "@tanstack/react-router";
|
|
92
|
+
import { RunForm } from "sanoma/site";
|
|
93
|
+
import { Fact, Facts, PageHeader, Region } from "sanoma/ui";
|
|
94
|
+
|
|
95
|
+
export const Route = createFileRoute("/sites/launches/")({ component: LaunchDesk });
|
|
96
|
+
|
|
97
|
+
function LaunchDesk() {
|
|
98
|
+
return (
|
|
99
|
+
<>
|
|
100
|
+
<PageHeader title="Launch desk" />
|
|
101
|
+
<Region title="How a launch goes">
|
|
102
|
+
<Facts>
|
|
103
|
+
<Fact label="Draft">A Ghost post, written from the form below</Fact>
|
|
104
|
+
<Fact label="Review">marketing-lead approves the launch copy in the Inbox</Fact>
|
|
105
|
+
<Fact label="Launch">Published at the launch time</Fact>
|
|
106
|
+
</Facts>
|
|
107
|
+
</Region>
|
|
108
|
+
<Region title="Announce a launch">
|
|
109
|
+
<RunForm workflow="announce" />
|
|
110
|
+
</Region>
|
|
111
|
+
</>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+

|
|
117
|
+
|
|
118
|
+
A site's page inside the app's shell: the kit's `Region` and `Facts`, and `RunForm`, from `sanoma/site`, drawing announce's fields from its schema.
|
|
119
|
+
|
|
120
|
+
With sites, the bar has a tile per site, between Workflows and the Setup group: its `icon` and its title, linking to its first page (its home, when it has one; a site whose every page has a path parameter has none, and no tile), lit on its pages. The build bundles only the Lucide icons the sites' `site.ts` name, so the server renders a site's icon in the page's first paint, and a name Lucide does not have shows the default for its kind. **Data**'s page header leads to **Sites** (`/sites`, the one path under `/sites` no site can take; Data is lit there), which lists each site in a table: its icon and title linking to its home, its app's name for an app's site, its folder, its pages, each named by its route's `staticData.crumb` or its path under the site (a page with a path parameter is left out), and where a public site answers, with its sitemap ([Public sites](#public-sites)). `sanoma/site` and `sanoma/ui` ship as source (`src/site.ts`, `src/ui.ts`), compiled by Vite in the company's build; they hold nothing server-side (a server function is a fetch in the browser).
|
|
121
|
+
|
|
122
|
+
### A site's own stylesheet
|
|
123
|
+
|
|
124
|
+
A site styles its pages with Tailwind's classes and the app's tokens, which the app's stylesheet carries (it scans the whole repo, so a site's classes are in it). A site with a look of its own, such as a public site, adds a stylesheet beside its routes and links it from its layout's `head`:
|
|
125
|
+
|
|
126
|
+
```css
|
|
127
|
+
/* sites/www/style.css */
|
|
128
|
+
@layer theme, base, components, utilities;
|
|
129
|
+
@import "tailwindcss/theme" layer(theme);
|
|
130
|
+
@import "tailwindcss/utilities" layer(utilities.www) source("./");
|
|
131
|
+
@plugin "@tailwindcss/typography";
|
|
132
|
+
|
|
133
|
+
.www {
|
|
134
|
+
font-family: Georgia, serif;
|
|
135
|
+
line-height: 1.6;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* On the site's own host only: the visitor's light or dark, and colours that follow it. */
|
|
139
|
+
[data-site="www"] {
|
|
140
|
+
color-scheme: light dark;
|
|
141
|
+
background: light-dark(#f5f6f4, #151a1d);
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
```tsx
|
|
146
|
+
// sites/www/routes/route.tsx
|
|
147
|
+
import { createFileRoute, Outlet } from "@tanstack/react-router";
|
|
148
|
+
import { NotFound } from "../components/not-found.tsx";
|
|
149
|
+
import css from "../style.css?url";
|
|
150
|
+
|
|
151
|
+
export const Route = createFileRoute("/sites/www")({
|
|
152
|
+
head: () => ({ links: [{ rel: "stylesheet", href: css }] }),
|
|
153
|
+
component: () => (
|
|
154
|
+
<div className="www">
|
|
155
|
+
<Outlet />
|
|
156
|
+
</div>
|
|
157
|
+
),
|
|
158
|
+
// A path no page has, drawn inside the layout.
|
|
159
|
+
notFoundComponent: NotFound,
|
|
160
|
+
});
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
- It imports `tailwindcss/theme` and `tailwindcss/utilities`, not `tailwindcss`: a site's pages are also shown inside the app at `/sites/<name>`, and Tailwind's preflight would restyle the app around them. The site writes its base rules under a class of its own (`.www` above) instead, and rules for its own host under `[data-site="<name>"]`: there the document is `<html data-site="<name>">`, and inside the app it has no `data-site`.
|
|
164
|
+
- Its utilities are a layer inside the app's (`utilities.<name>`), scanned from the site's folder only (`source("./")`): inside the app, the app's own utilities win over the site's, so the site's `hidden` leaves the bar's `md:flex` alone. Imported into `utilities` itself, the site's would override the app's responsive variants, and hide the bar. A site that uses components from outside its folder names them for the scan (`@source "../../components";`).
|
|
165
|
+
- `tailwindcss` and its `theme`, `utilities` and `preflight` resolve to the app's install, as the app's own stylesheet does: the repo installs nothing for them. A `@plugin` is a package the repo installs itself (`pnpm add @tailwindcss/typography`); what it imports of `tailwindcss` (`tailwindcss/plugin`, `tailwindcss/colors`) resolves to the app's install too.
|
|
166
|
+
- Its theme is Tailwind's default, not the app's (until it imports [the kit's](#the-kit-on-a-site)): a class both use where the app's theme differs (`rounded-lg`, `font-sans`) takes the app's value while the page is shown inside the app, and the site's on the site's own host. Its theme variables are another matter: one both name (`--font-sans`, once a site's class uses it) takes the site's value inside the app, in the app's chrome too. A site keeps its own tokens under names the app does not use (`--font-body`, not `--font-sans`), so its classes look the same in both and leave the app's alone.
|
|
167
|
+
|
|
168
|
+
#### The kit on a site
|
|
169
|
+
|
|
170
|
+
The kit's look is in the app's stylesheet, which a public site's own host does not load. A site that uses `sanoma/ui` there imports the look into its own stylesheet, after Tailwind's utilities, and gives the kit its colours:
|
|
171
|
+
|
|
172
|
+
```css
|
|
173
|
+
/* sites/www/style.css */
|
|
174
|
+
@layer theme, base, components, utilities;
|
|
175
|
+
@import "tailwindcss/theme" layer(theme);
|
|
176
|
+
@import "tailwindcss/utilities" layer(utilities.www) source("./");
|
|
177
|
+
@import "sanoma/ui.css";
|
|
178
|
+
|
|
179
|
+
/* A colour of the site's own: bg-brand. */
|
|
180
|
+
@theme {
|
|
181
|
+
--color-brand: oklch(0.62 0.17 45);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* The kit's colours, by shadcn's names: on the site's own host, and under its class inside the app. */
|
|
185
|
+
[data-site="www"],
|
|
186
|
+
.www {
|
|
187
|
+
--background: light-dark(oklch(0.98 0.005 80), oklch(0.18 0.01 80));
|
|
188
|
+
--foreground: light-dark(oklch(0.22 0.01 80), oklch(0.95 0.005 80));
|
|
189
|
+
--card: light-dark(oklch(1 0 0), oklch(0.22 0.01 80));
|
|
190
|
+
--secondary: light-dark(oklch(0.94 0.005 80), oklch(0.27 0.01 80));
|
|
191
|
+
--muted-foreground: light-dark(oklch(0.5 0.01 80), oklch(0.72 0.01 80));
|
|
192
|
+
--border: light-dark(oklch(0.9 0.005 80), oklch(0.3 0.01 80));
|
|
193
|
+
--primary: oklch(0.62 0.17 45);
|
|
194
|
+
--primary-foreground: oklch(1 0 0);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* On its own host only: the visitor's light or dark, the page's colours and the kit's font. Inside
|
|
198
|
+
the app, the app's light or dark, which its light-dark() values then follow. */
|
|
199
|
+
[data-site="www"] {
|
|
200
|
+
color-scheme: light dark;
|
|
201
|
+
}
|
|
202
|
+
[data-site="www"] body {
|
|
203
|
+
@apply bg-background font-sans text-foreground;
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
- `sanoma/ui.css` brings the kit's classes (Tailwind scans its components where they are installed), its `dark` and `compact` variants, shadcn's and tw-animate's CSS (the `data-open:` variants, the animations), its fonts (IBM Plex Sans and Mono, Fraunces), the app's theme (`bg-primary`, `rounded-lg`, `font-sans`) and the part of preflight its elements need (`src/ui.css`). On the site's own host that part is the whole page's reset, the site's own elements too; inside the app, which loads all of preflight, it changes nothing.
|
|
208
|
+
- Its theme turns Tailwind's palette off, as the app's does: `bg-white` generates nothing, and a colour of the site's own is a token in an `@theme` after the import.
|
|
209
|
+
- The kit's colours are tokens by shadcn's names (the list is `src/ui.css`), in the theme layer, so any rule of the site's wins. Set them under `[data-site="<name>"]` for the site's own host and under the site's class for its pages inside the app, never on `:root`, which inside the app would recolour the app. A name that is another's there (`--popover` is `--card`, `--ring` is `--primary`) follows the site's value on its own host, but inside the app only when the site sets it too; and inside the app the kit's popups (dialogs, menus, tooltips), drawn outside the site's class, keep the app's colours.
|
|
210
|
+
- A `light-dark()` value follows the visitor's light or dark once the site says `color-scheme: light dark`, so a site that follows dark gives one to each surface and text colour it shows (`--card`, `--secondary`, `--muted-foreground`, `--border` above; `--destructive` if it shows errors): a name it leaves keeps the kit's light value. The `dark:` variant, the kit's and the site's own classes' alike once it imports the kit, follows `.dark` on `<html>`, which only the app sets, never a public host: there it never applies, and the tones' and effects' pale badges stay light.
|
|
211
|
+
|
|
212
|
+
### Calling operations and workflows
|
|
213
|
+
|
|
214
|
+
`api`, from `sanoma/site`, calls the company's operations and workflows as the person on the page. It is one generic client over one server function (`callFn`, a POST with `{ name, input?, id? }`), so it calls whatever name a path spells; the company's generated `.sanoma/api.ts` types it, by augmenting `Register` (`declare module "sanoma/site" { interface Register { api: … } }`) with `WorkflowFn`, `OpFn` and `CollectionApi`, which `sanoma/site` re-exports with `Saved` and `ListQuery`. Without that file `api` is untyped; `sanoma check` and `sanoma` write it from the config (`writeApi`, in `sanoma/workflows/describe`), one documented member per workflow, direct operation and collection.
|
|
215
|
+
|
|
216
|
+
| Call | What it does |
|
|
217
|
+
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
218
|
+
| `api.data.outbound.list({ order })`, `.get({ key })`, `.save({ record })`, `.delete({ key })` | A collection's operations, directly; a write is in the ledger, and `updatedBy` is the person |
|
|
219
|
+
| `api.stripe.customers.get({ id })` | A vendor's read, directly: an operation `describeConfig` marks `direct` (a vendor's write is refused: start a workflow) |
|
|
220
|
+
| `await api.outboundNext({ company })` | Starts `outbound-next` (a workflow's name in camelCase) and answers its output once the run ends, or rejects with its error |
|
|
221
|
+
| `api.outboundNext.start(input)` | Starts it: `{ runId }` |
|
|
222
|
+
| `.result(runId, waitMs?)` | The run's output, waiting at most 20 s; `run_running` when it has not ended, a 422 with its failure when it failed |
|
|
223
|
+
| `.latest()`, `.runs({ limit })` | The newest finished run's `{ runId, output, at }` (null when none has), and its latest runs |
|
|
224
|
+
| `.approvals(runId)`, `.ledger(runId)` | What the run's page shows; a run of another workflow is `run_not_found` |
|
|
225
|
+
|
|
226
|
+
A visitor of a public site (`isVisitor`: signed in through a visitor login, or `anonymous`) calls the same way, where a policy `permit` lets it ([policies](https://github.com/Sanoma-AI/sanoma/blob/main/packages/sanoma/workflows/README.md#policies)), with less to read: `.result` only of a run it started (another's is `run_not_found`), never `.latest`, `.runs`, `.approvals` or `.ledger` (`policy_denied`), and none of the runtime's own workflows (`invalid_input`). Later: read actions in the policy, so a rule can let a visitor read more.
|
|
227
|
+
|
|
228
|
+
A client that is not the app's page (Sanoma Cloud's connector, say) calls the same way over plain JSON: `POST /api/call` with the body `{ name, input?, id? }` answers the call's output as JSON (`null` for none), or a refusal's status with its body (below). A request with `Authorization: Bearer sca_…` acts as its token, as on any public site's host, and is not checked for CSRF, since it carries no cookie's authority.
|
|
229
|
+
|
|
230
|
+
An operation's call and a start send a new id each (`crypto.randomUUID()`, letters, digits, `_` and `-`; a start's is its run's id), so a request that is retried is made once; a person's next attempt is a new call, since a failed write's id is spent. Every call needs someone to say who is asking, as a change does ([Login](#login)): a loader's call runs in-process while the server renders the page, as the person whose request it renders. A refusal is an `ApiError`, whose `body` holds the stable `code`:
|
|
231
|
+
|
|
232
|
+
| `code` | Status | When |
|
|
233
|
+
| ------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
234
|
+
| `invalid_input` | 400 | Nobody said who is asking, the name is no operation or workflow, the operation is not direct, or the input does not match its schema (`issues`) |
|
|
235
|
+
| `policy_denied` | 403 | The policy denied the call, or a visitor asked for a workflow's runs |
|
|
236
|
+
| `approval_pending` | 409 | The policy holds the call for an approval: `runId` is the run of the built-in `call` workflow that makes it once approved, in the Inbox and at `/workflows/call/runs/<runId>`; `api.call.result(runId)` waits for it |
|
|
237
|
+
| `run_running` | 409 | `.result` waited and the run has not ended (`runId`) |
|
|
238
|
+
| `record_changed` | 409 | A collection's `save` with `ifRecord` found the record changed since it was read, or gone: nothing was written; `current` is the record as it stands, when the runtime says |
|
|
239
|
+
| `run_not_found` | 404 | No such run of that workflow |
|
|
240
|
+
| (the run's) | 422 | `.result` of a run that failed or was cancelled: `error` is its failure, `code` its code if it has one (`driver_failed`), `runId` the run; a code with a status of its own (`policy_denied`) answers with that |
|
|
241
|
+
|
|
242
|
+
`sanoma/site` exports `ApiError` (`status`, and `body`, an `ErrorResponse`: `error`, `code`, and `issues`, `runId` and the rest as the code has them) and `errorBodyOf(err)`, the body when `err` is an `ApiError` and `undefined` otherwise, so a page branches on a code without a cast. A held write is `approval_pending`, with the `runId` of the run that makes it once approved:
|
|
243
|
+
|
|
244
|
+
```tsx
|
|
245
|
+
import { api, errorBodyOf } from "sanoma/site";
|
|
246
|
+
|
|
247
|
+
/** Marks the company won, or says where the change waits for its approval. */
|
|
248
|
+
async function markWon(company: string): Promise<string> {
|
|
249
|
+
try {
|
|
250
|
+
await api.data.outbound.save({ record: { company, stage: "won" } });
|
|
251
|
+
return "Saved";
|
|
252
|
+
} catch (err) {
|
|
253
|
+
const body = errorBodyOf(err);
|
|
254
|
+
if (body?.code === "approval_pending") return `Waiting for approval: /workflows/call/runs/${body.runId}`;
|
|
255
|
+
throw err;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
`describeConfig` reads what each site calls from its pages' source, parsed and never run, since they are browser code (`readSites`, in `sanoma/workflows/describe`: the site's outline, as a workflow has one): a workflow's page and a collection's list the sites' pages that call them under **Used by**, and a call to a workflow, collection or operation the config does not have, or to an operation a page may not call directly, fails `sanoma check`. A page links there only when this build serves it. Name what a site calls in its code (`<RunForm workflow="announce" />`, `api.announce.start(…)`, `api.data.outbound.list()`): a name held in a variable or built at run time is not read, so its page is not listed.
|
|
261
|
+
|
|
262
|
+
### Content
|
|
263
|
+
|
|
264
|
+
`content`, from `sanoma/site`, is the Markdown under the company repo's `content/`, as of the build: each folder directly under `content/` is a kind, and each `*.md` directly in it an entry, its slug the file's name. Both names are URL segments (`/^[a-z][a-z0-9-]*$/`); subfolders, `.mdx` and other files are left alone. A post, `content/posts/zapier-and-sanoma.md`, and the page that shows it:
|
|
265
|
+
|
|
266
|
+
```md
|
|
267
|
+
---
|
|
268
|
+
title: Zapier and Sanoma
|
|
269
|
+
description: How they differ.
|
|
270
|
+
publishedAt: 2026-10-01
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
What a visitor reads, in **Markdown** (GFM: tables, task lists, strikethrough).
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
```tsx
|
|
277
|
+
// sites/www/routes/blog.$slug.tsx
|
|
278
|
+
import { createFileRoute } from "@tanstack/react-router";
|
|
279
|
+
import { content, notFound } from "sanoma/site";
|
|
280
|
+
import { NotFound } from "../components/not-found.tsx";
|
|
281
|
+
|
|
282
|
+
export const Route = createFileRoute("/sites/www/blog/$slug")({
|
|
283
|
+
loader: async ({ params }) => {
|
|
284
|
+
const post = await content.posts.get(params.slug);
|
|
285
|
+
if (!post) throw notFound();
|
|
286
|
+
return post;
|
|
287
|
+
},
|
|
288
|
+
// Not found, it gives no title: the app's "Page not found" stays.
|
|
289
|
+
head: ({ loaderData }) => ({ meta: loaderData ? [{ title: loaderData.data.title }] : [] }),
|
|
290
|
+
component: Post,
|
|
291
|
+
// Drawn here, inside the site's layout.
|
|
292
|
+
notFoundComponent: NotFound,
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
function Post() {
|
|
296
|
+
const post = Route.useLoaderData();
|
|
297
|
+
return <article className="prose" dangerouslySetInnerHTML={{ __html: post.html }} />;
|
|
298
|
+
}
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
| Call | What it gives |
|
|
302
|
+
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
303
|
+
| `content.posts.list()` | Every file of `content/posts/`, sorted by slug, as `{ slug, data }`: `data` is the front matter (`{}` with none) |
|
|
304
|
+
| `content.posts.get(slug)` | One file, `{ slug, data, body, html }`: `body` the Markdown after the front matter as written, `html` it rendered at build; `undefined` when there is no such file |
|
|
305
|
+
| `content.<kind>` with no folder | `list()` gives `[]` and `get()` `undefined`; once `.sanoma/content.ts` types `content`, it does not type-check |
|
|
306
|
+
|
|
307
|
+
- **Translations:** `content/posts/hello.fr.md` is `hello` in French, beside `hello.md`, the site's default language's. Its front matter is laid over the original's, so what it does not repeat (a date, an image, `draft`) is the original's: a draft's translation is a draft unless it says `draft: false`. A translation with front matter alone keeps the original's body. `list({ locale })` and `get(slug, { locale })` give each slug's file in that language, else its `<slug>.md` (an entry's `locale` says which: absent for `<slug>.md`); without `locale`, `<slug>.md` alone, as before translations. A language is a tag such as `fr` or `pt-BR` ([Languages](#languages)).
|
|
308
|
+
|
|
309
|
+
- **Not found:** a loader's `notFound()` is drawn by the nearest route, from the page up, with a `notFoundComponent`, in place of that route: give the page one, as above, and the site's layout one too (`sites/www/routes/route.tsx`), which draws a path no page has inside the layout. A page whose route has none draws in the layout's place when the layout has one, and, with neither, the app's not-found notice takes the page's place (on a public site's own host, [a plain page](#public-sites)). Its head runs with no `loaderData`.
|
|
310
|
+
- **Front matter** is YAML between a first line `---` and the next `---` line, read as YAML 1.2, so an unquoted date stays a string. A file whose front matter is not a mapping is left out, and `sanoma check` reports it at its line.
|
|
311
|
+
- **HTML** is rendered at build with `marked` (GFM), so no Markdown library ships to the browser. Raw HTML in a file passes through: content is reviewed as code is. The kit has no styles for it; give the `article` your own classes.
|
|
312
|
+
- **Drafts:** an entry whose front matter has `draft: true` is there while `sanoma` serves the sites from its dev server, and never in a build: not on a page, not in any file sent to the browser.
|
|
313
|
+
- **Loading:** the content is one chunk of the browser's bundle, loaded on the first call, and part of the server's render, so a loader's `await content.posts.list()` adds no request. A change under `content/` is a new build (the build's key covers it). On the dev server, a file saved under `content/` shows on the next render of an open page, with no restart.
|
|
314
|
+
- **Types:** `.sanoma/content.ts`, written with the sites' generated files (and again on the dev server when a file under `content/` changes), types `content` by augmenting `Register`, as `.sanoma/api.ts` types `api`: each kind's `data` is the union of its files' front matter, drafts included, a key in every file required and `?` otherwise; strings, numbers, booleans and `null` as themselves, a list as an array of its items' types, a mapping as an object merged the same way (so rows of a table in the front matter share one type). Values are never types: `status: draft` is a `string`. Until it is written, `content` is untyped.
|
|
315
|
+
|
|
316
|
+
`readContent(repo, { drafts })` and `contentTypes(kinds)`, from `sanoma/app/build`, are what the build and `sanoma check` read with: the kinds and the problems, each `{ file, line, column, message }`, and the text of `.sanoma/content.ts` (`CONTENT_TYPES`).
|
|
317
|
+
|
|
318
|
+
### Public sites
|
|
319
|
+
|
|
320
|
+
A public site (`defineSite({ public: true })`) is served at the root of its own host, and at `/sites/<name>` on the app's host as any site is, in the app's chrome, for the people who run it.
|
|
321
|
+
|
|
322
|
+
- **Its hosts.** `<name>.localhost` on the app's port (a browser sends `*.localhost` to this machine, and the loopback login lets it through), and the domain `startApp`'s `domains` gives it (`{ www: "sanoma.example" }`; the `sanoma` bin reads `SANOMA_DOMAINS`, which a host resource's `domains` sets). A domain naming a site that is missing or not public is warned about and served nowhere. `app.sites` gives each public site served, by name, at `http://<name>.localhost:<port>`; the Sites page links to the site's domain, else, on a page of this machine, to `<name>.localhost` (the server, which cannot know that address, says Public until the browser does).
|
|
323
|
+
- **One build, two routings.** On the site's host the router mounts the site at `/`: a page's `<Link to="/sites/www/blog">` is `/blog` there and `/sites/www/blog` on the app's host, and a path outside the site, `/workflows` among them, is the site's not-found page, a 404. The document there is bare: charset, viewport, a body with no margin, in a layer ahead of the site's stylesheet so any rule of the site's overrides it, the browser's light scheme (a site whose colours follow the visitor's light or dark, with `light-dark()`, says so in its stylesheet, as above: `[data-site="www"] { color-scheme: light dark; }`, not `:root`, which inside the app would override the app's own), and `<html data-site="<name>">`, which a site's stylesheet may scope its own host's rules to ([A site's own stylesheet](#a-sites-own-stylesheet)); no app stylesheet, theme, icon, chrome or config, which the app's host loads in chunks of their own. The site's layout sets its own icon and stylesheet in its `head`, and each page its title; the kit's look comes with that stylesheet ([The kit on a site](#the-kit-on-a-site)).
|
|
324
|
+
- **Not found and errors.** A page not found there, a path no page has or a loader's `notFound()` ([Content](#content)), answers 404, titled "Page not found" unless a route of the site gives a title: a title in the layout's `head` stays on every page, a page not found too, so give each page its own. Where the site draws no `notFoundComponent` or `errorComponent`, the page is a plain one of the app's (a heading and a line, no app styles), and an error's message stays out of it.
|
|
325
|
+
- **Its front door.** A request to the site's host never reaches the staff login, and its cookie and `x-sanoma-actor` header are ignored there. The site's login (`defineSite({ public: true, login: "<connector>" })`, a connector's login half) answers `/auth/<connector>/*` and verifies a visitor, who acts as `visitor:<connector>:<subject>` in the group `visitors` (with the email and the GitHub login the login verified, as `ctx.startedBy.email` and `ctx.startedBy.github`, when it verified them); anyone else, and everyone on a site with no login, acts as `anonymous`. A request with `Authorization: Bearer sca_…`, an API token `SanomaClient.tokens.mint` made, acts as `token:<id>` in the groups the token was minted with, with no email; a token that is unknown or revoked is a 401. Only `callFn` (a site's `api`) and `getActor` (`useActor()`, which says nobody for `anonymous`) answer there: any other server function is not there (a change's 404, a read's not-found), nor any other `/auth/` route (404), and a method but GET, HEAD and POST is a 405. Every request there carries `x-sanoma-client-ip` (`CLIENT_IP_HEADER`), set from the socket, a client's own copy overwritten. What a visitor may call is the policy's, by a `permit` ([above](#calling-operations-and-workflows)).
|
|
326
|
+
- **Its login.** `startApp` makes each public site's login half once it listens, before it resolves, with the client's pool (`LoginContext.database`), a key of its own to sign its cookies with (derived from `SANOMA_SIGNING_KEY` for `login <connector>`, so a login like Better Auth needs no secret set), its stored secrets, the site's origins (`http://<name>.localhost:*`, and `https://<domain>` with a domain) and, when the config names a `login.sender`, the sender (Better Auth's visitor login then also signs in by an email code, at `/auth/better-auth/email-otp/send-verification-otp` and `/auth/better-auth/sign-in/email-otp`, sent as a `login-code` run), and `startApp`'s `social`, the company's GitHub App client, which `sanoma` passes on a host (Better Auth's visitor login then lets a visitor sign up and in with GitHub beside the email code, or link it once signed in, through the same callback URL: [its README](https://github.com/Sanoma-AI/sanoma/blob/main/packages/sanoma/better-auth/README.md#github)); a request that comes first waits for it. A public site whose `site.ts` has a problem (its login may be one not read), or whose login fails to start, is served on no host, a 503, and the app's log says why; the app itself starts, so the connector's page, or `SANOMA_SIGNING_KEY` in the environment, can give what the login lacks.
|
|
327
|
+
- **Search engines.** The site's host answers `/robots.txt` and `/sitemap.xml` itself, ahead of its pages (a site cannot replace them). robots.txt lets every crawler read everything and names the sitemap; on any host but the site's domain (`<name>.localhost`) every response says `X-Robots-Tag: noindex`, which a crawler sees because robots.txt lets it read the page. The sitemap lists the site's pages at its origin: each route file's path with no parameter (`describeConfig`'s `SiteEntry.pages`, read from the route ids without running them), and, for a path with one parameter whose file reads one kind's entry by it, `content.<kind>.get(params.slug)` (or `slug`, destructured), a page per entry of that kind (`/blog/$slug` gives `/blog/<slug>` for each post): the content as the app's snapshot read it (again once a file under `content/` changes; the Worker's, as built), drafts left out. A page whose file reads its entry some other way (through a component's helper) is left out: when the file reads content by something else than its parameter, `sanoma check` warns, naming it. A page whose route says `staticData: { sitemap: false }`, written out as that literal, is left out with all its entries: one whose `head` tells crawlers `noindex`, say. An index route's `sitemap`, when it gives one, decides over its layout's (`true` keeps the page in); a pathless or group layout's says nothing. A page under `{-$locale}` on a site with [languages](#languages) is listed once per language (the default unprefixed), with `xhtml:link` alternates to itself in each language it is in and `x-default`: a content page is in a language when its entry has a translation into it or a `<slug>.md`, as `content.<kind>.get(slug, { locale })` reads it. The Sites page links each public site's sitemap beside its address.
|
|
328
|
+
- **Absolute URLs.** A canonical link, `og:url` and `og:image` must be absolute. `siteOrigin()`, from `sanoma/site`, is the origin a page's URLs take: on a public site's host, its domain when it has one (`https://<domain>`), else the host the request came to; on the app's host, the app's. `siteUrl(path)` is a page's URL from its path as the route tree spells it, at that origin, without `/sites/<name>` on the site's host and without a trailing slash but on `/`, as the router answers it and the sitemap lists it (an index route's `match.pathname`, `/sites/www/blog/`, gives `/blog`). Both work in a route's `head`, its loader and a component, on the server and in the browser (`<html data-origin>`):
|
|
329
|
+
|
|
330
|
+
```tsx
|
|
331
|
+
// sites/www/routes/blog.$slug.tsx
|
|
332
|
+
import og from "../assets/og.png";
|
|
333
|
+
|
|
334
|
+
export const Route = createFileRoute("/sites/www/blog/$slug")({
|
|
335
|
+
loader: …,
|
|
336
|
+
head: ({ match, loaderData }) => ({
|
|
337
|
+
meta: [
|
|
338
|
+
{ title: loaderData?.data.title },
|
|
339
|
+
{ property: "og:url", content: siteUrl(match.pathname) }, // https://sanoma.example/blog/<slug>
|
|
340
|
+
{ property: "og:image", content: new URL(og, siteOrigin()).href },
|
|
341
|
+
],
|
|
342
|
+
links: [{ rel: "canonical", href: siteUrl(match.pathname) }],
|
|
343
|
+
// JSON-LD, as TanStack's head allows: a script of type application/ld+json.
|
|
344
|
+
scripts: [{ type: "application/ld+json", children: JSON.stringify({ "@context": "https://schema.org", "@type": "Article" }) }],
|
|
345
|
+
}),
|
|
346
|
+
});
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
- **Not on a public host:** the app's chrome and what it provides, so a site there brings its own toasts and has no `useDensity()` (it throws); `RunForm` and the will-ask preview, which read the config and link to the app's pages.
|
|
350
|
+
- **Later:** a `RunForm` on a public page; rate limits; `Cache-Control` headers on anonymous content pages, so a CDN in front can cache them (the cheap step toward prerendering), then prerendering where an edge cache serves the files (a content-only page's render reaches neither the database nor the worker already, and Start's prerender cannot render with the request context a page needs); the public host's own pending view; an anonymous id per session (every anonymous visitor is one principal now).
|
|
351
|
+
|
|
352
|
+
### Languages
|
|
353
|
+
|
|
354
|
+
A public site with no login can be in more than one language. Its `site.ts` names them, the first its default, and its pages go under `routes/{-$locale}/`, TanStack Router's optional path parameter: the default language at `/about`, each other at `/<locale>/about`, on the site's own host and under `/sites/<name>/` on the app's.
|
|
355
|
+
|
|
356
|
+
```ts
|
|
357
|
+
// sites/www/site.ts
|
|
358
|
+
export default defineSite({ title: "Website", public: true, locales: ["en", "fr"] });
|
|
359
|
+
|
|
360
|
+
// sites/www/messages.ts: the site's own strings, typed by the default's
|
|
361
|
+
import { defineMessages } from "sanoma/site";
|
|
362
|
+
import site from "./site.ts";
|
|
363
|
+
|
|
364
|
+
export const messages = defineMessages(site, {
|
|
365
|
+
en: { blog: "Blog", read: (title: string) => `Read “${title}”` },
|
|
366
|
+
fr: { blog: "Blog", read: (title: string) => `Lire « ${title} »` },
|
|
367
|
+
});
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
```tsx
|
|
371
|
+
// sites/www/routes/{-$locale}/blog.index.tsx
|
|
372
|
+
import { createFileRoute } from "@tanstack/react-router";
|
|
373
|
+
import { content, Link, useMessages } from "sanoma/site";
|
|
374
|
+
import { messages } from "../../messages.ts";
|
|
375
|
+
|
|
376
|
+
export const Route = createFileRoute("/sites/www/{-$locale}/blog/")({
|
|
377
|
+
loader: ({ params }) => content.posts.list({ locale: params.locale }),
|
|
378
|
+
head: ({ params }) => ({ meta: [{ title: messages.get(params.locale).blog }] }),
|
|
379
|
+
component: Blog,
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
function Blog() {
|
|
383
|
+
const t = useMessages(messages);
|
|
384
|
+
return Route.useLoaderData().map((post) => (
|
|
385
|
+
<Link key={post.slug} to="/sites/www/{-$locale}/blog/$slug" params={{ slug: post.slug }}>
|
|
386
|
+
{t.read(post.data.title)}
|
|
387
|
+
</Link>
|
|
388
|
+
));
|
|
389
|
+
}
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
- **URLs.** `params.locale` is the URL's language, `undefined` in the default's. A `Link` keeps the page's language (the router carries `locale` over); `params={{ locale: "fr" }}` names another. A language the site lacks, and the default's own prefix (`/en/…`), are not found. A page outside `{-$locale}` has one URL, in the default language.
|
|
393
|
+
- **Strings.** `defineMessages(site, { <locale>: { … } })` takes every language of the site, each with exactly the default's keys and types, so a key or a language missing or extra fails `sanoma check`; a string with values in it is a function of them, its parameters typed in each language. `useMessages(messages)` gives the strings of the page on screen, `messages.get(params.locale)` those of a language in a loader or a `head`.
|
|
394
|
+
- **The page.** On the site's own host, `<html lang>` is the page's language (`useLocale()` gives it, for `Intl`'s formats, on either host; the app's host keeps `en`, its chrome's), and each page under `{-$locale}` in more than one language links to itself in each, `<link rel="alternate" hreflang>` with absolute URLs at `siteOrigin()` (the site's domain when it has one), and to its default as `x-default` when it is in that; the [sitemap](#public-sites) lists it once per language with the same alternates. A page is in every language, but a content page (one the sitemap lists per entry) only in those its entry is in, as its loader reads it: a post with no translation shows its original under each prefix, and a translation alone (`only.fr.md`, no `only.md`) is in French only.
|
|
395
|
+
- **A switcher** is the site's own component: `useLocales()` gives the page on screen in each language it is in, `{ locale, href, current }`, in the site's order, `href` its path on this host.
|
|
396
|
+
|
|
397
|
+
```tsx
|
|
398
|
+
export function Switcher() {
|
|
399
|
+
return useLocales().map(({ locale, href, current }) => (
|
|
400
|
+
<a key={locale} href={href} hrefLang={locale} aria-current={current ? "page" : undefined}>
|
|
401
|
+
{locale}
|
|
402
|
+
</a>
|
|
403
|
+
));
|
|
404
|
+
}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
- **Content:** a post's translation is `<slug>.<locale>.md` ([Content](#content)).
|
|
408
|
+
- **In the app:** the Sites page lists a site's languages, its default first.
|
|
409
|
+
- **Later:** a visitor's language from `Accept-Language` or a cookie, redirected to; `sanoma check` naming a translation in a language no site has; translated path segments (`/fr/a-propos`); languages on a site with a login; the app's own screens in another language.
|
|
410
|
+
|
|
411
|
+
## The app bundle
|
|
412
|
+
|
|
413
|
+
The app reads no file while it answers: what the company's files say reaches it as a snapshot (`AppSnapshot`): the description, the people and Cedar policies, the files' texts the Code view shows, the scenarios, `content/`'s fields and published content, the repository's remote (without credentials), `infra.ts`, the lockfile's bindings, a deriving host's facts, and the applicationVersion its runs are enqueued with. `startApp` makes it with `appSnapshot(config, { source })` and again once a file it was read from changes (`liveSnapshot`).
|
|
414
|
+
|
|
415
|
+
`buildAppBundle(repo, { config, domains })` from `sanoma/app/bundle` builds the same app, every route and site, for Cloudflare's workerd (`nodejs_compat`), with the snapshot baked in, into an `AppBundle`: its main module and modules (base64), its assets with Cloudflare's hash and size, the compatibility date and flags, and the pages no call is made from of each public site with no login on one of `domains`, prerendered into the assets. The main module's default export is `fetch(request, env, ctx, host?)` (`AppBundleModule`), over `env.DATABASE` (a Hyperdrive binding, or anything with a `connectionString`), `SANOMA_HOSTNAME` (the app's own host; any other host that is no site's domain answers 404), `SANOMA_DOMAINS`, `SANOMA_SIGNING_KEY`, `SANOMA_SECRETS_KEY` and `ASSETS`; a run it queues has `host.startNow()` start the worker. A page prerendered for a domain it answers from `ASSETS` without loading the app; anything else loads the app, on the first request that needs it, with a client of each request's own, and Cedar on its first decision, over the policies `sanoma` checked at build, which it never checks again. The bundle carries only the modules its main module reaches. The bundle's config is the one `sanoma` loads: the config file's, with each workflow file's workflow and `resources/data.ts`'s collections joined to it. Each module's `import.meta.url` is its file's URL, as on Node (workerd has none), and what a connector's `vendorInfo(import.meta.url)` reads of its package is read at build.
|
|
416
|
+
|
|
417
|
+
- **Not on the Worker:** what reads the checkout or runs a child process. Adopt, a form's Save, going live, connecting a repository and a chat's turn are runs of the built-ins `adopt`, `patch`, `go-live`, `go-live-host`, `connect-existing` and `chat`, which a worker given the app's steps runs (`sanoma serve` and `sanoma worker` give them theirs); on a worker without them, the run fails saying so. The staff's sign-in and each site's login run on the Worker as on Node, each request on its own pool; the Worker's bindings give `SANOMA_SIGNING_KEY` for their keys and, for GitHub sign-in, `SANOMA_GITHUB_CLIENT_ID` and `SANOMA_GITHUB_CLIENT_SECRET` (both or neither). A login that cannot start (the key unset) is logged, and its pages answer 503.
|
|
418
|
+
- **Refused:** a site's file, or the app's own, that imports what workerd does not have (`node:fs`, `node:child_process`, …): the build throws `NodeOnlyImport`, naming the file and what it imports, which `sanoma check` reports. And a bundle that cannot answer: the build runs it on workerd and asks its `/healthz`, which loads the app as a first request does, so a module that throws as it is evaluated (one reading a file, say) fails the build with `<file>:<line> throws as the Cloudflare Worker evaluates it`, the file from the repo, or from `node_modules` for a package's, by the bundle's source map.
|
|
419
|
+
|
|
420
|
+
## Screens
|
|
421
|
+
|
|
422
|
+
The bar's sections, in groups: Inbox and Workflows; a tile per site ([Sites](#sites)); then Setup, by purpose: Data (when the company has collections or sites), People, Hosting, Connectors, Apps and Permissions (when it has policies, `policies/*.cedar`). The app opens on Workflows, its home, which lists each workflow and how its last run went. Old links still work: `/` redirects to `/workflows`, `/resources` to `/hosting` (with its `?resource=`), `/setup` and the pages under it to Hosting's, `/runs` to its All runs view, `/runs/<id>` to the run's page under its workflow, and `/start?workflow=<name>` to that workflow's page with New run open, which says if the workflow is unknown (`/start` naming none, to `/workflows`).
|
|
423
|
+
|
|
424
|
+
- **Workflow** (`/workflows/<name>`): one workflow's page, which takes the window's full width (as the Inbox, Workflows and a collection's grid do; the other pages keep to a reading width). Its header names the workflow under **Workflows**, with its name, and **New run** at its end (none for a retired workflow), which opens New run over the Graph. Under it, pill tabs, each its own URL (`?view=`), each keeping the rest of the URL's search:
|
|
425
|
+
- **Graph** (no `?view=`): the workflow's outline (see [Outline](#outline)), marked with the scenario `?scenario=` names, the inspector floating over its right (under it while the page is narrow, as with the chat column open on a laptop).
|
|
426
|
+
- **Runs** (`?view=runs`), with how many it lists: the workflow's latest 50 runs, newest first, in a table: each named by its id's first 8 characters (the whole id in its tooltip), with its status (and, while it waits, the first approval it waits on), a sandbox run's scenario, who started it and when. The **Show runs** menu shows all of them, or only live, sandbox, waiting or failed runs, kept in the URL as `?runs=`: live and sandbox are picked from the latest 50 (so the tab says it found none, or lists those it found, among the latest 50), while waiting and failed are the latest 50 with that status, however old. A row opens its run (`?run=<id>`) in a card floating over the list's right (above it while narrow), the row marked: its status, a sandbox run's badge and, while it waits, on whom and for what; its error; who started it and when; its input; its ledger as a short trace; and **Open run**, its page. The runs refresh every 2 seconds while one of them can still change, else every 30 seconds, and at once when you start a run or decide an approval.
|
|
427
|
+
- **Code** (`?view=code`): the workflow's source.
|
|
428
|
+
- **Scenarios** (`?view=scenarios`), with how many, when the feature files have any for it: each scenario with its file and how many steps it has; the one opened (`?scenario=<name>`) floats with its text, **Sandbox run** (New run in Sandbox mode with it chosen) and **Show on the graph**.
|
|
429
|
+
|
|
430
|
+

|
|
431
|
+
|
|
432
|
+
A workflow the config no longer has keeps its page while it has runs: its header names it, its Graph says it is gone and links to its Runs, and its runs draw a graph with only its name. With no runs either, its page is not found.
|
|
433
|
+
|
|
434
|
+
- **Run** (`/workflows/<name>/runs/<id>`): a run's page, under **Workflows** and its workflow's title, named **Run** and its id's first 8 characters, with its status, a sandbox run's badge, who started it and when, and **New run** (the workflow's). Under a notice for what it waits on (who, and for which approval, with **Show approval** to select it) or why it failed, the run's graph (see [Run graph](#run-graph)) with the inspector floating over it, then pill tabs, **Ledger** (open at first) and **Code**. A run of another workflow opens under its own. Its Ledger tab lists a sandbox run's **Checks**, drawn as the ledger's rows are: each `Then` of its scenario, which the worker runs (Cucumber) against the ledger when the run waits on an approval and when it ends, each on its own, met, failed with why, or "not yet" while its answer can still change (until the run ends, unless it expects a call that has been made); when the run's scenario is no longer in the feature files, or they cannot be read, Checks says why instead. Then the ledger as a timeline: the start, each operation call with its effect, the policy's decision, duration, input and output, each approval asked, decided or ignored, and how it ended; a sandbox run's says how many calls it was seeded with.
|
|
435
|
+
|
|
436
|
+
A workflow's Graph and Code, and a run's graph, Ledger and Code, are one view: clicking a node selects it, the graph rings it, Code marks its lines, and the inspector shows it, closing New run if it is open. Clicking a line in Code selects its node (the inspector then floats over the code, which leaves it room), and a ledger row's **Show in graph** button selects the node it is drawn as. The node selected stays as you switch between a workflow's Graph and Code; Runs and Scenarios drop it. The inspector shows, first match wins:
|
|
437
|
+
|
|
438
|
+
- **New run**, while the URL has `?new` (its close button drops it): two links, **Live vendors** and **Sandbox**, each its own URL (`?scenario=<name>` is Sandbox with that scenario, none is Live), then the form. `/workflows/<name>/new`, the old New run URL, redirects here, keeping `?scenario=` and `?runs=`.
|
|
439
|
+
- **Live vendors**: says which vendors the run calls for real and what the policy will do on a run you start (the will-ask line, as `RunForm` has it), then the form, built from the workflow's input schema: text, date and time (in your browser's time zone, shown as its ISO text until the page has loaded), numbers, yes/no, choices, lists with Add and Remove, and objects one level deep; anything else is entered as JSON. Optional fields left empty are left out, so the schema's defaults apply. The server checks the input with the workflow's schema and its complaints appear on the fields they name. **Start run** starts it and opens the run.
|
|
440
|
+
- **Sandbox**: a menu of the workflow's [scenarios](https://github.com/Sanoma-AI/sanoma/blob/main/packages/sanoma/workflows/README.md#scenarios-and-sandbox-runs) (**Sandbox** opens the first; with none, it is disabled and says so), and the form showing the chosen scenario's input with its controls disabled and no Add or Remove, since a sandbox run takes its input from its scenario. **Start sandbox run** starts it and opens the run, as you (a scenario's `Given ada is acting` is for `sanoma check` and tests, so the app never records a run as someone who did not start it): nothing leaves Sanoma, the fakes answering its calls. The scenario's lines of its feature file are behind **Scenario**, and the workflow's graph badges each operation a `Given` seeds ("seeded") or makes fail once ("fails", for `fails once`, `is rate limited once` and `loses its reply once`), and one a `Then` expects to be called ("expected"), not called ("not called"), denied by the policy ("must deny") or held by it ("must hold"), matching an outline's computed segment (`*`) as the run graph does. A scenario the feature files do not have says so. The scenarios are read again every 5 seconds while the page is open and when its window regains focus, so an edited feature file shows up without a restart; a file that cannot be read says why at the top of the workflow's page. The app decides nothing: the run's approvals wait for people, as a live run's do. Each sandbox run calls its own copies of the fakes, so several run at once, and one waiting on an approval holds up no other.
|
|
441
|
+
- **The selected node**: its kind, its step's name (when its call gives one) and label; for an operation, its id, effect and vendor and what it does; and **Lines a–b** of the source, which opens Code. On a run's page, also the node's ledger records (a held call's with the policy's request and decision, an approval's with its decision), and the approval it waits on with **Approve** and **Reject**, so it is decided in place.
|
|
442
|
+
- With nothing selected, **About** on the workflow's page: how it starts (by hand, or "Runs <cron> (<time zone>), next <time>", the next fire computed by the server), what it may call, its operations with their effects, its built-ins, its input and **Used by**: each site's page that calls it, under the site's title, through `RunForm` or `api`, linking to the page (a component's file, which is no one page, by its file); on a run's page, the run's facts (who started it, when and its id) and its approvals, each with the operations it lets through (badged by effect), and **Approve** and **Reject** with an optional note while the run can still read a decision. When the run has not read a decision within 5 seconds (no worker is running, say), it stays queued and the run reads it when it next runs: the dialog closes and the page shows the decision as queued, with Approve and Reject disabled for that approval, until the run's status changes. Every card but New run has a close button: closing hides the inspector (and drops the selection) until a node is clicked, and an **About this workflow** (on a run's page **Show the run**) button at the card's corner brings the overview back.
|
|
443
|
+
|
|
444
|
+
- **Inbox** (`/inbox`): the approvals, with how many are pending beside its title. Pill tabs pick the list, each its own URL (`?show=`): **For you**, the pending approvals you may decide (the default once the page knows who you are, and counted from then), **Everyone**, every pending approval (the default until then), both newest first and with how many they list, each with **Decided today** under it, the approvals decided since midnight (your browser's) in the latest 50 runs; and **Decided** (`?show=decided`), the approvals decided in the latest 50 runs, latest first. The list is one card: each row has the approval's title, how long ago it was asked (a decided one: its decision, and how long ago it was made), its workflow and who started the run, and opens it (`?approval=<runId>/<approvalId>`), marked while it is open. The open one, by default the first for you, else the first, floats over the list's right (above the list while the card is narrow, as with the chat column open on a laptop): its title and status, a sentence saying whose run of which workflow wants to do what (the operations it lets through, such as "publish a post in Ghost"), its details, and at its foot the same controls as on its run's page. Once you decide, it leaves the list and the next one opens; with nothing for you, a link shows those waiting on others. Refreshes every 5 seconds.
|
|
445
|
+
- **Changes** (`/changes`, in the bar after Inbox when the repository has a remote): the changes sent for review from a chat's draft card (**Send for review**, offered once the draft has a commit and its checks pass), each draft's latest, newest first, **Open** and **Done** as pill tabs (`?show=`), each row its title, where it is, how many files it edits, its pull request and when it last moved. A change's page (`/changes/<id>`) shows where it is ("Waiting for admin", Published, Closed), its branch at the head it last planned, its pull request and its run; what changed, by kind (policies, people, resources, workflows, sites, each app's); who may do what, the Permissions grid of `main` against the branch's, each changed cell with its before and after; and, floating, Publish: the policy's answer, the checks, and once merged the merge commit and the deploy, with **Publish** and **Reject** while it waits. Publish is also the change's approval in the Inbox, with the change linked. How a change runs is the [runtime's](../workflows/README.md#changes).
|
|
446
|
+
- **Workflows** (`/workflows`): the home, the window's full width. Its header says how many workflows the app has and the config's version (cut short, the whole of it in its tooltip), with **New workflow**, which opens the chat on a new chat with "Make a workflow that " in its composer for you to finish; a notice says so when the repo's policies do not hold, as they then refuse every call and start. Pill tabs, each its own URL with how many it holds, pick the rows (`?filter=`): **All**, **Waiting on you** (runs waiting on an approval you may decide), **Failed last run** and **Built-in**; the last tab is **All runs**. While the workflows are in more than one folder, a second row of tabs, **All**, **Yours** (the root's, the built-ins among them) and one per app (`?app=`), picks a folder, and the table puts each folder's under its heading, as Data does. Under them, one card: a box that finds a workflow by its title or name as you type, over a table of every workflow in the config, those whose runs wait on an approval you may decide first (badged with how many), then by their last run: its title (linking to its page), its name, built-in for the built-in `drift` (which starts like any other, with no input), how it starts (by hand, or the cron it runs on and its time zone), the vendors its operations call, in order of title, its last run's status and when, and how many approvals its runs wait on, on anyone. What it may call, its built-ins, its input and its outline are on its page. **All runs** (`?view=runs`) lists the latest 50 runs of every workflow, newest first: each with its workflow (linking to the run's page under its workflow, the run's id as its tooltip), a sandbox run's badge, its status, who started it and when, how many approvals it waits on, and a failed run's error. Its **Status** menu shows only the runs with that status, the latest 50 however old, kept in the URL as `?status=`; `?workflow=<name>` shows only that workflow's, named beside the menu with a button that removes it. The table refreshes as a workflow's Runs tab does. **New workflow** opens a dialog saying how to add one to the repo (a file under `workflows/`, listed in `sanoma.config.ts`, which the app shows once it restarts); drafting one from a description is coming.
|
|
447
|
+
- **People** (`/people`): who may act, as the data files declare them (`sanoma.person`, `.agent` and `.group`), with how many people beside the title, and the tabs **People**, **Groups** and **Agents** (`?show=`), each with how many. The problems with a declaration of theirs, or in a file that declares them, show above the table (their resources are left out, and nobody is admitted while there are any). People lists each person's name, email (`none` without one), groups (written on each group, read back by its members), how they sign in (an email code to their email, their GitHub login, or that they cannot) and when they last signed in and how (`Never` until they do), from the ledger; Agents lists each one's name, whom it acts for, its groups (also `agents`, muted and marked built in, the group the runtime puts every agent in) and the declaration, which opens in its file on Hosting; Groups lists each group's members, then, while there are agents, the built-in `agents` with them. A row opens over the list (`?person=<id>`, a group's name) with its file and export (opening it on Hosting) and its declaration's form (below): its fields from the type's schema, as declared, its id (a group's name) read-only, as the policy and the groups name it, and a group's members read-only, since they name declared people. On a host, each person's row, and their open card, has **Invite link** (only someone in `admin` makes one, and only for someone with an email declared; otherwise it is disabled and says why), which mints a one-use link that signs them in and shows it in a card, **Invite link for <name>**, with **Copy**, to send them however you like; a new link replaces their last.
|
|
448
|
+
- **Hosting** (`/hosting`): where the company runs, then the rest of what the data files declare at vendors. On top, a card per slot: Repository, Database, Host, Wakeup and Agent box (the sandbox the coding agents' boxes are opened in), each the declared resource whose type meets that contract (`resourceTypes[].capabilities`; the repository is the one the host clones), with its name, type, its plain declared fields, its binding and the latest drift verdict (with the fields that differ, and Adopt), the host's with where the last apply that made it says it answers and how it stays up, from its type (`resourceTypes[].host.lifetime`): Always on, or Stops when quiet, what is due while it sleeps started by the Wakeup, or, with no Wakeup declared, a notice that none wakes it, so going live declares none and the host stays up. For a host that derives (`cloudflare.host`), its card also shows, read-only, what apply gives it (`hostDerived`, by `deriveHosts` as apply runs it, nothing minted): the runtime image, the repository and branch it runs, the public sites' domains it attaches, and each key it is given, stored or not and since when: `SANOMA_SIGNING_KEY` (or, when the config binds none, the host's own, `SANOMA_HOST_SIGNING_KEY`, generated into the store at its create), `SANOMA_SECRETS_KEY` with the built-in store, `SANOMA_SOURCE_KEY` and the wakeup's token; never a value. The agent box's card says whether each key its connector takes is set, with a link to the connector page where it is; a live instance that declares no sandbox says what to declare instead, since its coding agents refuse to run without one. While no host and no database are declared, and while going live has bound its repository but not yet its host (`resources/sanoma/infra.ts`), going live's steps show above them (**Go live**, below). Under them, **Other resources**: each other resource the data files declare (people are on People, collections on Data; its name, type and vendor, the declaration it comes from, which opens in its file below the table, marked, and the vendor object the lockfile binds it to, its id cut short), with the latest drift check's verdict: clean, drifted (with each field that differs, as declared and as the vendor holds it, shown under its row), gone, absent (not bound yet, and whether its identity found an object), error (and why), or not checked. Bindings in the lockfile that no data file declares are listed under the table, each with its key, type and id: apply asks whether to forget each or delete its object. **Apply** starts the built-in `apply` workflow on every declaration, and goes to its run; the config registers it beside drift. Apply holds its plan for a person: wherever an approval's details carry one, the Inbox and the run show it as the change view: problems in the data files, each change to the lockfile apply did not make in plain words ("points store at a different project: abcdefgh… → wxyzabcd…"), then the steps by action: creates with their planned fields (what the vendor fills in is "known after apply"), updates and replaces with the fields that differ (and, for a replace, the fields that cannot change in place), binds (found by identity, or given), gone objects and orphaned bindings with the question each asks, and the unchanged, folded. Each drifted field has **Adopt**, which writes the value the vendor holds, as that check's report has it, into the data file (`setFields`: only that declaration changes), commits it when the worker is given a `source` (the company's repository; without one it only writes the file), as an `adopt` run in the worker, and starts a drift check, which reads the file as it now is. A declaration's literal fields are written from a form too: **Edit**, beside the file a declared resource opens in (`?edit`), and a row of People open, draw the declaration's form (`components/declaration-form.tsx`): its type's schema's fields (less those only the vendor sets or never reads back), as the data file declares them, a field that names another declared resource and a person's, agent's or group's identity read-only. **Save** sends the fields you changed (a `patch` run, `{ at: { file, export }, fields }`, for a declaration the description names: a resource, a collection, a site or an app; it sets fields and removes none, so an emptied one is refused on the form) through the same writer, which parses the file and changes literals only: a field the file computes (a name or reference, a call, a spread) or a declaration that is no object literal is refused with the writer's reason (`invalid_input`, with the `field`), which the form shows under that field, read-only from then on, and stays the code's to change. Under the form, where it landed: **Saved as a change**, linking to its review, or saved to the file and the commit; a refusal (a 403) shows its reason. The form shows the declaration as the files hold it: the app makes its description again on the next request once a file it loaded changes (`liveDescription`), and a Save or an Adopt reads the config again, so what was saved shows on People, Hosting and Data at once. Where a Save lands: when the repository drafts and its remote has a connector's remote half, it is a change (**Changes**, above): the fields set in a draft of its own, `ui-<8 hex>`, committed there as you ("Change <fields> of <export>") and sent for review, the answer being the change's run, whose page is `/changes/<id>`; a change to the rules (a people file) waits for `admin` as any change to them does. Without a remote it is written and committed in the checkout as Adopt is, a people file (or a file one imports) only by someone in `admin` (403 for anyone else, since nothing would review it). Adopt and Save write the checkout one at a time. **Run drift** starts the built-in `drift` workflow, which reads the data files as they are then; the page reads the drift runs as a workflow's Runs tab does, every 2 seconds, links to the latest run, and shows the report of the latest that finished. Problems in the data files show under the tables, each at its file, line and column, since their resources are left out: those the app found when it started, and any the last check found. The declared list is the description's, made again once a data file, the lockfile or a folder they are in changes, so a declaration written since opens without a restart; the public sites' hosts and logins stay as the app started.
|
|
449
|
+
- **Data** (`/data`): the config's collections, with how many beside the title, in a table: each one's title and name, the field it is found by, its fields, the workflows that save it (**Written by**), the sites that call it (**Shown on**) and the file that declares it (opening its declaration on Hosting), a row opening its grid. While they are declared in more than one folder, the rows are grouped by it, the root's first (**Yours**), then each app's with its folder and source, and tabs above the card show All or one folder's (`?app=<name>`, `?app=.` for the root's), with how many each. How many records each holds is not shown yet. **A collection** (`/data/<name>`) is its records in a grid you edit in place, the page's full width: a column per field, in the collection's order, then when each record was saved and by whom. Click or arrow to a cell (Shift and an arrow, or a drag, selects a range; Cmd/Ctrl+C copies it, tab-separated, for a spreadsheet), type or press Enter to change it, Enter to save it, Esc to cancel, Tab to save and move right: text and numbers in an input, a date in a date input, yes/no a checkbox, an enum's values and the declared people a menu. An edit shows at once and is one save of that record, made over the record as the edit found it (`ifRecord`); a record's edits, the form's too, are saved one after another, each over the one before, and a toast offers **Undo**, which puts that field back. A save the policy denies says why and the cell goes back to the record as it is; one it holds shows the record as it is stored, marked with a hollow dot, **waits for approval**, until its `call` run ends. A record someone changed since the grid read it is a conflict, never overwritten: the cell turns orange with what you typed, and a row under it says what is there now (who set what, and when, when the runtime says) with **Keep theirs** and **Use mine**. **Paste** a range (Cmd/Ctrl+V, tab-separated as Excel and Sheets copy one, quoted cells too) from the cell you are on, over the rows there and as new records past the last (each new record's key from the pasted column that lands on the key, else one to type before Save), or one value into every selected cell; drag the **fill handle**, at the selection's bottom-right corner, down to repeat its values; type into a selection to set every cell in it; **Delete** clears the selected cells, and deletes the records whose key is among them; **Shift+Enter** adds a record below the rows. Each value is read as its field reads it, so a number column gets numbers and an enum one of its values. None of these saves: they are staged as one change, its cells tinted with a bar at their left, new rows green, deleted ones struck, a cell its field cannot read (or a new record's missing key or field) in red, and a bar above the footer counts them ("6 changes in 3 records · from your paste: …") with **Review**, **Discard** and **Save as one change**; Cmd/Ctrl+Z takes back the last step, and while a change is staged an edit of a cell is a step of it, and the record form, the filters, the sort and the key links wait for it ("Save or discard the staged changes first"), as does leaving the page. **Review** lists each record's changed fields, as they were and as staged, the cells to fix first, and **Save n now**, which saves the records ready and leaves the rest staged. Save reads the records again first: one changed since it was staged is a conflict to settle, per cell, before anything is sent. Then the change is one call, `data.<name>.saveMany`, all or nothing, the policy deciding each record and the ledger recording each, in one run: a conflict it finds keeps the change to settle; a denial drops the records it refused, marked **refused**, and keeps the rest; a hold says the change **waits for approval**, linking to its run, and marks its records; any other failure saves nothing and keeps the change staged. The footer says how many records match, when you last saved, and the cell you are on; **Export CSV** downloads the grid as shown. Drag a heading's edge to widen its column (kept per collection in this browser). A field's heading sorts by it, ascending, then descending, then by key again (`?order=`, `-` for descending); above the grid, **<key> starts with** keeps the records whose key starts with what you type (`?key=`), each enum field has a menu of its values (`?where=`), **Fields** hides some (`?hide=`, said by a chip that shows them again), and **Show at most** sets how many it reads, 100 at first, up to 1000 (`?limit=`); it says so when there may be more. **Columns**: each field's heading but the key's has a menu: **Rename**, **Change type**, **Hide column** (`?hide=`), on a free-form field each key its records hold with how many, to make a column of (**Convert to column**), and **Remove column**; **+** after the last heading, or **New column** under **Fields**, opens the New column panel. Each opens a panel beside the grid (`?column=`) with what it takes (a name; a type of the chips Text, Number, Yes / no, Date, A person, A choice with its choices one per line, and Link to another table and Free-form, which arrive with real tables; Optional) and **What will happen** in plain words, drafted over the records on screen; **Review the change** proposes it (`proposeColumnChangeFn`): the collection's declaration in `resources/data.ts` edited by a `patch` run as a form's Save is (a rename renames the field, a removal leaves the records' values where they are), landed as a change for review that carries its plan, or, with no remote, written and committed. A table change's page reviews it in its words: a card per change (**Safe**; **Needs a decision**, with the records that won't convert, a sample and two choices; **Keeps the data**), **Try it first** (a copy, once previews land), **The details** (the declaration's lines, and what runs on the database: nothing until the runtime plans the change), **Approve and apply** and **Send back** for its Publish and Reject, and **Couldn't apply this change · Nothing changed** over a run that failed. The plan is the app's draft (`planOf` in `components/grid/plan.ts`) until the runtime plans a table change itself; and since repository writes answer 501 on the Cloudflare Worker, columns change from a laptop first. A record saved before its fields changed, which they now refuse, is badged **needs fixing**, what they refuse in its tooltip. **Add record**, or a record's key (or Space on its row), opens the record form beside the grid (`?new`, `?record=<key>`), drawn from the collection's fields as a start form is from a workflow's input: text, a number, yes/no, a choice for an enum, a date input for a date (one a workflow saved with a time shows as a date and time), and a person as their id, a new record's people starting as you; an edit's key cannot change. **Save** saves it (an edit over the record as the form read it, so one someone changed since is refused), and **Delete**, once confirmed, deletes it. The grid and the form change one copy of the records in the browser (a TanStack DB collection over the page's read of them), so each shows the other's change at once, without reading the records again. Every read and change is the collection's operation (`data.<name>.list`, `.save`, `.delete`) called through `api` as you, so the policy decides each and a save or a delete is in the ledger: a denial shows on the form; a call the policy holds for an approval says **Held for approval**, linking to its run of the built-in `call` workflow (`/workflows/call/runs/<runId>`), which makes it once approved in the Inbox; what the fields refuse shows under them. Under an open record's form, **History · from the ledger** lists its saves and deletes, newest first, each with when, who (a workflow's run by the workflow's name), the fields it changed (before → after; the first save says **created**) and a link to its run but for a direct call's, which has no page yet: read from the ledger by the record's target (`SanomaClient.history`), and only for someone the policy lets `get` the record, since the ledger holds its values (its latest 500 calls, reads among them: it says so when older changes are not shown); a saved toast's key opens it there. The header names the collection, its operations' prefix and where `resources/data.ts` declares it (opening it on Hosting), and **Used by** lists the workflows whose `uses` name one of its operations, then the sites' pages that read or write it, as a workflow's page lists those that call it. **Import** (`/data/<name>/import`, Data / the collection / Import) brings a sheet in, in three steps, each its own URL (`?step=match`, `?step=review`): **Upload** takes a CSV file, chosen or dropped (its first row names the columns; RFC 4180, so quoted cells with commas, quotes or line breaks read whole), and shows its first rows; **Match columns** has a select per column, matched to the field of its name (each field once, the key marked), **Skip**, and for a column no field is named for, a new field to add first (the collection's columns change through the file, not here, yet); a column whose values its field does not take as written lists each with how many rows hold it and what it stands for: an enum's value, a declared person (a name or an email guessed as that person; while nobody is declared, any id is taken as written), left out (filling nothing: a new record's field stays empty, an update keeps the record's), or **Fix first**; under them, the rows the fields would still refuse, by row and why. **Review** reads the records the sheet's keys have, as you, and counts the rows, the new records, the updates, the unchanged and those with problems, over a table of what each row will do: **add**, **update** (a changed field showing what it **was**), **unchanged**, or **fix first**, with why. **Add n, update m** starts a run of the built-in `import` (`sanoma/workflows`' [Importing a sheet](../workflows/README.md#importing-a-sheet)) as you and opens it: the policy decides each save, a denied row is left as a problem, a held batch waits in the Inbox, and the run's output lists what it added, updated and left. A workbook (`.xlsx`) is refused with how to save it as CSV: reading one in the browser would add a 930 kB library.
|
|
450
|
+
|
|
451
|
+

|
|
452
|
+
|
|
453
|
+
- **Permissions** (`/permissions`): what the policy answers someone in no group, in each group (the declared ones, `agents` and `visitors`) and `anonymous` (Anonymous, a public page with nobody signed in), across, for the start of each workflow, with each operation it uses under it, and each operation a person may call directly down, with the policy beside the page's title: Cedar, its files, its version and how many groups, workflows and operations the grid has, and a notice when the policies do not hold, as they then refuse every call. Each cell is the policy's answer for someone in that group alone (an agent acting for someone, so a hold for `on-behalf-of` asks "whom it acts for"; a visitor, denied a start and a direct call no `permit` names, and allowed an operation in a run), the input unknown: allow (muted), hold (with whom it asks), deny, or depends (the input decides); a hold, a deny or a depends opens the rule behind it in a sheet (its id, its file, its `@title` or `@reason`, and for a hold whom it asks), with Show the rule. While the policy's files are in more than one folder (the root's `policies/` and an app's), the tabs **All**, **Yours** and one per app (`?app=`) pick a folder: its files, and the grid's rows in it (its workflows, and its collections' operations; the vendors' at the root), and under the grid each folder's files sit under its heading. Under the grid, each policy file is shown read-only, titled by its path, as a workflow's Code tab shows its source (plain: the app has no Cedar grammar); Show the rule marks that rule's lines there. Nothing here is edited: the rules are `policies/*.cedar`, and the people and groups People lists. With a remote, a line under the grid says what the repository's host enforces on `main`: a pull request and the `sanoma` check, or what it lacks and why, in the host's words.
|
|
454
|
+
- **Apps** (`/apps`): the company's apps, with how many beside the title, in three lists, each app's name opening its page. **Yours**: the apps of its own (no source), each with its folder and what it holds (workflows, collections, sites). **Taken**: those merged from a source repository (`app.ts`'s `source`), each with its source, linked, and how many commits it is behind that source (fetched by the worker when it starts and after each push to `main`, or why it cannot tell). **Available**: the apps on GitHub not taken yet (the repositories with the topic `sanoma-app`, through the built-in `sanoma.apps.list`, called as you once the page knows who you are, so the policy decides it and GitHub never holds up the rest of the page), Sanoma's own first, each with its tier (Official, Vendor verified or Community, from Sanoma's claims, `sanoma/claims`), whether Sanoma reviewed it, its description and license, its README, a solution's demo (**Try it**) and **Add**. **New app**, **Add** and **Update** open the chat with a prompt for the agent ("Make an app that ", "Take the app from <url> into this company with take_app, …", "Update the app in apps/<name>/ from its source with update_app, …"), which drafts the change on a branch of its own; when GitHub cannot be searched, a notice says why and the repo's apps show all the same. **An app** (`/apps/<name>`) is its parts in one card: its header has, for a taken app, how far behind its source it is, **Source** and **Update**; then a line saying where it lives, and a section each for its **Sites** (its pages, what they call, who sees them), **Collections** (key and fields, opening the grid), **Workflows** (the operations each may call with their effects, its last run, its runs), **Policies** (each file under its `policies/`, how many rules and their reasons, to the Permissions grid) and **Scenarios** (each feature file under it, how many scenarios, of which workflows). People never sit in an app: they are declared at the root, on People.
|
|
455
|
+
- **Connectors**: each vendor the config's operations are from, by title, with its logo and id (never the built-in `sanoma` and `data`, which call nothing outside: a workflow's vendors and New run's "Calls … for real" leave them out too), how many operations it has and how many workflows use it, and, when its drivers declare environment variables, whether it is configured or how many variables it needs, each linking to its page, under Installed, with its tier (Official for an `@sanoma-ai/` package, else Community). Under Available, the connector packages on npm that the config does not install, found by the `sanoma-connector` keyword and shown by the `sanoma` field of each one's latest version (title, and logo files the server reads from jsDelivr and checks as an installed connector's are, shown as images only), with its tier, description and version; nothing is stored, and npm is read at most every 10 minutes. Choosing one opens the steps to add it (`?add=<package>`): `pnpm add`, the import in `sanoma.config.ts`, then its credentials; there is no install button. When npm cannot be reached, a notice says only the installed connectors show.
|
|
456
|
+
- **Connector** (`/connectors/<vendor>`): its [named connections](#connection-management), plus links to its connector's npm package and source (from `defineConnector`'s `package` and `homepage`, when it gives them), its resource types, and each operation with its effect, whether it is safe to retry, its description, its contract (input and output as JSON Schema), its scenario `phrases`, the scenarios with a step about it (each marked as seeding it, making it fail, expecting it or saying it must not be called, and linking to its workflow's New run in Sandbox mode with it chosen), and the workflows that may call it; a feature file that cannot be read says why above the operations, as on a workflow's page. A vendor with workflow operations whose connector attaches no fake (its `VendorEntry`'s `fake`) says "Its connector attaches no fake" once, above its operations; one with only a resource type's `read` and `import` needs none, since those read real state and a sandbox run never calls them.
|
|
457
|
+
- **Go live** (on `/hosting` while nothing is declared to run on or its host is still to apply, and `/hosting/connect`): connects the company's GitHub and the vendors of its database, host and wakeup, the first step of going live. When how far going live is cannot be read, its steps say why in their place, with Try again, and the rest of Hosting shows as ever. **Create GitHub App** (with an organization's login, or empty for your personal account) goes to `/setup/github/manifest`, a page that posts the App's manifest to GitHub (administration, contents, pull requests and commit statuses: write; push and pull request events, its webhook at the app's `/webhooks/github`, on unless the app is on this machine; its OAuth callback the staff sign-in's `/auth/better-auth/callback/github`, and email addresses: read, for the verified email), with its state and who asked in a signed, httpOnly cookie (nobody signed in is sent back here, told to say who they are first). You name and create the App on GitHub's page; GitHub sends you back to `/setup/github/callback`, which checks the state, exchanges the code (`POST /app-manifests/{code}/conversions`) and writes the App's id, slug, client id and secret, webhook secret and private key through the selected store as who asked (`SANOMA_GITHUB_APP_ID`, `SANOMA_GITHUB_APP_SLUG`, `SANOMA_GITHUB_CLIENT_ID`, `SANOMA_GITHUB_CLIENT_SECRET`, `SANOMA_GITHUB_WEBHOOK_SECRET`, `SANOMA_GITHUB_APP_PEM`), then comes back here saying how it went (sign-in uses the new client once the app restarts on a host beyond this machine). Step 1 ends with **Sign-in**, how people will sign in on the host (ready, or invite links only): you, signed in from this machine when the host starts (or, while the people file declares no email for you, to declare one), an email code through the config's `login.sender` once its connector is connected, GitHub through the company's App once its client is stored (and, when the App lacks the permission to read email addresses, which a sign-in with a private GitHub email needs, that Connect says what to add), and invite links always. While the email code is not ready, it has a `warning · not blocking` badge and the ways to fix it: name a sender in `sanoma.config.ts`, or connect the one named on Hosting › Connect, and, without GitHub, connect the GitHub App. A sender whose connector Connect does not list gets a row of its own there. When the config names a sender, going live gives the host its driver's variables among the host's `secrets` (`RESEND_API_KEY`; the address it sends from is the config's `login.from`). Once the host answers, **Open, signed in as <your email>** asks the host for an invite for the email the people file declares for you, sealed with the signing key it shares (the host's own, `SANOMA_HOST_SIGNING_KEY`, when the config binds none), and opens it. The page then shows the App's slug with **Install**, and, from GitHub's listing of the App, read as the App with its stored keys (at most every ten minutes, two seconds allowed), the permissions the manifest asks for that it lacks, as an App made before the manifest asked for them, or by hand, may: set them in the App's settings under Permissions & events, then accept the update on its installation. Vendors with named authentication use the same connection forms as their connector pages, instead of the old per-vendor token controls. Going live requires an explicitly declared default account that is connected; a sole connected account does not become a default automatically. Other bootstrap inputs, including the wakeup service's URL and account token, remain separate. Going live chooses by contract among the config's types whose vendor is connected (for the database and the host, a vendor this page does not connect counts as connected; the page names the vendors still to connect, and refuses a database or host other than the one it showed): the database (Neon's project first, else the first type that meets the `Database` contract, with its regions, which it holds the choice to, and size), the host (Cloudflare's container once its required connection is ready, else Docker's, else the first host; any host but Docker runs `ghcr.io/sanoma-ai/runtime:<the sanoma version the company installs>`, which Cloudflare copies into its account's registry at apply) and the wakeup (a connected one that wakes that host, the host's own vendor's first: Cloudflare's alarm before `sanoma.wakeup`). The repository is private, so going live also makes a new deploy key, its private half stored as the host's `SANOMA_SOURCE_KEY` (among its `secrets`, never shown) and its public half declared after the repository as a read-only `github.repository_deploy_key`, which the apply that makes the repository adds to it, and the host's apply waits for (a file written before deploy keys, or by **Connect an existing repository**, declares none, and its host clones as before); a GitHub connector with no such type is named among what is missing before anything is written. Every start of the host clones with it ([Cloning a private repository](../README.md#cloning-a-private-repository)). When the config declares a host type, the page also offers **Connect a wakeup service**, for scale to zero: the [wakeup service](../README.md#the-wakeup-service)'s URL, `SANOMA_WAKEUP_URL` (Sanoma's, or your own `sanoma wakeup`), and an account's token there, `SANOMA_WAKEUP_ACCOUNT_TOKEN`, both optional. Storing the account's token also mints the instance's own, `SANOMA_WAKEUP_TOKEN`, unless one is stored, and never shows it. With both stored and no wakeup of the host's own vendor connected, going live writes the runtime's own wakeup (`export const wakeup = sanoma.wakeup({ host })`, imported from `sanoma/resources`) into `resources/sanoma/infra.ts` after the host, mints `SANOMA_WAKEUP_TOKEN` when none is stored, and gives the host it (and `SANOMA_WAKEUP_URL`, for `sanoma.wakeup`) among its `secrets`, so the one apply of the host and the wakeup gives the worker on the host what it registers with; removing the line and answering its orphaned binding **delete** on Hosting deletes the instance.
|
|
458
|
+
- **Connect an existing repository or database** (`/hosting/existing`, linked from the connect page): takes a GitHub repository (`owner/name`, its owner required) and/or a Supabase project's ref, reads each through its type's import (in the worker, as a `connect-existing` run, before any declaration names it; apply's own import, when it binds, is in the ledger), and writes `resources/sanoma/infra.ts` from what was read: the repository's owner, name, description and visibility; the project's name, organization and region, with its database password declared as a generated secret, which Supabase never reads back, so the next apply that changes the project sets a new one. In a repository without a remote, the file is committed where the checkout is; with one, on a new branch, `setup/connect-existing`, checked out, and the page shows the diff: merging it is the approval. Then the run starts apply as its child with `bind` and `only` for those declarations, which binds them in the lockfile (committed on the same branch) and creates nothing. Refused when `infra.ts` or the branch is there already.
|
|
459
|
+
|
|
460
|
+
Named authentication uses the connection forms below. A connector that still declares only an `env` schema retains its separate credential fields; those are not account selectors. Named connections never gain an environment-first fallback or process-wide credential swapping.
|
|
461
|
+
|
|
462
|
+
The screens share one shell: down the left, the bar, and beside it the chat column, then the page. The bar has **Chat** first, then the sections and the sites' tiles in their groups, each an icon in a tile with its label under it, the current one filled (Inbox badged with how many approvals are pending), and at its foot the menu under your initials. **Chat** folds the chat column away and opens it again, and the app opens it as you left it on your next visit (it keeps that in a cookie, `sanoma_chat`, so the server renders the page with it open or folded from the first paint); until then it is open where it sits beside the page and folded where it would lie over it. The column is your chat with the agent: your latest chat (the others, and **New chat**, at its top), your messages at the right, its replies under them with the steps it took as a checked list, and at its foot the composer, carrying the page you are on. The agent edits only a draft of its own, a branch `draft/<chat>` it opens at its first edit and commits to as it goes, and runs the checks there; its reply ends with the draft's card (the branch, what changes, the checks) and you apply it by merging the branch (the live instance runs the old code until it restarts). It takes an app into the draft with `take_app`, a git merge of the source repository (an `https` URL) whose `apps/<name>/` lands as the company's, every other file staying the company's but `package.json`, which gets the source's beside its own, and updates one with `update_app`, a merge of the new commits of the source its `app.ts` names, as far as they touch `apps/<name>/` and `package.json`; a file git cannot merge is committed with its conflict markers, which the agent resolves before the checks pass ([Apps](../workflows/README.md#apps)). `takeAppPrompt` and `updateAppPrompt` (`src/lib/apps.ts`) are what the Apps page's Add and Update put in the chat. A lookup the policy holds shows its approval's card in the reply (or who it waits for, with the Inbox's link), and the turn goes on once it is decided. The chat is kept in the company's database: a restart loses the turn under way, not the chat or the draft, and **Continue** picks up. The model is the first connector with a model half, its default; without its key, the reply says so with a link to its connector page. A new chat's composer picks its engine, which the chat keeps and names at its top: **Sanoma** (our own loop, the default), or an existing coding agent on the company's Anthropic key, **Pi** or **Claude Code**, driven through the AI SDK's `HarnessAgent` in the person's box, one per person per company, kept across restarts: in the sandbox the company declares (one `agent37.instance` in a data file, which going live writes into `resources/sanoma/infra.ts` once Agent37's key is stored), each box an Agent37 instance its connector opens, else, on this computer, a directory of its own (`.sanoma/agent-home/boxes/<box>`); a live instance that declares none refuses the coding agents, the reply saying what to declare, so no agent ever runs inside the live instance. Each turn opens the box, brings the chat's draft into the box's clone (`repo/`) as a git bundle, which carries commits and the branch alone (no remote, no token, no secret of the company's), and runs `pnpm install --frozen-lockfile --ignore-scripts` there with the box's own pnpm (never the one a `packageManager` field names) on the first turn and whenever the lockfile changed, so the box keeps a second `node_modules` of its own. A coding agent reads the repository's `AGENTS.md` itself; its file edits are allowed inside the clone and refused outside it (by their real paths in the box, where the files are) or under `.git` or `node_modules`, its shell commands are refused, each with the reason shown as a refused step (so taking or updating an app is the Sanoma engine's) (Claude Code reads files itself, as this machine's user: only its edits and commands ask); at the end of its turn its edits are committed in the clone as the person, brought back to the draft as a bundle and checked there. One turn runs in a box at a time: a second, from another of the person's chats, is refused until the first ends; a box that fails mid-turn loses that turn's edits, and says so. Claude Code's first turn in a box installs it under the box's home (about 760 MB, 40 s), which needs pnpm 11 and bash on the `PATH`; its bridge listens on all interfaces, guarded by a token, so keep that port behind a firewall. Under **Your own plan**, the composer offers a person's own coding agent, on their own subscription, driven over the Agent Client Protocol by the app's own client in the person's box, on its clone of the chat's draft: **Copilot**, **OpenCode** (its free models need no sign-in), **Pi**, **Claude Code** and **Codex**. A person's own agent spends that person's plan under their vendor's terms, which Sanoma neither checks nor changes. The agent runs in the person's box (on a laptop, a directory of this machine) with an environment of its own: its `HOME` is `.acp` in that box (`.sanoma/agent-home/boxes/<box>/.acp`, kept across restarts), so a sign-in is kept for that person and never the company's (every person's agent runs as this machine's user, so on an instance several people share, what an agent runs itself can reach another person's sign-in), and none of the app's or this machine's credentials reach it (no token variables; `gh`, `security` and the browser openers refuse on its `PATH`). Its first turn on a machine installs it there (`.acp/<agent>`) with the pnpm on the `PATH` (the desktop shell ships its own), in 10 to 45 s and 150 to 340 MB each. So `.sanoma/agent-home/boxes` holds a box for each person of the company: its home is Pi's and Claude Code's on the company's key (whose session's files are the clone's and that home's only, never its `.acp`; Claude Code's own reads and the commands a bridge runs are this machine's user's), and its `.acp` the person's own agents' (their `HOME`, installs and sign-ins, given only to that person's agents). The `harness`, `acp` and `people` directories of earlier versions are no longer read: delete them by hand. When the vendor asks the person to sign in, the reply is a sign-in card: the vendor's link and code (Copilot's and Codex's device flows), with a field for a code the vendor asks to have pasted back (Claude Code's), or, for Pi, whose sign-in needs a real terminal, the command to run once on this computer; the app opens no link and enters no code, the card keeps neither once it ends, and after signing in the person sends the message again. The agent's requests to read or edit a file are allowed inside the clone and refused outside it or under `.git` or `node_modules`, as are its requests to run a command and anything else it asks for, each with the reason as a refused step (it is never given an always-allow); the files it reads and writes through the app are the clone's only. What it runs in the app's terminal, and what its own tools do without asking (OpenCode edits and runs commands inside the clone without asking), are its own: the commit brought back to the draft and its checks, at the end of the turn, are the gate. From 1024 px wide the column sits beside the page; narrower, it lies over the page; on a phone (under 768 px) there is none, and the bar is a sheet over the page, opened from the menu button atop it, that closes as you follow a link or tap beside it. Each page starts with its title, with what it counts beside it and the pages above it as links (Workflows, then the workflow's title, on a run's page), its actions at the end of the row; then, on a page with views, pill tabs, each a URL; then one card. What you open from a list, an approval, a run, a scenario or a graph's node, floats over the card's right in a card of its own, and sits above the list (under a graph) while the page's card is too narrow. **Density**, in the menu at the bar's foot under the theme, switches the page to **Compact**, a tighter density for people who live in the app: the page a quarter tighter in every padding, gap and control (its icons too; the text keeps its size), half the gap between a page's regions, a lower graph card and source (a floating card keeps its width). The browser remembers the density in a cookie (`sanoma_density`), so the server renders the page in it from the first paint. The menu at the bar's foot, under your initials, has who you are (and Change name, under the default resolver), the theme (light, dark or the system's, which the browser remembers) and the density. Inside the [desktop app](../../desktop/README.md)'s window it also lists the companies open there, this one checked: choosing another switches the window to it, and **Add company…** shows the desktop app's start screen (`src/lib/desktop.ts`, over the `window.sanomaDesktop` the desktop app gives the page; in a browser there is none, and the menu has no Companies). The screens are built with [shadcn/ui](https://ui.shadcn.com) components (`src/components/ui`, from `components.json`) on Tailwind CSS, in the theme `src/style.css` holds: Sanoma's palette in light and dark, IBM Plex Sans and Mono (Fraunces for display), and 28 px controls.
|
|
463
|
+
|
|
464
|
+
### Connection management
|
|
465
|
+
|
|
466
|
+
`/connectors/<vendor>` renders named connection requirements from code and the admitted person's account metadata. Each card shows its name, authentication method, verified account and grants, required scopes, owner, binding status, last change, and the selected store/namespace/path with management ownership. A changed binding shows its previous destination so the person can review the move. Loading cards reads metadata only; **Test** deliberately checks the provider. Health is labeled with its last-check time, not presented as continuous monitoring.
|
|
467
|
+
|
|
468
|
+
A card links the workflows found in code to select that account literally or through its declared default. Calls whose selector is only known at runtime are marked as possible dependencies. This is a static reading of workflow code, not a complete execution history or a promise that every listed workflow will use the account.
|
|
469
|
+
|
|
470
|
+
**Connect** and **Replace credentials** generate password controls from the authentication input schema, with JSON entry for structured fields. Fields start empty; schema defaults and examples never populate them. **Verify and review** checks policy, verifies the account and grants, then shows the destination and any change from the previous account or location. **Save connection** revalidates the review, reserves the account as pending, writes through the selected store and verifies activation under policy. During this process the previous binding can become unavailable; the card reports pending or uncertain outcomes rather than claiming success. A location change retains the previous stored value and is not a transfer.
|
|
471
|
+
|
|
472
|
+
Credential values live only in the open form and secure server requests. They do not enter query or mutation caches, browser storage, URLs, chat, workflow history, approval records or ledger records. Closing the dialog or completing Save clears the form. When policy holds an action, its notice links to the approval run; decide it there and retry the same action in the still-open form. Closing that form requires entering the credentials again.
|
|
473
|
+
|
|
474
|
+
Externally managed bindings and read-only stores offer **Review connection**, not replacement fields. Replace or renew values at the displayed management location, then **Test**. For a pasted credential, **Disconnect** invalidates the Sanoma binding; it does not delete its stored value or revoke access at the vendor. An OAuth grant's Disconnect and Revoke are described below. Dynamic **Connect account** choices appear only for code-defined rules the person may use; the runtime also enforces policy and ownership. A method without account verification cannot be connected here. Externally renewed OAuth bundles can be reviewed where their verifier and store support it.
|
|
475
|
+
|
|
476
|
+
The page lists every way to connect the vendor, so a connector with both an OAuth method and a pasted token (Supabase) shows both. An OAuth method's **Connect account** (or **Reconnect**) asks for the company's OAuth application, its client ID and secret, the first time; later attempts can leave both empty to reuse the stored one. **Continue to <vendor>** opens the provider in a new tab. The page that started it shows the attempt: waiting for consent, storing the grant, waiting for an approval (with a link to the run), connected, or failed with a plain reason. The provider sends the person back to `/connect/<vendor>/callback`, which checks that this browser started the attempt (a signed cookie per attempt, `sanoma_connect_<key>` named by its state's hash, sent only to `/connect`) and its state. It seals the code into the attempt and starts the `connect` run. Then it redirects to `/connectors/<vendor>` with the attempt's ID. Its URL never carries the code or state onward, and it logs no query string. A refused callback comes back as `?error=` with one of `expired`, `mismatch`, `replayed`, `declined`, `rejected` or `failed`, shown as a sentence, never the provider's words. The card then shows the account, its scopes and when access is valid until. A store that cannot keep a grant (read-only or without conditional writes) disables Connect and says why.
|
|
477
|
+
|
|
478
|
+
The runtime [renews a grant](../workflows/README.md#renewal-reconnect-disconnect-and-revoke) on its own, and the card shows it: **Valid until**, **Renewed** with the time of the last renewal (and the next one scheduled, for a provider whose refresh tokens lapse unused), and the last renewal's failure when it failed. A renewal that may have spent the refresh token without storing the new grant marks the account **uncertain**, and one the provider refused (revoked or rejected) marks it **needs reconnect**; both explain that **Reconnect** asks for new consent, which replaces the grant whole. **Test** verifies the grant, renewing it first when it is due. **Disconnect** deletes the grant Sanoma keeps and keeps the OAuth application, so the next account can reuse it. **Revoke**, shown when the connector can revoke at the provider (Supabase can), asks the provider to revoke the grant and then disconnects; it is its own policy decision (`sanoma.connection.revoke`), and nothing changes when the provider does not confirm.
|
|
479
|
+
|
|
480
|
+
**Secret storage**, shown on the connector list and setup page, reports the effective provider, namespace, bindings, ownership and bootstrap readiness. These settings come from code, so selecting another store is a code change; **Move**, below, carries the values to it. For the built-in store, the panel explains its separately supplied encryption key; it does not expose the key. [Supabase Vault](../../../connectors/supabase/README.md#supabase-vault-as-the-secret-store) is available as a configured provider adapter.
|
|
481
|
+
|
|
482
|
+
When the config names other stores (`secrets.stores`), the panel moves the secrets to one of them ([Moving between stores](../workflows/README.md#moving-between-stores)): choose the destination and the rollback window, review the plan (each secret's kind, what happens to it and its size; never a value; the destination's problems refuse the start), then start the `migrate-store` run. The panel follows it: writes to the current store paused, the copies read back, then the code change to make, `secrets` selecting the destination, which the move waits for and cuts over on. After the switch it shows the rollback window and, once it ends, the retired old copies. Cancel stops a move before its cutover. Connections whose OAuth application differs at the destination are flagged to reconnect.
|
|
483
|
+
|
|
484
|
+
The operator agent's `connection_status` tool reads account requirements and last-tested metadata with a link to `/connectors/<vendor>`. It does not fetch credentials or test a provider. The agent directs people to secure input and never asks them to paste a key, password or OAuth token into chat.
|
|
485
|
+
|
|
486
|
+
### Run graph
|
|
487
|
+
|
|
488
|
+
A run's page draws the run as a graph, left to right: the start, each operation call (its effect, the policy's decision, its duration or error), each sleep, each approval the workflow asked for, and how the run ended, or a dashed end while it has not. An approval the policy asked for sits on the call it holds. The calls of one `ctx.all` branch out side by side and join again after it. Each node's colour says how it went: done, failed or denied, waiting on a person or a sleep, or running. The graph is read from the ledger alone, so it shows what happened, not what the workflow may still do, and it redraws as the page polls. Clicking a node shows it in the inspector, scrolls to its record while the Ledger tab is open, and marks the call in the workflow's source under **Code**: the one the worker placed the call at, which the record names (`node`), when the source still has that call there, so a loop's every pass marks its one call, and a call from a ledger written before calls were placed, or whose file has changed so that another call or none is where it was, marks nothing rather than a guess. Clicking a call in the source selects its node: of a loop's passes, the latest. A sleep is labelled with the time it ends, in UTC, as the ledger shows times, so the server and every browser draw the same text. It is drawn with [React Flow](https://reactflow.dev) in the browser only; the server renders a placeholder of the same size, the graph's code loads, once, only on the pages that draw a graph (a workflow's and a run's), starting as the page's data loads, and each graph is drawn when it first scrolls near the screen. A graph pans sideways with the scroll wheel or a drag; its zoom control (React Flow's zoom slider, in the bottom left corner) zooms out and in, shows the zoom (a click sets it back to 100%), and fits the whole graph in view.
|
|
489
|
+
|
|
490
|
+
A `ctx.all` draws as one lane per member, top to bottom in member order, between the step before it and the step after: in a run that posts to three vendors at once, sleeps, then reads two results at once, the graph shows three lanes, the sleep, then two lanes, each lane coloured as its call went (a call the policy holds waits in its own lane). While a `ctx.all` is the last thing the run has done and the run goes on, each member that has recorded nothing yet has a dashed "not started" lane. Members that never ran, after one failed, or once the run has moved past the group or ended, have no lane. An operation whose call has a [step name](../workflows/README.md#step-names) other than its id says the name, with the id on the line below; a sleep with a name says it the same way, above its clock and the time it ends. A long loop label is cut short in its box; hovering shows it whole.
|
|
491
|
+
|
|
492
|
+
### Outline
|
|
493
|
+
|
|
494
|
+
Each workflow card on the Workflows page, and a workflow's page, draw the workflow's shape before it runs, from the `outline` that `describeConfig` (`sanoma/workflows/describe`) reads once per workflow when `startApp` starts; the source under a workflow page's Code tab is the workflow's file as it is when the page asks for it. It is the run graph's drawing without colours: the operations (with their effects), approvals and sleeps the body of `run` calls, a `ctx.all` as lanes, a loop or a `ctx.all` over a list as a box labelled from its code ("for each of subscribers", "repeat while more") (the line into the box goes on inside it to its first nodes, and its last nodes join the line out), an operation or sleep by the name its call gives, and an `if` or `switch` as a diamond that splits into one lane per case, plus a lane marked "otherwise" when the run can go by without any of them (an `if` without `else`, say). It is a reading of the source, labelled so: "Read from the body of run; the functions it calls are not shown, even those defined in it". When the source cannot be read the card says why instead.
|
|
495
|
+
|
|
496
|
+
## Login
|
|
497
|
+
|
|
498
|
+
`GET /healthz` answers `ok` before any login, whatever host it is addressed to: a host's probe that the app is up, and nothing more.
|
|
499
|
+
|
|
500
|
+
`startApp(config, { ingress })` adds machine routes (`IngressRoute`), answered by exact path right after `/healthz`, ahead of the public sites and the login, at any host: each checks its own token. A route with `prefix: true` also answers every path under its own (`/wakeup` answers `/wakeup/instances/…`, the [wakeup service](../README.md#the-wakeup-service)) and matches what follows itself; a route at the exact path comes first, then the longest prefix.
|
|
501
|
+
|
|
502
|
+
Beside them, the app answers a git host's webhooks at `POST /webhooks/<vendor>` for each connector whose remote half reads them (`webhook`; [remote halves](../workflows/README.md#usage)), GitHub's at `/webhooks/github`: the half verifies the delivery's signature over its raw body with the webhook secret (`SANOMA_GITHUB_WEBHOOK_SECRET`, the environment's, else the stored one), and each event it carries starts a run of the built-in `follow` as the runtime's agent `host-check` (`SanomaClient.follow`; one run per event, so a redelivery starts none), which the worker does with its checkout: a push to `main` applies the declared hosts, a push to a draft's branch plans its change again, a closed pull request ends it. Every host answers them, the Worker's bundle too. It answers 204 once the runs are started, 401 for a missing or wrong signature, 404 when no half of that vendor reads webhooks or its secret is not stored. Only an instance GitHub can reach hears them: a laptop has no public URL, so there a change's merge reads its pull request on GitHub itself (one merged or closed there ends the change once Publish is pressed), and a push to `main` made outside Sanoma is not deployed. An App made by the manifest before this version has its webhook off and lacks commit statuses: turn on **Active** under the App's settings' Webhook (GitHub's `PATCH /app/hook/config` sets only its URL, content type, secret and SSL check, not whether it is active), set its secret there if it has none and store it as `SANOMA_GITHUB_WEBHOOK_SECRET`, add **Commit statuses: Read and write** under its permissions, and accept the new permission on each installation. `onWrite` is called right before each change the app makes that a worker must run, a run's start or an approval's decision, never a read (`sanoma serve` starts its stopped worker again with it).
|
|
503
|
+
|
|
504
|
+
`startApp` takes a `login` provider, which says who may use the app and who is making each change. Without one, the app has no login and listens on this machine only; with one, it may listen on any host. A public site's own host has its front door instead, its visitor login or none ([Public sites](#public-sites)): the login here is for the people who run the company.
|
|
505
|
+
|
|
506
|
+
### No login, on this machine
|
|
507
|
+
|
|
508
|
+
The default, `loopbackLogin()`. The page asks "Who are you?" once (the people the data files declare, a row each with their groups, to pick from, or while they declare no one a name to type), keeps the answer in the browser, and sends it, URI-encoded, in the `x-sanoma-actor` header with every server function call; a change that names nobody is refused. It keeps the name in the `sanoma_actor` cookie too (`SameSite=Strict`), which the login reads when a request has no header, so the server's render of a page whose loader calls `api` knows who is asking; a page another site sends the browser to renders as nobody. Anyone who can reach the app can start runs and decide approvals as any name they type; the approver check only compares names. So `startApp` refuses any `host` but this machine's (127.0.0.1, the default, `localhost` or `::1`) without another login. While it listens on this machine only, it refuses every request (page, server function or static file) whose `Host` names anything but this machine (`localhost`, a loopback address, or a `*.localhost` name), so another site cannot reach it through DNS rebinding.
|
|
509
|
+
|
|
510
|
+
Reads are open. Anyone who can reach the app sees every run, its ledger (each operation's input and output included) and its approvals, through the page and the server functions it reads them with; nothing asks who they are. On this machine, the Host check above is the only protection. A failure the app does not expect shows only "Something went wrong": its message can name internal details, such as a database host, so the app logs it instead.
|
|
511
|
+
|
|
512
|
+
### Staff sign-in on a host
|
|
513
|
+
|
|
514
|
+
`staffLogin(betterAuthStaffLogin, { github })` signs people in with [Better Auth](https://better-auth.com) inside the app (`sanoma/better-auth`), its tables in schema `better_auth_staff` on the company's database, which the worker makes at its start (`startWorker({ prepare: [prepareBetterAuthStaff] })`, as the `sanoma` bin runs it) and the app only checks for (waiting up to a minute for a worker starting beside it), and the app admits a declared person only, matched by what the sign-in verified: their `email`, else their `github` login (each ignoring case). The sign-in page is `/auth/login` (signed in, it goes on to `/`), and every other request without a session gets it too, as a 401 (a server function call, JSON), so reads are signed in too and signing in there stays on the page asked for.
|
|
515
|
+
|
|
516
|
+
```ts
|
|
517
|
+
import { betterAuthStaffLogin } from "sanoma/better-auth";
|
|
518
|
+
import { staffLogin, startApp } from "sanoma/app";
|
|
519
|
+
|
|
520
|
+
await startApp(config, {
|
|
521
|
+
host: "0.0.0.0",
|
|
522
|
+
login: staffLogin(betterAuthStaffLogin, { github: { clientId, clientSecret } }), // GitHub optional
|
|
523
|
+
});
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
Three ways in, all to declared people only:
|
|
527
|
+
|
|
528
|
+
- **An email code**, when the config names a sender (`login: { sender: resend.emails.send, from: "Acme <login@acme.example>" }` in `sanoma.config.ts`, the sender's address on a domain its vendor has verified): the sign-in page asks for a work email, then the six-digit code sent to it, which works for five minutes and three tries (**Send again** sends a new one, and the earlier stops working). Only a declared email gets one; any other gets the same answer and nothing is stored or sent. The code goes out as a run of the built-in `login-code` workflow, started by the runtime's agent `login`, so the policy decides it and the ledger records it (the mail's text as `<text>`, never the code); its run's page shows the code sealed and cut to its first four characters (all the page is sent) and the mail's text as redacted. A policy that holds sends needs `|| principal == Sanoma::Principal::"login"` in its `unless`, or nobody receives a code: `sanoma check` names the policy that would hold it.
|
|
529
|
+
- **GitHub**, with the company's GitHub App's client: **Continue with GitHub**, Better Auth's OAuth flow at `/auth/better-auth/callback/github`, matched by the verified email GitHub gives, else the login. A sign-in that fails comes back to `/auth/login?error=<code>` (Better Auth's `errorCallbackURL`), which says why: for `email_not_found`, that the App needs the Email addresses permission; for `not_declared`, that the files declare nobody with that GitHub account; for `account_not_linked`, `account_already_linked_to_different_user` and `unable_to_link_account`, a line each; for anything else, that GitHub sign-in did not work.
|
|
530
|
+
- **An invite link**, always: a one-use link, valid 24 hours, that signs one declared person in; a new one replaces their last. Someone in `admin` mints one on **People** (Invite link), or `POST /auth/invite` with `{ email }` from the app's own page (anyone else gets a 403: the link signs its holder in as that person); anyone holding `SANOMA_SIGNING_KEY` mints one with `{ request }`, an invite request sealed with it (`sealInvite` from `sanoma/workflows`, valid five minutes, and used once), recorded as by the agent `login`. Going live does this for whoever deploys once the host answers. The link lands on a page that names who sent it (the latest invite record's `by`, `lastInvite`; a sealed request's names nobody) and whom it signs in, as declared, with their groups, then **Continue as <email>**, so a link preview never uses it up; a link used, replaced or expired gets a 410.
|
|
531
|
+
|
|
532
|
+
Without a sender, the sign-in page says email sign-in is not set up and to ask for an invite link (with Continue with GitHub when GitHub is on), and names no file, connector or variable: anyone can reach it. Each sign-in and each invite is a ledger record (`signin.recorded`, `invite.minted`), and **People** shows when each person last signed in. The session is Better Auth's cookie (`sanoma.session_token`, `Secure` over HTTPS, 7 days), signed with a key derived from `SANOMA_SIGNING_KEY`, which must be set; a change to Better Auth's routes is refused unless it comes from the app's own origin. Who may sign in is read on every request, so removing someone from the people file takes effect at once. The person acts as declared, by their id and the groups that list them. The menu at the bar's foot shows the login, your groups and Sign out. The `sanoma` bin builds this on any host beyond this machine, GitHub from `SANOMA_GITHUB_CLIENT_ID` and `SANOMA_GITHUB_CLIENT_SECRET` (in the environment or the selected secret store, where creating the App on **Go live** writes them) when both are set.
|
|
533
|
+
|
|
534
|
+
The sign-in page and the invite's are the server's own, outside the app's shell, and look like the app: named for the company (the app's `package.json` name, `sanoma-ops` as Sanoma Ops, with its initials), they link the built kit's stylesheet (`/assets/style-<hash>.css`, which loads signed out with its fonts), set this browser's light or dark theme before they paint, and stay legible on the dev server, which builds none.
|
|
535
|
+
|
|
536
|
+
### Your own
|
|
537
|
+
|
|
538
|
+
A `LoginProvider` is `{ name, check(listenHost), resolveActor, handle?, signOut?, open?, close?, invite? }`; `open(app)` is called once the app listens, `close()` when it closes, and `invite(email, { origin, by })` mints a one-use invite link (the staff sign-in's). `check` throws for a host the app may not listen on. `resolveActor` turns a request into who the login vouches for (`LoginIdentity`: `{ id?, email?, github? }`), or `undefined` to refuse a change; the app admits only the declared person it matches (`admitting`: by email, then GitHub login, then id), who acts as declared, so a provider's own roles or group claims never reach the policy. `handle`, when there is one, sees every request first: it answers its own routes under `/auth/<name>/` and any request it will not let through, and returns `undefined` for the rest. `signOut` is the path the page POSTs to to sign out, which `handle` serves; with it, the menu shows Sign out.
|
|
539
|
+
|
|
540
|
+
With a login provider, the page never asks for a name: it shows who the login says you are. An approval addressed to a group (`{ group: "finance" }`) can be decided only by someone the people file lists in it. The app calls `resolveActor` only for a request that needs to know who is asking, once per request. One that throws fails the change with a 500, logged as "Could not tell who you are: " and the resolver's message; the menu at the bar's foot says "Could not tell who you are" and asks again every 10 seconds.
|
|
541
|
+
|
|
542
|
+
## Developing
|
|
543
|
+
|
|
544
|
+
In the repo, `pnpm --filter sanoma build` builds the app (`vite build` into `dist/client` and `dist/server`, and the `startApp` and `./build` entries). `startApp` serves that build even when run from source, so rebuild after changing anything under `src/` except `index.ts`.
|
|
545
|
+
|
|
546
|
+
Status: early (0.x). The API may change between minor versions.
|
|
547
|
+
|
|
548
|
+
License: FSL-1.1-ALv2.
|