@wular/coder 0.3.18 → 0.4.1

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-c9c4ac4d4a10df83.js +1 -0
  43. package/dist/dash/public/assets/chunks/agent-settings-form-8be2ddab074aba6d.js +1 -0
  44. package/dist/dash/public/assets/chunks/agents-grid-951584b6f4c4314e.js +1 -0
  45. package/dist/dash/public/assets/chunks/badge-676b01e0c615bf7b.js +1 -0
  46. package/dist/dash/public/assets/chunks/card-e0901d68b79dfa93.js +1 -0
  47. package/dist/dash/public/assets/chunks/combo-41234c24668b1db1.js +1 -0
  48. package/dist/dash/public/assets/chunks/composer-5534be50bc12385e.js +1 -0
  49. package/dist/dash/public/assets/chunks/composer-d10d4b1d54c4f751.js +1 -0
  50. package/dist/dash/public/assets/chunks/composer-data-6f7608fed13f3dd7.js +1 -0
  51. package/dist/dash/public/assets/chunks/confirm-f2fe4ba9905a89c6.js +1 -0
  52. package/dist/dash/public/assets/chunks/connect-apps-aa2a3d82e48ed8c3.js +1 -0
  53. package/dist/dash/public/assets/chunks/connect-repositories-5389ec8701a3deac.js +1 -0
  54. package/dist/dash/public/assets/chunks/credentials-list-bc5bfcab058176c5.js +2 -0
  55. package/dist/dash/public/assets/chunks/custom-range-4761ab14f05149df.js +1 -0
  56. package/dist/dash/public/assets/chunks/editor-bfe8cd854f8001be.js +7 -0
  57. package/dist/dash/public/assets/chunks/engines-list-f1191390f5715b39.js +1 -0
  58. package/dist/dash/public/assets/chunks/field-901f1f35c18c39c9.js +1 -0
  59. package/dist/dash/public/assets/chunks/format-eb03fc9d9744d960.js +1 -0
  60. package/dist/dash/public/assets/chunks/heads-f3bcd289663d48fa.js +1 -0
  61. package/dist/dash/public/assets/chunks/instructions-052fa45a9daf6db6.js +2 -0
  62. package/dist/dash/public/assets/chunks/instructions-d0a4b0d95009c262.js +1 -0
  63. package/dist/dash/public/assets/chunks/list-1d259660d7612c5f.js +1 -0
  64. package/dist/dash/public/assets/chunks/mcp-list-e3bebbbe831393b8.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-44f857a469ca04d5.js +1 -0
  67. package/dist/dash/public/assets/chunks/paged-bc6fa0c2b9d52ed7.js +1 -0
  68. package/dist/dash/public/assets/chunks/platform-actions-d1426602049926d2.js +1 -0
  69. package/dist/dash/public/assets/chunks/runners-list-1901af8a5dea1f09.js +1 -0
  70. package/dist/dash/public/assets/chunks/runtime-246221e985d863e5-1.js +2 -0
  71. package/dist/dash/public/assets/chunks/segmented-358ff2b4992b8384.js +1 -0
  72. package/dist/dash/public/assets/chunks/select-7ae25fd8a7d6c338.js +1 -0
  73. package/dist/dash/public/assets/chunks/sentinel-c972a33dc69a5135.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-88cce66bb3cfe1e5.js +5 -0
  76. package/dist/dash/public/assets/chunks/shared-init-8f2ac936c95a7f7b.js +1 -0
  77. package/dist/dash/public/assets/chunks/shared-init-ffb3397e494137c9.js +2 -0
  78. package/dist/dash/public/assets/chunks/tail-7c27aab8ba268bd9.js +1 -0
  79. package/dist/dash/public/assets/chunks/task-actions-8e1d93c788d001df.js +1 -0
  80. package/dist/dash/public/assets/chunks/task-fa8b82e95e771c4a.js +1 -0
  81. package/dist/dash/public/assets/chunks/task-view-6d7618d2820a5cb4.js +3 -0
  82. package/dist/dash/public/assets/chunks/tasks-list-f4784e5cbd0ed785.js +1 -0
  83. package/dist/dash/public/assets/chunks/toolbar-a75d2570f07cbb70.js +1 -0
  84. package/dist/dash/public/assets/chunks/versions-list-fc2e0d2a7382e049.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-03b03b254e525e82.js +1 -0
  111. package/dist/dash/public/assets/pnext-client-1b9ab0963a8ff77b.js +1 -0
  112. package/dist/dash/public/assets/pnext-client-1c7859bb888f4ef0.js +1 -0
  113. package/dist/dash/public/assets/pnext-client-3c748afe963fb05d.js +1 -0
  114. package/dist/dash/public/assets/pnext-client-4f47c2cae220f107.js +1 -0
  115. package/dist/dash/public/assets/pnext-client-6ab9fd9b53b794d2.js +1 -0
  116. package/dist/dash/public/assets/pnext-client-6c241786342498e4.js +1 -0
  117. package/dist/dash/public/assets/pnext-client-80b56d420f02b808.js +1 -0
  118. package/dist/dash/public/assets/pnext-client-83135c17bae850a3.js +1 -0
  119. package/dist/dash/public/assets/pnext-client-8e6fa4302ae0396f.js +1 -0
  120. package/dist/dash/public/assets/pnext-client-932c9d8cc0717fc8.js +1 -0
  121. package/dist/dash/public/assets/pnext-client-a42ae63d4de113f9.js +1 -0
  122. package/dist/dash/public/assets/pnext-client-d2ee6f8c1e337032.js +1 -0
  123. package/dist/dash/public/assets/pnext-client-d513f65ec23b7f20.js +1 -0
  124. package/dist/dash/public/assets/pnext-client-ecb88e2a8a109954.js +1 -0
  125. package/dist/dash/public/assets/pnext-client-f1545ee6270bbf9a.js +1 -0
  126. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/boot-B2MFTRO2.js +30 -0
  127. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/build-tier-XJJSL5FR.js +2704 -0
  128. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2HFY3DQT.js +208 -0
  129. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2ICEVELW.js +834 -0
  130. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-3UPROT2C.js +35 -0
  131. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4P5CMIYT.js +1582 -0
  132. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4TKZKZ3Q.js +131 -0
  133. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-5RDEILQB.js +437 -0
  134. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-62KEQM43.js +25 -0
  135. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-6KQSWT6D.js +831 -0
  136. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-7DCNCW6O.js +724 -0
  137. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-B4THCTQP.js +22 -0
  138. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-C2LIV2MM.js +172 -0
  139. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-CCATPVTW.js +378 -0
  140. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-COXJAPTU.js +89 -0
  141. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-E6IXL2NJ.js +6270 -0
  142. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FLGRBFAH.js +1198 -0
  143. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FTJVHFWD.js +61 -0
  144. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-H523KSIH.js +5151 -0
  145. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-HT6KKX6A.js +20 -0
  146. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JESFYECC.js +438 -0
  147. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JRPJM2XY.js +17 -0
  148. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L2IWDUXG.js +107 -0
  149. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L5P4Y4UC.js +183 -0
  150. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-NQE46AZN.js +647 -0
  151. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PA4QEARJ.js +129 -0
  152. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PZ5AXOLW.js +7146 -0
  153. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-SNVPTULL.js +2397 -0
  154. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-T3QZT3PG.js +220 -0
  155. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-VC5O2SDP.js +72 -0
  156. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-WZX4V6CM.js +231 -0
  157. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-XUUIDXY5.js +627 -0
  158. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-ZHFDO3PR.js +265 -0
  159. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/compile-CE2DN7ZA.js +18 -0
  160. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-UREY7XJT.js +16 -0
  161. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-loader-UI2XE3PZ.js +17 -0
  162. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/entry.js +219 -0
  163. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/generate-I2PPTDFD.js +16 -0
  164. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/modules-UVOCE4C2.js +48 -0
  165. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/pipeline-UW47K537.js +963 -0
  166. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/proxy-ITGOVJBW.js +26 -0
  167. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/register-4SA55SWT.js +12579 -0
  168. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/router-JNKHLBCZ.js +505 -0
  169. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/routes-PD6J2NXW.js +54 -0
  170. package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/tsconfig-defaults-ZXEH7RQK.js +15 -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-CZjFX5zV.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-I5Cwtl_K.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,627 @@
