@wular/coder 0.4.12 → 0.4.13
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 +1 -1
- package/dist/actions-D12xDiQS.js +4 -0
- package/dist/{adapter-CVd5klMH.js → adapter-Bz0E-DAY.js} +2 -2
- package/dist/{adapter-CU9H4g6c.js → adapter-CsacmMmv.js} +1 -1
- package/dist/adapter-DzpdWewB.js +1 -0
- package/dist/{agent-BA6xr8QY.js → agent-JJStALIx.js} +2 -2
- package/dist/apps-Bnk7F3A2.js +379 -0
- package/dist/args-Dqf5Y1RP.js +1 -0
- package/dist/async-Tj4zKHXR.js +3 -0
- package/dist/{auth-DuXnSNf9.js → auth-BhpnOCbn.js} +1 -1
- package/dist/builtin/coder/agent.json +0 -1
- package/dist/builtin/coder/system.md +1 -1
- package/dist/{chat-CgQdDRhs.js → chat-CSepnsrK.js} +1 -1
- package/dist/cli.js +13 -13
- package/dist/cmd-BHZwhrfa.js +118 -0
- package/dist/connection-BkYTuJjV.js +1 -0
- package/dist/context-zhSlmXOp.js +7 -0
- package/dist/dash/standalone/node_modules/contextjsx/package.json +1 -1
- package/dist/dash/standalone/server/build-index.json +1 -1
- package/dist/dash/standalone/server/manifest.json +1281 -1261
- package/dist/dash/standalone/server/modules-server-server-react-server/src/agent/context/{turn.dac8eb211c500271.js → turn.6bb73458768e222e.js} +4 -16
- package/dist/dash/standalone/server/modules-server-server-react-server/src/client/{index.0de14cb4e30bd70d.js → index.de1f1311bab4252f.js} +12 -6
- package/dist/dash/standalone/server/modules-server-server-react-server/src/core/{defaults.1b615366c56838a1.js → defaults.e972c134a1ae918f.js} +3 -5
- package/dist/dash/standalone/server/modules-server-server-react-server/src/core/task/{log-view.60308a11f7001eb7.js → log-view.ec6391dbf3063330.js} +40 -48
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/api/{load.be791a5eaf328738.js → load.30ed8c28774a1a82.js} +4 -4
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/connect/{page.0fbfdba5254f7ae5.js → page.04762872666a6f0a.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/create/[id]/{page.70913bd4075da914.js → page.118a70787eff1761.js} +23 -3
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/account/{loading.e348ec45e9ed951b.js → loading.fcdfd50c21031895.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/account/{notify.61aab176baeefebd.js → notify.98dfcd316c306258.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/account/{page.815371ed0d5dd4fa.js → page.74c59322f5fe8a2c.js} +4 -4
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/account/{sign-out.1d6af804f9ec043d.js → sign-out.730aa96b086ac996.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/(list)/{agent-menu.2ed0e66d131fc148.js → agent-menu.1be5795272b245c8.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/(list)/{agents-grid.f43bcc1148ce3650.js → agents-grid.2c30ace077893029.js} +6 -6
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/(list)/{connect-apps.f3af8cc8540719d7.js → connect-apps.8a20501ccb244421.js} +3 -3
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/(list)/{loading.fac1132ad9c4248e.js → loading.733f0acc2af5ceda.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/(list)/{page.c6efd5432c1a4a75.js → page.d066b77dd3187026.js} +9 -9
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/{layout.a795379254982121.js → layout.b26006f060cd48f0.js} +9 -9
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/{page.a2cb6d1f1714259a.js → page.4b23e9df21433bd3.js} +9 -9
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/platforms/{loading.4da9e2ba3fea937f.js → loading.e06845585ca67abc.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/platforms/{page.996172c951739b35.js → page.4048048acb374c67.js} +35 -23
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/platforms/{platform-actions.8e7ca54dd1821e98.js → platform-actions.000f2f87a48bfbc6.js} +36 -10
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/settings/{agent-settings-form.aa9e157d141481d7.js → agent-settings-form.ee0bb2dc4d403ec3.js} +8 -8
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/settings/{loading.ad1a4c9b000d269a.js → loading.0e3641f3e4abaa7c.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/settings/{page.44d886e60ae04303.js → page.649b4ba135ded99b.js} +7 -7
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/tasks/{loading.521c9e7b8d77f557.js → loading.195e168e8e41d797.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/tasks/{page.828cfb8112404792.js → page.96f7573208644f40.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/usage/{loading.8f998a9c511e1fb3.js → loading.905293c9aa9afbc9.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/usage/{page.45e18b6dc3019af4.js → page.5f2b8585db8b27ad.js} +4 -4
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/{versions-list.c8d76988c734dda2.js → versions-list.8700f0106f4e8c15.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/edit/{loading.b1367e864b4fb406.js → loading.f94b2f9ab04aaf21.js} +3 -3
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/edit/{page.dd11f2618e08becd.js → page.e898c4b5ef16ecb0.js} +7 -7
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/agent/{agent-pills.f987c12bcbc5c850.js → agent-pills.44e689e546fb042b.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/agent/{agent-toggle.1579dc8acbaacf92.js → agent-toggle.4c67dfbb7d28a416.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/agent/{hero.ad5cc342db794e5d.js → hero.9740a8e2f4b41f28.js} +5 -5
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/editor/{connect-repositories.43b4b28f194ea842.js → connect-repositories.ff8b78a03153239b.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/editor/{editor.776856fe1ed1a642.js → editor.471af698b8060eba.js} +31 -20
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/editor/{import-picker.eafa5b41a2ed571f.js → import-picker.b7b5c89e618e8f89.js} +5 -5
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/new/{loading.ee001af7a96e3972.js → loading.ecb9dfd4d0f9d107.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/new/{page.7d84ef2b178b34d2.js → page.880bdac7fe843635.js} +5 -5
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/{layout.393cf7429eea189e.js → layout.81f7e055829854a3.js} +5 -5
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/operator/operator-apps.09bf294d753ee9d7.js +115 -0
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/operator/{page.980adfb7c5714752.js → page.8f8697b1b6b34ad7.js} +36 -9
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/{page.24a1987405ed7b17.js → page.fe608b8e661aba1d.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/[tab]/{connections-list.21ec9dc73ce68656.js → connections-list.97381888bfdd711b.js} +8 -8
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/[tab]/{credentials-list.683476f62a9ecde7.js → credentials-list.a4d8338c7f6a5702.js} +10 -8
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/[tab]/{credentials.b43dd3d97c536c2a.js → credentials.1443bbed1ff1d441.js} +8 -8
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/[tab]/{engines-list.9e116751bd34e2cc.js → engines-list.d47db60d7dc01ebd.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/[tab]/{list.083f5c665df04b1b.js → list.a5b273558fb7f0f0.js} +4 -4
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/[tab]/{models-list.537f63f8e5dd085d.js → models-list.31d369f1b7ab45da.js} +66 -32
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/[tab]/{page.dfed4ae6ffc74434.js → page.805d0f8a2c5817d6.js} +15 -15
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/[tab]/{runners-list.3afa989490bbe77c.js → runners-list.1e83449aa6593224.js} +6 -6
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/[tab]/{secrets-list.0d175ee815b22cd7.js → secrets-list.17ac06593005b8ba.js} +4 -4
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/{layout.3e8289f888fa444c.js → layout.8c4a2b31b194ba3e.js} +5 -5
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/{page.06feaa5fbb06f1e6.js → page.a77996786278cda0.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/{settings-head.bbc7ced8dd5491eb.js → settings-head.705be0b1129b97af.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/setup/{create-link.ff95e4b6977d0474.js → create-link.19b4c50ef497aca1.js} +3 -3
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/setup/{outcome-dialog.894c73f9abee3ce1.js → outcome-dialog.18cf32fa42247b91.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/setup/{page.f06fda0df59beeb5.js → page.616f0b36bf7925bc.js} +5 -5
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/[id]/{activity.3c79cf14feff12bf.js → activity.a911169a820ba604.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/[id]/{loading.47cbb34ea8d2e33f.js → loading.76f851da5cc5268d.js} +5 -5
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/[id]/{page.abed2a8424ef3da0.js → page.ddb594bb6567ee13.js} +6 -6
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/[id]/task-actions.51fbeac76459433a.js +240 -0
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/[id]/{task-view.dc294bb94b7437e1.js → task-view.3276538e8306fd8a.js} +28 -28
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/{composer-data.309a194fc7fa34be.js → composer-data.05fc39e1a7fd1ab7.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/{composer.5072aacdce127689.js → composer.dbf06b05c5e2eba3.js} +9 -9
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/list/{status.16190fdd5fd7daad.js → status.cb704b48ce86cc7d.js} +6 -3
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/list/{task.0a1b5878dccd3b37.js → task.f089c1c122ed6dd2.js} +17 -4
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/list/{tasks-list.1162926f7498c732.js → tasks-list.5a00d69851dae119.js} +37 -22
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/list/{tasks-section.1d687c986db53a73.js → tasks-section.36e70c93f7d0feee.js} +7 -7
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/{page.d5d8cb5033823c9c.js → page.185b1ba0c803db3f.js} +4 -4
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/usage/{loading.97d277dbab9c15cf.js → loading.a7e0ec01bfa769e3.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/usage/{page.fb21ebe90d49dac1.js → page.d41fea7676e37bfc.js} +4 -4
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/usage/{range-bar.2197d8f43216d104.js → range-bar.69e68c9dae09f238.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/{layout.185dbc99875e208a.js → layout.296d70b95894209f.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/frame/{foreign-link.1f4217895ff1e835.js → foreign-link.8c6adf9c5a6f467c.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/frame/{loading-card.cc76fc9708142525.js → loading-card.1cea8a722c10b998.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/frame/{page-head.85f15db7b648d48c.js → page-head.87b92529dbb53ceb.js} +3 -3
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/frame/{stream.e2915852cf82c86b.js → stream.c32d78562f75db25.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/frame/{task-toasts.0ed8ccaae81b9d53.js → task-toasts.44075fa7e04575e8.js} +5 -5
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/nav/{back.180765bdadf6d602.js → back.d6109e72fbd04b45.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/nav/{org.572ad93c7707ab27.js → org.d3abfd4053b711ce.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/ui/{confirm.c1281f9b12854210.js → confirm.29e198be34578222.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/ui/{filter.3a452a262f040973.js → filter.81bb9a5c60cd1089.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/ui/{modal.25d53e5b41b9c4e5.js → modal.0b69c7fd9db025b9.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/ui/{segmented.a08dc08338d080e9.js → segmented.633abe26ff760e37.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/ui/{sentinel.17cffebfc3103b9f.js → sentinel.0ddf515b8f09ef9f.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/ui/{tabs.66b2e54963f6901b.js → tabs.1600a0b563a5c7dd.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/ui/{toolbar.24036899654de6df.js → toolbar.8b3a460a65edf85a.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/utils/{action.b9a5c37272250e82.js → action.67dd6f8ab1ae067d.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/utils/{client.a3928fa2dcd27b75.js → client.78267fa3d7905d17.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{action-71685b2d5ad9f359.js → action-a76e495fb39a73d3.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{agent-pills-15da36c2cb81991b.js → agent-pills-4d3c6a2aa9eb1522.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{agent-settings-form-6e6a87d6e673daa8.js → agent-settings-form-f7231a66e391f6b6.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{agent-toggle-ca98586e3b4ce9ae.js → agent-toggle-d7d27123f2070f18.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{agents-grid-29c399e46b4e9e2b.js → agents-grid-185ecb3d86c6c447.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{back-fa9d6e37f9828093.js → back-e29cb10f5548ddae.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{combo-86f3e11d1f6f6cee.js → combo-702c94817bf6ac17.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/composer-56ebf36d63400423.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{composer-85e0ec7163ae18b7.js → composer-a686289a79f64bae.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/composer-data-f46a9bc7a14b4f9a.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{confirm-c29a1db0130638d2.js → confirm-a78147b6ecef3847.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{connect-apps-b73490e04ae6398d.js → connect-apps-696726aedab42c96.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{connect-repositories-0de82daaf654b1d3.js → connect-repositories-7770ab805160028d.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/connections-list-07559f145f3e3da3.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{copy-445c11202f136275.js → copy-bdc60bdafe336316.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/create-link-426b0a5871ee41dd.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/credentials-list-f07d090410104148.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{custom-range-a0630599f907b30e.js → custom-range-6618f32ef6cd4e80.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/editor-0860e370cbfc6b03.js +6 -0
- package/dist/dash/standalone/static/assets/chunks/engines-list-31b9bb7885924b05.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{field-b82a0f895266791c.js → field-bb8191aa02d07282.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/instructions-06b63e558f879da5.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{instructions-affaaeff366b1725.js → instructions-2d9fbcbfadac4f40.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/list-2773686bf8df64c7.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/models-list-03611e64b6a07efe.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{notice-57db7a1f05b7308c.js → notice-d14fdac28139c0a8.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/outcome-dialog-d3ba8ef89c59f801.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{outcome-dialog-5cf575a5e6921a5d.js → outcome-dialog-fde11a52c282301d.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/platform-actions-2a71c62b9f7eaef3.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/platform-actions-70600c9943320152.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/runners-list-edf536eb8003eab5.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/secrets-list-e86122f73525ff95.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/segmented-0b6dc6b93c35e0f5.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/shared-init-b281027d465e004f.js +5 -0
- package/dist/dash/standalone/static/assets/chunks/shared-init-c3bd249cf1eca6d1.js +2 -0
- package/dist/dash/standalone/static/assets/chunks/side-toggle-9b3af821cfe4c824.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{tail-b1c46587301ef397.js → tail-f8804b80cf32f8d0.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/task-a37e7c26e82eb77d.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/task-actions-705395565f2d83b8.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/task-view-cb21169f38b56d15.js +6 -0
- package/dist/dash/standalone/static/assets/chunks/tasks-list-d7dccfd7e0623ae0.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{versions-list-21cb854e6a7108a7.js → versions-list-f8f2e71df691efda.js} +1 -1
- package/dist/dash/standalone/static/assets/create-param-id-c2c756f652f2fc30.css +1 -0
- package/dist/dash/standalone/static/assets/{dash-param-org-account-9471bec93c444232.css → dash-param-org-account-702f8a1b213e4026.css} +1 -1
- package/dist/dash/standalone/static/assets/dash-param-org-agents-aad2f9f93c06e9ab.css +1 -0
- package/dist/dash/standalone/static/assets/dash-param-org-agents-new-f9dcbcec36586f2b.css +1 -0
- package/dist/dash/standalone/static/assets/dash-param-org-agents-param-slug-8ff47f5d622c1f9b.css +1 -0
- package/dist/dash/standalone/static/assets/dash-param-org-agents-param-slug-edit-907036d553cfeb36.css +1 -0
- package/dist/dash/standalone/static/assets/dash-param-org-agents-param-slug-platforms-5cc77badad15f00c.css +1 -0
- package/dist/dash/standalone/static/assets/dash-param-org-agents-param-slug-settings-705d7c15868b4fd6.css +1 -0
- package/dist/dash/standalone/static/assets/dash-param-org-agents-param-slug-tasks-04e189c045098772.css +1 -0
- package/dist/dash/standalone/static/assets/dash-param-org-agents-param-slug-usage-76fcd1ce7b3dae71.css +1 -0
- package/dist/dash/standalone/static/assets/{dash-param-org-bcfa3de29341d5ba.css → dash-param-org-eccb6bb9297a53e6.css} +1 -1
- package/dist/dash/standalone/static/assets/dash-param-org-operator-635a121f7a9a95bd.css +1 -0
- package/dist/dash/standalone/static/assets/{dash-param-org-settings-6d6902345d88a687.css → dash-param-org-settings-a3297dc4d9e0c961.css} +1 -1
- package/dist/dash/standalone/static/assets/dash-param-org-settings-param-tab-bcb06f81d9e8268d.css +1 -0
- package/dist/dash/standalone/static/assets/{dash-param-org-setup-173efecd7b990c2e.css → dash-param-org-setup-df4be8b188b9777f.css} +1 -1
- package/dist/dash/standalone/static/assets/dash-param-org-tasks-16f9866a1b4801cd.css +1 -0
- package/dist/dash/standalone/static/assets/dash-param-org-tasks-param-id-02ae551dcd852b57.css +1 -0
- package/dist/dash/standalone/static/assets/dash-param-org-usage-f2175403069aab99.css +1 -0
- package/dist/dash/standalone/static/assets/{global-87e1762113874559.css → global-e1de614478b64717.css} +1 -1
- package/dist/dash/standalone/static/assets/pnext-client-0dc829ba60df5c26.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-14d191f7f1da6602.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-169eaa63783b71fd.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-1e34cfefafa70fac.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-285d61f00a80f40b.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-35b89c3ba23ee845.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-6c42784e005d4b87.js +1 -0
- package/dist/dash/standalone/static/assets/{pnext-client-576c06599e241231.js → pnext-client-6cd93f9bd4cf6ffd.js} +1 -1
- package/dist/dash/standalone/static/assets/pnext-client-7355f473fade532d.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-815c3c297f75efb0.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-87fe73c10a4dc33c.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-98b56a142d441260.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-b4bafe68a40f720b.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-bf61ff39bdc0db48.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-c9fa86c244813f74.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-d2e7a75e16221224.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-d34e774405ea8da8.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-d511822afdb41d1d.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-e113aa2f25ecfe01.js +1 -0
- package/dist/dash/standalone/static/assets/{pnext-client-c2c30dcb6dc31d60.js → pnext-client-eb62f461d0c32266.js} +1 -1
- package/dist/{discover-CPZdprlQ.js → discover-CHfF4cEz.js} +1 -1
- package/dist/{docs-x-l7gjFE.js → docs-KHc0_gFX.js} +1 -1
- package/dist/{drive-Y-ZlgiUW.js → drive-Bwl7Bjme.js} +1 -1
- package/dist/emit-BrkJJPUE.js +11 -0
- package/dist/env-6Y-NNnYD.js +1 -0
- package/dist/errors-DO_IltpP.js +16 -0
- package/dist/exec-BmTa0vcO.js +4 -0
- package/dist/executor-ufWRqhdS.js +11 -0
- package/dist/flow/builtin/review/index.d.ts +1 -1
- package/dist/flow/builtin/review/index.js +3 -3
- package/dist/flow/index.d.ts +1 -1
- package/dist/flow/index.js +1 -1
- package/dist/hook-CIipj9MJ.js +1 -0
- package/dist/http-Cg8PSe-c.js +1 -0
- package/dist/{index-BdkdNI1v.d.ts → index-ChcxzFdB.d.ts} +50 -185
- package/dist/integrations-I7fRDk_l.js +4 -0
- package/dist/lib/broker.js +2 -2
- package/dist/load-BDlEFetB.js +2 -0
- package/dist/local-COlczLwI.js +5 -0
- package/dist/log-view-CfX9lakH.js +4 -0
- package/dist/{maintenance-BfxcatXH.js → maintenance-CKCIWOvn.js} +1 -1
- package/dist/{match-Bq4sDuCy.js → match-CufHAZQH.js} +1 -1
- package/dist/mcp-BkwmRHI9.js +2 -0
- package/dist/mcp-CGU7aoJ-.js +1 -0
- package/dist/{mcp-Bta09QCU.js → mcp-DAHbhfUh.js} +1 -1
- package/dist/models-CzggS7p2.js +1 -0
- package/dist/output-SNqdgh9A.js +17 -0
- package/dist/permission-MWFjKxqX.js +1 -0
- package/dist/{prompt-onpyIyXK.js → prompt-CIx4jwQF.js} +1 -1
- package/dist/refresh-CxsaX5R9.js +1 -0
- package/dist/remote-C9Hj2cby.js +2 -0
- package/dist/remote-HUZCWgfl.js +3 -0
- package/dist/{runner-CTFTuaz_.js → runner-DYysY1-G.js} +1 -1
- package/dist/runner.json +1 -1
- package/dist/runner.tgz +0 -0
- package/dist/runners-CfaGE0nV.js +36 -0
- package/dist/schema.js +1 -1
- package/dist/sdk.d.ts +285 -104
- package/dist/sdk.js +1 -1
- package/dist/serve-DdAdw7Su.js +4 -0
- package/dist/serve-NQykWAKV.js +1 -0
- package/dist/serve-vKNqVaVy.js +12 -0
- package/dist/slack-BtKvW_4v.js +5 -0
- package/dist/task-CFxs0E_J.js +1 -0
- package/dist/task-iuYQ0zAK.js +7 -0
- package/dist/tools-B6ZxcqRi.js +2 -0
- package/dist/{tools-CM4UCsId.js → tools-FVop8XYG.js} +1 -1
- package/dist/tools-search-kjKKolwp.js +1 -0
- package/dist/turn-DQ13lkPF.js +2 -0
- package/dist/types-DPtbvoo3.js +1 -0
- package/dist/types-DmThhjcW.js +1 -0
- package/dist/views-CMHXBMJp.js +3 -0
- package/dist/{wire-JMNPv8f6.js → wire-C9CupY_A.js} +1 -1
- package/dist/worker-BQpx1dPr.js +9 -0
- package/dist/worker-sTJL2eoe.js +1 -0
- package/docs/access.md +33 -0
- package/docs/agents/coder.md +0 -11
- package/docs/agents/index.md +1 -1
- package/docs/cli/agent.md +6 -6
- package/docs/cli/connection.md +5 -5
- package/docs/cli/flow.md +9 -9
- package/docs/cli/index.md +3 -3
- package/docs/cli/model.md +12 -10
- package/docs/cli/runner.md +1 -1
- package/docs/cli/server.md +2 -2
- package/docs/cli/task.md +23 -21
- package/docs/config.md +5 -15
- package/docs/flows.md +1 -1
- package/docs/models.md +7 -6
- package/docs/sdk.md +29 -29
- package/docs/self-host.md +25 -25
- package/package.json +2 -2
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/dist/actions-BT7_eKXm.js +0 -10
- package/dist/adapter-BT8ECcRG.js +0 -1
- package/dist/apps-D-v5sQJk.js +0 -367
- package/dist/args-CbO_Ck9Z.js +0 -11
- package/dist/async-XNO3nqum.js +0 -3
- package/dist/cmd-DX5ByXo3.js +0 -119
- package/dist/connection-DNxi2btM.js +0 -1
- package/dist/context-65bOofts.js +0 -7
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/operator/operator-apps.a244f3199e7cf09c.js +0 -144
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/[id]/task-actions.587da79d68ab8d14.js +0 -151
- package/dist/dash/standalone/static/assets/chunks/composer-910bb87127972f62.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/composer-data-5fed6c271a4791ca.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/connections-list-c50f58b4b28d10bb.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/create-link-6d64a2d5f9ce6de0.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/credentials-list-bee95799b2319b3b.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/defaults-52f30e83d7666f7a.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/editor-b9951819f21b2e43.js +0 -6
- package/dist/dash/standalone/static/assets/chunks/engines-list-2720c3e8fa12b2f7.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/instructions-fd7402ac5aa8b50e.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/list-d918f79562d497eb.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/models-list-12bc7aceaa52f5b0.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/outcome-dialog-b219595be320108a.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/platform-actions-1d27d2ba7eee9ff1.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/platform-actions-dba96dcb0f6513db.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/runners-list-36f8c5ecfcf8e9ae.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/secrets-list-d7dbafd24dd18481.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/segmented-8f809ebe712e92a7.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/shared-init-cc13a835f3508618.js +0 -2
- package/dist/dash/standalone/static/assets/chunks/shared-init-f475017dd5811e33.js +0 -5
- package/dist/dash/standalone/static/assets/chunks/side-toggle-0aa237eba3dfe9c1.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/task-681061023bdf0a49.js +0 -5
- package/dist/dash/standalone/static/assets/chunks/task-actions-c9e46e81604e85c5.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/task-view-134186a544917ceb.js +0 -5
- package/dist/dash/standalone/static/assets/chunks/tasks-list-352a3222d878de0f.js +0 -1
- package/dist/dash/standalone/static/assets/create-param-id-da3f7e20689fe51a.css +0 -1
- package/dist/dash/standalone/static/assets/dash-param-org-agents-64500e78caae32df.css +0 -1
- package/dist/dash/standalone/static/assets/dash-param-org-agents-new-c067c22928a2d7cc.css +0 -1
- package/dist/dash/standalone/static/assets/dash-param-org-agents-param-slug-9dec87710e04f949.css +0 -1
- package/dist/dash/standalone/static/assets/dash-param-org-agents-param-slug-edit-779c474301e04440.css +0 -1
- package/dist/dash/standalone/static/assets/dash-param-org-agents-param-slug-platforms-c7d594b5232630c2.css +0 -1
- package/dist/dash/standalone/static/assets/dash-param-org-agents-param-slug-settings-a80e62570716fdb9.css +0 -1
- package/dist/dash/standalone/static/assets/dash-param-org-agents-param-slug-tasks-ce278252012297b9.css +0 -1
- package/dist/dash/standalone/static/assets/dash-param-org-agents-param-slug-usage-d3b6d701eb8e1403.css +0 -1
- package/dist/dash/standalone/static/assets/dash-param-org-operator-b7bc6447cc27c9ce.css +0 -1
- package/dist/dash/standalone/static/assets/dash-param-org-settings-param-tab-85c7af9a89eef06e.css +0 -1
- package/dist/dash/standalone/static/assets/dash-param-org-tasks-ae0bc03f468e63cc.css +0 -1
- package/dist/dash/standalone/static/assets/dash-param-org-tasks-param-id-7325d8cff5be3592.css +0 -1
- package/dist/dash/standalone/static/assets/dash-param-org-usage-517b2a7ae462ac57.css +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-05df74b071ddb0b3.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-2c19cca257f78ae6.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-2db05dfa62642a65.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-36b0d6085a073880.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-6aa0f19a30d58d63.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-6b30b71f452f2f07.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-6ccb4d4fff812db3.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-74eb465defba421e.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-8c692d12b2fd90d6.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-92e17d39063a9ced.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-93246aea268c2682.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-9954dcbc0c579e0d.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-c0dfa1cdde9a9855.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-c28d38d4aafd4af6.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-dbf741073e11eac0.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-e29194a27280333f.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-f8a7e692b27caad9.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-fc5b8cfcba2a9f63.js +0 -1
- package/dist/env-B9JG6gwo.js +0 -1
- package/dist/errors-XBA-Ls4n.js +0 -10
- package/dist/exec-iFssTO5V.js +0 -3
- package/dist/executor-Dt2FFT-y.js +0 -11
- package/dist/http-BZfjbiov.js +0 -1
- package/dist/integrations-DyInAa5g.js +0 -2
- package/dist/load-zhcrwSRF.js +0 -2
- package/dist/local-D55UkW93.js +0 -5
- package/dist/log-view-CL3_S0IQ.js +0 -3
- package/dist/mcp-CUITALl1.js +0 -1
- package/dist/models-C1O2DrXx.js +0 -1
- package/dist/output-D95NoAA9.js +0 -16
- package/dist/prompts-B8pKhMcu.js +0 -4
- package/dist/refresh-D-0K9fo3.js +0 -1
- package/dist/remote-CDm0YUU3.js +0 -3
- package/dist/runners-CYTicTb7.js +0 -36
- package/dist/serve-Bzs_lEg-.js +0 -1
- package/dist/serve-CWtLyyTz.js +0 -12
- package/dist/serve-DE6A-rBk.js +0 -4
- package/dist/slack-Bo5l13Rs.js +0 -5
- package/dist/task-BU1JEK9X.js +0 -7
- package/dist/task-CPzBITsp.js +0 -1
- package/dist/tools-BMaKWTa6.js +0 -1
- package/dist/turn-DMvPfhb5.js +0 -3
- package/dist/types-D_xnfP7m.js +0 -1
- package/dist/views-DEdKqLm_.js +0 -5
- package/dist/worker-BuP_Lem1.js +0 -9
- package/dist/worker-C1tuzq5n.js +0 -1
- /package/dist/dash/standalone/server/modules-server-server-react-server/src/core/{errors.0a735590a5412ea6.js → errors.1bd0542d832ae0c0.js} +0 -0
- /package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/platforms/{page.c811938ae8a8f1df.css.pnext-asset.js → page.107e622830bff31d.css.pnext-asset.js} +0 -0
- /package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/agent/{hero.1bef5dca89b5942c.css.pnext-asset.js → hero.243d85cac1f22df2.css.pnext-asset.js} +0 -0
- /package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/editor/{editor.c496247a81ed832c.css.pnext-asset.js → editor.1eb1bce282b289c9.css.pnext-asset.js} +0 -0
- /package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/{model-options.a96c11d11674f598.js → model-options.73f8d0d54f79d8e3.js} +0 -0
- /package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/[id]/{task-view.57990cfd2bdf5c11.css.pnext-asset.js → task-view.42337a0d7c6ad0b6.css.pnext-asset.js} +0 -0
- /package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/list/{tasks-list.abbbc9ace4d866e5.css.pnext-asset.js → tasks-list.2f90c4410f843fff.css.pnext-asset.js} +0 -0
- /package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/{globals.c8fd2b8b01e7077b.css.pnext-asset.js → globals.f8ac779f0ebf888b.css.pnext-asset.js} +0 -0
- /package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/frame/{page-head.364ec93a8e7857b3.css.pnext-asset.js → page-head.9fcc49ddf7119d75.css.pnext-asset.js} +0 -0
- /package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/ui/{modal.9db07d368dcf5981.css.pnext-asset.js → modal.a533234c7c831be4.css.pnext-asset.js} +0 -0
- /package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/ui/{segmented.0bd8652fdbc05eb0.css.pnext-asset.js → segmented.c6f30b839fd27f35.css.pnext-asset.js} +0 -0
- /package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/ui/{sentinel.1e3ec9bd6008d811.css.pnext-asset.js → sentinel.d17e2bfcbeb9df31.css.pnext-asset.js} +0 -0
- /package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/comps/ui/{tabs.ca13e40ff54128d0.css.pnext-asset.js → tabs.025b532d6cc51736.css.pnext-asset.js} +0 -0
package/dist/args-CbO_Ck9Z.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{Gt as e,Zt as t,kn as n}from"./core-DwsAMCnL.js";import{$t as r,An as i,Xt as a,Zt as o,cn as s,en as c,gn as l,in as u,mn as d,rn as f}from"./errors-XBA-Ls4n.js";import"node:path";import{readFileSync as p}from"node:fs";function m(e){let t=[],n=[],r=[...e.skills??[]],i=(e,n=[])=>{for(let r of n){let n=[...e,r.name];t.push({path:n,id:n.join(`/`),command:r})}},a=(e,t=[])=>{for(let o of t){let t=[...e,o.name];n.push({path:t,namespace:o}),i(t,o.commands),r.push(...o.skills??[]),a(t,o.namespaces)}};return i([],e.commands),a([],e.namespaces),{commands:t,namespaces:n,skills:r}}function h(e){if(e.file===void 0)return{...e,text:i(e.body)};let t=p(e.file,`utf8`),n=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*(\r?\n|$)/.exec(t),r={},a=(n?.[1]??``).split(/\r?\n/);for(let e=0;e<a.length;e++){let[,t,n=``]=/^([\w-]+):\s*(.*?)\s*$/.exec(a[e])??[];if(!t)continue;let i=/^[|>][+-]?$/.test(n),o=[];for(;i&&/^(\s|$)/.test(a[e+1]??`end`);)o.push(a[++e].trim());if(i){let e=o.join(`
|
|
2
|
-
`);r[t]=(n[0]===`|`?e:e.replace(/([^\n])\n(?=[^\n])/g,`$1 `).replace(/\n(\n+)/g,`$1`)).trim()}else r[t]=/^".*"$/.test(n)?JSON.parse(n):/^'.*'$/.test(n)?n.slice(1,-1).replaceAll(`''`,`'`):n}let o=e.name??r.name,s=e.description??r.description;if(!o||!s)throw Error(`contextjsx: skill file ${String(e.file)} needs a name and a description`);return{...e,name:o,description:s,text:t.slice(n?.[0].length??0).trim()}}function g(e){let t=globalThis.__zod_globalRegistry,n=Object.entries(e.args??{}),r=e.cli?.positional??[];return[...r.flatMap(e=>n.filter(([t])=>t===e)),...n.filter(([e])=>!r.includes(e))].map(([e,n])=>{let i=C(n)===`boolean`?S(n).defaultValue===!0?`--no-${e}`:`--${e}`:`--${e} <${e}>`,a=r.includes(e)?`<${e}>`:i,o=r.includes(e)?e:i;return{token:n._zod.optin?`[${o}]`:a,plain:a,description:t?.get(n)?.description??``}})}const _=(e,t)=>[...e,...g(t).map(e=>e.token)].join(` `),v=e=>{let t=Math.max(...e.map(([e])=>e.length));return e.map(([e,n])=>n?` ${e.padEnd(t)} ${n}`:` ${e}`).join(`
|
|
3
|
-
`)};function y(e){let t=(e,t=[],n=[])=>{let r=t.filter(e=>e.mcp!==!1).map(e=>e.name);return[r.length&&`${e}tools: ${r.join(` `)}`,n.length&&`${e}skills: ${n.map(e=>e.name??h(e).name).join(` `)}`]},n=[`${e.name}: ${e.description}`,...t(` `,e.commands,e.skills),...m(e).namespaces.flatMap(({path:e,namespace:n})=>{let r=` `.repeat(e.length);return[`${r}${n.name}: ${n.description}`,...t(`${r} `,n.commands,n.skills)]})].filter(Boolean).join(`
|
|
4
|
-
`);return[i(e.instructions),n].filter(Boolean).join(`
|
|
5
|
-
|
|
6
|
-
`)}function b(e,t){let{commands:n,namespaces:r}=m(e);if(!t||`commands`in t){let n=t?r.find(e=>e.namespace===t)?.path??[t.name]:[],{description:a,commands:o=[],namespaces:s=[]}=t??e,c=[...o.map(e=>[`${_([...n,e.name],e)}: ${e.description}`,``]),...s.map(e=>[`${[...n,e.name].join(` `)}: ${e.description}`,``])];return[n.join(` `)||e.name,a,i(t?.usage),c.length&&`Commands:\n${v(c)}`].filter(Boolean).join(`
|
|
7
|
-
|
|
8
|
-
`)}let a=n.find(e=>e.command===t)?.path??[t.name],o=g(t),{cli:s}=t;return[_(a,t),t.description,i(t.usage),o.length&&`Arguments:\n${v(o.map(e=>[e.plain,e.description]))}`,t.access===`read`&&`Read-only.`,s?.exit?.length&&`Exit codes:\n${v(s.exit.map(([e,t])=>[String(e),t]))}`,s?.env?.length&&`Environment:\n${v(s.env)}`,s?.examples?.length&&`Examples:\n${s.examples.map(e=>` ${e}`).join(`
|
|
9
|
-
`)}`].filter(Boolean).join(`
|
|
10
|
-
|
|
11
|
-
`)}var x=class extends Error{arg;constructor(e,t){super(e),this.name=`ParseError`,this.arg=t}};const S=e=>e._zod.def;function C(e){let t=S(e);for(;t.innerType??t.in;)t=S(t.innerType??t.in);return t.type===`union`&&t.options?.some(e=>S(e).values?.includes(!0))?`maybe`:t.type}function w(e,t){let n=e.args??{},r=e.cli?.positional??[],i={},a=[],o=e=>Object.hasOwn(n,e)?n[e]:void 0;for(let e=0;e<t.length;e++){let n=t[e];if(n===`--`){a.push(...t.slice(e+1));break}if(!n.startsWith(`-`)||n===`-`){a.push(n);continue}let s=n.startsWith(`--`)?`--`:`-`,c=n.slice(s.length),l=c.indexOf(`=`),u=l<0?c:c.slice(0,l),d=u.slice(3),f=o(d);if(s===`--`&&l<0&&u.startsWith(`no-`)&&!o(u)&&!r.includes(d)&&f&&C(f)===`boolean`){i[d]=!1;continue}let p=r.includes(u)?void 0:o(u);if(!p)throw new x(`Unknown option ${s}${u} (use -- to pass literal text starting with -)`,u);let m=C(p),h=l<0?void 0:c.slice(l+1);if(m===`boolean`){if(h!==void 0&&h!==`true`&&h!==`false`)throw new x(`Invalid ${s}${u} value ${JSON.stringify(h)}: expected true or false`,u);i[u]=h!==`false`}else{if(h===void 0){let n=t[e+1],r=n!==void 0&&n.startsWith(`-`)&&n!==`-`&&!/^-\d/.test(n);if(m===`maybe`&&(n===void 0||r)){i[u]=!0;continue}if(n===void 0||r)throw new x(`Missing value for ${s}${u}`,u);h=n,e++}i[u]=m===`array`?[...i[u]??[],h]:h}}let s=r.at(-1),c=s!==void 0&&C(n[s])===`array`;if(!c&&a.length>r.length){let e=a.slice(r.length);throw new x(`Unexpected argument${e.length>1?`s`:``}: ${e.join(` `)}`,e[0])}r.forEach((e,t)=>{t>=a.length||(i[e]=c&&e===s?a.slice(t):a[t])});let l=r.find((e,t)=>t>=a.length&&!n[e]?._zod.optin);if(l)throw new x(`Missing ${l}.`,l);let u={};for(let[e,t]of Object.entries(n)){let n=r.includes(e)?e:`--${e}`,a=t[`~standard`].validate(i[e]);if(a instanceof Promise)throw new x(`${n} has an async schema`,e);if(a.issues)throw new x(i[e]===void 0?`Missing required ${n}.`:`Invalid ${n} value ${JSON.stringify(i[e])}: ${a.issues[0]?.message}`,e);a.value!==void 0&&(u[e]=a.value)}return u}function T(e,t){let{commands:n,namespaces:r}=m(e),i,a=0,o=(e,n)=>{e.length<=a||!e.every((e,n)=>t[n]===e)||(a=e.length,i={...n,rest:t.slice(e.length)})};for(let{path:e,command:t}of n)o(e,{command:t,path:e});for(let{path:e,namespace:t}of r){for(let[n,r]of Object.entries(t.aliases??{}))for(let i of t.commands)i.name===r&&o([...e,n],{command:i,path:[...e,r]});o(e,{namespace:t,path:e})}return i}function E(e,t=``,r){return n.add(e,{description:t,...r?{value:r}:{}}),e}const D=e=>E(s(c()),e),O=(e,t)=>E(s(d()),e,t),k=(e,t)=>E(s(r(d())),e,t),A=(e,t)=>E(s(l([d(),u(!0)])),e,t),j=e=>E(o(s(l([d(),u(!0)])),!0),e,`[url]`),M=e=>E(s(l([u(`all`),a().check(f(),t())],{error:`expected a positive integer or "all"`})),e,`<n|all>`),N=t=>E(s(l([u(`all`),a().check(f(),e())],{error:`expected a number or "all"`})),t,`<n|all>`),P={server:A(`act on your Coder server`,`[url]`),workspace:O(`with --server: the workspace to act in (default: the saved one)`,`<slug>`),yes:D(`with --server: connect to a server used for the first time without asking`)},F={server:j(`act on your Coder server, in the saved workspace`),yes:D(`connect to a server used for the first time without asking`)};export{A as a,k as c,b as d,x as f,y as g,h,M as i,N as l,w as m,F as n,P as o,T as p,D as r,O as s,E as t,m as u};
|
package/dist/async-XNO3nqum.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{qi as e}from"./core-DwsAMCnL.js";import{En as t,O as n,Sn as r,Tn as i,U as a}from"./errors-XBA-Ls4n.js";import{C as o}from"./output-D95NoAA9.js";import{a as s,s as c}from"./actions-BT7_eKXm.js";import{C as l,b as u,i as d,r as f,s as p,t as m,w as h}from"./executor-Dt2FFT-y.js";import g from"node:path";import _ from"node:process";var v=e({driveAsyncTool:()=>T,pendingCall:()=>C,startAsyncTool:()=>w,taskFlow:()=>S});const y=e=>g.join(e,`async.json`),b=e=>r(y(e))??[];function x(e,n){return i(`${y(e)}.lock`,()=>{let r=b(e),i=n(r);return t(y(e),r),i})}const S=e=>e.flowRunId?h(e.flowRunId)?.name:void 0;function C(e,t){return b(e).find(e=>(!t||e.tool===t)&&!e.delivered&&(l(e.runId)?.status===`running`||e.pid!==void 0&&f(e.pid)))?.runId}async function w(e,t,n,i){let a=r(g.join(e,`job.json`));if(!a)throw Error(`This task has no record`);if(S(a)===t.flow)throw Error(`A ${t.name} task cannot start a ${t.name}`);if(i!==void 0&&!(i>0))throw Error(`timeout must be a positive number of seconds`);let s=a.cwd??_.cwd();return x(e,r=>{let c=C(e,t.name);if(c)throw Error(`${E(t.name)} ${c} is still running; its result arrives as a message.`);if(r.filter(e=>e.tool===t.name).length>=t.limit)throw Error(`This task has used all ${t.limit} of its ${t.name}s.`);let l=d(t.flow,{cwd:s,args:t.args(n,s)});r.push({tool:t.name,runId:l.runId});let{[o]:f,...p}=_.env;return u(l,s,{env:p,drive:[`--task`,a.id,`--tool`,t.name,...i?[`--timeout`,String(i)]:[]]}),l.runId})}async function T(e,t,r,i,o){let l=a(r,i),u=e=>x(l,n=>{let r=n.find(e=>e.runId===t);r&&Object.assign(r,e)}),d=E(e.name),f,g,v=()=>{},y=new Promise(e=>{o&&(g=setTimeout(()=>e(`timeout`),o*1e3)),v=()=>e(`stopped`),_.once(`SIGINT`,v),_.once(`SIGTERM`,v)}),S;try{await u({pid:_.pid});let n=h(t);if(!n)throw Error(`No flow run "${t}".`);let i=await Promise.race([m(n,r,{onStart:e=>f=e}),y]);typeof i==`string`?(await p(t,f?.runningIds()),f?.requestStop(),S=i===`timeout`?`${d} timed out after ${o}s and was stopped`:`${d} was stopped`):S=`${d} finished\n\n${e.render(i.result,t)}`}catch(e){S=`${d} ${t} failed: ${e instanceof Error?e.message:String(e)}`}finally{clearTimeout(g),_.off(`SIGINT`,v),_.off(`SIGTERM`,v)}let C=n(r,i);if(!C)throw Error(`No task "${i}" to send ${e.name} ${t} to.`);let w=e.limit-b(l).filter(t=>t.tool===e.name).length,[T,...D]=S.split(`
|
|
2
|
-
`),O=[`${T} (task ${e.name}s left ${w}/${e.limit}).`,...D].join(`
|
|
3
|
-
`);await c(C.cwd??r,C,O,(C.connectionSource??(C.connections?`server`:void 0))===`server`?{resolveConnections:s(C.mcp)}:{}),await u({delivered:!0})}const E=e=>e[0].toUpperCase()+e.slice(1);export{S as i,C as n,w as r,v as t};
|
package/dist/cmd-DX5ByXo3.js
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import{Gt as e,Zt as t}from"./core-DwsAMCnL.js";import{P as n,Qt as r,U as i,Xt as a,_ as o,b as s,cn as c,et as l,fn as u,gn as d,in as f,it as p,kn as ee,l as m,mn as h,rn as g,rt as te,tn as _,wn as ne,yn as re}from"./errors-XBA-Ls4n.js";import{a as ie,c as v,i as ae,l as y,n as b,o as x,r as S,s as C,t as w}from"./args-CbO_Ck9Z.js";import{Mt as oe,S as se,Zt as T,_ as ce,_t as le,a as E,b as ue,c as de,d as fe,f as D,g as O,h as pe,l as me,m as k,n as A,o as he,p as j,r as M,t as N,u as P,v as ge,x as _e,y as F}from"./output-D95NoAA9.js";import{a as ve,i as ye,m as be,n as xe,o as Se,r as Ce}from"./prompt-onpyIyXK.js";import{MODEL_HINT as we,command as I,group as L,nextSteps as R,t as Te}from"./cli.js";import{n as Ee,t as De}from"./base64url-CsVsW4Id.js";import z from"node:path";import B from"node:process";import Oe from"node:fs";import ke from"node:os";function Ae(e){let t=j;B.stdout.write(O([{header:`id`,value:e=>e.id,paint:e=>t.cyan(e)},{header:`description`,value:e=>e.description},{header:`events`,value:e=>e.events.join(`, `)},{header:`tools`,value:e=>e.tools.join(`, `)}],e,{style:t,border:!0}))}const je=I({name:`list`,description:`list integrations with their events and tools`,usage:"One row per integration: its id, the events an agent can wire, and every tool it offers; `show` splits the tools by preset.",access:`read`,globalFlags:{cwd:!1},run:async()=>{let{agents:e}=await import(`./agent-BA6xr8QY.js`).then(e=>e.t);return e.integrations.list()},next:()=>R([`Event descriptions and the tools each preset allows: coder agent integrations show <id>`]),print:Ae});function Me(e){let t=j,n=[...Object.entries(e.events).map(([e,t])=>({kind:`event`,name:e,does:t})),...Object.entries(e.tools).map(([e])=>({kind:`tools`,name:e===`read`?`Read-only`:`Read-write`,does:e===`read`?`Platform tools marked read-only`:`All platform tools`}))];B.stdout.write(O([{header:`kind`,value:e=>e.kind,paint:e=>t.light(e)},{header:`name`,value:e=>e.name},{header:`does`,value:e=>e.does}],n,t))}const Ne=I({name:`show`,description:`events and tools of one integration`,usage:`Describe one integration: each event with what triggers it, and the tools each preset (read, write) allows.`,access:`read`,args:{id:C(`the integration`)},globalFlags:{cwd:!1},cli:{positional:[`id`],examples:[`coder agent integrations show github # the GitHub integration in full`]},run:async({args:[e]})=>{let{agents:t}=await import(`./agent-BA6xr8QY.js`).then(e=>e.t);return t.integrations.show(e)},print:Me}),Pe=L({name:`integrations`,description:`the integration catalog: events and tool presets`,usage:`The platforms an agent can listen to and act on: their events and tool presets.`,commands:[je,Ne],aliases:{ls:`list`}}),Fe={read:`Read-only`,write:`Read-write`};function Ie(e,t){let n=j;B.stdout.write(`Created ${n.cyan(t)}.\n`)}function Le(e,t){let{id:n,samples:r,integrations:i}=e,a=z.relative(t,e.dir),o=R(i.length?[`1. Write ${a}/system.md. Try it with no server: coder task run --agent ${n} "<task>"`,`2. Run it on a server: coder dash on this machine reads it from this repo; a cloud server imports it from the dashboard or with coder agent push.`,`3. On the dashboard, create the agent's app on each platform it uses (${i.join(`, `)}) from its Platforms tab, and install it.`,`4. Fire an event by hand, or leave --server out to run it offline: coder agent run ${n} ${r[0]??`<event.json>`} --server <url>`,`Guide: https://github.com/muzam1l/coder/blob/main/docs/agents/index.md`,`Agents: coder docs agents`]:[`1. Write ${a}/system.md. Try it with no server: coder task run --agent ${n} "<task>"`,`2. Give the agent a platform under "integrations" in ${a}/agent.json, then run init again or follow the guide: coder agent integrations list`,`Guide: https://github.com/muzam1l/coder/blob/main/docs/agents/index.md`,`Agents: coder docs agents`]);return i.length&&(o[1].usage=`coder dash`),o}async function Re(e){let{regexError:t}=await import(`./agent-BA6xr8QY.js`).then(e=>e.t),{INTEGRATIONS:n}=await import(`./integrations-DyInAa5g.js`).then(e=>e.r),{PRESETS:r}=await import(`./types-D_xnfP7m.js`).then(e=>e.n),i=j;B.stdout.write(`Creating ${i.cyan(`.coder/agents/${e}`)}. Pick what the agent listens to and what it may do; flags skip these questions.\n\n`);let a=await ve({title:`Integrations`,hint:`Platforms the agent listens to and acts on. Add or remove them later in agent.json.`,multi:!0,selected:[Object.keys(n)[0]],options:Object.values(n).map(e=>({value:e.id,hint:e.description}))}),o={},s={};for(let e of a){let r=n[e],i=Object.keys(r.events),a=await Se({title:`${e} events`,hint:`What wakes the agent on ${e}; each event runs the agent with that event as its prompt.`,multi:!0,required:!0,selected:i.filter(e=>!r.events[e].noisy),options:Object.entries(r.events).map(([e,n])=>({value:e,hint:n.description,...n.noisy?{input:{label:`match`,value:`^help\\b`,placeholder:`tab to add a match`,validate:t}}:{}}))});o[e]=a.values,s[e]=a.inputs}let[c]=await ve({title:`Access`,hint:`What the agent may do on its platforms and connections; Read-write allows every tool.`,selected:[`write`],options:r.map(e=>({value:e,label:Fe[e]}))}),l=await xe(`Display name`,e,void 0,`Shown in replies and app names.`);return{...l===e?{}:{name:l},integrations:a,events:o,matches:s,access:c}}const ze=I({name:`init`,description:`scaffold an agent folder in .coder/agents`,usage:"Create .coder/agents/<id>/ with an agent.json built from the integration catalog, a system.md to write the prompt in, and one sample event per integration for `coder agent run`. Asks for the id, integrations, events, and access when run in a terminal without them.",access:`write`,args:{id:C(`the agent id: its folder under .coder/agents`),integrations:C(`platforms the agent listens to (see coder agent integrations list)`,`<a,b>`),events:C(`events that start tasks, applied to each integration that has them (default: mention)`,`<a,b>`),access:C(`read or write, on its platforms and connections (default: write)`,`<mode>`),name:C(`display name used in replies (default: the id)`,`<text>`),description:C(`one line for agent list`,`<text>`),permissions:C(`engine permission mode (default: auto)`,`<mode>`),match:C(`start tasks only for event text matching a regex, as event=regex pairs`,`<a=re,b=re>`),yes:S(`skip the questions and take the defaults`)},cli:{positional:[`id`],examples:[`coder agent init # answer the questions, id included`,`coder agent init triage --integrations github --events issue,mention --access read # no questions`]},run:async({options:e,args:[t],cwd:n,tool:r})=>{let{agents:i}=await import(`./agent-BA6xr8QY.js`).then(e=>e.t),a=!r&&Ce()&&!e.yes;return i.init(t,{...e,cwd:n,permissions:e.permissions,...a?{askId:e=>xe(`Agent id`,``,e,`Folder name under .coder/agents and the name used in commands.`)}:{},...a&&!e.integrations?{askPicks:Re}:{}})},json:(e,{cwd:t})=>({id:e.id,dir:z.relative(t,e.dir),files:e.files,samples:e.samples}),next:({result:e,args:t})=>Le(e,t.cwd?z.resolve(t.cwd):B.cwd()),print:(e,{cwd:t})=>Ie(e,z.relative(t,e.dir))}),Be=e=>`builtin`in e,Ve=e=>e.map(e=>Be(e)?{id:e.id,name:e.name,source:e.builtin?`builtin`:`repo`,description:e.definition.description??null}:{id:e.id,name:e.name,source:e.source,version:e.currentVersion,description:e.description??null});function He(e,t){if(!e.length)return void B.stdout.write(`No agents configured.
|
|
2
|
-
`);let n=j;B.stdout.write(O([{header:`id`,value:e=>e.id,paint:e=>n.cyan(e)},{header:`name`,value:e=>e.name},{header:`source`,value:e=>e.source,paint:e=>n.light(e)},...t?[{header:`version`,value:e=>String(e.version)}]:[],{header:`description`,value:e=>e.description??`-`}],e,n))}const Ue=I({name:`list`,description:`list local or server-owned agents`,usage:`Without --server, one row per built-in and workspace agent. With --server, list the agent records and current versions owned by that Coder server.`,access:`read`,args:x,run:async({options:e,cwd:t})=>{let{agents:n}=await import(`./agent-BA6xr8QY.js`).then(e=>e.t);return n.list({...e,cwd:t,organization:e.workspace})},json:e=>Ve(e),next:({result:e,args:t})=>t.server!==void 0||!e.length?[]:R([`An agent's settings, events, and tools: coder agent show <id>`,`Scaffold a new agent in this repo: coder agent init <id>`]),print:(e,{options:t})=>He(Ve(e),t.server!==void 0)}),We=I({name:`push`,description:`upload workspace agents to a Coder server`,usage:`Upload one workspace agent, or every agent in .coder/agents when no id is given. The server creates a new immutable version only when its definition, prompt, or files changed.`,access:`write`,args:{id:C(`the agent (default: every workspace agent)`),...x},cli:{positional:[`id`],examples:[`coder agent push helper # upload helper`]},run:async({options:e,args:[t],cwd:n})=>{let{agents:r}=await import(`./agent-BA6xr8QY.js`).then(e=>e.t);return r.push(t,{...e,cwd:n,organization:e.workspace})},print:e=>{for(let t of e){B.stdout.write(t.unchanged?`Pushed ${j.bold(t.id)} unchanged (version ${t.version})\n`:`Pushed ${j.bold(t.id)} as version ${t.version}\n`);for(let e of t.apps??[])e.error?B.stderr.write(`${e.error}\n`):e.drift&&B.stderr.write(`${e.name} needs changes on ${e.integration}; see Update on the agent's Platforms tab.\n`)}}});function V(e,t,n,r=j){let i=e?.error?.message??t;return e?.finalMessage||(i?`${r.red(`error:`)} ${i}`:n)}const Ge=1e3;function Ke(e,t=j,{truncate:n=!0}={}){let r=e=>e.split(`
|
|
3
|
-
`).map(e=>` ${t.dim(e)}`);return!n||e.length<=Ge?[t.dim(`prompt:`),...r(e)]:[t.dim(`prompt:`),...r(e.slice(0,500).trimEnd()),t.light(` … <${e.length-Ge} chars trimmed> …`),...r(e.slice(-500).trimStart())]}function qe(e,t=j){let n=[];e.permissions&&n.push([`perms`,e.permissions]),e.cwd&&n.push([`cwd`,e.cwd]);for(let t of e.addDirs??[])n.push([`add-dir`,t]);return n.map(([e,n])=>`${t.dim(e.padEnd(8))} ${n}`)}function Je(e){return e.createdAt&&e.completedAt?Date.parse(e.completedAt)-Date.parse(e.createdAt):null}function Ye(e,t){if(t)return e.createdAt?`started ${E(m(e.createdAt))} ago`:``;let n=Je(e);return[e.completedAt?`finished ${E(m(e.completedAt))} ago`:``,n!==null&&n>=0?`took ${E(n)}`:``].filter(Boolean).join(` · `)}function Xe(e,{status:t,tokens:n,tokenModel:r,live:i=!1,style:a=j}){let o=Ye(e,l.includes(e.status)||t===`waiting-approval`),c=e=>a.dim(e.padEnd(8));return[`${c(`task`)} ${a.cyan(e.id)}`,...e.name?[`${c(`name`)} ${e.name}`]:[],`${c(`status`)} ${k(t)}${o?` ${a.dim(`(${o})`)}`:``}`,`${c(`engine`)} ${s(e)}`,...qe(e,a),...n?[`${c(`tokens`)} ${i?fe(n):P(n,r??e.model)}${i?a.dim(` (so far)`):``}`]:[]]}function Ze(e,{tokens:t,tokenModel:n,statusChanged:r=!0,style:i=j}){let a=e=>i.dim(e.padEnd(8)),o=Je(e);return[...r?[`${a(`status`)} ${k(e.status)}${o!==null&&o>=0?` ${i.dim(`(took ${E(o)})`)}`:``}`]:[],...t?[`${a(`tokens`)} ${P(t,n??e.model)}`]:[]]}function H(e,t=300,{plain:n=!1,style:r=j}={}){if(e.length<=t)return e;let i=`<${e.length-t} more chars>`;return`${e.slice(0,t)} ${n?i:r.dim(i)}`}const Qe=` `.repeat(8),$e={assistant:`●`,reasoning:`✻`,tool:`→`,"tool-result":` `,usage:`·`,status:`·`,info:`·`,error:`✘`,steer:`⚑`};function et(e,t){let n=/^\x1b\[[0-9;]*m/.exec(t(``))?.[0];return t(n&&e.includes(tt)?e.split(tt).join(`${tt}${n}`):e)}const tt=`\x1B[0m`;function U(e,t,n,r,i=r.dim){if(!e)return``;let a=(e.length>t?e.slice(0,t):e).split(`
|
|
4
|
-
`).map(e=>et(e,i));return e.length>t&&(a[a.length-1]+=` ${r.light(`<${e.length-t} more chars>`)}`),a.length>n?[...a.slice(0,n),r.light(`… +${a.length-n} more lines`)].join(`
|
|
5
|
-
`):a.join(`
|
|
6
|
-
`)}var W=class e{opts;presentation;separated=!1;entryAt=null;lastTool;lastCall=``;lastCallSeq=-1;seq=0;view;style;static async create(t={}){return new e(t,await import(`./log-view-CL3_S0IQ.js`).then(e=>e.r))}constructor(e,t){this.opts=e,this.presentation=t,this.view=new t.LogView(e.cwd,{keepAnsi:!0}),this.style=e.style??j}get lastAssistantMessage(){return this.view.lastAssistantMessage}render(e){let t=Date.parse(String(e.at??``));this.entryAt=Number.isFinite(t)?t:null;let n=this.seq++,[r]=this.view.reduce({seq:n,at:t,level:`out`,line:``,entry:e});if(!r)return[];this.separated=r.separated&&r.seq===n;let i=this.style,a=r.sourceKind,o=r.title,s=this.opts.trim??500,c=this.opts.explicitTrim||s===1/0?1/0:6;if(r.kind===`usage`)return this.compose(a,i.dim(o),!1);if(r.kind===`approval`&&r.state){let t=e=>this.presentation.stripCwd(String(e??``),this.opts.cwd),i=t(e.summary),s=i.slice(i.indexOf(`: `)+2),c=i&&!this.lastCall.includes(s)?` · ${i}`:``,l=r.result&&r.result.durationMs>=1e3?` · ${E(r.result.durationMs)}`:``,u=r.seq===n?`${o} ${r.state}${c}`:`${r.state}${l}`;return this.compose(a,this.approval(u,t(e.reason??e.message)),!1)}if(r.kind===`approval`)return this.compose(a,this.approval(o,r.detail??``),!1);if(r.kind===`assistant`)return this.compose(a,o,!0);if(r.kind===`steer`)return this.compose(a,i.yellow(o),!0);if(r.kind===`error`)return this.compose(a,i.red(o),!0);if(r.kind===`reasoning`){let e=Math.round((r.durationMs??0)/1e3),t=e>=1?`thought ${E(e*1e3)} · `:``,n=c===1/0?`${i.dim(t)}${U(o,s,1/0,i)}`:this.clip(`${t}${o.split(`
|
|
7
|
-
`)[0]??``}`,3,i.dim);return this.compose(a,n,!1)}if(r.kind===`tool`&&r.seq===n)return this.lastTool=r.tool,this.lastCall=o,this.lastCallSeq=r.seq,this.compose(a,this.clip(o.replace(/\s*\n\s*/g,` `),2,i.light),!1);if(r.kind===`tool`||r.kind===`tool-result`){let t=r.kind===`tool`&&(e.callId||e.callMessage)&&(r.seq!==this.lastCallSeq||o!==this.lastCall)?this.compose(`tool`,this.clip(o.replace(/\s*\n\s*/g,` `),2,i.light),!1):[];t.length&&(this.lastTool=r.tool,this.lastCall=o,this.lastCallSeq=r.seq);let n=r.result??{ok:r.tone!==`error`,exitCode:r.exitCode,durationMs:r.durationMs??0,detail:o},a=[r.kind===`tool-result`&&e.callId?i.dim(`from ${r.tool||`tool`} (${String(e.callId)})`):r.tool&&r.tool!==this.lastTool?i.dim(`from ${r.tool}`):``,n.ok?``:i.red(n.exitCode===void 0?`failed`:`exit ${n.exitCode}`),n.durationMs>=3e3?i.dim(E(n.durationMs)):``].filter(Boolean),l=U(n.detail,s,c,i),u=[...a.length?[a.join(i.dim(` · `))]:[],...l?[l]:[]];return[...t,...u.length?this.compose(`tool-result`,u.join(`
|
|
8
|
-
`),!1):[]]}return this.compose(a,this.clip(o,3,i.dim),!1)}approval(e,t){let n=this.style,r=this.opts.width?this.opts.width-Qe.length:1/0,i=`${e}${t?`. ${t}`:``}`;return!t||_e(i)<=r?`${n.light(e)}${t?n.dim(`. ${t}`):``}`:[this.clip(e,1,n.light),this.clip(t,2,n.dim)].join(`
|
|
9
|
-
`)}clip(e,t,n){let r=this.opts.trim??500;if(this.opts.explicitTrim||r===1/0)return U(e,r,1/0,this.style,n);let i=this.opts.width;return i?se(e,Math.max(i-Qe.length,24),t).map(e=>et(e,n)).join(`
|
|
10
|
-
`):n(e)}compose(e,t,n){let r=this.separated?[``]:[],i=$e[e]??(this.presentation.isApproval(e)?`⚑`:`·`),[a=``,...o]=t.split(`
|
|
11
|
-
`);return[...r,`${this.gutter(e)}${this.style.dim(i)} ${a}`,...o.map(e=>n?e:`${Qe}${e}`)]}gutter(e){let t=` `.repeat(6);return e===`tool-result`||!this.opts.startedAt||this.entryAt===null?t:`${this.style.dim(he(this.entryAt-this.opts.startedAt).padStart(5))} `}};function nt(e){return e.startedAt===void 0?``:E((e.finishedAt??Date.now())-e.startedAt)}function rt(e){let t=(e.result?.output??``).trim().split(`
|
|
12
|
-
`);for(let e=t.length-1;e>=0;--e){let n=t[e].trim();if(n.startsWith(`{`))try{let e=JSON.parse(n).reply;return typeof e==`string`?e:void 0}catch{return}}}function it(e){return(e.server===!0?` --server`:typeof e.server==`string`?` --server ${JSON.stringify(e.server)}`:``)+(e.workspace?` --workspace ${JSON.stringify(e.workspace)}`:``)}function G(e,t,n){return{usage:`coder task result ${e} --wait${it(t)}`,blurb:te,cli:{text:n}}}function K(e,t={}){let n=R([`Continue on the same task: coder task steer ${e} "<follow-up>"${t.server===void 0?``:` --server`}`]);return n[0].usage=`coder task steer ${e} "<follow-up>"${it(t)}`,n}function q(e,t){B.stdout.write(`${t.bold(e.task.id)} ${k(e.status)}${e.error?` ${t.red(e.error)}`:``}${nt(e)?` ${t.dim(`took ${nt(e)}`)}`:``}\n`),e.credential&&B.stdout.write(`${t.dim(`credential`)} ${e.credential}\n`);let n=rt(e);n&&B.stdout.write(`\n${t.bold(`Reply`)}\n${n.trim()}\n`)}function at(e){return{finalMessage:e?.finalMessage??null,error:e?.error?.message??null,tokens:e?.tokens??null}}function ot(e){let t=e.approval;return t?.id?[{id:t.id,summary:t.summary??``,cwd:t.cwd??null}]:[]}function J(e){let t,n=e.result?.output;if(n?.trimStart().startsWith(`{`))try{let e=JSON.parse(n);e&&typeof e.status==`number`&&`threadId`in e&&(t=e)}catch{}return{taskId:e.task.id,name:e.task.name??null,status:e.status,engine:e.task.usage?.engine??e.task.definition?.engine??null,model:t?.model??e.task.usage?.model??e.task.definition?.model??null,...at(t),finalMessage:t?t.finalMessage??null:rt(e)??n??null,error:t?.error?.message??e.error??null,tokens:t?.tokens??e.tokens??null,pendingApprovals:ot(e)}}function st(e,t){let n=ut(e,t).map(({usage:e,blurb:t})=>({usage:e,blurb:t}));if(`attempts`in e)return{...J(e),next:n,...e.steps?.length?{steps:e.steps}:{}};let{task:r,result:i,steps:a,turns:o}=e;return{taskId:r.id,name:r.name??null,status:e.status,engine:r.engine,model:i?.model??r.model??null,...at(i),error:i?.error?.message??r.error??null,tokens:i?.tokens??e.liveTokens??null,pendingApprovals:e.pendingApprovals.map(({id:e,summary:t,cwd:n})=>({id:e,summary:t,cwd:n})),next:n,...a.length?{steps:a}:{},...t.turns?{turns:o.map(e=>({at:e.at,status:e.status,...at(e)}))}:{}}}async function ct(e,t,n,r){let{task:i,steps:a,result:o,turns:s,pendingApprovals:c}=e,u=j,d=l.includes(i.status),f=Xe(i,{status:e.status,tokens:o?.tokens??e.liveTokens??null,tokenModel:o?.model,live:!o?.tokens&&!!e.liveTokens,style:u});if(i.prompt&&f.push(...Ke(i.prompt,u)),c.length){f.push(``,u.dim(`pending approvals:`));for(let t of c)f.push(` ${u.cyan(t.id)} ${t.summary}`),t.cwd&&f.push(` ${u.dim(`runs in ${t.cwd}`)}`),B.stdout.write(`${f.join(`
|
|
13
|
-
`)}\n`),f.length=0,r(e,{slot:`approval:${t.id}`})}if(a.length){f.push(``,u.dim(`steps:`));let e=await W.create({cwd:i.cwd??t,startedAt:Date.parse(i.createdAt??``)||void 0,width:F(),style:u}),n=o?.finalMessage&&String(a.at(-1)?.message??``).trim()===String(o.finalMessage).trim()?a.slice(0,-1):a;for(let t of n)f.push(...e.render(t))}if(f.push(``),n.turns&&s.length)s.forEach((e,t)=>{t&&f.push(``),f.push(u.dim(`Turn ${t+1} of ${s.length}. ${H(String(e.prompt??``))}`)),f.push(String(e.finalMessage||u.dim(`(no final message)`)))});else if(o)f.push(V({...o,error:o.error??void 0},i.error,`(no final message)`,u)),s.length>1&&(B.stdout.write(`${f.join(`
|
|
14
|
-
`)}\n`),f.length=0,r(e,{slot:`turns`}));else if(d){let{lastLog:t}=e;f.push(u.dim(e.stalled?`Result pending. No progress for ${E(e.idleMs??0)}. The task may be stalled.${t?` Last: ${H(t.message??t.kind??``)}`:``}`:`Result pending. The task is still running.`))}else f.push(V(null,i.error,u.dim(`(no result)`),u));f.length&&B.stdout.write(`${f.join(`
|
|
15
|
-
`)}\n`)}const lt=I({name:`result`,description:`status + final answer (--wait blocks)`,usage:`Show a task's status and its final answer (result pending while it runs), plus
|
|
16
|
-
any pending approvals. --wait blocks until it finishes, then prints. --tail <n>
|
|
17
|
-
includes the last n progress-log steps (--tail all for the whole transcript).
|
|
18
|
-
Defaults to the most recent task. Shortcut: \`coder result\`.
|
|
19
|
-
|
|
20
|
-
JSON and MCP return a summary and the complete answer, without engine diagnostics
|
|
21
|
-
or raw diffs. Use --tail for progress; answers are never truncated.
|
|
22
|
-
|
|
23
|
-
Run each --wait in its own background shell, one per task. Never wait on several
|
|
24
|
-
tasks in one call, or their approvals and answers never reach you one by one.`,access:`read`,args:{"task-id":C(`the task (default: the most recent)`),wait:S(`block until the task finishes or needs an approval, then print`),turns:S(`every turn's answer (a steered task accretes turns)`),tail:y(`include the last n progress-log steps (default: 0, final result only)`),...x},cli:{positional:[`task-id`],exit:[[0,`The task completed successfully.`],[1,`The task failed or was cancelled.`],[4,`An approval is pending; answer it, then run --wait again.`]],examples:[`coder result <task-id> --wait # block until the task finishes, print the answer`,`coder result <task-id> --turns # every turn's answer for a steered task`]},run:async({options:e,args:[t]})=>{let{tasks:n}=await import(`./task-CPzBITsp.js`).then(e=>e.t),r=await n.result(t,{...e,organization:e.workspace,onWaiting:e=>B.stderr.write(`${j.dim(`[coder] waiting for task ${e} to finish...`)}\n`)});if(`attempts`in r&&e.server!==void 0&&e.tail){let{connect:t}=await import(`./remote-CDm0YUU3.js`).then(e=>e.i),{logEntry:n}=await import(`./log-view-CL3_S0IQ.js`).then(e=>e.r),i=await t({...e,organization:e.workspace}).tasks.logs(r.task.id),a=e.tail===`all`?i:i.slice(-e.tail);return{...r,steps:a.map(e=>({...e.entry??n(e.line)??{kind:e.level===`err`?`error`:`info`,message:e.line},at:e.entry?.at??new Date(e.at).toISOString()}))}}return r},json:(e,{options:t})=>st(e,t),next:({result:e,args:t})=>ut(e,t),print:(e,{options:t,cwd:n,next:r})=>`attempts`in e?q(e,j):ct(e,n,t,r),exit:(e,{options:t})=>t.wait&&!(`attempts`in e)?e.task.status===`completed`?0:1:void 0});function ut(e,t){if(`attempts`in e)return[...ot(e).map(n=>({usage:`coder task approve ${e.task.id} ${n.id}${it(t)}`,blurb:`Answer the pending approval (--deny to reject)`,cli:{hidden:!0}})),...[`completed`,`failed`,`cancelled`].includes(e.status)?K(e.task.id,t):[{...G(e.task.id,t,``),cli:{hidden:!0}}]];let{task:n}=e,r=(e.pendingApprovals??[]).map(e=>({usage:`coder task approve ${n.id} ${e.id}`,blurb:`(--deny to reject)`,cli:{layout:`inline`,prefix:` `,slot:`approval:${e.id}`}}));return!t.turns&&e.result&&(e.turns?.length??0)>1&&r.push(...R([`Turn ${e.turns.length} of ${e.turns.length}. All answers are in coder task result ${n.id} --turns.`],{layout:`plain`,dim:!0,prefix:``,slot:`turns`}).map(e=>({...e,usage:`coder task result ${n.id} --turns`}))),l.includes(n.status)?t.wait?r:[...r,G(n.id,t,`Wait in its own background shell, one per task; do not poll: coder task result ${n.id} --wait`),...R([`Follow live: coder task watch ${n.id}`,...e.stalled?[`Check the transcript: coder task result ${n.id} --tail all`]:[]])]:[...r,...K(n.id)]}function Y(e,t){let n=e.level===`sys`?t.dim(`· ${e.line}`):e.level===`err`?t.light(e.line):e.line;B.stdout.write(`${n}\n`)}async function dt(e,t,n,r){let i=n.trim===void 0?500:n.trim===`none`?1/0:n.trim;if(`attempts`in e.task){let{logEntry:a}=await import(`./log-view-CL3_S0IQ.js`).then(e=>e.r),o=await W.create({cwd:e.task.task.cwd??t,startedAt:e.task.startedAt??e.task.createdAt,trim:i,explicitTrim:n.trim!==void 0,width:F()});for await(let t of e.events){let e=t;if(n.json){B.stdout.write(`${JSON.stringify(e,null,2)}\n`);continue}let r=e.entry??a(e.line);if(!r){Y(e,j);continue}let i=o.render({...r,at:r.at??new Date(e.at).toISOString()});i.length&&B.stdout.write(`${i.join(`
|
|
25
|
-
`)}\n`)}let s=await e.final();n.json||(q(s,j),r(s)),B.exit(0)}let a=e.task,o=await W.create({cwd:a.cwd??t,startedAt:Date.parse(a.createdAt??``)||void 0,trim:i,explicitTrim:n.trim!==void 0,width:F()});if(!n.json){let e=[...Xe(a,{status:a.status}),...l.includes(a.status)?[j.dim(`Watching. Press Ctrl-C to stop.`)]:[],...a.prompt?Ke(a.prompt,j,{truncate:!1}):[],``];B.stdout.write(`${e.join(`
|
|
26
|
-
`)}\n`)}let s=null,c=null,u=e=>{let t=o.render(e);t.length&&B.stdout.write(`${t.join(`
|
|
27
|
-
`)}\n`)};for await(let t of e.events){let e=t;if(e.kind===`usage`&&e.tokens&&(s=e.tokens),n.json){let t=e.kind===`steer`?1/0:i,n=e.message?{...e,message:H(e.message,t,{plain:!0})}:e;B.stdout.write(`${JSON.stringify(n)}\n`);continue}e.kind!==`usage`&&(c&&=(u(c),null),e.kind===`assistant`?c=e:u(e))}let{status:d,result:f,task:p}=await e.final();if(n.json)B.stdout.write(`${JSON.stringify({taskId:a.id,status:d,result:f},null,2)}\n`);else{let e=d===`completed`?`(no final message)`:`(task ${d})`,t=Ze(p,{tokens:f?.tokens??s,tokenModel:f?.model,statusChanged:d!==a.status});t.length&&B.stderr.write(`\n${t.join(`
|
|
28
|
-
`)}\n`);let n=V(f,p.error,e),r=c?String(c.message??``):``;B.stdout.write(`\n${n.trim()?n:r}\n`)}B.exit(d===`completed`?0:1)}async function ft(e,t,n){let r=[];for await(let t of e.events)r.push(t);let i=`attempts`in e.task,a=`attempts`in e.task?e.task.task:e.task,o=r.at(-1),s=i&&o?o.seq+1:t+r.length,c=n===void 0?``:n===!0?` --server`:` --server ${n}`;return{taskId:a.id,status:e.task.status,events:r,...l.includes(e.task.status)?{next:`coder task watch ${a.id} --from ${s}${c}`}:{}}}async function pt(e,t){let n=await W.create({cwd:t,trim:500,explicitTrim:!1,width:F()});for(let t of e.events){if(`seq`in t){Y(t,j);continue}let e=n.render(t);e.length&&B.stdout.write(`${e.join(`
|
|
29
|
-
`)}\n`)}}const mt=I({name:`watch`,description:`stream a task's live transcript`,usage:`Stream a running task's transcript live (for you/debugging), then print its
|
|
30
|
-
final answer. Replays the last line first so the current step is visible;
|
|
31
|
-
--tail <n> replays the last n lines (--tail all for the whole transcript).
|
|
32
|
-
Blocks until it finishes; exits 0 on success, 1 otherwise. For the answer
|
|
33
|
-
alone, prefer \`coder result\`. Alias: stream.
|
|
34
|
-
|
|
35
|
-
With --from <n>, or as a tool, it returns the log from event n on without
|
|
36
|
-
following, and \`next\`: the command that continues it while the task runs.`,access:`read`,args:{"task-id":C(`the task (default: the most recent)`),tail:y(`replay the last n log lines first (default: 1)`),trim:w(c(d([f(`none`),a().check(g(),t())],{error:`expected a positive integer or "none"`})),`budget for tool output and thinking (default: 1200 chars, 12 lines)`,`<n|none>`),from:w(c(a().check(g(),e())),`return the log from event n on instead of following it`,`<n>`),...x},cli:{positional:[`task-id`],examples:[`coder task watch # follow the most recent task to completion`,`coder task watch <task-id> --from 0 --json # the log so far, and the command that continues it`]},async run({options:e,args:[t],cwd:n,tool:r,next:i}){let{tasks:a}=await import(`./task-CPzBITsp.js`).then(e=>e.t),o=e.from??(r?0:void 0),s=await a.watch(t,{...e,from:o,organization:e.workspace});if(o!==void 0)return ft(s,o,e.server);await dt(s,n,e,i)},next({result:e,args:t}){if(!e)return[];if(`attempts`in e){let n=e;return[`completed`,`failed`,`cancelled`].includes(n.status)?K(n.task.id,t):[]}return e.next?R([`Continue: ${e.next}`]):[]},print:(e,{cwd:t})=>e&&pt(e,t)}),ht=I({name:`run`,description:`run a recorded event through an agent, offline or on a server`,usage:`Run a recorded platform event (AgentEvent JSON) through an agent. With --server it goes through your Coder server exactly like a webhook: real app, tokens, runner, and the reply is posted. Without it the engine runs here on the agent's prompt and this checkout, platform tools off, and the reply is printed.`,access:`write`,args:{agent:C(`the agent id`),file:C(`the event JSON file`),server:ie(`act on your Coder server`,`[url]`),workspace:C(`with --server: the workspace to act in (default: the saved one)`,`<slug>`),yes:S(`with --server: connect to a server used for the first time without asking`),wait:S(`with --server: follow the task log here until it finishes, then print the reply`),flow:C(`override the matched flow`,`<name>`),task:C(`a runner's form: run that server task here`,`<id>`)},cli:{positional:[`agent`,`file`],examples:[`coder agent run helper sample-slack-mention.json # offline: print what the agent would reply`,`coder agent run helper event.json --server # for real, through the server`]},run:async({options:e,args:[t,n],cwd:r,tool:i,next:a})=>{let{agents:o}=await import(`./agent-BA6xr8QY.js`).then(e=>e.t);return e.task?o.runTask(e.task,{cwd:r}):o.run(t,n,{...e,cwd:r,organization:e.workspace,...e.json||i?{}:{onLog:e=>Y(e,j),onDone:e=>{q(e,j),a(e)}}})},json(e){if(!Array.isArray(e))return e;let t=e.map(J);return t.length===1?t[0]:t},next({result:e,args:t}){if(t.task)return[];let n=e;if(Array.isArray(n))return t.wait?n.flatMap(e=>[`completed`,`failed`,`cancelled`].includes(e.status)?K(e.task.id,t).map(e=>({...e,cli:{...e.cli,hidden:!0}})):[]):[];if(`attempts`in n){let e=n;return[`completed`,`failed`,`cancelled`].includes(e.status)?K(e.task.id,t):[]}return`tasks`in n&&n.tasks.length?R([`Watch it: coder task watch ${n.tasks[0]} --server ${be(t.server)}`]):[]},print(e,{options:t}){let n=e;if(!(t.task||Array.isArray(n))){if(`tasks`in n){if(!n.tasks.length)return void B.stdout.write(`The server accepted the event but no agent matched it.
|
|
37
|
-
`);B.stdout.write(`${j.bold(`Queued on the server`)} as task ${n.tasks.join(`, `)}.\n`);return}n.reply===void 0?n.result!==void 0&&B.stdout.write(`${JSON.stringify(n.result,null,2)}\n`):B.stdout.write(`${n.reply.trim()}\n`)}}});function gt(e,t){return Be(e)?{id:e.id,name:e.name,source:e.builtin?`builtin`:`repo`,...e.dir&&!e.builtin?{dir:z.relative(t,e.dir)}:{},definition:e.definition,...e.usage?{usage:e.usage}:{}}:{id:e.id,name:e.name,source:e.source,definition:e.definition,...e.settings?{usage:e.settings}:{}}}function _t(e){let t=j,{definition:n,usage:r}=e,i=`dir`in e?e.dir:void 0,a=[[`name`,e.name],[`source`,i?`${e.source} (${i})`:e.source],[`description`,n.description],[`permissions`,r?.permissions??n.permissions],[`access`,r?.access===`read`||n.access===`read`?`Read-only`:`Read-write`],[`engine`,r?.engine??n.engine],[`model`,r?.model??n.model],[`effort`,r?.effort??n.effort]],o=Math.max(...a.map(([e])=>e.length))+2;for(let[e,n]of a)n&&B.stdout.write(`${t.dim(e.padEnd(o))}${n}\n`);let s=Object.entries(n.integrations).map(([e,t])=>{let n=r?.integrations?.[e],i=Array.isArray(t.events)?t.events:Object.keys(t.events??{});return{id:e,events:(n?.allowedEvents?i.filter(e=>n.allowedEvents.includes(e)):i).join(`, `)||`-`}});B.stdout.write(`\n${O([{header:`integration`,value:e=>e.id,paint:e=>t.cyan(e)},{header:`events`,value:e=>e.events}],s,{style:t,border:!0})}`)}const vt=I({name:`show`,description:`one agent in full: settings, integrations, events, tools`,usage:`Describe one agent as it will run here, or its active version on a server: its settings, access and per-integration events.`,access:`read`,args:{id:C(`the agent`),...x},cli:{positional:[`id`],examples:[`coder agent show coder # what the built-in agent listens to and may do`]},run:async({options:e,args:[t],cwd:n})=>{let{agents:r}=await import(`./agent-BA6xr8QY.js`).then(e=>e.t);return r.show(t,{...e,cwd:n,organization:e.workspace})},json:(e,{cwd:t})=>gt(e,t),print:(e,{cwd:t})=>_t(gt(e,t))});function yt(e,t){let n=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(!n.length)return void B.stdout.write(`${j.dim(`No usage in this period.`)}\n`);B.stdout.write(`${O([{header:`by`,value:e=>e.group},{header:`key`,value:e=>e.key,paint:e=>j.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)}],n,j)}\n`)}const bt=I({name:`usage`,description:`aggregate usage by agent, installation, or engine`,access:`read`,args:{since:C(`period such as 7d or 24h, or milliseconds since epoch`,`<period|ms>`),by:C(`agent, installation, or engine`,`<group>`),...x},run:async({options:e,cwd:t})=>{let{agents:n}=await import(`./agent-BA6xr8QY.js`).then(e=>e.t);return n.usage({...e,cwd:t,organization:e.workspace,since:e.since??`7d`})},print:(e,{options:t})=>yt(e,t.by)}),xt=L({name:`agent`,description:`define and run agents`,usage:`Define and run agents from the CLI, the dashboard, or on GitHub, Slack and other platforms.`,commands:[Ue,vt,ze,We,ht,bt],namespaces:[Pe],aliases:{ls:`list`}}),St=e=>{throw e instanceof T&&e.code===`login-failed`?new T(`invalid-option`,e.message,e.hint?{hint:e.hint}:{}):e},Ct=I({name:`login`,description:`sign in through the browser`,usage:`Sign in with Wular Auth in your browser. The CLI keeps the tokens in ~/.coder/session.json, and commands that talk to a server then act as you.`,access:`write`,args:{...x,device:S(`show a code to approve on another device; the default without a local browser`)},globalFlags:{cwd:!1},cli:{env:[[`CODER_SERVER`,`the server to use instead of https://coder.wular.ai`]],examples:[`coder auth login # sign in to the hosted service`,`coder auth login --server https://agents.example.com # sign in to a self-hosted server`]},run:async({options:e,tool:t})=>{let{hasBrowser:n,sessions:r}=await import(`./remote-CDm0YUU3.js`).then(e=>e.s),i=t?B.stderr:B.stdout;return r.login({server:e.server,yes:e.yes,device:e.device||!n(),open:e=>{i.write(`Opening your browser to sign in. If it does not open, visit\n${j.light(e)}\n`),ye(e)},onCode:(e,t)=>i.write(`Confirm this code in your browser: ${j.bold(e)}\n${j.light(t)}\n`),organization:e.workspace,...Ce()?{chooseOrganization:async e=>{let[t]=await ve({title:`Workspace`,hint:`Commands for this server use this workspace by default.`,options:e.map(e=>({value:e.slug,label:e.name,hint:e.slug}))});return t}}:{}}).catch(St)},json:e=>({server:e.server,user:e.user,organization:e.organization}),print:e=>{let t=j;B.stdout.write(`${t.green(`✔`)} Signed in to ${t.bold(e.server)} as ${e.user.email}${e.organization?` ${t.dim(`· ${e.organization.name}`)}`:``}\n`)}}),wt=I({name:`logout`,description:`sign out and forget the saved session`,usage:`Revoke the saved session for that server at Wular Auth and forget its tokens.`,access:`write`,args:{server:ie(`sign out of this Coder server (default: the hosted one)`,`[url]`),yes:S(`connect to a server used for the first time without asking`)},globalFlags:{cwd:!1},run:async({options:e})=>{let{sessions:t}=await import(`./remote-CDm0YUU3.js`).then(e=>e.s);return t.logout(e).catch(St)},print:e=>B.stdout.write(`Signed out of ${e.server}.\n`)}),Tt=I({name:`status`,description:`show where you are signed in`,usage:`List saved sessions with their server, user, and workspace.`,access:`read`,globalFlags:{cwd:!1},cli:{env:[[`CODER_SERVER`,`the server to use instead of https://coder.wular.ai`]]},run:async()=>{let{sessions:e}=await import(`./remote-CDm0YUU3.js`).then(e=>e.s);return e.status()},next:({result:e})=>Object.keys(e).length?[]:R([`Sign in: coder auth login`]),print:e=>{let t=j,n=Object.entries(e);if(!n.length)return void B.stdout.write(`${t.dim(`Not signed in`)}\n`);B.stdout.write(`${O([{header:`server`,value:([e])=>e,paint:e=>t.cyan(e)},{header:`user`,value:([,e])=>e.user.email},{header:`workspace`,value:([,e])=>e.organization?`${e.organization.name} (${e.organization.slug})`:`-`}],n,t)}\n`)}}),Et=L({name:`auth`,description:`sign in to Coder and manage saved server sessions`,commands:[Ct,wt,Tt]}),Dt=e=>new T(`invalid-option`,`Usage: ${e}`);function Ot(e){try{return JSON.parse(e)}catch{return e.includes(`,`)?e.split(`,`).map(e=>e.trim()).filter(Boolean):e}}const kt=I({name:`config`,description:`read or write config`,usage:"Read or write configuration. `list` prints the effective config; get/set/unset\ntarget a dotted key (e.g. engines.codex.model). Writes go to ~/.coder/config.json.",access:`write`,args:{action:C(`list, get, set or unset`),key:C(`a dotted key, such as engines.codex.model`),value:v(`with set: the value; JSON, or a comma list`),workspace:S(`target <repo>/.coder/config.json instead of the user file`)},cli:{positional:[`action`,`key`,`value`],examples:[`coder config list # print the effective config`,`coder config set chain codex,claude # set the engine fallback chain`,`coder config get engines.codex.model # read one value`]},run({options:e,args:[t,n,...r],cwd:i}){if(!(!t||t===`help`)){if(t===`list`)return{action:t,config:le.get(void 0,{cwd:i})};if(t===`get`){if(!n)throw Dt(`coder config get <key> (e.g. chain, engines.codex.model)`);return{action:t,value:le.get(n,{cwd:i})}}if(t!==`set`&&t!==`unset`)throw Dt(`coder config <list|get|set|unset> [<key> [value]] [--workspace]`);if(!n||t===`set`&&r.length===0)throw Dt(`coder config ${t} <key>${t===`set`?` <value>`:``}`);return{action:t,set:le.set(n,Ot(r.join(` `)),{cwd:i,workspace:e.workspace,unset:t===`unset`})}}},json(e){let t=e;return t.action===`list`?t.config:t.action===`get`?t.value??null:t.set},print(e){if(!e)return void B.stdout.write(Te(kt));if(e.action===`list`)return At(e.config,oe());if(e.action===`get`)return jt(e.value);Mt(e.set)}});function At(e,t){let n=j,r=e=>[e?.model,e?.effort,e?.permissions].filter(Boolean).join(`/`)||`-`;B.stdout.write([`${n.dim(`chain`)} ${e.chain.join(` -> `)}`,`${n.dim(`codex`)} ${r(e.engines.codex)}`,`${n.dim(`claude`)} ${r(e.engines.claude)}`,`${n.dim(`approvals`)} timeout=${e.approvals.escalationTimeoutMs}ms hosts=[${e.approvals.allowedNetworkHosts.join(`, `)}]`,`${n.dim(`file`)} ${t}`].join(`
|
|
38
|
-
`)+`
|
|
39
|
-
`)}function jt(e){if(e===null||typeof e==`object`&&e!==void 0)return pe(e);B.stdout.write(`${e===void 0?`(unset)`:String(e)}\n`)}function Mt(e){let t=j,n=e.unset?`unset ${t.cyan(e.key)}`:`${t.cyan(e.key)} = ${JSON.stringify(e.value)}`;B.stdout.write(`${n} ${t.dim(`(${e.file})`)}\n`)}async function Nt(e){let{openUrl:t}=await import(`./prompt-onpyIyXK.js`).then(e=>e.s);B.stderr.write(`Sign in at ${M.cyan(e)}\n`),t(e)&&B.stderr.write(M.dim(`Opened it in your browser. Waiting...
|
|
40
|
-
`))}async function Pt(){let{askSecret:e}=await import(`./prompt-onpyIyXK.js`).then(e=>e.s);return e(`Key`)}function Ft(e){return e.provider===`env`?`API key ${e.env}`:e.provider===`mcp`?`MCP server ${e.url??e.command}`:`${e.provider} account${e.account?` ${e.account}`:``}`}async function It(){throw new T(`invalid-option`,`A tool cannot read a key from stdin or a prompt.`,{hint:`Keep the key in an environment variable and pass --env, or run it in a terminal`})}const Lt=I({name:`add`,description:`connect a platform account, an API key or an MCP server`,usage:"Connect a platform account by its name (OAuth in the browser), an API key that tasks read from --env, or an MCP server at --url or started by the command after `--`. An API key is kept as a credential. A credential already holding the variable is used, else the value comes from that variable here, or from stdin or a prompt. A remote MCP server is checked for OAuth, open access or a key; a needed key is read from stdin or a prompt. With --key, the key goes in --header (default Authorization) or --env. Signing in needs --server.",access:`write`,args:{name:h().check(_(`the connection name; a platform name connects that account`),u(e=>![`coder`,`conversation`,`coder-approval`].includes(e),`The names coder, conversation and coder-approval are reserved for Coder MCP servers.`)),command:v("a stdio MCP server to start; on the command line, the words after `--`"),env:C(`the API key variable, or where a stdio server reads its key`,`<NAME>`),url:C(`a remote MCP server (streamable HTTP by default)`),header:C(`the header a remote server reads its key from (default: Authorization)`,`<NAME>`),key:S(`read a key from stdin or a prompt, never from a flag value`),auth:C(`override MCP authentication (default: detected for --url, none for a command)`,`<oauth|key|none>`),access:C(`read keeps only read-only tools (default: the agent's mode, write for API keys)`,`<read|write>`),tools:C(`tool allowlist; a read-only stdio server needs one`,`<a,b>`),credential:C(`the credential an API key connection reads`,`<id>`),me:S(`your own connection instead of the workspace's`),...x},cli:{positional:[`name`],examples:[`GROQ_API_KEY=gsk_... coder connection add groq --env GROQ_API_KEY # an API key from this shell`,`pbpaste | coder connection add docs --key --env DOCS_TOKEN --access write -- npx -y docs-mcp # a stdio server with its key from stdin`,`coder connection add github --me --server # your GitHub account on your Coder server`]},run:async({options:e,args:[t],cwd:n,tool:r})=>{let{connection:i}=await import(`./connection-DNxi2btM.js`).then(e=>e.n),a=r?It:Pt;return i.add(t,{...e,cwd:n,command:e.command??[],auth:e.auth,access:e.access,tools:e.tools?.split(`,`).map(e=>e.trim()).filter(Boolean),key:e.key?await a():void 0,askKey:a,onAuthorize:r?void 0:Nt})},print:e=>B.stdout.write(`Connected ${j.bold(e.id)}, ${Ft(e)}.\n`)}),Rt=e=>{let t=e.indexOf(`--`);return Lt(t===-1?e:[...e.slice(0,t),...e.slice(t+1).flatMap(e=>[`--command`,e])])};Object.defineProperty(Rt,"name",{value:Lt.name,writable:!0,enumerable:!0});const zt=Object.assign(Rt,Lt),Bt=I({name:`approve`,description:`approve a repository MCP server on this machine`,usage:`Approve an MCP server this repository or one of its agents declares, on this machine. A changed endpoint or command needs approval again.`,access:`write`,args:{name:h().check(_(`the MCP server`)),agent:C(`select the agent when names have different definitions`,`<id>`)},cli:{positional:[`name`]},run:async({cwd:e,args:[t],options:n})=>{let{connection:r}=await import(`./connection-DNxi2btM.js`).then(e=>e.n);return r.approve(t,{cwd:e,agent:n.agent})},print:({name:e})=>B.stdout.write(`Approved MCP server "${e}" on this machine.\n`)});function Vt({connections:e,declared:t}){let n=j;B.stdout.write(e.length?O([{header:`name`,value:e=>e.id,paint:e=>n.cyan(e)},{header:`connects`,value:e=>Ft(e),paint:e=>n.light(e)},{header:`access`,value:e=>e.access===`read`?`Read-only`:e.access?`Read-write`:`Default`},{header:`for`,value:e=>e.mine?`you`:e.owner?e.owner:`workspace`},{header:`status`,value:e=>e.status}],e,n):`${n.dim(`No connections.`)}\n`),t.length&&B.stdout.write(`\n${n.bold(`Declared in this repository`)}\n${O([{header:`name`,value:e=>e.name,paint:e=>n.cyan(e)},{header:`in`,value:e=>e.source},{header:`runs`,value:e=>e.target,paint:e=>n.light(e)},{header:`here`,value:e=>e.approved?`approved`:`needs approval`}],t,n)}`)}const Ht=I({name:`list`,description:`list connections and the MCP servers this repository declares`,usage:`Your connections, and the MCP servers this repository and its agents declare with whether each is approved on this machine.`,access:`read`,args:x,run:async({options:e,cwd:t})=>{let{connection:n}=await import(`./connection-DNxi2btM.js`).then(e=>e.n);return n.list({...e,cwd:t})},next:({result:{connections:e,declared:t}})=>R([...t.filter(e=>!e.approved).map(e=>`Approve: coder connection approve ${e.name}`),...e.length?[]:[`Add one: coder connection add <name> --env <NAME>`]]),print:Vt}),Ut=I({name:`reconnect`,description:`give a connection a new key, or sign in again`,usage:`Give a key connection its new key, read from stdin or a prompt, or sign in to an OAuth connection again in the browser. The credential an API key connection reads gets the new value, so every connection reading it rotates.`,access:`write`,args:{name:h().check(_(`the connection`)),...x},cli:{positional:[`name`],examples:[`pbpaste | coder connection reconnect groq # the new key from the clipboard`]},run:async({options:e,args:[t],cwd:n,tool:r})=>{let{connection:i}=await import(`./connection-DNxi2btM.js`).then(e=>e.n);return i.reconnect(t,{...e,cwd:n,askKey:r?It:Pt,onAuthorize:r?void 0:Nt})},print:e=>B.stdout.write(`Reconnected ${j.bold(e.id)}.\n`)}),Wt=I({name:`rm`,description:`remove a connection`,usage:`Remove a connection. The credential an API key connection reads stays.`,access:`write`,args:{name:h().check(_(`the connection`)),...x},cli:{positional:[`name`]},run:async({options:e,args:[t],cwd:n})=>{let{connection:r}=await import(`./connection-DNxi2btM.js`).then(e=>e.n);return r.remove(t,{...e,cwd:n})},print:e=>B.stdout.write(`Removed ${j.bold(e.id)}.\n`)}),Gt=L({name:`connection`,description:`platform accounts, API keys and MCP servers tasks use`,usage:"Connections give tasks access to a service without a handle: a platform account, an API key tasks read from the environment, or an MCP server. They live in ~/.coder, or on your Coder server with --server, and every task of yours may use them unless its agent or `coder task run --connections` narrows the set.",commands:[zt,Ht,Wt,Ut,Bt],aliases:{ls:`list`,remove:`rm`}}),Kt=I({name:`add`,description:`store an API key or subscription for one variable`,usage:`Store the key of one environment variable, encrypted on the server, as your own or with --workspace for every member. A key saved for that variable in the same scope is replaced. Where the server has subscription sign-in on, CLAUDE_CODE_OAUTH_TOKEN takes your own claude setup-token output.`,access:`write`,args:{env:C(`the variable tasks read the key as (reads that variable by default)`,`<NAME>`),value:C(`literal values land in shell history and are visible to other processes; use - for stdin or prefer environment variables`,`<secret|->`),workspace:S(`a workspace key; owners and admins only`),"no-check":S(`skip the provider key check`),...b},globalFlags:{cwd:!1},cli:{examples:[`ANTHROPIC_API_KEY=sk-... coder credentials add --env ANTHROPIC_API_KEY # your own Claude key, read from the environment`,`OPENAI_API_KEY=sk-... coder credentials add --env OPENAI_API_KEY --workspace # a workspace key every member's tasks can use`,`pbpaste | coder credentials add --env OPENROUTER_API_KEY --value - # a key for custom models, value from stdin`]},run:async({options:e,tool:t})=>{let{addCredential:n}=await import(`./remote-CDm0YUU3.js`).then(e=>e.i);if(t&&e.value===`-`)throw new T(`invalid-option`,`A tool cannot read the key from stdin.`,{hint:`Set the variable in the environment, or run it in a terminal`});return n({...e,noCheck:e[`no-check`]})},print:(e,{options:t})=>B.stdout.write(`${e.replaced?`Replaced`:`Added`} ${t.workspace?`workspace`:`personal`} ${j.bold(e.name)}.\n`)});function qt(e){if(!e.length)return void B.stdout.write(`${j.dim(`No engine credentials.`)}\n`);B.stdout.write(`${O([{header:`variable`,value:e=>e.subscription?`${e.name} subscription`:e.name,paint:e=>j.cyan(e)},{header:`scope`,value:e=>e.scope},{header:`value`,value:e=>e.masked},{header:`account`,value:e=>[e.account?.email,e.account?.plan].filter(Boolean).join(` `)}],e,j)}\n`)}const Jt=I({name:`list`,description:`list your keys and the workspace keys, by variable`,access:`read`,args:b,globalFlags:{cwd:!1},run:async({options:e})=>{let{credentials:t}=await import(`./remote-CDm0YUU3.js`).then(e=>e.i);return t.list(e)},print:qt});function Yt(e){e.url&&B.stderr.write(`Open ${j.cyan(e.url)}\n`),e.code&&B.stderr.write(`Enter the code ${j.bold(e.code)}\n`)}async function Xt(){let e=(await import(`node:readline/promises`)).createInterface({input:B.stdin,output:B.stderr}),t=(await e.question(`Paste the code from the sign-in page `)).trim();return e.close(),t}function Zt(e){if(e.state===`failed`)return void B.stderr.write(`${M.red(e.error??`Sign-in failed.`)}\n`);B.stdout.write(`Signed in. Your ${j.bold(e.engine)} subscription is saved.\n`)}const Qt=I({name:`login`,description:`sign in to a claude or codex subscription on the server`,usage:`Runs the official claude or codex sign-in on the server's runner, prints the sign-in link or device code, and waits. Claude asks you to paste the code the sign-in page shows. The result replaces your subscription for that engine. Needs CLAUDE_SUBSCRIPTIONS=1 or CODEX_SUBSCRIPTIONS=1 on the server.`,access:`write`,args:{engine:c(h()).check(_(`claude or codex`)),...b},globalFlags:{cwd:!1},cli:{positional:[`engine`]},mcp:!1,run:async({options:e,args:[t]})=>{let{loginCredential:n}=await import(`./remote-CDm0YUU3.js`).then(e=>e.i);return n(t,{...e,onStart:e=>B.once(`SIGINT`,()=>void e().finally(()=>B.exit(130))),onOpen:Yt,code:Xt})},next:({result:e})=>e.state===`failed`?R([`Try again`],{stream:`stderr`}):[],print:Zt,exit:(e,{options:t})=>!t.json&&e.state===`failed`?1:void 0}),$t=I({name:`remove`,description:`remove the key of one variable`,usage:`Remove the key of one environment variable.`,access:`write`,args:{NAME:h().check(_(`the variable`)),workspace:S(`the workspace key of that variable`),...b},globalFlags:{cwd:!1},cli:{positional:[`NAME`]},async run({options:e,args:[t]}){let{credentials:n}=await import(`./remote-CDm0YUU3.js`).then(e=>e.i);return n.remove(t,e)},print:(e,{args:[t]})=>B.stdout.write(`Removed ${j.bold(t)}.\n`)}),en=L({name:`credentials`,description:`engine credentials: subscriptions and API keys`,usage:`Manage subscriptions and API keys, one per variable in each scope. Your personal ones are yours alone; workspace ones serve every member, and only owners and admins change them. A task runs on its requester's own, else the workspace's.`,commands:[Jt,Kt,Qt,$t]}),tn=I({name:`docs`,description:`print bundled documentation (for agents to read)`,usage:"Print bundled documentation. With no topic, list the available topics; with a\ntopic, print that doc's raw markdown to stdout (unstyled, for an agent to\nconsume). Topics with sub-pages list them as `<topic>/<page>` (also accepted as\n`<topic>-<page>`). `coder docs skill` prints the host skill so an engine can\nload it once per session (--claude for the Claude Code flavor).",access:`read`,args:{topic:C(`the doc to print (default: list the topics)`),claude:S(`with the skill topic: print the Claude Code flavor`)},globalFlags:{cwd:!1},cli:{positional:[`topic`],examples:[`coder docs # list the available topics`,`coder docs flows # print the Flows doc`,`coder docs review # print the Review doc`]},run:async({options:e,args:[t]})=>{let{docsCore:n}=await import(`./docs-x-l7gjFE.js`).then(e=>e.r);return n(t,e)},next:({result:e})=>`content`in e?[]:R([`Read a topic: coder docs <topic>`]),print:e=>B.stdout.write(`content`in e?e.content.endsWith(`
|
|
41
|
-
`)?e.content:`${e.content}\n`:nn(e.topics))});function nn(e){let t=j,n=e=>e.includes(`/`)?` ${e}`:e;return O([{header:`topic`,value:e=>n(e.name),paint:e=>t.cyan(e)},{header:`about`,value:e=>e.description,paint:e=>t.light(e)}],e,t)}const rn=e=>e===1?``:`s`,an=I({name:`archive`,description:`hide a run (or all stopped) from the list`,usage:`Archive a flow run so it drops out of the default list (see it again with
|
|
42
|
-
\`coder flow list --archived [--limit N]\`). Pass --all-stopped to archive every
|
|
43
|
-
finished run. A running run must be stopped first.`,access:`write`,args:{"run-id":C(`the run to archive`),"all-stopped":S(`archive every stopped (finished) run`)},cli:{positional:[`run-id`]},run:async({options:e,args:[t]})=>{let{archiveRuns:n}=await import(`./executor-Dt2FFT-y.js`).then(e=>e.D);return n(t,{allStopped:e[`all-stopped`]})},print(e){if(!(`count`in e))return void B.stdout.write(`Archived run ${j.cyan(e.runId)}.\n`);B.stdout.write(e.count?`Archived ${e.count} stopped run${rn(e.count)}.\n`:`${j.dim(`No stopped runs to archive.`)}\n`)}}),on=I({name:`delete`,description:`delete a run's record (or all archived)`,usage:`Delete a flow run's record from disk (its journal, events, and logs). This is
|
|
44
|
-
permanent; the run's tasks are ordinary tasks and are not touched. Pass
|
|
45
|
-
--all-archived to delete every archived run at once. A running run must be
|
|
46
|
-
stopped first.`,access:`write`,args:{"run-id":C(`the run to delete`),"all-archived":S(`delete every archived run`)},cli:{positional:[`run-id`]},run:async({options:e,args:[t]})=>{let{deleteRuns:n}=await import(`./executor-Dt2FFT-y.js`).then(e=>e.D);return n(t,{allArchived:e[`all-archived`]})},print(e){if(!(`count`in e))return void B.stdout.write(`Deleted run ${j.cyan(e.runId)}.\n`);B.stdout.write(e.count?`Deleted ${e.count} archived run${rn(e.count)}.\n`:`${j.dim(`No archived runs to delete.`)}\n`)}}),sn=I({name:`discover`,description:`list flows runnable here (workspace + global)`,usage:`List every flow discoverable from the current directory: workspace flows in
|
|
47
|
-
.coder/flows/ (walking up to the repo root) and global flows in ~/.coder/flows/.`,access:`read`,run:async({cwd:e})=>{let{discoverFlows:t}=await import(`./discover-CPZdprlQ.js`).then(e=>e.r);return t(e)},next:({result:e})=>R(e.length?[`Run one: coder flow run <name>`,`Recent runs: coder flow list`]:[`Authoring guide: coder docs flows`]),print:(e,{cwd:t})=>cn(e,t)});function cn(e,t){if(!e.length){B.stdout.write(`No flows found in .coder/flows/ (workspace) or ~/.coder/flows/ (global).
|
|
48
|
-
`);return}let n=j;B.stdout.write(O([{header:`name`,value:e=>e.name,paint:e=>n.cyan(e)},{header:`scope`,value:e=>e.scope,paint:e=>n.light(e)},{header:`path`,value:e=>e.scope===`workspace`?z.relative(t,e.path)||e.path:e.path.replace(ke.homedir(),`~`),paint:e=>n.light(e)}],e,n))}const ln=I({name:`watch`,description:`watch a run live (replay + follow)`,usage:`Watch a flow run live: replay its progress lines from the start, then keep
|
|
49
|
-
following while it runs (Ctrl-C detaches; it keeps running). Blocks until it
|
|
50
|
-
finishes; exits 0 on success, 1 otherwise. Defaults to the most recent run.
|
|
51
|
-
For the result alone, prefer \`coder flow result\`. Alias: stream.
|
|
52
|
-
|
|
53
|
-
With --from <n>, or as a tool, it returns the events from event n on without
|
|
54
|
-
following, and \`next\`: the command that continues them while the run goes on.`,access:`read`,args:{"run-id":C(`the run (default: the most recent)`),tail:y(`replay only the last n events first (default: all)`),from:w(c(a().check(g(),e())),`return the events from event n on instead of following them`,`<n>`)},cli:{positional:[`run-id`],examples:[`coder flow watch # follow the most recent run to completion`,`coder flow watch <run-id> --from 0 --json # the events so far, and the command that continues them`]},async run({options:e,args:[t],tool:n,next:r}){let{watchRun:i}=await import(`./executor-Dt2FFT-y.js`).then(e=>e.D),a=e.from??(n?0:void 0),o=i(t,{tail:e.tail,from:a});if(a===void 0)return Cn(o,{json:e.json,stream:!0},r);let s=[];for await(let e of o.events)s.push(e);let{runId:c,status:l}=o.record;return{runId:c,status:l,events:s,...l===`running`?{next:`coder flow watch ${c} --from ${a+s.length}`}:{}}},next:({result:e})=>Dn(e),print(e){let t=new xn;for(let n of e.events)t.emit(n);t.done()}}),un=[`⣾`,`⣽`,`⣻`,`⢿`,`⡿`,`⣟`,`⣯`,`⣷`];function X(e,t=!1){let n=j;return t?A(`[${fn(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 dn(){return A(`[start]`,10)}function fn(e){return e===`completed`?`done`:e===`cancelled`?`failed`:e}function pn(e,t){return e??t.replace(/\s+/g,` `).trim().slice(0,60)}function Z(e,t,n,r,i,a){let o=j,s=A(t??n,32);return[`${e} ${a?o.bold(s):s}`,o.dim(A(n,24)),o.light(A(i??``,20)),r?o.light(`${me(r.total)} tok`):``].join(` `).trimEnd()}function mn(e,t=!1){let n=j;return`${X(e.ok?`completed`:`failed`,t)} ${n.dim(`gate`)} ${n.light(e.cmd)}${e.ok?``:n.dim(` · exit ${e.code}`)}`}function hn(e,t,n){let r=j,i=n!==void 0&&n>=1e3?r.dim(` · ${E(n)}`):``;return`${t} ${r.dim(`gate`)} ${r.light(e)}${i}`}function gn(e,t=!1){return j.dim(`${`│ `.repeat(e)}${t?`└─`:`├─`}`)}function _n(e){return j.dim(`${`│ `.repeat(e)}│ `)}function vn(e){return`${` `.repeat(e.depth)}${e.log?`${A(`[log]`,10)} `:``}${e.body}`}function yn(e,t,n=!1){return n?vn(e):`${e.log?_n(e.depth):gn(e.depth,t)} ${e.body}`}function bn(e){return j.dim(`${`│ `.repeat(Math.max(0,e))}│`)}var xn=class{stream;names=new Map;active=new Map;activeGates=new Map;pending;previews=new Map;tails=new Map;previewWatchers=new Map;frame=0;hasCommitted=!1;timer;tty;region;constructor(e=B.stdout){this.stream=e,this.tty=!!e.isTTY,this.region=new ce(e)}emit(e){let t=j;switch(e.kind){case`task-start`:{let t={name:pn(e.name,e.prompt),engine:e.engine,depth:e.depth??0};if(this.names.set(e.taskId,t),!this.tty){this.final(t.depth,Z(dn(),t.name,e.taskId,null,t.engine));return}this.active.set(e.taskId,t),this.previewWatchers.get(e.taskId)?.close(),this.previewWatchers.set(e.taskId,ne(i(B.cwd(),e.taskId),t=>{t&&t!==`log.jsonl`||(this.refreshPreviews(e.taskId),this.repaint())})),this.refreshPreviews(e.taskId),this.spin(!0),this.repaint();return}case`task-end`:{this.active.delete(e.taskId),this.previews.delete(e.taskId),this.tails.delete(e.taskId),this.previewWatchers.get(e.taskId)?.close(),this.previewWatchers.delete(e.taskId),this.idle();let t=this.names.get(e.taskId);this.final(t?.depth??0,Z(X(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,hn(t.cmd,dn()));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,mn(e,!this.tty));return;case`log`:for(let n of e.message.split(`
|
|
55
|
-
`))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);for(let e of this.previewWatchers.values())e.close();this.previewWatchers.clear(),this.flush(0),this.tty&&this.repaint(),this.region.done()}flush(e){this.pending&&=(this.region.commit(`${yn(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(`${vn({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=yn(this.pending,!1);e.push(n),t.push(n)}let n=this.timer?j.bold(j.cyan(un[this.frame%un.length])):X(`running`);for(let[r,i]of this.active){let a=`${gn(i.depth??0)} ${Z(n,i.name,r,null,i.engine,!0)}`;(e.length||this.hasCommitted)&&e.push(bn(i.depth??0)),e.push(a),t.push(a);let o=this.previews.get(r);o&&e.push(`${_n(i.depth??0)} ${j.dim(o)}`)}for(let r of this.activeGates.values()){let i=`${gn(r.depth)} ${hn(r.cmd,n,Date.now()-r.startedAt)}`;(e.length||this.hasCommitted)&&e.push(bn(r.depth)),e.push(i),t.push(i)}let r=(ue(this.stream)??1/0)-1,i=e.length<=r?e:t;if(i.length>r){let e=Math.max(0,r-1);i=[j.dim(`… +${i.length-e} more running`),...i.slice(-e)]}this.region.set(i)}refreshPreviews(e){try{let t=this.tails.get(e),r;if(!t){let a=z.join(i(B.cwd(),e),`log.jsonl`),o=Oe.existsSync(a)?Oe.statSync(a).size:0;r=n(B.cwd(),e,1)[0],t=re(a,o),this.tails.set(e,t)}for(let e of t())try{r=JSON.parse(e)}catch{r={message:e}}let a=r?.message?.replace(/\s+/g,` `).trim();if(!a)return;let o=(F(this.stream)??120)-8;this.previews.set(e,a.length>o?`${a.slice(0,o-1)}…`:a)}catch{}}idle(){!this.active.size&&!this.activeGates.size&&this.spin(!1)}spin(e){e&&!this.timer?this.timer=setInterval(()=>{this.frame++,this.repaint()},120).unref():!e&&this.timer&&(clearInterval(this.timer),this.timer=void 0)}};function Sn(e,t){if(t){pe(e);return}let n=!B.stdout.isTTY,r=n?``:`${j.dim(`└─`)} `;B.stdout.write(`${r}${X(`completed`,n)} run ${j.cyan(e.runId)} completed ${j.dim(`(${e.taskCount} tasks)`)}\n`),B.stdout.write(`\n${de(e.result)}\n`),wn(e.tokens)}async function Cn(e,t,n){let{runId:r}=e.record,i=!!(t.stream&&t.json);!t.json&&e.record.status===`running`&&B.stderr.write(`${j.dim(`[flow]`)} Run ${j.cyan(r)} started and is waiting to finish. Press Ctrl-C to detach. It keeps running.\n\n`);let a=t.json?()=>{}:ge(),o=()=>{a(),i||(B.stderr.write(`\n${j.dim(`[flow] Detached. The run is still going.`)}\n`),n({runId:r,status:`running`,phase:`detached`},{stream:`stderr`,style:`stdout`,force:!0})),B.exit(130)};B.on(`SIGINT`,o);let s=new xn;for await(let n of e.events)i?B.stdout.write(`${JSON.stringify(n)}\n`):t.json||s.emit(n);s.done(),a(),B.off(`SIGINT`,o);let c=e.final();i&&(B.stdout.write(`${JSON.stringify(En(c))}\n`),B.exit(c.status===`completed`?0:1)),c.status===`completed`&&(Sn({runId:r,name:c.name,status:`completed`,result:c.result,tokens:c.ledger,taskCount:c.taskCount},t.json),B.exit(0)),c.status===`stopped`&&(t.json?pe({runId:r,name:c.name,status:`stopped`,taskCount:c.taskCount}):B.stdout.write(`\n${j.dim(`[flow] Run ${r} stopped.`)}\n`),n(c),B.exit(1)),B.stdout.write(`\n${j.red(`error:`)} ${c.error??`unknown error`}\n`),n(c,{force:!0}),B.exit(1)}function wn(e){let t=Object.keys(e);if(t.length){B.stdout.write(`\n${j.bold(`Tokens:`)}\n`);for(let n of t)B.stdout.write(` ${j.dim(P(e[n],n))}\n`)}}function Tn(e){let{runId:t,name:n,status:r,startedAt:i,endedAt:a,taskCount:o,ledger:s,error:c,archived:l,archivedAt:u}=e;return{runId:t,name:n,status:r,startedAt:i,endedAt:a,taskCount:o,ledger:s,error:c,archived:l,archivedAt:u}}function En(e){return{...Tn(e),result:e.result}}function Dn(e){return e.next?R([`Continue: ${e.next}`]):e.status===`running`?R(e.phase===`detached`?[`Result: coder flow result ${e.runId}`,`Stop it: coder flow stop ${e.runId}`]:[`Result: coder flow result ${e.runId}`,`Runs: coder flow list`]):e.status===`stopped`||e.status===`failed`?R([`Resume: coder flow resume ${e.runId}`]):[]}const On=I({name:`list`,description:`recent flow runs (by default running + just stopped)`,usage:`List recent flow runs, most recent first: running runs plus ones that ended
|
|
56
|
-
within the last 30 minutes. Older runs auto-archive and move to --archived.`,access:`read`,args:{archived:S(`show archived runs (auto-archived or via flow archive)`),limit:ae(`show at most n runs (default all)`)},run:async({options:e})=>{let{collectFlowRuns:t}=await import(`./executor-Dt2FFT-y.js`).then(e=>e.D);return t(e)},json:e=>e.runs.map(Tn),next:({result:e})=>R(e.runs.length?[`Result: coder flow result <run-id>`,`Tasks: coder list`,`Runnable flows: coder flow discover`]:[`Run one: coder flow run <name>`,`Runnable flows: coder flow discover`]),print:(e,{options:t})=>kn(e,t)});function kn({runs:e,clipped:t},n){if(!e.length){B.stdout.write(n.archived?`No archived flow runs.
|
|
57
|
-
`:`No recent flow runs.
|
|
58
|
-
`);return}let r=j;B.stdout.write(`${O([{header:`run-id`,value:e=>e.runId,max:28,paint:e=>r.cyan(e)},{header:`name`,value:e=>e.name,max:30},{header:`status`,value:e=>e.status,paint:(e,t)=>k(t.status,e.length)},{header:`tasks`,value:e=>`${e.taskCount} tasks`,paint:e=>r.light(e)},{header:`tokens`,value:e=>{let t=Object.values(e.ledger).reduce((e,t)=>e+t.total,0);return t?`${me(t)} tok`:`-`},paint:e=>r.light(e)},{header:`age`,value:e=>E(m(e.startedAt)),paint:e=>r.light(e)}],e,r)}\n`),t&&B.stdout.write(r.dim(`\n... ${t} more not shown (--limit ${n.limit})\n`))}const An=I({name:`result`,description:`progress and result of a run`,usage:`Show a flow run's status and result, with its tasks, gates, and token ledger.
|
|
59
|
-
--tail <n> caps the step rows (0 for the result alone). Defaults to the most
|
|
60
|
-
recent run. To watch a run live, prefer \`coder flow watch\`.`,access:`read`,args:{"run-id":C(`the run (default: the most recent)`),tail:y(`show the last n step rows (default: all; 0 hides them)`)},cli:{positional:[`run-id`],examples:[`coder flow result --tail 0 # the most recent run's result, no step rows`]},async run({options:e,args:[t]}){let{runResult:n}=await import(`./executor-Dt2FFT-y.js`).then(e=>e.D),r=n(t);if(!r&&!e.json)throw new T(`flow-failed`,t?`No flow run "${t}".`:`No flow runs yet.`,{hint:`Run one: coder flow run <name>`});return r},json:e=>e&&En(e),next:({result:e})=>e?R(e.status===`running`?[`Follow live: coder flow watch ${e.runId}`,`Stop it: coder flow stop ${e.runId}`]:e.status===`stopped`||e.status===`failed`?[`Resume: coder flow resume ${e.runId}`]:[]):[],print:(e,{options:t})=>Mn(e,t.tail)});function jn(e,t=!1){let n=j;if(t)return e.map(vn);let r=(t,n)=>{for(let r=t+1;r<e.length;r+=1){let t=e[r].depth;if(t<n)return!1;if(t===n)return!0}return!1};return e.map((e,t)=>{let i=``;for(let n=0;n<e.depth;n+=1)i+=r(t,n)?`│ `:` `;return i+=e.log?`│ `:r(t,e.depth)?`├─`:`└─`,`${n.dim(i)} ${e.body}`})}function Mn(e,t=`all`){let n=j,r=!B.stdout.isTTY;B.stdout.write(`${n.bold(`Flow`)} ${n.cyan(e.name)} ${n.dim(`(${e.runId})`)}. ${n.bold(k(e.status))}\n`);let i=e.steps,a=i.filter(e=>p.includes(e.status)).length,o=e.status===`running`?`${a}/${i.length} tasks`:`${e.taskCount} tasks`;if(B.stdout.write(`${n.dim(`started ${e.startedAt}${e.endedAt?` · ended ${e.endedAt}`:``} · ${o}`)}\n`),t!==0){let a=new Map,o=new Map,s=new Map,c=[];for(let t of e.events)if(t.kind===`task-start`){let e={name:pn(t.name,t.prompt),engine:t.engine,depth:t.depth??0};a.set(t.taskId,e),o.set(t.taskId,e)}else if(t.kind===`task-end`){o.delete(t.taskId);let e=a.get(t.taskId);c.push({depth:e?.depth??0,body:Z(X(t.status,r),e?.name??null,t.taskId,t.tokens,e?.engine)})}else if(t.kind===`gate-start`)s.set(t.gateId,{cmd:t.cmd,depth:t.depth??0});else if(t.kind===`gate`)t.gateId&&s.delete(t.gateId),c.push({depth:t.depth??0,body:mn(t,r)});else if(t.kind===`log`)for(let e of t.message.split(`
|
|
61
|
-
`))c.push({depth:t.depth??0,body:n.light(e),log:!0});else t.kind===`flow-start`&&c.push({depth:t.depth-1,body:n.bold(`flow ${t.name}`)});for(let[e,t]of o)c.push({depth:t.depth??0,body:Z(X(`running`,r),t.name,e,null,t.engine)+(r?``:` ${n.light(`running`)}`)});for(let e of s.values())c.push({depth:e.depth,body:hn(e.cmd,X(`running`,r))+(r?``:` ${n.light(`running`)}`)});if(!c.length)for(let e of t===`all`?i:i.slice(-t))c.push({depth:0,body:Z(X(e.status,r),e.name,e.taskId??`-`,e.tokens)});let l=jn(c,r),u=t===`all`?l:l.slice(-t);u.length&&B.stdout.write(`\n${u.join(`
|
|
62
|
-
`)}\n`)}e.endedAt&&e.result!==void 0&&B.stdout.write(`\n${n.bold(`Result:`)}\n${de(e.result)}\n`),e.error&&B.stdout.write(`\n${n.red(`error:`)} ${e.error}\n`),wn(e.ledger)}const Nn={wait:S(`follow the run in the foreground (Ctrl-C detaches; it keeps running)`),args:C(`the flow's input as a JSON value (or pass bare key=value pairs)`,`<json>`),concurrency:C(`tasks running at once (default: CPU count)`,`<n>`),"max-tasks":C(`total tasks the run may dispatch (default: CPU count x 10)`,`<n>`),"dry-run":S(`print every resolved prompt and gate command without dispatching`)};function Pn(e){let t={};for(let n of e){let e=n.indexOf(`=`);if(e===-1)throw new T(`invalid-option`,`Invalid argument "${n}": expected key=value.`,{hint:`Help: coder flow run --help`});let r=n.slice(0,e),i=n.slice(e+1);try{t[r]=JSON.parse(i)}catch{t[r]=i}}return t}function Fn(e,t){if(e!==void 0)try{return JSON.parse(e)}catch(e){throw new T(`invalid-option`,`Invalid --args JSON: ${e instanceof Error?e.message:String(e)}`)}return t.length?Pn(t):{}}const In=e=>e?Number(e):void 0,Ln=(e,t)=>({cwd:t,dryRun:e[`dry-run`],concurrency:In(e.concurrency),maxTasks:In(e[`max-tasks`]),detached:!0,wait:e.wait}),Rn=(e,t)=>e[`dry-run`]&&!e.json&&!t?Vn():{},zn=I({name:`run`,description:`run a flow in the background (--wait to follow it live)`,usage:`Run a flow: a TypeScript file that orchestrates many coder tasks with gates,
|
|
63
|
-
journaling, and resume. Prints the run id and orchestrates in the background;
|
|
64
|
-
--wait follows the run in the foreground with live progress (Ctrl-C detaches;
|
|
65
|
-
it keeps running), and \`coder flow watch\` shows the same lines any time.
|
|
66
|
-
Stop a run with \`coder flow stop\`.`,access:`write`,args:{flow:h().check(_(`the flow: a discovered name or a path`)),inputs:v(`the flow's input as bare key=value pairs`),...Nn},cli:{positional:[`flow`,`inputs`],examples:[`coder flow run audit-routes --wait # run a discovered flow`,`coder flow run ./scratch/one-off.ts --wait # run a flow by path`,`coder flow run verify --args '{"clusters":["a","b"]}' --wait # pass structured input`]},async run({options:e,args:[t,...n],cwd:r,tool:i,next:a}){let{startRun:o}=await import(`./executor-Dt2FFT-y.js`).then(e=>e.D);return Bn(await o(t,{...Ln(e,r),args:Fn(e.args,n)},Rn(e,i)),e,i,a)},next:({result:e})=>Dn(e),print:e=>e.status===`running`?Hn(e):Sn(e)});async function Bn(e,t,n,r){if(e.status!==`running`||!e.watch)return e;if(!n)return Cn(e.watch,t,r);for await(let t of e.watch.events);let i=e.watch.final();if(i.status!==`completed`)throw new T(`flow-failed`,i.error??`Flow ${i.runId} ${i.status}.`,{runId:i.runId,hint:`Resume: coder flow resume ${i.runId}`});return{runId:i.runId,name:i.name,status:`completed`,result:i.result,tokens:i.ledger,taskCount:i.taskCount}}function Vn(){let e=new xn;return{onEvent:t=>e.emit(t)}}function Hn(e){B.stdout.write(`${j.dim(`[flow]`)} run ${j.cyan(e.runId)} started in the background (running).\n`)}const Un=I({name:`resume`,description:`continue a stopped or edited run`,usage:`Re-run a flow from its journal: finished steps replay instantly, the first
|
|
67
|
-
changed or new step onward runs live. Defaults to the most recent run.
|
|
68
|
-
Accepts the same flags as flow run.`,access:`write`,args:{"run-id":C(`the run (default: the most recent)`),...Nn},cli:{positional:[`run-id`],examples:[`coder flow resume # continue the most recent run`]},async run({options:e,args:[t],cwd:n,tool:r,next:i}){let{resumeRun:a}=await import(`./executor-Dt2FFT-y.js`).then(e=>e.D);return Bn(await a(t,{...Ln(e,n),...e.args===void 0?{}:{args:Fn(e.args,[])}},Rn(e,r)),e,r,i)},next:({result:e})=>Dn(e),print:e=>e.status===`running`?Hn(e):Sn(e)}),Wn=I({name:`stop`,description:`stop a run and its still-running tasks`,usage:`Stop a running flow: signal the orchestrator so it stops dispatching, stamp the
|
|
69
|
-
run stopped, and stop its still-running tasks. Defaults to the most recent run;
|
|
70
|
-
the journal stays ready for \`coder flow resume\`.`,access:`write`,args:{"run-id":C(`the run (default: the most recent)`),"keep-tasks":S(`leave the run's still-running tasks running`)},cli:{positional:[`run-id`]},run:async({options:e,args:[t]})=>{let{stopRun:n}=await import(`./executor-Dt2FFT-y.js`).then(e=>e.n);return n(t,{keepTasks:e[`keep-tasks`]})},next:({result:e})=>R([`Resume: coder flow resume ${e.runId}`]),print:Gn});function Gn(e){let t=j;e.status===`failed`?B.stdout.write(`${t.dim(`[flow]`)} Run ${t.cyan(e.runId)} orchestrator died. Marked ${k(`failed`)}.\n`):B.stdout.write(`${t.dim(`[flow]`)} run ${t.cyan(e.runId)} ${k(e.status)}.\n`),e.stoppedTasks.length&&B.stdout.write(`${t.dim(`[flow]`)} stopped tasks: ${e.stoppedTasks.join(`, `)}\n`),e.keptTasks.length&&B.stdout.write(`${t.dim(`[flow]`)} left running: ${e.keptTasks.join(`, `)}\n`)}const Kn=L({name:`flow`,description:`orchestrate many coder tasks from one TypeScript file`,usage:`Orchestrate many coder tasks with a plain TypeScript file: dispatch, gates,
|
|
71
|
-
concurrency, journaling, and resume. Flows live in .coder/flows/ (workspace)
|
|
72
|
-
or ~/.coder/flows/ (global). See \`coder docs flows\`.`,commands:[zn,On,sn,An,ln,Wn,Un,an,on],aliases:{stream:`watch`,ls:`list`}}),qn=I({name:`mcp`,description:`serve Coder's commands as MCP tools over stdio`,usage:`Serve Coder's commands as MCP tools over stdio, so a harness can run them.
|
|
73
|
-
|
|
74
|
-
Commands return their JSON payloads and next steps. Load guides with load_skill;
|
|
75
|
-
blocking commands keep their CLI flags and behavior, subject to the client's tool timeout.`,access:`write`,globalFlags:{json:!1,cwd:!1},mcp:!1,cli:{examples:[`claude mcp add coder -- coder mcp # run Coder from Claude Code`]},async run(){if(process.stdin.isTTY){process.stdout.write(`coder mcp is the MCP server your host starts; it waits for an MCP client on stdin.
|
|
76
|
-
Add it to your host with \`coder setup-host\`, or by hand: claude mcp add coder -- coder mcp
|
|
77
|
-
`);return}let{app:e}=await import(`./context-65bOofts.js`),{serve:t}=await import(`./serve-DE6A-rBk.js`);await t(e,`stdio`)}}),Q=S(`target <repo>/.coder/config.json instead of the user file`),Jn=e=>({baseUrl:e[`base-url`],model:e.model,envKey:e[`env-key`],workspace:e.workspace}),Yn=I({name:`add`,description:`connect a model`,usage:`Connect a custom model behind an OpenAI-compatible endpoint (Ollama, LM Studio,
|
|
78
|
-
vLLM, OpenRouter, ...). It currently runs on the codex engine pointed at your
|
|
79
|
-
URL and is usable anywhere a model is: --model <name>, --engine custom, or as an
|
|
80
|
-
agent default in config. Alias: \`coder model setup\`.`,access:`write`,args:{name:C(`the name to dispatch it by`),"base-url":C(`OpenAI-compatible API base (e.g. http://localhost:11434/v1)`,`<url>`),model:C(`the provider's model id (e.g. qwen2.5-coder:32b)`,`<id>`),"env-key":C(`env var holding the API key (omit for keyless local endpoints)`,`<VAR>`),workspace:S(`write to <repo>/.coder/config.json instead of the user file`)},cli:{positional:[`name`],examples:[`coder model add qwen --base-url http://localhost:11434/v1 --model qwen2.5-coder:32b # local Ollama model, no key`,`coder model add kimi --base-url https://openrouter.ai/api/v1 --model moonshotai/kimi-k2 --env-key OPENROUTER_API_KEY # third-party provider via OpenRouter`,`coder run --model qwen "explain this repo" # dispatch a task on it`]},run:async({options:e,args:[t],cwd:n})=>{let{models:r}=await import(`./models-C1O2DrXx.js`).then(e=>e.n);return r.add(t,{...Jn(e),cwd:n})},json:Xn,next:({result:e})=>Qn(e),print:(e,{next:t})=>Zn(e,`saved`,()=>t(e,{slot:`codex`}))});function Xn({name:e,entry:t,file:n,probe:r,codex:i,install:a,ready:o}){return{name:e,...t,file:n,probe:r,codex:i,...a?{codexInstall:a}:{},ready:o}}function Zn({name:e,entry:t,file:n,probe:r,codex:i,install:a,nativeResponses:o,keyMissing:s},c,l){let u=j,d=e=>` ${u.green(`✔`)} ${e}`,f=e=>` ${u.red(`✘`)} ${e}`,p=[`${c} ${u.cyan(e)} -> ${t.model} @ ${t.baseUrl} ${u.dim(`(${n})`)}`,``,r.reachable?d(`${r.detail} ${u.dim(`(${o?`responses api, direct`:`chat api, auto-translated`})`)}`):f(r.detail),i.available?d(a?.installed?`${a.note} ${u.dim(`(${i.detail})`)}`:`codex engine ${u.dim(`(${i.detail})`)}`):a?.note?f(a.note):null];p.at(-1)===null&&(p.pop(),B.stdout.write(`${p.join(`
|
|
81
|
-
`)}\n`),p.length=0,l()),s&&p.push(f(`env var ${t.envKey} is not set in this shell`)),p.length&&B.stdout.write(`${p.join(`
|
|
82
|
-
`)}\n`)}function Qn({name:e,codex:t,install:n}){return[...!t.available&&!n?.note?[{usage:`npm install -g @openai/codex`,blurb:`codex CLI not installed`,cli:{text:` ${j.red(`✘`)} codex CLI not installed - run: npm install -g @openai/codex`,layout:`plain`,prefix:``,slot:`codex`}}]:[],...R([`Use it: coder run --model ${e} "<task>"`,`Make default: coder config set engines.custom.model ${e}`],{layout:`plain`,dim:!0})]}const $n=I({name:`alias`,description:`name a spec, e.g. fast codex:luna`,usage:`Save an alias for an engine spec, e.g. fast -> codex:luna. An alias may reuse a
|
|
83
|
-
built-in name to override it.`,access:`write`,args:{name:C(`the alias`),spec:C(`the engine spec, such as codex:luna`),workspace:Q},cli:{positional:[`name`,`spec`]},run:async({options:e,args:[t,n],cwd:r})=>{let{models:i}=await import(`./models-C1O2DrXx.js`).then(e=>e.n);return i.alias(t,n,{...e,cwd:r})},print:er});function er(e){let t=j,n=`${e.provider} ${e.model}${e.effort?` (${e.effort})`:``}`;B.stdout.write(`aliased ${t.cyan(e.alias)} -> ${e.provider}:${e.model}${e.effort?`:${e.effort}`:``} ${t.dim(`= ${n}`)} ${t.dim(`(${e.file})`)}\n`)}const tr=I({name:`remove`,description:`delete a custom model`,usage:`Remove a configured custom model.`,access:`write`,args:{name:C(`the custom model`),workspace:Q},cli:{positional:[`name`]},run:async({options:e,args:[t],cwd:n})=>{let{models:r}=await import(`./models-C1O2DrXx.js`).then(e=>e.n);return r.remove(t,{...e,cwd:n})},print:e=>nr(`removed`,e.removed,e.file)});function nr(e,t,n){B.stdout.write(`${e} ${j.cyan(t)} ${j.dim(`(${n})`)}\n`)}const rr=(e,t,n)=>I({name:e?`disable`:`enable`,description:t,usage:n,access:`write`,args:{name:C(`a built-in, custom model, or alias`),workspace:Q},cli:{positional:[`name`]},run:async({options:t,args:[n],cwd:r})=>{let{models:i}=await import(`./models-C1O2DrXx.js`).then(e=>e.n);return i[e?`disable`:`enable`](n,{...t,cwd:r})},json:({name:t,file:n})=>({[e?`disabled`:`enabled`]:t,file:n}),print:({name:t,file:n})=>nr(e?`disabled`:`enabled`,t,n)}),ir=rr(!0,`turn off a model (built-in, custom, or alias)`,`Disable a model - built-in, custom, or alias. Requests for it fail until re-enabled.`),ar=rr(!1,`re-enable a disabled model`),or=I({name:`list`,description:`list built-ins, custom models, and aliases`,usage:`List built-in aliases, configured custom models, and user aliases. Only custom\nmodels are probed.\n\n${we}`,access:`read`,run:async({cwd:e})=>{let{models:t}=await import(`./models-C1O2DrXx.js`).then(e=>e.n);return t.list({cwd:e})},next:()=>R([`Add a custom model: coder model add <name> --base-url <url> --model <id> [--env-key VAR]`,`Alias a model, e.g. fast codex:luna: coder model alias <name> <spec>`,`Run with a model: coder run --model <name> "<task>"`]),print:sr});function sr(e){let t=j,n=e=>e?` ${t.dim(`(disabled)`)}`:``,r=[],i=(e,i)=>{r.push(t.bold(e));for(let e of i)`overrides`in e?r.push(` ${e.disabled?t.dim(`∅`):t.cyan(`↳`)} ${e.alias.padEnd(14)} ${t.dim(`-> ${e.spec} (overrides ${e.overrides})`)}${n(e.disabled)}`):`builtin`in e?r.push(` ${e.disabled?t.dim(`∅`):t.green(`✔`)} ${e.alias.padEnd(14)} ${t.dim(`-> ${e.model}`)}${n(e.disabled)}`):r.push(` ${e.disabled?t.dim(`∅`):t.cyan(`↳`)} ${e.alias.padEnd(14)} ${t.dim(`-> ${e.spec}`)}${n(e.disabled)}`);r.push(``)};i(`Codex models`,e.codex),i(`Claude models`,e.claude),r.push(t.bold(`Custom models`),``),e.custom.length||r.push(t.dim(` None.`));for(let{name:i,probe:a,...o}of e.custom){let e=o.disabled?t.dim(`∅`):a.reachable?t.green(`✔`):t.red(`✘`);r.push(` ${e} ${i.padEnd(14)} ${o.model} ${t.dim(`@ ${o.baseUrl}. ${a.detail}`)}${n(o.disabled)}`)}if(r.push(``),e.toggles){r.push(t.bold(`Other`),``);for(let i of e.toggles)r.push(` ${i.disabled?t.dim(`∅`):t.green(`✔`)} ${i.name.padEnd(14)} ${t.dim(`raw model id`)}${n(i.disabled)}`);r.push(``)}r.push(...we.split(`
|
|
84
|
-
`)),B.stdout.write(`${r.join(`
|
|
85
|
-
`)}\n`)}const cr=I({name:`unalias`,description:`remove an alias`,usage:`Remove a user-defined alias.`,access:`write`,args:{name:C(`the alias`),workspace:Q},cli:{positional:[`name`]},run:async({options:e,args:[t],cwd:n})=>{let{models:r}=await import(`./models-C1O2DrXx.js`).then(e=>e.n);return r.unalias(t,{...e,cwd:n})},print:e=>nr(`unaliased`,e.unaliased,e.file)}),lr=I({name:`update`,description:`change a model in place`,usage:`Update a configured custom model. Only the flags you pass change; the endpoint
|
|
86
|
-
is re-probed and the wire protocol re-detected.`,access:`write`,args:{name:C(`the custom model`),"base-url":C(`new API base`,`<url>`),model:C(`new provider model id`,`<id>`),"env-key":C(`new API-key env var`,`<VAR>`),workspace:S(`write to <repo>/.coder/config.json instead of the user file`)},cli:{positional:[`name`]},run:async({options:e,args:[t],cwd:n})=>{let{models:r}=await import(`./models-C1O2DrXx.js`).then(e=>e.n);return r.update(t,{...Jn(e),cwd:n})},json:Xn,next:({result:e})=>Qn(e),print:(e,{next:t})=>Zn(e,`updated`,()=>t(e,{slot:`codex`}))}),ur=L({name:`model`,description:`manage models: built-ins, aliases, custom endpoints`,usage:"Manage the models coder can dispatch to. `add` connects any OpenAI-compatible\nendpoint (Ollama, vLLM, OpenRouter, ...) as the custom engine, alongside the\nbuilt-in codex/claude models. Name your own shortcuts with `alias`\n(e.g. fast -> codex:luna); disable/enable turns any model off and on.",commands:[or,Yn,lr,tr,ir,ar,$n,cr],aliases:{ls:`list`}}),dr=I({name:`review`,description:`review changed code with a built-in flow`,usage:`Review changed code with a read-only agent. Every reported finding is checked
|
|
87
|
-
against the repository. Runs the built-in \`review\` flow. A local review covers
|
|
88
|
-
everything since the merge-base with the origin default branch, including
|
|
89
|
-
uncommitted and untracked files. Changed submodules are reviewed file by file.
|
|
90
|
-
PR reviews can post deduplicated inline comments.
|
|
91
|
-
|
|
92
|
-
Related: \`coder flow watch\`, \`coder docs review\`.`,access:`write`,args:{base:C(`local comparison base (default: merge-base with origin default)`,`<ref>`),head:C(`review commits through this ref only (default: the working tree)`,`<ref>`),pr:C(`review a pull request by number (origin repo) or URL; GitHub via gh for now`,`<n|url>`),since:C(`keep only PR files and hunks changed since this commit`,`<sha>`),path:v(`review only this path, relative to cwd (repeatable)`,`<p>`),exclude:v(`leave this path out, relative to cwd (repeatable)`,`<p>`),post:S(`post deduplicated inline comments and sticky PR summary`),md:S(`markdown output (the default)`),engine:C(`codex, claude, or custom`,`<name>`),model:C(`model for the review task`,`<alias|slug>`),effort:w(c(r([`low`,`medium`,`high`],{error:`expected "low", "medium", or "high"`})),`reasoning effort and review depth (default: medium depth)`,`<low|medium|high>`)},cli:{examples:[`coder review # review the branch plus uncommitted work`,`coder review --base main # review everything since main locally`,`coder review --path src --exclude src/gen # review src without generated code`,`coder review --pr 42 --post # review and post to pull request 42`]},async run({options:e,cwd:t}){let{review:n}=await import(`./executor-Dt2FFT-y.js`).then(e=>e.n);if(e.json&&e.md)throw new T(`invalid-option`,`--json and --md are mutually exclusive.`);return n.run({...e,cwd:t})},print:async e=>{let{renderReviewMarkdown:t}=await import(`./flow/builtin/review/index.js`);B.stdout.write(t(e))}}),fr=I({name:`add`,description:`connect a runner`,usage:`Connect a runner. Secret fields read environment variables with key=env:VARIABLE. Adding local prints a pairing command.`,access:`write`,args:{kind:h().check(_(`the runner kind, such as local or http`)),name:C(`runner display name`),scope:C(`personal or workspace`),field:v(`repeat for each field, use env:VARIABLE for secrets`,`key=value`),...b},globalFlags:{cwd:!1},cli:{positional:[`kind`]},async run({options:e,args:[t]}){let{addRunnerFields:n}=await import(`./runner-CTFTuaz_.js`).then(e=>e.t);return n(t,e)},print:e=>B.stdout.write(`${`command`in e?e.command:`Added ${e.name} (${e.id}).`}\n`)}),pr=I({name:`default`,description:`set the default in its scope`,usage:`Use this runner by default within its scope.`,access:`write`,args:{id:h().check(_(`the runner`)),...b},globalFlags:{cwd:!1},cli:{positional:[`id`]},async run({options:e,args:[t]}){let{runners:n}=await import(`./runner-CTFTuaz_.js`).then(e=>e.t);return n.default(t,e)},print:e=>B.stdout.write(`Default runner ${e.name}.\n`)});function mr({items:e}){if(!e.length)return void B.stdout.write(`${j.dim(`No runners.`)}\n`);B.stdout.write(`${O([{header:`id`,value:e=>e.id,paint:e=>j.cyan(e)},{header:`name`,value:e=>e.name},{header:`scope`,value:e=>e.scope},{header:`status`,value:e=>e.online?`online`:`offline`},{header:`kind`,value:e=>e.kind},{header:`default`,value:e=>e.default?`yes`:``}],e,j)}\n`)}const hr=I({name:`list`,description:`list your runners and the workspace's`,access:`read`,args:b,globalFlags:{cwd:!1},run:async({options:e})=>{let{listRunners:t}=await import(`./runner-CTFTuaz_.js`).then(e=>e.t);return t(e)},print:mr}),gr=I({name:`remove`,description:`remove a runner`,access:`write`,args:{id:h().check(_(`the runner`)),...b},globalFlags:{cwd:!1},cli:{positional:[`id`]},async run({options:e,args:[t]}){let{removeRunner:n}=await import(`./runner-CTFTuaz_.js`).then(e=>e.t);return n(t,e)},print:(e,{args:[t]})=>B.stdout.write(`Removed ${j.bold(t)}.\n`)}),_r=I({name:`rename`,description:`rename a runner`,access:`write`,args:{id:h().check(_(`the runner`)),name:h().check(_(`its new name`)),...b},globalFlags:{cwd:!1},cli:{positional:[`id`,`name`]},async run({options:e,args:[t,n]}){let{runners:r}=await import(`./runner-CTFTuaz_.js`).then(e=>e.t);return r.rename(t,n,e)},print:(e,{args:[t]})=>B.stdout.write(`Renamed ${t} to ${j.bold(e.name)}.\n`)}),vr=I({name:`serve`,description:`run your server's tasks on this machine`,usage:`Run tasks on this machine with its own claude and codex logins. Expose the port with any tunnel (cloudflared, ngrok, Tailscale Funnel or a public VS Code port) and pass the tunnel's URL; each start registers the current URL, so a changing tunnel URL is fine. Choose a default with coder runner default. Tasks use their named runner, the agent setting, your default, the workspace default, then the server default.`,access:`write`,args:{url:C(`the HTTPS address the server reaches this runner at`,`<public url>`),token:C(`one-use pairing token, --url is the Coder server`,`<token>`),"runner-url":C(`public tunnel address when pairing, or CODER_RUNNER_URL`,`<url>`),port:w(c(a().check(g(),t())),`local port the tunnel forwards to (default 4100)`,`<n>`),name:C(`shown in the dashboard (default: this machine's hostname)`),workspace:S(`run every member's tasks, not only yours (owners and admins)`),...b},mcp:!1,cli:{examples:[`cloudflared tunnel --url http://localhost:4100 # expose the port in one terminal`,`coder runner serve --url https://abc.trycloudflare.com # then serve through it`]},async run({options:e}){let{serveRunner:t}=await import(`./serve-Bzs_lEg-.js`).then(e=>e.n),n=await t({...e,runnerUrl:e[`runner-url`]}),r=()=>void n.close().finally(()=>B.exit(0));return B.once(`SIGINT`,r),B.once(`SIGTERM`,r),n},json:({server:e,close:t,...n})=>({ok:!0,...n}),next:()=>R([`Tasks run here with this machine's own claude and codex logins`,`Stop with Ctrl-C; the server marks the runner offline`],{prefix:``,paint:`cyan`}),print:e=>B.stdout.write(`Runner ${j.bold(e.name)} serves ${e.server} at ${j.cyan(e.config.url??``)} (${e.scope}), listening on localhost:${e.port}.\n`)}),yr=I({name:`test`,description:`check a runner connection`,usage:`Check the runner connection.`,access:`read`,args:{id:h().check(_(`the runner`)),...b},globalFlags:{cwd:!1},cli:{positional:[`id`]},async run({options:e,args:[t]}){let{testRunner:n}=await import(`./runner-CTFTuaz_.js`).then(e=>e.t);return n(t,e)},print:e=>B.stdout.write(`${e.ok?`OK`:`Failed`} ${e.detail} (${e.ms} ms).\n`)}),br=L({name:`runner`,description:`run your server's tasks on this machine`,usage:`Run your Coder server's tasks on your own machine, reached through any tunnel.`,commands:[fr,pr,yr,vr,hr,_r,gr]}),xr=I({name:`create`,description:`create the built-in agent's public app`,usage:`Open the page that creates the built-in agent's public app on a platform, once per server. Every workspace then connects it from its dashboard with one click. Run it where the server's environment is set.`,access:`write`,args:{integration:h().check(_(`the platform, such as github`)),org:C(`create it under this organization instead of your own account`),name:C(`the app's name and handle (default Coder)`)},globalFlags:{cwd:!1},cli:{positional:[`integration`],env:[[`DATABASE_URL`,`the server's Postgres`],[`PUBLIC_URL`,`the server's address, which goes into the app`]],examples:[`coder server app create github --name wular-coder # the hosted GitHub App`]},async run({options:e,args:[t]}){let{serverAppLink:n}=await import(`./apps-D-v5sQJk.js`).then(e=>e.t);return n(t,{owner:e.org,name:e.name})},json:({url:e})=>({ok:!0,url:e}),print({url:e}){B.stdout.write(`Open this page to create the app (valid 10 minutes):\n${e}\n`),ye(e)}}),Sr=L({name:`app`,description:`the built-in agent's public apps`,usage:`The built-in agent's apps, one per platform, shared by every workspace on this server.`,commands:[xr]}),Cr=I({name:`rotate-key`,description:`re-seal secrets with SERVER_ENCRYPTION_KEY`,usage:`Re-seal stored app, installation, engine, and linked user secrets with the current key.`,access:`write`,globalFlags:{cwd:!1},cli:{env:[[`SERVER_ENCRYPTION_KEY`,`the new key`],[`SERVER_ENCRYPTION_KEY_PREVIOUS`,`the old key, still accepted while rotating`]]},run:async()=>{let{rotateKey:e}=await import(`./maintenance-BfxcatXH.js`).then(e=>e.t);return e()},json:({moved:e})=>({ok:!0,moved:e}),print:({moved:e})=>B.stdout.write(`Re-sealed ${e} secret${e===1?``:`s`}.\n`)});function wr(e){let t=j,n=[...e.publicUrl===e.address?[]:[[`public`,e.publicUrl]],[`store`,e.database??(e.mode===`local`?o():e.store)],[`runner`,e.runner],...e.signIn?[[`sign-in`,e.signIn]]:[],...e.mintedToken?[[`token`,e.mintedToken]]:[]],r=Math.max(...n.map(([e])=>e.length))+2;B.stdout.write(`${t.bold({local:`Coder local server`,memory:`Coder test server`,cloud:`Coder server`}[e.mode])} ${t.dim(`listening on ${e.address}`)}\n`);for(let[e,i]of n)B.stdout.write(` ${t.light(e.padEnd(r))}${i}\n`);e.warnings.length&&B.stdout.write(`
|
|
93
|
-
`);for(let n of e.warnings)B.stdout.write(` ${t.yellow(`!`)} ${n}\n`);e.cacheMigration?.then(e=>{(e.tasks||e.flows||e.files)&&B.stdout.write(`\n moved ${e.tasks.toLocaleString(`en-US`)} archived tasks to ${e.cache}\n`)}).catch(e=>B.stderr.write(`\n Cache migration failed: ${e instanceof Error?e.message:String(e)}\n`))}const Tr=I({name:`serve`,description:`run the server`,usage:`Run the Coder server on Bun: the address platforms deliver events to, the dashboard, and the worker that runs tasks. With DATABASE_URL it is a full server with sign-in and workspaces. Without one it is the dashboard for this machine's CLI: its config, agents, tasks and engine logins, on loopback only. --memory makes a throwaway test server that keeps everything in memory. Configured through the environment; every variable is in coder docs self-host.`,access:`write`,args:{port:w(c(a().check(g(),t())),`listen port (default: PORT, else the port in a localhost PUBLIC_URL, else 8787)`,`<n>`),host:C(`listen address (default: HOST, else 127.0.0.1 without a database, else every interface)`,`<address>`),memory:S(`a throwaway test server: everything in memory, no sign-in, admin token only`),runner:C(`local, local-docker, vercel-sandbox, github-actions, or http`,`<name>`)},mcp:!1,cli:{env:[[`PUBLIC_URL`,`the address platforms and browsers reach the server at (default http://localhost:<port>)`],[`PORT`,`listen port, as hosts set it (default 8787)`],[`HOST`,`listen address, as --host`],[`DATABASE_URL`,`Postgres, set up with drizzle-kit push; turns on sign-in and workspaces`],[`AUTH_WULAR_URL`,`the Wular Auth issuer people sign in with (default https://auth.wular.ai)`],[`SERVER_ENCRYPTION_KEY`,`encrypts stored secrets and derives the sign-in keys; required with DATABASE_URL (openssl rand -base64 32)`],[`RUNNER`,`where tasks run: local (default), local-docker, vercel-sandbox, github-actions, http`],[`MAX_TASKS, TASK_TIMEOUT, TASK_STALL, TASK_ATTEMPTS`,`runner capacity and lifecycle limits`],[`ADMIN_TOKEN`,`local and memory servers: the dashboard and CLI key; minted and shown when unset`],[`CODER_CACHE_HOME`,`archived tasks, flows and usage (default OS cache directory/wular-coder)`],[`WORK_DIR`,`where tasks check out repositories`],[`SERVER_NAME`,`what the dashboard calls this server (default Coder)`]],examples:[`PUBLIC_URL=https://abc.ngrok.app coder server serve # receive GitHub and Slack events through a tunnel; the tunnel serves only their webhooks and callbacks`,`PUBLIC_URL=https://agents.example.com DATABASE_URL=postgres://... coder server serve # on your own host, backed by Postgres`]},async run({options:e,cwd:t}){let{rerunUnderBun:n}=await import(`./env-B9JG6gwo.js`).then(e=>e.t);if(await n(),e.memory&&!B.env.ADMIN_TOKEN&&!B.stdout.isTTY)throw new T(`invalid-option`,`Memory server needs an admin token: set ADMIN_TOKEN, or run in a terminal to get a printed one.`);let{serve:r}=await import(`./serve-CWtLyyTz.js`).then(e=>e.n),i=await r({cwd:t,port:e.port,...e.host?{host:e.host}:{},...e.runner?{runner:e.runner}:{},...e.memory?{memory:!0}:{}}),a=()=>void i.close().finally(()=>B.exit(0));return B.once(`SIGINT`,a),B.once(`SIGTERM`,a),i},json:e=>({ok:!0,address:e.address,publicUrl:e.publicUrl,runner:e.runner,store:e.store,mode:e.mode,maxTasks:e.maxTasks,...e.signIn?{signIn:e.signIn}:{},...e.mintedToken?{adminToken:e.mintedToken}:{},warnings:e.warnings}),next:({result:e})=>e.mode===`memory`?R([`the CLI reaches this server with its token in ADMIN_TOKEN: coder task list --server ${e.publicUrl}`]):[],print:wr,afterNext(e){let t=j;if(e.dashboard){let n=B.stdout.isTTY&&ye(e.dashboard);B.stdout.write(n?`\nOpening the dashboard in your browser. If it doesn't open, go to:\n ${e.dashboard}\n`:`\n ${t.light(`dashboard`)} ${e.dashboard}\n`)}}}),Er=I({name:`workflow`,description:`print the GitHub Actions workflow for RUNNER=github-actions`,usage:`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.`,access:`read`,globalFlags:{json:!1,cwd:!1},cli:{examples:[`coder server workflow > .github/workflows/coder-agent.yml # add it to a repo`]},run:async()=>{let{actionsWorkflow:e}=await import(`./runners-CYTicTb7.js`).then(e=>e.y);return e()},print:e=>B.stdout.write(e)}),Dr=L({name:`server`,description:`self-host Coder: the server, its dashboard and sign-in`,usage:`Self-host Coder: the server your agents and platform apps talk to, with a dashboard and sign-in. We run one as the hosted service; you can run your own.`,namespaces:[Sr],commands:[Tr,Cr,Er]}),Or=I({name:`setup-host`,description:`check engines and install the host plugin or skill`,usage:`Set up coder in your host: check engines and auth, seed the config, and
|
|
94
|
-
install the host plugin/skill for the named host(s). Claude Code gets its
|
|
95
|
-
marketplace plugin; "agents" installs a skill into ~/.agents/skills for
|
|
96
|
-
every host that reads the Agent Skills standard dir (Codex, Pi, OpenCode,
|
|
97
|
-
...). Codex and Cursor also get the MCP server; the Claude plugin includes it.
|
|
98
|
-
With no host, checks, seeds and registers available Codex and Cursor hosts.
|
|
99
|
-
|
|
100
|
-
To add the MCP server by hand: claude mcp add coder -- coder mcp, codex mcp
|
|
101
|
-
add coder -- coder mcp, or for Cursor "coder": { "command": "coder", "args":
|
|
102
|
-
["mcp"] } under mcpServers in ~/.cursor/mcp.json. Restart running sessions after.`,access:`write`,args:{hosts:v(`claude, agents, codex, cursor (one or more)`)},cli:{positional:[`hosts`],examples:[`coder setup-host claude # install the Claude Code plugin`,`coder setup-host agents # install the shared skill and register MCP with available Codex`,`coder setup-host codex cursor # install the skill and register MCP with both hosts`]},run:async({options:e,args:t,cwd:n,tool:r})=>{let{setupHostCore:i}=await import(`./output-D95NoAA9.js`).then(e=>e.X);return i(n,{...e,hosts:t},()=>e.json||r||kr())},next({result:e}){return[...[`codex`,`claude`].flatMap(t=>jr(e,t)),...R([`custom models (local/provider endpoints): coder model --help`],{layout:`plain`,dim:!0,prefix:` `,slot:`models`}),...R([`(coder config set <key> <value> to change)`],{layout:`plain`,dim:!0,prefix:` ${j.dim(e.configFile)} `,slot:`config`}).map(e=>({...e,usage:`coder config set <key> <value>`})),...R([e.ready?`ready - try: coder run --wait "explain this repo's layout"`:`not ready - install an engine CLI to run tasks: codex (npm install -g @openai/codex, then codex login) or claude (npm install -g @anthropic-ai/claude-code, then claude auth login)`],{layout:e.ready?`good`:`bad`,prefix:``})]},print:(e,{next:t})=>Ar(e,t)});function kr(){B.stdout.write(`${j.bold(`Coder host setup`)}\n\n`)}function Ar(e,t){let n=j.bold,r=j.dim,{codex:i,claude:a,codexUpdate:o,config:s,configFile:c,claudePlugin:l,agentsSkill:u,ready:d}=e,f=[];B.stdout.write(`${n(`Available Engines`)}\n`);for(let n of[`codex`,`claude`]){let i=e[n];!i.available||!i.loggedIn?t(e,{slot:n}):B.stdout.write(`${D(`${n.padEnd(8)}${r(`${i.detail}; ${i.auth}`)}`)}\n`)}t(e,{slot:`models`}),o?.updated?f.push(D(`codex ${r(`updated ${o.from} -> ${i.detail} (GPT-6 support)`)}`)):o&&f.push(N(`codex ${o.note}`)),f.push(``);let p=e=>{let t=s.engines?.[e]??{};return[t.model,t.effort,t.permissions].filter(Boolean).join(`/`)};f.push(n(`Config`),` chain: ${(s.chain??[]).join(` -> `)} codex: ${p(`codex`)} claude: ${p(`claude`)}`),B.stdout.write(`${f.join(`
|
|
103
|
-
`)}\n`),f.length=0,t(e,{slot:`config`}),f.push(``);let ee=[[`claude plugin`,l??null],[`agents skill `,u??null]];for(let[e,t]of ee)t&&f.push(t.installed?D(`${e} ${r(t.note)}`):N(`${e} ${t.note}`),``);f.push(...e.mcp.map(e=>e.installed?D(e.note):N(e.note))),f.length&&B.stdout.write(`${f.join(`
|
|
104
|
-
`)}\n`)}function jr(e,t){let n=e[t];if(n.available&&n.loggedIn)return[];let r=n.available?t===`codex`?`codex login`:`claude auth login`:`npm install -g ${t===`codex`?`@openai/codex`:`@anthropic-ai/claude-code`}`,i=n.available?`${t.padEnd(8)}not logged in${t===`codex`?` ${j.dim(`(${n.auth})`)}`:``} - run: ${r}`:`${t.padEnd(8)}CLI not installed - run: ${r}`;return[{usage:r,blurb:`${t} ${n.available?`not logged in`:`CLI not installed`}`,cli:{text:i,layout:`bad`,prefix:``,slot:t}}]}function Mr(e,t){let n=j;if(!t.length)return void B.stdout.write(`${n.dim(`No pending approvals for task ${e}.`)}\n`);for(let e of t){let t=e.answered??`pending`;B.stdout.write(`${n.cyan(e.id)} ${t.padEnd(8)} ${n.dim(String(e.summary??``))}\n`)}}function Nr(e){let t=j;if(!e.length)return void B.stdout.write(`${t.dim(`No pending approvals.`)}\n`);B.stdout.write(`${O([{header:`approval-id`,value:e=>e.id,paint:e=>t.cyan(e)},{header:`task-id`,value:e=>e.taskId,paint:e=>t.cyan(e)},{header:`age`,value:e=>e.createdAt?E(m(e.createdAt)):`-`},{header:`summary`,value:e=>e.summary,paint:e=>t.light(e)}],e,t)}\n`)}const Pr=I({name:`approvals`,description:`pending approvals (all tasks, or one)`,usage:`List only pending approvals across all tasks, or for one task. Answered approvals stay in the task log.`,access:`read`,args:{"task-id":C(`one task (default: pending approvals of every task)`),...x},cli:{positional:[`task-id`]},run:async({options:e,args:[t]})=>{let{tasks:n}=await import(`./task-CPzBITsp.js`).then(e=>e.t);return(await n.approvals(t,{...e,organization:e.workspace})).filter(e=>e.answered==null)},json:(e,{options:t,args:[n]})=>t.server===void 0&&n?e.map(({taskId:e,...t})=>t):t.server===void 0?e.map(({taskId:e,id:t,summary:n,createdAt:r})=>({taskId:e,id:t,summary:n,createdAt:r})):e,next({result:e,args:t}){if(t.server!==void 0)return e.length?[]:R([`Check tasks: coder task list`]);let n=e;if(!n.length)return t[`task-id`]?[]:R([`Check tasks: coder task list`]);let r=n.length===1?n[0].id:`<approval-id>`;return R([`Answer: coder task approve ${r} [--deny]`])},print(e,{options:t,args:[n]}){if(t.server===void 0)return n?Mr(n,e):Nr(e);if(!e.length)return void B.stdout.write(`${j.dim(`No pending approvals.`)}\n`);for(let t of e)B.stdout.write(`${t.taskId} ${JSON.stringify(t)}\n`)}}),Fr=I({name:`approve`,description:`answer an escalated permission`,usage:`Answer an escalated permission request. Accepts by default; --deny rejects it.
|
|
105
|
-
Approval ids are unique, so the task id is optional.`,access:`write`,args:{"task-id":C(`the task, or the approval id alone`),"approval-id":C(`the approval to answer`),deny:S(`reject the request instead of accepting`),...x},cli:{positional:[`task-id`,`approval-id`]},run:async({options:e,args:[t,n]})=>{let{tasks:r}=await import(`./task-CPzBITsp.js`).then(e=>e.t);return r.approve(t,n,{...e,organization:e.workspace})},print:(e,{options:t,args:n})=>B.stdout.write(t.server===void 0?`${t.deny?`Denied`:`Approved`} ${j.cyan(e.approvalId)} on task ${j.cyan(e.taskId)}.\n`:`${t.deny?`Denied`:`Approved`} ${j.cyan(n[1])}.\n`)}),$=e=>e===1?``:`s`,Ir=I({name:`archive`,description:`archive a session (or --all-stopped)`,usage:`Archive a task session so it drops out of the default list (see it again with
|
|
106
|
-
\`coder task list --archived [--limit N]\`). Pass --all-stopped to archive every
|
|
107
|
-
finished task. A running task keeps running; steering an archived task
|
|
108
|
-
brings it back.`,access:`write`,args:{"task-id":C(`the task to archive`),"all-stopped":S(`archive every stopped (finished) task`),...x},cli:{positional:[`task-id`]},run:async({options:e,args:[t]})=>{let{tasks:n}=await import(`./task-CPzBITsp.js`).then(e=>e.t);return n.archive(t,{...e,organization:e.workspace,allStopped:e[`all-stopped`]})},print(e,{options:t}){if(e.count===void 0)return void B.stdout.write(`Archived task ${j.cyan(e.taskId)}.\n`);B.stdout.write(t.server===void 0?e.count?`Archived ${e.count} stopped task${$(e.count)}.\n`:`${j.dim(`No stopped tasks to archive.`)}\n`:`Archived ${e.count} server task${$(e.count)}.\n`)}});function Lr(e,t,n){let[r,...i]=e,a=i.join(` `).trim();if(!r||!a)throw new T(`invalid-option`,t,{hint:n});return{id:r,text:a}}function Rr(e,t=!1){let{taskId:n,steered:r}=e;if(r===`queued`){B.stdout.write(`${j.dim(`[coder]`)} follow-up queued for task ${j.cyan(n)}; it runs when the current turn finishes.\n`),t&&B.stdout.write(`\n${j.dim(`[coder] --wait is not available for a queued follow-up.`)}\n`);return}if(!t){B.stdout.write(r===`live`?`${j.dim(`[coder]`)} steered follow-up into running task ${j.cyan(n)}.\n`:`${j.dim(`[coder]`)} resumed task ${j.cyan(n)} with the follow-up (same thread, same id).\n`);return}B.stdout.write(`\n${e.finalMessage||`(no final message)`}\n\n`),B.stderr.write(`${j.dim(`[coder] task=${n} status=${e.status??`unknown`}`)}\n`)}const zr=I({name:`steer`,description:`continue a task's thread`,usage:`Continue a task's thread with new instructions. They are injected into a live Codex or
|
|
109
|
-
Claude turn at its next tool boundary and queued across a startup or completion race.
|
|
110
|
-
A stopped, finished, or archived task resumes on the same task id. It reuses the
|
|
111
|
-
task's engine, model, and permissions unless overridden.`,access:`write`,args:{"task-id":C(`the task to continue`),text:v(`the follow-up instructions`),wait:S(`run in the foreground and block until the answer is ready`),model:C(`override the task's model for this follow-up`,`<alias|slug>`),effort:C(`override the task's reasoning effort`,`<low|medium|high>`),permissions:C(`read-only · workspace-write · auto`,`<mode>`),...x},cli:{positional:[`task-id`,`text`],examples:[`coder task steer task-abc "now add tests" # continue that task with a follow-up`]},async run({options:e,args:t}){let{tasks:n}=await import(`./task-CPzBITsp.js`).then(e=>e.t),{id:r,text:i}=Lr(t,`Missing task id or follow-up text.`,[`Usage: coder task steer <task-id> "<follow-up>" [--wait]`,`Help: coder task steer --help`]);return n.steer(r,i,{...e,organization:e.workspace})},json(e,{options:t}){if(`attempts`in e)return J(e);let n=e;return t.server!==void 0||!t.wait||n.steered===`queued`?e:{taskId:n.taskId,status:n.status??null,finalMessage:n.finalMessage??null}},next({result:e,args:t}){let n=e;return t.server===void 0?n.steered===`queued`&&!t.wait?[]:t.wait&&n.steered!==`queued`?K(n.taskId).map(e=>({...e,cli:{...e.cli,stream:`stderr`}})):[G(n.taskId,t,`Wait in its own background shell, one per task: coder task result ${n.taskId} --wait`)]:t.wait&&[`completed`,`failed`,`cancelled`].includes(n.status??``)?K(e.task.id,t):[]},print(e,{options:t,args:[n]}){if(t.server===void 0)return Rr(e,t.wait);if(t.wait)return q(e,j);B.stdout.write(`Steered server task ${j.cyan(n)}.\n`)},exit(e,{options:t}){let n=e;if(t.wait&&(t.server!==void 0||n.steered!==`queued`))return n.status===`completed`?0:1}}),Br=I({name:`ask`,description:`ask about a task without interrupting it`,usage:`Answer a question ABOUT a task without touching it: a read-only sidecar reads
|
|
112
|
-
the task's progress log, result, and workspace and answers; the task never
|
|
113
|
-
sees the question and its thread is not steered. Works whether the task is
|
|
114
|
-
running or stopped. To change what the task does, use \`coder task steer\`.`,access:`read`,args:{"task-id":C(`the task to ask about`),question:v(`the question`),model:C(`sidecar model (default: the task's own)`,`<alias|slug>`),effort:C(`sidecar reasoning effort`,`<low|medium|high>`),...x},cli:{positional:[`task-id`,`question`],examples:[`coder task ask task-abc "what approach did you take and why?" # probe a decision without derailing the task`]},async run({options:e,args:t}){let{tasks:n}=await import(`./task-CPzBITsp.js`).then(e=>e.t),{id:r,text:i}=Lr(t,`Missing task id or question.`,[`Usage: coder task ask <task-id> "<question>"`,`Help: coder task ask --help`]);return n.ask(r,i,{...e,organization:e.workspace,onAsking:t=>e.json||B.stderr.write(`${j.dim(`[coder]`)} asking about task ${j.cyan(t)} (read-only sidecar; the task is not interrupted)...\n`)})},json:({ok:e,...t})=>t,print(e,{options:t,args:[n]}){if(t.server!==void 0)return void B.stdout.write(`Asked server task ${j.cyan(n)}.\n`);let{answer:r,error:i}=e;r?B.stdout.write(`\n${r}\n`):B.stdout.write(`${j.dim(`(no answer)`)}${i?` ${j.red(i)}`:``}\n`)},exit:(e,{options:t})=>t.server===void 0?+!e.ok:void 0}),Vr=I({name:`delete`,description:`delete a session (or --all-archived)`,usage:`Delete a task's session from disk. This is permanent. Pass --all-archived to
|
|
115
|
-
delete every archived task at once. A running task must be stopped first.`,access:`write`,args:{"task-id":C(`the task to delete`),"all-archived":S(`delete every archived task`),...x},cli:{positional:[`task-id`]},run:async({options:e,args:[t]})=>{let{tasks:n}=await import(`./task-CPzBITsp.js`).then(e=>e.t);return n.delete(t,{...e,organization:e.workspace,allArchived:e[`all-archived`]})},print(e,{options:t}){if(e.count===void 0)return void B.stdout.write(`Deleted task ${j.cyan(e.taskId)}.\n`);B.stdout.write(t.server===void 0?e.count?`Deleted ${e.count} archived task${$(e.count)}.\n`:`${j.dim(`No archived tasks to delete.`)}\n`:`Deleted ${e.count} server task${$(e.count)}.\n`)}});function Hr(e){if(!e.length)return void B.stdout.write(`No server tasks.
|
|
116
|
-
`);let t=j;B.stdout.write(O([{header:`task-id`,value:e=>e.task.id,paint:e=>t.cyan(e)},{header:`status`,value:e=>e.status,paint:(e,t)=>k(t.status,e.length)},{header:`agent`,value:e=>e.task.agent},{header:`source`,value:e=>e.task.source},{header:`request`,value:e=>(e.task.prompt??(e.task.event?`${e.task.event.type}: ${e.task.event.text}`:`-`)).slice(0,80)},{header:`reply`,value:e=>rt(e)??`-`}],e,t))}function Ur(e,t,n){let r=j;if(!e.length){let e=t.archived?`archived tasks`:t.running?`running tasks`:t.stopped?`recently stopped tasks`:`recent tasks`;B.stdout.write(`No ${e}.\n`);return}let i=[{header:`task-id`,value:e=>e.taskId,paint:e=>r.cyan(e),max:28},{header:`status`,value:e=>e.status,paint:(e,t)=>k(t.status,e.length),max:16},{header:`engine`,value:e=>(e.engine===`custom`&&e.model?e.model:(e.engine??`-`)+(e.model?`/${e.model}`:``))+(e.effort?`/${e.effort}`:``),paint:e=>r.light(e),max:26},{header:`cwd`,value:e=>e.cwd?z.basename(e.cwd):`-`,paint:e=>r.light(e),max:24},{header:`name`,value:e=>{let t=e.archived?` ${r.dim(`(archived)`)}`:``;return`${e.name?e.name:r.light(e.prompt)}${e.idleMs!==null&&e.idleMs>=12e4?` ${(e.idleMs>6e5?r.red:r.dim)(`· idle ${E(e.idleMs)}`)}`:``}${t}`}}],a=[],o=new Map;for(let t of e){if(!t.flowRunId){let e=a.at(-1);e&&!e.header?e.rows.push(t):a.push({rows:[t]});continue}let e=o.get(t.flowRunId);if(!e){let i=n(t.flowRunId);e={header:i?`(${r.bold(t.flowRunId)} ${i.status}. Flow ${i.name})`:`(${r.bold(t.flowRunId)} flow)`,rows:[]},o.set(t.flowRunId,e),a.push(e)}e.rows.push(t)}B.stdout.write(O(i,a,r)),e.clipped&&B.stdout.write(r.dim(`\n... ${e.clipped} more not shown (--limit ${t.limit===`all`?void 0:t.limit})\n`))}const Wr=I({name:`list`,description:`list recent tasks (by default running + just stopped)`,usage:`List recent tasks across all workspaces, most recent first: running tasks plus
|
|
117
|
-
ones stopped within the last 30 minutes. Older stopped tasks auto-archive and
|
|
118
|
-
move to --archived. Shortcut: \`coder list\`.`,access:`read`,args:{running:S(`show only running tasks`),stopped:S(`show only recently stopped tasks (not yet archived)`),archived:S(`show only archived tasks (auto-archived or via task archive)`),limit:ae(`tasks per page (default: 50; all for every task)`),cursor:C(`continue from the previous page cursor`),dir:C(`only tasks launched in that workspace`),...x},run:async({options:e})=>{let t=e.limit??50;if(e.server!==void 0){let{connect:n}=await import(`./remote-CDm0YUU3.js`).then(e=>e.i),r=n({...e,organization:e.workspace}),i=[],a=e.cursor??``,o;do{let n=await r.tasks.list({cursor:a,limit:t===`all`?200:Math.min(200,t-i.length),status:e.running?`active`:void 0,archived:e.archived});i.push(...n.items.filter(t=>!e.stopped||[`completed`,`failed`,`cancelled`].includes(t.status))),o=n.next,a=o??``}while(o&&(t===`all`||i.length<t));return{items:i,...o?{next:o}:{}}}let{tasks:n}=await import(`./task-CPzBITsp.js`).then(e=>e.t),r=await n.list({...e,limit:`all`}),i=0;if(e.cursor){let t;try{if(t=De(e.cursor),typeof t!=`string`)throw Error()}catch{throw new T(`invalid-option`,`Invalid task list cursor.`)}let n=r.findIndex(e=>e.taskId===t);if(n<0)throw new T(`invalid-option`,`Task list cursor is no longer available; start a new list.`);i=n+1}let a=r.slice(i,t===`all`?void 0:i+t),o=i+a.length<r.length;return{items:Object.assign(a,{clipped:0,archived:r.archived}),...o?{next:Ee(a.at(-1).taskId)}:{}}},json:(e,{options:t})=>t.server===void 0?e:{...e,items:e.items.map(({task:e,status:t,createdAt:n,updatedAt:r,startedAt:i,finishedAt:a})=>({task:{id:e.id,name:e.name,agent:e.agent,source:e.source,cwd:e.cwd,prompt:e.prompt?.replace(/\s+/g,` `).trim().slice(0,80)},status:t,createdAt:n,updatedAt:r,startedAt:i,finishedAt:a}))},next({result:e,args:t}){let n=e.items,r=t.server===void 0?R(n.length?[`Result: coder task result <task-id>`,...t.archived?[]:[`Older tasks: coder task list --archived [--limit N]`]]:n.archived?[`${n.archived} archived: coder task list --archived [--limit N]`]:[]):[];return e.next&&r.push(...R([`Next page: coder task list --cursor ${e.next} --limit ${t.limit??50}${t.running?` --running`:``}${t.stopped?` --stopped`:``}${t.archived?` --archived`:``}${t.dir?` --dir ${JSON.stringify(t.dir)}`:``}${t.server===void 0?``:` --server${t.server===!0?``:` ${JSON.stringify(t.server)}`}`}${t.workspace?` --workspace ${JSON.stringify(t.workspace)}`:``}`],{layout:`plain`})),r},async print(e,{options:t}){if(t.server!==void 0)Hr(e.items);else{let{readFlowRecord:n}=await import(`./executor-Dt2FFT-y.js`).then(e=>e.D);Ur(e.items,t,n)}}});function Gr(e,t={}){let n=G(e,t,`run this in its own background shell, one per task (never wait on several tasks in one call). Returns with the answer or a pending approval.`);return n.cli={...n.cli,layout:`rows`,title:`Next step`},[n,...[{usage:`coder task steer ${e} "<follow-up>"`,blurb:`steer the task with a message (use 'ask' without interrupting main thread)`},{usage:`coder task stop ${e}`,blurb:`stop the task`},{usage:`coder task list`,blurb:`recent tasks`},{usage:`coder task --help`,blurb:`all task commands`}].map(e=>({...e,cli:{layout:`rows`,title:`Related`}}))]}function Kr(e,t){B.stdout.write(`${j.dim(`[coder]`)} task ${j.blue(e)} started in the background (${t}).\n`)}function qr(e){B.stderr.write(`${j.dim(`[coder]`)} Task ${j.cyan(e)} started and is waiting to finish. Press Ctrl-C to detach. It keeps running.\n`)}function Jr(e){B.stderr.write(`\n${j.dim(`[coder] Detached. The task is still running.`)}\n`)}function Yr(e){B.stdout.write(`\n${V({finalMessage:e.finalMessage??void 0},e.error,`(no final message)`)}\n\n`);let t=e.tokens?` tokens=${P(e.tokens,e.model)}`:``;B.stderr.write(`${j.dim(`[coder] task=${e.taskId} status=${e.status}${t}`)}\n`)}const Xr=I({name:`run`,description:`run a task (background; --wait blocks)`,usage:`Dispatch a coding task to the configured engine. Backgrounds by default and\nprints a task id; --wait runs in the foreground and prints the answer.\nShortcut: \`coder run "<text>"\`.\n\nWriting a task: one task per focused goal, independent goals as parallel runs.\nThe worker starts with nothing but the text, so include the goal, file paths,\nconstraints and any context only you have. Delegate rather than doing the work\nyourself first, however small it looks.\n\nWaiting: run \`coder task result <task-id> --wait\` in its own background shell, one\nper task. Never wait on several tasks in one call, or their approvals and answers\nnever reach you one by one.\n\n${we}`,access:`write`,args:{prompt:v(`the task text`),"output-schema":C(`JSON Schema for the task answer`,`<json>`),name:C(`label the task (shown in list/result)`),agent:C(`run as that agent: its system.md, engine settings, MCP servers and flows; flags override them`,`<id>`),system:C(`standing instructions prepended to the task (kept out of prompt previews)`,`<text>`),wait:S(`run in the foreground and block until the answer is ready`),engine:C(`engine to use; custom runs your configured custom models (default: first in the chain)`,`<codex|claude|custom>`),model:C(`luna/sol/astra (codex) · sonnet/opus/fable (claude) · a custom model (coder model list)`,`<alias|slug>`),effort:C(`reasoning effort`,`<low|medium|high>`),permissions:C(`read-only · workspace-write · auto (default: auto)`,`<mode>`),mcp:C('attach MCP servers from `mcp` in .coder/config.json by name (or all), or an inline JSON array [{"name","command","args","env","tools"}]; none by default, all adds your engine\'s own MCP servers',`<names|all|json>`),connections:C(`use only these connections (coder connection list), within the agent's`,`<ids>`),"add-dir":v(`give the task another directory beyond --cwd (repeatable); read-only can only read it, other modes can also write`,`<dir>`),server:ie(`run the task on your Coder server and follow it here (--background prints its id)`,`[url]`),workspace:C(`with --server: the workspace to run in (default: the saved one)`,`<slug>`),yes:S(`with --server: connect to a server used for the first time without asking`),background:S(`with --server: print the task id instead of following it`),repo:C(`with --server: check out a repo from the workspace's installs`,`<owner/name>`),runner:C(`with --server: where it runs (a runner kind or a registered runner)`),"simulate-approval":S(`test only: raise a fake approval request`)},cli:{positional:[`prompt`],exit:[[0,`The task started, or --wait printed a successful answer.`],[1,`Dispatch or the task failed.`],[3,`No engine could start; follow fallback.instructions in the JSON payload.`],[4,`An approval is pending; answer it, then run result --wait again.`],[130,`The foreground wait was detached and the task is still running.`]],examples:[`coder run "add a /health endpoint" # dispatch in the background, print a task id`,`coder result <task-id> --wait # then block until it finishes and print the answer`,`coder run --wait "fix the failing test" # or block on the run itself`,`coder task run --model luna --system "tests live in test/, don't touch anything outside of it" "rename foo to bar" # pick an engine via its model alias; --system adds standing instructions`,`coder task run --agent reviewer "review the last commit" # run a repo agent from .coder/agents/reviewer`,`coder run --add-dir ../api --add-dir ../shared "update the client for the new endpoint" # let the task reach sibling repos too`]},async run({options:e,args:t,tool:n,next:r}){let{tasks:i}=await import(`./task-CPzBITsp.js`).then(e=>e.t),a=e.json,o;return n||B.on(`SIGINT`,()=>{o&&(Jr(o),r({taskId:o,phase:`detached`},{stream:`stderr`,force:!0})),B.exit(130)}),i.run(t.join(` `).trim(),{cwd:e.cwd,agent:e.agent,outputSchema:e[`output-schema`]?JSON.parse(e[`output-schema`]):void 0,engine:e.engine,model:e.model,effort:e.effort,permissions:e.permissions,name:e.name,system:e.system,mcp:e.mcp,connections:e.connections?.split(`,`).map(e=>e.trim()).filter(Boolean),addDirs:e[`add-dir`],wait:e.server===void 0?e.wait:!e.background,simulateApproval:e[`simulate-approval`],repo:e.repo,runner:e.runner,server:e.server,yes:e.yes,organization:e.workspace,onFallback:({engine:e,detail:t,next:n})=>B.stderr.write(`[coder] ${e} failed to start (${t}); falling back to ${n}.\n`),onNote:e=>B.stderr.write(`[coder] ${e}\n`),onWaiting:e=>{o=e,!a&&!n&&(qr(e),r({taskId:e,phase:`waiting`},{stream:`stderr`,style:`stdout`}))},onLog:e=>n?void 0:a?B.stdout.write(`${JSON.stringify(e,null,2)}\n`):Y(e,j)})},json:e=>`attempts`in e?J(e):e,next({result:e,args:t}){let n=e.phase,r=`task`in e?e.task.id:e.taskId;return n===`detached`?[G(r,t,`Wait in its own background shell, one per task: coder task result ${r} --wait`)]:n===`waiting`?Gr(r,t):`attempts`in e?[`completed`,`failed`,`cancelled`].includes(e.status)?t.background?[]:K(r,t):[{...G(r,t,``),cli:{hidden:!0}}]:t.wait?K(r).map(e=>({...e,cli:{...e.cli,stream:`stderr`}})):Gr(r,t)},print(e,{options:t}){if(`attempts`in e)return t.background?void B.stdout.write(`${e.task.id}\n`):q(e,j);t.wait?Yr(e):Kr(e.taskId,e.status)},exit:(e,{options:t})=>(`attempts`in e?!t.background:t.wait)?e.status===`completed`?0:1:void 0}),Zr=I({name:`stop`,description:`interrupt a running task`,usage:`Interrupt a running task and mark it cancelled.`,access:`write`,args:{"task-id":C(`the task to stop`),...x},cli:{positional:[`task-id`]},run:async({options:e,args:[t]})=>{let{tasks:n}=await import(`./task-CPzBITsp.js`).then(e=>e.t);return n.stop(t,{...e,organization:e.workspace})},print:(e,{options:t,args:[n]})=>B.stdout.write(t.server===void 0?`Stopped task ${j.cyan(e.taskId)} ${j.dim(`(${e.interrupt})`)}\n`:`Stopped server task ${j.cyan(n)}.\n`)}),Qr=L({name:`task`,description:`run, follow and steer coding tasks`,commands:[Xr,Wr,lt,mt,zr,Br,Zr,Ir,Vr,Pr,Fr],aliases:{stream:`watch`,ls:`list`}}),$r=I({name:`upgrade`,description:`update the CLI and host plugins`,usage:`Update the coder CLI through whichever package manager installed it, then refresh
|
|
119
|
-
the host plugins to match.`,access:`write`,args:{"cli-only":S(`update just the CLI`),"plugins-only":S(`refresh just the host plugins`),codex:S(`limit the refresh to the Agent Skills copy (Codex, Pi, ...)`),claude:S(`limit the refresh to the Claude Code plugin`),pm:C(`force a package manager instead of auto-detecting`,`<npm|pnpm|yarn|bun>`)},globalFlags:{json:!1,cwd:!1},run:async({options:e,tool:t})=>{let{upgradeCore:n}=await import(`./output-D95NoAA9.js`).then(e=>e.X);return n({...e,cliOnly:e[`cli-only`],pluginsOnly:e[`plugins-only`]},t?()=>{}:ei)},print:ti});function ei(e){B.stdout.write(`${j.bold(`Updating coder CLI`)} ${j.dim(`${e}...`)}\n`)}function ti(e){let t=j.bold,n=j.dim,r=(e,r)=>r&&e&&r!==e?`${e} ${n(`->`)} ${t(r)}`:`${r??e??`?`} ${n(`(unchanged)`)}`,i=(e,t)=>`${t.installed?D(`${e} ${r(t.from,t.to)} ${n(`- ${t.note}`)}`):N(`${e} ${t.note}`)}\n`;e.cli&&B.stdout.write(e.cli.changed?`${D(`coder CLI ${r(e.cli.from,e.cli.to)}`)}\n`:`${D(`coder CLI ${e.cli.from} ${n(`(already latest)`)}`)}\n`),e.claudePlugin&&B.stdout.write(i(`claude plugin`,e.claudePlugin)),e.agentsSkill&&B.stdout.write(i(`agents skill `,e.agentsSkill))}const ni=ee({name:`coder`,description:`Delegate a coding task to the best available engine and steer it while it runs.`,namespaces:[Qr,Kn,xt,en,Dr,br,Et,ur,Gt],commands:[dr,kt,Or,tn,$r,qn]}),ri={run:[`task`,`run`],list:[`task`,`list`],result:[`task`,`result`],dash:[`server`,`serve`]};export{ri as SHORTCUTS,ni as cli};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{qi as e}from"./core-DwsAMCnL.js";import{Bt as t,Ct as n,Zt as r,zt as i}from"./output-D95NoAA9.js";import{a,t as o}from"./remote-CDm0YUU3.js";import s from"node:path";import c from"node:process";import{createHash as l}from"node:crypto";var u=e({connection:()=>T});const d=(e,t)=>new r(`invalid-option`,e,t?{hint:t}:{}),f=e=>e.cwd?s.resolve(e.cwd):c.cwd(),p=e=>e.server!==void 0,m=e=>o({...e,organization:e.organization??e.workspace}),h=e=>m(e).connections,g=()=>d(`Signing in needs a Coder server.`,`Repeat with --server <url>, or add it in coder dash`);async function _(e){let[{LocalStore:t},{INTEGRATIONS:n},i]=await Promise.all([import(`./local-D55UkW93.js`).then(e=>e.r),import(`./integrations-DyInAa5g.js`).then(e=>e.r),import(`./apps-D-v5sQJk.js`).then(e=>e.bt)]),a={store:new t,config:{store:`memory`,runner:`local`},integrations:n,organizationId:`default`,local:{cwd:e,port:0}},o=async e=>{try{return await e()}catch(e){throw e instanceof i.ConnectionError?new r(`invalid-option`,e.message,{needs:e.needs}):e}};return{ctx:a,list:()=>i.connectionRows(a),add:e=>o(()=>i.addConnection(a,e)),update:(e,t)=>o(()=>i.changeConnection(a,e,t)),remove:e=>o(()=>i.removeConnection(a,e))}}async function v(e){return p(e)?h(e).list():(await _(f(e))).list()}async function y(e,t){if(p(e))return(await m(e).credentials.list()).some(n=>n.name===t&&(e.me||n.scope===`workspace`));let{parseCredentialId:n}=await import(`./apps-D-v5sQJk.js`).then(e=>e.wt),{ctx:r}=await _(f(e));return(await r.store.list(`credential`)).some(e=>n(e.id).name===t)}async function b(e,t){let n=e.key??(await e.askKey?.())?.trim();if(!n)throw d(`${t} needs a key.`,`Give it with --key, on stdin or at the prompt`);return n}async function x(e,t,n){let r=new URL(n,a(e)),i=r.searchParams.get(`state`)??r.searchParams.get(`attempt`);if(!i)throw d(`Sign-in did not start.`);let o=l(`sha256`).update(i).digest(`hex`);e.onAuthorize(r.href);let s=Date.now()+6e5;for(;Date.now()<s;){let n=(await h(e).list(o,t)).find(e=>e.id===t);if(!n)throw d(`The connection was removed before sign-in finished.`);if(n.status===`ok`)return n}throw d(`Sign-in did not finish.`,`Try again: coder connection reconnect ${t}`)}async function S(e,t){let[n,...r]=t.command??[],i=t.access&&{access:t.access},a=t.me?{owner:`me`}:{};if(n&&t.url)throw d(`Use either --url or a command, not both.`);if(t.access&&![`read`,`write`].includes(t.access))throw d(`Invalid --access value.`,`Use read or write`);if(n||t.url){let o=t.auth??(t.key?`key`:t.url?void 0:`none`);if(o!==void 0&&![`oauth`,`key`,`none`].includes(o))throw d(`Invalid --auth value.`,`Use oauth, key or none`);if(o===`oauth`&&!p(t))throw g();if(n&&o===`key`&&!t.env)throw d(`Name the variable the key goes in with --env.`);let s=t.tools?.length?{tools:t.tools}:{};return{name:e,provider:`mcp`,...a,...i,...o?{auth:o}:{},endpoint:t.url?{url:t.url,...s}:{command:n,...r.length?{args:r}:{},...s},...o===`key`?{key:await b(t,e),keyIn:t.url?{header:t.header??`Authorization`}:{env:t.env}}:{}}}if(t.env){let n=t.key??(t.credential||await y(t,t.env)?void 0:c.env[t.env]??await b(t,e));return{name:e,provider:`env`,...a,keyIn:{env:t.env},...n?{key:n}:{},...t.credential?{credential:t.credential}:{}}}let{INTEGRATIONS:o}=await import(`./integrations-DyInAa5g.js`).then(e=>e.r);if(!p(t)&&!o[e]?.auth.user)throw d(`Say what to connect.`,`Give --env <NAME> for an API key, --url <url> or -- <command> for an MCP server, or a platform name`);if(!p(t))throw g();return{name:e,provider:e,...a}}async function C(e,t){if(!e)throw d(`Name the connection.`,`See them: coder connection list`);let n=await v(t),r=n.find(t=>t.id===e)??n.find(t=>t.mine&&t.id.endsWith(`:${e}`));if(!r)throw d(`No connection "${e}".`,`See them: coder connection list`);return r}async function w(e){let{loadAgents:r}=await import(`./load-zhcrwSRF.js`).then(e=>e.s),{INTEGRATIONS:i}=await import(`./integrations-DyInAa5g.js`).then(e=>e.r),a=(e,n,r)=>({name:e,source:n,target:r.connection?`connection ${r.connection}`:r.url??[r.command,...r.args??[]].join(` `),approved:!!r.connection||t(r)}),o=(e={})=>Object.entries(e).filter(([,e])=>e.repository);return[...o(n(e).mcp).map(([e,t])=>a(e,`repo`,t)),...(await r(e,i,{includeDisabled:!0})).flatMap(e=>o(e.definition.mcp).map(([t,n])=>a(t,`agent ${e.id}`,n)))]}const T={async add(e,t={}){if(!e)throw d(`Name the connection.`,`Usage: coder connection add <name> ...`);let n=await S(e,t),i=p(t)?h(t):await _(f(t)),a;try{a=await i.add(n)}catch(o){if(!(o instanceof r)||o.needs!==`key`||!n.endpoint?.url||n.auth||n.key||!t.askKey)throw o;a=await i.add({...n,auth:`key`,key:await b(t,e),keyIn:{header:t.header??`Authorization`}})}return a.authorize&&t.onAuthorize?x(t,a.id,a.authorize):a},async list(e={}){return{connections:await v(e),declared:await w(f(e))}},async remove(e,t={}){let n=await C(e,t);return p(t)?await h(t).remove(n.id):await(await _(f(t))).remove(n.id),n},async reconnect(e,t={}){let n=await C(e,t);if(n.auth===`oauth`){if(!p(t))throw g();let{url:e}=await h(t).authorize(n.id);return t.onAuthorize?x(t,n.id,e):{...n,authorize:e}}if(n.auth!==`key`)throw d(`${n.name} uses no key or sign-in.`);let r=await b(t,n.name);return p(t)?h(t).update(n.id,{key:r}):(await _(f(t))).update(n.id,{key:r})},approve:(e,t={})=>i(f(t),e,t.agent)};export{u as n,T as t};
|
package/dist/context-65bOofts.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{Mn as e,kn as t,rt as n,xt as r}from"./errors-XBA-Ls4n.js";import{t as i}from"./docs-x-l7gjFE.js";import{cli as a}from"./cmd-DX5ByXo3.js";import o from"node:path";const s=e=>`# Coder dispatch${e?` (${e} host)`:``}`,c=(e,t)=>`## Setup\n\nIf \`coder\` is not on PATH, install it yourself without asking: \`npm install -g @wular/coder\`. When a dispatch fails because engines are missing or logged out, run \`${e}\` and follow its output. It checks engines and auth, fixes what it can, prints the exact fix for the rest, and is safe to re-run. Ask the user before installing an engine CLI or changing auth; if it updated codex, tell the user to restart their codex session.${t?" For a guided setup, suggest `/coder:setup`.":``}`,l=(e,t)=>[`## Using the CLI`,``,"- 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.","- `coder docs` lists the deeper guides; `coder docs <topic>` prints one.",`- ${e}`,...t?[`- ${t}`]:[]].join(`
|
|
2
|
-
`),u=(t,n)=>e({name:t,description:`Use Coder for coding, implementation, or investigation tasks - features, fixes, refactors, debugging, tests, code questions - one coder per focused goal, fanned out in parallel, waiting on each task. Use it when asked, when a task needs another engine (Claude, Codex, custom), or when a subagent is sufficient or required for the task.`,body:[s(n.host),"If `CODER_WORKER` is set in your environment, you are a coder worker. Skip this skill and do your assigned work directly; nested dispatch is disabled.\n\nYou dispatch coding tasks through the `coder` runtime instead of implementing them yourself.",`## Overview
|
|
3
|
-
|
|
4
|
-
Coder delegates coding to supervised subagents of any model - Codex, Claude, or any OpenAI-compatible or local endpoint - from one runtime on every host. Implementation details live in the subagents, so your context stays clean and handoffs are instant. Every task runs sandboxed under unified permissions (read-only, workspace-write, auto), is steerable mid-run, and falls back down the configured chain when an engine cannot start.`,c(n.setup,n.guided),"## Use Coder over MCP\n\nEach coder command is also an MCP tool with the same arguments, such as `task/run` or `flow/run`; `load_skill` loads a guide.\n\nSetup: `coder setup-host` adds the server. By hand:\n\n```bash\nclaude mcp add coder -- coder mcp\ncodex mcp add coder -- coder mcp\n```\n\nRestart running sessions after adding it.",l(n.wait,n.gates),'## Running tasks\n\nStart with `coder task run --help`. It says how to write a good task and what happens after dispatch. `coder task --help` lists the rest, result, steer, stop, list and approvals. Then run it:\n\n```bash\ncoder task run "Add a /health endpoint in src/server.ts that returns 200 with the git sha. Do not touch routes outside that file."\n```\n\nFollow what it prints.',"## Flows\n\nWhen the user asks for a repeatable multi-task workflow with verification gates and resume, author a Coder flow instead of hand-fanning tasks. Read `coder docs flows` before writing or editing one, preview with `--dry-run`, and once it runs give the user the real `coder flow watch <run-id>` command."].join(`
|
|
5
|
-
|
|
6
|
-
`)}),d={claude:u(`dispatch`,{host:`Claude`,setup:`coder setup-host claude`,guided:!0,wait:"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."}),agents:u(`coder`,{setup:`coder setup-host`,wait:n,gates:"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."}),cursor:u(`coder`,{host:`Cursor`,setup:`coder setup-host`,wait:n,gates:"If Cursor asks before running `coder` commands, approve or allowlist `coder`; the runtime is a supervisor with its own sandbox and approval policy."})},f=i(r).filter(e=>e.file.startsWith(`docs/`)&&e.name.split(`/`)[0]!==`cli`).map(t=>e({name:t.name.replace(`/`,`-`),description:t.description,file:o.join(r,t.file)}));function p(e,t){let n=[...t,e.name].join(`/`);return{...e,...e.name===`watch`||[`docs`,`auth/login`,`setup-host`,`upgrade`].includes(n)?{mcp:!1}:{}}}function m(e,t=[]){let n=[...t,e.name];return{...e,commands:e.commands.map(e=>p(e,n)),namespaces:e.namespaces?.map(e=>m(e,n))}}const h=t({...a,instructions:[`Coder runs coding agents: subagents on this machine for the work in front of you, and always-on agents in Coder Cloud that work in GitHub, Slack and other apps.`,`On this machine, task/run starts a subagent on any engine (Claude, Codex or a custom model). task/result returns its answer, task/steer continues it, and task/approve answers its permission requests. flow/run runs a TypeScript flow of many tasks; review reviews a diff.`,"For Coder Cloud, pass server to the same tools; sign in once with `coder auth login` in a terminal. agent/push publishes an agent, and connection/add gives tasks accounts, keys and MCP servers.",`Every result lists its next steps; follow them. load_skill loads a guide.`].join(`
|
|
7
|
-
`),commands:a.commands.map(e=>p(e,[])),namespaces:[...a.namespaces.map(e=>m(e))],skills:[d.agents,...f]});export{h as app};
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "./@/app/dash/[org]/agents/[slug]/(tabs)/platforms/page.944b02c09bbf6c22.css.pnext-asset.js";
|
|
3
|
-
import { useEffect, useId, useRef, useState } from "../../../../../../../../../node_modules/preact/hooks/dist/hooks.mjs";
|
|
4
|
-
import { client } from "../../../../utils/client.a3928fa2dcd27b75.js";
|
|
5
|
-
import { toastFailure } from "../../../../utils/action.b9a5c37272250e82.js";
|
|
6
|
-
import { ClientError } from "../../../../../../client/index.0de14cb4e30bd70d.js";
|
|
7
|
-
import { Badge } from "../../../../comps/ui/badge.c0bc352791a95fd6.js";
|
|
8
|
-
import { Field } from "../../../../comps/ui/field.75588c33b72824a7.js";
|
|
9
|
-
import { Button, IconButton } from "../../../../comps/ui/button.ce9e6cdb08ca86db.js";
|
|
10
|
-
import { iX } from "../../../../comps/ui/icons.e36c72f54750663a.js";
|
|
11
|
-
import { List, Row } from "../settings/[tab]/list.083f5c665df04b1b.js";
|
|
12
|
-
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "../../../../../../../../../node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs";
|
|
13
|
-
/** The set-up form for one platform's shared app, as a dialog like an agent's Create app. */
|
|
14
|
-
function SetUpDialog({ row, product, unreachable, onClose }) {
|
|
15
|
-
const dialog = useRef(null);
|
|
16
|
-
const id = useId();
|
|
17
|
-
const [busy, setBusy] = useState(false);
|
|
18
|
-
useEffect(() => dialog.current.showModal(), []);
|
|
19
|
-
const close = () => !busy && dialog.current.close();
|
|
20
|
-
const submit = (form) => {
|
|
21
|
-
const value = (key) => String(form.get(key) ?? "").trim() || undefined;
|
|
22
|
-
setBusy(true);
|
|
23
|
-
void client.operator.setUp(row.integration, {
|
|
24
|
-
name: value("name"),
|
|
25
|
-
owner: value("owner")
|
|
26
|
-
}).then(({ url }) => {
|
|
27
|
-
location.href = url;
|
|
28
|
-
}).catch((reason) => {
|
|
29
|
-
// Operator mode ended; the page asks to sign in again.
|
|
30
|
-
if (reason instanceof ClientError && reason.status === 401) return location.reload();
|
|
31
|
-
setBusy(false);
|
|
32
|
-
toastFailure(reason);
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
return /* @__PURE__ */ _jsx("dialog", {
|
|
36
|
-
ref: dialog,
|
|
37
|
-
class: "create-dialog",
|
|
38
|
-
"aria-labelledby": id,
|
|
39
|
-
onClose,
|
|
40
|
-
onCancel: (event) => {
|
|
41
|
-
event.preventDefault();
|
|
42
|
-
close();
|
|
43
|
-
},
|
|
44
|
-
onClick: (event) => event.target === event.currentTarget && close(),
|
|
45
|
-
children: /* @__PURE__ */ _jsxs("form", {
|
|
46
|
-
onSubmit: (event) => {
|
|
47
|
-
event.preventDefault();
|
|
48
|
-
submit(new FormData(event.currentTarget));
|
|
49
|
-
},
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ _jsxs("header", { children: [/* @__PURE__ */ _jsxs("h2", {
|
|
52
|
-
id,
|
|
53
|
-
children: [
|
|
54
|
-
"Set up shared ",
|
|
55
|
-
row.name,
|
|
56
|
-
" app"
|
|
57
|
-
]
|
|
58
|
-
}), /* @__PURE__ */ _jsx(IconButton, {
|
|
59
|
-
icon: iX,
|
|
60
|
-
label: "Close",
|
|
61
|
-
onClick: close
|
|
62
|
-
})] }),
|
|
63
|
-
unreachable ? /* @__PURE__ */ _jsxs("p", {
|
|
64
|
-
class: "flash err",
|
|
65
|
-
children: [
|
|
66
|
-
row.name,
|
|
67
|
-
" cannot reach this server yet. Set a public address first: run the server with PUBLIC_URL set to an address ",
|
|
68
|
-
row.name,
|
|
69
|
-
" can reach."
|
|
70
|
-
]
|
|
71
|
-
}) : null,
|
|
72
|
-
/* @__PURE__ */ _jsxs("p", {
|
|
73
|
-
class: "muted",
|
|
74
|
-
children: [
|
|
75
|
-
"One app on ",
|
|
76
|
-
row.name,
|
|
77
|
-
" serves the built-in agent in every workspace. People see its name on consent screens, as in ",
|
|
78
|
-
product,
|
|
79
|
-
" wants to connect."
|
|
80
|
-
]
|
|
81
|
-
}),
|
|
82
|
-
/* @__PURE__ */ _jsx(Field, {
|
|
83
|
-
label: "App name",
|
|
84
|
-
children: /* @__PURE__ */ _jsx("input", {
|
|
85
|
-
name: "name",
|
|
86
|
-
defaultValue: product,
|
|
87
|
-
autocomplete: "off",
|
|
88
|
-
required: true
|
|
89
|
-
})
|
|
90
|
-
}),
|
|
91
|
-
row.organizationApps ? /* @__PURE__ */ _jsx(Field, {
|
|
92
|
-
label: `${row.name} organization`,
|
|
93
|
-
hint: "owns the app; leave empty to own it on your personal account",
|
|
94
|
-
children: /* @__PURE__ */ _jsx("input", {
|
|
95
|
-
name: "owner",
|
|
96
|
-
placeholder: "your-org",
|
|
97
|
-
autocomplete: "off"
|
|
98
|
-
})
|
|
99
|
-
}) : null,
|
|
100
|
-
/* @__PURE__ */ _jsxs("div", {
|
|
101
|
-
class: "actions",
|
|
102
|
-
children: [/* @__PURE__ */ _jsx(Button, {
|
|
103
|
-
variant: "ghost",
|
|
104
|
-
disabled: busy,
|
|
105
|
-
onClick: close,
|
|
106
|
-
children: "Cancel"
|
|
107
|
-
}), /* @__PURE__ */ _jsxs(Button, {
|
|
108
|
-
type: "submit",
|
|
109
|
-
disabled: unreachable,
|
|
110
|
-
loading: busy,
|
|
111
|
-
children: ["Continue on ", row.name]
|
|
112
|
-
})]
|
|
113
|
-
})
|
|
114
|
-
]
|
|
115
|
-
})
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
/** One shared app per platform for the built-in agent in every workspace; Set up opens its create dialog. */
|
|
119
|
-
export function OperatorApps({ first }) {
|
|
120
|
-
const [open, setOpen] = useState();
|
|
121
|
-
return /* @__PURE__ */ _jsxs(_Fragment, { children: [/* @__PURE__ */ _jsx(List, {
|
|
122
|
-
title: "Built-in apps",
|
|
123
|
-
count: first.platforms.length,
|
|
124
|
-
children: first.platforms.map((row) => /* @__PURE__ */ _jsx(Row, {
|
|
125
|
-
title: row.name,
|
|
126
|
-
badges: row.app ? /* @__PURE__ */ _jsx(Badge, {
|
|
127
|
-
tone: "ok",
|
|
128
|
-
children: "set up"
|
|
129
|
-
}) : null,
|
|
130
|
-
sub: row.app ? row.app.name : "Not set up. Workspaces cannot add the built-in agent here.",
|
|
131
|
-
actions: row.app ? null : /* @__PURE__ */ _jsx(Button, {
|
|
132
|
-
variant: "secondary",
|
|
133
|
-
size: "sm",
|
|
134
|
-
onClick: () => setOpen(row),
|
|
135
|
-
children: "Set up"
|
|
136
|
-
})
|
|
137
|
-
}, row.integration))
|
|
138
|
-
}), open ? /* @__PURE__ */ _jsx(SetUpDialog, {
|
|
139
|
-
row: open,
|
|
140
|
-
product: first.name,
|
|
141
|
-
unreachable: first.unreachable,
|
|
142
|
-
onClose: () => setOpen(undefined)
|
|
143
|
-
}) : null] });
|
|
144
|
-
}
|