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
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import type { LoginContext } from "./op.ts";
|
|
3
|
+
/** What a sandbox can do, for choosing one: declared, never checked at runtime. */
|
|
4
|
+
export interface SandboxCapabilities {
|
|
5
|
+
/** A box's files, its home's too, survive `stop` and the next `open` of its name. */
|
|
6
|
+
snapshot: boolean;
|
|
7
|
+
/** A stopped box keeps its memory and processes, and resumes them on the next `open`. */
|
|
8
|
+
pause: boolean;
|
|
9
|
+
/** `expose` makes a port of the box reachable from outside it. */
|
|
10
|
+
port: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** What a sandbox's state says of it. */
|
|
13
|
+
export interface SandboxOutputs {
|
|
14
|
+
id: string;
|
|
15
|
+
healthy: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A resource type's `sandbox`: the fields its boxes' choices are in, by dotted path into its
|
|
19
|
+
* declared fields, and how its state reads. The vendor's own facts (its region, its type of
|
|
20
|
+
* machine) are fields of the resource, never read from the environment.
|
|
21
|
+
*/
|
|
22
|
+
export interface SandboxSpec {
|
|
23
|
+
capabilities: SandboxCapabilities;
|
|
24
|
+
inputs: {
|
|
25
|
+
/** The image a box runs. */
|
|
26
|
+
image: string;
|
|
27
|
+
/** A box's size, in vCPUs: its memory follows the vendor's shapes. */
|
|
28
|
+
size: string;
|
|
29
|
+
};
|
|
30
|
+
outputs: (state: Record<string, unknown>) => SandboxOutputs;
|
|
31
|
+
}
|
|
32
|
+
/** A process `Box.run` started: `bash -c <command>`. */
|
|
33
|
+
export interface Process {
|
|
34
|
+
/** Its stdin: closed at once unless `run` was given `stdin: true`. */
|
|
35
|
+
stdin: WritableStream<Uint8Array>;
|
|
36
|
+
/** Its stdout, as it prints, ended once it has exited. */
|
|
37
|
+
stdout: ReadableStream<Uint8Array>;
|
|
38
|
+
stderr: ReadableStream<Uint8Array>;
|
|
39
|
+
/** Resolves when it has exited: non-zero when it failed or was killed. */
|
|
40
|
+
wait(): Promise<{
|
|
41
|
+
exitCode: number;
|
|
42
|
+
}>;
|
|
43
|
+
/** Kills it and what it started (default `SIGKILL`). */
|
|
44
|
+
kill(signal?: NodeJS.Signals): void;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A box: a computer of its own a coding agent works in. A relative `path` or `cwd` is under the
|
|
48
|
+
* box's home (`$HOME`), which a backend with `snapshot` keeps across `stop`.
|
|
49
|
+
*/
|
|
50
|
+
export interface Box {
|
|
51
|
+
/** The vendor's id of it. */
|
|
52
|
+
id: string;
|
|
53
|
+
/** Runs `bash -c <command>`, in `cwd`, with `env` over the box's own. An abort kills it. */
|
|
54
|
+
run(command: string, opts?: {
|
|
55
|
+
cwd?: string;
|
|
56
|
+
env?: Record<string, string>;
|
|
57
|
+
stdin?: boolean;
|
|
58
|
+
signal?: AbortSignal;
|
|
59
|
+
}): Promise<Process>;
|
|
60
|
+
/** A file's bytes; null when there is none. */
|
|
61
|
+
read(path: string): Promise<Uint8Array | null>;
|
|
62
|
+
/** Writes a file, its directories made. */
|
|
63
|
+
write(path: string, bytes: Uint8Array, opts?: {
|
|
64
|
+
mode?: number;
|
|
65
|
+
}): Promise<void>;
|
|
66
|
+
/** Where its `port` is reached from outside it, with the headers that reach it. */
|
|
67
|
+
expose(port: number): Promise<{
|
|
68
|
+
url: string;
|
|
69
|
+
headers?: Record<string, string>;
|
|
70
|
+
}>;
|
|
71
|
+
/** Stops it and every process in it; the next `open` of its name finds what it kept. */
|
|
72
|
+
stop(): Promise<void>;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* A connector's boxes (`ConnectorSetup.sandbox`). A box is keyed by `name`, under which the
|
|
76
|
+
* vendor keeps its state, so no snapshot handle crosses the contract.
|
|
77
|
+
*/
|
|
78
|
+
export interface SandboxBackend {
|
|
79
|
+
/**
|
|
80
|
+
* The box `name`, made from `image` with `size` vCPUs when there is none (left out, the backend's
|
|
81
|
+
* own), woken or started when stopped.
|
|
82
|
+
*/
|
|
83
|
+
open(opts: {
|
|
84
|
+
name: string;
|
|
85
|
+
image?: string;
|
|
86
|
+
size?: number;
|
|
87
|
+
}): Promise<Box>;
|
|
88
|
+
/** Deletes the box `name` and whatever the vendor kept of it: the next `open` finds it empty. */
|
|
89
|
+
discard(opts: {
|
|
90
|
+
name: string;
|
|
91
|
+
}): Promise<void>;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* What the app gives a connector's sandbox half (`ConnectorSetup.sandbox`): the secrets, as a model
|
|
95
|
+
* half reads them, and the declared fields of the resource whose boxes it opens, which hold the
|
|
96
|
+
* vendor's facts (its region, its type of machine) beside the image and size `open` takes.
|
|
97
|
+
*/
|
|
98
|
+
export type SandboxContext = Pick<LoginContext, "secrets"> & {
|
|
99
|
+
declared: Record<string, unknown>;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Throws what is wrong with a resource type's `sandbox`: a type apply cannot change (not
|
|
103
|
+
* `writable`), a capability that is not a boolean, an input that names no field, `outputs` that
|
|
104
|
+
* is not a function.
|
|
105
|
+
*/
|
|
106
|
+
export declare function checkSandbox(what: string, sandbox: SandboxSpec, type: {
|
|
107
|
+
schema: z.ZodObject;
|
|
108
|
+
writable?: boolean;
|
|
109
|
+
}): void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { hasPath } from "./host.js";
|
|
2
|
+
/**
|
|
3
|
+
* Throws what is wrong with a resource type's `sandbox`: a type apply cannot change (not
|
|
4
|
+
* `writable`), a capability that is not a boolean, an input that names no field, `outputs` that
|
|
5
|
+
* is not a function.
|
|
6
|
+
*/
|
|
7
|
+
export function checkSandbox(what, sandbox, type) {
|
|
8
|
+
const problems = [];
|
|
9
|
+
if (!type.writable)
|
|
10
|
+
problems.push("it must be writable, so apply can create and update it");
|
|
11
|
+
const capabilities = sandbox.capabilities ?? {};
|
|
12
|
+
for (const name of ["snapshot", "pause", "port"]) {
|
|
13
|
+
if (typeof capabilities[name] !== "boolean")
|
|
14
|
+
problems.push(`capabilities.${name} must be true or false`);
|
|
15
|
+
}
|
|
16
|
+
for (const input of ["image", "size"]) {
|
|
17
|
+
const path = sandbox.inputs?.[input];
|
|
18
|
+
if (typeof path !== "string" || !hasPath(type.schema, path))
|
|
19
|
+
problems.push(`${input} names no field (${path})`);
|
|
20
|
+
}
|
|
21
|
+
if (typeof sandbox.outputs !== "function")
|
|
22
|
+
problems.push("outputs must be a function of the state");
|
|
23
|
+
if (problems.length)
|
|
24
|
+
throw new Error(`${what}: its sandbox: ${problems.join("; ")}`);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=sandbox-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox-contract.js","sourceRoot":"","sources":["../src/sandbox-contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiGpC;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAC1B,IAAY,EACZ,OAAoB,EACpB,IAAiD;IAEjD,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,IAAI,CAAC,IAAI,CAAC,QAAQ;QAAE,QAAQ,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;IAC5F,MAAM,YAAY,GAAiC,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC;IAC9E,KAAK,MAAM,IAAI,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAU,EAAE,CAAC;QAC1D,IAAI,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,SAAS;YAAE,QAAQ,CAAC,IAAI,CAAC,gBAAgB,IAAI,wBAAwB,CAAC,CAAC;IAC3G,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,CAAC,OAAO,EAAE,MAAM,CAAU,EAAE,CAAC;QAC/C,MAAM,IAAI,GAAY,OAAO,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;QAC9C,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC;YAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,oBAAoB,IAAI,GAAG,CAAC,CAAC;IAClH,CAAC;IACD,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,UAAU;QAAE,QAAQ,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;IACpG,IAAI,QAAQ,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,kBAAkB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";var dr=Object.create;var Xe=Object.defineProperty;var hr=Object.getOwnPropertyDescriptor;var pr=Object.getOwnPropertyNames;var _r=Object.getPrototypeOf,mr=Object.prototype.hasOwnProperty;var S=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var gr=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of pr(e))!mr.call(t,n)&&n!==r&&Xe(t,n,{get:()=>e[n],enumerable:!(s=hr(e,n))||s.enumerable});return t};var I=(t,e,r)=>(r=t!=null?dr(_r(t)):{},gr(e||!t||!t.__esModule?Xe(r,"default",{value:t,enumerable:!0}):r,t));var k=S((ln,et)=>{"use strict";var Je=["nodebuffer","arraybuffer","fragments"],Qe=typeof Blob<"u";Qe&&Je.push("blob");et.exports={BINARY_TYPES:Je,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Qe,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var J=S((fn,oe)=>{"use strict";var{EMPTY_BUFFER:yr}=k(),we=Buffer[Symbol.species];function xr(t,e){if(t.length===0)return yr;if(t.length===1)return t[0];let r=Buffer.allocUnsafe(e),s=0;for(let n=0;n<t.length;n++){let i=t[n];r.set(i,s),s+=i.length}return s<e?new we(r.buffer,r.byteOffset,s):r}function tt(t,e,r,s,n){for(let i=0;i<n;i++)r[s+i]=t[i]^e[i&3]}function rt(t,e){for(let r=0;r<t.length;r++)t[r]^=e[r&3]}function Sr(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function Oe(t){if(Oe.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new we(t):ArrayBuffer.isView(t)?e=new we(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),Oe.readOnly=!1),e}oe.exports={concat:xr,mask:tt,toArrayBuffer:Sr,toBuffer:Oe,unmask:rt};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=require("bufferutil");oe.exports.mask=function(e,r,s,n,i){i<48?tt(e,r,s,n,i):t.mask(e,r,s,n,i)},oe.exports.unmask=function(e,r){e.length<32?rt(e,r):t.unmask(e,r)}}catch{}});var it=S((un,nt)=>{"use strict";var st=Symbol("kDone"),ve=Symbol("kRun"),Re=class{constructor(e){this[st]=()=>{this.pending--,this[ve]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[ve]()}[ve](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[st])}}};nt.exports=Re});var V=S((dn,lt)=>{"use strict";var Q=require("zlib"),ot=J(),Er=it(),{kStatusCode:at}=k(),br=Buffer[Symbol.species],wr=Buffer.from([0,0,255,255]),ce=Symbol("permessage-deflate"),N=Symbol("total-length"),j=Symbol("callback"),D=Symbol("buffers"),q=Symbol("error"),ae,Te=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!ae){let r=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ae=new Er(r)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[j];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let r=this._options,s=e.find(n=>!(r.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(r.serverMaxWindowBits===!1||typeof r.serverMaxWindowBits=="number"&&r.serverMaxWindowBits>n.server_max_window_bits)||typeof r.clientMaxWindowBits=="number"&&(typeof n.client_max_window_bits=="number"?r.clientMaxWindowBits>n.client_max_window_bits:!n.client_max_window_bits)));if(!s)throw new Error("None of the extension offers can be accepted");return r.serverNoContextTakeover&&(s.server_no_context_takeover=!0),r.clientNoContextTakeover&&(s.client_no_context_takeover=!0),typeof r.serverMaxWindowBits=="number"&&(s.server_max_window_bits=r.serverMaxWindowBits),typeof r.clientMaxWindowBits=="number"?s.client_max_window_bits=r.clientMaxWindowBits:(s.client_max_window_bits===!0||r.clientMaxWindowBits===!1)&&delete s.client_max_window_bits,s}acceptAsClient(e){let r=e[0];if(this._options.clientNoContextTakeover===!1&&r.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!r.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(r.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&r.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return r}normalizeParams(e){return e.forEach(r=>{Object.keys(r).forEach(s=>{let n=r[s];if(n.length>1)throw new Error(`Parameter "${s}" must have only a single value`);if(n=n[0],s==="client_max_window_bits"){if(n!==!0){let i=+n;if(!Number.isInteger(i)||i<8||i>15)throw new TypeError(`Invalid value for parameter "${s}": ${n}`);n=i}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${s}": ${n}`)}else if(s==="server_max_window_bits"){let i=+n;if(!Number.isInteger(i)||i<8||i>15)throw new TypeError(`Invalid value for parameter "${s}": ${n}`);n=i}else if(s==="client_no_context_takeover"||s==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${s}": ${n}`)}else throw new Error(`Unknown parameter "${s}"`);r[s]=n})}),e}decompress(e,r,s){ae.add(n=>{this._decompress(e,r,(i,o)=>{n(),s(i,o)})})}compress(e,r,s){ae.add(n=>{this._compress(e,r,(i,o)=>{n(),s(i,o)})})}_decompress(e,r,s){let n=this._isServer?"client":"server";if(!this._inflate){let i=`${n}_max_window_bits`,o=typeof this.params[i]!="number"?Q.Z_DEFAULT_WINDOWBITS:this.params[i];this._inflate=Q.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[ce]=this,this._inflate[N]=0,this._inflate[D]=[],this._inflate.on("error",vr),this._inflate.on("data",ct)}this._inflate[j]=s,this._inflate.write(e),r&&this._inflate.write(wr),this._inflate.flush(()=>{let i=this._inflate[q];if(i){this._inflate.close(),this._inflate=null,s(i);return}let o=ot.concat(this._inflate[D],this._inflate[N]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[N]=0,this._inflate[D]=[],r&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),s(null,o)})}_compress(e,r,s){let n=this._isServer?"server":"client";if(!this._deflate){let i=`${n}_max_window_bits`,o=typeof this.params[i]!="number"?Q.Z_DEFAULT_WINDOWBITS:this.params[i];this._deflate=Q.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[N]=0,this._deflate[D]=[],this._deflate.on("data",Or)}this._deflate[j]=s,this._deflate.write(e),this._deflate.flush(Q.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let i=ot.concat(this._deflate[D],this._deflate[N]);r&&(i=new br(i.buffer,i.byteOffset,i.length-4)),this._deflate[j]=null,this._deflate[N]=0,this._deflate[D]=[],r&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),s(null,i)})}};lt.exports=Te;function Or(t){this[D].push(t),this[N]+=t.length}function ct(t){if(this[N]+=t.length,this[ce]._maxPayload<1||this[N]<=this[ce]._maxPayload){this[D].push(t);return}this[q]=new RangeError("Max payload size exceeded"),this[q].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[q][at]=1009,this.removeListener("data",ct),this.reset()}function vr(t){if(this[ce]._inflate=null,this[q]){this[j](this[q]);return}t[at]=1007,this[j](t)}});var H=S((hn,le)=>{"use strict";var{isUtf8:ft}=require("buffer"),{hasBlob:Rr}=k(),Tr=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function kr(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function ke(t){let e=t.length,r=0;for(;r<e;)if((t[r]&128)===0)r++;else if((t[r]&224)===192){if(r+1===e||(t[r+1]&192)!==128||(t[r]&254)===192)return!1;r+=2}else if((t[r]&240)===224){if(r+2>=e||(t[r+1]&192)!==128||(t[r+2]&192)!==128||t[r]===224&&(t[r+1]&224)===128||t[r]===237&&(t[r+1]&224)===160)return!1;r+=3}else if((t[r]&248)===240){if(r+3>=e||(t[r+1]&192)!==128||(t[r+2]&192)!==128||(t[r+3]&192)!==128||t[r]===240&&(t[r+1]&240)===128||t[r]===244&&t[r+1]>143||t[r]>244)return!1;r+=4}else return!1;return!0}function Nr(t){return Rr&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}le.exports={isBlob:Nr,isValidStatusCode:kr,isValidUTF8:ke,tokenChars:Tr};if(ft)le.exports.isValidUTF8=function(t){return t.length<24?ke(t):ft(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=require("utf-8-validate");le.exports.isValidUTF8=function(e){return e.length<32?ke(e):t(e)}}catch{}});var Ae=S((pn,gt)=>{"use strict";var{Writable:Pr}=require("stream"),ut=V(),{BINARY_TYPES:Cr,EMPTY_BUFFER:dt,kStatusCode:Lr,kWebSocket:Ar}=k(),{concat:Ne,toArrayBuffer:Ir,unmask:Dr}=J(),{isValidStatusCode:Br,isValidUTF8:ht}=H(),fe=Buffer[Symbol.species],w=0,pt=1,_t=2,mt=3,Pe=4,Ce=5,ue=6,Le=class extends Pr{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||Cr[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Ar]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=w}_write(e,r,s){if(this._opcode===8&&this._state==w)return s();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){s(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(s)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let s=this._buffers[0];return this._buffers[0]=new fe(s.buffer,s.byteOffset+e,s.length-e),new fe(s.buffer,s.byteOffset,e)}let r=Buffer.allocUnsafe(e);do{let s=this._buffers[0],n=r.length-e;e>=s.length?r.set(this._buffers.shift(),n):(r.set(new Uint8Array(s.buffer,s.byteOffset,e),n),this._buffers[0]=new fe(s.buffer,s.byteOffset+e,s.length-e)),e-=s.length}while(e>0);return r}startLoop(e){this._loop=!0;do switch(this._state){case w:this.getInfo(e);break;case pt:this.getPayloadLength16(e);break;case _t:this.getPayloadLength64(e);break;case mt:this.getMask();break;case Pe:this.getData(e);break;case Ce:case ue:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let r=this.consume(2);if((r[0]&48)!==0){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(n);return}let s=(r[0]&64)===64;if(s&&!this._extensions[ut.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._fin=(r[0]&128)===128,this._opcode=r[0]&15,this._payloadLength=r[1]&127,this._opcode===0){if(s){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._compressed=s}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(n);return}if(s){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(r[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(n);return}this._payloadLength===126?this._state=pt:this._payloadLength===127?this._state=_t:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let r=this.consume(8),s=r.readUInt32BE(0);if(s>Math.pow(2,21)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(n);return}this._payloadLength=s*Math.pow(2,32)+r.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let r=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(r);return}this._masked?this._state=mt:this._state=Pe}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Pe}getData(e){let r=dt;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}r=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&Dr(r,this._mask)}if(this._opcode>7){this.controlMessage(r,e);return}if(this._maxFragments>0&&++this._numFragments>this._maxFragments){let s=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");e(s);return}if(this._compressed){this._state=Ce,this.decompress(r,e);return}r.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(r)),this.dataMessage(e)}decompress(e,r){this._extensions[ut.extensionName].decompress(e,this._fin,(n,i)=>{if(n)return r(n);if(i.length){if(this._messageLength+=i.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");r(o);return}this._fragments.push(i)}this.dataMessage(r),this._state===w&&this.startLoop(r)})}dataMessage(e){if(!this._fin){this._state=w;return}let r=this._messageLength,s=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=Ne(s,r):this._binaryType==="arraybuffer"?n=Ir(Ne(s,r)):this._binaryType==="blob"?n=new Blob(s):n=s,this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=w):(this._state=ue,setImmediate(()=>{this.emit("message",n,!0),this._state=w,this.startLoop(e)}))}else{let n=Ne(s,r);if(!this._skipUTF8Validation&&!ht(n)){let i=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(i);return}this._state===Ce||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=w):(this._state=ue,setImmediate(()=>{this.emit("message",n,!1),this._state=w,this.startLoop(e)}))}}controlMessage(e,r){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,dt),this.end();else{let s=e.readUInt16BE(0);if(!Br(s)){let i=this.createError(RangeError,`invalid status code ${s}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");r(i);return}let n=new fe(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!ht(n)){let i=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");r(i);return}this._loop=!1,this.emit("conclude",s,n),this.end()}this._state=w;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=w):(this._state=ue,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=w,this.startLoop(r)}))}createError(e,r,s,n,i){this._loop=!1,this._errored=!0;let o=new e(s?`Invalid WebSocket frame: ${r}`:r);return Error.captureStackTrace(o,this.createError),o.code=i,o[Lr]=n,o}};gt.exports=Le});var Be=S((mn,St)=>{"use strict";var{Duplex:_n}=require("stream"),{randomFillSync:Ur}=require("crypto"),{types:{isUint8Array:Fr}}=require("util"),yt=V(),{EMPTY_BUFFER:Wr,kWebSocket:Mr,NOOP:$r}=k(),{isBlob:z,isValidStatusCode:Gr}=H(),{mask:xt,toBuffer:F}=J(),O=Symbol("kByteLength"),jr=Buffer.alloc(4),de=8*1024,W,K=de,R=0,qr=1,Vr=2,Ie=class t{constructor(e,r,s){this._extensions=r||{},s&&(this._generateMask=s,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=R,this.onerror=$r,this[Mr]=void 0}static frame(e,r){let s,n=!1,i=2,o=!1;r.mask&&(s=r.maskBuffer||jr,r.generateMask?r.generateMask(s):(K===de&&(W===void 0&&(W=Buffer.alloc(de)),Ur(W,0,de),K=0),s[0]=W[K++],s[1]=W[K++],s[2]=W[K++],s[3]=W[K++]),o=(s[0]|s[1]|s[2]|s[3])===0,i=6);let l;typeof e=="string"?(!r.mask||o)&&r[O]!==void 0?l=r[O]:(e=Buffer.from(e),l=e.length):(l=e.length,n=r.mask&&r.readOnly&&!o);let f=l;l>=65536?(i+=8,f=127):l>125&&(i+=2,f=126);let c=Buffer.allocUnsafe(n?l+i:i);return c[0]=r.fin?r.opcode|128:r.opcode,r.rsv1&&(c[0]|=64),c[1]=f,f===126?c.writeUInt16BE(l,2):f===127&&(c[2]=c[3]=0,c.writeUIntBE(l,4,6)),r.mask?(c[1]|=128,c[i-4]=s[0],c[i-3]=s[1],c[i-2]=s[2],c[i-1]=s[3],o?[c,e]:n?(xt(e,s,c,i,l),[c]):(xt(e,s,e,0,l),[c,e])):[c,e]}close(e,r,s,n){let i;if(e===void 0)i=Wr;else{if(typeof e!="number"||!Gr(e))throw new TypeError("First argument must be a valid error code number");if(r===void 0||!r.length)i=Buffer.allocUnsafe(2),i.writeUInt16BE(e,0);else{let l=Buffer.byteLength(r);if(l>123)throw new RangeError("The message must not be greater than 123 bytes");if(i=Buffer.allocUnsafe(2+l),i.writeUInt16BE(e,0),typeof r=="string")i.write(r,2);else if(Fr(r))i.set(r,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let o={[O]:i.length,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==R?this.enqueue([this.dispatch,i,!1,o,n]):this.sendFrame(t.frame(i,o),n)}ping(e,r,s){let n,i;if(typeof e=="string"?(n=Buffer.byteLength(e),i=!1):z(e)?(n=e.size,i=!1):(e=F(e),n=e.length,i=F.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[O]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:9,readOnly:i,rsv1:!1};z(e)?this._state!==R?this.enqueue([this.getBlobData,e,!1,o,s]):this.getBlobData(e,!1,o,s):this._state!==R?this.enqueue([this.dispatch,e,!1,o,s]):this.sendFrame(t.frame(e,o),s)}pong(e,r,s){let n,i;if(typeof e=="string"?(n=Buffer.byteLength(e),i=!1):z(e)?(n=e.size,i=!1):(e=F(e),n=e.length,i=F.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[O]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:10,readOnly:i,rsv1:!1};z(e)?this._state!==R?this.enqueue([this.getBlobData,e,!1,o,s]):this.getBlobData(e,!1,o,s):this._state!==R?this.enqueue([this.dispatch,e,!1,o,s]):this.sendFrame(t.frame(e,o),s)}send(e,r,s){let n=this._extensions[yt.extensionName],i=r.binary?2:1,o=r.compress,l,f;typeof e=="string"?(l=Buffer.byteLength(e),f=!1):z(e)?(l=e.size,f=!1):(e=F(e),l=e.length,f=F.readOnly),this._firstFragment?(this._firstFragment=!1,o&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=l>=n._threshold),this._compress=o):(o=!1,i=0),r.fin&&(this._firstFragment=!0);let c={[O]:l,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:f,rsv1:o};z(e)?this._state!==R?this.enqueue([this.getBlobData,e,this._compress,c,s]):this.getBlobData(e,this._compress,c,s):this._state!==R?this.enqueue([this.dispatch,e,this._compress,c,s]):this.dispatch(e,this._compress,c,s)}getBlobData(e,r,s,n){this._bufferedBytes+=s[O],this._state=Vr,e.arrayBuffer().then(i=>{if(this._socket.destroyed){let l=new Error("The socket was closed while the blob was being read");process.nextTick(De,this,l,n);return}this._bufferedBytes-=s[O];let o=F(i);r?this.dispatch(o,r,s,n):(this._state=R,this.sendFrame(t.frame(o,s),n),this.dequeue())}).catch(i=>{process.nextTick(Hr,this,i,n)})}dispatch(e,r,s,n){if(!r){this.sendFrame(t.frame(e,s),n);return}let i=this._extensions[yt.extensionName];this._bufferedBytes+=s[O],this._state=qr,i.compress(e,s.fin,(o,l)=>{if(this._socket.destroyed){let f=new Error("The socket was closed while data was being compressed");De(this,f,n);return}this._bufferedBytes-=s[O],this._state=R,s.readOnly=!1,this.sendFrame(t.frame(l,s),n),this.dequeue()})}dequeue(){for(;this._state===R&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][O],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][O],this._queue.push(e)}sendFrame(e,r){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],r),this._socket.uncork()):this._socket.write(e[0],r)}};St.exports=Ie;function De(t,e,r){typeof r=="function"&&r(e);for(let s=0;s<t._queue.length;s++){let n=t._queue[s],i=n[n.length-1];typeof i=="function"&&i(e)}}function Hr(t,e,r){De(t,e,r),t.onerror(e)}});var Nt=S((gn,kt)=>{"use strict";var{kForOnEventAttribute:ee,kListener:Ue}=k(),Et=Symbol("kCode"),bt=Symbol("kData"),wt=Symbol("kError"),Ot=Symbol("kMessage"),vt=Symbol("kReason"),Y=Symbol("kTarget"),Rt=Symbol("kType"),Tt=Symbol("kWasClean"),P=class{constructor(e){this[Y]=null,this[Rt]=e}get target(){return this[Y]}get type(){return this[Rt]}};Object.defineProperty(P.prototype,"target",{enumerable:!0});Object.defineProperty(P.prototype,"type",{enumerable:!0});var M=class extends P{constructor(e,r={}){super(e),this[Et]=r.code===void 0?0:r.code,this[vt]=r.reason===void 0?"":r.reason,this[Tt]=r.wasClean===void 0?!1:r.wasClean}get code(){return this[Et]}get reason(){return this[vt]}get wasClean(){return this[Tt]}};Object.defineProperty(M.prototype,"code",{enumerable:!0});Object.defineProperty(M.prototype,"reason",{enumerable:!0});Object.defineProperty(M.prototype,"wasClean",{enumerable:!0});var Z=class extends P{constructor(e,r={}){super(e),this[wt]=r.error===void 0?null:r.error,this[Ot]=r.message===void 0?"":r.message}get error(){return this[wt]}get message(){return this[Ot]}};Object.defineProperty(Z.prototype,"error",{enumerable:!0});Object.defineProperty(Z.prototype,"message",{enumerable:!0});var te=class extends P{constructor(e,r={}){super(e),this[bt]=r.data===void 0?null:r.data}get data(){return this[bt]}};Object.defineProperty(te.prototype,"data",{enumerable:!0});var zr={addEventListener(t,e,r={}){for(let n of this.listeners(t))if(!r[ee]&&n[Ue]===e&&!n[ee])return;let s;if(t==="message")s=function(i,o){let l=new te("message",{data:o?i:i.toString()});l[Y]=this,he(e,this,l)};else if(t==="close")s=function(i,o){let l=new M("close",{code:i,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});l[Y]=this,he(e,this,l)};else if(t==="error")s=function(i){let o=new Z("error",{error:i,message:i.message});o[Y]=this,he(e,this,o)};else if(t==="open")s=function(){let i=new P("open");i[Y]=this,he(e,this,i)};else return;s[ee]=!!r[ee],s[Ue]=e,r.once?this.once(t,s):this.on(t,s)},removeEventListener(t,e){for(let r of this.listeners(t))if(r[Ue]===e&&!r[ee]){this.removeListener(t,r);break}}};kt.exports={CloseEvent:M,ErrorEvent:Z,Event:P,EventTarget:zr,MessageEvent:te};function he(t,e,r){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,r):t.call(e,r)}});var pe=S((yn,Pt)=>{"use strict";var{tokenChars:re}=H();function T(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function Kr(t){let e=Object.create(null),r=Object.create(null),s=!1,n=!1,i=!1,o,l,f=-1,c=-1,u=-1,a=0;for(;a<t.length;a++)if(c=t.charCodeAt(a),o===void 0)if(u===-1&&re[c]===1)f===-1&&(f=a);else if(a!==0&&(c===32||c===9))u===-1&&f!==-1&&(u=a);else if(c===59||c===44){if(f===-1)throw new SyntaxError(`Unexpected character at index ${a}`);u===-1&&(u=a);let p=t.slice(f,u);c===44?(T(e,p,r),r=Object.create(null)):o=p,f=u=-1}else throw new SyntaxError(`Unexpected character at index ${a}`);else if(l===void 0)if(u===-1&&re[c]===1)f===-1&&(f=a);else if(c===32||c===9)u===-1&&f!==-1&&(u=a);else if(c===59||c===44){if(f===-1)throw new SyntaxError(`Unexpected character at index ${a}`);u===-1&&(u=a),T(r,t.slice(f,u),!0),c===44&&(T(e,o,r),r=Object.create(null),o=void 0),f=u=-1}else if(c===61&&f!==-1&&u===-1)l=t.slice(f,a),f=u=-1;else throw new SyntaxError(`Unexpected character at index ${a}`);else if(n){if(re[c]!==1)throw new SyntaxError(`Unexpected character at index ${a}`);f===-1?f=a:s||(s=!0),n=!1}else if(i)if(re[c]===1)f===-1&&(f=a);else if(c===34&&f!==-1)i=!1,u=a;else if(c===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${a}`);else if(c===34&&t.charCodeAt(a-1)===61)i=!0;else if(u===-1&&re[c]===1)f===-1&&(f=a);else if(f!==-1&&(c===32||c===9))u===-1&&(u=a);else if(c===59||c===44){if(f===-1)throw new SyntaxError(`Unexpected character at index ${a}`);u===-1&&(u=a);let p=t.slice(f,u);s&&(p=p.replace(/\\/g,""),s=!1),T(r,l,p),c===44&&(T(e,o,r),r=Object.create(null),o=void 0),l=void 0,f=u=-1}else throw new SyntaxError(`Unexpected character at index ${a}`);if(f===-1||i||c===32||c===9)throw new SyntaxError("Unexpected end of input");u===-1&&(u=a);let d=t.slice(f,u);return o===void 0?T(e,d,r):(l===void 0?T(r,d,!0):s?T(r,l,d.replace(/\\/g,"")):T(r,l,d),T(e,o,r)),e}function Yr(t){return Object.keys(t).map(e=>{let r=t[e];return Array.isArray(r)||(r=[r]),r.map(s=>[e].concat(Object.keys(s).map(n=>{let i=s[n];return Array.isArray(i)||(i=[i]),i.map(o=>o===!0?n:`${n}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Pt.exports={format:Yr,parse:Kr}});var ye=S((En,Gt)=>{"use strict";var Zr=require("events"),Xr=require("https"),Jr=require("http"),At=require("net"),Qr=require("tls"),{randomBytes:es,createHash:ts}=require("crypto"),{Duplex:xn,Readable:Sn}=require("stream"),{URL:Fe}=require("url"),B=V(),rs=Ae(),ss=Be(),{isBlob:ns}=H(),{BINARY_TYPES:Ct,CLOSE_TIMEOUT:is,EMPTY_BUFFER:_e,GUID:os,kForOnEventAttribute:We,kListener:as,kStatusCode:cs,kWebSocket:y,NOOP:It}=k(),{EventTarget:{addEventListener:ls,removeEventListener:fs}}=Nt(),{format:us,parse:ds}=pe(),{toBuffer:hs}=J(),Dt=Symbol("kAborted"),Me=[8,13],C=["CONNECTING","OPEN","CLOSING","CLOSED"],ps=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,g=class t extends Zr{constructor(e,r,s){super(),this._binaryType=Ct[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=_e,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,r===void 0?!s||s.protocols===void 0?r=[]:Array.isArray(s.protocols)?r=s.protocols:r=[s.protocols]:Array.isArray(r)||(typeof r=="object"&&r!==null?(s=r,s.protocols===void 0?r=[]:Array.isArray(s.protocols)?r=s.protocols:r=[s.protocols]):r=[r]),Bt(this,e,r,s)):(this._autoPong=s.autoPong,this._closeTimeout=s.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Ct.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,r,s){let n=new rs({allowSynchronousEvents:s.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:s.maxBufferedChunks,maxFragments:s.maxFragments,maxPayload:s.maxPayload,skipUTF8Validation:s.skipUTF8Validation}),i=new ss(e,this._extensions,s.generateMask);this._receiver=n,this._sender=i,this._socket=e,n[y]=this,i[y]=this,e[y]=this,n.on("conclude",gs),n.on("drain",ys),n.on("error",xs),n.on("message",Ss),n.on("ping",Es),n.on("pong",bs),i.onerror=ws,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),r.length>0&&e.unshift(r),e.on("close",Wt),e.on("data",ge),e.on("end",Mt),e.on("error",$t),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[B.extensionName]&&this._extensions[B.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,r){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){E(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._sender.close(e,r,!this._isServer,s=>{s||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._readyState=t.CLOSING,Ft(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,r,s){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(s=e,e=r=void 0):typeof r=="function"&&(s=r,r=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){$e(this,e,s);return}r===void 0&&(r=!this._isServer),this._sender.ping(e||_e,r,s)}pong(e,r,s){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(s=e,e=r=void 0):typeof r=="function"&&(s=r,r=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){$e(this,e,s);return}r===void 0&&(r=!this._isServer),this._sender.pong(e||_e,r,s)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,r,s){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"&&(s=r,r={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){$e(this,e,s);return}let n={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...r};this._extensions[B.extensionName]||(n.compress=!1),this._sender.send(e||_e,n,s)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){E(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(g,"CONNECTING",{enumerable:!0,value:C.indexOf("CONNECTING")});Object.defineProperty(g.prototype,"CONNECTING",{enumerable:!0,value:C.indexOf("CONNECTING")});Object.defineProperty(g,"OPEN",{enumerable:!0,value:C.indexOf("OPEN")});Object.defineProperty(g.prototype,"OPEN",{enumerable:!0,value:C.indexOf("OPEN")});Object.defineProperty(g,"CLOSING",{enumerable:!0,value:C.indexOf("CLOSING")});Object.defineProperty(g.prototype,"CLOSING",{enumerable:!0,value:C.indexOf("CLOSING")});Object.defineProperty(g,"CLOSED",{enumerable:!0,value:C.indexOf("CLOSED")});Object.defineProperty(g.prototype,"CLOSED",{enumerable:!0,value:C.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(g.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(g.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[We])return e[as];return null},set(e){for(let r of this.listeners(t))if(r[We]){this.removeListener(t,r);break}typeof e=="function"&&this.addEventListener(t,e,{[We]:!0})}})});g.prototype.addEventListener=ls;g.prototype.removeEventListener=fs;Gt.exports=g;function Bt(t,e,r,s){let n={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:is,protocolVersion:Me[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...s,socketPath:void 0,hostname:void 0,protocol:void 0,protocols:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=n.autoPong,t._closeTimeout=n.closeTimeout,!Me.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${Me.join(", ")})`);let i;if(e instanceof Fe)i=e;else try{i=new Fe(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}i.protocol==="http:"?i.protocol="ws:":i.protocol==="https:"&&(i.protocol="wss:"),t._url=i.href;let o=i.protocol==="wss:",l=i.protocol==="ws+unix:",f;if(i.protocol!=="ws:"&&!o&&!l?f=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:l&&!i.pathname?f="The URL's pathname is empty":i.hash&&(f="The URL contains a fragment identifier"),f){let h=new SyntaxError(f);if(t._redirects===0)throw h;me(t,h);return}let c=o?443:80,u=es(16).toString("base64"),a=o?Xr.request:Jr.request,d=new Set,p;if(n.createConnection=n.createConnection||(o?ms:_s),n.defaultPort=n.defaultPort||c,n.port=i.port||c,n.host=i.hostname.startsWith("[")?i.hostname.slice(1,-1):i.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},n.path=i.pathname+i.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(p=new B({...n.perMessageDeflate,isServer:!1,maxPayload:n.maxPayload}),n.headers["Sec-WebSocket-Extensions"]=us({[B.extensionName]:p.offer()})),r.length){for(let h of r){if(typeof h!="string"||!ps.test(h)||d.has(h))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(h)}n.headers["Sec-WebSocket-Protocol"]=r.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(i.username||i.password)&&(n.auth=`${i.username}:${i.password}`),l){let h=n.path.split(":");n.socketPath=h[0],n.path=h[1]}let _;if(n.followRedirects){if(t._redirects===0){t._originalIpc=l,t._originalSecure=o,t._originalHostOrSocketPath=l?n.socketPath:i.host;let h=s&&s.headers;if(s={...s,headers:{}},h)for(let[m,b]of Object.entries(h))s.headers[m.toLowerCase()]=b}else if(t.listenerCount("redirect")===0){let h=l?t._originalIpc?n.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:i.host===t._originalHostOrSocketPath;(!h||t._originalSecure&&!o)&&(delete n.headers.authorization,delete n.headers.cookie,h||delete n.headers.host,n.auth=void 0)}n.auth&&!s.headers.authorization&&(s.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),_=t._req=a(n),t._redirects&&t.emit("redirect",t.url,_)}else _=t._req=a(n);n.timeout&&_.on("timeout",()=>{E(t,_,"Opening handshake has timed out")}),_.on("error",h=>{_===null||_[Dt]||(_=t._req=null,me(t,h))}),_.on("response",h=>{let m=h.headers.location,b=h.statusCode;if(m&&n.followRedirects&&b>=300&&b<400){if(++t._redirects>n.maxRedirects){E(t,_,"Maximum redirects exceeded");return}_.abort();let x;try{x=new Fe(m,e)}catch{let A=new SyntaxError(`Invalid URL: ${m}`);me(t,A);return}Bt(t,x,r,s)}else t.emit("unexpected-response",_,h)||E(t,_,`Unexpected server response: ${h.statusCode}`)}),_.on("upgrade",(h,m,b)=>{if(t.emit("upgrade",h),t.readyState!==g.CONNECTING)return;_=t._req=null;let x=h.headers.upgrade;if(x===void 0||x.toLowerCase()!=="websocket"){E(t,m,"Invalid Upgrade header");return}let v=ts("sha1").update(u+os).digest("base64");if(h.headers["sec-websocket-accept"]!==v){E(t,m,"Invalid Sec-WebSocket-Accept header");return}let A=h.headers["sec-websocket-protocol"],U;if(A!==void 0?d.size?d.has(A)||(U="Server sent an invalid subprotocol"):U="Server sent a subprotocol but none was requested":d.size&&(U="Server sent no subprotocol"),U){E(t,m,U);return}A&&(t._protocol=A);let Ye=h.headers["sec-websocket-extensions"];if(Ye!==void 0){if(!p){E(t,m,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Ee;try{Ee=ds(Ye)}catch{E(t,m,"Invalid Sec-WebSocket-Extensions header");return}let Ze=Object.keys(Ee);if(Ze.length!==1||Ze[0]!==B.extensionName){E(t,m,"Server indicated an extension that was not requested");return}try{p.accept(Ee[B.extensionName])}catch{E(t,m,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[B.extensionName]=p}t.setSocket(m,b,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxBufferedChunks:n.maxBufferedChunks,maxFragments:n.maxFragments,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(_,t):_.end()}function me(t,e){t._readyState=g.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function _s(t){return t.path=t.socketPath,At.connect(t)}function ms(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=At.isIP(t.host)?"":t.host),Qr.connect(t)}function E(t,e,r){t._readyState=g.CLOSING;let s=new Error(r);Error.captureStackTrace(s,E),e.setHeader?(e[Dt]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(me,t,s)):(e.destroy(s),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function $e(t,e,r){if(e){let s=ns(e)?e.size:hs(e).length;t._socket?t._sender._bufferedBytes+=s:t._bufferedAmount+=s}if(r){let s=new Error(`WebSocket is not open: readyState ${t.readyState} (${C[t.readyState]})`);process.nextTick(r,s)}}function gs(t,e){let r=this[y];r._closeFrameReceived=!0,r._closeMessage=e,r._closeCode=t,r._socket[y]!==void 0&&(r._socket.removeListener("data",ge),process.nextTick(Ut,r._socket),t===1005?r.close():r.close(t,e))}function ys(){let t=this[y];t.isPaused||t._socket.resume()}function xs(t){let e=this[y];e._socket[y]!==void 0&&(e._socket.removeListener("data",ge),process.nextTick(Ut,e._socket),e.close(t[cs])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function Lt(){this[y].emitClose()}function Ss(t,e){this[y].emit("message",t,e)}function Es(t){let e=this[y];e._autoPong&&e.pong(t,!this._isServer,It),e.emit("ping",t)}function bs(t){this[y].emit("pong",t)}function Ut(t){t.resume()}function ws(t){let e=this[y];e.readyState!==g.CLOSED&&(e.readyState===g.OPEN&&(e._readyState=g.CLOSING,Ft(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Ft(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),t._closeTimeout)}function Wt(){let t=this[y];if(this.removeListener("close",Wt),this.removeListener("data",ge),this.removeListener("end",Mt),t._readyState=g.CLOSING,!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&this._readableState.length!==0){let e=this.read(this._readableState.length);t._receiver.write(e)}t._receiver.end(),this[y]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",Lt),t._receiver.on("finish",Lt))}function ge(t){this[y]._receiver.write(t)||this.pause()}function Mt(){let t=this[y];t._readyState=g.CLOSING,t._receiver.end(),this.end()}function $t(){let t=this[y];this.removeListener("error",$t),this.on("error",It),t&&(t._readyState=g.CLOSING,this.destroy())}});var Ht=S((wn,Vt)=>{"use strict";var bn=ye(),{Duplex:Os}=require("stream");function jt(t){t.emit("close")}function vs(){!this.destroyed&&this._writableState.finished&&this.destroy()}function qt(t){this.removeListener("error",qt),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function Rs(t,e){let r=!0,s=new Os({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(i,o){let l=!o&&s._readableState.objectMode?i.toString():i;s.push(l)||t.pause()}),t.once("error",function(i){s.destroyed||(r=!1,s.destroy(i))}),t.once("close",function(){s.destroyed||s.push(null)}),s._destroy=function(n,i){if(t.readyState===t.CLOSED){i(n),process.nextTick(jt,s);return}let o=!1;t.once("error",function(f){o=!0,i(f)}),t.once("close",function(){o||i(n),process.nextTick(jt,s)}),r&&t.terminate()},s._final=function(n){if(t.readyState===t.CONNECTING){t.once("open",function(){s._final(n)});return}t._socket!==null&&(t._socket._writableState.finished?(n(),s._readableState.endEmitted&&s.destroy()):(t._socket.once("finish",function(){n()}),t.close()))},s._read=function(){t.isPaused&&t.resume()},s._write=function(n,i,o){if(t.readyState===t.CONNECTING){t.once("open",function(){s._write(n,i,o)});return}t.send(n,o)},s.on("end",vs),s.on("error",qt),s}Vt.exports=Rs});var Ge=S((On,zt)=>{"use strict";var{tokenChars:Ts}=H();function ks(t){let e=new Set,r=-1,s=-1,n=0;for(n;n<t.length;n++){let o=t.charCodeAt(n);if(s===-1&&Ts[o]===1)r===-1&&(r=n);else if(n!==0&&(o===32||o===9))s===-1&&r!==-1&&(s=n);else if(o===44){if(r===-1)throw new SyntaxError(`Unexpected character at index ${n}`);s===-1&&(s=n);let l=t.slice(r,s);if(e.has(l))throw new SyntaxError(`The "${l}" subprotocol is duplicated`);e.add(l),r=s=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(r===-1||s!==-1)throw new SyntaxError("Unexpected end of input");let i=t.slice(r,n);if(e.has(i))throw new SyntaxError(`The "${i}" subprotocol is duplicated`);return e.add(i),e}zt.exports={parse:ks}});var er=S((Rn,Qt)=>{"use strict";var Ns=require("events"),xe=require("http"),{Duplex:vn}=require("stream"),{createHash:Ps}=require("crypto"),Kt=pe(),$=V(),Cs=Ge(),Ls=ye(),{CLOSE_TIMEOUT:As,GUID:Is,kWebSocket:Ds}=k(),Bs=/^[+/0-9A-Za-z]{22}==$/,Yt=0,Zt=1,Jt=2,je=class extends Ns{constructor(e,r){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:256*1024,maxFragments:16*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:As,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Ls,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=xe.createServer((s,n)=>{let i=xe.STATUS_CODES[426];n.writeHead(426,{"Content-Length":i.length,"Content-Type":"text/plain"}),n.end(i)}),this._server.listen(e.port,e.host,e.backlog,r)):e.server&&(this._server=e.server),this._server){let s=this.emit.bind(this,"connection");this._removeListeners=Us(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,i,o)=>{this.handleUpgrade(n,i,o,s)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=Yt}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Jt){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(se,this);return}if(e&&this.once("close",e),this._state!==Zt)if(this._state=Zt,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(se,this):process.nextTick(se,this);else{let r=this._server;this._removeListeners(),this._removeListeners=this._server=null,r.close(()=>{se(this)})}}shouldHandle(e){if(this.options.path){let r=e.url.indexOf("?");if((r!==-1?e.url.slice(0,r):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,r,s,n){r.on("error",Xt);let i=e.headers["sec-websocket-key"],o=e.headers.upgrade,l=+e.headers["sec-websocket-version"];if(e.method!=="GET"){G(this,e,r,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){G(this,e,r,400,"Invalid Upgrade header");return}if(i===void 0||!Bs.test(i)){G(this,e,r,400,"Missing or invalid Sec-WebSocket-Key header");return}if(l!==13&&l!==8){G(this,e,r,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){ne(r,400);return}let f=e.headers["sec-websocket-protocol"],c=new Set;if(f!==void 0)try{c=Cs.parse(f)}catch{G(this,e,r,400,"Invalid Sec-WebSocket-Protocol header");return}let u=e.headers["sec-websocket-extensions"],a={};if(this.options.perMessageDeflate&&u!==void 0){let d=new $({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let p=Kt.parse(u);p[$.extensionName]&&(d.accept(p[$.extensionName]),a[$.extensionName]=d)}catch{G(this,e,r,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:e.headers[`${l===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(p,_,h,m)=>{if(!p)return ne(r,_||401,h,m);this.completeUpgrade(a,i,c,e,r,s,n)});return}if(!this.options.verifyClient(d))return ne(r,401)}this.completeUpgrade(a,i,c,e,r,s,n)}completeUpgrade(e,r,s,n,i,o,l){if(!i.readable||!i.writable)return i.destroy();if(i[Ds])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Yt)return ne(i,503);let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Ps("sha1").update(r+Is).digest("base64")}`],u=new this.options.WebSocket(null,void 0,this.options);if(s.size){let a=this.options.handleProtocols?this.options.handleProtocols(s,n):s.values().next().value;a&&(c.push(`Sec-WebSocket-Protocol: ${a}`),u._protocol=a)}if(e[$.extensionName]){let a=e[$.extensionName].params,d=Kt.format({[$.extensionName]:[a]});c.push(`Sec-WebSocket-Extensions: ${d}`),u._extensions=e}this.emit("headers",c,n),i.write(c.concat(`\r
|
|
2
|
+
`).join(`\r
|
|
3
|
+
`)),i.removeListener("error",Xt),u.setSocket(i,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(u),u.on("close",()=>{this.clients.delete(u),this._shouldEmitClose&&!this.clients.size&&process.nextTick(se,this)})),l(u,n)}};Qt.exports=je;function Us(t,e){for(let r of Object.keys(e))t.on(r,e[r]);return function(){for(let s of Object.keys(e))t.removeListener(s,e[s])}}function se(t){t._state=Jt,t.emit("close")}function Xt(){this.destroy()}function ne(t,e,r,s){r=r||xe.STATUS_CODES[e],s={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...s},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${xe.STATUS_CODES[e]}\r
|
|
4
|
+
`+Object.keys(s).map(n=>`${n}: ${s[n]}`).join(`\r
|
|
5
|
+
`)+`\r
|
|
6
|
+
\r
|
|
7
|
+
`+r)}function G(t,e,r,s,n,i){if(t.listenerCount("wsClientError")){let o=new Error(n);Error.captureStackTrace(o,G),t.emit("wsClientError",o,r,e)}else ne(r,s,n,i)}});var lr=require("node:http"),fr=require("node:os"),ze=require("node:timers/promises");var Fs=I(Ht(),1),Ws=I(pe(),1),Ms=I(V(),1),$s=I(Ae(),1),Gs=I(Be(),1),js=I(Ge(),1),qs=I(ye(),1),qe=I(er(),1);var nr=require("node:child_process"),L=require("node:fs/promises"),X=require("node:path"),Se=require("node:stream");function ir(t,e,r){let s=new Set,n=i=>(0,X.resolve)(e,i);return{id:t,async run(i,{cwd:o,env:l,stdin:f,signal:c}={}){let u=(0,nr.spawn)("bash",["-c",i],{cwd:n(o??"."),env:{...r,...l},stdio:"pipe",detached:!0}),a=u.pid;a!==void 0&&s.add(a),u.stdin.on("error",()=>{}),f||u.stdin.end();let d=!1,p=new Promise(m=>{u.on("error",()=>m({exitCode:127})),u.on("exit",b=>{d=!0,a!==void 0&&!rr(a)&&s.delete(a);let x=()=>m({exitCode:b??1});u.on("close",x),setTimeout(x,Vs).unref()})}),_=(m="SIGKILL")=>{a!==void 0&&(!d||rr(a))&&sr(a,m)},h=()=>_();return c?.aborted&&h(),c?.addEventListener("abort",h,{once:!0}),p.then(()=>c?.removeEventListener("abort",h)),{stdin:Se.Writable.toWeb(u.stdin),stdout:tr(u.stdout),stderr:tr(u.stderr),wait:()=>p,kill:_}},read:i=>(0,L.readFile)(n(i)).catch(()=>null),async write(i,o,{mode:l}={}){await(0,L.mkdir)((0,X.dirname)(n(i)),{recursive:!0}),await(0,L.writeFile)(n(i),o),l!==void 0&&await(0,L.chmod)(n(i),l)},expose:async i=>({url:`http://127.0.0.1:${i}`}),async stop(){for(let i of s)sr(i);s.clear()}}}var Vs=200,tr=t=>Se.Readable.toWeb(t);function rr(t){try{return process.kill(-t,0),!0}catch{return!1}}function sr(t,e="SIGKILL"){try{process.kill(-t,e)}catch{}}var or="/runner/health";function Ve(t,e,r){let s=new Uint8Array(5+r.length);return new DataView(s.buffer).setUint32(0,t),s[4]=e,s.set(r,5),s}var ar=t=>({id:new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(0),stream:t[4],bytes:t.subarray(5)});var Hs=["text","number","boolean","date","person"];var Pn=`${Hs.map(t=>`"${t}"`).join(", ")}, { type, optional: true } or { enum: [...] }`;var zs=/^[\w-]{1,64}$/,Cn=new RegExp(`^change:(${zs.source.slice(1,-1)})(?:~\\d+)?$`);var Ks="anonymous";var Ln=Object.freeze({id:Ks,groups:[]});var He=t=>t instanceof Error?t.message:String(t);var en=Number(process.env.SANOMA_RUNNER_PORT??7700),tn=process.env.SANOMA_RUNNER_HOST??"0.0.0.0",rn=50,sn=1<<20,nn=3e4,{SANOMA_RUNNER_PORT:Mn,SANOMA_RUNNER_HOST:$n,...on}=process.env,ie=ir("runner",(0,fr.homedir)(),on),Ke=(0,lr.createServer)((t,e)=>{if(t.url!==or)return void e.writeHead(404).end();e.writeHead(200,{"content-type":"application/json"}).end(JSON.stringify({protocol:2,pid:process.pid}))});new qe.default({server:Ke}).on("connection",an).on("error",t=>console.error(`the runner's WebSocket server: ${t.message}`));Ke.listen(en,tn,()=>{let{address:t,port:e}=Ke.address();console.log(`sanoma runner listening on ${t}:${e}`)});process.on("SIGTERM",()=>{ie.stop().finally(()=>process.exit(0))});function an(t){let e=new Map,r=new Map,s=new Map,n=a=>t.readyState===t.OPEN&&t.send(a),i=a=>n(JSON.stringify(a)),o=setInterval(()=>t.ping(),nn);t.on("error",a=>console.error(`a connection: ${a.message}`)),t.on("close",()=>{clearInterval(o);for(let a of r.keys())c(a)}),t.on("message",(a,d)=>{if(d)return a.length<5?i({op:"error",message:"a binary frame is an id, a stream and bytes"}):f(ar(a));let p;try{p=JSON.parse(String(a))}catch{return i({op:"error",message:"a text frame is JSON"})}if(typeof p!="object"||p===null)return i({op:"error",message:"a request is an object"});l(p).catch(_=>i({op:"error",id:p.id,message:He(_)}))});async function l(a){switch(a.op){case"run":{let{id:d,command:p,cwd:_,env:h,stdin:m}=a,b=ie.run(p,{cwd:_,env:h,stdin:m});if(e.set(d,b),m){let x=b.then(v=>v.stdin.getWriter());x.catch(()=>{}),r.set(d,x)}try{let x=await b,v={at:Date.now(),done:!1},A=Promise.all([u(d,1,x.stdout,v),u(d,2,x.stderr,v)]).finally(()=>v.done=!0),{exitCode:U}=await x.wait();for(v.at=Date.now();!v.done&&Date.now()-v.at<rn;)await Promise.race([A,(0,ze.setTimeout)(10)]);return i({op:"exit",id:d,code:U})}finally{e.delete(d),r.delete(d)}}case"stdin-end":return c(a.id);case"kill":return e.get(a.id)?.then(d=>d.kill(a.signal));case"read":{let d=await ie.read(a.path);return d?n(Ve(a.id,3,d)):i({op:"absent",id:a.id})}case"write":return s.set(a.id,a);case"stop":return await ie.stop(),i({op:"ok",id:a.id});default:throw new Error(`no such request: ${a.op}`)}}function f({id:a,stream:d,bytes:p}){if(d===0)return void r.get(a)?.then(h=>h.write(p)).catch(()=>{});let _=s.get(a);d!==3||!_||(s.delete(a),ie.write(_.path,p,{mode:_.mode}).then(()=>i({op:"ok",id:a}),h=>i({op:"error",id:a,message:He(h)})))}function c(a){let d=r.get(a);return r.delete(a),d?.then(p=>p.close()).catch(()=>{})}async function u(a,d,p,_){try{for await(let h of p){for(;t.readyState===t.OPEN&&t.bufferedAmount>sn;)_.at=Date.now(),await(0,ze.setTimeout)(10);n(Ve(a,d,h)),_.at=Date.now()}}catch{}}}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { SanomaError } from "./errors.ts";
|
|
2
|
+
import { type Fake, type ResourceFake } from "./fake.ts";
|
|
3
|
+
import type { ConnectionCatalog, ConnectionRef, ConnectionSnapshot } from "./connection.ts";
|
|
4
|
+
import { type LedgerRecord } from "./ledger.ts";
|
|
5
|
+
import type { Run } from "./run.ts";
|
|
6
|
+
import { type Given, type Scenario } from "./scenario.ts";
|
|
7
|
+
/** Declared accounts get synthetic identities in each run; no production metadata or secrets are read. */
|
|
8
|
+
export declare function sandboxConnection(catalog: ConnectionCatalog, runId: string): (vendor: string, ref?: ConnectionRef) => ConnectionSnapshot | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* The error a sandbox run of the scenario fails with when it seeds a resource of a vendor whose
|
|
11
|
+
* fake (one of `fakes`, by vendor) holds none, or whose connector attaches no fake; undefined
|
|
12
|
+
* when every vendor it seeds a resource of has a `ResourceFake`. Pure.
|
|
13
|
+
*/
|
|
14
|
+
export declare function missingResourceFake(scenario: Pick<Scenario, "name" | "given">, fakes: ReadonlyMap<string, Fake<unknown>>): SanomaError | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Seeds one resource into the run's own fake of its vendor: put with its fields, or removed.
|
|
17
|
+
* A seed the fake refuses (a field the provider's shape lacks, say) fails the scenario, naming
|
|
18
|
+
* the step, as the other seed-time refusals do.
|
|
19
|
+
*/
|
|
20
|
+
export declare function seedResource(scenario: string, copy: ResourceFake, given: Extract<Given, {
|
|
21
|
+
resource: string;
|
|
22
|
+
}>): Extract<LedgerRecord, {
|
|
23
|
+
type: "scenario.seeded";
|
|
24
|
+
}>["seeds"][number];
|
|
25
|
+
/**
|
|
26
|
+
* Seeds a sandbox run of the scenario `name`, from the worker, in one step: reads the scenario,
|
|
27
|
+
* checks that it runs this workflow, makes the run's own fakes (each vendor's maker, called once
|
|
28
|
+
* for the run), checks that every operation the workflow uses or the scenario seeds has one and
|
|
29
|
+
* that every resource it seeds has a fake holding resources, calls each `Given` operation
|
|
30
|
+
* through them, puts or removes each `Given` resource in them, injects the faults into them,
|
|
31
|
+
* then puts their functions on the run. The run then calls those only, so sandbox runs share no
|
|
32
|
+
* state when the makers make a new fake each. The step's checkpoint never stands in for them: a
|
|
33
|
+
* run whose seeding is replayed from it has none, and fails, since a sandbox run does not
|
|
34
|
+
* survive a worker restart.
|
|
35
|
+
*/
|
|
36
|
+
export declare function seedSandbox(run: Run, name: string, input: unknown): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* A seeded sandbox run's checks against its ledger so far, written for the app (`writeRunChecks`):
|
|
39
|
+
* Cucumber runs its scenario's Then steps over the feature file as it reads now, which the agent
|
|
40
|
+
* may have changed since. Called when the run waits and when it ends (`recordSandboxChecks`); a
|
|
41
|
+
* check met is settled when what it expects stays so (a call made, a decision recorded), and every
|
|
42
|
+
* one once the run has ended, which the app reads from the run's status. No step and no ledger
|
|
43
|
+
* record, so a replay neither depends on it nor differs by it: a failure is warned about, and the
|
|
44
|
+
* run goes on.
|
|
45
|
+
*/
|
|
46
|
+
export declare function recordChecks(run: Run, name: string): Promise<void>;
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { DBOS } from "@dbos-inc/dbos-sdk";
|
|
2
|
+
import { indexDrivers, sandboxDrivers } from "./config.js";
|
|
3
|
+
import { CALL_WORKFLOW, CallInput } from "./call-workflow.js";
|
|
4
|
+
import { opIdsOf } from "./define.js";
|
|
5
|
+
import { SanomaError } from "./errors.js";
|
|
6
|
+
import { connectionFakes } from "./fake.js";
|
|
7
|
+
import { entry, write } from "./ledger.js";
|
|
8
|
+
import { memorySecrets } from "./secret.js";
|
|
9
|
+
import { writeRunChecks } from "./db.js";
|
|
10
|
+
import { warn } from "./log.js";
|
|
11
|
+
import { check, loadScenarios } from "./scenario.js";
|
|
12
|
+
import { errorMessage, notLoaded } from "./shared.js";
|
|
13
|
+
/*
|
|
14
|
+
* What a worker does for a sandbox run, imported only when it starts one: kept apart from
|
|
15
|
+
* `scenario.ts`, which the app reads too, because it needs DBOS and the ledger.
|
|
16
|
+
*/
|
|
17
|
+
/** True for a fake that holds resources (`ResourceFake`, as `sanoma/internal/bridge`'s `tfFake` is). */
|
|
18
|
+
const holdsResources = (fake) => "override" in fake && "put" in fake && "remove" in fake;
|
|
19
|
+
/** Declared accounts get synthetic identities in each run; no production metadata or secrets are read. */
|
|
20
|
+
export function sandboxConnection(catalog, runId) {
|
|
21
|
+
return (vendor, ref) => {
|
|
22
|
+
const definitions = [...catalog.definitions.values()].filter((d) => d.vendor === vendor);
|
|
23
|
+
const selected = ref ?? definitions.find((d) => d.default);
|
|
24
|
+
if (!selected && !Object.keys(catalog.methods.get(vendor) ?? {}).length)
|
|
25
|
+
return undefined;
|
|
26
|
+
const definition = selected && catalog.definitions.get(selected.$connection);
|
|
27
|
+
if (!definition || selected?.vendor !== vendor || definition.vendor !== vendor)
|
|
28
|
+
throw new SanomaError("invalid_input", "Select an explicitly declared sandbox connection");
|
|
29
|
+
const revision = `sandbox:${runId}:${definition.$connection}`;
|
|
30
|
+
if (selected.revision !== undefined && selected.revision !== revision)
|
|
31
|
+
throw new SanomaError("invalid_input", "A sandbox cannot use a production connection revision");
|
|
32
|
+
return {
|
|
33
|
+
id: definition.$connection,
|
|
34
|
+
vendor,
|
|
35
|
+
method: definition.method,
|
|
36
|
+
account: definition.account ?? `fake:${definition.$connection}`,
|
|
37
|
+
scopes: [...definition.scopes],
|
|
38
|
+
revision,
|
|
39
|
+
definition: revision,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The error a sandbox run of the scenario fails with when it seeds a resource of a vendor whose
|
|
45
|
+
* fake (one of `fakes`, by vendor) holds none, or whose connector attaches no fake; undefined
|
|
46
|
+
* when every vendor it seeds a resource of has a `ResourceFake`. Pure.
|
|
47
|
+
*/
|
|
48
|
+
export function missingResourceFake(scenario, fakes) {
|
|
49
|
+
const plain = scenario.given.filter((g) => {
|
|
50
|
+
if (!("resource" in g))
|
|
51
|
+
return false;
|
|
52
|
+
const fake = fakes.get(g.vendor);
|
|
53
|
+
return !fake || !holdsResources(fake);
|
|
54
|
+
});
|
|
55
|
+
if (plain.length === 0)
|
|
56
|
+
return undefined;
|
|
57
|
+
const resources = [...new Set(plain.map((g) => g.resource))];
|
|
58
|
+
const vendors = [...new Set(plain.map((g) => g.vendor))];
|
|
59
|
+
const why = vendors.map((v) => fakes.has(v) ? `${v}'s fake holds no resources (it is not a tfFake)` : `${v}'s connector attaches no fake`);
|
|
60
|
+
return new SanomaError("invalid_input", `Scenario "${scenario.name}" seeds ${resources.join(", ")}, but ${why.join("; ")}`, {
|
|
61
|
+
scenario: scenario.name,
|
|
62
|
+
resources,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Seeds one resource into the run's own fake of its vendor: put with its fields, or removed.
|
|
67
|
+
* A seed the fake refuses (a field the provider's shape lacks, say) fails the scenario, naming
|
|
68
|
+
* the step, as the other seed-time refusals do.
|
|
69
|
+
*/
|
|
70
|
+
export function seedResource(scenario, copy, given) {
|
|
71
|
+
const { resource, type, name } = given;
|
|
72
|
+
try {
|
|
73
|
+
if ("gone" in given) {
|
|
74
|
+
copy.remove(type, name);
|
|
75
|
+
return { resource, name, gone: true };
|
|
76
|
+
}
|
|
77
|
+
copy.put(type, name, given.fields);
|
|
78
|
+
return { resource, name, fields: given.fields };
|
|
79
|
+
}
|
|
80
|
+
catch (err) {
|
|
81
|
+
throw new SanomaError("invalid_input", `Scenario "${scenario}" cannot seed ${resource} "${name}" ("${given.step}"): ${errorMessage(err)}`, { scenario, step: given.step, resource, name }, { cause: err });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Seeds a sandbox run of the scenario `name`, from the worker, in one step: reads the scenario,
|
|
86
|
+
* checks that it runs this workflow, makes the run's own fakes (each vendor's maker, called once
|
|
87
|
+
* for the run), checks that every operation the workflow uses or the scenario seeds has one and
|
|
88
|
+
* that every resource it seeds has a fake holding resources, calls each `Given` operation
|
|
89
|
+
* through them, puts or removes each `Given` resource in them, injects the faults into them,
|
|
90
|
+
* then puts their functions on the run. The run then calls those only, so sandbox runs share no
|
|
91
|
+
* state when the makers make a new fake each. The step's checkpoint never stands in for them: a
|
|
92
|
+
* run whose seeding is replayed from it has none, and fails, since a sandbox run does not
|
|
93
|
+
* survive a worker restart.
|
|
94
|
+
*/
|
|
95
|
+
export async function seedSandbox(run, name, input) {
|
|
96
|
+
const { state } = run;
|
|
97
|
+
let copies;
|
|
98
|
+
// The run's secrets, in memory as its fakes are: seeding and its calls share them.
|
|
99
|
+
const secrets = memorySecrets();
|
|
100
|
+
const { seeds } = await DBOS.runStep(async () => {
|
|
101
|
+
// Read in the step, so a recovered run never reads a feature file edited or renamed since.
|
|
102
|
+
const { scenarios, errors } = await loadScenarios(state);
|
|
103
|
+
const scenario = scenarios.find((s) => s.name === name);
|
|
104
|
+
if (!scenario) {
|
|
105
|
+
throw new SanomaError("invalid_input", `No scenario named "${name}"${notLoaded(errors)}`, {
|
|
106
|
+
scenario: name,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if (scenario.workflow !== run.workflow) {
|
|
110
|
+
throw new SanomaError("invalid_input", `Scenario "${name}" runs ${scenario.workflow}, not ${run.workflow}`, {
|
|
111
|
+
scenario: name,
|
|
112
|
+
workflow: scenario.workflow,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
const fakes = new Map([...state.fakes].map(([vendor, make]) => [vendor, make()]));
|
|
116
|
+
const named = new Map([...state.fakes]
|
|
117
|
+
.filter(([vendor]) => Object.keys(state.connections.catalog.methods.get(vendor) ?? {}).length)
|
|
118
|
+
.map(([vendor, make]) => [vendor, connectionFakes(make)]));
|
|
119
|
+
const select = sandboxConnection(state.connections.catalog, run.id);
|
|
120
|
+
run.fakeConnection = select;
|
|
121
|
+
// The built-ins first, so a connector's fake that implements one of their operations wins.
|
|
122
|
+
const drivers = indexDrivers([...sandboxDrivers(state.ops), ...Array.from(fakes, ([vendor, f]) => named.get(vendor)?.driver ?? f.driver)], state.ops, { sandbox: true });
|
|
123
|
+
// The built-in call workflow selects exactly one operation. Other direct operations
|
|
124
|
+
// (including live connection mutations) need no fake unless this scenario calls them.
|
|
125
|
+
const uses = run.workflow === CALL_WORKFLOW ? [CallInput.parse(input).op] : opIdsOf(state.workflows.get(run.workflow));
|
|
126
|
+
const seeding = scenario.given.flatMap((g) => ("op" in g ? [g.op] : []));
|
|
127
|
+
const missing = [...new Set([...uses, ...seeding])].filter((id) => !drivers.has(id));
|
|
128
|
+
if (missing.length) {
|
|
129
|
+
throw new SanomaError("invalid_input", `A sandbox run of ${run.workflow} has no fake for ${missing.join(", ")}: no fake its connectors attach implements ${missing.length > 1 ? "them" : "it"}`, { scenario: name, missing });
|
|
130
|
+
}
|
|
131
|
+
const plain = missingResourceFake(scenario, fakes);
|
|
132
|
+
if (plain)
|
|
133
|
+
throw plain;
|
|
134
|
+
const seeded = [];
|
|
135
|
+
for (const [i, given] of scenario.given.entries()) {
|
|
136
|
+
if ("fault" in given)
|
|
137
|
+
continue;
|
|
138
|
+
if ("op" in given) {
|
|
139
|
+
const connection = select(state.ops.get(given.op).vendor, given.connection);
|
|
140
|
+
const call = {
|
|
141
|
+
idempotencyKey: `${run.id}:seed:${i}`,
|
|
142
|
+
runId: run.id,
|
|
143
|
+
opId: given.op,
|
|
144
|
+
attempt: 1,
|
|
145
|
+
secrets,
|
|
146
|
+
connection,
|
|
147
|
+
};
|
|
148
|
+
const output = await drivers.get(given.op)(given.input, call);
|
|
149
|
+
seeded.push({ op: given.op, input: given.input, output });
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
// Checked above: the vendor's fake holds resources.
|
|
153
|
+
const selected = select(given.vendor, given.connection);
|
|
154
|
+
const fake = selected
|
|
155
|
+
? named.get(given.vendor).account({ vendor: given.vendor, $connection: selected.id })
|
|
156
|
+
: fakes.get(given.vendor);
|
|
157
|
+
seeded.push(seedResource(name, fake, given));
|
|
158
|
+
}
|
|
159
|
+
for (const given of scenario.given) {
|
|
160
|
+
if ("fault" in given) {
|
|
161
|
+
const vendor = state.ops.get(given.op).vendor;
|
|
162
|
+
const selected = select(vendor, given.connection);
|
|
163
|
+
const fake = selected ? named.get(vendor).account({ vendor, $connection: selected.id }) : fakes.get(vendor);
|
|
164
|
+
fake[given.fault](given.op);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
copies = drivers;
|
|
168
|
+
return { seeds: seeded };
|
|
169
|
+
}, { name: "sandbox:seed" });
|
|
170
|
+
if (!copies) {
|
|
171
|
+
// Replayed from its checkpoint (after a worker restart, or in a fork), so the run has no fakes.
|
|
172
|
+
// The records written before the restart hold the seqs from here on: the failure goes after them.
|
|
173
|
+
run.seq = Math.max(run.seq, ...(await state.ledger.read(run.id)).map((r) => r.seq + 1));
|
|
174
|
+
throw new SanomaError("invalid_input", `Sandbox run ${run.id} was interrupted by a worker restart and the fakes' state is gone; start the scenario again`, { runId: run.id, scenario: name });
|
|
175
|
+
}
|
|
176
|
+
run.fakeDrivers = copies;
|
|
177
|
+
run.fakeSecrets = secrets;
|
|
178
|
+
await write(run, entry(run, { type: "scenario.seeded", scenario: name, seeds }));
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* A seeded sandbox run's checks against its ledger so far, written for the app (`writeRunChecks`):
|
|
182
|
+
* Cucumber runs its scenario's Then steps over the feature file as it reads now, which the agent
|
|
183
|
+
* may have changed since. Called when the run waits and when it ends (`recordSandboxChecks`); a
|
|
184
|
+
* check met is settled when what it expects stays so (a call made, a decision recorded), and every
|
|
185
|
+
* one once the run has ended, which the app reads from the run's status. No step and no ledger
|
|
186
|
+
* record, so a replay neither depends on it nor differs by it: a failure is warned about, and the
|
|
187
|
+
* run goes on.
|
|
188
|
+
*/
|
|
189
|
+
export async function recordChecks(run, name) {
|
|
190
|
+
if (!run.fakeDrivers)
|
|
191
|
+
return;
|
|
192
|
+
const { state } = run;
|
|
193
|
+
try {
|
|
194
|
+
const checks = await checksOf(run, name).catch((err) => ({ error: errorMessage(err) }));
|
|
195
|
+
await writeRunChecks(await state.db(), run.id, checks);
|
|
196
|
+
}
|
|
197
|
+
catch (err) {
|
|
198
|
+
warn(`run ${run.id}: could not record its checks against scenario "${name}": ${errorMessage(err)}`);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
async function checksOf({ id, state }, name) {
|
|
202
|
+
const loaded = await loadScenarios(state);
|
|
203
|
+
const scenario = loaded.scenarios.find((s) => s.name === name);
|
|
204
|
+
if (!scenario)
|
|
205
|
+
return { error: `The feature files no longer have scenario "${name}"${notLoaded(loaded.errors)}` };
|
|
206
|
+
const checks = await check(state, scenario, await state.ledger.read(id));
|
|
207
|
+
return {
|
|
208
|
+
checks: checks.map((c, i) => {
|
|
209
|
+
const e = scenario.expect[i];
|
|
210
|
+
// Met once: a call made, or a decision recorded, stays made. Every one is, once the run has ended (`runDetail`).
|
|
211
|
+
return { ...c, settled: c.ok && (("called" in e && e.called === true) || "decision" in e) };
|
|
212
|
+
}),
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=sandbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,E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