@wular/coder 0.3.18 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (473) hide show
  1. package/README.md +18 -16
  2. package/bin/coder.mjs +3 -1
  3. package/dist/actions-Mk3FSlpJ.js +20 -0
  4. package/dist/adapter-B0oYCI0S.js +1 -0
  5. package/dist/adapter-BKVzTDnn.js +1 -0
  6. package/dist/adapter-DPInwbJG.js +1 -0
  7. package/dist/adapter-DaiJMOYo.js +1 -0
  8. package/dist/adapter-PeKziOUg.js +1 -0
  9. package/dist/add-BxpLHnvD.js +1 -0
  10. package/dist/add-CE-70LFs.js +1 -0
  11. package/dist/add-U-pty9qJ.js +6 -0
  12. package/dist/add-ej0X9e3a.js +1 -0
  13. package/dist/add-json-CEa-6luW.js +1 -0
  14. package/dist/agent-BsYx3Odz.js +3 -0
  15. package/dist/agent-JdtZozvP.js +1 -0
  16. package/dist/alias-DX-Bm86x.js +2 -0
  17. package/dist/app-BT5f7zL5.js +1 -0
  18. package/dist/approvals-C-AvFt6s.js +2 -0
  19. package/dist/approve-DOmpQRNd.js +2 -0
  20. package/dist/apps-CjfrZyM5.js +1 -0
  21. package/dist/archive-BUB8gFKD.js +4 -0
  22. package/dist/archive-BziJ1rQ-.js +3 -0
  23. package/dist/archive-sweep-CtBcARgN.js +1 -0
  24. package/dist/args-BOEEdpWk.js +1 -0
  25. package/dist/ask-dE3U3ss2.js +4 -0
  26. package/dist/auth-BFny--17.js +1 -0
  27. package/dist/auth-DWHIzqbA.js +1 -0
  28. package/dist/builtin/coder/agent.json +24 -0
  29. package/dist/builtin/coder/system.md +17 -0
  30. package/dist/chat-3Znsevah.js +1 -0
  31. package/dist/chat-B_yhNTo0.js +13 -0
  32. package/dist/chat-bridge-BS9WtP3X.js +2 -0
  33. package/dist/cli-BilSDkvE.js +9 -0
  34. package/dist/cli.d.ts +71 -1
  35. package/dist/cli.js +1 -91
  36. package/dist/client-D9IoAuDD.js +1 -0
  37. package/dist/config-Da_cwoxI.js +3 -0
  38. package/dist/create-C_iMJV4Y.js +1 -0
  39. package/dist/credentials-B1jv6dkg.js +1 -0
  40. package/dist/dash/manifest.json +3427 -0
  41. package/dist/dash/public/assets/apple-touch-icon.png +0 -0
  42. package/dist/dash/public/assets/chunks/agent-pills-69c965aae1737cef.js +1 -0
  43. package/dist/dash/public/assets/chunks/agent-settings-form-a1ce70812eea3f20.js +1 -0
  44. package/dist/dash/public/assets/chunks/agents-grid-f62180478e43c192.js +1 -0
  45. package/dist/dash/public/assets/chunks/badge-d07f35e9abc80e14.js +1 -0
  46. package/dist/dash/public/assets/chunks/card-be04148b64223a52.js +1 -0
  47. package/dist/dash/public/assets/chunks/combo-32c321a7a84fa902.js +1 -0
  48. package/dist/dash/public/assets/chunks/composer-aec9c3c691f1f79a.js +1 -0
  49. package/dist/dash/public/assets/chunks/composer-data-6f7608fed13f3dd7.js +1 -0
  50. package/dist/dash/public/assets/chunks/composer-e56860d72742379e.js +1 -0
  51. package/dist/dash/public/assets/chunks/confirm-b4e2c16aef4b3431.js +1 -0
  52. package/dist/dash/public/assets/chunks/connect-apps-a5a63941e287c33f.js +1 -0
  53. package/dist/dash/public/assets/chunks/connect-repositories-e4c049b5b4384623.js +1 -0
  54. package/dist/dash/public/assets/chunks/credentials-list-2b7d0c771b89f9c5.js +2 -0
  55. package/dist/dash/public/assets/chunks/custom-range-53b70e0d9eeae84e.js +1 -0
  56. package/dist/dash/public/assets/chunks/editor-691d2bcecb1ecb87.js +7 -0
  57. package/dist/dash/public/assets/chunks/engines-list-a5fe1671601ce3b0.js +1 -0
  58. package/dist/dash/public/assets/chunks/field-9e12e5fc8774b6e5.js +1 -0
  59. package/dist/dash/public/assets/chunks/format-eb03fc9d9744d960.js +1 -0
  60. package/dist/dash/public/assets/chunks/heads-4041a925d63ab116.js +1 -0
  61. package/dist/dash/public/assets/chunks/instructions-4e0d18b9b40edbd7.js +2 -0
  62. package/dist/dash/public/assets/chunks/instructions-b00959bd4bb70502.js +1 -0
  63. package/dist/dash/public/assets/chunks/list-d7eb9e02cf261fbe.js +1 -0
  64. package/dist/dash/public/assets/chunks/mcp-list-a450533109045ef5.js +1 -0
  65. package/dist/dash/public/assets/chunks/model-options-15c53331a2f28a4f.js +1 -0
  66. package/dist/dash/public/assets/chunks/models-list-1e273c6843858148.js +1 -0
  67. package/dist/dash/public/assets/chunks/paged-bc6fa0c2b9d52ed7.js +1 -0
  68. package/dist/dash/public/assets/chunks/platform-actions-87f3f76ec1b840cb.js +1 -0
  69. package/dist/dash/public/assets/chunks/runners-list-fc7cdae4fa93e78b.js +1 -0
  70. package/dist/dash/public/assets/chunks/runtime-246221e985d863e5-1.js +2 -0
  71. package/dist/dash/public/assets/chunks/segmented-6091dfb2f954799f.js +1 -0
  72. package/dist/dash/public/assets/chunks/select-dd09a6b9544cfde2.js +1 -0
  73. package/dist/dash/public/assets/chunks/sentinel-ff7143a47fd22835.js +1 -0
  74. package/dist/dash/public/assets/chunks/shared-init-246221e985d863e5-2.js +1 -0
  75. package/dist/dash/public/assets/chunks/shared-init-8f2ac936c95a7f7b.js +1 -0
  76. package/dist/dash/public/assets/chunks/shared-init-986901c810947c12.js +5 -0
  77. package/dist/dash/public/assets/chunks/shared-init-baceed9fd2d43661.js +2 -0
  78. package/dist/dash/public/assets/chunks/tail-5a5bfcd308535d70.js +1 -0
  79. package/dist/dash/public/assets/chunks/task-actions-7919ca0e901131f4.js +1 -0
  80. package/dist/dash/public/assets/chunks/task-fa8b82e95e771c4a.js +1 -0
  81. package/dist/dash/public/assets/chunks/task-view-e8a0f99c992fa11e.js +3 -0
  82. package/dist/dash/public/assets/chunks/tasks-list-7b72f5b295349532.js +1 -0
  83. package/dist/dash/public/assets/chunks/toolbar-9b18a5d26dee37c3.js +1 -0
  84. package/dist/dash/public/assets/chunks/versions-list-8cdf3a41c56b2152.js +1 -0
  85. package/dist/dash/public/assets/chunks/wular-pnext-246221e985d863e5-0.js +1 -0
  86. package/dist/dash/public/assets/connect-382b1729a7ae7808.css +1 -0
  87. package/dist/dash/public/assets/dash-9e02d5d1a6d42ee3.css +1 -0
  88. package/dist/dash/public/assets/dash-account-04859899c1838ada.css +1 -0
  89. package/dist/dash/public/assets/dash-agents-9e678137267dec07.css +1 -0
  90. package/dist/dash/public/assets/dash-agents-new-26fa27b17ef9b8d8.css +1 -0
  91. package/dist/dash/public/assets/dash-agents-param-slug-b975c48f8abf3444.css +1 -0
  92. package/dist/dash/public/assets/dash-agents-param-slug-edit-e13fda599bb04843.css +1 -0
  93. package/dist/dash/public/assets/dash-agents-param-slug-platforms-70292932cb27bc96.css +1 -0
  94. package/dist/dash/public/assets/dash-agents-param-slug-settings-71f9a86251723fcc.css +1 -0
  95. package/dist/dash/public/assets/dash-agents-param-slug-tasks-fb8eb2ed71006601.css +1 -0
  96. package/dist/dash/public/assets/dash-agents-param-slug-usage-7c8740f1cdd52c71.css +1 -0
  97. package/dist/dash/public/assets/dash-settings-8eb818da462227e8.css +1 -0
  98. package/dist/dash/public/assets/dash-settings-param-tab-849a1a9542e273f5.css +1 -0
  99. package/dist/dash/public/assets/dash-tasks-81e510e0b6931b42.css +1 -0
  100. package/dist/dash/public/assets/dash-tasks-param-id-bbd2a83342f2ec10.css +1 -0
  101. package/dist/dash/public/assets/dash-usage-8e0259e03eaed1bd.css +1 -0
  102. package/dist/dash/public/assets/favicon.ico +0 -0
  103. package/dist/dash/public/assets/favicon.svg +1 -0
  104. package/dist/dash/public/assets/fonts/LICENSE-fira-code +93 -0
  105. package/dist/dash/public/assets/fonts/fira-code-latin-400-normal-717ee080.woff2 +0 -0
  106. package/dist/dash/public/assets/fonts/fira-code-latin-500-normal-530b6706.woff2 +0 -0
  107. package/dist/dash/public/assets/fonts/fira-code-latin-700-normal-98730669.woff2 +0 -0
  108. package/dist/dash/public/assets/global-d2adbf01910d9df5.css +1 -0
  109. package/dist/dash/public/assets/login-c129b1ce237be260.css +1 -0
  110. package/dist/dash/public/assets/pnext-client-073464b8f422ef57.js +1 -0
  111. package/dist/dash/public/assets/pnext-client-0b6720fdec66eeb0.js +1 -0
  112. package/dist/dash/public/assets/pnext-client-1e9cb2f4f6387a87.js +1 -0
  113. package/dist/dash/public/assets/pnext-client-2f0e78dd006fed0f.js +1 -0
  114. package/dist/dash/public/assets/pnext-client-3c62e2aa2cbe9fe1.js +1 -0
  115. package/dist/dash/public/assets/pnext-client-43a88896ed42dd39.js +1 -0
  116. package/dist/dash/public/assets/pnext-client-4cf2e27d0b9c0365.js +1 -0
  117. package/dist/dash/public/assets/pnext-client-587008fa987d3073.js +1 -0
  118. package/dist/dash/public/assets/pnext-client-676360cc86f31573.js +1 -0
  119. package/dist/dash/public/assets/pnext-client-813427605f424145.js +1 -0
  120. package/dist/dash/public/assets/pnext-client-82de7cf6dfc35b98.js +1 -0
  121. package/dist/dash/public/assets/pnext-client-831e8004c09f0b5b.js +1 -0
  122. package/dist/dash/public/assets/pnext-client-9b557fe468a45ca3.js +1 -0
  123. package/dist/dash/public/assets/pnext-client-ab7c900c802fe827.js +1 -0
  124. package/dist/dash/public/assets/pnext-client-d87d00e402811f0c.js +1 -0
  125. package/dist/dash/public/assets/pnext-client-fbdb7c1da7eda7e5.js +1 -0
  126. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/boot-B2MFTRO2.js +28 -0
  127. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/build-tier-XJJSL5FR.js +2702 -0
  128. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2HFY3DQT.js +206 -0
  129. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2ICEVELW.js +832 -0
  130. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-3UPROT2C.js +33 -0
  131. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4P5CMIYT.js +1580 -0
  132. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4TKZKZ3Q.js +129 -0
  133. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-5RDEILQB.js +435 -0
  134. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-62KEQM43.js +23 -0
  135. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-6KQSWT6D.js +829 -0
  136. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-7DCNCW6O.js +722 -0
  137. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-B4THCTQP.js +20 -0
  138. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-C2LIV2MM.js +170 -0
  139. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-CCATPVTW.js +376 -0
  140. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-COXJAPTU.js +87 -0
  141. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-E6IXL2NJ.js +6268 -0
  142. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FLGRBFAH.js +1196 -0
  143. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FTJVHFWD.js +59 -0
  144. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-H523KSIH.js +5149 -0
  145. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-HT6KKX6A.js +18 -0
  146. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JESFYECC.js +436 -0
  147. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JRPJM2XY.js +15 -0
  148. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L2IWDUXG.js +105 -0
  149. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L5P4Y4UC.js +181 -0
  150. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-NQE46AZN.js +645 -0
  151. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PA4QEARJ.js +127 -0
  152. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PZ5AXOLW.js +7144 -0
  153. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-SNVPTULL.js +2395 -0
  154. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-T3QZT3PG.js +218 -0
  155. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-VC5O2SDP.js +70 -0
  156. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-WZX4V6CM.js +229 -0
  157. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-XUUIDXY5.js +625 -0
  158. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-ZHFDO3PR.js +263 -0
  159. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/compile-CE2DN7ZA.js +16 -0
  160. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-UREY7XJT.js +14 -0
  161. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-loader-UI2XE3PZ.js +15 -0
  162. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/entry.js +217 -0
  163. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/generate-I2PPTDFD.js +14 -0
  164. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/modules-UVOCE4C2.js +46 -0
  165. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/pipeline-UW47K537.js +961 -0
  166. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/proxy-ITGOVJBW.js +24 -0
  167. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/register-4SA55SWT.js +12577 -0
  168. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/router-JNKHLBCZ.js +503 -0
  169. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/routes-PD6J2NXW.js +52 -0
  170. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/tsconfig-defaults-ZXEH7RQK.js +13 -0
  171. package/dist/default-Bobztoxf.js +1 -0
  172. package/dist/default-vYPT26DR.js +1 -0
  173. package/dist/delete-D8gEwoOj.js +4 -0
  174. package/dist/delete-z1_86nf6.js +2 -0
  175. package/dist/disable-DVKd-0Xb.js +1 -0
  176. package/dist/discover-Df-a8K4R.js +3 -0
  177. package/dist/discover-Dvr_3_Xr.js +1 -0
  178. package/dist/dispatch-BKeAch9E.js +14 -0
  179. package/dist/docs-BX65z2Iu.js +2 -0
  180. package/dist/docs-DKJnqZqt.js +2 -0
  181. package/dist/enable-C8Zf_wpN.js +1 -0
  182. package/dist/env-CRf6wkM2.js +1 -0
  183. package/dist/exec-RZFLclKX.js +11 -0
  184. package/dist/executor-BvAA7Cgw.js +10 -0
  185. package/dist/flow/builtin/review.d.ts +157 -0
  186. package/dist/flow/builtin/review.js +19 -0
  187. package/dist/flow/index.d.ts +1 -1
  188. package/dist/flow/index.js +1 -1
  189. package/dist/flow-17k25MHt.js +1 -0
  190. package/dist/github-actions-DwUzm4hC.js +24 -0
  191. package/dist/http-Bkg_OQ6r.js +1 -0
  192. package/dist/{index-BQ-b77or.d.ts → index-DT7EST00.d.ts} +116 -238
  193. package/dist/init-CoMfFxbG.js +1 -0
  194. package/dist/integrations-5xCaXSd-.js +1 -0
  195. package/dist/integrations-BAgdVDhj.js +5 -0
  196. package/dist/lib/broker.js +3 -3
  197. package/dist/list-BAKvxSbh.js +4 -0
  198. package/dist/list-BYiG8Zav.js +2 -0
  199. package/dist/list-BxEywhHU.js +1 -0
  200. package/dist/list-C5w01-8q.js +1 -0
  201. package/dist/list-CIW2joV1.js +1 -0
  202. package/dist/list-DX-z3SBp.js +3 -0
  203. package/dist/list-DpCf4G-H.js +4 -0
  204. package/dist/list-VToARh3C.js +1 -0
  205. package/dist/load-BpEsAn51.js +2 -0
  206. package/dist/local-H3uvqEbq.js +1 -0
  207. package/dist/log-view-dg0TlKLA.js +1 -0
  208. package/dist/login-BFxX4jJy.js +1 -0
  209. package/dist/login-DkkslfBx.js +1 -0
  210. package/dist/logout-BHAtw4Z8.js +1 -0
  211. package/dist/maintenance-C5FklUw3.js +1 -0
  212. package/dist/match-CXAjDhg7.js +1 -0
  213. package/dist/mcp-BgKb2Cdk.js +1 -0
  214. package/dist/mcp-CCZOAo06.js +1 -0
  215. package/dist/mcp-server-DGzme0YX.js +1 -0
  216. package/dist/migrate-C4vM7DQN.js +2 -0
  217. package/dist/migrate-N-85_N7J.js +1 -0
  218. package/dist/model-Bs1StDo3.js +1 -0
  219. package/dist/models-_5LVGC3m.js +1 -0
  220. package/dist/output-BKeyLbvt.js +5 -0
  221. package/dist/prompt-CEuBMNhk.js +7 -0
  222. package/dist/push-CUC55Bqd.js +1 -0
  223. package/dist/queue-6io_NOP3.js +116 -0
  224. package/dist/refresh-BIrmrWYq.js +1 -0
  225. package/dist/remote-miQNTVRa.js +1 -0
  226. package/dist/remove-B93LNkZI.js +1 -0
  227. package/dist/remove-C5_xggx7.js +1 -0
  228. package/dist/remove-CuH8a3L9.js +1 -0
  229. package/dist/remove-eQ8y5C5p.js +1 -0
  230. package/dist/rename-CYfy03FE.js +1 -0
  231. package/dist/result-BEtQZHaY.js +5 -0
  232. package/dist/result-BzaM3inj.js +15 -0
  233. package/dist/resume-DYzKvyEw.js +3 -0
  234. package/dist/review-oIBeECZE.js +7 -0
  235. package/dist/rolldown-runtime-DT7IzrpZ.js +1 -0
  236. package/dist/rotate-key-IdMYH7gg.js +1 -0
  237. package/dist/run-BDYl0CKl.js +2 -0
  238. package/dist/run-CTtd0Znc.js +5 -0
  239. package/dist/run-CawRGnOg.js +2 -0
  240. package/dist/runner-D7ScbIHJ.js +1 -0
  241. package/dist/runner-sUpWJ_k0.js +1 -0
  242. package/dist/schema-CU2iFkp8.js +1 -0
  243. package/dist/sdk.d.ts +1166 -191
  244. package/dist/sdk.js +1 -1
  245. package/dist/serve-BTeomYxW.js +1 -0
  246. package/dist/serve-CE8YV2e9.js +1 -0
  247. package/dist/serve-CPnmrKyf.js +2 -0
  248. package/dist/serve-CQKZxzFE.js +4 -0
  249. package/dist/serve-GmRO89s5.js +12 -0
  250. package/dist/server-Kb22cWfF.js +1 -0
  251. package/dist/setup-host-GFTUzzZJ.js +6 -0
  252. package/dist/shared-DVtzWhUT.js +1 -0
  253. package/dist/show-CMUg8SJu.js +1 -0
  254. package/dist/show-COTZEYgc.js +1 -0
  255. package/dist/status-D26U--p8.js +1 -0
  256. package/dist/steer-C6uARLp5.js +4 -0
  257. package/dist/stop-BrGI3hSS.js +1 -0
  258. package/dist/stop-ByCAlbmN.js +3 -0
  259. package/dist/store-B94tSate.js +42 -0
  260. package/dist/store-DzqXS2wT.js +8 -0
  261. package/dist/task-C6VAg5WU.js +1 -0
  262. package/dist/task-CgOKgkEG.js +1 -0
  263. package/dist/task-DeglY79z.js +5 -0
  264. package/dist/test-NEbhlxvo.js +1 -0
  265. package/dist/tools-D0Zfs8Hx.js +1 -0
  266. package/dist/types-D0q15RJa.js +1 -0
  267. package/dist/types-Dve7Z0ZP.d.ts +389 -0
  268. package/dist/unalias-C9NqmSDq.js +1 -0
  269. package/dist/update-BTxYQj7Z.js +2 -0
  270. package/dist/upgrade-hA0yWBvx.js +2 -0
  271. package/dist/usage-BhqoCjvE.js +1 -0
  272. package/dist/usage-C4d9X2Uq.js +1 -0
  273. package/dist/watch-CSdj24ct.js +5 -0
  274. package/dist/watch-DtRuC0Wc.js +8 -0
  275. package/dist/wire-BeT1Axeo.js +1 -0
  276. package/dist/worker-CXndxmGF.js +9 -0
  277. package/dist/worker-DX7P9kWl.js +1 -0
  278. package/dist/workflow-Dcmdooi8.js +1 -0
  279. package/docs/agents/coder.md +26 -0
  280. package/docs/agents/index.md +120 -0
  281. package/docs/config.md +51 -30
  282. package/docs/dash.md +64 -0
  283. package/docs/flows.md +20 -15
  284. package/docs/mcp.md +62 -0
  285. package/docs/models.md +41 -23
  286. package/docs/review.md +41 -0
  287. package/docs/sdk.md +57 -38
  288. package/docs/self-host.md +188 -0
  289. package/migrations/0000_initial.sql +252 -0
  290. package/migrations/meta/0000_snapshot.json +1787 -0
  291. package/migrations/meta/_journal.json +13 -0
  292. package/package.json +37 -7
  293. package/plugins/agents/skills/coder/SKILL.md +14 -60
  294. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  295. package/plugins/claude/commands/setup.md +2 -2
  296. package/plugins/claude/skills/dispatch/SKILL.md +14 -58
  297. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  298. package/plugins/cursor/README.md +5 -5
  299. package/plugins/cursor/assets/logo.png +0 -0
  300. package/plugins/cursor/skills/coder/SKILL.md +14 -59
  301. package/src/client/index.ts +573 -0
  302. package/src/client/types.ts +506 -0
  303. package/src/core/errors.ts +72 -0
  304. package/src/core/task/log-view.ts +173 -0
  305. package/src/server/auth/sign-in.ts +14 -0
  306. package/src/server/dash/api/load.ts +62 -0
  307. package/src/server/dash/api/types.ts +11 -0
  308. package/src/server/dash/app/connect/page.tsx +42 -0
  309. package/src/server/dash/app/dash/account/loading.tsx +11 -0
  310. package/src/server/dash/app/dash/account/notify.tsx +42 -0
  311. package/src/server/dash/app/dash/account/page.css +81 -0
  312. package/src/server/dash/app/dash/account/page.tsx +126 -0
  313. package/src/server/dash/app/dash/account/sign-out.tsx +24 -0
  314. package/src/server/dash/app/dash/agents/(list)/agent-menu.tsx +10 -0
  315. package/src/server/dash/app/dash/agents/(list)/agents-grid.tsx +143 -0
  316. package/src/server/dash/app/dash/agents/(list)/connect-apps.tsx +46 -0
  317. package/src/server/dash/app/dash/agents/(list)/loading.tsx +14 -0
  318. package/src/server/dash/app/dash/agents/(list)/page.css +72 -0
  319. package/src/server/dash/app/dash/agents/(list)/page.tsx +89 -0
  320. package/src/server/dash/app/dash/agents/[slug]/(tabs)/layout.tsx +135 -0
  321. package/src/server/dash/app/dash/agents/[slug]/(tabs)/loading.tsx +5 -0
  322. package/src/server/dash/app/dash/agents/[slug]/(tabs)/page.css +21 -0
  323. package/src/server/dash/app/dash/agents/[slug]/(tabs)/page.tsx +173 -0
  324. package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/loading.tsx +18 -0
  325. package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/page.css +87 -0
  326. package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/page.tsx +258 -0
  327. package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/platform-actions.tsx +111 -0
  328. package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/agent-settings-form.css +114 -0
  329. package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/agent-settings-form.tsx +294 -0
  330. package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/loading.tsx +5 -0
  331. package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/page.tsx +54 -0
  332. package/src/server/dash/app/dash/agents/[slug]/(tabs)/tasks/loading.tsx +5 -0
  333. package/src/server/dash/app/dash/agents/[slug]/(tabs)/tasks/page.tsx +14 -0
  334. package/src/server/dash/app/dash/agents/[slug]/(tabs)/usage/loading.tsx +31 -0
  335. package/src/server/dash/app/dash/agents/[slug]/(tabs)/usage/page.css +12 -0
  336. package/src/server/dash/app/dash/agents/[slug]/(tabs)/usage/page.tsx +163 -0
  337. package/src/server/dash/app/dash/agents/[slug]/(tabs)/versions-list.tsx +53 -0
  338. package/src/server/dash/app/dash/agents/[slug]/edit/loading.tsx +31 -0
  339. package/src/server/dash/app/dash/agents/[slug]/edit/page.tsx +91 -0
  340. package/src/server/dash/app/dash/agents/agent/agent-pills.css +27 -0
  341. package/src/server/dash/app/dash/agents/agent/agent-pills.tsx +133 -0
  342. package/src/server/dash/app/dash/agents/agent/hero.css +40 -0
  343. package/src/server/dash/app/dash/agents/agent/hero.tsx +60 -0
  344. package/src/server/dash/app/dash/agents/agent/instructions.css +29 -0
  345. package/src/server/dash/app/dash/agents/agent/instructions.tsx +82 -0
  346. package/src/server/dash/app/dash/agents/editor/connect-repositories.ts +16 -0
  347. package/src/server/dash/app/dash/agents/editor/editor.css +263 -0
  348. package/src/server/dash/app/dash/agents/editor/editor.tsx +774 -0
  349. package/src/server/dash/app/dash/agents/editor/import-picker.css +48 -0
  350. package/src/server/dash/app/dash/agents/editor/import-picker.tsx +253 -0
  351. package/src/server/dash/app/dash/agents/editor/names.ts +35 -0
  352. package/src/server/dash/app/dash/agents/new/loading.tsx +25 -0
  353. package/src/server/dash/app/dash/agents/new/page.tsx +72 -0
  354. package/src/server/dash/app/dash/layout.css +265 -0
  355. package/src/server/dash/app/dash/layout.tsx +332 -0
  356. package/src/server/dash/app/dash/page.tsx +14 -0
  357. package/src/server/dash/app/dash/settings/[tab]/credentials-list.css +94 -0
  358. package/src/server/dash/app/dash/settings/[tab]/credentials-list.tsx +619 -0
  359. package/src/server/dash/app/dash/settings/[tab]/credentials.tsx +36 -0
  360. package/src/server/dash/app/dash/settings/[tab]/engines-list.css +16 -0
  361. package/src/server/dash/app/dash/settings/[tab]/engines-list.tsx +135 -0
  362. package/src/server/dash/app/dash/settings/[tab]/list.css +98 -0
  363. package/src/server/dash/app/dash/settings/[tab]/list.tsx +215 -0
  364. package/src/server/dash/app/dash/settings/[tab]/loading.tsx +6 -0
  365. package/src/server/dash/app/dash/settings/[tab]/mcp-list.css +43 -0
  366. package/src/server/dash/app/dash/settings/[tab]/mcp-list.tsx +290 -0
  367. package/src/server/dash/app/dash/settings/[tab]/models-list.tsx +513 -0
  368. package/src/server/dash/app/dash/settings/[tab]/page.tsx +89 -0
  369. package/src/server/dash/app/dash/settings/[tab]/runners-list.css +153 -0
  370. package/src/server/dash/app/dash/settings/[tab]/runners-list.tsx +457 -0
  371. package/src/server/dash/app/dash/settings/layout.tsx +50 -0
  372. package/src/server/dash/app/dash/settings/model-options.ts +117 -0
  373. package/src/server/dash/app/dash/settings/page.tsx +7 -0
  374. package/src/server/dash/app/dash/settings/settings-head.tsx +24 -0
  375. package/src/server/dash/app/dash/settings/tunnel-guide.tsx +28 -0
  376. package/src/server/dash/app/dash/tasks/[id]/activity.tsx +202 -0
  377. package/src/server/dash/app/dash/tasks/[id]/loading.tsx +31 -0
  378. package/src/server/dash/app/dash/tasks/[id]/page.tsx +30 -0
  379. package/src/server/dash/app/dash/tasks/[id]/task-actions.tsx +164 -0
  380. package/src/server/dash/app/dash/tasks/[id]/task-view.css +407 -0
  381. package/src/server/dash/app/dash/tasks/[id]/task-view.tsx +513 -0
  382. package/src/server/dash/app/dash/tasks/composer-data.ts +96 -0
  383. package/src/server/dash/app/dash/tasks/composer.css +316 -0
  384. package/src/server/dash/app/dash/tasks/composer.tsx +890 -0
  385. package/src/server/dash/app/dash/tasks/list/status.css +50 -0
  386. package/src/server/dash/app/dash/tasks/list/status.tsx +20 -0
  387. package/src/server/dash/app/dash/tasks/list/task.ts +45 -0
  388. package/src/server/dash/app/dash/tasks/list/tasks-list.css +85 -0
  389. package/src/server/dash/app/dash/tasks/list/tasks-list.tsx +402 -0
  390. package/src/server/dash/app/dash/tasks/list/tasks-section.tsx +96 -0
  391. package/src/server/dash/app/dash/tasks/page.tsx +53 -0
  392. package/src/server/dash/app/dash/token-from-hash.tsx +17 -0
  393. package/src/server/dash/app/dash/usage/custom-range.tsx +63 -0
  394. package/src/server/dash/app/dash/usage/day-chart.css +109 -0
  395. package/src/server/dash/app/dash/usage/day-chart.tsx +110 -0
  396. package/src/server/dash/app/dash/usage/loading.tsx +17 -0
  397. package/src/server/dash/app/dash/usage/metric.ts +13 -0
  398. package/src/server/dash/app/dash/usage/page.tsx +117 -0
  399. package/src/server/dash/app/dash/usage/range-bar.css +13 -0
  400. package/src/server/dash/app/dash/usage/range-bar.tsx +69 -0
  401. package/src/server/dash/app/dash/usage/stats.css +52 -0
  402. package/src/server/dash/app/dash/usage/stats.tsx +19 -0
  403. package/src/server/dash/app/dash/usage/top-agents.css +40 -0
  404. package/src/server/dash/app/dash/usage/top-agents.tsx +138 -0
  405. package/src/server/dash/app/dash/usage/usage.css +0 -0
  406. package/src/server/dash/app/globals.css +692 -0
  407. package/src/server/dash/app/layout.tsx +52 -0
  408. package/src/server/dash/app/login/page.css +26 -0
  409. package/src/server/dash/app/login/page.tsx +57 -0
  410. package/src/server/dash/app/page.tsx +5 -0
  411. package/src/server/dash/app/responsive.css +49 -0
  412. package/src/server/dash/app/zone.tsx +13 -0
  413. package/src/server/dash/comps/frame/auth-panel.css +60 -0
  414. package/src/server/dash/comps/frame/auth-panel.tsx +44 -0
  415. package/src/server/dash/comps/frame/drawer.css +28 -0
  416. package/src/server/dash/comps/frame/drawer.tsx +39 -0
  417. package/src/server/dash/comps/frame/heads.ts +41 -0
  418. package/src/server/dash/comps/frame/loading-card.tsx +65 -0
  419. package/src/server/dash/comps/frame/page-head.css +83 -0
  420. package/src/server/dash/comps/frame/page-head.tsx +71 -0
  421. package/src/server/dash/comps/frame/stream.tsx +50 -0
  422. package/src/server/dash/comps/frame/task-toasts.tsx +214 -0
  423. package/src/server/dash/comps/frame/theme-choices.tsx +46 -0
  424. package/src/server/dash/comps/nav/current-link.tsx +53 -0
  425. package/src/server/dash/comps/nav/side-toggle.tsx +30 -0
  426. package/src/server/dash/comps/nav/to.ts +22 -0
  427. package/src/server/dash/comps/ui/badge.css +64 -0
  428. package/src/server/dash/comps/ui/badge.tsx +41 -0
  429. package/src/server/dash/comps/ui/card.css +93 -0
  430. package/src/server/dash/comps/ui/card.tsx +77 -0
  431. package/src/server/dash/comps/ui/collapse.css +32 -0
  432. package/src/server/dash/comps/ui/collapse.tsx +49 -0
  433. package/src/server/dash/comps/ui/combo.tsx +154 -0
  434. package/src/server/dash/comps/ui/confirm.css +36 -0
  435. package/src/server/dash/comps/ui/confirm.tsx +67 -0
  436. package/src/server/dash/comps/ui/field.css +25 -0
  437. package/src/server/dash/comps/ui/field.tsx +34 -0
  438. package/src/server/dash/comps/ui/icon.css +22 -0
  439. package/src/server/dash/comps/ui/icon.tsx +17 -0
  440. package/src/server/dash/comps/ui/icons.ts +44 -0
  441. package/src/server/dash/comps/ui/menu.css +178 -0
  442. package/src/server/dash/comps/ui/menu.tsx +152 -0
  443. package/src/server/dash/comps/ui/segmented.css +44 -0
  444. package/src/server/dash/comps/ui/segmented.tsx +58 -0
  445. package/src/server/dash/comps/ui/select.css +103 -0
  446. package/src/server/dash/comps/ui/select.tsx +250 -0
  447. package/src/server/dash/comps/ui/sentinel.css +58 -0
  448. package/src/server/dash/comps/ui/sentinel.tsx +67 -0
  449. package/src/server/dash/comps/ui/tabs.css +81 -0
  450. package/src/server/dash/comps/ui/tabs.tsx +32 -0
  451. package/src/server/dash/comps/ui/tail.css +12 -0
  452. package/src/server/dash/comps/ui/tail.tsx +37 -0
  453. package/src/server/dash/comps/ui/toast.css +72 -0
  454. package/src/server/dash/comps/ui/toolbar.css +143 -0
  455. package/src/server/dash/comps/ui/toolbar.tsx +93 -0
  456. package/src/server/dash/package.json +5 -0
  457. package/src/server/dash/pnext-env.d.ts +4 -0
  458. package/src/server/dash/pnext.config.ts +5 -0
  459. package/src/server/dash/public/assets/apple-touch-icon.png +0 -0
  460. package/src/server/dash/public/assets/favicon.ico +0 -0
  461. package/src/server/dash/public/assets/favicon.svg +1 -0
  462. package/src/server/dash/public/assets/fonts/LICENSE-fira-code +93 -0
  463. package/src/server/dash/public/assets/fonts/fira-code-latin-400-normal-717ee080.woff2 +0 -0
  464. package/src/server/dash/public/assets/fonts/fira-code-latin-500-normal-530b6706.woff2 +0 -0
  465. package/src/server/dash/public/assets/fonts/fira-code-latin-700-normal-98730669.woff2 +0 -0
  466. package/src/server/dash/tsconfig.json +10 -0
  467. package/src/server/dash/utils/client.ts +19 -0
  468. package/src/server/dash/utils/format.ts +75 -0
  469. package/src/server/dash/utils/paged.ts +184 -0
  470. package/src/server/dash/utils/range.ts +117 -0
  471. package/dist/app-server-CW93J9zJ.js +0 -3
  472. package/dist/runtime-D-U1DNkI.js +0 -26
  473. package/dist/upgrade-DOj06r5b.js +0 -37
