@wular/coder 0.4.1 → 0.4.3
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/actions-FzDNxMFf.js +20 -0
- package/dist/{adapter-BKVzTDnn.js → adapter-7SEiVsmp.js} +1 -1
- package/dist/{adapter-B0oYCI0S.js → adapter-BLEfUqoQ.js} +1 -1
- package/dist/{adapter-DPInwbJG.js → adapter-H4GlcKQz.js} +1 -1
- package/dist/{add-CE-70LFs.js → add-B50dIJGd.js} +1 -1
- package/dist/{add-BxpLHnvD.js → add-D7X3gxap.js} +1 -1
- package/dist/{add-ej0X9e3a.js → add-DOEUHIe7.js} +1 -1
- package/dist/{add-U-pty9qJ.js → add-QExQhTzi.js} +1 -1
- package/dist/{add-json-CEa-6luW.js → add-json-Ck4KIZrT.js} +1 -1
- package/dist/{agent-JdtZozvP.js → agent-BPtnEf1q.js} +1 -1
- package/dist/{agent-BsYx3Odz.js → agent-BlQ_dNNm.js} +2 -2
- package/dist/{alias-DX-Bm86x.js → alias-BwQBovke.js} +1 -1
- package/dist/{app-BT5f7zL5.js → app-y6BYm2eH.js} +1 -1
- package/dist/{approvals-C-AvFt6s.js → approvals-Cc9cq5T1.js} +2 -2
- package/dist/{approve-DOmpQRNd.js → approve-oO9k2fnK.js} +2 -2
- package/dist/{apps-CjfrZyM5.js → apps-CU2YalX8.js} +1 -1
- package/dist/{archive-BziJ1rQ-.js → archive-C5c_HQS1.js} +2 -2
- package/dist/{archive-BUB8gFKD.js → archive-CemlWlVY.js} +2 -2
- package/dist/archive-sweep-ehg-fWIt.js +1 -0
- package/dist/{args-BOEEdpWk.js → args-DcBCtXhz.js} +1 -1
- package/dist/{ask-dE3U3ss2.js → ask-Chu7Twu_.js} +2 -2
- package/dist/auth-BOyXPOtu.js +1 -0
- package/dist/auth-XbqKSbcD.js +1 -0
- package/dist/{chat-bridge-BS9WtP3X.js → chat-bridge-DXgZItGP.js} +1 -1
- package/dist/{chat-B_yhNTo0.js → chat-cknlIhVh.js} +1 -1
- package/dist/{cli-BilSDkvE.js → cli-B1ObVrL4.js} +5 -5
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +1 -1
- package/dist/{client-D9IoAuDD.js → client-31YzOj-i.js} +1 -1
- package/dist/{config-Da_cwoxI.js → config-DAE_qHYA.js} +1 -1
- package/dist/{create-C_iMJV4Y.js → create-CM8B8JxD.js} +1 -1
- package/dist/credentials-BXD4Qptk.js +1 -0
- package/dist/dash/manifest.json +934 -1014
- package/dist/dash/public/assets/chunks/{agent-pills-c9c4ac4d4a10df83.js → agent-pills-b6a6da91c9559d9f.js} +1 -1
- package/dist/dash/public/assets/chunks/{agent-settings-form-8be2ddab074aba6d.js → agent-settings-form-b615c677046cd6f2.js} +1 -1
- package/dist/dash/public/assets/chunks/agents-grid-f2e7b4ff9e11b6e3.js +1 -0
- package/dist/dash/public/assets/chunks/{badge-676b01e0c615bf7b.js → badge-215c7b2631dafc69.js} +1 -1
- package/dist/dash/public/assets/chunks/{card-e0901d68b79dfa93.js → card-e86dcc81326d2b14.js} +1 -1
- package/dist/dash/public/assets/chunks/{combo-41234c24668b1db1.js → combo-09e246dc9a517fa8.js} +1 -1
- package/dist/dash/public/assets/chunks/composer-417166b029f48c47.js +1 -0
- package/dist/dash/public/assets/chunks/composer-645ae8fa97a35280.js +1 -0
- package/dist/dash/public/assets/chunks/{confirm-f2fe4ba9905a89c6.js → confirm-5ae484241ad888fd.js} +1 -1
- package/dist/dash/public/assets/chunks/{connect-apps-aa2a3d82e48ed8c3.js → connect-apps-4147c45f45fde2b1.js} +1 -1
- package/dist/dash/public/assets/chunks/{connect-repositories-5389ec8701a3deac.js → connect-repositories-77591110836bdf03.js} +1 -1
- package/dist/dash/public/assets/chunks/credentials-list-e005a0783ec93465.js +2 -0
- package/dist/dash/public/assets/chunks/{custom-range-4761ab14f05149df.js → custom-range-463e119af4681c61.js} +1 -1
- package/dist/dash/public/assets/chunks/{editor-bfe8cd854f8001be.js → editor-804b84f4fe6539cd.js} +4 -4
- package/dist/dash/public/assets/chunks/{engines-list-f1191390f5715b39.js → engines-list-ceab51f13c690e8c.js} +1 -1
- package/dist/dash/public/assets/chunks/{field-901f1f35c18c39c9.js → field-aa0a4b98a976781e.js} +1 -1
- package/dist/dash/public/assets/chunks/filter-91144ac2eec6297f.js +1 -0
- package/dist/dash/public/assets/chunks/format-105c706345987fb2.js +1 -0
- package/dist/dash/public/assets/chunks/heads-a42817b32d2d7f08.js +1 -0
- package/dist/dash/public/assets/chunks/{instructions-052fa45a9daf6db6.js → instructions-3a1dcaff2d868aa5.js} +1 -1
- package/dist/dash/public/assets/chunks/instructions-6c6f981fffaa31e4.js +1 -0
- package/dist/dash/public/assets/chunks/{list-1d259660d7612c5f.js → list-7270361464fc3c04.js} +1 -1
- package/dist/dash/public/assets/chunks/{mcp-list-e3bebbbe831393b8.js → mcp-list-2e715d48666b54ad.js} +1 -1
- package/dist/dash/public/assets/chunks/{models-list-44f857a469ca04d5.js → models-list-d3c40f94c761a6e5.js} +1 -1
- package/dist/dash/public/assets/chunks/paged-3ddb6077bef42752.js +1 -0
- package/dist/dash/public/assets/chunks/{platform-actions-d1426602049926d2.js → platform-actions-271ec3b99a64280b.js} +1 -1
- package/dist/dash/public/assets/chunks/runners-list-767e49c7d0ec833a.js +1 -0
- package/dist/dash/public/assets/chunks/{segmented-358ff2b4992b8384.js → segmented-de4386ccaac7304d.js} +1 -1
- package/dist/dash/public/assets/chunks/{select-7ae25fd8a7d6c338.js → select-a90307706cffa6e0.js} +1 -1
- package/dist/dash/public/assets/chunks/{sentinel-c972a33dc69a5135.js → sentinel-b5e032b38604dfd3.js} +1 -1
- package/dist/dash/public/assets/chunks/shared-init-7f81ae7bc8c82438.js +2 -0
- package/dist/dash/public/assets/chunks/shared-init-933c7f9ee85be766.js +5 -0
- package/dist/dash/public/assets/chunks/{tail-7c27aab8ba268bd9.js → tail-4891e727ee526792.js} +1 -1
- package/dist/dash/public/assets/chunks/task-actions-ce854925a2dc78fd.js +1 -0
- package/dist/dash/public/assets/chunks/task-ddfddeaf07fb684c.js +1 -0
- package/dist/dash/public/assets/chunks/task-view-c37dcee08f21a279.js +5 -0
- package/dist/dash/public/assets/chunks/tasks-list-baef587999f322d8.js +1 -0
- package/dist/dash/public/assets/chunks/{toolbar-a75d2570f07cbb70.js → toolbar-8d98313606ad8a2d.js} +1 -1
- package/dist/dash/public/assets/chunks/{versions-list-fc2e0d2a7382e049.js → versions-list-532690efd9f1b0ea.js} +1 -1
- package/dist/dash/public/assets/dash-49ca85b59ac65c20.css +1 -0
- package/dist/dash/public/assets/dash-account-edc56e85dbaaabe0.css +1 -0
- package/dist/dash/public/assets/dash-agents-edba57b67e4005d0.css +1 -0
- package/dist/dash/public/assets/dash-agents-new-fe22253fbada2fbf.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-adf52e9dacb2d825.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-edit-a2937a347689ef29.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-platforms-265ba13db32a460d.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-settings-8afc52eb0372bc4b.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-tasks-6193e646be68dbd2.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-usage-ceadb3a1c911c402.css +1 -0
- package/dist/dash/public/assets/dash-settings-cf1997cd7f72e518.css +1 -0
- package/dist/dash/public/assets/dash-settings-param-tab-b44dac8e79a560e6.css +1 -0
- package/dist/dash/public/assets/dash-tasks-916c7100a8058aa3.css +1 -0
- package/dist/dash/public/assets/dash-tasks-param-id-194a6ffc20e872f2.css +1 -0
- package/dist/dash/public/assets/dash-usage-40940b289f85e0b6.css +1 -0
- package/dist/dash/public/assets/pnext-client-13aee92bef5c9e3f.js +1 -0
- package/dist/dash/public/assets/pnext-client-1f2686b2044f0df6.js +1 -0
- package/dist/dash/public/assets/pnext-client-26130234ebad7067.js +1 -0
- package/dist/dash/public/assets/pnext-client-311e35b0076bf406.js +1 -0
- package/dist/dash/public/assets/pnext-client-4ade1bf75c9c3d87.js +1 -0
- package/dist/dash/public/assets/pnext-client-61cd31b687ede1da.js +1 -0
- package/dist/dash/public/assets/pnext-client-61db65dc4223217a.js +1 -0
- package/dist/dash/public/assets/pnext-client-6ea656e7705e3f2a.js +1 -0
- package/dist/dash/public/assets/pnext-client-7fd0f793f0322cb9.js +1 -0
- package/dist/dash/public/assets/pnext-client-88159c0840fcfa4a.js +1 -0
- package/dist/dash/public/assets/pnext-client-b03f0c47c066b4f3.js +1 -0
- package/dist/dash/public/assets/{pnext-client-1b9ab0963a8ff77b.js → pnext-client-d6478835f543f901.js} +1 -1
- package/dist/dash/public/assets/pnext-client-dadb8359021ed590.js +1 -0
- package/dist/dash/public/assets/pnext-client-de07532d6aaebf2c.js +1 -0
- package/dist/dash/public/assets/pnext-client-f87a31890c8ff224.js +1 -0
- package/dist/dash/public/assets/pnext-client-ffe1c123a8e2a350.js +1 -0
- package/dist/dash/server/bundle-0.1.6-b29ec45cb963d47f/entry.js +2 -0
- package/dist/{default-vYPT26DR.js → default-BMvUMTFp.js} +1 -1
- package/dist/default-B_nKaX0-.js +1 -0
- package/dist/{delete-D8gEwoOj.js → delete-Bjteibld.js} +2 -2
- package/dist/{delete-z1_86nf6.js → delete-riCIKZwj.js} +2 -2
- package/dist/{disable-DVKd-0Xb.js → disable-DQC56YFy.js} +1 -1
- package/dist/{discover-Dvr_3_Xr.js → discover-Qanr5TEO.js} +1 -1
- package/dist/{discover-Df-a8K4R.js → discover-lgTYwoQp.js} +2 -2
- package/dist/dispatch-BsW_1m7e.js +14 -0
- package/dist/{docs-DKJnqZqt.js → docs-DFs7lOJp.js} +1 -1
- package/dist/{docs-BX65z2Iu.js → docs-DKROso-4.js} +2 -2
- package/dist/{enable-C8Zf_wpN.js → enable-D2DqZvcU.js} +1 -1
- package/dist/{env-CRf6wkM2.js → env-YRY3I60r.js} +1 -1
- package/dist/exec-DuUkLMqg.js +11 -0
- package/dist/executor-vMppVLB6.js +10 -0
- package/dist/flow/builtin/review.js +1 -1
- package/dist/flow/index.d.ts +1 -1
- package/dist/flow/index.js +1 -1
- package/dist/{flow-17k25MHt.js → flow-DmERAnR8.js} +1 -1
- package/dist/{github-actions-DwUzm4hC.js → github-actions-C_NkHVJq.js} +1 -1
- package/dist/http-D01Udu4u.js +1 -0
- package/dist/{index-CZjFX5zV.d.ts → index-B1L4zXZH.d.ts} +2 -1
- package/dist/{init-CoMfFxbG.js → init-Bd6JHzBc.js} +1 -1
- package/dist/integrations-B2CavXR1.js +5 -0
- package/dist/integrations-D1Dwy1kt.js +1 -0
- package/dist/lib/broker.js +2 -2
- package/dist/{list-DX-z3SBp.js → list-4Uo-0v9s.js} +1 -1
- package/dist/{list-BAKvxSbh.js → list-B0ujEZhd.js} +3 -3
- package/dist/{list-BYiG8Zav.js → list-B5oa1Bhy.js} +2 -2
- package/dist/{list-BxEywhHU.js → list-BjE_l6la.js} +1 -1
- package/dist/{list-VToARh3C.js → list-Ck9ibCs1.js} +1 -1
- package/dist/{list-CIW2joV1.js → list-DhgK4Zc4.js} +1 -1
- package/dist/{list-DpCf4G-H.js → list-KvL7AUhD.js} +2 -2
- package/dist/{list-C5w01-8q.js → list-byYLBl1U.js} +1 -1
- package/dist/{load-BpEsAn51.js → load-SnZd7xG1.js} +1 -1
- package/dist/{local-H3uvqEbq.js → local-BRy1EUq2.js} +1 -1
- package/dist/log-view-DeJstSkw.js +3 -0
- package/dist/{login-DkkslfBx.js → login-C-ahtDKV.js} +1 -1
- package/dist/{login-BFxX4jJy.js → login-zpwke8g1.js} +1 -1
- package/dist/{logout-BHAtw4Z8.js → logout-CI6Kf-T6.js} +1 -1
- package/dist/{maintenance-C5FklUw3.js → maintenance-BAzr9Jlr.js} +1 -1
- package/dist/{match-CXAjDhg7.js → match-DxV1d49D.js} +1 -1
- package/dist/{mcp-BgKb2Cdk.js → mcp-CmcL1MCG.js} +1 -1
- package/dist/{mcp-CCZOAo06.js → mcp-mhXwtGQT.js} +1 -1
- package/dist/{migrate-N-85_N7J.js → migrate-Czh3TEK5.js} +1 -1
- package/dist/{migrate-C4vM7DQN.js → migrate-w7KfzUAR.js} +1 -1
- package/dist/{model-Bs1StDo3.js → model-JRoTH9QK.js} +1 -1
- package/dist/models-C-S7HqSb.js +1 -0
- package/dist/{prompt-CEuBMNhk.js → prompt-CMXmt2l9.js} +4 -4
- package/dist/{push-CUC55Bqd.js → push-B8BhTyZs.js} +1 -1
- package/dist/queue-CirjEskI.js +117 -0
- package/dist/refresh-Bmy2r1Ee.js +1 -0
- package/dist/{remote-miQNTVRa.js → remote-CxFnEjZl.js} +1 -1
- package/dist/{remove-B93LNkZI.js → remove-C15WLaXT.js} +1 -1
- package/dist/{remove-C5_xggx7.js → remove-CTZYjjSr.js} +1 -1
- package/dist/{remove-eQ8y5C5p.js → remove-CTl-H0f0.js} +1 -1
- package/dist/{remove-CuH8a3L9.js → remove-DX2FVo5b.js} +1 -1
- package/dist/rename-D1g4TnHQ.js +1 -0
- package/dist/{result-BEtQZHaY.js → result-D49VN8PM.js} +3 -3
- package/dist/result-DGWyUHYU.js +18 -0
- package/dist/{resume-DYzKvyEw.js → resume-ywzc7z6A.js} +2 -2
- package/dist/{review-oIBeECZE.js → review-ZC0xG8XY.js} +2 -2
- package/dist/{rotate-key-IdMYH7gg.js → rotate-key-Bf8_99ck.js} +1 -1
- package/dist/{run-CTtd0Znc.js → run-D7SJ-ieT.js} +2 -2
- package/dist/run-DoRQSC_K.js +2 -0
- package/dist/{run-CawRGnOg.js → run-ukCf2Mdy.js} +1 -1
- package/dist/runner-D-REfOUe.js +1 -0
- package/dist/{runner-sUpWJ_k0.js → runner-wDYhkVsM.js} +1 -1
- package/dist/schema-DoNO0dPh.js +1 -0
- package/dist/sdk.d.ts +4 -2
- package/dist/sdk.js +1 -1
- package/dist/serve-BJ_Mbm2m.js +8 -0
- package/dist/{serve-CPnmrKyf.js → serve-C1MMhM1F.js} +2 -2
- package/dist/{serve-GmRO89s5.js → serve-DtrOHaoS.js} +2 -2
- package/dist/{serve-CE8YV2e9.js → serve-P9pFkEnE.js} +1 -1
- package/dist/{serve-BTeomYxW.js → serve-yjSw0B1a.js} +1 -1
- package/dist/{server-Kb22cWfF.js → server-DDWTnmbx.js} +1 -1
- package/dist/{setup-host-GFTUzzZJ.js → setup-host-L6Rnn5Cz.js} +1 -1
- package/dist/{shared-DVtzWhUT.js → shared-XsUX_ZZb.js} +1 -1
- package/dist/{show-COTZEYgc.js → show-CU-jqJ90.js} +1 -1
- package/dist/{show-CMUg8SJu.js → show-DVJmB2u-.js} +1 -1
- package/dist/{status-D26U--p8.js → status-CBydR7LE.js} +1 -1
- package/dist/{steer-C6uARLp5.js → steer-Cm_sHZqs.js} +2 -2
- package/dist/{stop-BrGI3hSS.js → stop-DJS7DAPJ.js} +1 -1
- package/dist/{stop-ByCAlbmN.js → stop-TrebIIuv.js} +2 -2
- package/dist/store-BrNMqJgk.js +42 -0
- package/dist/store-j8icrG0v.js +19 -0
- package/dist/task-C8lmcNsf.js +1 -0
- package/dist/{task-DeglY79z.js → task-CpUI19o2.js} +4 -4
- package/dist/task-CvSqiwxo.js +1 -0
- package/dist/{test-NEbhlxvo.js → test-CDKz4jY_.js} +1 -1
- package/dist/{tools-D0Zfs8Hx.js → tools-DBFeoosk.js} +1 -1
- package/dist/{types-I5Cwtl_K.d.ts → types-DMGBYB_K.d.ts} +3 -1
- package/dist/{unalias-C9NqmSDq.js → unalias-BfQFBnuK.js} +1 -1
- package/dist/{update-BTxYQj7Z.js → update-C4FFOie8.js} +1 -1
- package/dist/{upgrade-hA0yWBvx.js → upgrade-DLJqMnUQ.js} +2 -2
- package/dist/{usage-BhqoCjvE.js → usage-CSh-xwQ2.js} +1 -1
- package/dist/{usage-C4d9X2Uq.js → usage-D8mc4qXK.js} +1 -1
- package/dist/{watch-DtRuC0Wc.js → watch-CQu-tJKZ.js} +2 -2
- package/dist/{watch-CSdj24ct.js → watch-DmwaEvoi.js} +2 -2
- package/dist/{wire-BeT1Axeo.js → wire-DzGLZ3-O.js} +1 -1
- package/dist/worker-BLKTMLqa.js +1 -0
- package/dist/worker-nHemduM_.js +9 -0
- package/dist/{workflow-Dcmdooi8.js → workflow-IrouAus_.js} +1 -1
- package/docs/cli.md +145 -0
- package/docs/mcp.md +1 -1
- package/migrations/0000_initial.sql +8 -0
- package/migrations/meta/0000_snapshot.json +75 -1
- package/migrations/meta/_journal.json +1 -1
- package/package.json +3 -2
- package/plugins/agents/skills/coder/SKILL.md +1 -0
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/skills/dispatch/SKILL.md +1 -1
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/skills/coder/SKILL.md +1 -0
- package/src/client/index.ts +10 -2
- package/src/client/types.ts +18 -0
- package/src/core/defaults.ts +36 -0
- package/src/core/task/log-view.ts +120 -6
- package/src/server/dash/app/dash/agents/(list)/agent-menu.tsx +4 -0
- package/src/server/dash/app/dash/agents/(list)/agents-grid.tsx +18 -35
- package/src/server/dash/app/dash/agents/(list)/loading.tsx +7 -1
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/layout.tsx +2 -1
- package/src/server/dash/app/dash/layout.css +58 -1
- package/src/server/dash/app/dash/layout.tsx +29 -7
- package/src/server/dash/app/dash/settings/[tab]/credentials-list.tsx +20 -13
- package/src/server/dash/app/dash/settings/[tab]/page.tsx +1 -1
- package/src/server/dash/app/dash/settings/[tab]/runners-list.tsx +13 -12
- package/src/server/dash/app/dash/tasks/[id]/activity.tsx +49 -4
- package/src/server/dash/app/dash/tasks/[id]/task-actions.tsx +43 -6
- package/src/server/dash/app/dash/tasks/[id]/task-view.css +52 -31
- package/src/server/dash/app/dash/tasks/[id]/task-view.tsx +143 -51
- package/src/server/dash/app/dash/tasks/composer.css +4 -0
- package/src/server/dash/app/dash/tasks/composer.tsx +6 -5
- package/src/server/dash/app/dash/tasks/list/task.ts +29 -1
- package/src/server/dash/app/dash/tasks/list/tasks-list.css +20 -7
- package/src/server/dash/app/dash/tasks/list/tasks-list.tsx +256 -109
- package/src/server/dash/app/dash/tasks/list/tasks-section.tsx +9 -13
- package/src/server/dash/app/dash/tasks/page.tsx +3 -35
- package/src/server/dash/comps/frame/loading-card.tsx +4 -3
- package/src/server/dash/comps/frame/page-head.css +10 -0
- package/src/server/dash/comps/frame/page-head.tsx +3 -2
- package/src/server/dash/comps/frame/task-toasts.tsx +196 -50
- package/src/server/dash/comps/nav/side-toggle.tsx +16 -5
- package/src/server/dash/comps/ui/card.css +1 -0
- package/src/server/dash/comps/ui/filter.css +64 -0
- package/src/server/dash/comps/ui/filter.tsx +336 -0
- package/src/server/dash/comps/ui/icons.ts +2 -0
- package/src/server/dash/comps/ui/menu.tsx +9 -1
- package/src/server/dash/comps/ui/select.tsx +2 -2
- package/src/server/dash/comps/ui/toast.css +3 -2
- package/src/server/dash/comps/ui/toolbar.css +14 -0
- package/src/server/dash/utils/client.ts +21 -0
- package/src/server/dash/utils/format.ts +12 -4
- package/src/server/dash/utils/paged.ts +14 -6
- package/dist/actions-Mk3FSlpJ.js +0 -20
- package/dist/archive-sweep-CtBcARgN.js +0 -1
- package/dist/auth-BFny--17.js +0 -1
- package/dist/auth-DWHIzqbA.js +0 -1
- package/dist/credentials-B1jv6dkg.js +0 -1
- package/dist/dash/public/assets/chunks/agents-grid-951584b6f4c4314e.js +0 -1
- package/dist/dash/public/assets/chunks/composer-5534be50bc12385e.js +0 -1
- package/dist/dash/public/assets/chunks/composer-d10d4b1d54c4f751.js +0 -1
- package/dist/dash/public/assets/chunks/credentials-list-bc5bfcab058176c5.js +0 -2
- package/dist/dash/public/assets/chunks/format-eb03fc9d9744d960.js +0 -1
- package/dist/dash/public/assets/chunks/heads-f3bcd289663d48fa.js +0 -1
- package/dist/dash/public/assets/chunks/instructions-d0a4b0d95009c262.js +0 -1
- package/dist/dash/public/assets/chunks/paged-bc6fa0c2b9d52ed7.js +0 -1
- package/dist/dash/public/assets/chunks/runners-list-1901af8a5dea1f09.js +0 -1
- package/dist/dash/public/assets/chunks/shared-init-88cce66bb3cfe1e5.js +0 -5
- package/dist/dash/public/assets/chunks/shared-init-ffb3397e494137c9.js +0 -2
- package/dist/dash/public/assets/chunks/task-actions-8e1d93c788d001df.js +0 -1
- package/dist/dash/public/assets/chunks/task-fa8b82e95e771c4a.js +0 -1
- package/dist/dash/public/assets/chunks/task-view-6d7618d2820a5cb4.js +0 -3
- package/dist/dash/public/assets/chunks/tasks-list-f4784e5cbd0ed785.js +0 -1
- 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-03b03b254e525e82.js +0 -1
- package/dist/dash/public/assets/pnext-client-1c7859bb888f4ef0.js +0 -1
- package/dist/dash/public/assets/pnext-client-3c748afe963fb05d.js +0 -1
- package/dist/dash/public/assets/pnext-client-4f47c2cae220f107.js +0 -1
- package/dist/dash/public/assets/pnext-client-6ab9fd9b53b794d2.js +0 -1
- package/dist/dash/public/assets/pnext-client-6c241786342498e4.js +0 -1
- package/dist/dash/public/assets/pnext-client-80b56d420f02b808.js +0 -1
- package/dist/dash/public/assets/pnext-client-83135c17bae850a3.js +0 -1
- package/dist/dash/public/assets/pnext-client-8e6fa4302ae0396f.js +0 -1
- package/dist/dash/public/assets/pnext-client-932c9d8cc0717fc8.js +0 -1
- package/dist/dash/public/assets/pnext-client-a42ae63d4de113f9.js +0 -1
- package/dist/dash/public/assets/pnext-client-d2ee6f8c1e337032.js +0 -1
- package/dist/dash/public/assets/pnext-client-d513f65ec23b7f20.js +0 -1
- package/dist/dash/public/assets/pnext-client-ecb88e2a8a109954.js +0 -1
- package/dist/dash/public/assets/pnext-client-f1545ee6270bbf9a.js +0 -1
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/boot-B2MFTRO2.js +0 -30
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/build-tier-XJJSL5FR.js +0 -2704
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2HFY3DQT.js +0 -208
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2ICEVELW.js +0 -834
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-3UPROT2C.js +0 -35
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4P5CMIYT.js +0 -1582
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4TKZKZ3Q.js +0 -131
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-5RDEILQB.js +0 -437
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-62KEQM43.js +0 -25
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-6KQSWT6D.js +0 -831
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-7DCNCW6O.js +0 -724
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-B4THCTQP.js +0 -22
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-C2LIV2MM.js +0 -172
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-CCATPVTW.js +0 -378
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-COXJAPTU.js +0 -89
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-E6IXL2NJ.js +0 -6270
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FLGRBFAH.js +0 -1198
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FTJVHFWD.js +0 -61
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-H523KSIH.js +0 -5151
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-HT6KKX6A.js +0 -20
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JESFYECC.js +0 -438
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JRPJM2XY.js +0 -17
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L2IWDUXG.js +0 -107
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L5P4Y4UC.js +0 -183
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-NQE46AZN.js +0 -647
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PA4QEARJ.js +0 -129
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PZ5AXOLW.js +0 -7146
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-SNVPTULL.js +0 -2397
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-T3QZT3PG.js +0 -220
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-VC5O2SDP.js +0 -72
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-WZX4V6CM.js +0 -231
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-XUUIDXY5.js +0 -627
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-ZHFDO3PR.js +0 -265
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/compile-CE2DN7ZA.js +0 -18
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-UREY7XJT.js +0 -16
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-loader-UI2XE3PZ.js +0 -17
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/entry.js +0 -219
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/generate-I2PPTDFD.js +0 -16
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/modules-UVOCE4C2.js +0 -48
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/pipeline-UW47K537.js +0 -963
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/proxy-ITGOVJBW.js +0 -26
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/register-4SA55SWT.js +0 -12579
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/router-JNKHLBCZ.js +0 -505
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/routes-PD6J2NXW.js +0 -54
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/tsconfig-defaults-ZXEH7RQK.js +0 -15
- package/dist/default-Bobztoxf.js +0 -1
- package/dist/dispatch-BKeAch9E.js +0 -14
- package/dist/exec-RZFLclKX.js +0 -11
- package/dist/executor-BvAA7Cgw.js +0 -10
- package/dist/http-Bkg_OQ6r.js +0 -1
- package/dist/integrations-5xCaXSd-.js +0 -1
- package/dist/integrations-BAgdVDhj.js +0 -5
- package/dist/log-view-dg0TlKLA.js +0 -1
- package/dist/models-_5LVGC3m.js +0 -1
- package/dist/queue-6io_NOP3.js +0 -116
- package/dist/refresh-BIrmrWYq.js +0 -1
- package/dist/rename-CYfy03FE.js +0 -1
- package/dist/result-BzaM3inj.js +0 -15
- package/dist/run-BDYl0CKl.js +0 -2
- package/dist/runner-D7ScbIHJ.js +0 -1
- package/dist/schema-CU2iFkp8.js +0 -1
- package/dist/serve-CQKZxzFE.js +0 -4
- package/dist/store-B94tSate.js +0 -42
- package/dist/store-DzqXS2wT.js +0 -8
- package/dist/task-C6VAg5WU.js +0 -1
- package/dist/task-CgOKgkEG.js +0 -1
- package/dist/worker-CXndxmGF.js +0 -9
- package/dist/worker-DX7P9kWl.js +0 -1
- package/src/server/dash/app/dash/token-from-hash.tsx +0 -17
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e}from"./cli-
|
|
1
|
+
import{i as e}from"./cli-B1ObVrL4.js";import{s as t}from"./models-C-S7HqSb.js";import{a as n,i as r,n as i,r as a}from"./add-QExQhTzi.js";const o=e({name:`model update`,help:{usage:`coder model update <name> [--base-url <url>] [--model <id>] [--env-key VAR]`,summary:`Update a configured custom model. Only the flags you pass change; the endpoint
|
|
2
2
|
is re-probed and the wire protocol re-detected.`,flags:[[`--base-url <url>`,`new API base`],[`--model <id>`,`new provider model id`],[`--env-key <VAR>`,`new API-key env var`],[`--workspace`,`write to <repo>/.coder/config.json instead of the user file`]]},options:i,args:1,run:({options:e,args:[r],cwd:i})=>t(i,r,n(e)),json:a,print:e=>r(e,`updated`)});export{o as commandModelUpdate};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as e}from"./dispatch-
|
|
2
|
-
the host plugins to match. Alias: update.`,flags:[[`--cli-only`,`update just the CLI`],[`--plugins-only`,`refresh just the host plugins`],[`--codex`,`limit the refresh to the Agent Skills copy (Codex, Pi, ...)`],[`--claude`,`limit the refresh to the Claude Code plugin`],[`--pm <npm|pnpm|yarn|bun>`,`force a package manager instead of auto-detecting`]]},options:{pm:o,"cli-only":a,"plugins-only":a,codex:a,claude:a},run:({options:t})=>e({...t,cliOnly:t[`cli-only`],pluginsOnly:t[`plugins-only`]},l),print:u});function l(e){s.stdout.write(`${r.bold(`Updating coder CLI`)} ${r.dim(`${e}...`)}\n`)}function u(e){let t=r.bold,a=r.dim,o=(e,n)=>n&&e&&n!==e?`${e} ${a(`->`)} ${t(n)}`:`${n??e??`?`} ${a(`(unchanged)`)}`,c=(e,t)=>`${t.installed?n(`${e} ${o(t.from,t.to)} ${a(`- ${t.note}`)}`):i(`${e} ${t.note}`)}\n`;e.cli&&s.stdout.write(e.cli.changed?`${n(`coder CLI ${o(e.cli.from,e.cli.to)}`)}\n`:`${n(`coder CLI ${e.cli.from} ${a(`(already latest)`)}`)}\n`),e.claudePlugin&&s.stdout.write(c(`claude plugin`,e.claudePlugin)),e.agentsSkill&&s.stdout.write(c(`agents skill `,e.agentsSkill))}const d=async()=>(await import(`./refresh-
|
|
1
|
+
import{T as e}from"./dispatch-BsW_1m7e.js";import{i as t}from"./cli-B1ObVrL4.js";import{f as n,p as r,t as i}from"./output-BKeyLbvt.js";import{n as a,s as o}from"./args-DcBCtXhz.js";import s from"node:process";const c=t({name:`upgrade`,globalFlags:{json:!1,cwd:!1},help:{usage:`coder upgrade [--cli-only] [--plugins-only] [--codex] [--claude] [--pm <mgr>]`,summary:`Update the coder CLI through whichever package manager installed it, then refresh
|
|
2
|
+
the host plugins to match. Alias: update.`,flags:[[`--cli-only`,`update just the CLI`],[`--plugins-only`,`refresh just the host plugins`],[`--codex`,`limit the refresh to the Agent Skills copy (Codex, Pi, ...)`],[`--claude`,`limit the refresh to the Claude Code plugin`],[`--pm <npm|pnpm|yarn|bun>`,`force a package manager instead of auto-detecting`]]},options:{pm:o,"cli-only":a,"plugins-only":a,codex:a,claude:a},run:({options:t})=>e({...t,cliOnly:t[`cli-only`],pluginsOnly:t[`plugins-only`]},l),print:u});function l(e){s.stdout.write(`${r.bold(`Updating coder CLI`)} ${r.dim(`${e}...`)}\n`)}function u(e){let t=r.bold,a=r.dim,o=(e,n)=>n&&e&&n!==e?`${e} ${a(`->`)} ${t(n)}`:`${n??e??`?`} ${a(`(unchanged)`)}`,c=(e,t)=>`${t.installed?n(`${e} ${o(t.from,t.to)} ${a(`- ${t.note}`)}`):i(`${e} ${t.note}`)}\n`;e.cli&&s.stdout.write(e.cli.changed?`${n(`coder CLI ${o(e.cli.from,e.cli.to)}`)}\n`:`${n(`coder CLI ${e.cli.from} ${a(`(already latest)`)}`)}\n`),e.claudePlugin&&s.stdout.write(c(`claude plugin`,e.claudePlugin)),e.agentsSkill&&s.stdout.write(c(`agents skill `,e.agentsSkill))}const d=async()=>(await import(`./refresh-Bmy2r1Ee.js`)).commandRefreshUpdate,f=Object.assign(async e=>e[0]===`refresh`?(await d())(e.slice(1)):c(e),c,{subcommands:{refresh:d}});export{f as commandUpgrade};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DT7IzrpZ.js";import{a as t,i as n}from"./load-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DT7IzrpZ.js";import{a as t,i as n}from"./load-SnZd7xG1.js";import{a as r,d as i,f as a,n as o,u as s}from"./http-D01Udu4u.js";import{y as c}from"./store-j8icrG0v.js";var l=e({addUsage:()=>f,leaders:()=>m,readUsage:()=>x,readUsageTotals:()=>S,timeZone:()=>d,usageReport:()=>b,usageSummary:()=>_,usageTotals:()=>p});function u(e){return typeof e==`number`?e:!e||typeof e!=`object`||Array.isArray(e)?0:`total`in e&&typeof e.total==`number`?e.total:Object.values(e).reduce((e,t)=>e+u(t),0)}function d(e){if(!e)return`UTC`;try{return new Intl.DateTimeFormat(`en`,{timeZone:e}),e}catch{return`UTC`}}const f=(e,t)=>{e.tasks+=t.tasks,e.runnerMs+=t.runnerMs,e.tokenCount+=t.tokenCount};async function p(e,t){if(e.usageTotals)return e.usageTotals(t);if(t.top){let{top:n,...r}=t,i=(await p(e,{...r,by:`agent`,parts:void 0})).sort((e,t)=>t[n.by]-e[n.by]||e.key.localeCompare(t.key)).slice(0,n.count).map(e=>e.key);return p(e,{...r,parts:i})}let n=d(t.tz),r=new Intl.DateTimeFormat(`en-CA`,{timeZone:n,year:`numeric`,month:`2-digit`,day:`2-digit`}),i=new Set(t.parts),a=new Map;for(let{value:n}of await e.list(`usage`)){if(n.at<t.since||t.until!==void 0&&n.at>=t.until||t.agent&&n.agent!==t.agent)continue;let e=t.by===`agent`?n.agent:t.by===`installation`?n.installationId??`none`:t.by===`engine`?n.engine??`unknown`:r.format(n.at),o={tasks:1,runnerMs:n.runnerElapsedMs,tokenCount:u(n.tokens)},s=a.get(e)??{key:e,tasks:0,runnerMs:0,tokenCount:0};f(s,o),i.has(n.agent)&&(s.parts??={},f(s.parts[n.agent]??={tasks:0,runnerMs:0,tokenCount:0},o)),a.set(e,s)}return[...a.values()].sort((e,t)=>e.key.localeCompare(t.key))}function m(e,t){let n=new Map;for(let r of e)for(let[e,i]of Object.entries(r.parts??{}))n.set(e,(n.get(e)??0)+i[t]);return[...n].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).map(([e])=>e)}function h(e,t){if(typeof t==`number`)return(typeof e==`number`?e:0)+t;if(!t||typeof t!=`object`||Array.isArray(t))return e;let n=e&&typeof e==`object`&&!Array.isArray(e)?{...e}:{};for(let[e,r]of Object.entries(t))n[e]=h(n[e],r);return n}function g(e,t){let n=new Map;for(let r of e){let e=t===`agent`?r.agent:t===`installation`?r.installationId??`none`:r.engine??`unknown`,i=n.get(e)??{key:e,tasks:0,runnerMs:0};i.tasks++,i.runnerMs+=r.runnerElapsedMs,r.tokens!==void 0&&(i.tokens=h(i.tokens,r.tokens)),n.set(e,i)}return[...n.values()].sort((e,t)=>e.key.localeCompare(t.key))}function _(e,t,n){let r=e.filter(e=>e.at>=t);return{since:t,totals:n?g(r,n):{agent:g(r,`agent`),installation:g(r,`installation`),engine:g(r,`engine`)}}}const v={tasks:`tasks`,runner:`runnerMs`,tokens:`tokenCount`},y={tokens:e=>e.tokenCount,tasks:e=>e.tasks,runner:e=>e.runnerMs,name:e=>e.key};async function b(e,c){let l=e=>c.searchParams.get(e),u=Number(l(`since`)??0),f=l(`until`)===null?void 0:Number(l(`until`)),h=l(`by`)??`agent`;if(!Number.isFinite(u)||f!==void 0&&!Number.isFinite(f)||![`agent`,`installation`,`engine`,`day`].includes(h))return r({error:`Invalid usage query`},400);let g=l(`parts`)?.split(`,`).filter(Boolean),_=Math.min(Number(l(`top`)??0),8),b=v[l(`sort`)??`tokens`]??`tokenCount`,x=await p(e.store,{by:h,since:u,...f===void 0?{}:{until:f},...l(`agent`)?{agent:l(`agent`)}:{},...h===`day`?{tz:d(l(`tz`))}:{},...g?.length?{parts:g.slice(0,20)}:{},..._>0?{top:{count:_,by:b}}:{}}),S={since:u,...f===void 0?{}:{until:f}};if(h===`agent`){let r=new Set(e.local?(await t(e.local.cwd,e.integrations)).map(e=>e.id):(await e.store.list(`agent`)).map(e=>e.id));for(let e of Object.keys(n()))r.add(e);for(let e of x)r.has(e.key)||(e.deleted=!0)}if(_>0)return r({...S,totals:x,top:m(x,b)});if(!a(c)||h!==`agent`)return r({...S,totals:x});let C=y[l(`sort`)??`tokens`]??y.tokens,w=l(`sort`)===`name`,T=l(`q`)?.trim().toLowerCase(),E=([e,t],[n,r])=>(e<n?-1:+(e>n))*(w?1:-1)||t.localeCompare(r),D=e=>[C(e),e.key],O=o(c),k=x.filter(e=>!T||e.key.toLowerCase().includes(T)).filter(e=>!O||E(D(e),O)>0).sort((e,t)=>E(D(e),D(t))),A=i(c),j=e=>x.reduce((t,n)=>t+e(n),0);return r({...S,...s(k.slice(0,A+1),A,D),summary:{agents:x.length,tasks:j(e=>e.tasks),runnerMs:j(e=>e.runnerMs),tokenCount:j(e=>e.tokenCount)}})}async function x(e,t,n,i){t.local&&await c(t);let a=i.searchParams.get(`installation`),o=await t.store.list(`usage`);return r(a?o.filter(e=>e.value.installationId===a):o)}async function S(e,t,n,i){t.local&&await c(t);let a=Number(i.searchParams.get(`since`)??0),o=i.searchParams.get(`by`);if([`until`,`agent`,`tz`,`parts`,`top`,`cursor`].some(e=>i.searchParams.has(e))||o===`day`)return b(t,i);if(!Number.isFinite(a)||o&&![`agent`,`installation`,`engine`].includes(o))return r({error:`Invalid usage query`},400);let s=(await t.store.list(`usage`)).map(e=>e.value);return r(_(s,a,o))}export{l as a,d as i,x as n,S as r,f as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,r as t}from"./cli-
|
|
1
|
+
import{i as e,r as t}from"./cli-B1ObVrL4.js";import{g as n,p as r}from"./output-BKeyLbvt.js";import{i,n as a,s as o,t as s}from"./args-DcBCtXhz.js";import c from"node:process";const l={server:i,workspace:o,yes:a};function u(e,t){let i=Array.isArray(e.totals)?e.totals.map(e=>({group:t??``,...e})):Object.entries(e.totals).flatMap(([e,t])=>t.map(t=>({group:e,...t})));if(!i.length)return void c.stdout.write(`${r.dim(`No usage in this period.`)}\n`);c.stdout.write(`${n([{header:`by`,value:e=>e.group},{header:`key`,value:e=>e.key,paint:e=>r.cyan(e)},{header:`tasks`,value:e=>String(e.tasks)},{header:`runner ms`,value:e=>String(e.runnerMs)},{header:`tokens`,value:e=>e.tokens===void 0?``:JSON.stringify(e.tokens)}],i,r)}\n`)}const d=e({name:`agent usage`,help:{usage:`coder agent usage [--since 7d|24h|<ms>] [--by agent|installation|engine] [--server [url]] [--json] [--cwd <dir>]`,flags:[[`--since <period|ms>`,`period such as 7d or 24h, or milliseconds since epoch`],[`--by <group>`,`agent, installation, or engine`],t]},options:{...s,...l,since:o,by:o},run:async({options:e,cwd:t})=>{let{agents:n}=await import(`./agent-BlQ_dNNm.js`).then(e=>e.t);return n.usage({...e,cwd:t,organization:e.workspace,since:e.since??`7d`})},print:(e,{options:t})=>u(e,t.by)});export{d as commandAgentUsage};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Mn as e,pn as t}from"./dispatch-BsW_1m7e.js";import{i as n,r}from"./cli-B1ObVrL4.js";import{p as i,y as a}from"./output-BKeyLbvt.js";import{i as o,l as s,n as c,s as l,t as u}from"./args-DcBCtXhz.js";import{LogRenderer as d,finalMessageLine as f,printOutcome as p,promptBlock as m,taskHeaderLines as h,taskSummaryLines as g,trimStep as _}from"./result-DGWyUHYU.js";import v from"node:process";import*as y from"zod/mini";const b={server:o,workspace:l,yes:c};function x(e,t){let n=e.level===`sys`?t.dim(`· ${e.line}`):e.level===`err`?t.light(e.line):e.line;v.stdout.write(`${n}\n`)}async function S(n,r,o){if(`attempts`in n.task){for await(let e of n.events)o.json?v.stdout.write(`${JSON.stringify(e,null,2)}\n`):x(e,i);let e=await n.final();o.json||p(e,i),v.exit(0)}let s=n.task,c=o.trim===void 0?500:o.trim===`none`?1/0:o.trim,l=await d.create({cwd:s.cwd??r,startedAt:Date.parse(s.createdAt??``)||void 0,trim:c,explicitTrim:o.trim!==void 0,width:a()});if(!o.json){let e=[...h(s,{status:s.status}),...t.includes(s.status)?[i.dim(`Watching. Press Ctrl-C to stop.`)]:[],...s.prompt?m(s.prompt,i,{truncate:!1}):[],``];v.stdout.write(`${e.join(`
|
|
2
2
|
`)}\n`)}let u=null,y=null,b=e=>{let t=l.render(e);t.length&&v.stdout.write(`${t.join(`
|
|
3
3
|
`)}\n`)};for await(let e of n.events){let t=e;if(t.kind===`usage`&&t.tokens&&(u=t.tokens),o.json){let e=t.kind===`steer`?1/0:c,n=t.message?{...t,message:_(t.message,e,{plain:!0})}:t;v.stdout.write(`${JSON.stringify(n)}\n`);continue}t.kind!==`usage`&&(y&&=(b(y),null),t.kind===`assistant`?y=t:b(t))}let{status:S,result:C,task:w}=await n.final();if(o.json)v.stdout.write(`${JSON.stringify({taskId:s.id,status:S,result:C},null,2)}\n`);else{let t=S===`completed`?`(no final message)`:`(task ${S})`,n=g(w,{tokens:C?.tokens??u,tokenModel:C?.model,files:C?.touchedFiles?.map(t=>e(s.cwd??r,t)),statusChanged:S!==s.status});n.length&&v.stderr.write(`\n${n.join(`
|
|
4
4
|
`)}\n`);let i=f(C,w.error,t),a=y?String(y.message??``):``;v.stdout.write(`\n${i.trim()?i:a}\n`)}v.exit(S===`completed`?0:1)}const C=n({name:`task watch`,help:{usage:`coder task watch [task-id] [--server [url]]`,summary:`Stream a running task's transcript live (for you/debugging), then print its
|
|
5
5
|
final answer. Replays the last line first so the current step is visible;
|
|
6
6
|
--tail <n> replays the last n lines (--tail all for the whole transcript).
|
|
7
7
|
Blocks until it finishes; exits 0 on success, 1 otherwise. For the answer
|
|
8
|
-
alone, prefer \`coder result\`. Alias: stream.`,flags:[[`--tail <n|all>`,`replay the last n log lines first (default: 1)`],[`--trim <n|none>`,`budget for tool output and thinking (default: 1200 chars, 12 lines)`],r],examples:[[`coder task watch`,`follow the most recent task to completion`]]},options:{...u,tail:s,trim:y.optional(y.union([y.literal(`none`),y.coerce.number().check(y.int(),y.positive())],{error:`expected a positive integer or "none"`})),...b},args:1,async run({options:e,args:[t],cwd:n}){let{tasks:r}=await import(`./task-
|
|
8
|
+
alone, prefer \`coder result\`. Alias: stream.`,flags:[[`--tail <n|all>`,`replay the last n log lines first (default: 1)`],[`--trim <n|none>`,`budget for tool output and thinking (default: 1200 chars, 12 lines)`],r],examples:[[`coder task watch`,`follow the most recent task to completion`]]},options:{...u,tail:s,trim:y.optional(y.union([y.literal(`none`),y.coerce.number().check(y.int(),y.positive())],{error:`expected a positive integer or "none"`})),...b},args:1,async run({options:e,args:[t],cwd:n}){let{tasks:r}=await import(`./task-CvSqiwxo.js`).then(e=>e.t);await S(await r.watch(t,{...e,organization:e.workspace}),n,e)}});export{C as commandWatch,x as printLine};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{qt as e}from"./dispatch-BsW_1m7e.js";import{i as t}from"./cli-B1ObVrL4.js";import{_ as n,a as r,b as i,c as a,h as o,l as s,n as c,p as l,s as u,u as d,v as f,y as p}from"./output-BKeyLbvt.js";import{l as m,t as h}from"./args-DcBCtXhz.js";import g from"node:process";const _=t({name:`flow watch`,help:{usage:`coder flow watch [run-id] [--tail <n|all>] [--json]`,summary:`Watch a flow run live: replay its progress lines from the start, then keep
|
|
2
2
|
following while it runs (Ctrl-C detaches; it keeps running). Blocks until it
|
|
3
3
|
finishes; exits 0 on success, 1 otherwise. Defaults to the most recent run.
|
|
4
|
-
For the result alone, prefer \`coder flow result\`. Alias: stream.`,flags:[[`--tail <n|all>`,`replay only the last n events first (default: all)`]],examples:[[`coder flow watch`,`follow the most recent run to completion`]]},options:{...h,tail:m},args:1,run:async({options:e,args:[t]})=>{let{watchRun:n}=await import(`./executor-
|
|
4
|
+
For the result alone, prefer \`coder flow result\`. Alias: stream.`,flags:[[`--tail <n|all>`,`replay only the last n events first (default: all)`]],examples:[[`coder flow watch`,`follow the most recent run to completion`]]},options:{...h,tail:m},args:1,run:async({options:e,args:[t]})=>{let{watchRun:n}=await import(`./executor-vMppVLB6.js`).then(e=>e.y);return N(n(t,{tail:e.tail}),{json:e.json,stream:!0})}}),v=[`⣾`,`⣽`,`⣻`,`⢿`,`⡿`,`⣟`,`⣯`,`⣷`];function y(e,t=!1){let n=l;return t?c(`[${x(e)}]`,10):e===`completed`?n.bold(n.green(`✔`)):e===`failed`||e===`cancelled`||e===`stopped`?n.bold(n.red(`✘`)):e===`running`?n.bold(n.cyan(`●`)):n.dim(`○`)}function b(){return c(`[start]`,10)}function x(e){return e===`completed`?`done`:e===`cancelled`?`failed`:e}function S(e,t){return e??t.replace(/\s+/g,` `).trim().slice(0,60)}function C(e,t,n,r,i,a){let o=l,u=c(t??n,32);return[`${e} ${a?o.bold(u):u}`,o.dim(c(n,24)),o.light(c(i??``,20)),r?o.light(`${s(r.total)} tok`):``].join(` `).trimEnd()}function w(e,t=!1){let n=l;return`${y(e.ok?`completed`:`failed`,t)} ${n.dim(`gate`)} ${n.light(e.cmd)}${e.ok?``:n.dim(` · exit ${e.code}`)}`}function T(e,t,n){let i=l,a=n!==void 0&&n>=1e3?i.dim(` · ${r(n)}`):``;return`${t} ${i.dim(`gate`)} ${i.light(e)}${a}`}function E(e,t=!1){return l.dim(`${`│ `.repeat(e)}${t?`└─`:`├─`}`)}function D(e){return l.dim(`${`│ `.repeat(e)}│ `)}function O(e){return`${` `.repeat(e.depth)}${e.log?`${c(`[log]`,10)} `:``}${e.body}`}function k(e,t,n=!1){return n?O(e):`${e.log?D(e.depth):E(e.depth,t)} ${e.body}`}function A(e){return l.dim(`${`│ `.repeat(Math.max(0,e))}│`)}var j=class{stream;names=new Map;active=new Map;activeGates=new Map;pending;previews=new Map;frame=0;hasCommitted=!1;timer;tty;region;constructor(e=g.stdout){this.stream=e,this.tty=!!e.isTTY,this.region=new n(e)}emit(e){let t=l;switch(e.kind){case`task-start`:{let t={name:S(e.name,e.prompt),engine:e.engine,depth:e.depth??0};if(this.names.set(e.taskId,t),!this.tty){this.final(t.depth,C(b(),t.name,e.taskId,null,t.engine));return}this.active.set(e.taskId,t),this.spin(!0),this.repaint();return}case`task-end`:{this.active.delete(e.taskId),this.previews.delete(e.taskId),this.idle();let t=this.names.get(e.taskId);this.final(t?.depth??0,C(y(e.status,!this.tty),t?.name??null,e.taskId,e.tokens,t?.engine));return}case`gate-start`:{let t={cmd:e.cmd,depth:e.depth??0,startedAt:Date.now()};if(!this.tty){this.final(t.depth,T(t.cmd,b()));return}this.activeGates.set(e.gateId,t),this.spin(!0),this.repaint();return}case`gate`:e.gateId&&this.activeGates.delete(e.gateId),this.idle(),this.final(e.depth??0,w(e,!this.tty));return;case`log`:for(let n of e.message.split(`
|
|
5
5
|
`))this.final(e.depth??0,t.light(n),!0);return;case`flow-start`:this.final(e.depth-1,t.bold(`flow ${e.name}`));return;case`replay`:this.final(0,t.dim(`replayed ${e.count} steps from journal`),!0)}}done(){this.spin(!1),this.flush(0),this.tty&&this.repaint(),this.region.done()}flush(e){this.pending&&=(this.region.commit(`${k(this.pending,e<this.pending.depth,!this.tty)}\n`),this.hasCommitted=!0,void 0)}final(e,t,n=!1){if(!this.tty){this.region.commit(`${O({depth:e,body:t,log:n})}\n`),this.hasCommitted=!0;return}this.flush(e),this.pending={depth:e,body:t,log:n},this.tty&&this.repaint()}repaint(){let e=[],t=[];if(this.pending){let n=k(this.pending,!1);e.push(n),t.push(n)}let n=this.timer?l.bold(l.cyan(v[this.frame%v.length])):y(`running`);for(let[r,i]of this.active){let a=`${E(i.depth??0)} ${C(n,i.name,r,null,i.engine,!0)}`;(e.length||this.hasCommitted)&&e.push(A(i.depth??0)),e.push(a),t.push(a);let o=this.previews.get(r);o&&e.push(`${D(i.depth??0)} ${l.dim(o)}`)}for(let r of this.activeGates.values()){let i=`${E(r.depth)} ${T(r.cmd,n,Date.now()-r.startedAt)}`;(e.length||this.hasCommitted)&&e.push(A(r.depth)),e.push(i),t.push(i)}let r=(i(this.stream)??1/0)-1,a=e.length<=r?e:t;if(a.length>r){let e=Math.max(0,r-1);a=[l.dim(`… +${a.length-e} more running`),...a.slice(-e)]}this.region.set(a)}refreshPreviews(){for(let t of this.active.keys())try{let n=e(g.cwd(),t,1)[0]?.message?.replace(/\s+/g,` `).trim();if(!n)continue;let r=(p(this.stream)??120)-8;this.previews.set(t,n.length>r?`${n.slice(0,r-1)}…`:n)}catch{}}idle(){!this.active.size&&!this.activeGates.size&&this.spin(!1)}spin(e){e&&!this.timer?this.timer=setInterval(()=>{this.frame++,this.frame%4==0&&this.refreshPreviews(),this.repaint()},120).unref():!e&&this.timer&&(clearInterval(this.timer),this.timer=void 0)}};function M(e,t){if(t){o(e);return}let n=!g.stdout.isTTY,r=n?``:`${l.dim(`└─`)} `;g.stdout.write(`${r}${y(`completed`,n)} run ${l.cyan(e.runId)} completed ${l.dim(`(${e.taskCount} tasks)`)}\n`),g.stdout.write(`\n${a(e.result)}\n`),P(e.tokens)}async function N(e,t){let{runId:n}=e.record,r=!!(t.stream&&t.json);!t.json&&e.record.status===`running`&&g.stderr.write(`${l.dim(`[flow]`)} Run ${l.cyan(n)} started and is waiting to finish. Press Ctrl-C to detach. It keeps running.\n\n`);let i=t.json?()=>{}:f(),a=()=>{i(),r||(g.stderr.write(`\n${l.dim(`[flow] Detached. The run is still going.`)}\n`),g.stderr.write(`\n${u([`Result: coder flow result ${n}`,`Stop it: coder flow stop ${n}`],l)}\n`)),g.exit(130)};g.on(`SIGINT`,a);let s=new j;for await(let n of e.events)r?g.stdout.write(`${JSON.stringify(n)}\n`):t.json||s.emit(n);s.done(),i(),g.off(`SIGINT`,a);let c=e.final();r&&(g.stdout.write(`${JSON.stringify(F(c))}\n`),g.exit(c.status===`completed`?0:1)),c.status===`completed`&&(M({runId:n,name:c.name,status:`completed`,result:c.result,tokens:c.ledger,taskCount:c.taskCount},t.json),g.exit(0)),c.status===`stopped`&&(t.json?o({runId:n,name:c.name,status:`stopped`,taskCount:c.taskCount}):g.stdout.write(`\n${l.dim(`[flow] Run ${n} stopped.`)}\n\n${u([`Resume: coder flow resume ${n}`],l)}\n`),g.exit(1)),g.stdout.write(`\n${l.red(`error:`)} ${c.error??`unknown error`}\n`),g.stdout.write(`\n${u([`Resume: coder flow resume ${n}`],l)}\n`),g.exit(1)}function P(e){let t=Object.keys(e);if(t.length){g.stdout.write(`\n${l.bold(`Tokens:`)}\n`);for(let n of t)g.stdout.write(` ${l.dim(d(e[n],n))}\n`)}}function F(e){let{steps:t,events:n,...r}=e;return r}export{j as FlowStepRenderer,_ as commandWatch,w as gateLine,T as gateRunningLine,O as paintPlain,N as printFollow,P as printLedger,M as printRunSummary,F as resultJson,y as stepSymbol,S as taskLabel,C as taskLine};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as e}from"./dispatch-
|
|
1
|
+
import{Q as e}from"./dispatch-BsW_1m7e.js";import t from"node:process";async function n(n,r,i){let a=n.envKey?t.env[n.envKey]:void 0,o=!1;for(let t of e(n.baseUrl,r))try{let e=await fetch(t,{method:`POST`,headers:{"content-type":`application/json`,...a?{Authorization:`Bearer ${a}`}:{}},body:JSON.stringify(i),signal:AbortSignal.timeout(5e3)});if(o=!0,e.status!==404&&e.status!==405&&e.status!==501)return{baseUrl:t.slice(0,-(r.length+1))}}catch{}return{reachable:o}}async function r(e){let t=await n(e,`responses`,{model:e.model,input:[],stream:!1});if(`baseUrl`in t)return{wireApi:`responses`,baseUrl:t.baseUrl};let r=await n(e,`chat/completions`,{model:e.model,messages:[],stream:!1});return`baseUrl`in r?{wireApi:`chat`,baseUrl:r.baseUrl}:t.reachable||r.reachable?{wireApi:`chat`}:null}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ht as e}from"./dispatch-BsW_1m7e.js";import{i as t}from"./cli-B1ObVrL4.js";import{i as n}from"./output-BKeyLbvt.js";import{s as r}from"./args-DcBCtXhz.js";import i from"node:process";const a=t({name:`task worker`,options:{cwd:r},args:1,async run({args:[t],cwd:r}){let{startAgentMailbox:a}=await import(`./exec-DuUkLMqg.js`).then(e=>e.i),{runWorker:o}=await import(`./worker-nHemduM_.js`),s=e(r,t);s||n(`Worker: task ${t} not found.`),await o(r,s,a).catch(()=>i.exit(1))}});export{a as commandWorker};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{Dt as e,F as t,Ht as n,I as r,J as i,M as a,Nn as o,O as s,S as c,_ as l,c as u,fn as d,ft as f,jt as p,ln as m,mt as h,nt as g,on as _,pt as v,rn as y,tt as b,ut as x}from"./dispatch-BsW_1m7e.js";import{t as S}from"./chat-bridge-DXgZItGP.js";import{t as C}from"./wire-DzGLZ3-O.js";import w from"node:path";import T from"node:process";import E from"node:fs";function D(e){if(e.resumeThreadId)return e.currentPrompt??e.prompt??``;let t=e.system?`\n-------\n${e.system}`:``;return`<system>
|
|
2
|
+
You are running inside a coder task: do the work yourself, directly.
|
|
3
|
+
Do not load the coder skill (recursive), and never dispatch through the \`coder\` CLI - nested dispatch is disabled.
|
|
4
|
+
When finished, provide a concise implementation result summary.
|
|
5
|
+
Your turn is one-shot: background processes will not re-invoke you after it ends, so verify synchronously before finishing.
|
|
6
|
+
Never run git write operations (commit, checkout, stash, reset, rebase, merge, push, etc.); leave changes uncommitted for the caller to review.${e.agentId?"\nFlows are the exception: run one from your shell with `coder flow run <name> --wait --json --args '<json>'`; it runs as a script in your sandbox.":``}${t}
|
|
7
|
+
</system>
|
|
8
|
+
|
|
9
|
+
${e.prompt??``}`}function O(e,t){let n=0;return()=>{Date.now()-n>=1e4&&(n=Date.now(),m(e,t))}}function k(t,n,{echo:r}){return i=>{let a=typeof i==`string`?{message:i}:i;e(t,n,a),r&&a.message&&T.stderr.write(`[coder] ${a.message}\n`)}}async function A(n,o,{echo:s}){let c=_(n),p=y(n,o.id),m=g(n),w=k(n,o.id,{echo:s}),E=i[o.permissions??`auto`]??i.auto,A=E.approvalPolicy===`never`?void 0:l({workspaceRoot:c,taskDir:p,mode:E.approvalMode,escalationTimeoutMs:m.approvals.escalationTimeoutMs,allowedNetworkHosts:m.approvals.allowedNetworkHosts,onEvent:t=>{e(n,o.id,t),s&&t.message&&T.stderr.write(`[coder] ${t.message}\n`)}}),j=o.model?m.models?.[o.model]:void 0,N=j&&b(j)?j:void 0;if(N&&!N.wireApi&&o.model){let t=await C(N);t&&(N={...N,...t},m.models[o.model]=N,x(n,o.model,t),e(n,o.id,{kind:`info`,message:`detected wire api for ${o.model}: ${t.wireApi} @ ${N.baseUrl}`}))}if(N?.envKey&&!T.env[N.envKey])throw Error(`Missing environment variable: \`${N.envKey}\`.`);let P=N?await S(N,N.wireApi??`chat`):null,F=h(m,o.model,P??void 0),I=r(n,o);try{let e=await a(n,{prompt:D(o),outputSchema:o.outputSchema,model:F?.model??f(o.model),modelProvider:F?.modelProvider??null,configOverrides:I?{...F?.configOverrides,"shell_environment_policy.set":{[t]:I}}:F?.configOverrides??null,effort:o.effort,sandbox:E.sandbox,approvalPolicy:E.approvalPolicy,networkAccess:v(o.permissions??`auto`,m.engines.codex?.network),approvalsReviewer:E.approvalMode===`auto`?`auto_review`:null,mcpServers:u(o.mcp),nativeMcp:o.nativeMcp??!1,writableRoots:[...E.sandbox===`read-only`?[]:o.addDirs??[],...I?[I]:[]],onApprovalRequest:A,onHeartbeat:O(n,o.id),resumeThreadId:o.resumeThreadId??null,onControlReady:(e,t,r)=>{d(n,o.id,{status:`running`,steerEndpoint:e,threadId:t,turnId:r})},onProgress:e=>{w(e);let t=typeof e==`object`?e.threadId:null,r=typeof e==`object`?e.turnId:null;(t||r)&&d(n,o.id,{status:`running`,...t?{threadId:t}:{},...r?{turnId:r}:{}})}});return d(n,o.id,{status:e.status===0?`completed`:`failed`,threadId:e.threadId,turnId:e.turnId,steerEndpoint:null,completedAt:new Date().toISOString()}),M(n,o,p,e),e}finally{d(n,o.id,{steerEndpoint:null}),await P?.close()}}async function j(e,n,{echo:a}){let o=y(e,n.id),c=g(e),l=k(e,n.id,{echo:a}),f=i[n.permissions??`auto`]??i.auto,p=r(e,n);try{let r=await s(e,{prompt:D(n),outputSchema:n.outputSchema,model:n.model,effort:n.effort,permissions:n.permissions,approvalTaskId:f.approvalMode===`auto`?n.id:null,allowedNetworkHosts:c.approvals.allowedNetworkHosts,additionalDirectories:n.addDirs,...p?{writableDirectories:[p],env:{[t]:p}}:{},mcpServers:u(n.mcp),nativeMcp:n.nativeMcp??!1,taskRoot:o,resumeSessionId:n.resumeThreadId??null,onHeartbeat:O(e,n.id),onSteerReady:t=>{d(e,n.id,{status:`running`,steerEndpoint:t})},onProgress:t=>{l(t),t.threadId&&d(e,n.id,{status:`running`,threadId:t.threadId})}});return d(e,n.id,{status:r.status===0?`completed`:`failed`,threadId:r.threadId,steerEndpoint:null,completedAt:new Date().toISOString()}),M(e,n,o,r),r}finally{d(e,n.id,{steerEndpoint:null})}}function M(e,t,n,r){o(w.join(n,`result.json`),r);let i={at:new Date().toISOString(),prompt:t.currentPrompt??t.prompt??null,...r};E.appendFileSync(w.join(n,`results.jsonl`),`${JSON.stringify(i)}\n`,`utf8`)}function N(e){return e.engine===`claude`?j:A}async function P(t,r){for(let i=0;i<2;){let a=n(t,r);if(!a||a.status===`failed`||a.status===`cancelled`)return;let o=p(t,r);if(o.length===0){i+=1,await new Promise(e=>setTimeout(e,300));continue}i=0;for(let n of o){let i=d(t,r,{status:`running`,currentPrompt:n,resumeThreadId:a.threadId??null});e(t,r,{message:`Running steered follow-up.`});try{await N(i)(t,i,{echo:!1})}catch(n){let i=n instanceof Error?n.message:String(n);d(t,r,{status:`failed`,error:i}),e(t,r,{kind:`error`,message:i});return}}}}async function F(t,r,i){if(r.dispatchId&&!r.resumedAt)try{E.writeFileSync(w.join(y(t,r.id),`start-${r.dispatchId}`),``,{flag:`wx`})}catch(e){if(e.code===`EEXIST`)return;throw e}d(t,r.id,{status:`running`,pid:T.pid});let a=()=>{},o;try{if(a=i(t,r),r.name?.startsWith(`agent:`)){let{startInboxControl:e,applyTaskMessage:i}=await import(`./task-CpUI19o2.js`).then(e=>e.d);o=e(y(t,r.id),r.name.slice(6),e=>i(t,n(t,r.id)??r,e))}if(r.simulateApproval){let n=await c(y(t,r.id),{onEvent:n=>e(t,r.id,n)});if(e(t,r.id,{message:`simulated approval: ${n}`}),n===`decline`){d(t,r.id,{status:`cancelled`,completedAt:new Date().toISOString(),error:`simulated approval denied`});return}}await N(r)(t,r,{echo:!1}),await P(t,r.id)}catch(n){let i=n instanceof Error?n.message:String(n);throw d(t,r.id,{status:`failed`,error:i}),e(t,r.id,{kind:`error`,message:i}),n}finally{a(),await o?.close()}}export{F as runWorker};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./cli-
|
|
1
|
+
import{i as e}from"./cli-B1ObVrL4.js";import t from"node:process";const n=e({name:`server workflow`,globalFlags:{json:!1,cwd:!1},help:{usage:`coder server workflow`,summary:`Print the workflow the github-actions runner dispatches. Save it as .github/workflows/coder-agent.yml in every repo the agent runs on, and set RUNNER=github-actions on the server.`,examples:[[`coder server workflow > .github/workflows/coder-agent.yml`,`add it to a repo`]]},options:{},run:async()=>{let{ACTIONS_WORKFLOW_YAML:e}=await import(`./github-actions-C_NkHVJq.js`).then(e=>e.r);return e},print:e=>t.stdout.write(e)});export{n as commandServerWorkflow};
|
package/docs/cli.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# CLI reference
|
|
2
|
+
|
|
3
|
+
Every command, grouped by what it acts on. Run `coder <command> --help` for the full flags, examples and exit codes of any one of them. Commands that take a `[task-id]` or `[run-id]` default to your most recent one.
|
|
4
|
+
|
|
5
|
+
## Tasks
|
|
6
|
+
|
|
7
|
+
| Command | What it does |
|
|
8
|
+
| -------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
9
|
+
| `coder run "<text>"` | Dispatch a task in the background and print its id. Short for `coder task run`. |
|
|
10
|
+
| `coder list` | Recent tasks, running and just stopped. `--running`, `--stopped`, `--archived`, `--limit <n>`. |
|
|
11
|
+
| `coder result [task-id]` | Status and final answer. `--wait` blocks until it's ready. |
|
|
12
|
+
| `coder task watch [task-id]` | Stream the live transcript. |
|
|
13
|
+
| `coder task steer <task-id> "<text>"` | Continue the task's thread with new instructions, mid-run. |
|
|
14
|
+
| `coder task ask <task-id> "<question>"` | Ask about a task without interrupting it. |
|
|
15
|
+
| `coder task stop <task-id>` | Interrupt a running task. |
|
|
16
|
+
| `coder task approvals [task-id]` | Approvals waiting on you, across tasks or for one. |
|
|
17
|
+
| `coder task approve [task-id] <approval-id>` | Accept an escalated permission. `--deny` rejects it. |
|
|
18
|
+
| `coder task archive <task-id>` | Hide a stopped task from the list. `--all-stopped` for all of them. |
|
|
19
|
+
| `coder task delete <task-id>` | Delete a task's record. `--all-archived` for all archived ones. |
|
|
20
|
+
|
|
21
|
+
### `coder run` flags
|
|
22
|
+
|
|
23
|
+
| Flag | What it does |
|
|
24
|
+
| ---------------------------------- | -------------------------------------------------------------------------------- |
|
|
25
|
+
| `--wait` | Run in the foreground and print the answer. |
|
|
26
|
+
| `--engine <codex\|claude\|custom>` | Engine to use. Defaults to the first in the chain. |
|
|
27
|
+
| `--model <alias\|slug>` | Model to use, built-in or one of yours (`coder model list`). |
|
|
28
|
+
| `--effort <low\|medium\|high>` | Reasoning effort. |
|
|
29
|
+
| `--permissions <mode>` | `read-only`, `workspace-write` or `auto` (the default). |
|
|
30
|
+
| `--agent <id>` | Run as a repo agent: its instructions, engine settings, MCP servers and flows. |
|
|
31
|
+
| `--system <text>` | Standing instructions prepended to the task. |
|
|
32
|
+
| `--mcp <names\|all\|json>` | Attach MCP servers by name, or inline. |
|
|
33
|
+
| `--add-dir <dir>` | Give the task another directory beyond `--cwd`. Repeatable. |
|
|
34
|
+
| `--output-schema <json>` | JSON Schema the answer must match. |
|
|
35
|
+
| `--name <name>` | Label the task in `list` and `result`. |
|
|
36
|
+
| `--resume <task-id>` | Continue that task's thread instead of starting fresh. |
|
|
37
|
+
| `--server [url]` | Run on your Coder server and follow it here. `--repo` and `--runner` pick where. |
|
|
38
|
+
|
|
39
|
+
## Flows
|
|
40
|
+
|
|
41
|
+
| Command | What it does |
|
|
42
|
+
| ----------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
43
|
+
| `coder flow run <name\|path>` | Run a flow in the background. `--wait` follows it live, `--dry-run` prints every prompt and gate first. |
|
|
44
|
+
| `coder flow discover` | Flows you can run here, from the workspace and globally. |
|
|
45
|
+
| `coder flow list` | Recent runs. |
|
|
46
|
+
| `coder flow watch [run-id]` | Watch a run live. |
|
|
47
|
+
| `coder flow result [run-id]` | Progress and result across the run. |
|
|
48
|
+
| `coder flow stop [run-id]` | Stop a run and its still-running tasks. |
|
|
49
|
+
| `coder flow resume [run-id]` | Continue a stopped or edited run. |
|
|
50
|
+
| `coder flow archive <run-id>` | Hide a run. `--all-stopped` for all of them. |
|
|
51
|
+
| `coder flow delete <run-id>` | Delete a run's record. `--all-archived` for all archived ones. |
|
|
52
|
+
|
|
53
|
+
Pass a flow's input as `key=value` pairs or `--args '<json>'`. `--concurrency` and `--max-tasks` cap how wide it goes.
|
|
54
|
+
|
|
55
|
+
## Review
|
|
56
|
+
|
|
57
|
+
| Command | What it does |
|
|
58
|
+
| ---------------------------- | -------------------------------------------------------------------- |
|
|
59
|
+
| `coder review` | Review this branch against the merge-base with the default branch. |
|
|
60
|
+
| `coder review --pr <n\|url>` | Review a pull request. `--post` posts inline comments and a summary. |
|
|
61
|
+
|
|
62
|
+
Narrow it with `--base`, `--head`, `--since <sha>`, `--path` and `--exclude`. `--engine`, `--model` and `--effort` pick what runs the review.
|
|
63
|
+
|
|
64
|
+
## Models
|
|
65
|
+
|
|
66
|
+
| Command | What it does |
|
|
67
|
+
| ------------------------------------------------------ | -------------------------------------------------------------------------- |
|
|
68
|
+
| `coder model list` | Built-in models, your own, and aliases. |
|
|
69
|
+
| `coder model add <name> --base-url <url> --model <id>` | Connect any OpenAI-compatible endpoint. `--env-key <VAR>` for its API key. |
|
|
70
|
+
| `coder model update <name>` | Change a model in place. |
|
|
71
|
+
| `coder model remove <name>` | Delete one of your models. |
|
|
72
|
+
| `coder model alias <name> <spec>` | Name a shortcut, like `fast codex:luna`. `unalias` removes it. |
|
|
73
|
+
| `coder model disable <name>` | Take a model out of rotation. `enable` brings it back. |
|
|
74
|
+
|
|
75
|
+
## Configuration and MCP
|
|
76
|
+
|
|
77
|
+
| Command | What it does |
|
|
78
|
+
| ------------------------------------ | ------------------------------------------------------------------------ |
|
|
79
|
+
| `coder config list` | The effective configuration. |
|
|
80
|
+
| `coder config get <key>` | Read one value, like `engines.codex.model`. |
|
|
81
|
+
| `coder config set <key> <value>` | Write a value. `--workspace` writes to this repo's `.coder/config.json`. |
|
|
82
|
+
| `coder config unset <key>` | Remove a value. |
|
|
83
|
+
| `coder mcp add <name> -- <command>` | Add a stdio MCP server. `--url <url>` adds a remote one. |
|
|
84
|
+
| `coder mcp add-json <name> '<json>'` | Add an entry in `.mcp.json` shape. |
|
|
85
|
+
| `coder mcp list` | Configured MCP servers. |
|
|
86
|
+
| `coder mcp rm <name>` | Remove one. |
|
|
87
|
+
|
|
88
|
+
## Agents
|
|
89
|
+
|
|
90
|
+
| Command | What it does |
|
|
91
|
+
| -------------------------------------- | -------------------------------------------------------------- |
|
|
92
|
+
| `coder agent list` | Agents in this workspace, or on your server. |
|
|
93
|
+
| `coder agent show <id>` | One agent in full: settings, integrations, triggers, tools. |
|
|
94
|
+
| `coder agent init [id]` | Scaffold an agent in `.coder/agents/`. |
|
|
95
|
+
| `coder agent run <agent> <event.json>` | Run a recorded event through an agent, offline or on a server. |
|
|
96
|
+
| `coder agent push [id]` | Upload workspace agents to your server. |
|
|
97
|
+
| `coder agent integrations list` | The apps an agent can connect to. `show <id>` for one. |
|
|
98
|
+
| `coder agent usage` | Usage by agent, installation or engine. |
|
|
99
|
+
|
|
100
|
+
## Servers
|
|
101
|
+
|
|
102
|
+
| Command | What it does |
|
|
103
|
+
| --------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
104
|
+
| `coder auth login` | Sign in to Coder Cloud. `--server <url>` for a self-hosted one. |
|
|
105
|
+
| `coder auth status` | Where you're signed in. `logout` forgets the session. |
|
|
106
|
+
| `coder credentials list` | Engine credentials on your server. `add`, `login`, `default` and `remove` manage them. |
|
|
107
|
+
| `coder runner serve --url <public url>` | Run your server's tasks on this machine. |
|
|
108
|
+
| `coder runner list` | Your runners and the workspace's. `add`, `test`, `default`, `rename` and `remove` manage them. |
|
|
109
|
+
| `coder server serve` | Run a Coder server. See [Self-hosting](self-host.md). |
|
|
110
|
+
| `coder server migrate` | Apply pending database migrations. |
|
|
111
|
+
| `coder server rotate-key` | Re-seal stored secrets with a new `SERVER_ENCRYPTION_KEY`. |
|
|
112
|
+
| `coder server app create <integration>` | Create the built-in agent's public app on a platform. |
|
|
113
|
+
| `coder server workflow` | Print the GitHub Actions workflow the `github-actions` runner uses. |
|
|
114
|
+
|
|
115
|
+
## Setup and upkeep
|
|
116
|
+
|
|
117
|
+
| Command | What it does |
|
|
118
|
+
| ----------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
119
|
+
| `coder setup-host [claude\|agents]` | Install or repair the host plugin, and check engines and auth. |
|
|
120
|
+
| `coder dash` | Your tasks, agents and settings in the browser. Short for `coder server serve` on this machine. |
|
|
121
|
+
| `coder upgrade` | Update the CLI and host plugins. `--cli-only` or `--plugins-only` to narrow it. |
|
|
122
|
+
| `coder docs [topic]` | Print a bundled guide. |
|
|
123
|
+
|
|
124
|
+
Set `CODER_NO_UPDATE_CHECK=1` to silence the update notice.
|
|
125
|
+
|
|
126
|
+
## Global flags
|
|
127
|
+
|
|
128
|
+
| Flag | What it does |
|
|
129
|
+
| ----------------- | ------------------------- |
|
|
130
|
+
| `--json` | Machine-readable output. |
|
|
131
|
+
| `--cwd <dir>` | Act on another workspace. |
|
|
132
|
+
| `-h`, `--help` | Help for any command. |
|
|
133
|
+
| `-v`, `--version` | Print the version. |
|
|
134
|
+
|
|
135
|
+
## Exit codes
|
|
136
|
+
|
|
137
|
+
`coder run --wait` and `coder result --wait` exit with:
|
|
138
|
+
|
|
139
|
+
| Code | Meaning |
|
|
140
|
+
| ---- | --------------------------------------------------- |
|
|
141
|
+
| 0 | The task completed. |
|
|
142
|
+
| 1 | The task failed or was cancelled. |
|
|
143
|
+
| 3 | No engine could start. |
|
|
144
|
+
| 4 | An approval is pending. Answer it, then wait again. |
|
|
145
|
+
| 130 | You detached from the wait. The task keeps running. |
|
package/docs/mcp.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MCP
|
|
2
2
|
|
|
3
|
-
Give tasks tools of your own: an MCP server is saved once under `mcp` in `.coder/config.json`, then attached to a task by name. Nothing attaches unless asked, so the default run stays lean.
|
|
3
|
+
Give tasks tools of your own: an MCP server is saved once under `mcp` in `.coder/config.json`, then attached to a task by name. Nothing attaches unless asked, so the default run stays lean. `--mcp all` also loads your engine's own MCP servers and connectors.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
coder mcp add docs -- npx -y docs-mcp # stdio server: the command after --
|
|
@@ -209,6 +209,12 @@ CREATE TABLE "coder"."task_log" (
|
|
|
209
209
|
CONSTRAINT "task_log_taskId_seq_unique" UNIQUE("task_id","seq")
|
|
210
210
|
);
|
|
211
211
|
--> statement-breakpoint
|
|
212
|
+
CREATE TABLE "coder"."task_tombstone" (
|
|
213
|
+
"organization_id" text NOT NULL,
|
|
214
|
+
"public_id" text NOT NULL,
|
|
215
|
+
"deleted_at" timestamp with time zone NOT NULL
|
|
216
|
+
);
|
|
217
|
+
--> statement-breakpoint
|
|
212
218
|
CREATE TABLE "coder"."usage" (
|
|
213
219
|
"id" bigserial PRIMARY KEY NOT NULL,
|
|
214
220
|
"organization_id" text NOT NULL,
|
|
@@ -246,7 +252,9 @@ CREATE INDEX "platform_link_user_id_index" ON "coder"."platform_link" USING btre
|
|
|
246
252
|
CREATE INDEX "secret_organization_id_kind_index" ON "coder"."secret" USING btree ("organization_id","kind");--> statement-breakpoint
|
|
247
253
|
CREATE INDEX "task_public_id_index" ON "coder"."task" USING btree ("public_id");--> statement-breakpoint
|
|
248
254
|
CREATE INDEX "task_organization_id_created_at_public_id_index" ON "coder"."task" USING btree ("organization_id","created_at" DESC NULLS LAST,"public_id" DESC NULLS LAST);--> statement-breakpoint
|
|
255
|
+
CREATE INDEX "task_organization_id_updated_at_index" ON "coder"."task" USING btree ("organization_id","updated_at");--> statement-breakpoint
|
|
249
256
|
CREATE INDEX "task_organization_id_index" ON "coder"."task" USING btree ("organization_id") WHERE "coder"."task"."status" = 'queued';--> statement-breakpoint
|
|
250
257
|
CREATE INDEX "task_status_created_at_index" ON "coder"."task" USING btree ("status","created_at");--> statement-breakpoint
|
|
251
258
|
CREATE INDEX "task_inbox_task_id_generation_seq_index" ON "coder"."task_inbox" USING btree ("task_id","generation","seq");--> statement-breakpoint
|
|
259
|
+
CREATE INDEX "task_tombstone_organization_id_deleted_at_index" ON "coder"."task_tombstone" USING btree ("organization_id","deleted_at");--> statement-breakpoint
|
|
252
260
|
CREATE INDEX "usage_organization_id_at_index" ON "coder"."usage" USING btree ("organization_id","at");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "
|
|
2
|
+
"id": "457fd83b-7007-422f-a78d-04d4303e33ba",
|
|
3
3
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
4
4
|
"version": "7",
|
|
5
5
|
"dialect": "postgresql",
|
|
@@ -1336,6 +1336,27 @@
|
|
|
1336
1336
|
"method": "btree",
|
|
1337
1337
|
"with": {}
|
|
1338
1338
|
},
|
|
1339
|
+
"task_organization_id_updated_at_index": {
|
|
1340
|
+
"name": "task_organization_id_updated_at_index",
|
|
1341
|
+
"columns": [
|
|
1342
|
+
{
|
|
1343
|
+
"expression": "organization_id",
|
|
1344
|
+
"isExpression": false,
|
|
1345
|
+
"asc": true,
|
|
1346
|
+
"nulls": "last"
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"expression": "updated_at",
|
|
1350
|
+
"isExpression": false,
|
|
1351
|
+
"asc": true,
|
|
1352
|
+
"nulls": "last"
|
|
1353
|
+
}
|
|
1354
|
+
],
|
|
1355
|
+
"isUnique": false,
|
|
1356
|
+
"concurrently": false,
|
|
1357
|
+
"method": "btree",
|
|
1358
|
+
"with": {}
|
|
1359
|
+
},
|
|
1339
1360
|
"task_organization_id_index": {
|
|
1340
1361
|
"name": "task_organization_id_index",
|
|
1341
1362
|
"columns": [
|
|
@@ -1612,6 +1633,59 @@
|
|
|
1612
1633
|
"checkConstraints": {},
|
|
1613
1634
|
"isRLSEnabled": false
|
|
1614
1635
|
},
|
|
1636
|
+
"coder.task_tombstone": {
|
|
1637
|
+
"name": "task_tombstone",
|
|
1638
|
+
"schema": "coder",
|
|
1639
|
+
"columns": {
|
|
1640
|
+
"organization_id": {
|
|
1641
|
+
"name": "organization_id",
|
|
1642
|
+
"type": "text",
|
|
1643
|
+
"primaryKey": false,
|
|
1644
|
+
"notNull": true
|
|
1645
|
+
},
|
|
1646
|
+
"public_id": {
|
|
1647
|
+
"name": "public_id",
|
|
1648
|
+
"type": "text",
|
|
1649
|
+
"primaryKey": false,
|
|
1650
|
+
"notNull": true
|
|
1651
|
+
},
|
|
1652
|
+
"deleted_at": {
|
|
1653
|
+
"name": "deleted_at",
|
|
1654
|
+
"type": "timestamp with time zone",
|
|
1655
|
+
"primaryKey": false,
|
|
1656
|
+
"notNull": true
|
|
1657
|
+
}
|
|
1658
|
+
},
|
|
1659
|
+
"indexes": {
|
|
1660
|
+
"task_tombstone_organization_id_deleted_at_index": {
|
|
1661
|
+
"name": "task_tombstone_organization_id_deleted_at_index",
|
|
1662
|
+
"columns": [
|
|
1663
|
+
{
|
|
1664
|
+
"expression": "organization_id",
|
|
1665
|
+
"isExpression": false,
|
|
1666
|
+
"asc": true,
|
|
1667
|
+
"nulls": "last"
|
|
1668
|
+
},
|
|
1669
|
+
{
|
|
1670
|
+
"expression": "deleted_at",
|
|
1671
|
+
"isExpression": false,
|
|
1672
|
+
"asc": true,
|
|
1673
|
+
"nulls": "last"
|
|
1674
|
+
}
|
|
1675
|
+
],
|
|
1676
|
+
"isUnique": false,
|
|
1677
|
+
"concurrently": false,
|
|
1678
|
+
"method": "btree",
|
|
1679
|
+
"with": {}
|
|
1680
|
+
}
|
|
1681
|
+
},
|
|
1682
|
+
"foreignKeys": {},
|
|
1683
|
+
"compositePrimaryKeys": {},
|
|
1684
|
+
"uniqueConstraints": {},
|
|
1685
|
+
"policies": {},
|
|
1686
|
+
"checkConstraints": {},
|
|
1687
|
+
"isRLSEnabled": false
|
|
1688
|
+
},
|
|
1615
1689
|
"coder.usage": {
|
|
1616
1690
|
"name": "usage",
|
|
1617
1691
|
"schema": "coder",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wular/coder",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Delegating coding-agent runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/sdk.js",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"src/client/index.ts",
|
|
40
40
|
"src/client/types.ts",
|
|
41
41
|
"src/core/errors.ts",
|
|
42
|
+
"src/core/defaults.ts",
|
|
42
43
|
"src/core/task/log-view.ts",
|
|
43
44
|
"plugins",
|
|
44
45
|
".claude-plugin",
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
"@chat-adapter/teams": "4.41.1",
|
|
61
62
|
"@octokit/auth-app": "8.3.1",
|
|
62
63
|
"@tanstack/virtual-core": "3.17.1",
|
|
63
|
-
"@wular/pnext": "0.1.
|
|
64
|
+
"@wular/pnext": "0.1.6",
|
|
64
65
|
"chat": "4.41.1",
|
|
65
66
|
"drizzle-orm": "0.45.2",
|
|
66
67
|
"jose": "6.2.12",
|
|
@@ -21,6 +21,7 @@ If `coder` is not on PATH, install it yourself without asking: `npm install -g @
|
|
|
21
21
|
|
|
22
22
|
- The CLI is the reference. `coder --help` and every subcommand's `--help` list the flags and exit codes, and each command prints the recommended next step when it returns. Follow it.
|
|
23
23
|
- `coder docs` lists the deeper guides; `coder docs <topic>` prints one.
|
|
24
|
+
- Wait on each task with `coder task result <task-id> --wait` in its own background shell, one per task, never several tasks in one call, so each approval and answer reaches you.
|
|
24
25
|
- If your harness sandboxes or gates terminal commands (Codex does both), run every `coder` command with escalated permissions; the runtime is a supervisor with its own sandbox and approval policy.
|
|
25
26
|
|
|
26
27
|
## Running tasks
|
|
@@ -21,7 +21,7 @@ If `coder` is not on PATH, install it yourself without asking: `npm install -g @
|
|
|
21
21
|
|
|
22
22
|
- The CLI is the reference. `coder --help` and every subcommand's `--help` list the flags and exit codes, and each command prints the recommended next step when it returns. Follow it.
|
|
23
23
|
- `coder docs` lists the deeper guides; `coder docs <topic>` prints one.
|
|
24
|
-
- Run each `coder task result <task-id> --wait` as
|
|
24
|
+
- Run each `coder task result <task-id> --wait` as its own background Bash call (run_in_background), one per task, never several tasks in one call, so each approval and answer re-invokes you.
|
|
25
25
|
|
|
26
26
|
## Running tasks
|
|
27
27
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coder",
|
|
3
3
|
"displayName": "Coder",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.3",
|
|
5
5
|
"description": "Delegate coding tasks to supervised Coder subagents running on Codex, Claude, or any OpenAI-compatible model. Your main context stays clean.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "muzam1l"
|
|
@@ -21,6 +21,7 @@ If `coder` is not on PATH, install it yourself without asking: `npm install -g @
|
|
|
21
21
|
|
|
22
22
|
- The CLI is the reference. `coder --help` and every subcommand's `--help` list the flags and exit codes, and each command prints the recommended next step when it returns. Follow it.
|
|
23
23
|
- `coder docs` lists the deeper guides; `coder docs <topic>` prints one.
|
|
24
|
+
- Wait on each task with `coder task result <task-id> --wait` in its own background shell, one per task, never several tasks in one call, so each approval and answer reaches you.
|
|
24
25
|
- If Cursor asks before running `coder` commands, approve or allowlist `coder`; the runtime is a supervisor with its own sandbox and approval policy.
|
|
25
26
|
|
|
26
27
|
## Running tasks
|
package/src/client/index.ts
CHANGED
|
@@ -327,6 +327,12 @@ export class ServerClient<D extends ClientTypes = ClientTypes> {
|
|
|
327
327
|
headers: { accept: 'text/event-stream' },
|
|
328
328
|
signal,
|
|
329
329
|
}),
|
|
330
|
+
/** One stream of the named tasks' changes and every list change in the workspace; `last` resumes after an event id. */
|
|
331
|
+
events: (ids: string[], last?: string, signal?: AbortSignal): Promise<Response> =>
|
|
332
|
+
this.send(queryPath('/admin/events', { tasks: ids }), {
|
|
333
|
+
headers: { accept: 'text/event-stream', ...(last ? { 'last-event-id': last } : {}) },
|
|
334
|
+
signal,
|
|
335
|
+
}),
|
|
330
336
|
cancel: (id: string): Promise<{ ok: true }> =>
|
|
331
337
|
this.post(`/admin/tasks/${encodeURIComponent(id)}/cancel`),
|
|
332
338
|
steer: (id: string, text: string) =>
|
|
@@ -552,7 +558,7 @@ export class ServerClient<D extends ClientTypes = ClientTypes> {
|
|
|
552
558
|
/** Server-Sent Events from a response body, one `{ event, data }` per message. */
|
|
553
559
|
export async function* serverEvents(
|
|
554
560
|
body: ReadableStream<Uint8Array>,
|
|
555
|
-
): AsyncGenerator<{ event: string; data: string }> {
|
|
561
|
+
): AsyncGenerator<{ event: string; data: string; id?: string }> {
|
|
556
562
|
const decoder = new TextDecoder();
|
|
557
563
|
let buffer = '';
|
|
558
564
|
for await (const chunk of body as unknown as AsyncIterable<Uint8Array>) {
|
|
@@ -562,12 +568,14 @@ export async function* serverEvents(
|
|
|
562
568
|
const block = buffer.slice(0, end);
|
|
563
569
|
buffer = buffer.slice(end + 2);
|
|
564
570
|
let event = 'message';
|
|
571
|
+
let id: string | undefined;
|
|
565
572
|
const data: string[] = [];
|
|
566
573
|
for (const line of block.split('\n')) {
|
|
567
574
|
if (line.startsWith('event: ')) event = line.slice(7);
|
|
568
575
|
else if (line.startsWith('data: ')) data.push(line.slice(6));
|
|
576
|
+
else if (line.startsWith('id: ')) id = line.slice(4);
|
|
569
577
|
}
|
|
570
|
-
if (data.length) yield { event, data: data.join('\n') };
|
|
578
|
+
if (data.length || id) yield { event, data: data.join('\n'), ...(id ? { id } : {}) };
|
|
571
579
|
}
|
|
572
580
|
}
|
|
573
581
|
}
|
package/src/client/types.ts
CHANGED
|
@@ -18,6 +18,9 @@ export interface TaskRow {
|
|
|
18
18
|
text?: string;
|
|
19
19
|
thread?: { number?: number };
|
|
20
20
|
};
|
|
21
|
+
/** The agent's engine settings, and what this task ran with over them. */
|
|
22
|
+
definition?: { engine?: string; model?: string; effort?: string };
|
|
23
|
+
usage?: { engine?: string; model?: string; effort?: string };
|
|
21
24
|
};
|
|
22
25
|
status: TaskState;
|
|
23
26
|
statusReason?: string;
|
|
@@ -145,6 +148,21 @@ export interface UsagePage {
|
|
|
145
148
|
summary: UsageAmount & { agents: number };
|
|
146
149
|
}
|
|
147
150
|
|
|
151
|
+
/** One task change on `/admin/events`; `result`, `error` and `answer` come, maybe null, for asked tasks only. */
|
|
152
|
+
export type TaskEvent =
|
|
153
|
+
| (Pick<
|
|
154
|
+
TaskRow,
|
|
155
|
+
'status' | 'approval' | 'archivedAt' | 'createdAt' | 'startedAt' | 'finishedAt'
|
|
156
|
+
> & {
|
|
157
|
+
id: string;
|
|
158
|
+
agent: string;
|
|
159
|
+
result?: TaskRow['result'] | null;
|
|
160
|
+
error?: string | null;
|
|
161
|
+
answer?: unknown[] | null;
|
|
162
|
+
deleted?: never;
|
|
163
|
+
})
|
|
164
|
+
| { id: string; deleted: true };
|
|
165
|
+
|
|
148
166
|
export interface TaskCounts {
|
|
149
167
|
all: number;
|
|
150
168
|
active: number;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { CoderConfig } from './config';
|
|
2
|
+
|
|
3
|
+
/** Built-in config every file and flag merges over; import-free so the shipped dashboard can read it. */
|
|
4
|
+
export const DEFAULT_CONFIG: CoderConfig = {
|
|
5
|
+
// Agents are tried in order; the next one is the fallback when the previous
|
|
6
|
+
// fails to start (missing binary, auth, quota, rate limit).
|
|
7
|
+
chain: ['codex', 'claude'],
|
|
8
|
+
engines: {
|
|
9
|
+
codex: {
|
|
10
|
+
model: 'gpt-6.1-sol',
|
|
11
|
+
effort: 'high',
|
|
12
|
+
permissions: 'auto',
|
|
13
|
+
},
|
|
14
|
+
claude: {
|
|
15
|
+
model: 'opus',
|
|
16
|
+
effort: 'medium',
|
|
17
|
+
permissions: 'auto',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
models: {},
|
|
21
|
+
approvals: {
|
|
22
|
+
escalationTimeoutMs: 120_000,
|
|
23
|
+
allowedNetworkHosts: [],
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** The default task list's groups: failed first, then active, then other stopped, then completed. */
|
|
28
|
+
export const listRank = (status: string) =>
|
|
29
|
+
status === 'failed' ? 0 : status === 'completed' ? 3 : status === 'cancelled' ? 2 : 1;
|
|
30
|
+
|
|
31
|
+
/** A row's place in the task list, which keyset cursors carry. */
|
|
32
|
+
export type ListKey = { rank: number; createdAt: number; id: string };
|
|
33
|
+
|
|
34
|
+
/** The task list order: `listRank` groups, newest start first, ties broken by id. */
|
|
35
|
+
export const byListKey = (a: ListKey, b: ListKey) =>
|
|
36
|
+
a.rank - b.rank || b.createdAt - a.createdAt || (b.id < a.id ? -1 : b.id > a.id ? 1 : 0);
|