1
+ import { createRequire as __coderRequire } from "node:module";
2
+ const __pnextRoot = __coderRequire(import.meta.url).resolve("@wular/pnext").replace(/\/src\/index\.ts$/, "");
3
+ import { createRequire as __pnextCreateRequire } from "node:module";
4
+ const require = __pnextCreateRequire(("file://" + __pnextRoot + "/package.json"));
5
+ import {
6
+ frameworkRuntimeAliasEntries,
7
+ pnextAliases
8
+ } from "./chunk-JESFYECC.js";
9
+ import {
10
+ readText
11
+ } from "./chunk-2HFY3DQT.js";
12
+ import {
13
+ escapeRegex,
14
+ isIdentifier,
15
+ uniqueIdentifier
16
+ } from "./chunk-4P5CMIYT.js";
17
+
18
+ // ../node_modules/.bun/@wular+pnext@0.1.5+62547eec5a2188e3/node_modules/@wular/pnext/src/compat/aliases.ts
19
+ import path3 from "node:path";
20
+ import { createRequire } from "node:module";
21
+
22
+ // ../node_modules/.bun/@wular+pnext@0.1.5+62547eec5a2188e3/node_modules/@wular/pnext/src/compat/actions/client-plugin.ts
23
+ import path2 from "node:path";
24
+ import { realpathSync } from "node:fs";
25
+
26
+ // ../node_modules/.bun/@wular+pnext@0.1.5+62547eec5a2188e3/node_modules/@wular/pnext/src/compat/actions/ids.ts
27
+ import { createHash } from "node:crypto";
28
+ import path from "node:path";
29
+ function actionId(filePath, exportName, root) {
30
+ const key = workspaceRelative(filePath, root);
31
+ return createHash("sha256").update(key).update("\0").update(exportName).digest("hex").slice(0, 12);
32
+ }
33
+ function workspaceRelative(filePath, root) {
34
+ const rel = root ? path.relative(root, filePath) : filePath;
35
+ return toPosix(rel);
36
+ }
37
+ function toPosix(value) {
38
+ return value.split(path.sep).join("/");
39
+ }
40
+
41
+ // ../node_modules/.bun/@wular+pnext@0.1.5+62547eec5a2188e3/node_modules/@wular/pnext/src/compat/actions/detect.ts
42
+ var DIRECTIVE = /^(['"])use server\1\s*;?$/;
43
+ var CACHE_DIRECTIVE = /^(['"])use cache\1\s*;?$/;
44
+ function moduleLevelUseServer(source) {
45
+ const first = firstStatementText(stripLeading(source));
46
+ return first !== void 0 && DIRECTIVE.test(first.trim());
47
+ }
48
+ function moduleLevelUseCache(source) {
49
+ const first = firstStatementText(stripLeading(source));
50
+ return first !== void 0 && CACHE_DIRECTIVE.test(first.trim());
51
+ }
52
+ function inlineUseServerFunctions(source) {
53
+ const found = [];
54
+ const seen = /* @__PURE__ */ new Set();
55
+ const fnDecl = /(\bexport\s+)?(?:async\s+)?function\s+([A-Za-z_$][\w$]*)\s*\([^)]*\)\s*\{\s*(['"])use server\3\s*;?/g;
56
+ collect(fnDecl, source, found, seen, { nameGroup: 2, exportGroup: 1, dirGroup: 3 });
57
+ const arrowOrExpr = /(\bexport\s+)?(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:async\s+)?(?:\([^)]*\)|[A-Za-z_$][\w$]*|function\s*\*?\s*\([^)]*\))\s*(?:=>\s*)?\{\s*(['"])use server\3\s*;?/g;
58
+ collect(arrowOrExpr, source, found, seen, { nameGroup: 2, exportGroup: 1, dirGroup: 3 });
59
+ return found.sort((a, b) => a.start - b.start);
60
+ }
61
+ function collect(pattern, source, out, seen, groups) {
62
+ let match;
63
+ while (match = pattern.exec(source)) {
64
+ const name = match[groups.nameGroup];
65
+ if (!name || seen.has(name)) continue;
66
+ seen.add(name);
67
+ out.push({
68
+ name,
69
+ exported: Boolean(match[groups.exportGroup]),
70
+ start: match.index,
71
+ directiveEnd: match.index + match[0].length
72
+ });
73
+ }
74
+ }
75
+ function moduleActionExports(source) {
76
+ const names = /* @__PURE__ */ new Set();
77
+ const declRe = /\bexport\s+(?:async\s+)?(?:function\s*\*?\s+|const\s+|let\s+|var\s+|class\s+)([A-Za-z_$][\w$]*)/g;
78
+ for (let m; m = declRe.exec(source); ) if (m[1]) names.add(m[1]);
79
+ if (/\bexport\s+default\b/.test(source)) names.add("default");
80
+ const listRe = /\bexport\s+(?!type\b)\{([^}]*)\}/g;
81
+ for (let m; m = listRe.exec(source); ) {
82
+ for (const part of (m[1] ?? "").split(",")) {
83
+ const trimmed = part.trim();
84
+ if (!trimmed || trimmed.startsWith("type ")) continue;
85
+ const exportedName = /\bas\s+([A-Za-z_$][\w$]*)\s*$/.exec(trimmed)?.[1];
86
+ const name = exportedName ?? trimmed;
87
+ if (/^[A-Za-z_$][\w$]*$/.test(name)) names.add(name);
88
+ }
89
+ }
90
+ return [...names];
91
+ }
92
+ function stripLeading(source) {
93
+ let s = source.replace(/^\uFEFF/, "");
94
+ if (s.startsWith("#!")) {
95
+ const nl = s.indexOf("\n");
96
+ s = nl === -1 ? "" : s.slice(nl + 1);
97
+ }
98
+ return s;
99
+ }
100
+ function firstStatementText(source) {
101
+ let i = 0;
102
+ const n = source.length;
103
+ while (i < n) {
104
+ const ch = source[i];
105
+ if (ch === " " || ch === " " || ch === "\r" || ch === "\n") {
106
+ i++;
107
+ continue;
108
+ }
109
+ if (ch === "/" && source[i + 1] === "/") {
110
+ const nl = source.indexOf("\n", i);
111
+ if (nl === -1) return void 0;
112
+ i = nl + 1;
113
+ continue;
114
+ }
115
+ if (ch === "/" && source[i + 1] === "*") {
116
+ const end2 = source.indexOf("*/", i + 2);
117
+ if (end2 === -1) return void 0;
118
+ i = end2 + 2;
119
+ continue;
120
+ }
121
+ break;
122
+ }
123
+ if (i >= n) return void 0;
124
+ let j = i;
125
+ while (j < n && source[j] !== "\n" && source[j] !== ";") j++;
126
+ const end = source[j] === ";" ? j + 1 : j;
127
+ return source.slice(i, end);
128
+ }
129
+ function opensWithUseServerDirective(fn) {
130
+ if (typeof fn !== "function") return false;
131
+ let source;
132
+ try {
133
+ source = String(fn);
134
+ } catch {
135
+ return false;
136
+ }
137
+ const body = source.indexOf("{", source.indexOf(")") + 1);
138
+ if (body === -1) return false;
139
+ return /^\s*(['"])use server\1/.test(source.slice(body + 1));
140
+ }
141
+
142
+ // ../node_modules/.bun/@wular+pnext@0.1.5+62547eec5a2188e3/node_modules/@wular/pnext/src/compat/actions/client-stub.ts
143
+ function clientStubSource(module) {
144
+ const lines = [];
145
+ lines.push(`// Generated pnext server-action client stub.`);
146
+ lines.push(`// Module: ${sanitizeComment(module.modulePath)}`);
147
+ lines.push(RUNTIME);
148
+ for (const name of module.exports) {
149
+ const id = module.actionIds[name];
150
+ if (!id) continue;
151
+ const decl = name === "default" ? "export default" : `export const ${name} =`;
152
+ lines.push(`${decl} __pnextAction(${JSON.stringify(id)});`);
153
+ }
154
+ return lines.join("\n") + "\n";
155
+ }
156
+ var RUNTIME = `
157
+ function __pnextAction(id) {
158
+ const action = async function (...args) {
159
+ const runtime = (process.browser || typeof window !== 'undefined') ? window.__PNEXT_ACTIONS__ : undefined;
160
+ if (runtime) {
161
+ return runtime.call(id, args);
162
+ }
163
+ // Called on the SERVER: a client-imported 'use server' function invoked during a server
164
+ // render/action (a bound action a client page's useActionState registered, dispatched in the no-JS
165
+ // progressive path). Route it through the endpoint's server-side dispatcher, which resolves the id
166
+ // to the real compiled action and runs it in the active request scope, instead of throwing as if
167
+ // the browser runtime were missing.
168
+ const server =
169
+ typeof globalThis !== 'undefined' ? globalThis.__PNEXT_SERVER_ACTIONS__ : undefined;
170
+ if (server) {
171
+ return server.call(id, args);
172
+ }
173
+ throw new Error('pnext action runtime is not installed (is Next compat enabled?)');
174
+ };
175
+ action.$$pnextActionId = id;
176
+ return action;
177
+ }
178
+ `;
179
+ function sanitizeComment(value) {
180
+ return value.replace(/\*\//g, "*\\/").replace(/[\r\n]/g, " ");
181
+ }
182
+
183
+ // ../node_modules/.bun/@wular+pnext@0.1.5+62547eec5a2188e3/node_modules/@wular/pnext/src/compat/actions/client-plugin.ts
184
+ var clientActionState;
185
+ function setClientActionModules(root, files) {
186
+ const originals = /* @__PURE__ */ new Set();
187
+ const canonicalFiles = /* @__PURE__ */ new Set();
188
+ for (const file of files) {
189
+ originals.add(path2.resolve(file));
190
+ canonicalFiles.add(canonical(file));
191
+ }
192
+ clientActionState = originals.size > 0 ? { root, files: originals, canonicalFiles } : void 0;
193
+ }
194
+ function canonical(file) {
195
+ const abs = path2.resolve(file);
196
+ try {
197
+ return realpathSync.native(abs);
198
+ } catch {
199
+ return abs;
200
+ }
201
+ }
202
+ function clearClientActionModules() {
203
+ clientActionState = void 0;
204
+ }
205
+ function isActionModule(file) {
206
+ if (!clientActionState) return false;
207
+ return clientActionState.files.has(path2.resolve(file)) || clientActionState.canonicalFiles.has(canonical(file));
208
+ }
209
+ function isClientActionModule(file) {
210
+ return isActionModule(file);
211
+ }
212
+ function clientActionModulesRoot() {
213
+ return clientActionState?.root;
214
+ }
215
+ function clientActionModuleFiles() {
216
+ return clientActionState ? [...clientActionState.files] : [];
217
+ }
218
+ function actionStubSourceFor(file, root) {
219
+ return stubSourceFor(file, root ?? clientActionState?.root);
220
+ }
221
+ function actionClientStubPlugin() {
222
+ const paths = clientActionState ? [...clientActionState.files, ...clientActionState.canonicalFiles] : [];
223
+ const filter = new RegExp(`^(?:${[...new Set(paths)].map(escapeRegex).join("|")})$`);
224
+ return {
225
+ name: "pnext-action-client-stub",
226
+ setup(build) {
227
+ if (paths.length === 0) return;
228
+ build.onLoad({ filter, namespace: "file" }, async (args) => {
229
+ if (!isActionModule(args.path)) return void 0;
230
+ return {
231
+ contents: await stubSourceFor(args.path, clientActionState?.root),
232
+ loader: "js"
233
+ };
234
+ });
235
+ }
236
+ };
237
+ }
238
+ async function stubSourceFor(file, root) {
239
+ const source = await readText(file);
240
+ return stubSourceFromSource(file, source, root);
241
+ }
242
+ function stubSourceFromSource(file, source, root) {
243
+ if (!moduleLevelUseServer(source) && !moduleLevelUseCache(source)) return "export {};";
244
+ const exports = moduleActionExports(source);
245
+ const actionIds = {};
246
+ for (const name of exports) actionIds[name] = canonicalActionId(file, name, root);
247
+ return clientStubSource({ modulePath: file, exports, actionIds });
248
+ }
249
+ async function loadClientActionSource(file, root) {
250
+ const source = await readText(file);
251
+ if (!moduleLevelUseServer(source) && !moduleLevelUseCache(source)) return { source };
252
+ return { source, stubSource: stubSourceFromSource(file, source, root) };
253
+ }
254
+ function canonicalActionId(file, exportName, root) {
255
+ return actionId(canonical(file), exportName, root ? canonical(root) : void 0);
256
+ }
257
+
258
+ // ../node_modules/.bun/@wular+pnext@0.1.5+62547eec5a2188e3/node_modules/@wular/pnext/src/compat/ppr/root-params-transform.ts
259
+ var ROOT_PARAMS_SPECIFIER = /['"]next\/root-params['"]/;
260
+ var IMPORT_RE = /^[ \t]*import\s+\{([^}]*)\}\s+from\s+['"]next\/root-params['"]\s*;?[ \t]*(?:\r?\n)?/gm;
261
+ function parseBindings(clause) {
262
+ return clause.split(",").map((part) => part.trim()).filter(Boolean).flatMap((part) => {
263
+ if (part.startsWith("type ")) return [];
264
+ const [importedRaw, localRaw] = part.split(/\s+as\s+/);
265
+ const imported = importedRaw?.trim();
266
+ const local = (localRaw ?? importedRaw)?.trim();
267
+ if (!imported || !local || !isIdentifier(imported) || !isIdentifier(local)) return [];
268
+ return [{ imported, local }];
269
+ });
270
+ }
271
+ function rewriteRootParamsSource(source) {
272
+ if (!ROOT_PARAMS_SPECIFIER.test(source)) return source;
273
+ const proxyName = uniqueIdentifier(source, "__pnextRootParams");
274
+ const declarations = [];
275
+ let importedProxy = false;
276
+ const rewritten = source.replace(IMPORT_RE, (_statement, clause) => {
277
+ const bindings = parseBindings(clause);
278
+ if (bindings.length === 0) return "";
279
+ importedProxy = true;
280
+ for (const { imported, local } of bindings) {
281
+ declarations.push(`const ${local} = ${proxyName}[${JSON.stringify(imported)}];`);
282
+ }
283
+ return "";
284
+ });
285
+ if (!importedProxy) return source;
286
+ return [
287
+ `import ${proxyName} from ${JSON.stringify("next/root-params")};`,
288
+ ...declarations,
289
+ rewritten
290
+ ].join("\n");
291
+ }
292
+
293
+ // ../node_modules/.bun/@wular+pnext@0.1.5+62547eec5a2188e3/node_modules/@wular/pnext/src/compat/aliases.ts
294
+ function reactCompatEnabled(config) {
295
+ return Boolean(config.compat?.next || config.compat?.react || reactCompilerOptions(config));
296
+ }
297
+ function reactCompilerOptions(config) {
298
+ if (!config.compat?.reactCompiler) return void 0;
299
+ return { target: "18" };
300
+ }
301
+ function nextCompatEnabled(config) {
302
+ return Boolean(config.compat?.next);
303
+ }
304
+ var SHIMMED_NEXT_DIST_PATHS = [
305
+ "next/dist/client/components/app-router-headers",
306
+ "next/dist/server/web/spec-extension/unstable-cache",
307
+ "next/dist/server/web/spec-extension/unstable-no-store",
308
+ "next/dist/server/web/spec-extension/revalidate",
309
+ "next/dist/server/app-render/work-unit-async-storage.external"
310
+ ];
311
+ function missingCompatImportError(config, specifier) {
312
+ if (/^next(\/|$)/.test(specifier)) {
313
+ if (!nextCompatEnabled(config)) {
314
+ return `'${specifier}' requires Next compatibility. Enable compat.next in pnext.config.ts.`;
315
+ }
316
+ if (specifier.startsWith("next/dist/")) {
317
+ const bare = specifier.replace(/\.js$/, "");
318
+ if (!SHIMMED_NEXT_DIST_PATHS.includes(bare)) {
319
+ return `'${specifier}' is not a supported import: next/dist internals are not part of the public surface pnext shims. Only these next/dist/* paths are shimmed:
320
+ ` + SHIMMED_NEXT_DIST_PATHS.map((path4) => ` - ${path4}`).join("\n") + `
321
+ See https://pnext.dev/docs/compat ("Smaller surfaces") and report the library that needs a new shim.`;
322
+ }
323
+ }
324
+ return void 0;
325
+ }
326
+ if (/^react(-dom)?(\/|$)/.test(specifier) && !reactCompatEnabled(config)) {
327
+ return `'${specifier}' requires React compatibility. Enable compat.react (or compat.next) in pnext.config.ts.`;
328
+ }
329
+ return void 0;
330
+ }
331
+ function compatAliases(config, target) {
332
+ return {
333
+ ...frameworkRuntimeAliasEntries(),
334
+ ...pnextAliases(target),
335
+ ...reactCompatAliases(config, target),
336
+ ...nextCompatAliases(config, target)
337
+ };
338
+ }
339
+ function reactServerLayerAliases(config) {
340
+ if (!reactCompatEnabled(config)) return {};
341
+ const reactRoot = path3.resolve((__pnextRoot + "/src/compat"), "react");
342
+ return {
343
+ react: path3.join(reactRoot, "react-server.ts"),
344
+ "react-dom": path3.join(reactRoot, "dom-react-server.ts")
345
+ };
346
+ }
347
+ function reactCompatAliases(config, target) {
348
+ if (!reactCompatEnabled(config)) return {};
349
+ const reactRoot = path3.resolve((__pnextRoot + "/src/compat"), "react");
350
+ const runtime = frameworkRuntimeAliasEntries();
351
+ return {
352
+ react: path3.join(reactRoot, target === "client" ? "client.ts" : "server.ts"),
353
+ // dom.ts wraps preact/compat with the form-action hooks react-dom ships
354
+ // (useFormState/useFormStatus/requestFormReset).
355
+ "react-dom": path3.join(reactRoot, "dom.ts"),
356
+ "react-dom/client": runtime["preact/compat/client"],
357
+ // react-dom/server (+ .edge/.browser entrypoints) shimmed over
358
+ // preact-render-to-string for the synchronous string renderers.
359
+ "react-dom/server": path3.join(reactRoot, "dom-server.ts"),
360
+ "react-dom/server.edge": path3.join(reactRoot, "dom-server.ts"),
361
+ "react-dom/server.browser": path3.join(reactRoot, "dom-server.ts"),
362
+ "react/jsx-runtime": runtime["preact/jsx-runtime"],
363
+ "react/jsx-dev-runtime": runtime["preact/jsx-dev-runtime"],
364
+ // React Compiler memo-cache runtime. Both the React 19 built-in specifier
365
+ // (`react/compiler-runtime`) and the standalone npm package name
366
+ // (`react-compiler-runtime`, emitted for a React 17/18 compiler target, and
367
+ // imported by pre-compiled libraries) map to a preact-backed shim. The npm
368
+ // package's own `require('react').useMemo` throws under preact SSR.
369
+ "react/compiler-runtime": path3.join(reactRoot, "compiler-runtime.ts"),
370
+ "react-compiler-runtime": path3.join(reactRoot, "compiler-runtime.ts")
371
+ };
372
+ }
373
+ function nextCompatAliases(config, target) {
374
+ if (!nextCompatEnabled(config)) return {};
375
+ return nextCompatAliasEntries(target);
376
+ }
377
+ function nextCompatAliasEntries(target) {
378
+ const nextRoot = path3.resolve((__pnextRoot + "/src/compat"), "next");
379
+ return withJsExtensionAliases({
380
+ next: path3.join(nextRoot, "index.ts"),
381
+ // Client variant avoids node:async_hooks (render cache-meta collector) in
382
+ // browser bundles; the APIs are server-only in Next anyway.
383
+ "next/cache": path3.join(nextRoot, target === "client" ? "client-cache.ts" : "cache.ts"),
384
+ "next/config": path3.join(nextRoot, "config.ts"),
385
+ // CJS so an app `require('next/constants')` loads a genuine CommonJS module: the server runtime's
386
+ // onLoad transform only intercepts `[jt]sx?`, so a `.cjs` external is left to Bun's native loader
387
+ // and stays synchronously requirable - an ESM `.ts` external forced through that transform becomes
388
+ // async and require() returns undefined for every named export.
389
+ "next/constants": path3.join(nextRoot, "constants.cjs"),
390
+ "next/dynamic": path3.join(nextRoot, "dynamic.tsx"),
391
+ "next/error": path3.join(nextRoot, "error.tsx"),
392
+ "next/font": path3.join(nextRoot, "font", "index.ts"),
393
+ "next/font/google": path3.join(nextRoot, "font", "google.ts"),
394
+ "next/font/local": path3.join(nextRoot, "font", "local.ts"),
395
+ "next/form": path3.join(nextRoot, "form.tsx"),
396
+ "next/head": path3.join(nextRoot, "head.tsx"),
397
+ "next/headers": path3.join(nextRoot, "headers.ts"),
398
+ "next/image": path3.join(nextRoot, "image.tsx"),
399
+ // The legacy component blanks a lazy image's `src` until it is near the
400
+ // viewport — its own module, not an alias of the modern one.
401
+ "next/legacy/image": path3.join(nextRoot, "legacy-image.tsx"),
402
+ "next/link": path3.join(nextRoot, "link.tsx"),
403
+ "next/navigation": path3.join(
404
+ nextRoot,
405
+ target === "client" ? "client-navigation.ts" : "navigation.ts"
406
+ ),
407
+ "next/offline": path3.join(nextRoot, "offline.ts"),
408
+ "next/og": path3.join(nextRoot, "og.ts"),
409
+ "@vercel/og": path3.join(nextRoot, "og.ts"),
410
+ "next/root-params": path3.join(nextRoot, "root-params.ts"),
411
+ "next/router": path3.join(nextRoot, "router.ts"),
412
+ "next/script": path3.join(nextRoot, target === "client" ? "client-script.tsx" : "script.tsx"),
413
+ "next/web-vitals": path3.join(nextRoot, "web-vitals.ts"),
414
+ // Client variant avoids node:async_hooks (request scope / ppr / revalidate)
415
+ // in browser bundles; the request-scope APIs are server-only in Next anyway.
416
+ "next/server": path3.join(nextRoot, target === "client" ? "client-server.ts" : "server.ts"),
417
+ // Server compiles accept the marker (react-server condition equivalent);
418
+ // client bundles keep the package's own error behavior.
419
+ ...target === "server" ? { "server-only": path3.join(nextRoot, "server-only.ts") } : {},
420
+ // client-only must resolve on both targets: a 'use client' page importing it
421
+ // is legitimately SSR'd (server compile) as well as browser-bundled.
422
+ "client-only": path3.join(nextRoot, "client-only.ts"),
423
+ // The styled-jsx source transform (css/styled-jsx.ts) rewrites <style jsx>
424
+ // blocks to import from this specifier; apps never install styled-jsx.
425
+ "styled-jsx": path3.join(nextRoot, "..", "css", "styled-jsx-runtime.ts"),
426
+ // Deep next/dist imports that show up in real Next apps and e2e fixtures.
427
+ // Exact-match aliases only; unknown next/dist paths keep failing through
428
+ // missingCompatImportError / normal resolution.
429
+ "next/dist/client/components/app-router-headers": path3.join(
430
+ nextRoot,
431
+ "dist",
432
+ "client",
433
+ "components",
434
+ "app-router-headers.ts"
435
+ ),
436
+ "next/dist/server/web/spec-extension/unstable-cache": path3.join(
437
+ nextRoot,
438
+ "dist",
439
+ "server",
440
+ "web",
441
+ "spec-extension",
442
+ "unstable-cache.ts"
443
+ ),
444
+ "next/dist/server/web/spec-extension/unstable-no-store": path3.join(
445
+ nextRoot,
446
+ "dist",
447
+ "server",
448
+ "web",
449
+ "spec-extension",
450
+ "unstable-no-store.ts"
451
+ ),
452
+ "next/dist/server/web/spec-extension/revalidate": path3.join(
453
+ nextRoot,
454
+ "dist",
455
+ "server",
456
+ "web",
457
+ "spec-extension",
458
+ "revalidate.ts"
459
+ ),
460
+ // Direct import of the work-unit store (see the shim's header). Server-only;
461
+ // a browser bundle never reaches request context. CJS for the same reason as
462
+ // next/constants above: apps `require()` this deep internal, and a `.ts`
463
+ // external would become an async module through the onLoad transform, making
464
+ // the require() throw outright.
465
+ ...target === "server" ? {
466
+ "next/dist/server/app-render/work-unit-async-storage.external": path3.join(
467
+ nextRoot,
468
+ "dist",
469
+ "server",
470
+ "app-render",
471
+ "work-unit-async-storage.external.cjs"
472
+ )
473
+ } : {}
474
+ });
475
+ }
476
+ function withJsExtensionAliases(aliases) {
477
+ const entries = { ...aliases };
478
+ for (const [specifier, target] of Object.entries(aliases)) {
479
+ if (specifier !== "next") entries[`${specifier}.js`] = target;
480
+ }
481
+ return entries;
482
+ }
483
+ var compatSuspense;
484
+ async function ensureCompatSuspense(config) {
485
+ if (compatSuspense !== void 0 || !reactCompatEnabled(config)) return;
486
+ compatSuspense = (await import("preact/compat")).Suspense;
487
+ }
488
+ function compatSuspenseType() {
489
+ return compatSuspense;
490
+ }
491
+ var fontRuntimePaths = {
492
+ server: path3.join((__pnextRoot + "/src/compat"), "next", "font", "runtime.ts"),
493
+ client: path3.join((__pnextRoot + "/src/compat"), "next", "font", "runtime-client.ts")
494
+ };
495
+ function rewriteNextFontSource(source, file, target = "server", root) {
496
+ if (!source.includes("next/font") && !source.includes("next/root-params")) return source;
497
+ source = rewriteRootParamsSource(source);
498
+ const runtimePath = fontRuntimePaths[target];
499
+ let next = rewriteNextGoogleFontImports(source, runtimePath);
500
+ const localFontNames = nextLocalFontImportNames(next);
501
+ if (localFontNames.size === 0) return next;
502
+ const callerFile = localFontCallerFile(file, root);
503
+ for (const name of localFontNames) {
504
+ next = next.replace(
505
+ new RegExp(`(?<![.$\\w])${escapeRegex(name)}\\s*\\(`, "g"),
506
+ `${name}.withFile(${JSON.stringify(callerFile)})(`
507
+ );
508
+ }
509
+ for (const name of localFontNames) {
510
+ next = next.replace(
511
+ new RegExp(
512
+ `((?:export\\s+)?(?:const|let|var)\\s+)([A-Za-z_$][\\w$]*)(\\s*=\\s*)${escapeRegex(name)}\\.withFile\\(([^)]*)\\)\\(`,
513
+ "g"
514
+ ),
515
+ (_statement, declaration, binding, equals, caller) => `${declaration}${binding}${equals}${name}.withFile(${caller}, ${JSON.stringify(binding)})(`
516
+ );
517
+ }
518
+ next = next.replace(
519
+ /^[ \t]*import\s+([A-Za-z_$][\w$]*)\s+from\s+(['"])([^'"]+)\2\s*;?[ \t]*$/gm,
520
+ (statement, name, _quote, specifier) => {
521
+ if (!isNextLocalFontSpecifier(specifier)) return statement;
522
+ return `import { localFont as ${name} } from ${JSON.stringify(runtimePath)};`;
523
+ }
524
+ );
525
+ return next;
526
+ }
527
+ function rewriteNextGoogleFontImports(source, runtimePath) {
528
+ const statements = [];
529
+ const helperName = uniqueIdentifier(source, "__pnextGoogleFont");
530
+ const namespaceHelperName = uniqueIdentifier(source, "__pnextGoogleFonts", helperName);
531
+ const rewritten = source.replace(
532
+ /^[ \t]*import\s+(?!type\b)((?:[^\n;]|\n(?![ \t]*(?:import|export)\b))*?)\s+from\s+['"]next\/font\/google['"]\s*;?[ \t]*(?:\r?\n)?/gm,
533
+ (_statement, clause) => {
534
+ const bindings = nextGoogleFontBindings(clause);
535
+ if (bindings.length === 0) return "";
536
+ statements.push(
537
+ ...bindings.map(
538
+ (binding) => googleFontBindingSource(binding, helperName, namespaceHelperName)
539
+ )
540
+ );
541
+ return "";
542
+ }
543
+ );
544
+ if (statements.length === 0) return source;
545
+ return [
546
+ `import { googleFont as ${helperName} } from ${JSON.stringify(runtimePath)};`,
547
+ `const ${namespaceHelperName} = new Proxy({}, { get: (_target, key) => typeof key === 'string' ? ${helperName}(key.replace(/_/g, ' ')) : undefined });`,
548
+ ...statements,
549
+ rewritten
550
+ ].join("\n");
551
+ }
552
+ function nextGoogleFontBindings(clause) {
553
+ const trimmed = clause.trim();
554
+ const namespace = /^\*\s+as\s+([A-Za-z_$][\w$]*)$/.exec(trimmed)?.[1];
555
+ if (namespace) return [{ imported: namespace, local: namespace, namespace: true }];
556
+ const named = /\{([\s\S]*)\}/.exec(trimmed)?.[1];
557
+ if (!named) return [];
558
+ return named.split(",").map((part) => part.trim()).filter(Boolean).flatMap((part) => {
559
+ if (part.startsWith("type ")) return [];
560
+ const [importedRaw, localRaw] = part.split(/\s+as\s+/);
561
+ const imported = importedRaw?.trim();
562
+ const local = (localRaw ?? importedRaw)?.trim();
563
+ if (!imported || !local || !isIdentifier(imported) || !isIdentifier(local)) return [];
564
+ return [{ imported, local }];
565
+ });
566
+ }
567
+ function googleFontBindingSource(binding, helperName, namespaceHelperName) {
568
+ if (binding.namespace) return `const ${binding.local} = ${namespaceHelperName};`;
569
+ return `const ${binding.local} = ${helperName}(${JSON.stringify(googleFontFamily(binding.imported))});`;
570
+ }
571
+ function googleFontFamily(exportName) {
572
+ return exportName.replace(/_/g, " ");
573
+ }
574
+ function nextLocalFontImportNames(source) {
575
+ const names = /* @__PURE__ */ new Set();
576
+ const pattern = /\bimport\s+([A-Za-z_$][\w$]*)\s+from\s+(['"])([^'"]+)\2/g;
577
+ let match;
578
+ while (match = pattern.exec(source)) {
579
+ if (match[1] && match[3] && isNextLocalFontSpecifier(match[3])) names.add(match[1]);
580
+ }
581
+ return names;
582
+ }
583
+ function isNextLocalFontSpecifier(specifier) {
584
+ if (specifier === "next/font/local" || specifier === "next/font/local.js") return true;
585
+ const normalized = specifier.replace(/^file:\/\//, "").replace(/\\/g, "/");
586
+ return /\/compat\/next\/font\/local\.[jt]s$/.test(normalized);
587
+ }
588
+ function localFontCallerFile(file, root) {
589
+ if (path3.isAbsolute(file)) return file;
590
+ if (file.startsWith(".")) return path3.resolve(root ?? process.cwd(), file);
591
+ if (!root) return file;
592
+ try {
593
+ return createRequire(path3.join(root, "pnext-resolve.cjs")).resolve(file);
594
+ } catch {
595
+ return file;
596
+ }
597
+ }
598
+
599
+ export {
600
+ actionId,
601
+ workspaceRelative,
602
+ moduleLevelUseServer,
603
+ moduleLevelUseCache,
604
+ inlineUseServerFunctions,
605
+ moduleActionExports,
606
+ opensWithUseServerDirective,
607
+ setClientActionModules,
608
+ canonical,
609
+ clearClientActionModules,
610
+ isClientActionModule,
611
+ clientActionModulesRoot,
612
+ clientActionModuleFiles,
613
+ actionStubSourceFor,
614
+ actionClientStubPlugin,
615
+ loadClientActionSource,
616
+ canonicalActionId,
617
+ reactCompatEnabled,
618
+ reactCompilerOptions,
619
+ nextCompatEnabled,
620
+ missingCompatImportError,
621
+ compatAliases,
622
+ reactServerLayerAliases,
623
+ nextCompatAliases,
624
+ ensureCompatSuspense,
625
+ compatSuspenseType,
626
+ rewriteNextFontSource
627
+ };