@@ -0,0 +1,24 @@
1
+ import{t as e}from"./rolldown-runtime-DT7IzrpZ.js";import{a as t,i as n,n as r,o as i}from"./local-H3uvqEbq.js";var a=e({ACTIONS_WORKFLOW_YAML:()=>o,GithubActionsRunner:()=>c});const o=`name: Coder agent
2
+ run-name: Coder agent \${{ inputs.task }}
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ task: { required: true, type: string }
7
+ server: { required: true, type: string }
8
+ token: { required: true, type: string }
9
+ mode: { required: true, type: string }
10
+ jobs:
11
+ run:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/setup-node@v4
15
+ with: { node-version: 22 }
16
+ - run: npm i -g @wular/coder @anthropic-ai/claude-code @openai/codex
17
+ ${n().map(e=>` - run: sudo sh -c '${e}'\n`).join(``)} - run: coder agent run --task "$TASK"
18
+ env:
19
+ TASK: \${{ inputs.task }}
20
+ CODER_SERVER: \${{ inputs.server }}
21
+ CODER_TASK_TOKEN: \${{ inputs.token }}
22
+ CODER_INBOX_MODE: \${{ inputs.mode }}
23
+ `,s=e=>t(e);var c=class{options;kind=`github-actions`;fetcher;constructor(e={}){this.options=e,this.fetcher=e.fetch??fetch}async request(e,t={},n=1e4){if(!this.options.token)throw Error(`RUNNER_CONFIG.token is required for github-actions`);let r=AbortSignal.timeout(n);for(let n=0;;n++){let i=await this.fetcher(`https://api.github.com${e}`,{...t,signal:r,redirect:`manual`,headers:{accept:`application/vnd.github+json`,authorization:`Bearer ${this.options.token}`,"content-type":`application/json`,"user-agent":`coder`,"x-github-api-version":`2022-11-28`,...t.headers}});if((t.method??`GET`)!==`GET`||n===2||i.status!==429&&i.status<500)return i;let a=Number(i.headers.get(`retry-after`));await i.body?.cancel(),await new Promise((e,t)=>{let i=()=>{clearTimeout(s),r.removeEventListener(`abort`,o)},o=()=>{i(),t(r.reason)},s=setTimeout(()=>{i(),e()},Number.isFinite(a)&&a>0?a*1e3:100*2**n);r.addEventListener(`abort`,o,{once:!0}),r.aborted&&o()})}}async start(e,t){let n=this.options.repo??(e.event?.repo&&`${e.event.repo.owner}/${e.event.repo.name}`);if(!n)throw Error(`The github-actions runner requires a repository`);let r=Date.now()+(this.options.lookupTimeoutMs??25e3),a=encodeURIComponent(this.options.workflow??`coder-agent.yml`),o=e.event?.repo,s=this.options.ref??(o&&`${o.owner}/${o.name}`===n?o.defaultBranch:void 0);if(!s){let e=await this.request(`/repos/${n}`,{},Math.max(1,r-Date.now()));if(!e.ok)throw Error(`GitHub repository lookup failed: ${e.status}`);let t=await e.json();if(!t.default_branch)throw Error(`GitHub repository has no default branch`);s=t.default_branch}let c=`/repos/${n}/actions/workflows/${a}/runs?event=workflow_dispatch&per_page=100&branch=${encodeURIComponent(s)}`,l=await this.request(c,{},Math.max(1,r-Date.now()));if(!l.ok)throw Error(`GitHub workflow run lookup failed: ${l.status}`);let u=await l.json(),d=Math.max(0,...u.workflow_runs.map(e=>e.id)),f=await this.request(`/repos/${n}/actions/workflows/${a}/dispatches`,{method:`POST`,body:JSON.stringify({ref:s,inputs:{task:e.id,server:t.CODER_SERVER,token:t.CODER_TASK_TOKEN,mode:t.CODER_INBOX_MODE}})},Math.max(1,r-Date.now()));if(f.status!==204)throw Error(`GitHub workflow dispatch failed: ${f.status}`);do{for(let t=1;Date.now()<r;t++){let a=await this.request(`${c}&page=${t}`,{},Math.max(1,r-Date.now()));if(!a.ok)throw Error(`GitHub workflow run lookup failed: ${a.status}`);let o=(await a.json()).workflow_runs.find(t=>t.id>d&&t.display_title===`Coder agent ${e.id}`);if(o)return i({repo:n,run:o.id});if(!a.headers.get(`link`)?.includes(`rel="next"`))break}await new Promise(e=>setTimeout(e,Math.min(this.options.pollIntervalMs??1e3,Math.max(0,r-Date.now()))))}while(Date.now()<r);throw Error(`GitHub workflow run for task ${e.id} was not found before timeout`)}async status(e){let{repo:t,run:n}=s(e),r=await this.request(`/repos/${t}/actions/runs/${n}`);if(r.status===404)return{state:`exited`,code:1};if(!r.ok)throw Error(`GitHub workflow status failed: ${r.status}`);let i=await r.json();return i.status===`completed`?{state:`exited`,code:i.conclusion===`success`?0:1}:{state:`running`}}async logs(e,t=-1){let{repo:n,run:i}=s(e),a=[];for(let e=1;;e++){let t=await this.request(`/repos/${n}/actions/runs/${i}/jobs?per_page=100&page=${e}`);if(!t.ok)throw Error(`GitHub workflow jobs failed: ${t.status}`);let r=await t.json();if(a.push(...r.jobs),!t.headers.get(`link`)?.includes(`rel="next"`))break}let o=[];for(let e of a.sort((e,t)=>e.id-t.id)){let r=await this.request(`/repos/${n}/actions/jobs/${e.id}/logs`);if(r.status===404)return{lines:[],next:t};if(r.status===302&&r.headers.get(`location`)){let e=await this.fetcher(r.headers.get(`location`),{redirect:`manual`,signal:AbortSignal.timeout(1e4)});if(!e.ok)throw Error(`GitHub job log download failed: ${e.status}`);o.push(await e.text())}else if(r.ok)o.push(await r.text());else throw Error(`GitHub job logs failed: ${r.status}`)}let c=r(o.join(`
24
+ `));return{lines:c.slice(t+1),next:Math.max(t,c.length-1)}}async stop(e){let{repo:t,run:n}=s(e),r=await this.request(`/repos/${t}/actions/runs/${n}/cancel`,{method:`POST`});if(r.status!==202&&r.status!==409)throw Error(`GitHub workflow cancellation failed: ${r.status}`)}};export{c as n,a as r,o as t};
@@ -0,0 +1 @@
1
+ import{a as e,o as t}from"./local-H3uvqEbq.js";import{Readable as n}from"node:stream";import{pipeline as r}from"node:stream/promises";function i(e,t=200,n={}){return new Response(JSON.stringify(e),{status:t,headers:{"content-type":`application/json`,...n}})}const a=e=>e.searchParams.has(`cursor`);function o(t){if(t)try{return e(t)}catch{return}}const s=e=>o(e.searchParams.get(`cursor`));function c(e,t=50,n=200){let r=Number(e.searchParams.get(`limit`)??t);return Number.isInteger(r)&&r>0?Math.min(r,n):t}function l(e,n,r){let i=e.slice(0,n);return{items:i,...e.length>n?{next:t(r(i.at(-1)))}:{}}}const u=(e,t=302)=>new Response(null,{status:t,headers:{location:e}}),d=()=>new Response(`Forbidden`,{status:403}),f=()=>new Response(`Not found`,{status:404}),p=()=>new Response(`Method not allowed`,{status:405}),m=e=>u(`/login?return=${encodeURIComponent(`${e.pathname}${e.search}`)}`),h=e=>e.startsWith(`/api/auth`)?65536:1048576;async function g(e,t,n){let r=Number(t??0);if(Number.isFinite(r)&&r>n)throw Object.assign(Error(`Payload too large`),{status:413});let i=[],a=0;for await(let t of e){if(a+=t.byteLength,a>n)throw Object.assign(Error(`Payload too large`),{status:413});i.push(t)}let o=new Uint8Array(a),s=0;for(let e of i)o.set(e,s),s+=e.byteLength;return o}function _(e){let t=new Headers;for(let[n,r]of Object.entries(e))r!==void 0&&t.set(n,Array.isArray(r)?r.join(`, `):r);return t}async function v(e,t){let n=e.url??`/`,r=await g(e,e.headers[`content-length`],t);return new Request(`http://${e.headers.host??`localhost`}${n}`,{method:e.method,headers:_(e.headers),body:r.byteLength?Buffer.from(r):void 0})}function y(e,{limit:t,admit:i=()=>!0}){return async(a,o)=>{if(!i(a))return void o.writeHead(404).end(`Not found`);try{let i=await e(await v(a,t(a.url??`/`)),a.socket.remoteAddress?.replace(/^::ffff:/,``)),s=Object.fromEntries(i.headers.entries()),c=i.headers.getSetCookie();c.length&&(s[`set-cookie`]=c),o.writeHead(i.status,s),i.body?await r(n.fromWeb(i.body),o).catch(()=>{}):o.end()}catch(e){if(o.headersSent)return void o.destroy();let t=typeof e==`object`&&e&&`status`in e;t||console.error(`coder server: request failed`,e);let n=t?e instanceof Error?e.message:String(e):`Internal server error`;o.writeHead(t?Number(e.status):500,{"content-type":`application/json`}),o.end(JSON.stringify({error:n}))}}}async function b(e,t){if(e.method===`GET`||e.method===`HEAD`||!e.body)return e;try{let n=await g(e.body,e.headers.get(`content-length`)??void 0,t);return new Request(e.url,{method:e.method,headers:e.headers,body:n.byteLength?Buffer.from(n):void 0,signal:e.signal})}catch(e){if(e.status===413)return new Response(`Payload too large`,{status:413});throw e}}export{i as a,p as c,c as d,a as f,d as i,f as l,m,s as n,b as o,u as p,o as r,y as s,h as t,l as u};
@@ -1,196 +1,5 @@
1
- import * as z from "zod/mini";
2
- //#region src/lib/config.d.ts
3
- /**
4
- * Strict schema for a config object (a file's contents or the merged result).
5
- * Unknown keys and out-of-range values are errors, not warnings. These schemas
6
- * are the source of truth for the config domain types (types.ts re-exports the
7
- * z.infer'd types).
8
- */
9
- declare const engineSchema: z.ZodMiniEnum<{
10
- codex: "codex";
11
- claude: "claude";
12
- }>;
13
- declare const agentSchema: z.ZodMiniEnum<{
14
- codex: "codex";
15
- claude: "claude";
16
- custom: "custom";
17
- }>;
18
- declare const effortSchema: z.ZodMiniEnum<{
19
- low: "low";
20
- medium: "medium";
21
- high: "high";
22
- }>;
23
- declare const permissionSchema: z.ZodMiniEnum<{
24
- "read-only": "read-only";
25
- "workspace-write": "workspace-write";
26
- auto: "auto";
27
- }>;
28
- declare const customModelSchema: z.ZodMiniObject<{
29
- baseUrl: z.ZodMiniURL;
30
- model: z.ZodMiniString<string>;
31
- envKey: z.ZodMiniOptional<z.ZodMiniString<string>>;
32
- wireApi: z.ZodMiniOptional<z.ZodMiniEnum<{
33
- chat: "chat";
34
- responses: "responses";
35
- }>>;
36
- disabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
37
- }, z.core.$strict>;
38
- /** The merged, effective shape (everything present after DEFAULT_CONFIG). */
39
- declare const effectiveConfigSchema: z.ZodMiniObject<{
40
- chain: z.ZodMiniArray<z.ZodMiniEnum<{
41
- codex: "codex";
42
- claude: "claude";
43
- custom: "custom";
44
- }>>;
45
- agents: z.ZodMiniObject<{
46
- codex: z.ZodMiniOptional<z.ZodMiniObject<{
47
- model: z.ZodMiniOptional<z.ZodMiniString<string>>;
48
- effort: z.ZodMiniOptional<z.ZodMiniEnum<{
49
- low: "low";
50
- medium: "medium";
51
- high: "high";
52
- }>>;
53
- permissions: z.ZodMiniOptional<z.ZodMiniEnum<{
54
- "read-only": "read-only";
55
- "workspace-write": "workspace-write";
56
- auto: "auto";
57
- }>>;
58
- }, z.core.$strict>>;
59
- claude: z.ZodMiniOptional<z.ZodMiniObject<{
60
- model: z.ZodMiniOptional<z.ZodMiniString<string>>;
61
- effort: z.ZodMiniOptional<z.ZodMiniEnum<{
62
- low: "low";
63
- medium: "medium";
64
- high: "high";
65
- }>>;
66
- permissions: z.ZodMiniOptional<z.ZodMiniEnum<{
67
- "read-only": "read-only";
68
- "workspace-write": "workspace-write";
69
- auto: "auto";
70
- }>>;
71
- }, z.core.$strict>>;
72
- custom: z.ZodMiniOptional<z.ZodMiniObject<{
73
- model: z.ZodMiniOptional<z.ZodMiniString<string>>;
74
- effort: z.ZodMiniOptional<z.ZodMiniEnum<{
75
- low: "low";
76
- medium: "medium";
77
- high: "high";
78
- }>>;
79
- permissions: z.ZodMiniOptional<z.ZodMiniEnum<{
80
- "read-only": "read-only";
81
- "workspace-write": "workspace-write";
82
- auto: "auto";
83
- }>>;
84
- }, z.core.$strict>>;
85
- }, z.core.$strict>;
86
- models: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniObject<{
87
- baseUrl: z.ZodMiniURL;
88
- model: z.ZodMiniString<string>;
89
- envKey: z.ZodMiniOptional<z.ZodMiniString<string>>;
90
- wireApi: z.ZodMiniOptional<z.ZodMiniEnum<{
91
- chat: "chat";
92
- responses: "responses";
93
- }>>;
94
- disabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
95
- }, z.core.$strict>, z.ZodMiniObject<{
96
- provider: z.ZodMiniEnum<{
97
- codex: "codex";
98
- claude: "claude";
99
- }>;
100
- model: z.ZodMiniString<string>;
101
- effort: z.ZodMiniOptional<z.ZodMiniEnum<{
102
- low: "low";
103
- medium: "medium";
104
- high: "high";
105
- }>>;
106
- disabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
107
- }, z.core.$strict>, z.ZodMiniObject<{
108
- disabled: z.ZodMiniBoolean<boolean>;
109
- }, z.core.$strict>]>>>;
110
- approvals: z.ZodMiniObject<{
111
- escalationTimeoutMs: z.ZodMiniNumber<number>;
112
- allowedNetworkHosts: z.ZodMiniArray<z.ZodMiniString<string>>;
113
- }, z.core.$strict>;
114
- }, z.core.$strict>;
115
- type Engine = z.infer<typeof engineSchema>;
116
- type Agent = z.infer<typeof agentSchema>;
117
- type Effort = z.infer<typeof effortSchema>;
118
- type Permission = z.infer<typeof permissionSchema>;
119
- type CustomModelConfig = z.infer<typeof customModelSchema>;
120
- type CoderConfig = z.infer<typeof effectiveConfigSchema>;
121
- //#endregion
122
- //#region src/lib/types.d.ts
123
- type JobKind = 'task';
124
- type JobStatus = 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
125
- /** A persisted job record (job.json). Most fields accrete over the lifecycle. */
126
- interface Job {
127
- id: string;
128
- createdAt: string;
129
- updatedAt?: string;
130
- status: JobStatus;
131
- kind?: JobKind;
132
- name?: string | null;
133
- agent?: Agent;
134
- engine?: Engine;
135
- prompt?: string;
136
- currentPrompt?: string | null;
137
- system?: string | null;
138
- model?: string | null;
139
- effort?: Effort | null;
140
- permissions?: Permission;
141
- resumeThreadId?: string | null;
142
- cwd?: string;
143
- background?: boolean;
144
- pid?: number | null;
145
- threadId?: string | null;
146
- turnId?: string | null;
147
- steerEndpoint?: string | null;
148
- completedAt?: string;
149
- resumedAt?: string;
150
- error?: string;
151
- archived?: boolean;
152
- archivedAt?: string;
153
- simulateApproval?: boolean;
154
- flowRunId?: string;
155
- }
156
- /** Normalized token usage for one turn, summed across the engine's threads. */
157
- interface TokenUsage {
158
- input: number;
159
- cachedInput: number;
160
- output: number;
161
- total: number;
162
- }
163
- /** The outcome of running one engine turn. status 0 == success. */
164
- interface TurnResult {
165
- status: number;
166
- threadId: string | null;
167
- turnId?: string | null;
168
- finalMessage?: string;
169
- touchedFiles?: string[];
170
- tokens?: TokenUsage | null;
171
- /** The model that ran the turn (tokens are only comparable per model). */
172
- model?: string | null;
173
- error?: {
174
- message?: string;
175
- } | null;
176
- [key: string]: unknown;
177
- }
178
- /** Whether an engine binary is installed and usable. */
179
- interface Availability {
180
- available: boolean;
181
- detail: string;
182
- }
183
- /** A persisted approval escalation and its answer, if any. */
184
- interface Approval {
185
- id: string;
186
- summary: string;
187
- createdAt?: string;
188
- response?: {
189
- decision: string;
190
- } | null;
191
- [key: string]: unknown;
192
- }
193
- //#endregion
1
+ import { c as TurnResult, l as TaskLogEntry, o as Task, s as TaskStatus, u as TokenUsage } from "./types-Dve7Z0ZP.js";
2
+ import { AsyncLocalStorage } from "node:async_hooks";
194
3
  //#region src/flow/types.d.ts
