@wular/coder 0.3.17 → 0.4.0
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 +18 -16
- package/bin/coder.mjs +3 -1
- package/dist/actions-Mk3FSlpJ.js +20 -0
- package/dist/adapter-B0oYCI0S.js +1 -0
- package/dist/adapter-BKVzTDnn.js +1 -0
- package/dist/adapter-DPInwbJG.js +1 -0
- package/dist/adapter-DaiJMOYo.js +1 -0
- package/dist/adapter-PeKziOUg.js +1 -0
- package/dist/add-BxpLHnvD.js +1 -0
- package/dist/add-CE-70LFs.js +1 -0
- package/dist/add-U-pty9qJ.js +6 -0
- package/dist/add-ej0X9e3a.js +1 -0
- package/dist/add-json-CEa-6luW.js +1 -0
- package/dist/agent-BsYx3Odz.js +3 -0
- package/dist/agent-JdtZozvP.js +1 -0
- package/dist/alias-DX-Bm86x.js +2 -0
- package/dist/app-BT5f7zL5.js +1 -0
- package/dist/approvals-C-AvFt6s.js +2 -0
- package/dist/approve-DOmpQRNd.js +2 -0
- package/dist/apps-CjfrZyM5.js +1 -0
- package/dist/archive-BUB8gFKD.js +4 -0
- package/dist/archive-BziJ1rQ-.js +3 -0
- package/dist/archive-sweep-CtBcARgN.js +1 -0
- package/dist/args-BOEEdpWk.js +1 -0
- package/dist/ask-dE3U3ss2.js +4 -0
- package/dist/auth-BFny--17.js +1 -0
- package/dist/auth-DWHIzqbA.js +1 -0
- package/dist/builtin/coder/agent.json +24 -0
- package/dist/builtin/coder/system.md +17 -0
- package/dist/chat-3Znsevah.js +1 -0
- package/dist/chat-B_yhNTo0.js +13 -0
- package/dist/chat-bridge-BS9WtP3X.js +2 -0
- package/dist/cli-BilSDkvE.js +9 -0
- package/dist/cli.d.ts +71 -1
- package/dist/cli.js +1 -91
- package/dist/client-D9IoAuDD.js +1 -0
- package/dist/config-Da_cwoxI.js +3 -0
- package/dist/create-C_iMJV4Y.js +1 -0
- package/dist/credentials-B1jv6dkg.js +1 -0
- package/dist/dash/manifest.json +3427 -0
- package/dist/dash/public/assets/apple-touch-icon.png +0 -0
- package/dist/dash/public/assets/chunks/agent-pills-69c965aae1737cef.js +1 -0
- package/dist/dash/public/assets/chunks/agent-settings-form-a1ce70812eea3f20.js +1 -0
- package/dist/dash/public/assets/chunks/agents-grid-f62180478e43c192.js +1 -0
- package/dist/dash/public/assets/chunks/badge-d07f35e9abc80e14.js +1 -0
- package/dist/dash/public/assets/chunks/card-be04148b64223a52.js +1 -0
- package/dist/dash/public/assets/chunks/combo-32c321a7a84fa902.js +1 -0
- package/dist/dash/public/assets/chunks/composer-aec9c3c691f1f79a.js +1 -0
- package/dist/dash/public/assets/chunks/composer-data-6f7608fed13f3dd7.js +1 -0
- package/dist/dash/public/assets/chunks/composer-e56860d72742379e.js +1 -0
- package/dist/dash/public/assets/chunks/confirm-b4e2c16aef4b3431.js +1 -0
- package/dist/dash/public/assets/chunks/connect-apps-a5a63941e287c33f.js +1 -0
- package/dist/dash/public/assets/chunks/connect-repositories-e4c049b5b4384623.js +1 -0
- package/dist/dash/public/assets/chunks/credentials-list-2b7d0c771b89f9c5.js +2 -0
- package/dist/dash/public/assets/chunks/custom-range-53b70e0d9eeae84e.js +1 -0
- package/dist/dash/public/assets/chunks/editor-691d2bcecb1ecb87.js +7 -0
- package/dist/dash/public/assets/chunks/engines-list-a5fe1671601ce3b0.js +1 -0
- package/dist/dash/public/assets/chunks/field-9e12e5fc8774b6e5.js +1 -0
- package/dist/dash/public/assets/chunks/format-eb03fc9d9744d960.js +1 -0
- package/dist/dash/public/assets/chunks/heads-4041a925d63ab116.js +1 -0
- package/dist/dash/public/assets/chunks/instructions-4e0d18b9b40edbd7.js +2 -0
- package/dist/dash/public/assets/chunks/instructions-b00959bd4bb70502.js +1 -0
- package/dist/dash/public/assets/chunks/list-d7eb9e02cf261fbe.js +1 -0
- package/dist/dash/public/assets/chunks/mcp-list-a450533109045ef5.js +1 -0
- package/dist/dash/public/assets/chunks/model-options-15c53331a2f28a4f.js +1 -0
- package/dist/dash/public/assets/chunks/models-list-1e273c6843858148.js +1 -0
- package/dist/dash/public/assets/chunks/paged-bc6fa0c2b9d52ed7.js +1 -0
- package/dist/dash/public/assets/chunks/platform-actions-87f3f76ec1b840cb.js +1 -0
- package/dist/dash/public/assets/chunks/runners-list-fc7cdae4fa93e78b.js +1 -0
- package/dist/dash/public/assets/chunks/runtime-246221e985d863e5-1.js +2 -0
- package/dist/dash/public/assets/chunks/segmented-6091dfb2f954799f.js +1 -0
- package/dist/dash/public/assets/chunks/select-dd09a6b9544cfde2.js +1 -0
- package/dist/dash/public/assets/chunks/sentinel-ff7143a47fd22835.js +1 -0
- package/dist/dash/public/assets/chunks/shared-init-246221e985d863e5-2.js +1 -0
- package/dist/dash/public/assets/chunks/shared-init-8f2ac936c95a7f7b.js +1 -0
- package/dist/dash/public/assets/chunks/shared-init-986901c810947c12.js +5 -0
- package/dist/dash/public/assets/chunks/shared-init-baceed9fd2d43661.js +2 -0
- package/dist/dash/public/assets/chunks/tail-5a5bfcd308535d70.js +1 -0
- package/dist/dash/public/assets/chunks/task-actions-7919ca0e901131f4.js +1 -0
- package/dist/dash/public/assets/chunks/task-fa8b82e95e771c4a.js +1 -0
- package/dist/dash/public/assets/chunks/task-view-e8a0f99c992fa11e.js +3 -0
- package/dist/dash/public/assets/chunks/tasks-list-7b72f5b295349532.js +1 -0
- package/dist/dash/public/assets/chunks/toolbar-9b18a5d26dee37c3.js +1 -0
- package/dist/dash/public/assets/chunks/versions-list-8cdf3a41c56b2152.js +1 -0
- package/dist/dash/public/assets/chunks/wular-pnext-246221e985d863e5-0.js +1 -0
- package/dist/dash/public/assets/connect-382b1729a7ae7808.css +1 -0
- package/dist/dash/public/assets/dash-9e02d5d1a6d42ee3.css +1 -0
- package/dist/dash/public/assets/dash-account-04859899c1838ada.css +1 -0
- package/dist/dash/public/assets/dash-agents-9e678137267dec07.css +1 -0
- package/dist/dash/public/assets/dash-agents-new-26fa27b17ef9b8d8.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-b975c48f8abf3444.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-edit-e13fda599bb04843.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-platforms-70292932cb27bc96.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-settings-71f9a86251723fcc.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-tasks-fb8eb2ed71006601.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-usage-7c8740f1cdd52c71.css +1 -0
- package/dist/dash/public/assets/dash-settings-8eb818da462227e8.css +1 -0
- package/dist/dash/public/assets/dash-settings-param-tab-849a1a9542e273f5.css +1 -0
- package/dist/dash/public/assets/dash-tasks-81e510e0b6931b42.css +1 -0
- package/dist/dash/public/assets/dash-tasks-param-id-bbd2a83342f2ec10.css +1 -0
- package/dist/dash/public/assets/dash-usage-8e0259e03eaed1bd.css +1 -0
- package/dist/dash/public/assets/favicon.ico +0 -0
- package/dist/dash/public/assets/favicon.svg +1 -0
- package/dist/dash/public/assets/fonts/LICENSE-fira-code +93 -0
- package/dist/dash/public/assets/fonts/fira-code-latin-400-normal-717ee080.woff2 +0 -0
- package/dist/dash/public/assets/fonts/fira-code-latin-500-normal-530b6706.woff2 +0 -0
- package/dist/dash/public/assets/fonts/fira-code-latin-700-normal-98730669.woff2 +0 -0
- package/dist/dash/public/assets/global-d2adbf01910d9df5.css +1 -0
- package/dist/dash/public/assets/login-c129b1ce237be260.css +1 -0
- package/dist/dash/public/assets/pnext-client-073464b8f422ef57.js +1 -0
- package/dist/dash/public/assets/pnext-client-0b6720fdec66eeb0.js +1 -0
- package/dist/dash/public/assets/pnext-client-1e9cb2f4f6387a87.js +1 -0
- package/dist/dash/public/assets/pnext-client-2f0e78dd006fed0f.js +1 -0
- package/dist/dash/public/assets/pnext-client-3c62e2aa2cbe9fe1.js +1 -0
- package/dist/dash/public/assets/pnext-client-43a88896ed42dd39.js +1 -0
- package/dist/dash/public/assets/pnext-client-4cf2e27d0b9c0365.js +1 -0
- package/dist/dash/public/assets/pnext-client-587008fa987d3073.js +1 -0
- package/dist/dash/public/assets/pnext-client-676360cc86f31573.js +1 -0
- package/dist/dash/public/assets/pnext-client-813427605f424145.js +1 -0
- package/dist/dash/public/assets/pnext-client-82de7cf6dfc35b98.js +1 -0
- package/dist/dash/public/assets/pnext-client-831e8004c09f0b5b.js +1 -0
- package/dist/dash/public/assets/pnext-client-9b557fe468a45ca3.js +1 -0
- package/dist/dash/public/assets/pnext-client-ab7c900c802fe827.js +1 -0
- package/dist/dash/public/assets/pnext-client-d87d00e402811f0c.js +1 -0
- package/dist/dash/public/assets/pnext-client-fbdb7c1da7eda7e5.js +1 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/boot-B2MFTRO2.js +28 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/build-tier-XJJSL5FR.js +2702 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2HFY3DQT.js +206 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2ICEVELW.js +832 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-3UPROT2C.js +33 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4P5CMIYT.js +1580 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4TKZKZ3Q.js +129 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-5RDEILQB.js +435 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-62KEQM43.js +23 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-6KQSWT6D.js +829 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-7DCNCW6O.js +722 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-B4THCTQP.js +20 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-C2LIV2MM.js +170 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-CCATPVTW.js +376 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-COXJAPTU.js +87 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-E6IXL2NJ.js +6268 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FLGRBFAH.js +1196 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FTJVHFWD.js +59 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-H523KSIH.js +5149 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-HT6KKX6A.js +18 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JESFYECC.js +436 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JRPJM2XY.js +15 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L2IWDUXG.js +105 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L5P4Y4UC.js +181 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-NQE46AZN.js +645 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PA4QEARJ.js +127 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PZ5AXOLW.js +7144 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-SNVPTULL.js +2395 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-T3QZT3PG.js +218 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-VC5O2SDP.js +70 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-WZX4V6CM.js +229 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-XUUIDXY5.js +625 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-ZHFDO3PR.js +263 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/compile-CE2DN7ZA.js +16 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-UREY7XJT.js +14 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-loader-UI2XE3PZ.js +15 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/entry.js +217 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/generate-I2PPTDFD.js +14 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/modules-UVOCE4C2.js +46 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/pipeline-UW47K537.js +961 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/proxy-ITGOVJBW.js +24 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/register-4SA55SWT.js +12577 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/router-JNKHLBCZ.js +503 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/routes-PD6J2NXW.js +52 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/tsconfig-defaults-ZXEH7RQK.js +13 -0
- package/dist/default-Bobztoxf.js +1 -0
- package/dist/default-vYPT26DR.js +1 -0
- package/dist/delete-D8gEwoOj.js +4 -0
- package/dist/delete-z1_86nf6.js +2 -0
- package/dist/disable-DVKd-0Xb.js +1 -0
- package/dist/discover-Df-a8K4R.js +3 -0
- package/dist/discover-Dvr_3_Xr.js +1 -0
- package/dist/dispatch-BKeAch9E.js +14 -0
- package/dist/docs-BX65z2Iu.js +2 -0
- package/dist/docs-DKJnqZqt.js +2 -0
- package/dist/enable-C8Zf_wpN.js +1 -0
- package/dist/env-CRf6wkM2.js +1 -0
- package/dist/exec-RZFLclKX.js +11 -0
- package/dist/executor-BvAA7Cgw.js +10 -0
- package/dist/flow/builtin/review.d.ts +157 -0
- package/dist/flow/builtin/review.js +19 -0
- package/dist/flow/index.d.ts +1 -1
- package/dist/flow/index.js +1 -1
- package/dist/flow-17k25MHt.js +1 -0
- package/dist/github-actions-DwUzm4hC.js +24 -0
- package/dist/http-Bkg_OQ6r.js +1 -0
- package/dist/{index-BQ-b77or.d.ts → index-DT7EST00.d.ts} +116 -238
- package/dist/init-CoMfFxbG.js +1 -0
- package/dist/integrations-5xCaXSd-.js +1 -0
- package/dist/integrations-BAgdVDhj.js +5 -0
- package/dist/lib/broker.js +3 -3
- package/dist/list-BAKvxSbh.js +4 -0
- package/dist/list-BYiG8Zav.js +2 -0
- package/dist/list-BxEywhHU.js +1 -0
- package/dist/list-C5w01-8q.js +1 -0
- package/dist/list-CIW2joV1.js +1 -0
- package/dist/list-DX-z3SBp.js +3 -0
- package/dist/list-DpCf4G-H.js +4 -0
- package/dist/list-VToARh3C.js +1 -0
- package/dist/load-BpEsAn51.js +2 -0
- package/dist/local-H3uvqEbq.js +1 -0
- package/dist/log-view-dg0TlKLA.js +1 -0
- package/dist/login-BFxX4jJy.js +1 -0
- package/dist/login-DkkslfBx.js +1 -0
- package/dist/logout-BHAtw4Z8.js +1 -0
- package/dist/maintenance-C5FklUw3.js +1 -0
- package/dist/match-CXAjDhg7.js +1 -0
- package/dist/mcp-BgKb2Cdk.js +1 -0
- package/dist/mcp-CCZOAo06.js +1 -0
- package/dist/mcp-server-DGzme0YX.js +1 -0
- package/dist/migrate-C4vM7DQN.js +2 -0
- package/dist/migrate-N-85_N7J.js +1 -0
- package/dist/model-Bs1StDo3.js +1 -0
- package/dist/models-_5LVGC3m.js +1 -0
- package/dist/output-BKeyLbvt.js +5 -0
- package/dist/prompt-CEuBMNhk.js +7 -0
- package/dist/push-CUC55Bqd.js +1 -0
- package/dist/queue-6io_NOP3.js +116 -0
- package/dist/refresh-BIrmrWYq.js +1 -0
- package/dist/remote-miQNTVRa.js +1 -0
- package/dist/remove-B93LNkZI.js +1 -0
- package/dist/remove-C5_xggx7.js +1 -0
- package/dist/remove-CuH8a3L9.js +1 -0
- package/dist/remove-eQ8y5C5p.js +1 -0
- package/dist/rename-CYfy03FE.js +1 -0
- package/dist/result-BEtQZHaY.js +5 -0
- package/dist/result-BzaM3inj.js +15 -0
- package/dist/resume-DYzKvyEw.js +3 -0
- package/dist/review-oIBeECZE.js +7 -0
- package/dist/rolldown-runtime-DT7IzrpZ.js +1 -0
- package/dist/rotate-key-IdMYH7gg.js +1 -0
- package/dist/run-BDYl0CKl.js +2 -0
- package/dist/run-CTtd0Znc.js +5 -0
- package/dist/run-CawRGnOg.js +2 -0
- package/dist/runner-D7ScbIHJ.js +1 -0
- package/dist/runner-sUpWJ_k0.js +1 -0
- package/dist/schema-CU2iFkp8.js +1 -0
- package/dist/sdk.d.ts +1166 -191
- package/dist/sdk.js +1 -1
- package/dist/serve-BTeomYxW.js +1 -0
- package/dist/serve-CE8YV2e9.js +1 -0
- package/dist/serve-CPnmrKyf.js +2 -0
- package/dist/serve-CQKZxzFE.js +4 -0
- package/dist/serve-GmRO89s5.js +12 -0
- package/dist/server-Kb22cWfF.js +1 -0
- package/dist/setup-host-GFTUzzZJ.js +6 -0
- package/dist/shared-DVtzWhUT.js +1 -0
- package/dist/show-CMUg8SJu.js +1 -0
- package/dist/show-COTZEYgc.js +1 -0
- package/dist/status-D26U--p8.js +1 -0
- package/dist/steer-C6uARLp5.js +4 -0
- package/dist/stop-BrGI3hSS.js +1 -0
- package/dist/stop-ByCAlbmN.js +3 -0
- package/dist/store-B94tSate.js +42 -0
- package/dist/store-DzqXS2wT.js +8 -0
- package/dist/task-C6VAg5WU.js +1 -0
- package/dist/task-CgOKgkEG.js +1 -0
- package/dist/task-DeglY79z.js +5 -0
- package/dist/test-NEbhlxvo.js +1 -0
- package/dist/tools-D0Zfs8Hx.js +1 -0
- package/dist/types-D0q15RJa.js +1 -0
- package/dist/types-Dve7Z0ZP.d.ts +389 -0
- package/dist/unalias-C9NqmSDq.js +1 -0
- package/dist/update-BTxYQj7Z.js +2 -0
- package/dist/upgrade-hA0yWBvx.js +2 -0
- package/dist/usage-BhqoCjvE.js +1 -0
- package/dist/usage-C4d9X2Uq.js +1 -0
- package/dist/watch-CSdj24ct.js +5 -0
- package/dist/watch-DtRuC0Wc.js +8 -0
- package/dist/wire-BeT1Axeo.js +1 -0
- package/dist/worker-CXndxmGF.js +9 -0
- package/dist/worker-DX7P9kWl.js +1 -0
- package/dist/workflow-Dcmdooi8.js +1 -0
- package/docs/agents/coder.md +26 -0
- package/docs/agents/index.md +120 -0
- package/docs/config.md +51 -30
- package/docs/dash.md +64 -0
- package/docs/flows.md +20 -15
- package/docs/mcp.md +62 -0
- package/docs/models.md +41 -23
- package/docs/review.md +41 -0
- package/docs/sdk.md +57 -38
- package/docs/self-host.md +188 -0
- package/migrations/0000_initial.sql +252 -0
- package/migrations/meta/0000_snapshot.json +1787 -0
- package/migrations/meta/_journal.json +13 -0
- package/package.json +37 -7
- package/plugins/agents/skills/coder/SKILL.md +14 -60
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/setup.md +2 -2
- package/plugins/claude/skills/dispatch/SKILL.md +14 -58
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/README.md +5 -5
- package/plugins/cursor/assets/logo.png +0 -0
- package/plugins/cursor/skills/coder/SKILL.md +14 -59
- package/src/client/index.ts +573 -0
- package/src/client/types.ts +506 -0
- package/src/core/errors.ts +72 -0
- package/src/core/task/log-view.ts +173 -0
- package/src/server/auth/sign-in.ts +14 -0
- package/src/server/dash/api/load.ts +62 -0
- package/src/server/dash/api/types.ts +11 -0
- package/src/server/dash/app/connect/page.tsx +42 -0
- package/src/server/dash/app/dash/account/loading.tsx +11 -0
- package/src/server/dash/app/dash/account/notify.tsx +42 -0
- package/src/server/dash/app/dash/account/page.css +81 -0
- package/src/server/dash/app/dash/account/page.tsx +126 -0
- package/src/server/dash/app/dash/account/sign-out.tsx +24 -0
- package/src/server/dash/app/dash/agents/(list)/agent-menu.tsx +10 -0
- package/src/server/dash/app/dash/agents/(list)/agents-grid.tsx +143 -0
- package/src/server/dash/app/dash/agents/(list)/connect-apps.tsx +46 -0
- package/src/server/dash/app/dash/agents/(list)/loading.tsx +14 -0
- package/src/server/dash/app/dash/agents/(list)/page.css +72 -0
- package/src/server/dash/app/dash/agents/(list)/page.tsx +89 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/layout.tsx +135 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/loading.tsx +5 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/page.css +21 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/page.tsx +173 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/loading.tsx +18 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/page.css +87 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/page.tsx +258 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/platform-actions.tsx +111 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/agent-settings-form.css +114 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/agent-settings-form.tsx +294 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/loading.tsx +5 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/page.tsx +54 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/tasks/loading.tsx +5 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/tasks/page.tsx +14 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/usage/loading.tsx +31 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/usage/page.css +12 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/usage/page.tsx +163 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/versions-list.tsx +53 -0
- package/src/server/dash/app/dash/agents/[slug]/edit/loading.tsx +31 -0
- package/src/server/dash/app/dash/agents/[slug]/edit/page.tsx +91 -0
- package/src/server/dash/app/dash/agents/agent/agent-pills.css +27 -0
- package/src/server/dash/app/dash/agents/agent/agent-pills.tsx +133 -0
- package/src/server/dash/app/dash/agents/agent/hero.css +40 -0
- package/src/server/dash/app/dash/agents/agent/hero.tsx +60 -0
- package/src/server/dash/app/dash/agents/agent/instructions.css +29 -0
- package/src/server/dash/app/dash/agents/agent/instructions.tsx +82 -0
- package/src/server/dash/app/dash/agents/editor/connect-repositories.ts +16 -0
- package/src/server/dash/app/dash/agents/editor/editor.css +263 -0
- package/src/server/dash/app/dash/agents/editor/editor.tsx +774 -0
- package/src/server/dash/app/dash/agents/editor/import-picker.css +48 -0
- package/src/server/dash/app/dash/agents/editor/import-picker.tsx +253 -0
- package/src/server/dash/app/dash/agents/editor/names.ts +35 -0
- package/src/server/dash/app/dash/agents/new/loading.tsx +25 -0
- package/src/server/dash/app/dash/agents/new/page.tsx +72 -0
- package/src/server/dash/app/dash/layout.css +265 -0
- package/src/server/dash/app/dash/layout.tsx +332 -0
- package/src/server/dash/app/dash/page.tsx +14 -0
- package/src/server/dash/app/dash/settings/[tab]/credentials-list.css +94 -0
- package/src/server/dash/app/dash/settings/[tab]/credentials-list.tsx +619 -0
- package/src/server/dash/app/dash/settings/[tab]/credentials.tsx +36 -0
- package/src/server/dash/app/dash/settings/[tab]/engines-list.css +16 -0
- package/src/server/dash/app/dash/settings/[tab]/engines-list.tsx +135 -0
- package/src/server/dash/app/dash/settings/[tab]/list.css +98 -0
- package/src/server/dash/app/dash/settings/[tab]/list.tsx +215 -0
- package/src/server/dash/app/dash/settings/[tab]/loading.tsx +6 -0
- package/src/server/dash/app/dash/settings/[tab]/mcp-list.css +43 -0
- package/src/server/dash/app/dash/settings/[tab]/mcp-list.tsx +290 -0
- package/src/server/dash/app/dash/settings/[tab]/models-list.tsx +513 -0
- package/src/server/dash/app/dash/settings/[tab]/page.tsx +89 -0
- package/src/server/dash/app/dash/settings/[tab]/runners-list.css +153 -0
- package/src/server/dash/app/dash/settings/[tab]/runners-list.tsx +457 -0
- package/src/server/dash/app/dash/settings/layout.tsx +50 -0
- package/src/server/dash/app/dash/settings/model-options.ts +117 -0
- package/src/server/dash/app/dash/settings/page.tsx +7 -0
- package/src/server/dash/app/dash/settings/settings-head.tsx +24 -0
- package/src/server/dash/app/dash/settings/tunnel-guide.tsx +28 -0
- package/src/server/dash/app/dash/tasks/[id]/activity.tsx +202 -0
- package/src/server/dash/app/dash/tasks/[id]/loading.tsx +31 -0
- package/src/server/dash/app/dash/tasks/[id]/page.tsx +30 -0
- package/src/server/dash/app/dash/tasks/[id]/task-actions.tsx +164 -0
- package/src/server/dash/app/dash/tasks/[id]/task-view.css +407 -0
- package/src/server/dash/app/dash/tasks/[id]/task-view.tsx +513 -0
- package/src/server/dash/app/dash/tasks/composer-data.ts +96 -0
- package/src/server/dash/app/dash/tasks/composer.css +316 -0
- package/src/server/dash/app/dash/tasks/composer.tsx +890 -0
- package/src/server/dash/app/dash/tasks/list/status.css +50 -0
- package/src/server/dash/app/dash/tasks/list/status.tsx +20 -0
- package/src/server/dash/app/dash/tasks/list/task.ts +45 -0
- package/src/server/dash/app/dash/tasks/list/tasks-list.css +85 -0
- package/src/server/dash/app/dash/tasks/list/tasks-list.tsx +402 -0
- package/src/server/dash/app/dash/tasks/list/tasks-section.tsx +96 -0
- package/src/server/dash/app/dash/tasks/page.tsx +53 -0
- package/src/server/dash/app/dash/token-from-hash.tsx +17 -0
- package/src/server/dash/app/dash/usage/custom-range.tsx +63 -0
- package/src/server/dash/app/dash/usage/day-chart.css +109 -0
- package/src/server/dash/app/dash/usage/day-chart.tsx +110 -0
- package/src/server/dash/app/dash/usage/loading.tsx +17 -0
- package/src/server/dash/app/dash/usage/metric.ts +13 -0
- package/src/server/dash/app/dash/usage/page.tsx +117 -0
- package/src/server/dash/app/dash/usage/range-bar.css +13 -0
- package/src/server/dash/app/dash/usage/range-bar.tsx +69 -0
- package/src/server/dash/app/dash/usage/stats.css +52 -0
- package/src/server/dash/app/dash/usage/stats.tsx +19 -0
- package/src/server/dash/app/dash/usage/top-agents.css +40 -0
- package/src/server/dash/app/dash/usage/top-agents.tsx +138 -0
- package/src/server/dash/app/dash/usage/usage.css +0 -0
- package/src/server/dash/app/globals.css +692 -0
- package/src/server/dash/app/layout.tsx +52 -0
- package/src/server/dash/app/login/page.css +26 -0
- package/src/server/dash/app/login/page.tsx +57 -0
- package/src/server/dash/app/page.tsx +5 -0
- package/src/server/dash/app/responsive.css +49 -0
- package/src/server/dash/app/zone.tsx +13 -0
- package/src/server/dash/comps/frame/auth-panel.css +60 -0
- package/src/server/dash/comps/frame/auth-panel.tsx +44 -0
- package/src/server/dash/comps/frame/drawer.css +28 -0
- package/src/server/dash/comps/frame/drawer.tsx +39 -0
- package/src/server/dash/comps/frame/heads.ts +41 -0
- package/src/server/dash/comps/frame/loading-card.tsx +65 -0
- package/src/server/dash/comps/frame/page-head.css +83 -0
- package/src/server/dash/comps/frame/page-head.tsx +71 -0
- package/src/server/dash/comps/frame/stream.tsx +50 -0
- package/src/server/dash/comps/frame/task-toasts.tsx +214 -0
- package/src/server/dash/comps/frame/theme-choices.tsx +46 -0
- package/src/server/dash/comps/nav/current-link.tsx +53 -0
- package/src/server/dash/comps/nav/side-toggle.tsx +30 -0
- package/src/server/dash/comps/nav/to.ts +22 -0
- package/src/server/dash/comps/ui/badge.css +64 -0
- package/src/server/dash/comps/ui/badge.tsx +41 -0
- package/src/server/dash/comps/ui/card.css +93 -0
- package/src/server/dash/comps/ui/card.tsx +77 -0
- package/src/server/dash/comps/ui/collapse.css +32 -0
- package/src/server/dash/comps/ui/collapse.tsx +49 -0
- package/src/server/dash/comps/ui/combo.tsx +154 -0
- package/src/server/dash/comps/ui/confirm.css +36 -0
- package/src/server/dash/comps/ui/confirm.tsx +67 -0
- package/src/server/dash/comps/ui/field.css +25 -0
- package/src/server/dash/comps/ui/field.tsx +34 -0
- package/src/server/dash/comps/ui/icon.css +22 -0
- package/src/server/dash/comps/ui/icon.tsx +17 -0
- package/src/server/dash/comps/ui/icons.ts +44 -0
- package/src/server/dash/comps/ui/menu.css +178 -0
- package/src/server/dash/comps/ui/menu.tsx +152 -0
- package/src/server/dash/comps/ui/segmented.css +44 -0
- package/src/server/dash/comps/ui/segmented.tsx +58 -0
- package/src/server/dash/comps/ui/select.css +103 -0
- package/src/server/dash/comps/ui/select.tsx +250 -0
- package/src/server/dash/comps/ui/sentinel.css +58 -0
- package/src/server/dash/comps/ui/sentinel.tsx +67 -0
- package/src/server/dash/comps/ui/tabs.css +81 -0
- package/src/server/dash/comps/ui/tabs.tsx +32 -0
- package/src/server/dash/comps/ui/tail.css +12 -0
- package/src/server/dash/comps/ui/tail.tsx +37 -0
- package/src/server/dash/comps/ui/toast.css +72 -0
- package/src/server/dash/comps/ui/toolbar.css +143 -0
- package/src/server/dash/comps/ui/toolbar.tsx +93 -0
- package/src/server/dash/package.json +5 -0
- package/src/server/dash/pnext-env.d.ts +4 -0
- package/src/server/dash/pnext.config.ts +5 -0
- package/src/server/dash/public/assets/apple-touch-icon.png +0 -0
- package/src/server/dash/public/assets/favicon.ico +0 -0
- package/src/server/dash/public/assets/favicon.svg +1 -0
- package/src/server/dash/public/assets/fonts/LICENSE-fira-code +93 -0
- package/src/server/dash/public/assets/fonts/fira-code-latin-400-normal-717ee080.woff2 +0 -0
- package/src/server/dash/public/assets/fonts/fira-code-latin-500-normal-530b6706.woff2 +0 -0
- package/src/server/dash/public/assets/fonts/fira-code-latin-700-normal-98730669.woff2 +0 -0
- package/src/server/dash/tsconfig.json +10 -0
- package/src/server/dash/utils/client.ts +19 -0
- package/src/server/dash/utils/format.ts +75 -0
- package/src/server/dash/utils/paged.ts +184 -0
- package/src/server/dash/utils/range.ts +117 -0
- package/dist/app-server-bHl6RBZ2.js +0 -3
- package/dist/runtime-X5Bgf1qH.js +0 -26
- package/dist/upgrade-piLxMgEv.js +0 -37
package/dist/sdk.d.ts
CHANGED
|
@@ -1,8 +1,499 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
|
|
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-Dve7Z0ZP.js";
|
|
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-DT7EST00.js";
|
|
4
|
+
import "zod/mini";
|
|
5
|
+
import { Message, SerializedMessage, SerializedThread } from "chat";
|
|
6
|
+
import "drizzle-orm";
|
|
7
|
+
import "drizzle-orm/postgres-js";
|
|
8
|
+
import "drizzle-orm/pg-core";
|
|
9
|
+
import postgres from "postgres";
|
|
10
|
+
import "jose";
|
|
11
|
+
//#region src/core/engines/codex/index.d.ts
|
|
3
12
|
declare function getCodexAvailability(cwd: string): Availability;
|
|
4
13
|
//#endregion
|
|
5
|
-
//#region src/
|
|
14
|
+
//#region src/core/task/actions.d.ts
|
|
15
|
+
/** How a steer was applied to a task. */
|
|
16
|
+
type SteerOutcome = 'live' | 'queued' | 'resumed';
|
|
17
|
+
/** Filters for the task list, mirroring the CLI flags. */
|
|
18
|
+
interface ListOptions {
|
|
19
|
+
running?: boolean;
|
|
20
|
+
stopped?: boolean;
|
|
21
|
+
archived?: boolean;
|
|
22
|
+
/** Narrow to a workspace (matched by git root). */
|
|
23
|
+
dir?: string;
|
|
24
|
+
/** Max rows; 'all' or undefined means no limit. */
|
|
25
|
+
limit?: number | 'all';
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/agent/types.d.ts
|
|
29
|
+
type Preset = 'observe' | 'comment' | 'write';
|
|
30
|
+
/** Per-integration wiring in a definition. `triggers` list = default behavior, map = event -> flow. */
|
|
31
|
+
/** Event value in a definition map: a flow name, or options. */
|
|
32
|
+
interface AgentEventOptions {
|
|
33
|
+
/** Flow to run; omit for the default agent. */
|
|
34
|
+
flow?: string;
|
|
35
|
+
/** Regex the event text must match (e.g. keywords on Slack `message`). */
|
|
36
|
+
match?: string;
|
|
37
|
+
/** May only narrow the agent's default permission for this event. */
|
|
38
|
+
permissions?: Permission;
|
|
39
|
+
/** `requester`: the task acts with the linked requester's own platform token. */
|
|
40
|
+
actAs?: 'requester';
|
|
41
|
+
}
|
|
42
|
+
interface AgentDefinitionIntegration {
|
|
43
|
+
triggers?: string[] | Record<string, string | true | AgentEventOptions>;
|
|
44
|
+
/** Platform tools the agent uses: a preset or an explicit tool list. */
|
|
45
|
+
tools?: Preset | string[];
|
|
46
|
+
}
|
|
47
|
+
/** What an agent IS: `.coder/agents/<id>/agent.json` beside its system.md. */
|
|
48
|
+
interface AgentDefinition {
|
|
49
|
+
/** Display name used in replies; defaults to the id. */
|
|
50
|
+
name?: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
engine?: string;
|
|
53
|
+
runner?: string;
|
|
54
|
+
model?: string;
|
|
55
|
+
effort?: Effort;
|
|
56
|
+
permissions?: Permission;
|
|
57
|
+
/** MCP servers every task of this agent attaches, in the `.mcp.json` entry shape. */
|
|
58
|
+
mcp?: Record<string, McpConfigEntry>;
|
|
59
|
+
integrations: Record<string, AgentDefinitionIntegration>;
|
|
60
|
+
}
|
|
61
|
+
/** Per-integration caps in usage: `allowedTools` and `allowedEvents` intersect the definition's. */
|
|
62
|
+
interface AgentUsageIntegration {
|
|
63
|
+
allowedTools?: Preset | string[];
|
|
64
|
+
allowedEvents?: string[];
|
|
65
|
+
}
|
|
66
|
+
/** How a repo RUNS an agent: one entry under `agents` in .coder/config.json. */
|
|
67
|
+
interface AgentUsage {
|
|
68
|
+
engine?: string;
|
|
69
|
+
model?: string;
|
|
70
|
+
effort?: Effort;
|
|
71
|
+
permissions?: Permission;
|
|
72
|
+
integrations?: Record<string, AgentUsageIntegration>;
|
|
73
|
+
}
|
|
74
|
+
interface Agent {
|
|
75
|
+
id: string;
|
|
76
|
+
/** definition.name ?? id. */
|
|
77
|
+
name: string;
|
|
78
|
+
definition: AgentDefinition;
|
|
79
|
+
usage?: AgentUsage;
|
|
80
|
+
/** Absolute folder path when the agent's body is on disk; remote agents have none. */
|
|
81
|
+
dir?: string;
|
|
82
|
+
/** Stored agent body, including system.md, when there is no on-disk folder. */
|
|
83
|
+
files?: Record<string, string>;
|
|
84
|
+
builtin: boolean;
|
|
85
|
+
}
|
|
86
|
+
/** A platform event, already typed by its integration. */
|
|
87
|
+
interface AgentEvent {
|
|
88
|
+
integration: string;
|
|
89
|
+
/** Catalog name, e.g. `pull_request` or `mention`. */
|
|
90
|
+
type: string;
|
|
91
|
+
/** `AgentApp.id` the webhook was addressed to. */
|
|
92
|
+
appId: string;
|
|
93
|
+
installationId: string;
|
|
94
|
+
deliveryId: string;
|
|
95
|
+
actor: {
|
|
96
|
+
id: string;
|
|
97
|
+
login?: string;
|
|
98
|
+
role?: string;
|
|
99
|
+
agent?: boolean;
|
|
100
|
+
};
|
|
101
|
+
/** Human text attached to the event: mention body, comment, PR title + body. */
|
|
102
|
+
text: string;
|
|
103
|
+
/** What the platform tells an agent about where the event happened, such as a Linear issue; bounded. */
|
|
104
|
+
promptContext?: string;
|
|
105
|
+
/** The Chat SDK thread and message it happened in, without raw platform payloads; replies go to this thread. */
|
|
106
|
+
chat?: {
|
|
107
|
+
thread: SerializedThread;
|
|
108
|
+
message?: SerializedMessage;
|
|
109
|
+
};
|
|
110
|
+
repo?: {
|
|
111
|
+
owner: string;
|
|
112
|
+
name: string;
|
|
113
|
+
cloneUrl: string;
|
|
114
|
+
ref: string;
|
|
115
|
+
defaultBranch: string;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/** Where a task came from: a Coder surface, or the id of the integration whose event started it. */
|
|
119
|
+
type TaskSource = 'dashboard' | 'cli' | 'schedule' | (string & {});
|
|
120
|
+
interface AgentTask {
|
|
121
|
+
cwd?: string;
|
|
122
|
+
id: string;
|
|
123
|
+
name?: string;
|
|
124
|
+
source: TaskSource;
|
|
125
|
+
agent: string;
|
|
126
|
+
/** Flow name, or `default` for the built-in single-task behavior. */
|
|
127
|
+
flow: string;
|
|
128
|
+
runner: RunnerKind;
|
|
129
|
+
/** Registered `http` runner the task routes to. */
|
|
130
|
+
runnerId?: string;
|
|
131
|
+
/** Effective permission after host, usage, and event narrowing. */
|
|
132
|
+
permissions?: Permission;
|
|
133
|
+
/** The platform event, or for a dashboard or CLI task on a repo, that repo through its install. */
|
|
134
|
+
event?: AgentEvent;
|
|
135
|
+
/** What a dashboard or CLI task asks; the newest turn after a continue. */
|
|
136
|
+
prompt?: string;
|
|
137
|
+
/** Flow arguments given directly, instead of derived from the event. */
|
|
138
|
+
args?: Record<string, unknown>;
|
|
139
|
+
/** Workspace MCP servers the task attaches, by name. */
|
|
140
|
+
mcp?: string[];
|
|
141
|
+
/** Handle the task posts as (GitHub `slug[bot]`, Slack bot user), so flows can trust only their own comments. */
|
|
142
|
+
author?: string;
|
|
143
|
+
definition: AgentDefinition;
|
|
144
|
+
/** Frozen id of the credential selected for this task. */
|
|
145
|
+
credential?: string;
|
|
146
|
+
/** Wular user who asked, when known; their personal credential comes first. */
|
|
147
|
+
requester?: string;
|
|
148
|
+
/** Stored agent body for runners whose checkout does not contain the agent. */
|
|
149
|
+
files?: Record<string, string>;
|
|
150
|
+
usage?: AgentUsage;
|
|
151
|
+
/** Effective tools per integration the task may act on (event integration + connections). */
|
|
152
|
+
tools: Record<string, string[]>;
|
|
153
|
+
/** Frozen per-integration write targets. Missing scope means read-only tools only. */
|
|
154
|
+
toolScopes?: Record<string, {
|
|
155
|
+
repo?: {
|
|
156
|
+
owner: string;
|
|
157
|
+
name: string;
|
|
158
|
+
};
|
|
159
|
+
/** Chat SDK thread id. */
|
|
160
|
+
thread?: string;
|
|
161
|
+
}>;
|
|
162
|
+
/** Conversation context gathered by the receiver: recent thread messages and the stored note. */
|
|
163
|
+
context?: TaskContext;
|
|
164
|
+
}
|
|
165
|
+
interface TaskContext {
|
|
166
|
+
outputSchema?: object;
|
|
167
|
+
/** Most recent thread messages, oldest first. */
|
|
168
|
+
messages?: Array<{
|
|
169
|
+
user: string;
|
|
170
|
+
text: string;
|
|
171
|
+
ts: string;
|
|
172
|
+
}>;
|
|
173
|
+
/** Completed turns of this task, kept across dashboard continuations. */
|
|
174
|
+
turns?: TaskTurn[];
|
|
175
|
+
/** Rolling note the agent wrote at the end of its previous turn in this thread. */
|
|
176
|
+
note?: string;
|
|
177
|
+
/** Extra instructions from the config repo (`.coder/<agent>.md`). */
|
|
178
|
+
instructions?: string;
|
|
179
|
+
/** The Coder account behind the event's actor, when they connected it. */
|
|
180
|
+
user?: {
|
|
181
|
+
name: string;
|
|
182
|
+
email: string;
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region src/server/settings/logins.d.ts
|
|
187
|
+
type LoginEngine = 'claude' | 'codex';
|
|
188
|
+
interface EngineLogin {
|
|
189
|
+
owner: string;
|
|
190
|
+
engine: LoginEngine;
|
|
191
|
+
state: 'starting' | 'open' | 'verifying' | 'done' | 'failed';
|
|
192
|
+
url?: string;
|
|
193
|
+
/** The device code Codex shows. */
|
|
194
|
+
code?: string;
|
|
195
|
+
/** The code the user pasted for Claude, sealed until the runner takes it. */
|
|
196
|
+
input?: string;
|
|
197
|
+
error?: string;
|
|
198
|
+
/** The stored credential's label once signed in. */
|
|
199
|
+
label?: string;
|
|
200
|
+
tokenHash: string;
|
|
201
|
+
runner: RunnerKind;
|
|
202
|
+
handle?: string;
|
|
203
|
+
createdAt: number;
|
|
204
|
+
expiresAt: number;
|
|
205
|
+
}
|
|
206
|
+
interface LoginView {
|
|
207
|
+
id: string;
|
|
208
|
+
engine: LoginEngine;
|
|
209
|
+
state: EngineLogin['state'];
|
|
210
|
+
expiresAt: number;
|
|
211
|
+
url?: string;
|
|
212
|
+
code?: string;
|
|
213
|
+
error?: string;
|
|
214
|
+
label?: string;
|
|
215
|
+
}
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region src/server/store/types.d.ts
|
|
218
|
+
interface AgentRecord {
|
|
219
|
+
id: string;
|
|
220
|
+
name: string;
|
|
221
|
+
description?: string;
|
|
222
|
+
source: 'repo' | 'home' | 'upload' | 'builtin';
|
|
223
|
+
repo?: string;
|
|
224
|
+
path?: string;
|
|
225
|
+
currentVersion: number;
|
|
226
|
+
settings?: AgentUsage;
|
|
227
|
+
/** A local server's agent: read from its folder, with no version history. */
|
|
228
|
+
local?: true;
|
|
229
|
+
/** The last commit of a local agent's folder. */
|
|
230
|
+
commit?: string;
|
|
231
|
+
createdAt: number;
|
|
232
|
+
updatedAt: number;
|
|
233
|
+
}
|
|
234
|
+
interface AgentVersionRecord {
|
|
235
|
+
agent: string;
|
|
236
|
+
version: number;
|
|
237
|
+
definition: AgentDefinition;
|
|
238
|
+
systemPrompt: string;
|
|
239
|
+
files?: Record<string, string>;
|
|
240
|
+
commit?: string;
|
|
241
|
+
/** Where a repository import read this version. */
|
|
242
|
+
source?: {
|
|
243
|
+
repo: string;
|
|
244
|
+
ref: string;
|
|
245
|
+
commit: string;
|
|
246
|
+
};
|
|
247
|
+
importedFrom: string;
|
|
248
|
+
createdAt: number;
|
|
249
|
+
}
|
|
250
|
+
type ServerAgent = AgentRecord & {
|
|
251
|
+
definition?: AgentVersionRecord['definition'];
|
|
252
|
+
};
|
|
253
|
+
type PushResult = {
|
|
254
|
+
id: string;
|
|
255
|
+
version: number;
|
|
256
|
+
unchanged: boolean;
|
|
257
|
+
};
|
|
258
|
+
interface TaskOutcome {
|
|
259
|
+
ok: boolean;
|
|
260
|
+
exitCode: number | null;
|
|
261
|
+
output: string;
|
|
262
|
+
/** `git diff` of the checkout when the task ran on a repo. */
|
|
263
|
+
diff?: string;
|
|
264
|
+
}
|
|
265
|
+
type TaskState = 'queued' | 'running' | 'waiting' | 'completed' | 'failed' | 'cancelled';
|
|
266
|
+
/** A task's record: the queue row while it waits, the outcome afterwards. */
|
|
267
|
+
interface TaskStatus {
|
|
268
|
+
task: AgentTask;
|
|
269
|
+
status: TaskState;
|
|
270
|
+
/** Times the worker picked it up; a runner crash earns one retry. */
|
|
271
|
+
attempts: number;
|
|
272
|
+
generation?: number;
|
|
273
|
+
inboxSeq?: number;
|
|
274
|
+
inboxAck?: {
|
|
275
|
+
generation: number;
|
|
276
|
+
seq: number;
|
|
277
|
+
};
|
|
278
|
+
result?: TaskOutcome;
|
|
279
|
+
error?: string;
|
|
280
|
+
tokens?: unknown;
|
|
281
|
+
/** Included by admin task responses; the secret remains in the runner context only. */
|
|
282
|
+
credential?: string;
|
|
283
|
+
/** Opaque runner-owned identifier. Never accepted from an HTTP caller. */
|
|
284
|
+
handle?: string;
|
|
285
|
+
/** SHA-256 of the current attempt's bearer token. */
|
|
286
|
+
tokenHash?: string;
|
|
287
|
+
/** Latest authenticated callback from the current attempt. */
|
|
288
|
+
lastSeenAt?: number;
|
|
289
|
+
/** Persisted runner/log cursors survive a warm-process or serverless restart. */
|
|
290
|
+
logCursor?: number;
|
|
291
|
+
logSeq?: number;
|
|
292
|
+
logBytes?: number;
|
|
293
|
+
archivedAt?: number;
|
|
294
|
+
approval?: unknown;
|
|
295
|
+
/** Ask-sidecar answers in arrival order. */
|
|
296
|
+
answer?: unknown[];
|
|
297
|
+
createdAt: number;
|
|
298
|
+
startedAt?: number;
|
|
299
|
+
finishedAt?: number;
|
|
300
|
+
/** Set by a cancel request while the task runs; the worker stops it at the next check. */
|
|
301
|
+
cancelRequestedAt?: number;
|
|
302
|
+
updatedAt: number;
|
|
303
|
+
/** A read-only row for a task the CLI ran on this machine. */
|
|
304
|
+
local?: true;
|
|
305
|
+
turns?: TaskTurn[];
|
|
306
|
+
fallbacks?: Task['fallbacks'];
|
|
307
|
+
}
|
|
308
|
+
/** One line of a task's output, streamed by the runner while it runs. */
|
|
309
|
+
interface TaskLogLine {
|
|
310
|
+
seq: number;
|
|
311
|
+
at: number;
|
|
312
|
+
/** `out` and `err` from the runner, `sys` from the worker (retries, timeouts). */
|
|
313
|
+
level: 'out' | 'err' | 'sys';
|
|
314
|
+
line: string;
|
|
315
|
+
entry?: TaskLogEntry;
|
|
316
|
+
}
|
|
317
|
+
interface EngineCredential {
|
|
318
|
+
engine: 'claude' | 'codex' | 'custom';
|
|
319
|
+
env: Record<string, string>;
|
|
320
|
+
}
|
|
321
|
+
//#endregion
|
|
322
|
+
//#region src/server/dash/serve.d.ts
|
|
323
|
+
declare global {
|
|
324
|
+
var __coder: {
|
|
325
|
+
handle(request: Request): Promise<Response>;
|
|
326
|
+
} | undefined;
|
|
327
|
+
}
|
|
328
|
+
//#endregion
|
|
329
|
+
//#region src/server/settings/credentials.d.ts
|
|
330
|
+
interface CredentialAccount {
|
|
331
|
+
email?: string;
|
|
332
|
+
plan?: string;
|
|
333
|
+
}
|
|
334
|
+
interface CredentialSummary {
|
|
335
|
+
label: string;
|
|
336
|
+
engine: EngineCredential['engine'];
|
|
337
|
+
scope: 'personal' | 'workspace';
|
|
338
|
+
isDefault: boolean;
|
|
339
|
+
createdAt: number;
|
|
340
|
+
env: string[];
|
|
341
|
+
/** The secret with all but its ends hidden. */
|
|
342
|
+
masked: string;
|
|
343
|
+
account?: CredentialAccount;
|
|
344
|
+
}
|
|
345
|
+
//#endregion
|
|
346
|
+
//#region src/server/tasks/usage.d.ts
|
|
347
|
+
type UsageGroup = 'agent' | 'installation' | 'engine';
|
|
348
|
+
type UsageTotal = {
|
|
349
|
+
key: string;
|
|
350
|
+
tasks: number;
|
|
351
|
+
runnerMs: number;
|
|
352
|
+
tokens?: unknown;
|
|
353
|
+
};
|
|
354
|
+
type UsageTotals = {
|
|
355
|
+
since: number;
|
|
356
|
+
totals: UsageTotal[] | Record<UsageGroup, UsageTotal[]>;
|
|
357
|
+
};
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region src/core/remote.d.ts
|
|
360
|
+
interface ServerOptions {
|
|
361
|
+
/** `true` for the default server (CODER_SERVER, else hosted); a URL for another. */
|
|
362
|
+
server?: string | true;
|
|
363
|
+
token?: string;
|
|
364
|
+
yes?: boolean;
|
|
365
|
+
/** Organization slug for this call; overrides the saved choice. */
|
|
366
|
+
organization?: string;
|
|
367
|
+
}
|
|
368
|
+
interface CredentialAddOptions extends ServerOptions {
|
|
369
|
+
engine?: string;
|
|
370
|
+
/** The values by name, or names whose values come from `value` (`-` reads stdin), else this environment. */
|
|
371
|
+
env: Record<string, string> | string[];
|
|
372
|
+
value?: string;
|
|
373
|
+
workspace?: boolean;
|
|
374
|
+
noCheck?: boolean;
|
|
375
|
+
default?: boolean;
|
|
376
|
+
}
|
|
377
|
+
/** Add an API key or other engine environment values as a personal or workspace credential. */
|
|
378
|
+
declare function addCredential(label: string | undefined, options: CredentialAddOptions): Promise<{
|
|
379
|
+
ok: true;
|
|
380
|
+
label: string;
|
|
381
|
+
}>;
|
|
382
|
+
interface CredentialLoginOptions extends ServerOptions {
|
|
383
|
+
/** Gets a cancel for the started sign-in. */
|
|
384
|
+
onStart?(cancel: () => Promise<unknown>): void;
|
|
385
|
+
/** Shows the sign-in link and code once the runner has them. */
|
|
386
|
+
onOpen?(login: LoginView): void;
|
|
387
|
+
/** Asks for the code Claude's sign-in page shows. */
|
|
388
|
+
code?(): Promise<string>;
|
|
389
|
+
}
|
|
390
|
+
/** Sign in to a Claude or Codex subscription through the server's runner; resolves once it is done or failed. */
|
|
391
|
+
declare function loginCredential(engine: string | undefined, options?: CredentialLoginOptions): Promise<LoginView>;
|
|
392
|
+
//#endregion
|
|
393
|
+
//#region src/core/task/index.d.ts
|
|
394
|
+
/** Where a task call runs: this machine's tasks under `cwd`, or the server named by `server`. */
|
|
395
|
+
type TaskOptions = {
|
|
396
|
+
cwd?: string;
|
|
397
|
+
} & ServerOptions;
|
|
398
|
+
interface TaskRunOptions {
|
|
399
|
+
/** Run as a local agent; the other options override its definition. */
|
|
400
|
+
agent?: string;
|
|
401
|
+
outputSchema?: object;
|
|
402
|
+
engine?: string;
|
|
403
|
+
model?: string;
|
|
404
|
+
effort?: string;
|
|
405
|
+
permissions?: string;
|
|
406
|
+
name?: string;
|
|
407
|
+
system?: string;
|
|
408
|
+
resume?: string;
|
|
409
|
+
/** Extra directories the task may reach, resolved against cwd. */
|
|
410
|
+
addDirs?: string[];
|
|
411
|
+
/** MCP servers to attach, by name from config. */
|
|
412
|
+
mcp?: string;
|
|
413
|
+
/** Block until the task finishes, walking the engine chain when a turn fails to start. */
|
|
414
|
+
wait?: boolean;
|
|
415
|
+
simulateApproval?: boolean;
|
|
416
|
+
/** Server tasks: the repository and runner to use. */
|
|
417
|
+
repo?: string;
|
|
418
|
+
runner?: string;
|
|
419
|
+
onFallback?: (fallback: {
|
|
420
|
+
engine: string;
|
|
421
|
+
detail: string;
|
|
422
|
+
next: string;
|
|
423
|
+
}) => void;
|
|
424
|
+
onNote?: (note: string) => void;
|
|
425
|
+
/** Each time a wait starts on a task id. */
|
|
426
|
+
onWaiting?: (taskId: string) => void;
|
|
427
|
+
/** Server task log lines while waiting. */
|
|
428
|
+
onLog?: (line: TaskLogLine) => void;
|
|
429
|
+
}
|
|
430
|
+
interface RunResult {
|
|
431
|
+
taskId: string;
|
|
432
|
+
status: string;
|
|
433
|
+
startupCheck?: 'passed' | 'pending';
|
|
434
|
+
commands?: Record<'result' | 'steer' | 'stop' | 'list', string>;
|
|
435
|
+
finalMessage?: string | null;
|
|
436
|
+
error?: string;
|
|
437
|
+
tokens?: TokenUsage | null;
|
|
438
|
+
model?: string | null;
|
|
439
|
+
}
|
|
440
|
+
interface TaskInspection {
|
|
441
|
+
taskId: string;
|
|
442
|
+
status: string;
|
|
443
|
+
task: Task;
|
|
444
|
+
result: ReturnType<typeof readTask>['result'];
|
|
445
|
+
steps: TaskLogEntry[];
|
|
446
|
+
turns: ReturnType<typeof readTurnResults>;
|
|
447
|
+
pendingApprovals: Array<{
|
|
448
|
+
id: string;
|
|
449
|
+
summary: string;
|
|
450
|
+
cwd: string | null;
|
|
451
|
+
}>;
|
|
452
|
+
/** While running: time since the last sign of life, and whether it looks stalled. */
|
|
453
|
+
idleMs?: number;
|
|
454
|
+
lastActivityAt?: string | null;
|
|
455
|
+
stalled?: boolean;
|
|
456
|
+
/** While running: the last progress entry and the latest token snapshot. */
|
|
457
|
+
lastLog?: TaskLogEntry;
|
|
458
|
+
liveTokens?: TokenUsage | null;
|
|
459
|
+
}
|
|
460
|
+
interface TaskRow {
|
|
461
|
+
taskId: string;
|
|
462
|
+
status: Task['status'] | 'waiting-approval';
|
|
463
|
+
pendingApprovals: number;
|
|
464
|
+
engine: string | null;
|
|
465
|
+
model: string | null;
|
|
466
|
+
effort: string | null;
|
|
467
|
+
name: string | null;
|
|
468
|
+
cwd: string | null;
|
|
469
|
+
prompt: string;
|
|
470
|
+
updatedAt: string | undefined;
|
|
471
|
+
archived: boolean;
|
|
472
|
+
flowRunId: string | null;
|
|
473
|
+
idleMs: number | null;
|
|
474
|
+
}
|
|
475
|
+
interface TaskWatch {
|
|
476
|
+
task: Task | TaskStatus;
|
|
477
|
+
/** Progress entries as they land, ending when the task is terminal. */
|
|
478
|
+
events: AsyncGenerator<TaskLogEntry | TaskLogLine>;
|
|
479
|
+
/** The task once the stream ends. */
|
|
480
|
+
final(): Promise<{
|
|
481
|
+
taskId: string;
|
|
482
|
+
status: string;
|
|
483
|
+
result: any;
|
|
484
|
+
task: Task;
|
|
485
|
+
} | TaskStatus>;
|
|
486
|
+
}
|
|
487
|
+
interface ApprovalRow {
|
|
488
|
+
taskId: string;
|
|
489
|
+
id: string;
|
|
490
|
+
summary: string;
|
|
491
|
+
cwd?: string | null;
|
|
492
|
+
createdAt?: string;
|
|
493
|
+
answered?: string | null;
|
|
494
|
+
}
|
|
495
|
+
//#endregion
|
|
496
|
+
//#region src/core/hosts.d.ts
|
|
6
497
|
/** Result of a plugin install/refresh attempt. */
|
|
7
498
|
interface PluginResult {
|
|
8
499
|
marketplace: string;
|
|
@@ -25,32 +516,6 @@ type CodexInstallResult = {
|
|
|
25
516
|
} | null;
|
|
26
517
|
declare function ensureCodexInstalled(availability: Availability): CodexInstallResult;
|
|
27
518
|
declare function ensureCodexUpToDate(availability: Availability): CodexUpdateResult;
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region src/cmd/model.d.ts
|
|
30
|
-
interface ProbeResult {
|
|
31
|
-
reachable: boolean;
|
|
32
|
-
modelListed: boolean | null;
|
|
33
|
-
detail: string;
|
|
34
|
-
}
|
|
35
|
-
interface PersistedModel {
|
|
36
|
-
name: string;
|
|
37
|
-
entry: CustomModelConfig;
|
|
38
|
-
file: string;
|
|
39
|
-
probe: ProbeResult;
|
|
40
|
-
codex: ReturnType<typeof getCodexAvailability>;
|
|
41
|
-
install: ReturnType<typeof ensureCodexInstalled>;
|
|
42
|
-
nativeResponses: boolean;
|
|
43
|
-
keyMissing: boolean;
|
|
44
|
-
ready: boolean;
|
|
45
|
-
}
|
|
46
|
-
interface ModelWriteOptions {
|
|
47
|
-
baseUrl?: string;
|
|
48
|
-
model?: string;
|
|
49
|
-
envKey?: string;
|
|
50
|
-
workspace?: boolean;
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region src/cmd/setup-host.d.ts
|
|
54
519
|
interface SetupHostReport {
|
|
55
520
|
codex: {
|
|
56
521
|
available: boolean;
|
|
@@ -72,8 +537,6 @@ interface SetupHostReport {
|
|
|
72
537
|
config: CoderConfig;
|
|
73
538
|
ready: boolean;
|
|
74
539
|
}
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/cmd/upgrade.d.ts
|
|
77
540
|
interface UpgradeReport {
|
|
78
541
|
cli?: {
|
|
79
542
|
pm: string;
|
|
@@ -95,113 +558,262 @@ interface UpgradeReport {
|
|
|
95
558
|
};
|
|
96
559
|
}
|
|
97
560
|
//#endregion
|
|
98
|
-
//#region src/
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
561
|
+
//#region src/core/models.d.ts
|
|
562
|
+
interface PersistedModel {
|
|
563
|
+
name: string;
|
|
564
|
+
entry: CustomModelConfig;
|
|
565
|
+
file: string;
|
|
566
|
+
probe: ProbeResult;
|
|
567
|
+
codex: ReturnType<typeof getCodexAvailability>;
|
|
568
|
+
install: ReturnType<typeof ensureCodexInstalled>;
|
|
569
|
+
nativeResponses: boolean;
|
|
570
|
+
keyMissing: boolean;
|
|
571
|
+
ready: boolean;
|
|
572
|
+
}
|
|
573
|
+
interface ModelWriteOptions {
|
|
574
|
+
baseUrl?: string;
|
|
575
|
+
model?: string;
|
|
576
|
+
envKey?: string;
|
|
577
|
+
workspace?: boolean;
|
|
108
578
|
}
|
|
109
579
|
//#endregion
|
|
110
|
-
//#region src/
|
|
111
|
-
|
|
112
|
-
|
|
580
|
+
//#region src/client/auth/session.d.ts
|
|
581
|
+
interface Session {
|
|
582
|
+
/** Wular Auth access token for this server. */
|
|
583
|
+
token: string;
|
|
584
|
+
refreshToken: string;
|
|
585
|
+
/** When `token` expires, epoch milliseconds. */
|
|
586
|
+
expiresAt: number;
|
|
587
|
+
/** The Wular Auth issuer that signed the tokens. */
|
|
588
|
+
issuer: string;
|
|
589
|
+
user: {
|
|
590
|
+
name: string;
|
|
591
|
+
email: string;
|
|
592
|
+
};
|
|
593
|
+
organization?: {
|
|
594
|
+
id: string;
|
|
595
|
+
name: string;
|
|
596
|
+
slug: string;
|
|
597
|
+
};
|
|
598
|
+
at: number;
|
|
599
|
+
}
|
|
113
600
|
//#endregion
|
|
114
|
-
//#region src/
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
601
|
+
//#region src/client/auth/sign-in.d.ts
|
|
602
|
+
type LoginOrganization = NonNullable<Session['organization']>;
|
|
603
|
+
interface SignInOptions {
|
|
604
|
+
device?: boolean;
|
|
605
|
+
open?: (url: string) => void;
|
|
606
|
+
onCode?: (code: string, url: string) => void;
|
|
607
|
+
organization?: string;
|
|
608
|
+
chooseOrganization?: (organizations: LoginOrganization[]) => Promise<string>;
|
|
609
|
+
}
|
|
610
|
+
//#endregion
|
|
611
|
+
//#region src/agent/exec.d.ts
|
|
612
|
+
interface ExecResult {
|
|
613
|
+
ok: boolean;
|
|
614
|
+
flow: string;
|
|
615
|
+
/** Default flow: the engine's answer, posted to the platform unless `post` was false. */
|
|
616
|
+
reply?: string;
|
|
617
|
+
note?: string;
|
|
618
|
+
posted?: boolean;
|
|
619
|
+
taskId?: string;
|
|
620
|
+
runId?: string;
|
|
621
|
+
result?: unknown;
|
|
622
|
+
tokens?: unknown;
|
|
623
|
+
}
|
|
624
|
+
//#endregion
|
|
625
|
+
//#region src/agent/index.d.ts
|
|
626
|
+
/** Where an agent call runs: this repo's agents under `cwd`, or the server named by `server`. */
|
|
627
|
+
type AgentOptions = {
|
|
628
|
+
cwd?: string;
|
|
629
|
+
} & ServerOptions;
|
|
630
|
+
/** What an interactive `agent init` picked; flags fill these otherwise. */
|
|
631
|
+
interface AgentPicks {
|
|
120
632
|
name?: string;
|
|
121
|
-
|
|
122
|
-
|
|
633
|
+
integrations: string[];
|
|
634
|
+
events: Record<string, string[]>;
|
|
635
|
+
matches: Record<string, Record<string, string>>;
|
|
636
|
+
tools: Preset;
|
|
637
|
+
}
|
|
638
|
+
interface AgentInitOptions {
|
|
123
639
|
cwd?: string;
|
|
640
|
+
name?: string;
|
|
641
|
+
description?: string;
|
|
642
|
+
permissions?: AgentDefinition['permissions'];
|
|
643
|
+
integrations?: string | string[];
|
|
644
|
+
triggers?: string | string[];
|
|
645
|
+
tools?: string;
|
|
646
|
+
/** `event=regex` pairs. */
|
|
647
|
+
match?: string | string[];
|
|
648
|
+
/** Asks for the id when none is given. */
|
|
649
|
+
askId?: (validate: (id: string) => string | undefined) => Promise<string>;
|
|
650
|
+
/** Asks for the picks instead of reading them from the options. */
|
|
651
|
+
askPicks?: (id: string) => Promise<AgentPicks>;
|
|
652
|
+
}
|
|
653
|
+
//#endregion
|
|
654
|
+
//#region src/runner/serve.d.ts
|
|
655
|
+
interface RunnerServeOptions extends ServerOptions {
|
|
656
|
+
port?: number;
|
|
657
|
+
/** The public URL a tunnel gives the local port. */
|
|
658
|
+
url?: string;
|
|
659
|
+
name?: string;
|
|
660
|
+
workspace?: boolean;
|
|
661
|
+
runnerUrl?: string;
|
|
662
|
+
}
|
|
663
|
+
type RunnerServeResult = RunnerRow & {
|
|
664
|
+
port: number;
|
|
665
|
+
server: string;
|
|
666
|
+
/** Mark the runner offline on the server and stop listening. */
|
|
667
|
+
close(): Promise<void>;
|
|
668
|
+
};
|
|
669
|
+
/** Serve a server's tasks from this machine; the runner keeps its id and secret per server across restarts. */
|
|
670
|
+
declare function serveRunner(options?: RunnerServeOptions): Promise<RunnerServeResult>;
|
|
671
|
+
//#endregion
|
|
672
|
+
//#region src/server/agents/apps.d.ts
|
|
673
|
+
interface ServerAppOptions {
|
|
674
|
+
/** Where the app lives, such as a GitHub organization; the operator's own account when absent. */
|
|
675
|
+
owner?: string;
|
|
676
|
+
name?: string;
|
|
677
|
+
env?: Record<string, string | undefined>;
|
|
678
|
+
}
|
|
679
|
+
/** The one-time page that creates the built-in agent's public app on `integration`, stored for the whole server. */
|
|
680
|
+
declare function serverAppLink(integration: string, options?: ServerAppOptions): Promise<{
|
|
681
|
+
url: string;
|
|
682
|
+
}>;
|
|
683
|
+
//#endregion
|
|
684
|
+
//#region src/server/maintenance.d.ts
|
|
685
|
+
interface MaintenanceOptions {
|
|
686
|
+
env?: Record<string, string | undefined>;
|
|
124
687
|
}
|
|
688
|
+
/** Apply pending server migrations and return how many were applied. */
|
|
689
|
+
declare function migrate(options?: MaintenanceOptions): Promise<{
|
|
690
|
+
applied: number;
|
|
691
|
+
}>;
|
|
692
|
+
/** Re-seal every stored secret with the current encryption key. */
|
|
693
|
+
declare function rotateKey(options?: MaintenanceOptions): Promise<{
|
|
694
|
+
moved: number;
|
|
695
|
+
}>;
|
|
696
|
+
//#endregion
|
|
697
|
+
//#region src/core/cache.d.ts
|
|
698
|
+
interface CacheMigration {
|
|
699
|
+
cache: string;
|
|
700
|
+
tasks: number;
|
|
701
|
+
flows: number;
|
|
702
|
+
files: number;
|
|
703
|
+
}
|
|
704
|
+
//#endregion
|
|
705
|
+
//#region src/server/routes/guards.d.ts
|
|
706
|
+
type ServerMode = 'local' | 'memory' | 'cloud';
|
|
707
|
+
//#endregion
|
|
708
|
+
//#region src/server/serve.d.ts
|
|
709
|
+
/** Serverless request handler with a lazily initialized, reused backend. */
|
|
710
|
+
declare function serverHandler(env?: Record<string, string | undefined>, host?: 'node' | 'vercel'): {
|
|
711
|
+
(request: Request, waitUntil?: (work: Promise<unknown>) => void): Promise<Response>;
|
|
712
|
+
scheduled(): Promise<void>;
|
|
713
|
+
close(): Promise<void>;
|
|
714
|
+
};
|
|
715
|
+
interface ServeOptions {
|
|
716
|
+
cwd?: string;
|
|
717
|
+
env?: Record<string, string | undefined>;
|
|
718
|
+
port?: number;
|
|
719
|
+
/** Interface to listen on: 127.0.0.1 by default without a database, else every interface. */
|
|
720
|
+
host?: string;
|
|
721
|
+
/** A throwaway test server that keeps everything in memory. */
|
|
722
|
+
memory?: boolean;
|
|
723
|
+
runner?: RunnerKind;
|
|
724
|
+
}
|
|
725
|
+
interface ServeResult {
|
|
726
|
+
address: string;
|
|
727
|
+
publicUrl: string;
|
|
728
|
+
warnings: string[];
|
|
729
|
+
close(): Promise<void>;
|
|
730
|
+
}
|
|
731
|
+
type ServeDetails = ServeResult & {
|
|
732
|
+
runner: RunnerKind;
|
|
733
|
+
store: 'memory' | 'postgres';
|
|
734
|
+
mode: ServerMode;
|
|
735
|
+
cacheMigration?: Promise<CacheMigration>;
|
|
736
|
+
maxTasks: number;
|
|
737
|
+
signIn?: string;
|
|
738
|
+
mintedToken?: string;
|
|
739
|
+
/** Where DATABASE_URL points. */
|
|
740
|
+
database?: string;
|
|
741
|
+
/** The dashboard link, with the memory server's token, when the server is on this machine. */
|
|
742
|
+
dashboard?: string;
|
|
743
|
+
};
|
|
744
|
+
declare function serve(options?: ServeOptions): Promise<ServeDetails>;
|
|
745
|
+
//#endregion
|
|
746
|
+
//#region src/sdk.d.ts
|
|
125
747
|
/** Run and control coder tasks. Mirrors `coder task`. */
|
|
126
748
|
declare const task: {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
taskId: string;
|
|
130
|
-
}>;
|
|
131
|
-
/**
|
|
132
|
-
* A task's result. With `wait`, blocks until the task is terminal (a pending
|
|
133
|
-
* approval throws a CoderError with code 'approval-pending'). `tail` fills
|
|
134
|
-
* `steps` with the last n log entries (default 0: []). Omit the id for the
|
|
135
|
-
* most recent task.
|
|
136
|
-
*/
|
|
137
|
-
result(id?: string, opts?: {
|
|
749
|
+
run: (prompt: string, opts?: TaskRunOptions & TaskOptions) => Promise<RunResult | TaskStatus>;
|
|
750
|
+
result: (id?: string, opts?: TaskOptions & {
|
|
138
751
|
wait?: boolean;
|
|
139
752
|
tail?: number | "all";
|
|
140
|
-
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
})
|
|
146
|
-
|
|
147
|
-
|
|
753
|
+
onWaiting?: (taskId: string) => void;
|
|
754
|
+
}) => Promise<TaskInspection | TaskStatus>;
|
|
755
|
+
list: (opts?: TaskOptions & ListOptions) => Promise<(TaskRow[] & {
|
|
756
|
+
clipped: number;
|
|
757
|
+
archived: number;
|
|
758
|
+
}) | TaskStatus[]>;
|
|
759
|
+
watch: (id?: string, opts?: TaskOptions & {
|
|
760
|
+
tail?: number | "all";
|
|
761
|
+
}) => Promise<TaskWatch>;
|
|
762
|
+
stream: (id?: string, opts?: TaskOptions & {
|
|
763
|
+
tail?: number | "all";
|
|
764
|
+
}) => AsyncGenerator<TaskLogEntry | TaskLogLine, void, any>;
|
|
765
|
+
steer: (id: string, text: string, opts?: TaskOptions & {
|
|
148
766
|
model?: string;
|
|
149
767
|
effort?: string;
|
|
150
768
|
permissions?: string;
|
|
151
|
-
|
|
152
|
-
})
|
|
769
|
+
wait?: boolean;
|
|
770
|
+
}) => Promise<Record<string, unknown> | {
|
|
771
|
+
taskId: string;
|
|
772
|
+
steered: SteerOutcome;
|
|
773
|
+
} | {
|
|
774
|
+
status: TaskStatus$1 | null;
|
|
775
|
+
finalMessage: any;
|
|
153
776
|
taskId: string;
|
|
154
777
|
steered: SteerOutcome;
|
|
155
778
|
}>;
|
|
156
|
-
|
|
157
|
-
ask(id: string, question: string, opts?: {
|
|
779
|
+
ask: (id: string, question: string, opts?: TaskOptions & {
|
|
158
780
|
model?: string;
|
|
159
781
|
effort?: string;
|
|
160
|
-
|
|
161
|
-
})
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
stop(id
|
|
167
|
-
|
|
168
|
-
}
|
|
782
|
+
onAsking?: (taskId: string) => void;
|
|
783
|
+
}) => Promise<Record<string, unknown>>;
|
|
784
|
+
approvals: (id?: string, opts?: TaskOptions) => Promise<ApprovalRow[] | Record<string, unknown>[]>;
|
|
785
|
+
approve: (reference: string | undefined, approvalId?: string, opts?: TaskOptions & {
|
|
786
|
+
deny?: boolean;
|
|
787
|
+
}) => Promise<unknown>;
|
|
788
|
+
stop: (id?: string, opts?: TaskOptions) => Promise<{
|
|
789
|
+
ok: true;
|
|
790
|
+
} | {
|
|
169
791
|
taskId: string;
|
|
170
792
|
status: "cancelled";
|
|
171
793
|
interrupt: string;
|
|
172
794
|
}>;
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
795
|
+
archive: (id?: string, opts?: TaskOptions & {
|
|
796
|
+
allStopped?: boolean;
|
|
797
|
+
}) => Promise<{
|
|
798
|
+
archived: string[];
|
|
799
|
+
count: number;
|
|
800
|
+
taskId?: undefined;
|
|
801
|
+
} | {
|
|
177
802
|
taskId: string;
|
|
178
803
|
archived: true;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
delete(id
|
|
182
|
-
|
|
183
|
-
})
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
approve(id: string, approvalId: string, opts?: {
|
|
189
|
-
deny?: boolean;
|
|
190
|
-
cwd?: string;
|
|
191
|
-
}): {
|
|
804
|
+
count?: undefined;
|
|
805
|
+
}>;
|
|
806
|
+
delete: (id?: string, opts?: TaskOptions & {
|
|
807
|
+
allArchived?: boolean;
|
|
808
|
+
}) => Promise<{
|
|
809
|
+
deleted: string[];
|
|
810
|
+
count: number;
|
|
811
|
+
taskId?: undefined;
|
|
812
|
+
} | {
|
|
192
813
|
taskId: string;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
/** Pending approvals for a task (omit the id for the most recent task). */
|
|
197
|
-
approvals(id?: string, opts?: {
|
|
198
|
-
cwd?: string;
|
|
199
|
-
}): Approval[];
|
|
200
|
-
/** Follow a task live: an async iterable of progress log entries. `tail` replays only the last n (default 1). */
|
|
201
|
-
stream(id?: string, opts?: {
|
|
202
|
-
tail?: number | "all";
|
|
203
|
-
cwd?: string;
|
|
204
|
-
}): AsyncGenerator<JobLogEntry>;
|
|
814
|
+
deleted: true;
|
|
815
|
+
count?: undefined;
|
|
816
|
+
}>;
|
|
205
817
|
};
|
|
206
818
|
/** Manage models: custom endpoints, engine aliases, disable toggles. Mirrors `coder model`. */
|
|
207
819
|
declare const model: {
|
|
@@ -263,7 +875,7 @@ declare const model: {
|
|
|
263
875
|
name: string;
|
|
264
876
|
}[];
|
|
265
877
|
}>;
|
|
266
|
-
/** Alias a name to an engine spec, e.g. alias('fast', 'codex:
|
|
878
|
+
/** Alias a name to an engine spec, e.g. alias('fast', 'codex:luna'). */
|
|
267
879
|
alias: (name: string, spec: string, opts?: {
|
|
268
880
|
workspace?: boolean;
|
|
269
881
|
cwd?: string;
|
|
@@ -321,6 +933,45 @@ declare const config: {
|
|
|
321
933
|
unset?: boolean;
|
|
322
934
|
};
|
|
323
935
|
};
|
|
936
|
+
/** Configure MCP servers in `.coder/config.json`, or the user file with `user`. Mirrors `coder mcp`. */
|
|
937
|
+
declare const mcp: {
|
|
938
|
+
/** Save a stdio (`command`) or remote (`url`) server; `env`, `header` and `tools` are comma lists. */
|
|
939
|
+
add: (name: string, opts: McpAddOptions & {
|
|
940
|
+
cwd?: string;
|
|
941
|
+
}) => {
|
|
942
|
+
name: string;
|
|
943
|
+
file: string;
|
|
944
|
+
};
|
|
945
|
+
/** Save an entry from any `.mcp.json`, as an object or JSON text. */
|
|
946
|
+
addJson: (name: string, entry: string | Record<string, unknown>, opts?: {
|
|
947
|
+
user?: boolean;
|
|
948
|
+
cwd?: string;
|
|
949
|
+
}) => {
|
|
950
|
+
name: string;
|
|
951
|
+
file: string;
|
|
952
|
+
};
|
|
953
|
+
/** The configured servers by name. */
|
|
954
|
+
list: (opts?: {
|
|
955
|
+
cwd?: string;
|
|
956
|
+
}) => Record<string, {
|
|
957
|
+
command?: string | undefined;
|
|
958
|
+
args?: string[] | undefined;
|
|
959
|
+
env?: Record<string, string> | undefined;
|
|
960
|
+
url?: string | undefined;
|
|
961
|
+
type?: "stdio" | "http" | "sse" | undefined;
|
|
962
|
+
headers?: Record<string, string> | undefined;
|
|
963
|
+
tools?: string[] | undefined;
|
|
964
|
+
description?: string | undefined;
|
|
965
|
+
}>;
|
|
966
|
+
/** Remove a server. */
|
|
967
|
+
remove: (name: string, opts?: {
|
|
968
|
+
user?: boolean;
|
|
969
|
+
cwd?: string;
|
|
970
|
+
}) => {
|
|
971
|
+
name: string;
|
|
972
|
+
file: string;
|
|
973
|
+
};
|
|
974
|
+
};
|
|
324
975
|
/** Probe engines, seed the chain, install requested host plugins. */
|
|
325
976
|
declare function setupHost(hosts?: string[], opts?: {
|
|
326
977
|
cwd?: string;
|
|
@@ -330,8 +981,10 @@ declare function upgrade(opts?: {
|
|
|
330
981
|
cliOnly?: boolean;
|
|
331
982
|
pluginsOnly?: boolean;
|
|
332
983
|
}): Promise<UpgradeReport>;
|
|
333
|
-
/** List bundled docs, or return one topic's raw markdown. */
|
|
334
|
-
declare function docs(topic?: string
|
|
984
|
+
/** List bundled docs, or return one topic's raw markdown; `claude` picks the Claude Code flavor of the skill. */
|
|
985
|
+
declare function docs(topic?: string, opts?: {
|
|
986
|
+
claude?: boolean;
|
|
987
|
+
}): {
|
|
335
988
|
topics: {
|
|
336
989
|
name: string;
|
|
337
990
|
description: string;
|
|
@@ -340,99 +993,241 @@ declare function docs(topic?: string): {
|
|
|
340
993
|
name: string;
|
|
341
994
|
content: string;
|
|
342
995
|
};
|
|
996
|
+
/** Run the built-in read-only code-review flow. */
|
|
997
|
+
declare const review: {
|
|
998
|
+
run(options?: ReviewArgs): Promise<ReviewResult & {
|
|
999
|
+
runId: string;
|
|
1000
|
+
}>;
|
|
1001
|
+
};
|
|
1002
|
+
/** Sign in and manage saved sessions. Mirrors `coder auth`. */
|
|
1003
|
+
declare const auth: {
|
|
1004
|
+
login(options?: SignInOptions & {
|
|
1005
|
+
server?: string | true;
|
|
1006
|
+
yes?: boolean;
|
|
1007
|
+
save?: boolean;
|
|
1008
|
+
}): Promise<Session & {
|
|
1009
|
+
server: string;
|
|
1010
|
+
}>;
|
|
1011
|
+
logout: (options?: {
|
|
1012
|
+
server?: string | true;
|
|
1013
|
+
yes?: boolean;
|
|
1014
|
+
}) => Promise<{
|
|
1015
|
+
ok: true;
|
|
1016
|
+
server: string;
|
|
1017
|
+
}>;
|
|
1018
|
+
status: () => {
|
|
1019
|
+
[k: string]: {
|
|
1020
|
+
user: {
|
|
1021
|
+
name: string;
|
|
1022
|
+
email: string;
|
|
1023
|
+
};
|
|
1024
|
+
organization: {
|
|
1025
|
+
id: string;
|
|
1026
|
+
name: string;
|
|
1027
|
+
slug: string;
|
|
1028
|
+
} | undefined;
|
|
1029
|
+
at: number;
|
|
1030
|
+
};
|
|
1031
|
+
};
|
|
1032
|
+
};
|
|
1033
|
+
/** Run and host a Coder server. Mirrors `coder server`. */
|
|
1034
|
+
declare const server: {
|
|
1035
|
+
serve: typeof serve;
|
|
1036
|
+
migrate: typeof migrate;
|
|
1037
|
+
rotateKey: typeof rotateKey;
|
|
1038
|
+
/** The GitHub Actions workflow the `github-actions` runner dispatches. */
|
|
1039
|
+
workflow: () => string;
|
|
1040
|
+
app: {
|
|
1041
|
+
/** A link, valid 10 minutes, to the page that creates the built-in agent's public app on a platform. */
|
|
1042
|
+
create: typeof serverAppLink;
|
|
1043
|
+
};
|
|
1044
|
+
handler: typeof serverHandler;
|
|
1045
|
+
};
|
|
1046
|
+
/** Engine credentials on a Coder server. Mirrors `coder credentials`. */
|
|
1047
|
+
declare const credentials: {
|
|
1048
|
+
list: (options?: ServerOptions) => Promise<CredentialSummary[]>;
|
|
1049
|
+
add: typeof addCredential;
|
|
1050
|
+
remove: (label: string, options?: ServerOptions & {
|
|
1051
|
+
workspace?: boolean;
|
|
1052
|
+
}) => Promise<{
|
|
1053
|
+
ok: true;
|
|
1054
|
+
}>;
|
|
1055
|
+
default: (label: string, options?: ServerOptions & {
|
|
1056
|
+
workspace?: boolean;
|
|
1057
|
+
}) => Promise<{
|
|
1058
|
+
ok: true;
|
|
1059
|
+
}>;
|
|
1060
|
+
login: typeof loginCredential;
|
|
1061
|
+
};
|
|
1062
|
+
declare const folders: {
|
|
1063
|
+
list: (options?: ServerOptions) => Promise<LocalFolders>;
|
|
1064
|
+
check: (path: string, options?: ServerOptions) => Promise<{
|
|
1065
|
+
ok: true;
|
|
1066
|
+
folder: LocalFolder;
|
|
1067
|
+
} | {
|
|
1068
|
+
ok: false;
|
|
1069
|
+
detail: string;
|
|
1070
|
+
}>;
|
|
1071
|
+
};
|
|
1072
|
+
/** Your own runners for a Coder server. Mirrors `coder runner`. */
|
|
1073
|
+
declare const runner: {
|
|
1074
|
+
list: (options?: ServerOptions) => Promise<{
|
|
1075
|
+
items: RunnerRow[];
|
|
1076
|
+
catalog: RunnerSpec[];
|
|
1077
|
+
}>;
|
|
1078
|
+
add: (input: RunnerInput, options?: ServerOptions) => Promise<RunnerRow>;
|
|
1079
|
+
pair: (input: {
|
|
1080
|
+
name?: string;
|
|
1081
|
+
scope: RunnerInput["scope"];
|
|
1082
|
+
}, options?: ServerOptions) => Promise<RunnerPairing>;
|
|
1083
|
+
update: (id: string, input: RunnerUpdate, options?: ServerOptions) => Promise<RunnerRow>;
|
|
1084
|
+
default: (id: string, options?: ServerOptions) => Promise<RunnerRow>;
|
|
1085
|
+
test: (id: string, options?: ServerOptions) => Promise<RunnerTest>;
|
|
1086
|
+
rename: (id: string, name: string, options?: ServerOptions) => Promise<RunnerRow>;
|
|
1087
|
+
remove: (id: string, options?: ServerOptions) => Promise<{
|
|
1088
|
+
ok: true;
|
|
1089
|
+
}>;
|
|
1090
|
+
serve: typeof serveRunner;
|
|
1091
|
+
};
|
|
1092
|
+
/** Manage and run agents. Each function mirrors one `coder agent` command. */
|
|
1093
|
+
declare const agent: {
|
|
1094
|
+
list: (opts?: AgentOptions) => Promise<Agent[] | ServerAgent[]>;
|
|
1095
|
+
show(id: string | undefined, opts?: AgentOptions): Promise<Agent | {
|
|
1096
|
+
definition: AgentDefinition;
|
|
1097
|
+
id: string;
|
|
1098
|
+
name: string;
|
|
1099
|
+
description?: string;
|
|
1100
|
+
source: "repo" | "home" | "upload" | "builtin";
|
|
1101
|
+
repo?: string;
|
|
1102
|
+
path?: string;
|
|
1103
|
+
currentVersion: number;
|
|
1104
|
+
settings?: AgentUsage;
|
|
1105
|
+
local?: true;
|
|
1106
|
+
commit?: string;
|
|
1107
|
+
createdAt: number;
|
|
1108
|
+
updatedAt: number;
|
|
1109
|
+
versions: Array<Omit<AgentVersionRecord, "systemPrompt" | "files">>;
|
|
1110
|
+
}>;
|
|
1111
|
+
init: (id: string | undefined, opts?: AgentInitOptions) => Promise<{
|
|
1112
|
+
id: string;
|
|
1113
|
+
dir: string;
|
|
1114
|
+
files: string[];
|
|
1115
|
+
samples: string[];
|
|
1116
|
+
integrations: string[];
|
|
1117
|
+
}>;
|
|
1118
|
+
push: (id?: string, opts?: AgentOptions) => Promise<PushResult[]>;
|
|
1119
|
+
run(name: string | undefined, event: AgentEvent | string | undefined, opts?: AgentOptions & {
|
|
1120
|
+
flow?: string;
|
|
1121
|
+
wait?: boolean;
|
|
1122
|
+
onLog?: (line: TaskLogLine) => void;
|
|
1123
|
+
onDone?: (status: TaskStatus) => void;
|
|
1124
|
+
}): Promise<TaskStatus[] | {
|
|
1125
|
+
tasks: string[];
|
|
1126
|
+
} | ExecResult>;
|
|
1127
|
+
runTask(id: string, opts?: {
|
|
1128
|
+
cwd?: string;
|
|
1129
|
+
}): Promise<unknown>;
|
|
1130
|
+
usage(opts?: AgentOptions & {
|
|
1131
|
+
since?: number | string;
|
|
1132
|
+
by?: string;
|
|
1133
|
+
}): Promise<UsageTotals>;
|
|
1134
|
+
integrations: {
|
|
1135
|
+
list: () => {
|
|
1136
|
+
id: string;
|
|
1137
|
+
description: string;
|
|
1138
|
+
events: string[];
|
|
1139
|
+
tools: string[];
|
|
1140
|
+
}[];
|
|
1141
|
+
show(id: string | undefined): {
|
|
1142
|
+
id: string;
|
|
1143
|
+
events: {
|
|
1144
|
+
[k: string]: string;
|
|
1145
|
+
};
|
|
1146
|
+
tools: Record<Preset, string[]>;
|
|
1147
|
+
};
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
343
1150
|
declare const _default: {
|
|
344
1151
|
task: {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
taskId: string;
|
|
348
|
-
}>;
|
|
349
|
-
/**
|
|
350
|
-
* A task's result. With `wait`, blocks until the task is terminal (a pending
|
|
351
|
-
* approval throws a CoderError with code 'approval-pending'). `tail` fills
|
|
352
|
-
* `steps` with the last n log entries (default 0: []). Omit the id for the
|
|
353
|
-
* most recent task.
|
|
354
|
-
*/
|
|
355
|
-
result(id?: string, opts?: {
|
|
1152
|
+
run: (prompt: string, opts?: TaskRunOptions & TaskOptions) => Promise<RunResult | TaskStatus>;
|
|
1153
|
+
result: (id?: string, opts?: TaskOptions & {
|
|
356
1154
|
wait?: boolean;
|
|
357
1155
|
tail?: number | "all";
|
|
358
|
-
|
|
359
|
-
})
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
})
|
|
364
|
-
|
|
365
|
-
|
|
1156
|
+
onWaiting?: (taskId: string) => void;
|
|
1157
|
+
}) => Promise<TaskInspection | TaskStatus>;
|
|
1158
|
+
list: (opts?: TaskOptions & ListOptions) => Promise<(TaskRow[] & {
|
|
1159
|
+
clipped: number;
|
|
1160
|
+
archived: number;
|
|
1161
|
+
}) | TaskStatus[]>;
|
|
1162
|
+
watch: (id?: string, opts?: TaskOptions & {
|
|
1163
|
+
tail?: number | "all";
|
|
1164
|
+
}) => Promise<TaskWatch>;
|
|
1165
|
+
stream: (id?: string, opts?: TaskOptions & {
|
|
1166
|
+
tail?: number | "all";
|
|
1167
|
+
}) => AsyncGenerator<TaskLogEntry | TaskLogLine, void, any>;
|
|
1168
|
+
steer: (id: string, text: string, opts?: TaskOptions & {
|
|
366
1169
|
model?: string;
|
|
367
1170
|
effort?: string;
|
|
368
1171
|
permissions?: string;
|
|
369
|
-
|
|
370
|
-
})
|
|
1172
|
+
wait?: boolean;
|
|
1173
|
+
}) => Promise<Record<string, unknown> | {
|
|
1174
|
+
taskId: string;
|
|
1175
|
+
steered: SteerOutcome;
|
|
1176
|
+
} | {
|
|
1177
|
+
status: TaskStatus$1 | null;
|
|
1178
|
+
finalMessage: any;
|
|
371
1179
|
taskId: string;
|
|
372
1180
|
steered: SteerOutcome;
|
|
373
1181
|
}>;
|
|
374
|
-
|
|
375
|
-
ask(id: string, question: string, opts?: {
|
|
1182
|
+
ask: (id: string, question: string, opts?: TaskOptions & {
|
|
376
1183
|
model?: string;
|
|
377
1184
|
effort?: string;
|
|
378
|
-
|
|
379
|
-
})
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
stop(id
|
|
385
|
-
|
|
386
|
-
}
|
|
1185
|
+
onAsking?: (taskId: string) => void;
|
|
1186
|
+
}) => Promise<Record<string, unknown>>;
|
|
1187
|
+
approvals: (id?: string, opts?: TaskOptions) => Promise<ApprovalRow[] | Record<string, unknown>[]>;
|
|
1188
|
+
approve: (reference: string | undefined, approvalId?: string, opts?: TaskOptions & {
|
|
1189
|
+
deny?: boolean;
|
|
1190
|
+
}) => Promise<unknown>;
|
|
1191
|
+
stop: (id?: string, opts?: TaskOptions) => Promise<{
|
|
1192
|
+
ok: true;
|
|
1193
|
+
} | {
|
|
387
1194
|
taskId: string;
|
|
388
1195
|
status: "cancelled";
|
|
389
1196
|
interrupt: string;
|
|
390
1197
|
}>;
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
1198
|
+
archive: (id?: string, opts?: TaskOptions & {
|
|
1199
|
+
allStopped?: boolean;
|
|
1200
|
+
}) => Promise<{
|
|
1201
|
+
archived: string[];
|
|
1202
|
+
count: number;
|
|
1203
|
+
taskId?: undefined;
|
|
1204
|
+
} | {
|
|
395
1205
|
taskId: string;
|
|
396
1206
|
archived: true;
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
delete(id
|
|
400
|
-
|
|
401
|
-
})
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
approve(id: string, approvalId: string, opts?: {
|
|
407
|
-
deny?: boolean;
|
|
408
|
-
cwd?: string;
|
|
409
|
-
}): {
|
|
1207
|
+
count?: undefined;
|
|
1208
|
+
}>;
|
|
1209
|
+
delete: (id?: string, opts?: TaskOptions & {
|
|
1210
|
+
allArchived?: boolean;
|
|
1211
|
+
}) => Promise<{
|
|
1212
|
+
deleted: string[];
|
|
1213
|
+
count: number;
|
|
1214
|
+
taskId?: undefined;
|
|
1215
|
+
} | {
|
|
410
1216
|
taskId: string;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
}
|
|
414
|
-
/** Pending approvals for a task (omit the id for the most recent task). */
|
|
415
|
-
approvals(id?: string, opts?: {
|
|
416
|
-
cwd?: string;
|
|
417
|
-
}): Approval[];
|
|
418
|
-
/** Follow a task live: an async iterable of progress log entries. `tail` replays only the last n (default 1). */
|
|
419
|
-
stream(id?: string, opts?: {
|
|
420
|
-
tail?: number | "all";
|
|
421
|
-
cwd?: string;
|
|
422
|
-
}): AsyncGenerator<JobLogEntry>;
|
|
1217
|
+
deleted: true;
|
|
1218
|
+
count?: undefined;
|
|
1219
|
+
}>;
|
|
423
1220
|
};
|
|
424
1221
|
flow: {
|
|
425
1222
|
run(nameOrPath: string, opts?: RunOptions): Promise<RunSummary>;
|
|
426
1223
|
list(opts?: {
|
|
427
1224
|
archived?: boolean;
|
|
428
|
-
limit?: number;
|
|
1225
|
+
limit?: number | "all";
|
|
429
1226
|
}): FlowRecord[];
|
|
430
1227
|
discover(cwd?: string): DiscoveredFlow[];
|
|
431
1228
|
result(runId?: string, opts?: {
|
|
432
1229
|
tail?: number | "all";
|
|
433
|
-
}):
|
|
434
|
-
steps: FlowStep[];
|
|
435
|
-
}) | null;
|
|
1230
|
+
}): RunResult$1 | null;
|
|
436
1231
|
stream(runId?: string, opts?: {
|
|
437
1232
|
tail?: number | "all";
|
|
438
1233
|
}): AsyncGenerator<FlowEvent>;
|
|
@@ -440,14 +1235,8 @@ declare const _default: {
|
|
|
440
1235
|
keepTasks?: boolean;
|
|
441
1236
|
}): Promise<StopSummary>;
|
|
442
1237
|
resume(runId?: string, opts?: RunOptions): Promise<RunSummary>;
|
|
443
|
-
archive
|
|
444
|
-
|
|
445
|
-
archived: true;
|
|
446
|
-
};
|
|
447
|
-
delete(runId: string): {
|
|
448
|
-
runId: string;
|
|
449
|
-
deleted: boolean;
|
|
450
|
-
};
|
|
1238
|
+
archive: typeof archiveRuns;
|
|
1239
|
+
delete: typeof deleteRuns;
|
|
451
1240
|
};
|
|
452
1241
|
model: {
|
|
453
1242
|
/** Register a custom OpenAI-compatible endpoint model. */
|
|
@@ -508,7 +1297,7 @@ declare const _default: {
|
|
|
508
1297
|
name: string;
|
|
509
1298
|
}[];
|
|
510
1299
|
}>;
|
|
511
|
-
/** Alias a name to an engine spec, e.g. alias('fast', 'codex:
|
|
1300
|
+
/** Alias a name to an engine spec, e.g. alias('fast', 'codex:luna'). */
|
|
512
1301
|
alias: (name: string, spec: string, opts?: {
|
|
513
1302
|
workspace?: boolean;
|
|
514
1303
|
cwd?: string;
|
|
@@ -565,9 +1354,195 @@ declare const _default: {
|
|
|
565
1354
|
unset?: boolean;
|
|
566
1355
|
};
|
|
567
1356
|
};
|
|
1357
|
+
mcp: {
|
|
1358
|
+
/** Save a stdio (`command`) or remote (`url`) server; `env`, `header` and `tools` are comma lists. */
|
|
1359
|
+
add: (name: string, opts: McpAddOptions & {
|
|
1360
|
+
cwd?: string;
|
|
1361
|
+
}) => {
|
|
1362
|
+
name: string;
|
|
1363
|
+
file: string;
|
|
1364
|
+
};
|
|
1365
|
+
/** Save an entry from any `.mcp.json`, as an object or JSON text. */
|
|
1366
|
+
addJson: (name: string, entry: string | Record<string, unknown>, opts?: {
|
|
1367
|
+
user?: boolean;
|
|
1368
|
+
cwd?: string;
|
|
1369
|
+
}) => {
|
|
1370
|
+
name: string;
|
|
1371
|
+
file: string;
|
|
1372
|
+
};
|
|
1373
|
+
/** The configured servers by name. */
|
|
1374
|
+
list: (opts?: {
|
|
1375
|
+
cwd?: string;
|
|
1376
|
+
}) => Record<string, {
|
|
1377
|
+
command?: string | undefined;
|
|
1378
|
+
args?: string[] | undefined;
|
|
1379
|
+
env?: Record<string, string> | undefined;
|
|
1380
|
+
url?: string | undefined;
|
|
1381
|
+
type?: "stdio" | "http" | "sse" | undefined;
|
|
1382
|
+
headers?: Record<string, string> | undefined;
|
|
1383
|
+
tools?: string[] | undefined;
|
|
1384
|
+
description?: string | undefined;
|
|
1385
|
+
}>;
|
|
1386
|
+
/** Remove a server. */
|
|
1387
|
+
remove: (name: string, opts?: {
|
|
1388
|
+
user?: boolean;
|
|
1389
|
+
cwd?: string;
|
|
1390
|
+
}) => {
|
|
1391
|
+
name: string;
|
|
1392
|
+
file: string;
|
|
1393
|
+
};
|
|
1394
|
+
};
|
|
568
1395
|
setupHost: typeof setupHost;
|
|
569
1396
|
upgrade: typeof upgrade;
|
|
570
1397
|
docs: typeof docs;
|
|
1398
|
+
review: {
|
|
1399
|
+
run(options?: ReviewArgs): Promise<ReviewResult & {
|
|
1400
|
+
runId: string;
|
|
1401
|
+
}>;
|
|
1402
|
+
};
|
|
1403
|
+
auth: {
|
|
1404
|
+
login(options?: SignInOptions & {
|
|
1405
|
+
server?: string | true;
|
|
1406
|
+
yes?: boolean;
|
|
1407
|
+
save?: boolean;
|
|
1408
|
+
}): Promise<Session & {
|
|
1409
|
+
server: string;
|
|
1410
|
+
}>;
|
|
1411
|
+
logout: (options?: {
|
|
1412
|
+
server?: string | true;
|
|
1413
|
+
yes?: boolean;
|
|
1414
|
+
}) => Promise<{
|
|
1415
|
+
ok: true;
|
|
1416
|
+
server: string;
|
|
1417
|
+
}>;
|
|
1418
|
+
status: () => {
|
|
1419
|
+
[k: string]: {
|
|
1420
|
+
user: {
|
|
1421
|
+
name: string;
|
|
1422
|
+
email: string;
|
|
1423
|
+
};
|
|
1424
|
+
organization: {
|
|
1425
|
+
id: string;
|
|
1426
|
+
name: string;
|
|
1427
|
+
slug: string;
|
|
1428
|
+
} | undefined;
|
|
1429
|
+
at: number;
|
|
1430
|
+
};
|
|
1431
|
+
};
|
|
1432
|
+
};
|
|
1433
|
+
agent: {
|
|
1434
|
+
list: (opts?: AgentOptions) => Promise<Agent[] | ServerAgent[]>;
|
|
1435
|
+
show(id: string | undefined, opts?: AgentOptions): Promise<Agent | {
|
|
1436
|
+
definition: AgentDefinition;
|
|
1437
|
+
id: string;
|
|
1438
|
+
name: string;
|
|
1439
|
+
description?: string;
|
|
1440
|
+
source: "repo" | "home" | "upload" | "builtin";
|
|
1441
|
+
repo?: string;
|
|
1442
|
+
path?: string;
|
|
1443
|
+
currentVersion: number;
|
|
1444
|
+
settings?: AgentUsage;
|
|
1445
|
+
local?: true;
|
|
1446
|
+
commit?: string;
|
|
1447
|
+
createdAt: number;
|
|
1448
|
+
updatedAt: number;
|
|
1449
|
+
versions: Array<Omit<AgentVersionRecord, "systemPrompt" | "files">>;
|
|
1450
|
+
}>;
|
|
1451
|
+
init: (id: string | undefined, opts?: AgentInitOptions) => Promise<{
|
|
1452
|
+
id: string;
|
|
1453
|
+
dir: string;
|
|
1454
|
+
files: string[];
|
|
1455
|
+
samples: string[];
|
|
1456
|
+
integrations: string[];
|
|
1457
|
+
}>;
|
|
1458
|
+
push: (id?: string, opts?: AgentOptions) => Promise<PushResult[]>;
|
|
1459
|
+
run(name: string | undefined, event: AgentEvent | string | undefined, opts?: AgentOptions & {
|
|
1460
|
+
flow?: string;
|
|
1461
|
+
wait?: boolean;
|
|
1462
|
+
onLog?: (line: TaskLogLine) => void;
|
|
1463
|
+
onDone?: (status: TaskStatus) => void;
|
|
1464
|
+
}): Promise<TaskStatus[] | {
|
|
1465
|
+
tasks: string[];
|
|
1466
|
+
} | ExecResult>;
|
|
1467
|
+
runTask(id: string, opts?: {
|
|
1468
|
+
cwd?: string;
|
|
1469
|
+
}): Promise<unknown>;
|
|
1470
|
+
usage(opts?: AgentOptions & {
|
|
1471
|
+
since?: number | string;
|
|
1472
|
+
by?: string;
|
|
1473
|
+
}): Promise<UsageTotals>;
|
|
1474
|
+
integrations: {
|
|
1475
|
+
list: () => {
|
|
1476
|
+
id: string;
|
|
1477
|
+
description: string;
|
|
1478
|
+
events: string[];
|
|
1479
|
+
tools: string[];
|
|
1480
|
+
}[];
|
|
1481
|
+
show(id: string | undefined): {
|
|
1482
|
+
id: string;
|
|
1483
|
+
events: {
|
|
1484
|
+
[k: string]: string;
|
|
1485
|
+
};
|
|
1486
|
+
tools: Record<Preset, string[]>;
|
|
1487
|
+
};
|
|
1488
|
+
};
|
|
1489
|
+
};
|
|
1490
|
+
credentials: {
|
|
1491
|
+
list: (options?: ServerOptions) => Promise<CredentialSummary[]>;
|
|
1492
|
+
add: typeof addCredential;
|
|
1493
|
+
remove: (label: string, options?: ServerOptions & {
|
|
1494
|
+
workspace?: boolean;
|
|
1495
|
+
}) => Promise<{
|
|
1496
|
+
ok: true;
|
|
1497
|
+
}>;
|
|
1498
|
+
default: (label: string, options?: ServerOptions & {
|
|
1499
|
+
workspace?: boolean;
|
|
1500
|
+
}) => Promise<{
|
|
1501
|
+
ok: true;
|
|
1502
|
+
}>;
|
|
1503
|
+
login: typeof loginCredential;
|
|
1504
|
+
};
|
|
1505
|
+
folders: {
|
|
1506
|
+
list: (options?: ServerOptions) => Promise<LocalFolders>;
|
|
1507
|
+
check: (path: string, options?: ServerOptions) => Promise<{
|
|
1508
|
+
ok: true;
|
|
1509
|
+
folder: LocalFolder;
|
|
1510
|
+
} | {
|
|
1511
|
+
ok: false;
|
|
1512
|
+
detail: string;
|
|
1513
|
+
}>;
|
|
1514
|
+
};
|
|
1515
|
+
runner: {
|
|
1516
|
+
list: (options?: ServerOptions) => Promise<{
|
|
1517
|
+
items: RunnerRow[];
|
|
1518
|
+
catalog: RunnerSpec[];
|
|
1519
|
+
}>;
|
|
1520
|
+
add: (input: RunnerInput, options?: ServerOptions) => Promise<RunnerRow>;
|
|
1521
|
+
pair: (input: {
|
|
1522
|
+
name?: string;
|
|
1523
|
+
scope: RunnerInput["scope"];
|
|
1524
|
+
}, options?: ServerOptions) => Promise<RunnerPairing>;
|
|
1525
|
+
update: (id: string, input: RunnerUpdate, options?: ServerOptions) => Promise<RunnerRow>;
|
|
1526
|
+
default: (id: string, options?: ServerOptions) => Promise<RunnerRow>;
|
|
1527
|
+
test: (id: string, options?: ServerOptions) => Promise<RunnerTest>;
|
|
1528
|
+
rename: (id: string, name: string, options?: ServerOptions) => Promise<RunnerRow>;
|
|
1529
|
+
remove: (id: string, options?: ServerOptions) => Promise<{
|
|
1530
|
+
ok: true;
|
|
1531
|
+
}>;
|
|
1532
|
+
serve: typeof serveRunner;
|
|
1533
|
+
};
|
|
1534
|
+
server: {
|
|
1535
|
+
serve: typeof serve;
|
|
1536
|
+
migrate: typeof migrate;
|
|
1537
|
+
rotateKey: typeof rotateKey;
|
|
1538
|
+
/** The GitHub Actions workflow the `github-actions` runner dispatches. */
|
|
1539
|
+
workflow: () => string;
|
|
1540
|
+
app: {
|
|
1541
|
+
/** A link, valid 10 minutes, to the page that creates the built-in agent's public app on a platform. */
|
|
1542
|
+
create: typeof serverAppLink;
|
|
1543
|
+
};
|
|
1544
|
+
handler: typeof serverHandler;
|
|
1545
|
+
};
|
|
571
1546
|
};
|
|
572
1547
|
//#endregion
|
|
573
|
-
export { type Approval, CoderError, type FlowEvent, type FlowStep, type
|
|
1548
|
+
export { type Approval, CoderError, type FlowEvent, type FlowStep, type LocalFolder, type LocalFolders, type ReviewArgs, type ReviewResult, type RunnerInput, type RunnerKind, type RunnerPairing, type RunnerRow, type RunnerSpec, type RunnerTest, type RunnerUpdate, type ServerOptions, type Session, type SteerOutcome, type Task, type TaskLogEntry, type TaskResult, type TaskRunOptions, type TurnResult, agent, auth, config, credentials, _default as default, docs, flowSdk as flow, folders, mcp, model, review, runner, server, setupHost, task, upgrade };
|