@wular/coder 0.4.0 → 0.4.2
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 +69 -70
- package/dist/{add-ej0X9e3a.js → add-C2y-mVzl.js} +1 -1
- package/dist/{add-U-pty9qJ.js → add-CLYTF_up.js} +1 -1
- package/dist/{add-CE-70LFs.js → add-DRsPpQFl.js} +1 -1
- package/dist/{add-BxpLHnvD.js → add-DkpUwhtO.js} +1 -1
- package/dist/{add-json-CEa-6luW.js → add-json-5uPnWPoD.js} +1 -1
- package/dist/{agent-BsYx3Odz.js → agent-hw3zKw8y.js} +1 -1
- package/dist/{agent-JdtZozvP.js → agent-r5mMcehf.js} +1 -1
- package/dist/{alias-DX-Bm86x.js → alias-_0Rwf2cA.js} +1 -1
- package/dist/{app-BT5f7zL5.js → app-oE8G1-bi.js} +1 -1
- package/dist/{approvals-C-AvFt6s.js → approvals-DbVrsxec.js} +1 -1
- package/dist/{approve-DOmpQRNd.js → approve-DeAhFL-m.js} +1 -1
- package/dist/{apps-CjfrZyM5.js → apps-eujHiNca.js} +1 -1
- package/dist/{archive-BziJ1rQ-.js → archive-BCUfymIB.js} +1 -1
- package/dist/{archive-BUB8gFKD.js → archive-DZ6vpMHb.js} +1 -1
- package/dist/{archive-sweep-CtBcARgN.js → archive-sweep-Cxbh8yAI.js} +1 -1
- package/dist/{ask-dE3U3ss2.js → ask-BU2WVxVM.js} +1 -1
- package/dist/auth-CBWTmAPA.js +1 -0
- package/dist/{auth-BFny--17.js → auth-Dmn2U7rr.js} +1 -1
- package/dist/{cli-BilSDkvE.js → cli-DWCR7iqa.js} +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +1 -1
- package/dist/{config-Da_cwoxI.js → config-12pK4qW7.js} +1 -1
- package/dist/{create-C_iMJV4Y.js → create-D3f6q0Yq.js} +1 -1
- package/dist/credentials-l6dsrZLL.js +1 -0
- package/dist/dash/manifest.json +841 -955
- package/dist/dash/public/assets/chunks/{agent-pills-69c965aae1737cef.js → agent-pills-dd0b7643e125bbf1.js} +1 -1
- package/dist/dash/public/assets/chunks/{agent-settings-form-a1ce70812eea3f20.js → agent-settings-form-45ae6aeaaed2b568.js} +1 -1
- package/dist/dash/public/assets/chunks/{agents-grid-f62180478e43c192.js → agents-grid-b906da80c31fc035.js} +1 -1
- package/dist/dash/public/assets/chunks/{badge-d07f35e9abc80e14.js → badge-676b01e0c615bf7b.js} +1 -1
- package/dist/dash/public/assets/chunks/{card-be04148b64223a52.js → card-e0901d68b79dfa93.js} +1 -1
- package/dist/dash/public/assets/chunks/{combo-32c321a7a84fa902.js → combo-952a457d52360d88.js} +1 -1
- package/dist/dash/public/assets/chunks/{composer-aec9c3c691f1f79a.js → composer-49f9e7c5c4dfda3b.js} +1 -1
- package/dist/dash/public/assets/chunks/composer-f331d00837143aee.js +1 -0
- package/dist/dash/public/assets/chunks/{confirm-b4e2c16aef4b3431.js → confirm-f2fe4ba9905a89c6.js} +1 -1
- package/dist/dash/public/assets/chunks/{connect-apps-a5a63941e287c33f.js → connect-apps-661f3b3a85f1776a.js} +1 -1
- package/dist/dash/public/assets/chunks/{connect-repositories-e4c049b5b4384623.js → connect-repositories-5389ec8701a3deac.js} +1 -1
- package/dist/dash/public/assets/chunks/{credentials-list-2b7d0c771b89f9c5.js → credentials-list-e6177d0943517929.js} +2 -2
- package/dist/dash/public/assets/chunks/{custom-range-53b70e0d9eeae84e.js → custom-range-03ba6fb2ade7d282.js} +1 -1
- package/dist/dash/public/assets/chunks/{editor-691d2bcecb1ecb87.js → editor-34cb529d6d8a4b09.js} +2 -2
- package/dist/dash/public/assets/chunks/{engines-list-a5fe1671601ce3b0.js → engines-list-2f1acee3ecc8461a.js} +1 -1
- package/dist/dash/public/assets/chunks/{field-9e12e5fc8774b6e5.js → field-901f1f35c18c39c9.js} +1 -1
- package/dist/dash/public/assets/chunks/{heads-4041a925d63ab116.js → heads-1570a3a6db331979.js} +1 -1
- package/dist/dash/public/assets/chunks/{instructions-4e0d18b9b40edbd7.js → instructions-052fa45a9daf6db6.js} +1 -1
- package/dist/dash/public/assets/chunks/instructions-d0a4b0d95009c262.js +1 -0
- package/dist/dash/public/assets/chunks/{list-d7eb9e02cf261fbe.js → list-87b359bebd26986a.js} +1 -1
- package/dist/dash/public/assets/chunks/{mcp-list-a450533109045ef5.js → mcp-list-b42f0d2ee463b37d.js} +1 -1
- package/dist/dash/public/assets/chunks/{models-list-1e273c6843858148.js → models-list-0669d26fd662aec3.js} +1 -1
- package/dist/dash/public/assets/chunks/{platform-actions-87f3f76ec1b840cb.js → platform-actions-c92ca3c6198a9387.js} +1 -1
- package/dist/dash/public/assets/chunks/{runners-list-fc7cdae4fa93e78b.js → runners-list-9fffa50432c470c9.js} +1 -1
- package/dist/dash/public/assets/chunks/{segmented-6091dfb2f954799f.js → segmented-358ff2b4992b8384.js} +1 -1
- package/dist/dash/public/assets/chunks/{select-dd09a6b9544cfde2.js → select-1013702bdfb1ade4.js} +1 -1
- package/dist/dash/public/assets/chunks/{sentinel-ff7143a47fd22835.js → sentinel-c972a33dc69a5135.js} +1 -1
- package/dist/dash/public/assets/chunks/shared-init-20e199043ff5d00f.js +2 -0
- package/dist/dash/public/assets/chunks/shared-init-88cce66bb3cfe1e5.js +5 -0
- package/dist/dash/public/assets/chunks/{tail-5a5bfcd308535d70.js → tail-7c27aab8ba268bd9.js} +1 -1
- package/dist/dash/public/assets/chunks/{task-actions-7919ca0e901131f4.js → task-actions-a9603d520434baab.js} +1 -1
- package/dist/dash/public/assets/chunks/{task-view-e8a0f99c992fa11e.js → task-view-f7039cb330bcb0b5.js} +3 -3
- package/dist/dash/public/assets/chunks/{tasks-list-7b72f5b295349532.js → tasks-list-2a905b4a0c3a9042.js} +1 -1
- package/dist/dash/public/assets/chunks/{toolbar-9b18a5d26dee37c3.js → toolbar-f964fa864699f095.js} +1 -1
- package/dist/dash/public/assets/chunks/{versions-list-8cdf3a41c56b2152.js → versions-list-fc2e0d2a7382e049.js} +1 -1
- package/dist/dash/public/assets/dash-49ca85b59ac65c20.css +1 -0
- package/dist/dash/public/assets/dash-account-96fc41be318839fa.css +1 -0
- package/dist/dash/public/assets/dash-agents-290a7b21c7dc0c92.css +1 -0
- package/dist/dash/public/assets/dash-agents-new-a7a07bf4ebda24c2.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-69a72fb0bbd14cc2.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-edit-397bdfb2f0ca328c.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-platforms-a7b3b7247c27f1d2.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-settings-8389b7d0555e8ccf.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-tasks-5987b8aea5e8f30d.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-usage-19abc69e1d4e6b0a.css +1 -0
- package/dist/dash/public/assets/dash-settings-53b8e6a8f656fa1a.css +1 -0
- package/dist/dash/public/assets/dash-settings-param-tab-ac61fdfdd6fd533f.css +1 -0
- package/dist/dash/public/assets/dash-tasks-cc0b1d32874b731c.css +1 -0
- package/dist/dash/public/assets/dash-tasks-param-id-02b8c7bd99cc1090.css +1 -0
- package/dist/dash/public/assets/dash-usage-884943221f76ad93.css +1 -0
- package/dist/dash/public/assets/pnext-client-17ba55bb57a1f4da.js +1 -0
- package/dist/dash/public/assets/{pnext-client-0b6720fdec66eeb0.js → pnext-client-1afa4148bea69ad2.js} +1 -1
- package/dist/dash/public/assets/{pnext-client-4cf2e27d0b9c0365.js → pnext-client-2693db10b197ade1.js} +1 -1
- package/dist/dash/public/assets/pnext-client-43f52a07f8067b1b.js +1 -0
- package/dist/dash/public/assets/pnext-client-4594b693fe612835.js +1 -0
- package/dist/dash/public/assets/pnext-client-73f73e24f8141fb6.js +1 -0
- package/dist/dash/public/assets/pnext-client-7574da4651b40eae.js +1 -0
- package/dist/dash/public/assets/pnext-client-7b3a2c1092cbbb02.js +1 -0
- package/dist/dash/public/assets/pnext-client-816fe5fc96d3f768.js +1 -0
- package/dist/dash/public/assets/pnext-client-86cb956b448b0887.js +1 -0
- package/dist/dash/public/assets/pnext-client-8b64e3c030164288.js +1 -0
- package/dist/dash/public/assets/pnext-client-8f6161084c595a22.js +1 -0
- package/dist/dash/public/assets/pnext-client-9203ec11926e5d04.js +1 -0
- package/dist/dash/public/assets/pnext-client-a38b446f941d44df.js +1 -0
- package/dist/dash/public/assets/pnext-client-bd8d51aaa095e8a4.js +1 -0
- package/dist/dash/public/assets/pnext-client-e9821d1f1bdb281d.js +1 -0
- package/dist/dash/server/bundle-0.1.6-b29ec45cb963d47f/entry.js +2 -0
- package/dist/{default-vYPT26DR.js → default-CwQXCtoB.js} +1 -1
- package/dist/{default-Bobztoxf.js → default-De8FXiWz.js} +1 -1
- package/dist/{delete-z1_86nf6.js → delete-BD6AnCLg.js} +1 -1
- package/dist/{delete-D8gEwoOj.js → delete-cS01oOIb.js} +1 -1
- package/dist/{disable-DVKd-0Xb.js → disable-BMWWeYFQ.js} +1 -1
- package/dist/{discover-Df-a8K4R.js → discover-Cfx5RPU7.js} +1 -1
- package/dist/{docs-DKJnqZqt.js → docs-DWegDRiu.js} +1 -1
- package/dist/{enable-C8Zf_wpN.js → enable-Cfzeau2x.js} +1 -1
- package/dist/flow/index.d.ts +1 -1
- package/dist/{flow-17k25MHt.js → flow-kAxxVOiR.js} +1 -1
- package/dist/{index-DT7EST00.d.ts → index-CZjFX5zV.d.ts} +1 -1
- package/dist/{init-CoMfFxbG.js → init-C4tDFH4G.js} +1 -1
- package/dist/integrations-D-L3uQRj.js +1 -0
- package/dist/{list-BYiG8Zav.js → list-5Ljf9TxF.js} +2 -2
- package/dist/{list-BAKvxSbh.js → list-COAo7eZd.js} +1 -1
- package/dist/{list-DX-z3SBp.js → list-DuPqU3fk.js} +1 -1
- package/dist/{list-C5w01-8q.js → list-DzGuMkQy.js} +1 -1
- package/dist/{list-VToARh3C.js → list-J8d_zh-o.js} +1 -1
- package/dist/{list-BxEywhHU.js → list-vOvIpbOH.js} +1 -1
- package/dist/{list-CIW2joV1.js → list-vpyS-hv8.js} +1 -1
- package/dist/{list-DpCf4G-H.js → list-way5oLO0.js} +1 -1
- package/dist/{login-DkkslfBx.js → login-BBw95-S3.js} +1 -1
- package/dist/{login-BFxX4jJy.js → login-CNmeRAL7.js} +1 -1
- package/dist/{logout-BHAtw4Z8.js → logout-j0dTo_Ib.js} +1 -1
- package/dist/{maintenance-C5FklUw3.js → maintenance-DkLVtqM7.js} +1 -1
- package/dist/{mcp-CCZOAo06.js → mcp-CsmBtlW9.js} +1 -1
- package/dist/{migrate-C4vM7DQN.js → migrate-D4nzYhk8.js} +1 -1
- package/dist/{model-Bs1StDo3.js → model-B79MFtRV.js} +1 -1
- package/dist/{push-CUC55Bqd.js → push-DbdnbZYt.js} +1 -1
- package/dist/{queue-6io_NOP3.js → queue-C9fSdE_X.js} +27 -27
- package/dist/refresh-BDmap1RA.js +1 -0
- package/dist/{remove-B93LNkZI.js → remove-BNzbUhaK.js} +1 -1
- package/dist/{remove-eQ8y5C5p.js → remove-CLpL12Ya.js} +1 -1
- package/dist/{remove-CuH8a3L9.js → remove-CaYH9Cna.js} +1 -1
- package/dist/{remove-C5_xggx7.js → remove-D-QeeZQL.js} +1 -1
- package/dist/{rename-CYfy03FE.js → rename-Bhcb4t9F.js} +1 -1
- package/dist/{result-BEtQZHaY.js → result-BfTfJayl.js} +1 -1
- package/dist/{result-BzaM3inj.js → result-D8DsvJDu.js} +1 -1
- package/dist/{resume-DYzKvyEw.js → resume-aZ8yWDBh.js} +1 -1
- package/dist/{review-oIBeECZE.js → review-BEhDcX4b.js} +1 -1
- package/dist/{rotate-key-IdMYH7gg.js → rotate-key-BqnKhTK8.js} +1 -1
- package/dist/{run-CTtd0Znc.js → run-BWbabvub.js} +1 -1
- package/dist/{run-CawRGnOg.js → run-BdPjxaZU.js} +1 -1
- package/dist/{run-BDYl0CKl.js → run-Dqe38jX8.js} +1 -1
- package/dist/runner-BPpiJvHx.js +1 -0
- package/dist/sdk.d.ts +2 -2
- package/dist/sdk.js +1 -1
- package/dist/{serve-CPnmrKyf.js → serve-C0WC-QrV.js} +2 -2
- package/dist/{serve-GmRO89s5.js → serve-CcObDKKQ.js} +1 -1
- package/dist/{serve-CE8YV2e9.js → serve-Ck95047c.js} +1 -1
- package/dist/{serve-CQKZxzFE.js → serve-DA5I2qXj.js} +2 -2
- package/dist/{server-Kb22cWfF.js → server-BxLFZL80.js} +1 -1
- package/dist/{setup-host-GFTUzzZJ.js → setup-host-DLd_j2Uw.js} +1 -1
- package/dist/{shared-DVtzWhUT.js → shared-BLkGRKty.js} +1 -1
- package/dist/{show-COTZEYgc.js → show-DzoQIs75.js} +1 -1
- package/dist/{show-CMUg8SJu.js → show-FC3dJcD-.js} +1 -1
- package/dist/{status-D26U--p8.js → status-BU3DR1XU.js} +1 -1
- package/dist/{steer-C6uARLp5.js → steer-P_38hRRD.js} +1 -1
- package/dist/{stop-BrGI3hSS.js → stop-BJGDRPsp.js} +1 -1
- package/dist/{stop-ByCAlbmN.js → stop-BWY6k6v5.js} +1 -1
- package/dist/{store-DzqXS2wT.js → store-B3ZHoBJY.js} +4 -4
- package/dist/{store-B94tSate.js → store-BLi19UDE.js} +1 -1
- package/dist/{task-CgOKgkEG.js → task-b2BK481M.js} +1 -1
- package/dist/{test-NEbhlxvo.js → test-BrSrhop9.js} +1 -1
- package/dist/{tools-D0Zfs8Hx.js → tools-CgswhJzh.js} +1 -1
- package/dist/{types-Dve7Z0ZP.d.ts → types-I5Cwtl_K.d.ts} +2 -2
- package/dist/{unalias-C9NqmSDq.js → unalias-mMHXqok7.js} +1 -1
- package/dist/{update-BTxYQj7Z.js → update-DbOWToPy.js} +1 -1
- package/dist/{upgrade-hA0yWBvx.js → upgrade-D6oC9HQI.js} +2 -2
- package/dist/{usage-BhqoCjvE.js → usage-Cb8Dtv9V.js} +1 -1
- package/dist/{usage-C4d9X2Uq.js → usage-DMs-IIJC.js} +1 -1
- package/dist/{watch-DtRuC0Wc.js → watch-BcMQXGYO.js} +1 -1
- package/dist/{watch-CSdj24ct.js → watch-eE2XiwsC.js} +1 -1
- package/dist/{worker-DX7P9kWl.js → worker-DrucI22w.js} +1 -1
- package/dist/{workflow-Dcmdooi8.js → workflow-Cshghoas.js} +1 -1
- package/docs/cli.md +145 -0
- package/package.json +3 -2
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/src/core/defaults.ts +25 -0
- package/src/server/dash/app/dash/layout.css +58 -1
- package/src/server/dash/app/dash/layout.tsx +16 -4
- package/src/server/dash/app/dash/settings/[tab]/page.tsx +1 -1
- package/src/server/dash/comps/nav/side-toggle.tsx +1 -1
- package/src/server/dash/comps/ui/menu.tsx +5 -1
- package/src/server/dash/comps/ui/toast.css +3 -2
- package/dist/auth-DWHIzqbA.js +0 -1
- package/dist/credentials-B1jv6dkg.js +0 -1
- package/dist/dash/public/assets/chunks/composer-e56860d72742379e.js +0 -1
- package/dist/dash/public/assets/chunks/instructions-b00959bd4bb70502.js +0 -1
- package/dist/dash/public/assets/chunks/shared-init-986901c810947c12.js +0 -5
- package/dist/dash/public/assets/chunks/shared-init-baceed9fd2d43661.js +0 -2
- package/dist/dash/public/assets/dash-9e02d5d1a6d42ee3.css +0 -1
- package/dist/dash/public/assets/dash-account-04859899c1838ada.css +0 -1
- package/dist/dash/public/assets/dash-agents-9e678137267dec07.css +0 -1
- package/dist/dash/public/assets/dash-agents-new-26fa27b17ef9b8d8.css +0 -1
- package/dist/dash/public/assets/dash-agents-param-slug-b975c48f8abf3444.css +0 -1
- package/dist/dash/public/assets/dash-agents-param-slug-edit-e13fda599bb04843.css +0 -1
- package/dist/dash/public/assets/dash-agents-param-slug-platforms-70292932cb27bc96.css +0 -1
- package/dist/dash/public/assets/dash-agents-param-slug-settings-71f9a86251723fcc.css +0 -1
- package/dist/dash/public/assets/dash-agents-param-slug-tasks-fb8eb2ed71006601.css +0 -1
- package/dist/dash/public/assets/dash-agents-param-slug-usage-7c8740f1cdd52c71.css +0 -1
- package/dist/dash/public/assets/dash-settings-8eb818da462227e8.css +0 -1
- package/dist/dash/public/assets/dash-settings-param-tab-849a1a9542e273f5.css +0 -1
- package/dist/dash/public/assets/dash-tasks-81e510e0b6931b42.css +0 -1
- package/dist/dash/public/assets/dash-tasks-param-id-bbd2a83342f2ec10.css +0 -1
- package/dist/dash/public/assets/dash-usage-8e0259e03eaed1bd.css +0 -1
- package/dist/dash/public/assets/pnext-client-073464b8f422ef57.js +0 -1
- package/dist/dash/public/assets/pnext-client-1e9cb2f4f6387a87.js +0 -1
- package/dist/dash/public/assets/pnext-client-2f0e78dd006fed0f.js +0 -1
- package/dist/dash/public/assets/pnext-client-3c62e2aa2cbe9fe1.js +0 -1
- package/dist/dash/public/assets/pnext-client-43a88896ed42dd39.js +0 -1
- package/dist/dash/public/assets/pnext-client-587008fa987d3073.js +0 -1
- package/dist/dash/public/assets/pnext-client-676360cc86f31573.js +0 -1
- package/dist/dash/public/assets/pnext-client-813427605f424145.js +0 -1
- package/dist/dash/public/assets/pnext-client-82de7cf6dfc35b98.js +0 -1
- package/dist/dash/public/assets/pnext-client-831e8004c09f0b5b.js +0 -1
- package/dist/dash/public/assets/pnext-client-9b557fe468a45ca3.js +0 -1
- package/dist/dash/public/assets/pnext-client-ab7c900c802fe827.js +0 -1
- package/dist/dash/public/assets/pnext-client-d87d00e402811f0c.js +0 -1
- package/dist/dash/public/assets/pnext-client-fbdb7c1da7eda7e5.js +0 -1
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/boot-B2MFTRO2.js +0 -28
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/build-tier-XJJSL5FR.js +0 -2702
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2HFY3DQT.js +0 -206
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2ICEVELW.js +0 -832
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-3UPROT2C.js +0 -33
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4P5CMIYT.js +0 -1580
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4TKZKZ3Q.js +0 -129
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-5RDEILQB.js +0 -435
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-62KEQM43.js +0 -23
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-6KQSWT6D.js +0 -829
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-7DCNCW6O.js +0 -722
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-B4THCTQP.js +0 -20
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-C2LIV2MM.js +0 -170
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-CCATPVTW.js +0 -376
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-COXJAPTU.js +0 -87
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-E6IXL2NJ.js +0 -6268
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FLGRBFAH.js +0 -1196
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FTJVHFWD.js +0 -59
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-H523KSIH.js +0 -5149
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-HT6KKX6A.js +0 -18
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JESFYECC.js +0 -436
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JRPJM2XY.js +0 -15
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L2IWDUXG.js +0 -105
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L5P4Y4UC.js +0 -181
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-NQE46AZN.js +0 -645
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PA4QEARJ.js +0 -127
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PZ5AXOLW.js +0 -7144
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-SNVPTULL.js +0 -2395
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-T3QZT3PG.js +0 -218
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-VC5O2SDP.js +0 -70
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-WZX4V6CM.js +0 -229
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-XUUIDXY5.js +0 -625
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-ZHFDO3PR.js +0 -263
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/compile-CE2DN7ZA.js +0 -16
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-UREY7XJT.js +0 -14
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-loader-UI2XE3PZ.js +0 -15
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/entry.js +0 -217
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/generate-I2PPTDFD.js +0 -14
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/modules-UVOCE4C2.js +0 -46
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/pipeline-UW47K537.js +0 -961
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/proxy-ITGOVJBW.js +0 -24
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/register-4SA55SWT.js +0 -12577
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/router-JNKHLBCZ.js +0 -503
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/routes-PD6J2NXW.js +0 -52
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/tsconfig-defaults-ZXEH7RQK.js +0 -13
- package/dist/integrations-5xCaXSd-.js +0 -1
- package/dist/refresh-BIrmrWYq.js +0 -1
- package/dist/runner-D7ScbIHJ.js +0 -1
- package/src/server/dash/app/dash/token-from-hash.tsx +0 -17
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{wt as e}from"./dispatch-BKeAch9E.js";import{i as t}from"./cli-
|
|
1
|
+
import{wt as e}from"./dispatch-BKeAch9E.js";import{i as t}from"./cli-DWCR7iqa.js";import{a as n,l as r,m as i,n as a,p as o,s}from"./output-BKeyLbvt.js";import{n as c,r as l,t as u}from"./args-BOEEdpWk.js";import d from"node:process";const f=t({name:`flow list`,help:{usage:`coder flow list [--archived] [--limit N] [--json]`,summary:`List recent flow runs, most recent first: running runs plus ones that ended
|
|
2
2
|
within the last 10 minutes. Older runs auto-archive and move to --archived.`,flags:[[`--archived`,`show archived runs (auto-archived or via flow archive)`],[`--limit <n|all>`,`show at most n runs (default all)`]]},options:{...u,archived:c,limit:l},run:async({options:e})=>{let{collectFlowRuns:t}=await import(`./executor-BvAA7Cgw.js`).then(e=>e.y);return t(e)},json:e=>e.runs,print:(e,{options:t})=>p(e,t)});function p({runs:t,clipped:c},l){if(!t.length){d.stdout.write(l.archived?`No archived flow runs.
|
|
3
3
|
`:`No recent flow runs.
|
|
4
4
|
`),d.stdout.write(`\n${s([`Run one: coder flow run <name>`,`Runnable flows: coder flow discover`],o)}\n`);return}let u=o,f=(e,t,n)=>Math.min(t,Math.max(e,...n.map(e=>e.length))),p={id:f(6,28,t.map(e=>e.runId)),name:f(4,30,t.map(e=>e.name))};d.stdout.write(u.bold(u.light(`${`run-id`.padEnd(p.id)} ${`name`.padEnd(p.name)} ${`status`.padEnd(10)} ${`tasks`.padEnd(9)} ${`tokens`.padEnd(10)} age\n`)));for(let o of t){let t=Object.values(o.ledger).reduce((e,t)=>e+t.total,0);d.stdout.write(`${u.cyan(a(o.runId,p.id))} ${a(o.name,p.name)} ${i(o.status,10)} ${u.light(a(`${o.taskCount} tasks`,9))} ${u.light(a(t?`${r(t)} tok`:`-`,10))} ${u.light(n(e(o.startedAt)))}\n`)}c&&d.stdout.write(u.dim(`\n... ${c} more not shown (--limit ${l.limit})\n`)),d.stdout.write(`\n${s([`Result: coder flow result <run-id>`,`Tasks: coder list`,`Runnable flows: coder flow discover`],u)}\n`)}export{f as commandList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./cli-
|
|
1
|
+
import{i as e,t}from"./cli-DWCR7iqa.js";import{p as n,r,s as i}from"./output-BKeyLbvt.js";import{n as a,o}from"./args-BOEEdpWk.js";import s from"node:process";import c from"node:readline/promises";function l(e){e.url&&s.stderr.write(`Open ${n.cyan(e.url)}\n`),e.code&&s.stderr.write(`Enter the code ${n.bold(e.code)}\n`)}async function u(){let e=c.createInterface({input:s.stdin,output:s.stderr}),t=(await e.question(`Paste the code from the sign-in page `)).trim();return e.close(),t}function d(e){if(e.state===`failed`)return void s.stderr.write(`${r.red(e.error??`Sign-in failed.`)}\n\n${i([`Try again`],r)}\n`);s.stdout.write(`Signed in. Personal credential ${n.bold(e.label??e.engine)} is your ${e.engine} default.\n`)}const f=e({name:`credentials login`,globalFlags:{cwd:!1},help:{usage:`coder credentials login <claude|codex> [--server [url]] [--json]`,summary:`Runs the official claude or codex sign-in on the server's runner, prints the sign-in link or device code, and waits. Claude asks you to paste the code the sign-in page shows. The result is your personal default for that engine. Needs CLAUDE_SUBSCRIPTIONS=1 or CODEX_SUBSCRIPTIONS=1 on the server.`,flags:[t]},options:{json:a,server:o,yes:a},args:1,run:async({options:e,args:[t]})=>{let{loginCredential:n}=await import(`./remote-miQNTVRa.js`).then(e=>e.a);return n(t,{...e,onStart:e=>s.once(`SIGINT`,()=>void e().finally(()=>s.exit(130))),onOpen:l,code:u})},print:d,exit:(e,{options:t})=>!t.json&&e.state===`failed`?1:void 0});export{f as commandCredentialsLogin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{xt as e}from"./dispatch-BKeAch9E.js";import{a as t,i as n,r}from"./prompt-CEuBMNhk.js";import{i,r as a}from"./cli-
|
|
1
|
+
import{xt as e}from"./dispatch-BKeAch9E.js";import{a as t,i as n,r}from"./prompt-CEuBMNhk.js";import{i,r as a}from"./cli-DWCR7iqa.js";import{p as o}from"./output-BKeyLbvt.js";import{i as s,n as c,s as l}from"./args-BOEEdpWk.js";import u from"node:process";const d=t=>{throw t instanceof e&&t.code===`login-failed`?new e(`invalid-option`,t.message,t.hint?{hint:t.hint}:{}):t},f=i({name:`auth login`,globalFlags:{cwd:!1},help:{usage:`coder auth login [--server [url]] [--workspace <slug>] [--device] [--json]`,summary:`Sign in with Wular Auth in your browser. The CLI keeps the tokens in ~/.coder/session.json, and commands that talk to a server then act as you.`,flags:[a,[`--device`,`show a code to approve on another device; the default without a local browser`]],env:[[`CODER_SERVER`,`the server to use instead of https://coder.wular.ai`]],examples:[[`coder auth login`,`sign in to the hosted service`],[`coder auth login --server https://agents.example.com`,`sign in to a self-hosted server`]]},options:{json:c,server:s,workspace:l,yes:c,device:c},run:async({options:e})=>{let{hasBrowser:i,sessions:a}=await import(`./remote-miQNTVRa.js`).then(e=>e.c);return a.login({server:e.server,yes:e.yes,device:e.device||!i(),open:e=>{u.stdout.write(`Opening your browser to sign in. If it does not open, visit\n${o.light(e)}\n`),n(e)},onCode:(e,t)=>u.stdout.write(`Confirm this code in your browser: ${o.bold(e)}\n${o.light(t)}\n`),organization:e.workspace,...r()?{chooseOrganization:async e=>{let[n]=await t({title:`Workspace`,hint:`Commands for this server use this workspace by default.`,options:e.map(e=>({value:e.slug,label:e.name,hint:e.slug}))});return n}}:{}}).catch(d)},json:e=>({server:e.server,user:e.user,organization:e.organization}),print:e=>{let t=o;u.stdout.write(`${t.green(`✔`)} Signed in to ${t.bold(e.server)} as ${e.user.email}${e.organization?` ${t.dim(`· ${e.organization.name}`)}`:``}\n`)}});export{f as commandLogin,d as ownHint};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,r as t}from"./cli-
|
|
1
|
+
import{i as e,r as t}from"./cli-DWCR7iqa.js";import{i as n,n as r}from"./args-BOEEdpWk.js";import{ownHint as i}from"./login-CNmeRAL7.js";import a from"node:process";const o=e({name:`auth logout`,globalFlags:{cwd:!1},help:{usage:`coder auth logout [--server [url]] [--json]`,summary:`Revoke the saved session for that server at Wular Auth and forget its tokens.`,flags:[t]},options:{json:r,server:n,yes:r},run:async({options:e})=>{let{sessions:t}=await import(`./remote-miQNTVRa.js`).then(e=>e.c);return t.logout(e).catch(i)},print:e=>a.stdout.write(`Signed out of ${e.server}.\n`)});export{o as commandLogout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DT7IzrpZ.js";import{xt as t}from"./dispatch-BKeAch9E.js";import{In as n,Ln as r,Pn as i,Rn as a,n as o,t as s,ut as c}from"./store-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DT7IzrpZ.js";import{xt as t}from"./dispatch-BKeAch9E.js";import{In as n,Ln as r,Pn as i,Rn as a,n as o,t as s,ut as c}from"./store-B3ZHoBJY.js";import{n as l}from"./env-CRf6wkM2.js";import{c as u,d,i as f}from"./schema-CU2iFkp8.js";import{n as p,t as m}from"./migrate-N-85_N7J.js";import{v as h}from"./shared-BLkGRKty.js";import g from"node:process";import{eq as _,isNotNull as v,like as y}from"drizzle-orm";var b=e({migrate:()=>S,rotateKey:()=>C});async function x(e){try{return await e()}catch(e){throw e instanceof t?e:new t(`server`,e instanceof Error?e.message:String(e))}}function S(e={}){return x(async()=>{let n=l(e.env??g.env);if(!n.databaseUrl)throw new t(`invalid-option`,`No database to migrate.`,{hint:`Set DATABASE_URL to the Postgres the server uses.`});let r=await o(n);try{return await p(r,m(n.databaseUrl))}finally{await r.close()}})}function C(e={}){return x(async()=>{let o=l(e.env??g.env);if(!o.encryptionKey)throw new t(`invalid-option`,`SERVER_ENCRYPTION_KEY is required to rotate keys.`,{hint:`Set the new key in SERVER_ENCRYPTION_KEY and the old key in SERVER_ENCRYPTION_KEY_PREVIOUS.`});let p=await s(o);try{let e=new Set([p.defaultOrganizationId]);if(p.connection){let t=p.connection.db,[n,r]=await Promise.all([t.selectDistinct({id:d.organizationId}).from(d),t.select({key:f.key}).from(f).where(y(f.key,`o:%,"config"]:workspace`))]);for(let t of n)e.add(t.id);for(let t of r){let n;try{n=JSON.parse(t.key.slice(2,-10))}catch{continue}Array.isArray(n)&&n.length===2&&typeof n[0]==`string`&&n[1]===`config`&&t.key===h(n[0],`config`,`workspace`)&&e.add(n[0])}}let t=0;for(let n of e)t+=await c(p.store(n),o);let s=p.connection?.db,l=r(o.encryptionKey);for(let e of s?await s.select().from(u).where(v(u.token)):[])a(o,e.token)!==l&&(await s.update(u).set({token:n(o,i(o,e.token))}).where(_(u.id,e.id)),t++);return{moved:t}}finally{await p.close()}})}export{S as n,C as r,b as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./cli-
|
|
1
|
+
import{s as e}from"./cli-DWCR7iqa.js";const t=e(`mcp`,{serve:async()=>(await import(`./serve-CcObDKKQ.js`)).commandMcp,add:async()=>(await import(`./add-DRsPpQFl.js`)).commandMcpAdd,"add-json":async()=>(await import(`./add-json-5uPnWPoD.js`)).commandMcpAddJson,list:async()=>(await import(`./list-vpyS-hv8.js`)).commandMcpList,ls:async()=>(await import(`./list-vpyS-hv8.js`)).commandMcpList,rm:async()=>(await import(`./remove-CaYH9Cna.js`)).commandMcpRemove,remove:async()=>(await import(`./remove-CaYH9Cna.js`)).commandMcpRemove},{menu:[{usage:`add <name> (--url <url> | -- <command> [args])`,blurb:`add a server`},{usage:`add-json <name> '<json>'`,blurb:`add a server from a .mcp.json entry`},{usage:`list`,blurb:`list configured servers`},{usage:`rm <name>`,blurb:`remove a server`}],details:!0},{aliases:{ls:`list`,remove:`rm`},help:{usage:`coder mcp <add|add-json|list|rm>`,summary:"Manage the `mcp` map in .coder/config.json (or ~/.coder with --user). Entries use the .mcp.json shape (stdio command or remote url) plus an optional tools allowlist; attach them with `coder task run --mcp <names|all>`.",examples:[[`coder mcp add docs -- npx -y docs-mcp`,`add a stdio server from its command line`],[`coder mcp add linear --url https://mcp.linear.app/mcp`,`add a remote server; the engine handles its OAuth login`],[`coder mcp add-json github '{"url":"https://api.githubcopilot.com/mcp/","headers":{"Authorization":"Bearer \${GH_TOKEN}"}}'`,`paste an entry from any .mcp.json`],[`coder run --mcp docs,linear "find why uploads fail"`,`attach by name`]],seeAlso:`task run`}});export{t as commandMcpConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e}from"./cli-
|
|
1
|
+
import{i as e}from"./cli-DWCR7iqa.js";import{n as t}from"./args-BOEEdpWk.js";import n from"node:process";const r=e({name:`server migrate`,globalFlags:{cwd:!1},help:{usage:`coder server migrate [--json]`,summary:`Create or update the tables in the Postgres at DATABASE_URL. Run it before the first start and after every upgrade; the server only warns when it is behind.`,env:[[`DATABASE_URL`,`the Postgres to migrate`]],examples:[[`DATABASE_URL=postgres://... coder server migrate`,`bring a database up to date`]]},options:{json:t},run:async()=>{let{migrate:e}=await import(`./maintenance-DkLVtqM7.js`).then(e=>e.t);return e()},json:({applied:e})=>({ok:!0,applied:e}),print:({applied:e})=>n.stdout.write(e?`Applied ${e} migration${e===1?``:`s`}.\n`:`Database is up to date.
|
|
2
2
|
`)});export{r as commandServerMigrate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./cli-
|
|
1
|
+
import{s as e}from"./cli-DWCR7iqa.js";const t=e(`model`,{list:async()=>(await import(`./list-DuPqU3fk.js`)).commandModelList,ls:async()=>(await import(`./list-DuPqU3fk.js`)).commandModelList,add:async()=>(await import(`./add-CLYTF_up.js`).then(e=>e.t)).commandModelAdd,setup:async()=>(await import(`./add-CLYTF_up.js`).then(e=>e.t)).commandModelAdd,update:async()=>(await import(`./update-DbOWToPy.js`)).commandModelUpdate,remove:async()=>(await import(`./remove-D-QeeZQL.js`).then(e=>e.n)).commandModelRemove,disable:async()=>(await import(`./disable-BMWWeYFQ.js`)).commandModelDisable,enable:async()=>(await import(`./enable-Cfzeau2x.js`)).commandModelEnable,alias:async()=>(await import(`./alias-_0Rwf2cA.js`)).commandModelAlias,unalias:async()=>(await import(`./unalias-mMHXqok7.js`)).commandModelUnalias},{menu:[{usage:`list`,blurb:`list built-ins, custom models, and aliases`},{usage:`add <name> --base-url <url> --model <id> [--env-key VAR]`,blurb:`connect a model (alias: setup)`},{usage:`update <name> [--base-url|--model|--env-key]`,blurb:`change a model in place`},{usage:`remove <name>`,blurb:`delete a custom model`},{usage:`disable <name>`,blurb:`turn off a model (built-in, custom, or alias)`},{usage:`enable <name>`,blurb:`re-enable a disabled model`},{usage:`alias <name> <spec>`,blurb:`name a spec, e.g. fast codex:luna`},{usage:`unalias <name>`,blurb:`remove an alias`}],description:["Manage the models coder can dispatch to. `add` connects any OpenAI-compatible",`endpoint (Ollama, vLLM, OpenRouter, ...) as the custom engine, alongside the`,"built-in codex/claude models. Name your own shortcuts with `alias`",`(e.g. fast -> codex:luna); disable/enable turns any model off and on.`]});export{t as commandModel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,r as t}from"./cli-
|
|
1
|
+
import{i as e,r as t}from"./cli-DWCR7iqa.js";import{p as n}from"./output-BKeyLbvt.js";import{i as r,n as i,s as a,t as o}from"./args-BOEEdpWk.js";import s from"node:process";const c=e({name:`agent push`,help:{usage:`coder agent push [id] [--server [url]] [--json] [--cwd <dir>]`,summary:`Upload one workspace agent, or every agent in .coder/agents when no id is given. The server creates a new immutable version only when its definition, prompt, or files changed.`,flags:[t],examples:[[`coder agent push helper`,`upload helper`]]},options:{...o,server:r,workspace:a,yes:i},args:1,run:async({options:e,args:[t],cwd:n})=>{let{agents:r}=await import(`./agent-hw3zKw8y.js`).then(e=>e.t);return r.push(t,{...e,cwd:n,organization:e.workspace})},print:e=>{for(let t of e)s.stdout.write(t.unchanged?`Pushed ${n.bold(t.id)} unchanged (version ${t.version})\n`:`Pushed ${n.bold(t.id)} as version ${t.version}\n`)}});export{c as commandAgentPush};
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import{Bn as e,a as t,c as n}from"./store-
|
|
1
|
+
import{Bn as e,a as t,c as n}from"./store-B3ZHoBJY.js";import{g as r,h as i,i as a,m as o,o as s,p as c,s as l}from"./schema-CU2iFkp8.js";import{i as u,r as d,t as f}from"./client-D9IoAuDD.js";import{b as p,c as m,f as h,m as g,v as _,y as v}from"./shared-BLkGRKty.js";import{randomBytes as y}from"node:crypto";import{and as b,asc as x,desc as S,eq as C,getTableColumns as w,ilike as T,inArray as E,isNotNull as D,isNull as O,not as k,or as A,sql as j}from"drizzle-orm";import{CasingCache as M}from"drizzle-orm/casing";function N(e,t){if(typeof t==`number`)return j`to_jsonb(coalesce(case when jsonb_typeof(${e}) = 'number' then (${e} #>> '{}')::numeric end, 0) + ${t}::numeric)`;if(!t||typeof t!=`object`||Array.isArray(t))return e;let n=Object.entries(t).map(([t,n])=>j`${t}::text, ${N(j`(${e} -> ${t}::text)`,n)}`);return j`(case when jsonb_typeof(${e}) = 'object' then ${e} else '{}'::jsonb end || jsonb_build_object(${j.join(n,j`, `)}))`}var P=class{db;constructor(e){this.db=e}async metrics(e,t){let n=await this.db.select({status:c.status,total:j`count(*)::int`,recent:j`count(*) filter (where ${c.createdAt} >= ${new Date(t).toISOString()}::timestamptz)::int`}).from(c).where(C(c.organizationId,e)).groupBy(c.status),r={tasks:{queued:0,running:0,waiting:0,completed:0,failed:0,cancelled:0},queueDepth:0};for(let e of n)r.tasks[e.status]=e.recent,e.status===`queued`&&(r.queueDepth=e.total);return r}where(e,t){return b(C(c.organizationId,e),C(c.publicId,t))}fence(e,t,n={}){return b(this.where(e,t),n.generation===void 0?void 0:C(c.generation,n.generation),n.attempts===void 0?void 0:C(c.attempts,n.attempts),n.tokenHash===void 0?void 0:n.tokenHash===null?O(c.tokenHash):C(c.tokenHash,n.tokenHash),n.handle===void 0?void 0:n.handle===null?O(c.handle):C(c.handle,n.handle),n.lastSeenAt===void 0?void 0:n.lastSeenAt===null?O(c.lastSeenAt):C(c.lastSeenAt,new Date(n.lastSeenAt)),n.updatedAt===void 0?void 0:C(c.updatedAt,new Date(n.updatedAt)),n.statuses?E(c.status,n.statuses):void 0)}async enqueue(e,t,n,r,i){let a=this.insertion(e,t,n,r,i),[o]=i===void 0?await g(this.db,a):await d(this.db,[j`select pg_advisory_xact_lock(1, hashtext(${e}))`],a);if(!o?.allowed)throw Error(`Organization task queue is full`);return!!o.inserted}insertion(e,t,n,r,i,u){let d=t.event,f=new Date(n).toISOString(),p=e=>j`${e===void 0?null:JSON.stringify(e)}::jsonb`,m=r?j`
|
|
2
2
|
receipt as (
|
|
3
3
|
insert into ${a} (key, value, expires_at)
|
|
4
4
|
select ${_(e,`delivery`,r.key)}, ${p({at:n})}, ${new Date(n+r.ttlMs).toISOString()}::timestamptz
|
|
5
|
-
from capacity where allowed ${u?
|
|
5
|
+
from capacity where allowed ${u?j`and (${u.create} or exists (select 1 from target))`:j``}
|
|
6
6
|
on conflict (key) do update set value = excluded.value, expires_at = excluded.expires_at
|
|
7
7
|
where ${a.expiresAt} <= ${f}::timestamptz
|
|
8
8
|
returning key
|
|
9
|
-
),`:
|
|
10
|
-
with ${u?
|
|
11
|
-
select ${i===void 0?
|
|
12
|
-
), ${m} ${u?
|
|
9
|
+
),`:j``;return j`
|
|
10
|
+
with ${u?j`target as materialized (${u.target}),`:j``} capacity as (
|
|
11
|
+
select ${i===void 0?j`true`:j`(select count(*) from ${c} where organization_id = ${e} and status = 'queued') < ${i} ${r?j`or exists (select 1 from ${a} where key = ${_(e,`delivery`,r.key)} and expires_at > ${f}::timestamptz)`:j``}`} ${u?j`or exists (select 1 from target) or not ${u.create}`:j``} as allowed
|
|
12
|
+
), ${m} ${u?j`advanced as (
|
|
13
13
|
update ${c} set inbox_seq = inbox_seq + 1 where id in (select id from target) and exists (select 1 from receipt)
|
|
14
14
|
returning id, inbox_seq, generation
|
|
15
15
|
), forwarded as (
|
|
16
16
|
insert into ${o} (organization_id, task_id, seq, generation, at, kind, value)
|
|
17
17
|
select ${e}, id, inbox_seq, generation, ${f}::timestamptz, 'steer', ${p({text:d?.text})} from advanced returning seq
|
|
18
|
-
),`:
|
|
18
|
+
),`:j``} inserted as (
|
|
19
19
|
insert into ${c} (organization_id, public_id, source, status, agent, flow, runner, permissions,
|
|
20
20
|
app_id, installation_id, event, prompt, args, mcp, author, definition, credential, requester,
|
|
21
21
|
runner_id, usage, tools, tool_scopes, context, files, attempts, created_at, updated_at)
|
|
22
22
|
select ${e}, ${t.id}, ${t.source}, 'queued', ${t.agent}, ${t.flow}, ${t.runner}, ${t.permissions??null},
|
|
23
|
-
${d?
|
|
24
|
-
${d?
|
|
23
|
+
${d?j`coalesce((select id from ${s} where key = ${d.appId} and organization_id in (${e}, '')), 0)`:j`null`},
|
|
24
|
+
${d?j`coalesce((select id from ${l} where key = ${`${d.appId}:${d.installationId}`} and organization_id = ${e}), 0)`:j`null`},
|
|
25
25
|
${p(d)}, ${t.prompt??null}, ${p(t.args)}, ${p(t.mcp)}, ${t.author??null}, ${p(t.definition)},
|
|
26
26
|
${t.credential??null}, ${t.requester??null}, ${t.runnerId??null}, ${p(t.usage)}, ${p(t.tools)},
|
|
27
27
|
${p(t.toolScopes)}, ${p(t.context)}, ${p(t.files)}, 0, ${f}::timestamptz, ${f}::timestamptz
|
|
28
|
-
from capacity where allowed ${u?
|
|
28
|
+
from capacity where allowed ${u?j`and ${u.create} and not exists (select 1 from target)`:j``} ${r?j`and exists (select 1 from receipt)`:j``}
|
|
29
29
|
returning id
|
|
30
|
-
) select allowed, exists (select 1 from inserted) as inserted ${u?
|
|
30
|
+
) select allowed, exists (select 1 from inserted) as inserted ${u?j`, exists (select 1 from forwarded) as steered`:j``} from capacity`}async deliver(e,t,r,i,a,o,s=!0){if(!a)return s&&await this.enqueue(e,t,r,i,o)?{taskId:t.id}:{};let l=t.event,u=j`select id from ${c} where organization_id = ${e} and status in ('queued', 'running', 'waiting')
|
|
31
31
|
and agent = ${t.agent} and source = ${t.source} and flow = 'default'
|
|
32
32
|
and requester is not distinct from ${t.requester??null}
|
|
33
33
|
and event->>'appId' is not distinct from ${l?.appId??null}
|
|
34
34
|
and event->>'installationId' is not distinct from ${l?.installationId??null}
|
|
35
35
|
and event->'chat'->'thread'->>'id' is not distinct from ${l?.chat?.thread.id??null}
|
|
36
36
|
and event->'actor'->>'id' = ${l?.actor.id||null}
|
|
37
|
-
order by created_at desc, public_id desc limit 1 for update`,f=this.insertion(e,t,r,i,o,{target:u,create:s}),p=[
|
|
38
|
-
and ${n===void 0?
|
|
39
|
-
to_json(public_id), to_json(organization_id), attempts + 1), 'UTF8'), 'base64'), E'\\n', ''), '='), '+/', '-_') || '.' || ${o}`,l=
|
|
37
|
+
order by created_at desc, public_id desc limit 1 for update`,f=this.insertion(e,t,r,i,o,{target:u,create:s}),p=[j`select pg_advisory_xact_lock(3, hashtext(${JSON.stringify([e,n(t)])}))`];o!==void 0&&s&&p.push(j`select pg_advisory_xact_lock(1, hashtext(${e}))`);let[m]=await d(this.db,p,f);if(!m?.allowed)throw Error(`Organization task queue is full`);return m.inserted?{taskId:t.id}:m.steered?{steered:!0}:{}}async claim(t,n,r=!1,i){let a=i===void 0?j`true`:j`(select count(*) from ${c} active where active.organization_id = ${c.organizationId} and active.status in ('running', 'waiting')) < ${i}`;if(!r){let[e]=await u(this.db,()=>g(this.db,j`select exists (select 1 from ${c} where status = 'queued' and ${a})
|
|
38
|
+
and ${n===void 0?j`true`:j`(select count(*) from ${c} where status in ('running', 'waiting')) < ${n}`} as ready`));if(!e?.ready)return}let o=y(32).toString(`base64url`),s=j`translate(rtrim(replace(encode(convert_to(format('{"task":%s,"organization":%s,"attempt":%s}',
|
|
39
|
+
to_json(public_id), to_json(organization_id), attempts + 1), 'UTF8'), 'base64'), E'\\n', ''), '='), '+/', '-_') || '.' || ${o}`,l=j`with stamp as materialized (select date_trunc('milliseconds', clock_timestamp()) as at), picked as materialized (
|
|
40
40
|
select id, ${s} as bearer from ${c} where status = 'queued'
|
|
41
41
|
and ${a}
|
|
42
|
-
${n===void 0?
|
|
42
|
+
${n===void 0?j``:j`and (select count(*) from ${c} where status in ('running', 'waiting')) < ${n}`}
|
|
43
43
|
order by created_at, id limit 1 for update
|
|
44
44
|
), claimed as (
|
|
45
45
|
update ${c} set status = 'running', attempts = attempts + 1, locked_at = (select at from stamp),
|
|
@@ -47,16 +47,16 @@ import{Bn as e,a as t,c as n}from"./store-DzqXS2wT.js";import{g as r,h as i,i as
|
|
|
47
47
|
token_hash = translate(rtrim(encode(sha256(convert_to(picked.bearer, 'UTF8')), 'base64'), '='), '+/', '-_')
|
|
48
48
|
from picked where ${c.id} = picked.id returning ${c}.*
|
|
49
49
|
) select to_jsonb(claimed) as record, exists (select 1 from ${c} where status = 'queued' and id <> claimed.id
|
|
50
|
-
and ${i===void 0?
|
|
51
|
-
and ${n===void 0?
|
|
50
|
+
and ${i===void 0?j`true`:j`(select count(*) from ${c} active where active.organization_id = ${c.organizationId} and active.status in ('running', 'waiting')) + case when ${c.organizationId} = claimed.organization_id then 1 else 0 end < ${i}`})
|
|
51
|
+
and ${n===void 0?j`true`:j`(select count(*) from ${c} where status in ('running', 'waiting')) + 1 < ${n}`} as more from claimed`,[m]=await d(this.db,n===void 0&&i===void 0?[]:[j`select pg_advisory_xact_lock(2, 0)`],l);if(!m)return;let h=new M(f),_=Object.fromEntries(Object.entries(w(c)).map(([e,t])=>{let n=m.record[h.getColumnCasing(t)];return[e,n===null?null:t.mapFromDriverValue(n)]}));return{organizationId:_.organizationId,status:p(_),token:e(_.publicId,_.organizationId,_.attempts,o).token,more:m.more}}async touch(e,t,n,r,i,a=!1){let o=E(c.status,[`running`,`waiting`]),s=new Date(i).toISOString(),[l]=await this.db.update(c).set({lastSeenAt:j`case when ${o} then ${s}::timestamptz else ${c.lastSeenAt} end`,updatedAt:j`case when ${o} then ${s}::timestamptz else ${c.updatedAt} end`}).where(this.fence(e,t,{tokenHash:n,attempts:r,statuses:a?[`running`,`waiting`,`completed`,`failed`,`cancelled`]:[`running`,`waiting`]})).returning();return l&&p(l)}async patchTask(e,t,n,r,i={}){let{answer:a,archivedAt:o,lastSeenAt:s,...l}=n,[u]=await this.db.update(c).set({...Object.fromEntries(Object.entries(l).map(([e,t])=>[e,t??null])),...a===void 0?{}:{answer:j`coalesce(${c.answer}, '[]'::jsonb) || ${JSON.stringify([a])}::jsonb`},...Object.hasOwn(n,`archivedAt`)?{archivedAt:o===void 0?null:new Date(o)}:{},...Object.hasOwn(n,`lastSeenAt`)?{lastSeenAt:s===void 0?null:new Date(s)}:{},updatedAt:new Date(r)}).where(this.fence(e,t,i)).returning({id:c.id});return!!u}async requeue(e,t,n,r={}){let[i]=await this.db.update(c).set({status:`queued`,lockedAt:null,handle:null,tokenHash:null,lastSeenAt:null,updatedAt:new Date(n)}).where(this.fence(e,t,{...r,statuses:[`running`,`waiting`]})).returning({id:c.id});return!!i}async finish(e,t,n,r,i={}){let a=new Date(r),[o]=await this.db.update(c).set({status:n.status,result:n.result??null,error:n.error??null,tokens:n.tokens??null,lastSeenAt:a,lockedAt:null,finishedAt:a,updatedAt:a}).where(this.fence(e,t,{...i,statuses:[`queued`,`running`,`waiting`]})).returning({id:c.id});return!!o}async continueTask(e,t,n,r,i){let o=j`(select value from ${a} where key = ${v(e,`note`)} ||
|
|
52
52
|
case when ${c.source} = ${c.event}->>'integration' then
|
|
53
53
|
(${c.event}->>'appId') || ':' || (${c.event}->>'installationId') || ':' || coalesce(${c.event}->'chat'->'thread'->>'id', ${c.event}->>'deliveryId')
|
|
54
54
|
else 'task:' || ${c.publicId} end
|
|
55
|
-
and (${a.expiresAt} is null or ${a.expiresAt} > ${new Date(r).toISOString()}::timestamptz))`,s=
|
|
55
|
+
and (${a.expiresAt} is null or ${a.expiresAt} > ${new Date(r).toISOString()}::timestamptz))`,s=j`(${JSON.stringify(n.context??{})}::jsonb - 'note') || jsonb_strip_nulls(jsonb_build_object('note', nullif(${o}, '""'::jsonb)))`,[l]=await this.db.update(c).set({prompt:n.prompt??null,context:s,status:`queued`,attempts:0,generation:j`${c.generation} + 1`,inboxAck:-1,result:null,error:null,tokens:null,handle:null,tokenHash:null,lastSeenAt:null,logCursor:null,lockedAt:null,startedAt:null,finishedAt:null,cancelRequestedAt:null,approval:null,answer:null,updatedAt:new Date(r)}).where(this.fence(e,t,{...i,statuses:[`completed`,`failed`,`cancelled`]})).returning({context:c.context});return l&&(n.context=l.context??void 0),!!l}async completeTask(e,t,n,i){let{outcome:s,usage:l,note:u}=n,d=new Date(i).toISOString(),f=u&&_(e,`note`,u.key),p=u?u.value?j`, note as (
|
|
56
56
|
insert into ${a} (key, value, expires_at)
|
|
57
57
|
select ${f}, ${JSON.stringify(u.value)}::jsonb, ${new Date(i+u.ttlMs).toISOString()}::timestamptz from finished
|
|
58
58
|
on conflict (key) do update set value = excluded.value, expires_at = excluded.expires_at
|
|
59
|
-
)`:
|
|
59
|
+
)`:j`, note as (delete from ${a} where key = ${f} and exists (select 1 from finished))`:j``,[m]=await g(this.db,j`
|
|
60
60
|
with finished as (
|
|
61
61
|
update ${c} set status = ${s.status}, result = ${JSON.stringify(s.result??null)}::jsonb,
|
|
62
62
|
error = ${s.error??null}, tokens = ${JSON.stringify(s.tokens??null)}::jsonb,
|
|
@@ -69,9 +69,9 @@ import{Bn as e,a as t,c as n}from"./store-DzqXS2wT.js";import{g as r,h as i,i as
|
|
|
69
69
|
${l.credential}, ${l.runnerElapsedMs}, ${JSON.stringify(l.tokens??null)}::jsonb, ${new Date(l.at).toISOString()}::timestamptz, ${d}::timestamptz from finished
|
|
70
70
|
on conflict (task_id) do update set installation_id = excluded.installation_id, agent = excluded.agent, target = excluded.target,
|
|
71
71
|
engine = excluded.engine, model = excluded.model, credential = excluded.credential, runner_ms = ${r.runnerMs} + excluded.runner_ms,
|
|
72
|
-
tokens = ${
|
|
72
|
+
tokens = ${N(j`${r.tokens}`,l.tokens)}, at = excluded.at, updated_at = excluded.updated_at
|
|
73
73
|
) ${p}
|
|
74
|
-
select exists (select 1 from finished) as completed`);return!!m?.completed}async cancel(e,n,r,i={}){let a=new Date(r).toISOString(),[s]=await g(this.db,
|
|
74
|
+
select exists (select 1 from finished) as completed`);return!!m?.completed}async cancel(e,n,r,i={}){let a=new Date(r).toISOString(),[s]=await g(this.db,j`
|
|
75
75
|
with cancelled as (
|
|
76
76
|
update ${c} set status = case when status = 'queued' then 'cancelled' else status end,
|
|
77
77
|
finished_at = case when status = 'queued' then ${a}::timestamptz else finished_at end,
|
|
@@ -81,23 +81,23 @@ import{Bn as e,a as t,c as n}from"./store-DzqXS2wT.js";import{g as r,h as i,i as
|
|
|
81
81
|
), message as (
|
|
82
82
|
insert into ${o} (organization_id, task_id, seq, generation, kind, value, at)
|
|
83
83
|
select ${e}, id, inbox_seq, generation, 'cancel', 'null'::jsonb, ${a}::timestamptz from cancelled where status in ('running', 'waiting')
|
|
84
|
-
) select exists(select 1 from cancelled) as accepted`);return!!s?.accepted}async cancelRequested(e,t){let[n]=await u(this.db,()=>this.db.select({at:c.cancelRequestedAt}).from(c).where(this.where(e,t)));return!!n?.at}filter(e,t){let n=t.status?[t.status]:t.statuses,r=t.q?.trim(),i=r&&`%${r.replace(/[\\%_]/g,`\\$&`)}%`;return b(C(c.organizationId,e),n?E(c.status,n):void 0,t.agent?C(c.agent,t.agent):void 0,t.source?C(c.source,t.source):void 0,t.archived===void 0?void 0:t.archived?D(c.archivedAt):O(c.archivedAt),i?
|
|
84
|
+
) select exists(select 1 from cancelled) as accepted`);return!!s?.accepted}async cancelRequested(e,t){let[n]=await u(this.db,()=>this.db.select({at:c.cancelRequestedAt}).from(c).where(this.where(e,t)));return!!n?.at}filter(e,t){let n=t.status?[t.status]:t.statuses,r=t.q?.trim(),i=r&&`%${r.replace(/[\\%_]/g,`\\$&`)}%`;return b(C(c.organizationId,e),n?E(c.status,n):void 0,t.agent?C(c.agent,t.agent):void 0,t.source?C(c.source,t.source):void 0,t.archived===void 0?void 0:t.archived?D(c.archivedAt):O(c.archivedAt),i?A(T(j`${c.event}->>'text'`,i),T(c.prompt,i),T(c.agent,i),T(c.publicId,i)):void 0)}pageQuery(e,n){let{before:r}=n,i=n.summary?{publicId:c.publicId,source:c.source,agent:c.agent,flow:c.flow,prompt:c.prompt,event:j`case when ${c.event} is not null then jsonb_build_object('integration', ${c.event}->>'integration', 'type', ${c.event}->>'type', 'text', ${c.event}->>'text') end`.as(`event`),status:c.status,attempts:c.attempts,createdAt:c.createdAt,startedAt:c.startedAt,finishedAt:c.finishedAt}:w(c),a=this.db.select(i).from(c).where(b(this.filter(e,n),r?this.after(r):void 0)).orderBy(S(E(c.status,t)),S(c.createdAt),S(c.publicId));return n.limit===void 0?a:a.limit(n.limit)}after(e){let n=j`(${c.createdAt}, ${c.publicId}) < (${new Date(e.createdAt).toISOString()}::timestamptz, ${e.id})`,r=E(c.status,t);return e.active?A(k(r),b(r,n)):b(k(r),n)}record(e,t){return t?m({task:m({id:e.publicId,source:e.source,agent:e.agent,flow:e.flow,prompt:e.prompt,event:e.event}),status:e.status,attempts:e.attempts,createdAt:h(e.createdAt),startedAt:e.startedAt?h(e.startedAt):void 0,finishedAt:e.finishedAt?h(e.finishedAt):void 0}):p(e)}async list(e,t={}){return(await u(this.db,()=>this.pageQuery(e,t))).map(e=>this.record(e,t.summary))}countQuery(e,n){return this.db.select({all:j`count(*)::int`.as(`all`),active:j`(count(*) filter (where ${E(c.status,t)}))::int`.as(`active`),waiting:j`(count(*) filter (where ${C(c.status,`waiting`)}))::int`.as(`waiting`)}).from(c).where(this.filter(e,n))}async counts(e,t={}){let[n]=await u(this.db,()=>this.countQuery(e,t));return n??{all:0,active:0,waiting:0}}async listWithCounts(e,n){let r=this.db.$with(`totals`).as(this.countQuery(e,n)),i=this.db.$with(`page`).as(this.pageQuery(e,{...n,limit:n.limit??20})),a=Object.fromEntries(Object.keys(i._.selectedFields).map(e=>[e,i[e]])),o=await u(this.db,()=>this.db.with(r,i).select({...a,all:r.all,active:r.active,waiting:r.waiting}).from(r).leftJoin(i,j`true`).orderBy(S(E(a.status,t)),S(i.createdAt),S(i.publicId))),{all:s=0,active:c=0,waiting:l=0}=o[0]??{};return{items:o.filter(e=>e.publicId!==null&&e.publicId!==void 0).map(e=>this.record(e,n.summary)),counts:{all:s,active:c,waiting:l}}}async runningCount(){let[e]=await u(this.db,()=>this.db.select({value:j`count(*)::int`}).from(c).where(E(c.status,[`running`,`waiting`])));return e?.value??0}async running(){return(await u(this.db,()=>this.db.select().from(c).where(E(c.status,[`running`,`waiting`])))).map(e=>({organizationId:e.organizationId,status:p(e)}))}async appendLogs(e,t,n,r,a,o,s){let l=n.length?j`, inserted as (
|
|
85
85
|
insert into ${i} (organization_id, task_id, seq, at, level, line)
|
|
86
86
|
select ${e}, accepted.id, entry.seq, to_timestamp(entry.at / 1000.0), entry.level, entry.line
|
|
87
87
|
from accepted cross join jsonb_to_recordset(${JSON.stringify(n)}::jsonb) as entry(seq int, at bigint, level text, line text)
|
|
88
|
-
)`:
|
|
88
|
+
)`:j``,[u]=await g(this.db,j`
|
|
89
89
|
with accepted as (
|
|
90
90
|
update ${c} set log_cursor = ${a.cursor}, log_seq = ${a.seq}, log_bytes = ${a.bytes}, updated_at = ${new Date(o).toISOString()}::timestamptz
|
|
91
91
|
where ${this.fence(e,t,s)} and coalesce(log_seq, 0) = ${r.seq} and coalesce(log_cursor, -1) = ${r.cursor}
|
|
92
92
|
returning id
|
|
93
|
-
) ${l} select exists (select 1 from accepted) as accepted`);return!!u?.accepted}async readInbox(e,n,r,i){return(await u(this.db,()=>this.db.select({seq:o.seq,generation:o.generation,at:o.at,kind:o.kind,value:o.value}).from(o).innerJoin(c,C(c.id,o.taskId)).where(b(this.where(e,n),C(c.generation,r),E(c.status,t),C(o.generation,r),
|
|
93
|
+
) ${l} select exists (select 1 from accepted) as accepted`);return!!u?.accepted}async readInbox(e,n,r,i){return(await u(this.db,()=>this.db.select({seq:o.seq,generation:o.generation,at:o.at,kind:o.kind,value:o.value}).from(o).innerJoin(c,C(c.id,o.taskId)).where(b(this.where(e,n),C(c.generation,r),E(c.status,t),C(o.generation,r),j`${o.seq} > ${i}`)).orderBy(x(o.seq)).limit(100))).map(e=>({...e,at:h(e.at)}))}async appendInbox(e,n,r,i,a,s){let[l]=await g(this.db,j`
|
|
94
94
|
with next as (
|
|
95
95
|
update ${c} set inbox_seq = inbox_seq + 1 where ${this.fence(e,n,{generation:s,statuses:t})} returning id, inbox_seq, generation
|
|
96
96
|
) insert into ${o} (organization_id, task_id, seq, generation, kind, value, at)
|
|
97
|
-
select ${e}, id, inbox_seq, generation, ${r}, ${JSON.stringify(i??null)}::jsonb, ${new Date(a).toISOString()}::timestamptz from next returning seq`);return l&&{seq:l.seq,generation:s,at:a,kind:r,value:i}}async fetchInbox(e,t,n,r,i){let[a]=await u(this.db,()=>g(this.db,
|
|
97
|
+
select ${e}, id, inbox_seq, generation, ${r}, ${JSON.stringify(i??null)}::jsonb, ${new Date(a).toISOString()}::timestamptz from next returning seq`);return l&&{seq:l.seq,generation:s,at:a,kind:r,value:i}}async fetchInbox(e,t,n,r,i){let[a]=await u(this.db,()=>g(this.db,j`
|
|
98
98
|
select coalesce(jsonb_agg(jsonb_build_object('seq', i.seq, 'generation', i.generation, 'at', extract(epoch from i.at) * 1000, 'kind', i.kind, 'value', i.value) order by i.seq) filter (where i.seq is not null), '[]'::jsonb) as entries
|
|
99
99
|
from ${c} left join ${o} i on i.task_id = ${c.id} and i.generation = ${c.generation} and i.seq > ${i}
|
|
100
|
-
where ${this.fence(e,t,{tokenHash:n,attempts:r,statuses:[`running`,`waiting`]})} group by ${c.id}`));return a?.entries}async ackInbox(e,t,n,r){if(r.generation!==void 0&&r.generation!==n.generation)return!1;let[i]=await g(this.db,
|
|
100
|
+
where ${this.fence(e,t,{tokenHash:n,attempts:r,statuses:[`running`,`waiting`]})} group by ${c.id}`));return a?.entries}async ackInbox(e,t,n,r){if(r.generation!==void 0&&r.generation!==n.generation)return!1;let[i]=await g(this.db,j`
|
|
101
101
|
with current as (
|
|
102
102
|
select id from ${c} where ${this.fence(e,t,{...r,generation:n.generation,statuses:void 0})}
|
|
103
103
|
and inbox_seq >= ${n.seq} and (status in ('running', 'waiting') or (status in ('completed', 'failed', 'cancelled') and inbox_ack >= ${n.seq})) for update
|
|
@@ -113,4 +113,4 @@ import{Bn as e,a as t,c as n}from"./store-DzqXS2wT.js";import{g as r,h as i,i as
|
|
|
113
113
|
approval = case when exists(select 1 from applied where kind = 'approve' and value->>'approvalId' = ${c.approval}->>'id') then null else approval end,
|
|
114
114
|
finished_at = case when exists(select 1 from applied where kind = 'cancel') then now() else finished_at end
|
|
115
115
|
from answers where id in (select id from current)
|
|
116
|
-
) select exists (select 1 from current) as accepted`);return!!i?.accepted}async pendingInbox(){return(await u(this.db,()=>this.db.select().from(c).where(b(E(c.status,[`running`,`waiting`]),
|
|
116
|
+
) select exists (select 1 from current) as accepted`);return!!i?.accepted}async pendingInbox(){return(await u(this.db,()=>this.db.select().from(c).where(b(E(c.status,[`running`,`waiting`]),j`exists (select 1 from ${o} where ${o.taskId} = ${c.id} and ${o.generation} = ${c.generation})`)))).map(e=>({organizationId:e.organizationId,status:p(e)}))}};export{P as DrizzleQueue};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as e,bn as t}from"./dispatch-BKeAch9E.js";import{i as n}from"./cli-DWCR7iqa.js";const r=n({name:`upgrade refresh`,options:{},run:()=>e(t())});export{r as commandRefreshUpdate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{xt as e}from"./dispatch-BKeAch9E.js";import{i as t,t as n}from"./cli-
|
|
1
|
+
import{xt as e}from"./dispatch-BKeAch9E.js";import{i as t,t as n}from"./cli-DWCR7iqa.js";import{p as r}from"./output-BKeyLbvt.js";import{n as i,o as a}from"./args-BOEEdpWk.js";import o from"node:process";const s={json:i,server:a,yes:i},c=t({name:`runner remove`,globalFlags:{cwd:!1},help:{usage:`coder runner remove <id> [--server [url]] [--json]`,flags:[n]},options:s,args:1,async run({options:t,args:[n]}){let{removeRunner:r}=await import(`./runner-sUpWJ_k0.js`).then(e=>e.a);if(!n)throw new e(`invalid-option`,`Missing runner id.`);return r(n,t)},print:(e,{args:[t]})=>o.stdout.write(`Removed ${r.bold(t)}.\n`)});export{c as commandRunnerRemove,s as runnerOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{xt as e}from"./dispatch-BKeAch9E.js";import{i as t,t as n}from"./cli-
|
|
1
|
+
import{xt as e}from"./dispatch-BKeAch9E.js";import{i as t,t as n}from"./cli-DWCR7iqa.js";import{p as r}from"./output-BKeyLbvt.js";import{n as i,o as a}from"./args-BOEEdpWk.js";import o from"node:process";const s={json:i,server:a,workspace:i,yes:i},c=()=>new e(`invalid-option`,`Missing credential label.`),l=t({name:`credentials remove`,globalFlags:{cwd:!1},help:{usage:`coder credentials remove <label> [--workspace] [--server [url]] [--json]`,flags:[[`--workspace`,`the workspace credential of that label`],n]},options:s,args:1,async run({options:e,args:[t]}){let{connect:n}=await import(`./remote-miQNTVRa.js`).then(e=>e.a);if(!t)throw c();return n(e).credentials.remove(t,e)},print:(e,{args:[t]})=>o.stdout.write(`Removed ${r.bold(t)}.\n`)});export{l as commandCredentialsRemove,s as credentialOptions,c as missingLabel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{st as e}from"./dispatch-BKeAch9E.js";import{i as t}from"./cli-
|
|
1
|
+
import{st as e}from"./dispatch-BKeAch9E.js";import{i as t}from"./cli-DWCR7iqa.js";import{n,t as r}from"./args-BOEEdpWk.js";import i from"node:process";const a=t({name:`mcp remove`,helpName:`mcp rm`,help:{usage:`coder mcp rm <name> [--user] [--cwd <dir>]`,summary:"Remove `mcp.<name>` from the repo config (or the user config with --user).",flags:[[`--user`,`edit ~/.coder config`]]},options:{...r,user:n},args:1,run:({options:t,args:[n],cwd:r})=>e(r,n,t),print:({name:e,file:t})=>i.stdout.write(`Removed MCP server "${e}" from ${t}.\n`)});export{a as commandMcpRemove};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DT7IzrpZ.js";import{i as t}from"./cli-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DT7IzrpZ.js";import{i as t}from"./cli-DWCR7iqa.js";import{p as n}from"./output-BKeyLbvt.js";import{i as r}from"./models-_5LVGC3m.js";import{n as i}from"./add-CLYTF_up.js";import a from"node:process";var o=e({commandModelRemove:()=>s,printModelChange:()=>c});const s=t({name:`model remove`,help:{usage:`coder model remove <name>`,summary:`Remove a configured custom model.`,flags:[[`--workspace`,`target <repo>/.coder/config.json instead of the user file`]]},options:i,args:1,run:({options:e,args:[t],cwd:n})=>r(n,t,e),print:e=>c(`removed`,e.removed,e.file)});function c(e,t,r){a.stdout.write(`${e} ${n.cyan(t)} ${n.dim(`(${r})`)}\n`)}export{o as n,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{xt as e}from"./dispatch-BKeAch9E.js";import{i as t,t as n}from"./cli-
|
|
1
|
+
import{xt as e}from"./dispatch-BKeAch9E.js";import{i as t,t as n}from"./cli-DWCR7iqa.js";import{p as r}from"./output-BKeyLbvt.js";import{runnerOptions as i}from"./remove-BNzbUhaK.js";import a from"node:process";const o=t({name:`runner rename`,globalFlags:{cwd:!1},help:{usage:`coder runner rename <id> <name> [--server [url]] [--json]`,flags:[n]},options:i,args:2,async run({options:t,args:[n,r]}){let{updateRunner:i}=await import(`./runner-sUpWJ_k0.js`).then(e=>e.a);if(!n||!r)throw new e(`invalid-option`,`Usage: coder runner rename <id> <name>`);return i(n,{name:r},t)},print:(e,{args:[t]})=>a.stdout.write(`Renamed ${t} to ${r.bold(e.name)}.\n`)});export{o as commandRunnerRename};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ln as e,xt as t}from"./dispatch-BKeAch9E.js";import{i as n}from"./cli-
|
|
1
|
+
import{ln as e,xt as t}from"./dispatch-BKeAch9E.js";import{i as n}from"./cli-DWCR7iqa.js";import{c as r,m as i,p as a,s as o}from"./output-BKeyLbvt.js";import{l as s,t as c}from"./args-BOEEdpWk.js";import{gateLine as l,gateRunningLine as u,paintPlain as d,printLedger as f,resultJson as p,stepSymbol as m,taskLabel as h,taskLine as g}from"./watch-eE2XiwsC.js";import _ from"node:process";const v=n({name:`flow result`,help:{usage:`coder flow result [run-id] [--tail <n|all>] [--json]`,summary:`Show a flow run's status and result, with its tasks, gates, and token ledger.
|
|
2
2
|
--tail <n> caps the step rows (0 for the result alone). Defaults to the most
|
|
3
3
|
recent run. To watch a run live, prefer \`coder flow watch\`.`,flags:[[`--tail <n|all>`,`show the last n step rows (default: all; 0 hides them)`]],examples:[[`coder flow result --tail 0`,`the most recent run's result, no step rows`]]},options:{...c,tail:s},args:1,async run({options:e,args:[n]}){let{runResult:r}=await import(`./executor-BvAA7Cgw.js`).then(e=>e.y),i=r(n);if(!i&&!e.json)throw new t(`flow-failed`,n?`No flow run "${n}".`:`No flow runs yet.`,{hint:`Run one: coder flow run <name>`});return i},json:e=>e&&p(e),print:(e,{options:t})=>b(e,t.tail)});function y(e,t=!1){let n=a;if(t)return e.map(d);let r=(t,n)=>{for(let r=t+1;r<e.length;r+=1){let t=e[r].depth;if(t<n)return!1;if(t===n)return!0}return!1};return e.map((e,t)=>{let i=``;for(let n=0;n<e.depth;n+=1)i+=r(t,n)?`│ `:` `;return i+=e.log?`│ `:r(t,e.depth)?`├─`:`└─`,`${n.dim(i)} ${e.body}`})}function b(t,n=`all`){let s=a,c=!_.stdout.isTTY;_.stdout.write(`${s.bold(`Flow`)} ${s.cyan(t.name)} ${s.dim(`(${t.runId})`)}. ${s.bold(i(t.status))}\n`);let d=t.steps,p=d.filter(t=>e.includes(t.status)).length,v=t.status===`running`?`${p}/${d.length} tasks`:`${t.taskCount} tasks`;if(_.stdout.write(`${s.dim(`started ${t.startedAt}${t.endedAt?` · ended ${t.endedAt}`:``} · ${v}`)}\n`),n!==0){let e=new Map,r=new Map,i=new Map,a=[];for(let n of t.events)if(n.kind===`task-start`){let t={name:h(n.name,n.prompt),engine:n.engine,depth:n.depth??0};e.set(n.taskId,t),r.set(n.taskId,t)}else if(n.kind===`task-end`){r.delete(n.taskId);let t=e.get(n.taskId);a.push({depth:t?.depth??0,body:g(m(n.status,c),t?.name??null,n.taskId,n.tokens,t?.engine)})}else if(n.kind===`gate-start`)i.set(n.gateId,{cmd:n.cmd,depth:n.depth??0});else if(n.kind===`gate`)n.gateId&&i.delete(n.gateId),a.push({depth:n.depth??0,body:l(n,c)});else if(n.kind===`log`)for(let e of n.message.split(`
|
|
4
4
|
`))a.push({depth:n.depth??0,body:s.light(e),log:!0});else n.kind===`flow-start`&&a.push({depth:n.depth-1,body:s.bold(`flow ${n.name}`)});for(let[e,t]of r)a.push({depth:t.depth??0,body:g(m(`running`,c),t.name,e,null,t.engine)+(c?``:` ${s.light(`running`)}`)});for(let e of i.values())a.push({depth:e.depth,body:u(e.cmd,m(`running`,c))+(c?``:` ${s.light(`running`)}`)});if(!a.length)for(let e of n===`all`?d:d.slice(-n))a.push({depth:0,body:g(m(e.status,c),e.name,e.taskId??`-`,e.tokens)});let o=y(a,c),f=n===`all`?o:o.slice(-n);f.length&&_.stdout.write(`\n${f.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Dn as e,Nt as t,cn as n,wt as r}from"./dispatch-BKeAch9E.js";import{i,r as a}from"./cli-
|
|
1
|
+
import{Dn as e,Nt as t,cn as n,wt as r}from"./dispatch-BKeAch9E.js";import{i,r as a}from"./cli-DWCR7iqa.js";import{S as o,a as s,d as c,m as l,o as u,p as d,s as f,u as p,x as m,y as h}from"./output-BKeyLbvt.js";import{i as g,l as _,n as v,s as y,t as b}from"./args-BOEEdpWk.js";import x from"node:process";const S={server:g,workspace:y,yes:v};function C(e,t,n,r=d){let i=e?.error?.message??t;return e?.finalMessage||(i?`${r.red(`error:`)} ${i}`:n)}const w=1e3;function T(e,t=d,{truncate:n=!0}={}){let r=e=>e.split(`
|
|
2
2
|
`).map(e=>` ${t.dim(e)}`);return!n||e.length<=w?[t.dim(`prompt:`),...r(e)]:[t.dim(`prompt:`),...r(e.slice(0,500).trimEnd()),t.light(` … <${e.length-w} chars trimmed> …`),...r(e.slice(-500).trimStart())]}function E(e,t=d){let n=[];e.permissions&&n.push([`perms`,e.permissions]),e.cwd&&n.push([`cwd`,e.cwd]);for(let t of e.addDirs??[])n.push([`add-dir`,t]);return n.map(([e,n])=>`${t.dim(e.padEnd(8))} ${n}`)}function D(e,t){if(t)return e.createdAt?`started ${s(r(e.createdAt))} ago`:``;let n=e.createdAt&&e.completedAt?Date.parse(e.completedAt)-Date.parse(e.createdAt):null;return[e.completedAt?`finished ${s(r(e.completedAt))} ago`:``,n!==null&&n>=0?`took ${s(n)}`:``].filter(Boolean).join(` · `)}function O(e,{status:r,tokens:i,tokenModel:a,files:o,live:s=!1,style:u=d}){let f=D(e,n.includes(e.status)||r===`waiting-approval`),m=e=>u.dim(e.padEnd(8));return[`${m(`task`)} ${u.cyan(e.id)}`,...e.name?[`${m(`name`)} ${e.name}`]:[],`${m(`status`)} ${l(r)}${f?` ${u.dim(`(${f})`)}`:``}`,`${m(`engine`)} ${t(e)}`,...E(e,u),...i?[`${m(`tokens`)} ${s?c(i):p(i,a??e.model)}${s?u.dim(` (so far)`):``}`]:[],...k(o,m,u)]}const k=(e,t,n)=>e?.length?[`${t(`files`)} ${e.join(`, `)} ${n.dim(`(shell edits not included)`)}`]:[];function A(e,{tokens:t,tokenModel:n,files:r,statusChanged:i=!0,style:a=d}){let o=e=>a.dim(e.padEnd(8)),c=e.createdAt&&e.completedAt?Date.parse(e.completedAt)-Date.parse(e.createdAt):null;return[...i?[`${o(`status`)} ${l(e.status)}${c!==null&&c>=0?` ${a.dim(`(took ${s(c)})`)}`:``}`]:[],...t?[`${o(`tokens`)} ${p(t,n??e.model)}`]:[],...k(r,o,a)]}function j(e,t=300,{plain:n=!1,style:r=d}={}){if(e.length<=t)return e;let i=`<${e.length-t} more chars>`;return`${e.slice(0,t)} ${n?i:r.dim(i)}`}const M=` `.repeat(8),N={assistant:`●`,reasoning:`✻`,tool:`→`,"tool-result":` `,usage:`·`,status:`·`,info:`·`,error:`✘`,steer:`⚑`};function P(e,t){let n=/^\x1b\[[0-9;]*m/.exec(t(``))?.[0];return t(n&&e.includes(F)?e.split(F).join(`${F}${n}`):e)}const F=`\x1B[0m`;function I(e,t,n,r,i=r.dim){if(!e)return``;let a=(e.length>t?e.slice(0,t):e).split(`
|
|
3
3
|
`).map(e=>P(e,i));return e.length>t&&(a[a.length-1]+=` ${r.light(`<${e.length-t} more chars>`)}`),a.length>n?[...a.slice(0,n),r.light(`… +${a.length-n} more lines`)].join(`
|
|
4
4
|
`):a.join(`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{i as e}from"./cli-
|
|
1
|
+
import{i as e}from"./cli-DWCR7iqa.js";import{printFollow as t,printRunSummary as n}from"./watch-eE2XiwsC.js";import{RUN_FLAGS as r,hooks as i,parseRunArgs as a,printDetached as o,runOptions as s}from"./run-BWbabvub.js";const c=e({name:`flow resume`,help:{usage:`coder flow resume [run-id] [--wait] [--json] [--dry-run]`,summary:`Re-run a flow from its journal: finished steps replay instantly, the first
|
|
2
2
|
changed or new step onward runs live. Defaults to the most recent run.
|
|
3
3
|
Accepts the same flags as flow run.`,flags:[[`--wait`,`follow the run in the foreground (Ctrl-C detaches; it keeps running)`],[`--concurrency <n>`,`tasks running at once`],[`--max-tasks <n>`,`total tasks the run may dispatch`]],examples:[[`coder flow resume`,`continue the most recent run`]]},options:r,args:1,async run({options:e,args:[n],cwd:r}){let{resumeRun:o}=await import(`./executor-BvAA7Cgw.js`).then(e=>e.y),c=await o(n,{...s(e,r),...e.args===void 0?{}:{args:a(e.args,[])}},i(e));return c.status===`running`&&c.watch&&await t(c.watch,e),c},print:e=>e.status===`running`?o(e):n(e)});export{c as commandResume};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{xt as e}from"./dispatch-BKeAch9E.js";import{i as t}from"./cli-
|
|
1
|
+
import{xt as e}from"./dispatch-BKeAch9E.js";import{i as t}from"./cli-DWCR7iqa.js";import{c as n,n as r,s as i,t as a}from"./args-BOEEdpWk.js";import o from"node:process";import*as s from"zod/mini";function c(e){let{summary:t}=e,n=`\`${t.baseSha}\`${t.worktree?` through the working tree`:`..\`${t.headSha}\``}`,r=(t.warnings??[]).flatMap(e=>[e,``]);if(t.worktree&&!t.files)return`${[`# Coder review`,``,`Nothing to review from ${n}.`,``,...r,`Flow run: \`${e.runId}\``].join(`
|
|
2
2
|
`)}\n`;let i=[`# Coder review`,``,`Reviewed ${n}${t.model?` with ${t.model}`:``} in ${(t.elapsedMs/1e3).toFixed(1)}s.`,``,...r,...e.findings.length?e.findings.flatMap(e=>[`- **${e.severity.toUpperCase()}** [\`${e.file}:${e.line}\`]. ${e.summary}`,` ${e.failure_scenario}`]):[`No findings after checking against the repository.`]];return t.posted!==void 0&&i.push(``,`Posted ${t.posted} new inline comment${t.posted===1?``:`s`}.`),i.push(``,`Flow run: \`${e.runId}\``),`${i.join(`
|
|
3
3
|
`)}\n`}const l=t({name:`review`,help:{usage:`coder review [--base <ref>] [--head <ref>] [--pr <n|url>] [--since <sha>] [--path <p>]... [--exclude <p>]... [--post] [--json|--md] [--engine <name>] [--model <alias|slug>] [--effort <low|medium|high>] [--cwd <dir>]`,summary:`Review changed code with a read-only agent. Every reported finding is checked
|
|
4
4
|
against the repository. Runs the built-in \`review\` flow. A local review covers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./cli-
|
|
1
|
+
import{i as e}from"./cli-DWCR7iqa.js";import{n as t}from"./args-BOEEdpWk.js";import n from"node:process";const r=e({name:`server rotate-key`,globalFlags:{cwd:!1},help:{usage:`coder server rotate-key [--json]`,summary:`Re-seal stored app, installation, engine, and linked user secrets with the current key.`,env:[[`SERVER_ENCRYPTION_KEY`,`the new key`],[`SERVER_ENCRYPTION_KEY_PREVIOUS`,`the old key, still accepted while rotating`]]},options:{json:t},run:async()=>{let{rotateKey:e}=await import(`./maintenance-DkLVtqM7.js`).then(e=>e.t);return e()},json:({moved:e})=>({ok:!0,moved:e}),print:({moved:e})=>n.stdout.write(`Re-sealed ${e} secret${e===1?``:`s`}.\n`)});export{r as commandServerRotateKey};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{xt as e}from"./dispatch-BKeAch9E.js";import{i as t}from"./cli-
|
|
1
|
+
import{xt as e}from"./dispatch-BKeAch9E.js";import{i as t}from"./cli-DWCR7iqa.js";import{p as n,s as r}from"./output-BKeyLbvt.js";import{n as i,s as a,t as o}from"./args-BOEEdpWk.js";import{FlowStepRenderer as s,printFollow as c,printRunSummary as l}from"./watch-eE2XiwsC.js";import u from"node:process";const d={...o,args:a,wait:i,concurrency:a,"max-tasks":a,"dry-run":i};function f(t){let n={};for(let r of t){let t=r.indexOf(`=`);if(t===-1)throw new e(`invalid-option`,`Invalid argument "${r}": expected key=value.`,{hint:`Help: coder flow run --help`});let i=r.slice(0,t),a=r.slice(t+1);try{n[i]=JSON.parse(a)}catch{n[i]=a}}return n}function p(t,n){if(t!==void 0)try{return JSON.parse(t)}catch(t){throw new e(`invalid-option`,`Invalid --args JSON: ${t instanceof Error?t.message:String(t)}`)}return n.length?f(n):{}}const m=e=>e?Number(e):void 0,h=(e,t)=>({cwd:t,dryRun:e[`dry-run`],concurrency:m(e.concurrency),maxTasks:m(e[`max-tasks`]),argv:u.argv.slice(2),wait:e.wait}),g=e=>e[`dry-run`]&&!e.json?v():{},_=t({name:`flow run`,help:{usage:`coder flow run <name|path> [--args '<json>' | key=value...] [--wait] [--concurrency N] [--max-tasks N] [--json] [--dry-run]`,summary:`Run a flow: a TypeScript file that orchestrates many coder tasks with gates,
|
|
2
2
|
journaling, and resume. Prints the run id and orchestrates in the background;
|
|
3
3
|
--wait follows the run in the foreground with live progress (Ctrl-C detaches;
|
|
4
4
|
it keeps running), and \`coder flow watch\` shows the same lines any time.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e}from"./prompt-CEuBMNhk.js";import{i as t,r as n}from"./cli-
|
|
1
|
+
import{p as e}from"./prompt-CEuBMNhk.js";import{i as t,r as n}from"./cli-DWCR7iqa.js";import{p as r,s as i}from"./output-BKeyLbvt.js";import{i as a,n as o,s,t as c}from"./args-BOEEdpWk.js";import{printOutcome as l}from"./result-D8DsvJDu.js";import{printLine as u}from"./watch-BcMQXGYO.js";import d from"node:process";const f={...c,flow:s,server:a,workspace:s,wait:o,task:s,yes:o},p=t({name:`agent run --task`,options:f,run:async({options:e,cwd:t})=>{let{agents:n}=await import(`./agent-hw3zKw8y.js`).then(e=>e.t);return n.runTask(e.task,{cwd:t})}}),m=t({name:`agent run`,help:{usage:`coder agent run <agent> <file> [--server [url] [--wait]] [--flow <name>] [--json] [--cwd <dir>]`,summary:`Run a recorded platform event (AgentEvent JSON) through an agent. With --server it goes through your Coder server exactly like a webhook: real app, tokens, runner, and the reply is posted. Without it the engine runs here on the agent's prompt and this checkout, platform tools off, and the reply is printed.`,flags:[n,[`--wait`,`with --server: follow the task log here until it finishes, then print the reply`],[`--flow <name>`,`override the matched flow`]],examples:[[`coder agent run helper sample-slack-mention.json`,`offline: print what the agent would reply`],[`coder agent run helper event.json --server`,`for real, through the server`]]},options:f,args:2,run:async({options:e,args:[t,n],cwd:i})=>{let{agents:a}=await import(`./agent-hw3zKw8y.js`).then(e=>e.t);return a.run(t,n,{...e,cwd:i,organization:e.workspace,...e.json?{}:{onLog:e=>u(e,r),onDone:e=>l(e,r)}})},json:e=>Array.isArray(e)&&e.length===1?e[0]:e,print(t,{options:n}){if(!Array.isArray(t)){if(`tasks`in t){if(!t.tasks.length)return void d.stdout.write(`The server accepted the event but no agent matched it.
|
|
2
2
|
`);d.stdout.write(`${r.bold(`Queued on the server`)} as task ${t.tasks.join(`, `)}.\n\n${i([`Watch it: coder task watch ${t.tasks[0]} --server ${e(n.server)}`],r)}\n`);return}t.reply===void 0?t.result!==void 0&&d.stdout.write(`${JSON.stringify(t.result,null,2)}\n`):d.stdout.write(`${t.reply.trim()}\n`)}}}),h=Object.assign(e=>(e.some(e=>e===`--task`||e.startsWith(`--task=`))?p:m)(e),{commandName:`agent run`,help:m.help});export{h as commandAgentRun};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as e,i as t,n,p as r}from"./cli-
|
|
1
|
+
import{d as e,i as t,n,p as r}from"./cli-DWCR7iqa.js";import{p as i,r as a,s as o,u as s}from"./output-BKeyLbvt.js";import{c,i as l,n as u,s as d,t as f}from"./args-BOEEdpWk.js";import{printOutcome as p}from"./result-D8DsvJDu.js";import{printLine as m}from"./watch-BcMQXGYO.js";import{TASK_FLAGS as h}from"./task-b2BK481M.js";import g from"node:process";function _(t){let n=e([{usage:`coder task result ${t} --wait`,blurb:`run in a background shell; returns with the answer or a pending approval`},{usage:`coder task steer ${t} "<follow-up>"`,blurb:`steer the task with a message (use 'ask' without interrupting main thread)`},{usage:`coder task stop ${t}`,blurb:`stop the task`},{usage:`coder task list`,blurb:`recent tasks`},{usage:`coder task --help`,blurb:`all task commands`}],i,i.blue);return[...r(`Next step`,n.slice(0,1),i),...r(`Related`,n.slice(1),i)].join(`
|
|
2
2
|
`)}function v(e,t){g.stdout.write(`${i.dim(`[coder]`)} task ${i.blue(e)} started in the background (${t}).\n`),g.stdout.write(`${_(e)}\n`)}function y(e){g.stderr.write(`${i.dim(`[coder]`)} Task ${i.cyan(e)} started and is waiting to finish. Press Ctrl-C to detach. It keeps running.\n`),g.stderr.write(`${_(e)}\n`)}function b(e){g.stderr.write(`\n${i.dim(`[coder] Detached. The task is still running.`)}\n\n${o([`Wait for the answer: coder task result ${e} --wait`],a)}\n`)}function x(e){g.stdout.write(`\n${e.finalMessage||(e.error?`${i.red(`error:`)} ${e.error}`:`(no final message)`)}\n\n`);let t=e.tokens?` tokens=${s(e.tokens,e.model)}`:``;g.stderr.write(`${i.dim(`[coder] task=${e.taskId} status=${e.status}${t}`)}\n`)}const S=t({name:`task run`,help:{usage:`coder task run "<task text>"`,summary:`Dispatch a coding task to the configured engine. Backgrounds by default and\nprints a task id; --wait runs in the foreground and prints the answer.\nShortcut: \`coder run "<text>"\`.\n\nWriting a task: one task per focused goal, independent goals as parallel runs.\nThe worker starts with nothing but the text, so include the goal, file paths,\nconstraints and any context only you have. Delegate rather than doing the work\nyourself first, however small it looks.\n\n${n}`,flags:[[`--output-schema <json>`,`JSON Schema for the task answer`],[`--name <name>`,`label the task (shown in list/result)`],[`--agent <id>`,`run as that agent: its system.md, engine settings, MCP servers and flows; flags override them`],[`--system <text>`,`standing instructions prepended to the task (kept out of prompt previews)`],...h,[`--server [url] [--workspace <slug>]`,`run the task on your Coder server and follow it here (--background prints its id); --resume continues a finished server task`],[`--repo <owner/name>`,`with --server: check out a repo from the workspace's installs`],[`--runner <name>`,`with --server: where it runs (a runner kind or a registered runner)`]],exitCodes:[[`0`,`The task started, or --wait printed a successful answer.`],[`1`,`Dispatch or the task failed.`],[`3`,`No engine could start; follow fallback.instructions in the JSON payload.`],[`4`,`An approval is pending; answer it, then run result --wait again.`],[`130`,`The foreground wait was detached and the task is still running.`]],examples:[[`coder run "add a /health endpoint"`,`dispatch in the background, print a task id`],[`coder result <task-id> --wait`,`then block until it finishes and print the answer`],[`coder run --wait "fix the failing test"`,`or block on the run itself`],[`coder task run --model luna --system "tests live in test/, don't touch anything outside of it" "rename foo to bar"`,`pick an engine via its model alias; --system adds standing instructions`],[`coder task run --agent reviewer "review the last commit"`,`run a repo agent from .coder/agents/reviewer`],[`coder run --add-dir ../api --add-dir ../shared "update the client for the new endpoint"`,`let the task reach sibling repos too`]]},options:{...f,agent:d,"output-schema":d,engine:d,model:d,effort:d,permissions:d,resume:d,host:d,name:d,system:d,mcp:d,"add-dir":c,background:u,wait:u,"simulate-approval":u,server:l,workspace:d,yes:u,repo:d,runner:d},args:1/0,async run({options:e,args:t}){let{tasks:n}=await import(`./task-C6VAg5WU.js`).then(e=>e.t),r=e.json,a;return g.on(`SIGINT`,()=>{a&&b(a),g.exit(130)}),n.run(t.join(` `).trim(),{cwd:e.cwd,agent:e.agent,outputSchema:e[`output-schema`]?JSON.parse(e[`output-schema`]):void 0,engine:e.engine,model:e.model,effort:e.effort,permissions:e.permissions,name:e.name,system:e.system,resume:e.resume,mcp:e.mcp,addDirs:e[`add-dir`],wait:e.server===void 0?e.wait:!e.background,simulateApproval:e[`simulate-approval`],repo:e.repo,runner:e.runner,server:e.server,yes:e.yes,organization:e.workspace,onFallback:({engine:e,detail:t,next:n})=>g.stderr.write(`[coder] ${e} failed to start (${t}); falling back to ${n}.\n`),onNote:e=>g.stderr.write(`[coder] ${e}\n`),onWaiting:e=>{a=e,r||y(e)},onLog:e=>r?g.stdout.write(`${JSON.stringify(e,null,2)}\n`):m(e,i)})},print(e,{options:t}){if(`attempts`in e)return t.background?void g.stdout.write(`${e.task.id}\n`):p(e,i);t.wait?x(e):v(e.taskId,e.status)},exit:(e,{options:t})=>(`attempts`in e?!t.background:t.wait)?e.status===`completed`?0:1:void 0});export{S as commandTask};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as e}from"./cli-DWCR7iqa.js";const t=e(`runner`,{add:async()=>(await import(`./add-DkpUwhtO.js`)).commandRunnerAdd,default:async()=>(await import(`./default-De8FXiWz.js`)).commandRunnerDefault,test:async()=>(await import(`./test-BrSrhop9.js`)).commandRunnerTest,serve:async()=>(await import(`./serve-Ck95047c.js`)).commandRunnerServe,list:async()=>(await import(`./list-DzGuMkQy.js`)).commandRunnerList,rename:async()=>(await import(`./rename-Bhcb4t9F.js`)).commandRunnerRename,remove:async()=>(await import(`./remove-BNzbUhaK.js`)).commandRunnerRemove},{menu:[{usage:`add <kind>`,blurb:`connect a runner`},{usage:`default <id>`,blurb:`set the default in its scope`},{usage:`test <id>`,blurb:`check a runner connection`},{usage:`serve --url <public url>`,blurb:`run your server's tasks on this machine`},{usage:`list`,blurb:`list your runners and the workspace's`},{usage:`rename <id> <name>`,blurb:`rename a runner`},{usage:`remove <id>`,blurb:`remove a runner`}],description:[`Run your Coder server's tasks on your own machine, reached through any tunnel.`],exampleCommand:`runner serve`});export{t as commandRunner};
|
package/dist/sdk.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CustomModelConfig, D as Permission, E as McpConfigEntry, S as CoderConfig, T as McpAddOptions, _ as RunnerRow, b as RunnerUpdate, c as TurnResult, d as LocalFolder, f as LocalFolders, g as RunnerPairing, h as RunnerKind, l as TaskLogEntry, m as RunnerInput, n as Availability, o as Task, p as ProbeResult, s as TaskStatus$1, t as Approval, u as TokenUsage, v as RunnerSpec, w as Effort, x as TaskTurn, y as RunnerTest } from "./types-
|
|
1
|
+
import { C as CustomModelConfig, D as Permission, E as McpConfigEntry, S as CoderConfig, T as McpAddOptions, _ as RunnerRow, b as RunnerUpdate, c as TurnResult, d as LocalFolder, f as LocalFolders, g as RunnerPairing, h as RunnerKind, l as TaskLogEntry, m as RunnerInput, n as Availability, o as Task, p as ProbeResult, s as TaskStatus$1, t as Approval, u as TokenUsage, v as RunnerSpec, w as Effort, x as TaskTurn, y as RunnerTest } from "./types-I5Cwtl_K.js";
|
|
2
2
|
import { ReviewArgs, ReviewResult } from "./flow/builtin/review.js";
|
|
3
|
-
import { a as readTurnResults, b as FlowRecord, c as archiveRuns, d as RunSummary, f as StopSummary, i as readTask, l as deleteRuns, n as flowSdk, o as CoderError, r as TaskResult, s as RunResult$1, u as RunOptions, v as DiscoveredFlow, x as FlowStep, y as FlowEvent } from "./index-
|
|
3
|
+
import { a as readTurnResults, b as FlowRecord, c as archiveRuns, d as RunSummary, f as StopSummary, i as readTask, l as deleteRuns, n as flowSdk, o as CoderError, r as TaskResult, s as RunResult$1, u as RunOptions, v as DiscoveredFlow, x as FlowStep, y as FlowEvent } from "./index-CZjFX5zV.js";
|
|
4
4
|
import "zod/mini";
|
|
5
5
|
import { Message, SerializedMessage, SerializedThread } from "chat";
|
|
6
6
|
import "drizzle-orm";
|
package/dist/sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as e,X as t,Z as n,it as r,ot as i,rt as a,st as o,w as s,xt as c}from"./dispatch-BKeAch9E.js";import{n as l,r as u,s as ee,t as d}from"./remote-miQNTVRa.js";import{n as f}from"./executor-BvAA7Cgw.js";import{n as p}from"./agent-
|
|
1
|
+
import{T as e,X as t,Z as n,it as r,ot as i,rt as a,st as o,w as s,xt as c}from"./dispatch-BKeAch9E.js";import{n as l,r as u,s as ee,t as d}from"./remote-miQNTVRa.js";import{n as f}from"./executor-BvAA7Cgw.js";import{n as p}from"./agent-hw3zKw8y.js";import{t as m}from"./docs-BX65z2Iu.js";import{a as h,i as g,n as _,o as v,r as y,s as b,t as x}from"./models-_5LVGC3m.js";import{n as S}from"./task-C6VAg5WU.js";import C from"./flow/index.js";import{i as w,n as T,o as E,r as D,s as O,t as k}from"./runner-sUpWJ_k0.js";import{t as A}from"./serve-BTeomYxW.js";import{t as j}from"./github-actions-DwUzm4hC.js";import{n as M}from"./apps-eujHiNca.js";import{n as N,r as P}from"./maintenance-DkLVtqM7.js";import{r as F,t as I}from"./serve-DA5I2qXj.js";import L from"node:path";import R from"node:process";function z(e){return e?L.resolve(e):R.cwd()}const B=S,V={add:(e,t)=>x(z(t.cwd),e,t),update:(e,t)=>b(z(t.cwd),e,t),remove:(e,t={})=>g(z(t.cwd),e,t),list:(e={})=>y(z(e.cwd)),alias:(e,t,n={})=>_(z(n.cwd),e,t,n),unalias:(e,t={})=>v(z(t.cwd),e,t),disable:(e,t={})=>h(z(t.cwd),e,!0,t),enable:(e,t={})=>h(z(t.cwd),e,!1,t)},H={get:(e,n={})=>t(z(n.cwd),e),set:(e,t,r={})=>n(z(r.cwd),e,t,r)},U={add:(e,t)=>a(z(t.cwd),e,t),addJson:(e,t,n={})=>r(z(n.cwd),e,t,n),list:(e={})=>i(z(e.cwd)),remove:(e,t={})=>o(z(t.cwd),e,t)};function W(e=[],t={}){return s(z(t.cwd),{hosts:e})}function G(t={}){return e(t)}function K(e,t={}){return m(e,t)}const q={async run(e={}){let t=await f(`review`,{cwd:e.cwd,args:e});return{...t.result,runId:t.runId}}},J=ee,Y={serve:I,migrate:N,rotateKey:P,workflow:()=>j,app:{create:M},handler:F},X={list:(e={})=>l(e).credentials.list(),add:d,remove:(e,t={})=>l(t).credentials.remove(e,t),default:(e,t={})=>l(t).credentials.setDefault(e,t),login:u},Z={list:(e={})=>l(e).folders.list(),check:(e,t={})=>l(t).folders.check(e)},Q={list:T,add:k,pair:D,update:O,default:(e,t={})=>O(e,{default:!0},t),test:E,rename:(e,t,n={})=>O(e,{name:t},n),remove:w,serve:A},$=p;var te={task:B,flow:C,model:V,config:H,mcp:U,setupHost:W,upgrade:G,docs:K,review:q,auth:J,agent:$,credentials:X,folders:Z,runner:Q,server:Y};export{c as CoderError,$ as agent,J as auth,H as config,X as credentials,te as default,K as docs,C as flow,Z as folders,U as mcp,V as model,q as review,Q as runner,Y as server,W as setupHost,B as task,G as upgrade};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{qt as e,xt as t}from"./dispatch-BKeAch9E.js";import{i as n}from"./prompt-CEuBMNhk.js";import{i as r}from"./cli-
|
|
2
|
-
`);for(let e of t.warnings)l.stdout.write(` ${r.yellow(`!`)} ${e}\n`);if(t.cacheMigration?.then(e=>{(e.tasks||e.flows||e.files)&&l.stdout.write(`\n moved ${e.tasks.toLocaleString(`en-US`)} archived tasks to ${e.cache}\n`)}).catch(e=>l.stderr.write(`\n Cache migration failed: ${e instanceof Error?e.message:String(e)}\n`)),t.mode===`memory`&&l.stdout.write(`\n${a([`the CLI reaches this server with its token in ADMIN_TOKEN: coder task list --server ${t.publicUrl}`],r)}\n`),t.dashboard){let e=l.stdout.isTTY&&n(t.dashboard);l.stdout.write(e?`\nOpening the dashboard in your browser. If it doesn't open, go to:\n ${t.dashboard}\n`:`\n ${r.light(`dashboard`)} ${t.dashboard}\n`)}}const f=r({name:`server serve`,help:{usage:`coder server serve [--port <n>] [--host <address>] [--memory] [--runner <name>] [--json] [--cwd <dir>]`,summary:`Run the Coder server on Bun: the address platforms deliver events to, the dashboard, and the worker that runs tasks. With DATABASE_URL it is a full server with sign-in and workspaces. Without one it is the dashboard for this machine's CLI: its config, agents, tasks and engine logins, on loopback only. --memory makes a throwaway test server that keeps everything in memory. Configured through the environment; every variable is in coder docs self-host. It never migrates the database itself: coder server migrate does.`,flags:[[`--port <n>`,`listen port (default: PORT, else the port in a localhost PUBLIC_URL, else 8787)`],[`--host <address>`,`listen address (default: HOST, else 127.0.0.1 without a database, else every interface)`],[`--memory`,`a throwaway test server: everything in memory, no sign-in, admin token only`],[`--runner <name>`,`local, local-docker, vercel-sandbox, github-actions, or http`]],env:[[`PUBLIC_URL`,`the address platforms and browsers reach the server at (default http://localhost:<port>)`],[`PORT`,`listen port, as hosts set it (default 8787)`],[`HOST`,`listen address, as --host`],[`DATABASE_URL`,`Postgres, set up by coder server migrate; turns on sign-in and workspaces`],[`AUTH_WULAR_URL`,`the Wular Auth issuer people sign in with (default https://auth.wular.ai)`],[`SERVER_ENCRYPTION_KEY`,`encrypts stored secrets and derives the sign-in keys; required with DATABASE_URL (openssl rand -base64 32)`],[`RUNNER`,`where tasks run: local (default), local-docker, vercel-sandbox, github-actions, http`],[`MAX_TASKS, TASK_TIMEOUT, TASK_STALL, TASK_ATTEMPTS`,`runner capacity and lifecycle limits`],[`ADMIN_TOKEN`,`local and memory servers: the dashboard and CLI key; minted and shown when unset`],[`CODER_CACHE_HOME`,`archived tasks, flows and usage (default OS cache directory/wular-coder)`],[`WORK_DIR`,`where tasks check out repositories`],[`SERVER_NAME`,`what the dashboard calls this server (default Coder)`]],examples:[[`PUBLIC_URL=https://abc.ngrok.app coder server serve`,`receive GitHub and Slack events through a tunnel; the tunnel serves only their webhooks and callbacks`],[`PUBLIC_URL=https://agents.example.com DATABASE_URL=postgres://... coder server serve`,`on your own host, backed by Postgres`]]},options:{...c,port:u.optional(u.coerce.number().check(u.int(),u.positive())),host:s,runner:s,memory:o},async run({options:e,cwd:n}){let{rerunUnderBun:r}=await import(`./env-CRf6wkM2.js`).then(e=>e.t);if(await r(),e.memory&&!l.env.ADMIN_TOKEN&&!l.stdout.isTTY)throw new t(`invalid-option`,`Memory server needs an admin token: set ADMIN_TOKEN, or run in a terminal to get a printed one.`);let{serve:i}=await import(`./serve-
|
|
1
|
+
import{qt as e,xt as t}from"./dispatch-BKeAch9E.js";import{i as n}from"./prompt-CEuBMNhk.js";import{i as r}from"./cli-DWCR7iqa.js";import{p as i,s as a}from"./output-BKeyLbvt.js";import{n as o,s,t as c}from"./args-BOEEdpWk.js";import l from"node:process";import*as u from"zod/mini";function d(t){let r=i,o=[...t.publicUrl===t.address?[]:[[`public`,t.publicUrl]],[`store`,t.database??(t.mode===`local`?e():t.store)],[`runner`,t.runner],...t.signIn?[[`sign-in`,t.signIn]]:[],...t.mintedToken?[[`token`,t.mintedToken]]:[]],s=Math.max(...o.map(([e])=>e.length))+2;l.stdout.write(`${r.bold({local:`Coder local server`,memory:`Coder test server`,cloud:`Coder server`}[t.mode])} ${r.dim(`listening on ${t.address}`)}\n`);for(let[e,t]of o)l.stdout.write(` ${r.light(e.padEnd(s))}${t}\n`);t.warnings.length&&l.stdout.write(`
|
|
2
|
+
`);for(let e of t.warnings)l.stdout.write(` ${r.yellow(`!`)} ${e}\n`);if(t.cacheMigration?.then(e=>{(e.tasks||e.flows||e.files)&&l.stdout.write(`\n moved ${e.tasks.toLocaleString(`en-US`)} archived tasks to ${e.cache}\n`)}).catch(e=>l.stderr.write(`\n Cache migration failed: ${e instanceof Error?e.message:String(e)}\n`)),t.mode===`memory`&&l.stdout.write(`\n${a([`the CLI reaches this server with its token in ADMIN_TOKEN: coder task list --server ${t.publicUrl}`],r)}\n`),t.dashboard){let e=l.stdout.isTTY&&n(t.dashboard);l.stdout.write(e?`\nOpening the dashboard in your browser. If it doesn't open, go to:\n ${t.dashboard}\n`:`\n ${r.light(`dashboard`)} ${t.dashboard}\n`)}}const f=r({name:`server serve`,help:{usage:`coder server serve [--port <n>] [--host <address>] [--memory] [--runner <name>] [--json] [--cwd <dir>]`,summary:`Run the Coder server on Bun: the address platforms deliver events to, the dashboard, and the worker that runs tasks. With DATABASE_URL it is a full server with sign-in and workspaces. Without one it is the dashboard for this machine's CLI: its config, agents, tasks and engine logins, on loopback only. --memory makes a throwaway test server that keeps everything in memory. Configured through the environment; every variable is in coder docs self-host. It never migrates the database itself: coder server migrate does.`,flags:[[`--port <n>`,`listen port (default: PORT, else the port in a localhost PUBLIC_URL, else 8787)`],[`--host <address>`,`listen address (default: HOST, else 127.0.0.1 without a database, else every interface)`],[`--memory`,`a throwaway test server: everything in memory, no sign-in, admin token only`],[`--runner <name>`,`local, local-docker, vercel-sandbox, github-actions, or http`]],env:[[`PUBLIC_URL`,`the address platforms and browsers reach the server at (default http://localhost:<port>)`],[`PORT`,`listen port, as hosts set it (default 8787)`],[`HOST`,`listen address, as --host`],[`DATABASE_URL`,`Postgres, set up by coder server migrate; turns on sign-in and workspaces`],[`AUTH_WULAR_URL`,`the Wular Auth issuer people sign in with (default https://auth.wular.ai)`],[`SERVER_ENCRYPTION_KEY`,`encrypts stored secrets and derives the sign-in keys; required with DATABASE_URL (openssl rand -base64 32)`],[`RUNNER`,`where tasks run: local (default), local-docker, vercel-sandbox, github-actions, http`],[`MAX_TASKS, TASK_TIMEOUT, TASK_STALL, TASK_ATTEMPTS`,`runner capacity and lifecycle limits`],[`ADMIN_TOKEN`,`local and memory servers: the dashboard and CLI key; minted and shown when unset`],[`CODER_CACHE_HOME`,`archived tasks, flows and usage (default OS cache directory/wular-coder)`],[`WORK_DIR`,`where tasks check out repositories`],[`SERVER_NAME`,`what the dashboard calls this server (default Coder)`]],examples:[[`PUBLIC_URL=https://abc.ngrok.app coder server serve`,`receive GitHub and Slack events through a tunnel; the tunnel serves only their webhooks and callbacks`],[`PUBLIC_URL=https://agents.example.com DATABASE_URL=postgres://... coder server serve`,`on your own host, backed by Postgres`]]},options:{...c,port:u.optional(u.coerce.number().check(u.int(),u.positive())),host:s,runner:s,memory:o},async run({options:e,cwd:n}){let{rerunUnderBun:r}=await import(`./env-CRf6wkM2.js`).then(e=>e.t);if(await r(),e.memory&&!l.env.ADMIN_TOKEN&&!l.stdout.isTTY)throw new t(`invalid-option`,`Memory server needs an admin token: set ADMIN_TOKEN, or run in a terminal to get a printed one.`);let{serve:i}=await import(`./serve-DA5I2qXj.js`).then(e=>e.n),a=await i({cwd:n,port:e.port,...e.host?{host:e.host}:{},...e.runner?{runner:e.runner}:{},...e.memory?{memory:!0}:{}}),o=()=>void a.close().finally(()=>l.exit(0));return l.once(`SIGINT`,o),l.once(`SIGTERM`,o),a},json:e=>({ok:!0,address:e.address,publicUrl:e.publicUrl,runner:e.runner,store:e.store,mode:e.mode,maxTasks:e.maxTasks,...e.signIn?{signIn:e.signIn}:{},...e.mintedToken?{adminToken:e.mintedToken}:{},warnings:e.warnings}),print:d});export{f as commandServerServe};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{En as e,G as t,On as n,Qt as r,Tt as i,b as a,bn as o,nt as s,tn as c,v as l,y as u,zt as d}from"./dispatch-BKeAch9E.js";import{i as f}from"./cli-
|
|
1
|
+
import{En as e,G as t,On as n,Qt as r,Tt as i,b as a,bn as o,nt as s,tn as c,v as l,y as u,zt as d}from"./dispatch-BKeAch9E.js";import{i as f}from"./cli-DWCR7iqa.js";import{s as p}from"./args-BOEEdpWk.js";import{n as m}from"./mcp-server-DGzme0YX.js";import h from"node:path";import g from"node:fs";import{spawn as _}from"node:child_process";import{randomUUID as v}from"node:crypto";function y(e){return h.join(e,`sidecar.json`)}function b(t){return e(y(t))??{sessionId:null,declineStreak:0}}async function x(e){let t=h.join(e,`sidecar.lock`),n=Date.now()+12e4;for(;;)try{return g.mkdirSync(t),()=>{try{g.rmdirSync(t)}catch{}}}catch{try{if(Date.now()-g.statSync(t).mtimeMs>9e4){g.rmdirSync(t);continue}}catch{continue}if(Date.now()>n)throw Error(`sidecar lock wait timed out`);await new Promise(e=>setTimeout(e,250))}}function S(e,n,r,i){return[`-p`,i,`--output-format`,`json`,`--model`,`sonnet`,`--effort`,`low`,r?`--resume`:`--session-id`,n,...t,`--add-dir`,e]}function C(e,t,n,r,i){let a=S(t,n,r,i);return new Promise((t,n)=>{let r=_(`claude`,a,{cwd:e,stdio:[`ignore`,`pipe`,`pipe`]}),i=``,o=``,s=setTimeout(()=>{r.kill(`SIGKILL`),n(Error(`sidecar call timed out`))},12e4);r.stdout.on(`data`,e=>i+=e),r.stderr.on(`data`,e=>o+=e),r.on(`error`,e=>{clearTimeout(s),n(e)}),r.on(`close`,e=>{if(clearTimeout(s),e!==0){n(Error(`sidecar claude exited ${e}: ${o.trim().slice(0,200)}`));return}try{let e=JSON.parse(i);if(e.is_error){n(Error(`sidecar turn errored: ${String(e.result??``).slice(0,200)}`));return}t(String(e.result??``))}catch{n(Error(`sidecar returned unparseable output`))}})})}function w(e){let t=e.match(/\{[^{}]*"decision"[^{}]*\}/);if(!t)return null;try{let e=JSON.parse(t[0]);if(e.decision===`accept`||e.decision===`decline`||e.decision===`escalate`)return{decision:e.decision,reason:String(e.reason??``)}}catch{}return null}async function T(e,t,r){let i=null;try{i=await x(t);let a=b(t);if(a.declineStreak>=3)return{decision:`escalate`,reason:`sidecar decline streak; needs human review`};if(!a.sessionId){let i=v();await C(e,t,i,!1,`You are the approval reviewer for a "coder" background coding task. The task runs inside an OS sandbox; you review only actions that escape it.
|
|
2
2
|
|
|
3
3
|
Rules:
|
|
4
4
|
- git stays read-only: decline any git write (commit/push/checkout/reset/...).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./cli-
|
|
1
|
+
import{i as e,t}from"./cli-DWCR7iqa.js";import{p as n,s as r}from"./output-BKeyLbvt.js";import{n as i,o as a,s as o,t as s}from"./args-BOEEdpWk.js";import c from"node:process";import*as l from"zod/mini";const u=e({name:`runner serve`,help:{usage:`coder runner serve --url <public url> [--token <token>] [--runner-url <url>] [--port <n>] [--name <name>] [--workspace] [--server [url]] [--json]`,summary:`Run tasks on this machine with its own claude and codex logins. Expose the port with any tunnel (cloudflared, ngrok, Tailscale Funnel or a public VS Code port) and pass the tunnel's URL; each start registers the current URL, so a changing tunnel URL is fine. Choose a default with coder runner default. Tasks use their named runner, the agent setting, your default, the workspace default, then the server default.`,flags:[[`--url <public url>`,`the HTTPS address the server reaches this runner at`],[`--token <token>`,`one-use pairing token, --url is the Coder server`],[`--runner-url <url>`,`public tunnel address when pairing, or CODER_RUNNER_URL`],[`--port <n>`,`local port the tunnel forwards to (default 4100)`],[`--name <name>`,`shown in the dashboard (default: this machine's hostname)`],[`--workspace`,`run every member's tasks, not only yours (owners and admins)`],t],examples:[[`cloudflared tunnel --url http://localhost:4100`,`expose the port in one terminal`],[`coder runner serve --url https://abc.trycloudflare.com`,`then serve through it`]]},options:{...s,port:l.optional(l.coerce.number().check(l.int(),l.positive())),url:o,name:o,token:o,"runner-url":o,workspace:i,server:a,yes:i},async run({options:e}){let{serveRunner:t}=await import(`./serve-BTeomYxW.js`).then(e=>e.n),n=await t({...e,runnerUrl:e[`runner-url`]}),r=()=>void n.close().finally(()=>c.exit(0));return c.once(`SIGINT`,r),c.once(`SIGTERM`,r),n},json:({server:e,close:t,...n})=>({ok:!0,...n}),print:e=>c.stdout.write(`Runner ${n.bold(e.name)} serves ${e.server} at ${n.cyan(e.config.url??``)} (${e.scope}), listening on localhost:${e.port}.\n${r([`Tasks run here with this machine's own claude and codex logins`,`Stop with Ctrl-C; the server marks the runner offline`],n,n.cyan)}\n`)});export{u as commandRunnerServe};
|