195
4
  /** Anything with zod's parse shape; the flow runtime never imports zod itself. */
196
5
  interface FlowSchema<T> {
@@ -211,7 +20,7 @@ interface GateResult {
211
20
  }
212
21
  /** Options shared with `coder run`, plus `returns`. */
213
22
  interface FlowTaskOptions<T = unknown> {
214
- agent?: string;
23
+ engine?: string;
215
24
  model?: string;
216
25
  effort?: string;
217
26
  permissions?: string;
@@ -219,6 +28,7 @@ interface FlowTaskOptions<T = unknown> {
219
28
  system?: string;
220
29
  resume?: string;
221
30
  cwd?: string;
31
+ addDirs?: string[];
222
32
  returns?: FlowSchema<T>;
223
33
  }
224
34
  type FlowRunStatus = 'queued' | 'running' | 'completed' | 'failed' | 'stopped';
@@ -232,7 +42,7 @@ type FlowEvent = {
232
42
  taskId: string;
233
43
  name?: string;
234
44
  prompt: string;
235
- agent?: string;
45
+ engine?: string;
236
46
  depth?: number;
237
47
  } | {
238
48
  kind: 'task-end';
@@ -263,6 +73,16 @@ type FlowEvent = {
263
73
  kind: 'replay';
264
74
  count: number;
265
75
  };
76
+ interface JournalEntry {
77
+ seq: number;
78
+ kind: 'task' | 'gate' | 'flow';
79
+ fingerprint: string;
80
+ result: unknown;
81
+ taskId?: string;
82
+ tokens?: TokenUsage | null;
83
+ startedAt: string;
84
+ endedAt: string;
85
+ }
266
86
  /** flow.json: the persisted run record. */
267
87
  interface FlowRecord {
268
88
  runId: string;
@@ -295,7 +115,8 @@ interface FlowStep {
295
115
  interface DiscoveredFlow {
296
116
  name: string;
297
117
  path: string;
298
- scope: 'workspace' | 'global';
118
+ /** `builtin` flows ship with coder; their `path` is `builtin:<name>`. */
119
+ scope: 'workspace' | 'global' | 'builtin';
299
120
  }
300
121
  //#endregion
301
122
  //#region src/flow/runtime.d.ts
@@ -312,7 +133,7 @@ declare function task<T>(prompt: string, opts: FlowTaskOptions<T> & {
312
133
  /** Dispatch one coder task and await its result. Mirrors `coder run`. */
313
134
  declare function task(prompt: string, opts?: FlowTaskOptions): Promise<FlowTaskResult>;
314
135
  /**
315
- * Run a shell command as a checkpoint. Never throws — inspect `ok`/`code`;
136
+ * Run a shell command as a checkpoint. Never throws. Inspect `ok`/`code`.
316
137
  * output is captured (capped) and journaled for resume.
317
138
  */
318
139
  declare function gate(cmd: string, opts?: {
@@ -334,15 +155,25 @@ declare function pipeline<T>(items: T[], ...stages: Stage[]): Promise<any[]>;
334
155
  declare function log(msg: string): void;
335
156
  /**
336
157
  * Run another flow inline as a sub-step and return its result. Nesting is one
337
- * level deep — a sub-flow cannot call `flow()` itself.
158
+ * level deep. A subflow cannot call `flow()` itself.
338
159
  */
339
160
  declare function flow(name: string, args?: unknown): Promise<unknown>;
161
+ //#endregion
162
+ //#region src/flow/executor.d.ts
340
163
  interface RunOptions {
164
+ runId?: string;
341
165
  args?: unknown;
342
166
  concurrency?: number;
343
167
  maxTasks?: number;
344
168
  dryRun?: boolean;
345
169
  cwd?: string;
170
+ /** Platform credential for built-in integrations; never persisted with the run. */
171
+ integrationToken?: string;
172
+ /** The agent whose permissions cap every task this run starts. */
173
+ ceiling?: {
174
+ agent: string;
175
+ permissions: string;
176
+ };
346
177
  }
347
178
  interface RunSummary {
348
179
  runId: string;
@@ -359,22 +190,51 @@ interface StopSummary {
359
190
  keptTasks: string[];
360
191
  }
361
192
  //#endregion
362
- //#region src/lib/state.d.ts
363
- interface JobLogEntry {
364
- at?: string;
365
- message?: string;
366
- kind?: string;
367
- [key: string]: unknown;
368
- }
369
- interface TurnResultEntry {
370
- at?: string;
371
- prompt?: string | null;
372
- finalMessage?: string;
373
- status?: number;
374
- [key: string]: unknown;
375
- }
193
+ //#region src/flow/runs.d.ts
194
+ /** A run's record with its step rows, trimmed journal and recorded events. */
195
+ type RunResult = FlowRecord & {
196
+ steps: FlowStep[];
197
+ journal: Array<Pick<JournalEntry, 'kind' | 'taskId' | 'tokens'>>;
198
+ events: FlowEvent[];
199
+ };
200
+ type Archived = {
201
+ runId: string;
202
+ archived: true;
203
+ };
204
+ type ArchivedAll = {
205
+ archived: string[];
206
+ count: number;
207
+ };
208
+ /** Archive one stopped run, or with `allStopped` every one. */
209
+ declare function archiveRuns(runId: string, opts?: {
210
+ allStopped?: false;
211
+ }): Archived;
212
+ declare function archiveRuns(runId: string | undefined, opts: {
213
+ allStopped: true;
214
+ }): ArchivedAll;
215
+ declare function archiveRuns(runId?: string, opts?: {
216
+ allStopped?: boolean;
217
+ }): Archived | ArchivedAll;
218
+ type Deleted = {
219
+ runId: string;
220
+ deleted: boolean;
221
+ };
222
+ type DeletedAll = {
223
+ deleted: string[];
224
+ count: number;
225
+ };
226
+ /** Delete one stopped run's record (its tasks are left alone), or with `allArchived` every archived one. */
227
+ declare function deleteRuns(runId: string, opts?: {
228
+ allArchived?: false;
229
+ }): Deleted;
230
+ declare function deleteRuns(runId: string | undefined, opts: {
231
+ allArchived: true;
232
+ }): DeletedAll;
233
+ declare function deleteRuns(runId?: string, opts?: {
234
+ allArchived?: boolean;
235
+ }): Deleted | DeletedAll;
376
236
  //#endregion
377
- //#region src/lib/dispatch.d.ts
237
+ //#region src/core/errors.d.ts
378
238
  /** The run-native-subagent fallback payload the CLI prints on exit 3. */
379
239
  interface FallbackPayload {
380
240
  error: string;
@@ -382,17 +242,18 @@ interface FallbackPayload {
382
242
  action: 'run-native-subagent';
383
243
  reason: 'no-engine-available';
384
244
  permissions: string;
245
+ instructions: string;
385
246
  note: string;
386
247
  system?: string;
387
248
  task: string;
388
249
  };
389
250
  }
390
- /**
391
- * Any coder operation that fails in a way the caller can act on throws a
392
- * CoderError; `code` says why. The CLI maps codes to exit codes (chain-exhausted
393
- * -> 3, approval-pending -> 4, the rest -> 1).
394
- */
395
- type CoderErrorCode = 'nested-dispatch' | 'invalid-option' | 'read-only-unavailable' | 'startup-failed' | 'chain-exhausted' | 'approval-pending' | 'task-failed' | 'flow-failed';
251
+ /** Recoverable errors with CLI exit codes. */
252
+ type CoderErrorCode = 'nested-dispatch' | 'invalid-option' | 'read-only-unavailable' | 'startup-failed' | 'chain-exhausted' | 'approval-pending' | 'task-failed' | 'flow-failed' |
253
+ /** A Coder server refused or failed a request; `status` carries the HTTP status. */
254
+ 'server' |
255
+ /** Sign-in to a server did not complete. */
256
+ 'login-failed';
396
257
  declare class CoderError extends Error {
397
258
  code: CoderErrorCode;
398
259
  hint?: string | string[];
@@ -403,11 +264,15 @@ declare class CoderError extends Error {
403
264
  approval?: {
404
265
  id: string;
405
266
  summary: string;
267
+ cwd?: string | null;
268
+ networkHost?: string | null;
406
269
  };
407
270
  /** task-failed (flow task()): the failed task's result. */
408
271
  result?: unknown;
409
272
  /** flow-failed: the run to resume. */
410
273
  runId?: string;
274
+ /** server: the HTTP status the server answered with. */
275
+ status?: number;
411
276
  constructor(code: CoderErrorCode, message: string, extra?: {
412
277
  hint?: string | string[];
413
278
  taskId?: string;
@@ -415,21 +280,42 @@ declare class CoderError extends Error {
415
280
  approval?: {
416
281
  id: string;
417
282
  summary: string;
283
+ cwd?: string | null;
284
+ networkHost?: string | null;
418
285
  };
419
286
  result?: unknown;
420
287
  runId?: string;
288
+ status?: number;
421
289
  });
422
290
  }
291
+ //#endregion
292
+ //#region src/core/state.d.ts
293
+ interface TurnResultEntry {
294
+ at?: string;
295
+ prompt?: string | null;
296
+ finalMessage?: string;
297
+ status?: number;
298
+ tokens?: TurnResult['tokens'];
299
+ model?: TurnResult['model'];
300
+ [key: string]: unknown;
301
+ }
302
+ declare function readTurnResults(cwd: string, taskId: string): TurnResultEntry[];
303
+ //#endregion
304
+ //#region src/core/dispatch.d.ts
423
305
  interface TaskResult {
424
306
  taskId: string;
425
- status: JobStatus;
307
+ status: TaskStatus;
426
308
  result: TurnResult | null;
427
309
  /** The last `tail` progress-log entries; [] at the default tail of 0. */
428
- steps: JobLogEntry[];
310
+ steps: TaskLogEntry[];
429
311
  /** One entry per finished turn (a steered task accretes turns). */
430
312
  turns: TurnResultEntry[];
431
- job: Job;
313
+ task: Task;
432
314
  }
315
+ /** Read a task's current state and result.json without waiting. `tail` fills `steps`. */
316
+ declare function readTask(cwd: string, taskId: string, opts?: {
317
+ tail?: number | 'all';
318
+ }): TaskResult;
433
319
  //#endregion
434
320
  //#region src/flow/index.d.ts
435
321
  /**
@@ -444,16 +330,14 @@ declare const flowSdk: {
444
330
  /** Recent flow runs (mirrors `coder flow list`). */
445
331
  list(opts?: {
446
332
  archived?: boolean;
447
- limit?: number;
333
+ limit?: number | "all";
448
334
  }): FlowRecord[];
449
335
  /** Flows discoverable from a directory (workspace + global). */
450
336
  discover(cwd?: string): DiscoveredFlow[];
451
- /** A run's record plus its step rows (omit the id for the most recent run). `tail` caps steps (default 'all'; 0 → []). */
337
+ /** A run's record with its step rows, journal and events (omit the id for the most recent run). `tail` caps steps (default 'all'; 0 → []). */
452
338
  result(runId?: string, opts?: {
453
339
  tail?: number | "all";
454
- }): (FlowRecord & {
455
- steps: FlowStep[];
456
- }) | null;
340
+ }): RunResult | null;
457
341
  /** Follow a run live: an async iterable of flow events, ending when the run is terminal. `tail` replays only the last n (default 'all'). */
458
342
  stream(runId?: string, opts?: {
459
343
  tail?: number | "all";
@@ -464,16 +348,10 @@ declare const flowSdk: {
464
348
  }): Promise<StopSummary>;
465
349
  /** Continue a stopped or edited run from its journal and await the result. */
466
350
  resume(runId?: string, opts?: RunOptions): Promise<RunSummary>;
467
- /** Archive a run (hide it from the default list). A running run must be stopped first. */
468
- archive(runId: string): {
469
- runId: string;
470
- archived: true;
471
- };
472
- /** Delete a run's record from disk (its tasks are left alone). A running run must be stopped first. */
473
- delete(runId: string): {
474
- runId: string;
475
- deleted: boolean;
476
- };
351
+ /** Archive a run (hide it from the default list), or with `allStopped` every stopped one. A running run must be stopped first. */
352
+ archive: typeof archiveRuns;
353
+ /** Delete a run's record from disk (its tasks are left alone), or with `allArchived` every archived one. A running run must be stopped first. */
354
+ delete: typeof deleteRuns;
477
355
  };
478
356
  //#endregion
479
- export { Job as C, CustomModelConfig as E, Availability as S, CoderConfig as T, FlowStep as _, JobLogEntry as a, GateResult as b, StopSummary as c, log as d, pipeline as f, FlowRecord as g, FlowEvent as h, TaskResult as i, flow as l, DiscoveredFlow as m, flowSdk as n, RunOptions as o, task as p, CoderError as r, RunSummary as s, args as t, gate as u, FlowTaskOptions as v, TurnResult as w, Approval as x, FlowTaskResult as y };
357
+ export { FlowTaskResult as C, FlowTaskOptions as S, task as _, readTurnResults as a, FlowRecord as b, archiveRuns as c, RunSummary as d, StopSummary as f, pipeline as g, log as h, readTask as i, deleteRuns as l, gate as m, flowSdk as n, CoderError as o, flow as p, TaskResult as r, RunResult as s, args as t, RunOptions as u, DiscoveredFlow as v, GateResult as w, FlowStep as x, FlowEvent as y };
@@ -0,0 +1 @@
1
+ import{a as e,n as t,o as n,r}from"./prompt-CEuBMNhk.js";import{i}from"./cli-BilSDkvE.js";import{p as a,s as o}from"./output-BKeyLbvt.js";import{n as s,s as c,t as l}from"./args-BOEEdpWk.js";import u from"node:path";import d from"node:process";const f={observe:`read the platform only`,comment:`also post replies and reactions`,write:`also push, branch, and open or merge pull requests`};function p(e,t){let n=a,{id:r,samples:i,integrations:s}=e;d.stdout.write(`Created ${n.cyan(t)}.\n`);let c=s.length?[`1. Write ${t}/system.md. Try it with no server: coder task run --agent ${r} "<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 (${s.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 ${r} ${i[0]??`<event.json>`} --server <url>`,`Guide: https://github.com/muzam1l/coder/blob/main/docs/agents/index.md`,`Agents: coder docs agents`]:[`1. Write ${t}/system.md. Try it with no server: coder task run --agent ${r} "<task>"`,`2. Give the agent a platform under "integrations" in ${t}/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`];d.stdout.write(`\n${o(c,n)}\n`)}async function m(r){let{regexError:i}=await import(`./agent-BsYx3Odz.js`).then(e=>e.t),{INTEGRATIONS:o}=await import(`./integrations-BAgdVDhj.js`).then(e=>e.r),{PRESETS:s}=await import(`./types-D0q15RJa.js`).then(e=>e.n),c=a;d.stdout.write(`Creating ${c.cyan(`.coder/agents/${r}`)}. Pick what the agent listens to and what it may do; flags skip these questions.\n\n`);let l=await e({title:`Integrations`,hint:`Platforms the agent listens to and acts on. Add or remove them later in agent.json.`,multi:!0,selected:[Object.keys(o)[0]],options:Object.values(o).map(e=>({value:e.id,hint:e.description}))}),u={},p={};for(let e of l){let t=o[e],r=Object.keys(t.events),a=await n({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:[r.includes(`mention`)?`mention`:r[0]],options:Object.entries(t.events).map(([e,t])=>({value:e,hint:t.description,...t.noisy?{input:{label:`match`,value:`^help\\b`,placeholder:`tab to add a match`,validate:i}}:{}}))});u[e]=a.values,p[e]=a.inputs}let[m]=l.length?await e({title:`Tools`,hint:`What the agent may do on its platforms; comment suits most agents.`,selected:[`comment`],options:s.map(e=>({value:e,hint:f[e]}))}):[`comment`],h=await t(`Display name`,r,void 0,`Shown in replies and app names.`);return{...h===r?{}:{name:h},integrations:l,events:u,matches:p,tools:m}}const h=i({name:`agent init`,help:{usage:`coder agent init [id] [--integrations a,b] [--triggers a,b] [--tools <preset>] [--name <text>] [--description <text>] [--permissions <mode>] [--yes]`,summary:"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 tools when run in a terminal without them.",flags:[[`--integrations <a,b>`,`platforms the agent listens to (see coder agent integrations list)`],[`--triggers <a,b>`,`events that start tasks, applied to each integration that has them (default: mention)`],[`--tools <preset>`,`observe, comment, or write (default: comment)`],[`--name <text>`,`display name used in replies (default: the id)`],[`--description <text>`,`one line for agent list`],[`--permissions <mode>`,`engine permission mode (default: read-only)`],[`--yes`,`skip the questions and take the defaults`]],examples:[[`coder agent init`,`answer the questions, id included`],[`coder agent init triage --integrations github --triggers issue,mention --tools comment`,`no questions`]]},options:{...l,name:c,description:c,integrations:c,triggers:c,tools:c,permissions:c,match:c,yes:s},args:1,run:async({options:e,args:[n],cwd:i})=>{let{agents:a}=await import(`./agent-BsYx3Odz.js`).then(e=>e.t),o=r()&&!e.yes;return a.init(n,{...e,cwd:i,permissions:e.permissions,...o?{askId:e=>t(`Agent id`,``,e,`Folder name under .coder/agents and the name used in commands.`)}:{},...o&&!e.integrations?{askPicks:m}:{}})},json:(e,{cwd:t})=>({id:e.id,dir:u.relative(t,e.dir),files:e.files,samples:e.samples}),print:(e,{cwd:t})=>p(e,u.relative(t,e.dir))});export{h as commandAgentInit};
@@ -0,0 +1 @@
1
+ import{s as e}from"./cli-BilSDkvE.js";const t=e(`agent integrations`,{list:async()=>(await import(`./list-VToARh3C.js`)).commandIntegrationsList,ls:async()=>(await import(`./list-VToARh3C.js`)).commandIntegrationsList,show:async()=>(await import(`./show-COTZEYgc.js`)).commandIntegrationsShow},{menu:[{usage:`list`,blurb:`list integrations with their events and tools`},{usage:`show <id>`,blurb:`events and tools of one integration`}],description:[`The platforms an agent can listen to and act on: their events and tool presets.`]},{aliases:{ls:`list`}});export{t as commandAgentIntegrations};