theokit 0.43.7 → 0.44.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/dist/{actions-virtual-module-LD3YKWIX.js → actions-virtual-module-67K4POQ2.js} +20 -20
  2. package/dist/actions-virtual-module-67K4POQ2.js.map +1 -0
  3. package/dist/{actions-virtual-module-N7GKUS3D.js → actions-virtual-module-IK2SDIZ3.js} +9 -8
  4. package/dist/actions-virtual-module-IK2SDIZ3.js.map +1 -0
  5. package/dist/adapters/web-shim.js +1 -1
  6. package/dist/adapters/web-shim.js.map +1 -1
  7. package/dist/adapters/ws-shim.js +1 -1
  8. package/dist/adapters/ws-shim.js.map +1 -1
  9. package/dist/{add-W6FNTAFS.js → add-3VLFUPF4.js} +1 -1
  10. package/dist/add-3VLFUPF4.js.map +1 -0
  11. package/dist/{agent-U35G3WNE.js → agent-OCCL5RUY.js} +5 -5
  12. package/dist/{agents-typed-client-CHMVW7MK.js → agents-typed-client-TNHCUU7Q.js} +2 -2
  13. package/dist/agents-typed-client-TNHCUU7Q.js.map +1 -0
  14. package/dist/{agents-typed-client-NJ73Z6XY.js → agents-typed-client-X56CQ6FX.js} +1 -1
  15. package/dist/agents-typed-client-X56CQ6FX.js.map +1 -0
  16. package/dist/{app-typed-client-6YZRDAPY.js → app-typed-client-4OH3JREB.js} +51 -12
  17. package/dist/app-typed-client-4OH3JREB.js.map +1 -0
  18. package/dist/{app-typed-client-V77SVU2O.js → app-typed-client-N5WUE2CP.js} +62 -24
  19. package/dist/app-typed-client-N5WUE2CP.js.map +1 -0
  20. package/dist/{aws-lambda-7GSCNLPY.js → aws-lambda-473QCOL6.js} +3 -3
  21. package/dist/{body-parser-web-MUWBKZ3F.js → body-parser-web-4Z2QTPDU.js} +2 -2
  22. package/dist/body-parser-web-4Z2QTPDU.js.map +1 -0
  23. package/dist/{body-parser-web-FV5HWCY3.js → body-parser-web-TIOTXPDW.js} +1 -1
  24. package/dist/body-parser-web-TIOTXPDW.js.map +1 -0
  25. package/dist/boot/index.js +4 -4
  26. package/dist/boot/index.js.map +1 -1
  27. package/dist/{broadcast-4SX7R5XE.js → broadcast-H64DJRBE.js} +3 -3
  28. package/dist/broadcast-H64DJRBE.js.map +1 -0
  29. package/dist/{build-BYLQZJT2.js → build-25RSFP22.js} +20 -11
  30. package/dist/build-25RSFP22.js.map +1 -0
  31. package/dist/{build-request-body-preview-EOP2Y4F3.js → build-request-body-preview-CKWWBF2M.js} +2 -2
  32. package/dist/build-request-body-preview-CKWWBF2M.js.map +1 -0
  33. package/dist/{build-request-body-preview-QMWD2IXK.js → build-request-body-preview-XPZ2GYMG.js} +1 -1
  34. package/dist/build-request-body-preview-XPZ2GYMG.js.map +1 -0
  35. package/dist/{bun-KP2KES6S.js → bun-OQUCL3XW.js} +3 -3
  36. package/dist/{check-PD2FTKMM.js → check-45NKUVSQ.js} +1 -1
  37. package/dist/check-45NKUVSQ.js.map +1 -0
  38. package/dist/{chunk-FRUEDJFX.js → chunk-226KMIGZ.js} +3 -3
  39. package/dist/{chunk-FRUEDJFX.js.map → chunk-226KMIGZ.js.map} +1 -1
  40. package/dist/{chunk-U3NTEK46.js → chunk-2ADKT37V.js} +5 -5
  41. package/dist/chunk-2ADKT37V.js.map +1 -0
  42. package/dist/{chunk-QWBXUZAX.js → chunk-37ZO643S.js} +9 -9
  43. package/dist/chunk-37ZO643S.js.map +1 -0
  44. package/dist/{chunk-ESC54TAK.js → chunk-3DGIANAN.js} +1 -1
  45. package/dist/chunk-3DGIANAN.js.map +1 -0
  46. package/dist/{chunk-GY5Q27BJ.js → chunk-47FFT43U.js} +1 -1
  47. package/dist/chunk-47FFT43U.js.map +1 -0
  48. package/dist/{chunk-JAIKGP3Q.js → chunk-47VNWTL4.js} +1 -1
  49. package/dist/chunk-47VNWTL4.js.map +1 -0
  50. package/dist/{chunk-ZJQ4O76G.js → chunk-4FWBKX6G.js} +1 -1
  51. package/dist/chunk-4FWBKX6G.js.map +1 -0
  52. package/dist/{chunk-NM4WF3XD.js → chunk-4PBJ266F.js} +1 -1
  53. package/dist/chunk-4PBJ266F.js.map +1 -0
  54. package/dist/{chunk-7MQOHNHE.js → chunk-52PDWL5S.js} +1 -1
  55. package/dist/chunk-52PDWL5S.js.map +1 -0
  56. package/dist/{chunk-JQJN6LFK.js → chunk-62EU2BVZ.js} +2 -2
  57. package/dist/chunk-62EU2BVZ.js.map +1 -0
  58. package/dist/{chunk-SJIRP73B.js → chunk-646CA6RV.js} +2 -2
  59. package/dist/chunk-646CA6RV.js.map +1 -0
  60. package/dist/{chunk-ASDXVRJD.js → chunk-6KDXP472.js} +4 -4
  61. package/dist/chunk-6KDXP472.js.map +1 -0
  62. package/dist/chunk-6LNIGF5P.js +46 -0
  63. package/dist/chunk-6LNIGF5P.js.map +1 -0
  64. package/dist/chunk-7IHWXDJJ.js +1 -0
  65. package/dist/chunk-7IHWXDJJ.js.map +1 -0
  66. package/dist/{chunk-JQSKBMXP.js → chunk-7LVM22VG.js} +1 -1
  67. package/dist/chunk-7LVM22VG.js.map +1 -0
  68. package/dist/{chunk-UVXB2ER7.js → chunk-7SABX4DJ.js} +1 -1
  69. package/dist/chunk-7SABX4DJ.js.map +1 -0
  70. package/dist/{chunk-P37RZRFV.js → chunk-A7JBF5FO.js} +1 -1
  71. package/dist/chunk-A7JBF5FO.js.map +1 -0
  72. package/dist/{chunk-X32XEJXR.js → chunk-ACKBVBUI.js} +1 -1
  73. package/dist/chunk-ACKBVBUI.js.map +1 -0
  74. package/dist/{chunk-UUFYP2UM.js → chunk-AM3QABW5.js} +3 -3
  75. package/dist/chunk-AM3QABW5.js.map +1 -0
  76. package/dist/{chunk-FH3DYBAN.js → chunk-ANS4ELRH.js} +1 -1
  77. package/dist/chunk-ANS4ELRH.js.map +1 -0
  78. package/dist/{chunk-UD3LFGDL.js → chunk-AVQU5CQF.js} +1 -1
  79. package/dist/chunk-AVQU5CQF.js.map +1 -0
  80. package/dist/{chunk-AFVTEAES.js → chunk-B7ONQ4QJ.js} +2 -2
  81. package/dist/{chunk-WSJKACWB.js → chunk-C34PMLSN.js} +1 -1
  82. package/dist/chunk-C34PMLSN.js.map +1 -0
  83. package/dist/{chunk-FEDSPOY6.js → chunk-DSOBIXXR.js} +6 -6
  84. package/dist/chunk-DSOBIXXR.js.map +1 -0
  85. package/dist/{chunk-AXVFVMLM.js → chunk-EIRQM55C.js} +12 -7
  86. package/dist/chunk-EIRQM55C.js.map +1 -0
  87. package/dist/{chunk-ZEGYW52B.js → chunk-FB2HBNIC.js} +1 -1
  88. package/dist/chunk-FB2HBNIC.js.map +1 -0
  89. package/dist/chunk-FXZZS7YW.js +605 -0
  90. package/dist/chunk-FXZZS7YW.js.map +1 -0
  91. package/dist/{chunk-5AVPWHUE.js → chunk-FZG3JYB3.js} +14 -50
  92. package/dist/chunk-FZG3JYB3.js.map +1 -0
  93. package/dist/{chunk-V3LJN2GS.js → chunk-GAPBPRPP.js} +1 -1
  94. package/dist/chunk-GAPBPRPP.js.map +1 -0
  95. package/dist/chunk-GUBN5UTT.js +1 -0
  96. package/dist/chunk-GUBN5UTT.js.map +1 -0
  97. package/dist/{chunk-GSO77FSM.js → chunk-HEK4SET7.js} +45 -47
  98. package/dist/chunk-HEK4SET7.js.map +1 -0
  99. package/dist/{chunk-SPJNVWOK.js → chunk-HRCNHWLP.js} +7 -110
  100. package/dist/chunk-HRCNHWLP.js.map +1 -0
  101. package/dist/{chunk-C3ZZ56YZ.js → chunk-JA2ZAT5Q.js} +1 -1
  102. package/dist/chunk-JA2ZAT5Q.js.map +1 -0
  103. package/dist/{chunk-KI7OWQUX.js → chunk-KBGGQK4I.js} +87 -27
  104. package/dist/chunk-KBGGQK4I.js.map +1 -0
  105. package/dist/{chunk-WFNLNIJX.js → chunk-KD5G3YXI.js} +4 -4
  106. package/dist/chunk-KD5G3YXI.js.map +1 -0
  107. package/dist/{chunk-VMEWD57H.js → chunk-KPKLIUUL.js} +1 -1
  108. package/dist/chunk-KPKLIUUL.js.map +1 -0
  109. package/dist/{chunk-IHJZPQEF.js → chunk-L4Y6RJ4E.js} +4 -4
  110. package/dist/chunk-L4Y6RJ4E.js.map +1 -0
  111. package/dist/{chunk-GUUWDMR2.js → chunk-L5Z6IY5U.js} +5 -5
  112. package/dist/chunk-L5Z6IY5U.js.map +1 -0
  113. package/dist/{chunk-L4GCEMNW.js → chunk-LNVMHQ2Z.js} +2 -2
  114. package/dist/{chunk-JBCHWRKF.js → chunk-MTEWLGVY.js} +2 -2
  115. package/dist/chunk-MTEWLGVY.js.map +1 -0
  116. package/dist/{chunk-5PU65T5W.js → chunk-MWP4YXWJ.js} +1 -1
  117. package/dist/chunk-MWP4YXWJ.js.map +1 -0
  118. package/dist/{chunk-IPC5UREF.js → chunk-NGEBYCOZ.js} +70 -46
  119. package/dist/chunk-NGEBYCOZ.js.map +1 -0
  120. package/dist/{chunk-5QW7IQQU.js → chunk-NTDN54XO.js} +1 -1
  121. package/dist/chunk-NTDN54XO.js.map +1 -0
  122. package/dist/{chunk-7BIM27LV.js → chunk-OIGJOYX6.js} +1 -1
  123. package/dist/chunk-OIGJOYX6.js.map +1 -0
  124. package/dist/{chunk-TSLSIRBR.js → chunk-OLGPYOLO.js} +2 -2
  125. package/dist/chunk-OLGPYOLO.js.map +1 -0
  126. package/dist/{chunk-NQRNDPZJ.js → chunk-OXCALO3W.js} +3 -3
  127. package/dist/{chunk-UNLG36Z5.js → chunk-Q5OT7LZG.js} +19 -499
  128. package/dist/chunk-Q5OT7LZG.js.map +1 -0
  129. package/dist/{chunk-45C3WUQ7.js → chunk-QPVXGC7O.js} +1 -1
  130. package/dist/chunk-QPVXGC7O.js.map +1 -0
  131. package/dist/{chunk-6NEXVBPY.js → chunk-RWNSW4FM.js} +1 -1
  132. package/dist/chunk-RWNSW4FM.js.map +1 -0
  133. package/dist/{chunk-E25FBYJP.js → chunk-SAFGDIPQ.js} +1 -1
  134. package/dist/chunk-SAFGDIPQ.js.map +1 -0
  135. package/dist/{chunk-RMU7EBRO.js → chunk-SEELKQUM.js} +2 -2
  136. package/dist/chunk-SEELKQUM.js.map +1 -0
  137. package/dist/{chunk-FOZIR3TG.js → chunk-SMP2T335.js} +2 -2
  138. package/dist/{chunk-D7ZH7DTG.js → chunk-SSYDEKWF.js} +1 -1
  139. package/dist/chunk-SSYDEKWF.js.map +1 -0
  140. package/dist/{chunk-2ZX4J4SX.js → chunk-SZU6BOMV.js} +114 -90
  141. package/dist/chunk-SZU6BOMV.js.map +1 -0
  142. package/dist/{chunk-M6NMS5LR.js → chunk-TDNNBLGW.js} +1 -1
  143. package/dist/chunk-TDNNBLGW.js.map +1 -0
  144. package/dist/{chunk-X2VVCJ4V.js → chunk-U267AOWS.js} +1 -1
  145. package/dist/chunk-U267AOWS.js.map +1 -0
  146. package/dist/{chunk-GW5H4KB4.js → chunk-U3H53IIN.js} +6 -6
  147. package/dist/chunk-U3H53IIN.js.map +1 -0
  148. package/dist/{chunk-OPLICDUB.js → chunk-UW2TEAGR.js} +1 -1
  149. package/dist/chunk-UW2TEAGR.js.map +1 -0
  150. package/dist/{chunk-IAJ2JVEH.js → chunk-VSLTKX5L.js} +1 -1
  151. package/dist/chunk-VSLTKX5L.js.map +1 -0
  152. package/dist/{chunk-YB5DJJ4U.js → chunk-VZTYCAO6.js} +1 -1
  153. package/dist/chunk-VZTYCAO6.js.map +1 -0
  154. package/dist/chunk-WDGYCBNI.js +65 -0
  155. package/dist/chunk-WDGYCBNI.js.map +1 -0
  156. package/dist/chunk-WPJOTQA5.js +1 -0
  157. package/dist/chunk-WPJOTQA5.js.map +1 -0
  158. package/dist/{chunk-DGUM43GV.js → chunk-XTHN6JBX.js} +1 -1
  159. package/dist/chunk-XTHN6JBX.js.map +1 -0
  160. package/dist/{chunk-HZ6USUHC.js → chunk-YOIVCCZT.js} +1 -1
  161. package/dist/chunk-YOIVCCZT.js.map +1 -0
  162. package/dist/{chunk-UO7WS32S.js → chunk-ZC2UESE4.js} +7 -5
  163. package/dist/chunk-ZC2UESE4.js.map +1 -0
  164. package/dist/cli/index.js +15 -15
  165. package/dist/client/core.d.ts +4 -258
  166. package/dist/client/core.js +13 -9
  167. package/dist/client/core.js.map +1 -1
  168. package/dist/client/index.d.ts +8 -97
  169. package/dist/client/index.js +39 -92
  170. package/dist/client/index.js.map +1 -1
  171. package/dist/{cloudflare-C6E5SPAE.js → cloudflare-4YT5CK3P.js} +3 -3
  172. package/dist/{controller-swc-transform-XV3ETSE3.js → controller-swc-transform-LUJ4VAZJ.js} +1 -1
  173. package/dist/controller-swc-transform-LUJ4VAZJ.js.map +1 -0
  174. package/dist/{controller-swc-transform-URELVCBM.js → controller-swc-transform-T7ZTD55V.js} +2 -2
  175. package/dist/controller-swc-transform-T7ZTD55V.js.map +1 -0
  176. package/dist/{cookies-MJKMGJ7N.js → cookies-SOXUQJXG.js} +3 -3
  177. package/dist/cookies-SOXUQJXG.js.map +1 -0
  178. package/dist/{db-3UNAMSFK.js → db-IVVCQE5Z.js} +1 -2
  179. package/dist/db-IVVCQE5Z.js.map +1 -0
  180. package/dist/{deno-deploy-RFZN56X4.js → deno-deploy-YYN6BNLF.js} +3 -3
  181. package/dist/{dev-PS2NGT6I.js → dev-V6UBM2OL.js} +14 -13
  182. package/dist/{dev-PS2NGT6I.js.map → dev-V6UBM2OL.js.map} +1 -1
  183. package/dist/{dev-emit-2DL3MCLM.js → dev-emit-F54Y5TIU.js} +5 -5
  184. package/dist/dev-emit-F54Y5TIU.js.map +1 -0
  185. package/dist/{dev-emit-XVTJXZGA.js → dev-emit-J7V6GWSK.js} +6 -6
  186. package/dist/devtools/entry.js +61 -25
  187. package/dist/devtools/entry.js.map +1 -1
  188. package/dist/{dispatcher-EJHL6JMJ.js → dispatcher-KMZBGMM5.js} +1 -1
  189. package/dist/dispatcher-KMZBGMM5.js.map +1 -0
  190. package/dist/dispatcher-MXKF3CRH.js +8 -0
  191. package/dist/dispatcher-MXKF3CRH.js.map +1 -0
  192. package/dist/{generate-5X4LG77M.js → generate-GXWPUVS7.js} +4 -5
  193. package/dist/generate-GXWPUVS7.js.map +1 -0
  194. package/dist/index.js +25 -25
  195. package/dist/index.js.map +1 -1
  196. package/dist/{info-2OOXFTJX.js → info-ICDTPJDC.js} +4 -4
  197. package/dist/info-ICDTPJDC.js.map +1 -0
  198. package/dist/{internal-api-FBFV265J.js → internal-api-ALXVBL56.js} +14 -14
  199. package/dist/{internal-api-LFW7R65K.js → internal-api-S7WK2WCY.js} +20 -22
  200. package/dist/internal-api-S7WK2WCY.js.map +1 -0
  201. package/dist/{load-config-3EAQTXPH.js → load-config-ICCNMO74.js} +4 -4
  202. package/dist/{mcp-ML4QK5ON.js → mcp-4JFODA5U.js} +6 -6
  203. package/dist/mcp-4JFODA5U.js.map +1 -0
  204. package/dist/{netlify-PMLHVPN4.js → netlify-2WZUQYI3.js} +3 -3
  205. package/dist/node-CMAYKDCM.js +10 -0
  206. package/dist/{openapi-2HVGJMSN.js → openapi-NIYA2VBG.js} +9 -9
  207. package/dist/openapi-NIYA2VBG.js.map +1 -0
  208. package/dist/react-query/index.js +2 -2
  209. package/dist/react-query/index.js.map +1 -1
  210. package/dist/registry-72YH7ZJM.js +23 -0
  211. package/dist/registry-72YH7ZJM.js.map +1 -0
  212. package/dist/{router-TLEAOFID.js → router-6MAACS25.js} +1 -2
  213. package/dist/router-6MAACS25.js.map +1 -0
  214. package/dist/{routes-XNS3UM3B.js → routes-2RD4S5PZ.js} +6 -6
  215. package/dist/schema-S553QCAU.js +22 -0
  216. package/dist/server/agent/index.d.ts +3 -72
  217. package/dist/server/agent/index.js +4 -4
  218. package/dist/server/agent/index.js.map +1 -1
  219. package/dist/server/auth/index.js +4 -4
  220. package/dist/server/auth/index.js.map +1 -1
  221. package/dist/server/cost/index.js +2 -2
  222. package/dist/server/cost/index.js.map +1 -1
  223. package/dist/server/cron/index.js +6 -6
  224. package/dist/server/cron/index.js.map +1 -1
  225. package/dist/server/define/index.js +4 -4
  226. package/dist/server/define/index.js.map +1 -1
  227. package/dist/server/http/index.js +11 -11
  228. package/dist/server/http/index.js.map +1 -1
  229. package/dist/server/index.d.ts +2 -2
  230. package/dist/server/index.js +41 -41
  231. package/dist/server/index.js.map +1 -1
  232. package/dist/server/jobs/index.js +7 -7
  233. package/dist/server/jobs/index.js.map +1 -1
  234. package/dist/server/observability/index.d.ts +9 -39
  235. package/dist/server/observability/index.js +5 -5
  236. package/dist/server/observability/index.js.map +1 -1
  237. package/dist/server/plugins/index.js +3 -3
  238. package/dist/server/plugins/index.js.map +1 -1
  239. package/dist/server/rate-limit/index.js +4 -4
  240. package/dist/server/rate-limit/index.js.map +1 -1
  241. package/dist/server/realtime/index.js +2 -2
  242. package/dist/server/realtime/index.js.map +1 -1
  243. package/dist/server/scan/index.js +7 -7
  244. package/dist/server/scan/index.js.map +1 -1
  245. package/dist/server/security/index.js +5 -5
  246. package/dist/server/security/index.js.map +1 -1
  247. package/dist/server/storage/index.js +2 -2
  248. package/dist/server/storage/index.js.map +1 -1
  249. package/dist/server/webhook/index.js +3 -3
  250. package/dist/server/webhook/index.js.map +1 -1
  251. package/dist/server-error-to-envelope-UM7DEVM4.js +8 -0
  252. package/dist/server-error-to-envelope-UM7DEVM4.js.map +1 -0
  253. package/dist/{server-routes-hmr-VZXOP5YT.js → server-routes-hmr-4W5L2MKN.js} +1 -1
  254. package/dist/server-routes-hmr-4W5L2MKN.js.map +1 -0
  255. package/dist/{server-routes-hmr-PBHSKCQJ.js → server-routes-hmr-6CRNSEWF.js} +2 -2
  256. package/dist/server-routes-hmr-6CRNSEWF.js.map +1 -0
  257. package/dist/{services-json-Y3XODNB5.js → services-json-7ZXJ4CIS.js} +1 -1
  258. package/dist/services-json-7ZXJ4CIS.js.map +1 -0
  259. package/dist/{services-typed-client-32KMTTXR.js → services-typed-client-EO4RFNTZ.js} +2 -2
  260. package/dist/services-typed-client-EO4RFNTZ.js.map +1 -0
  261. package/dist/{services-typed-client-IETY2SAK.js → services-typed-client-IXNOPVZA.js} +3 -3
  262. package/dist/services-typed-client-IXNOPVZA.js.map +1 -0
  263. package/dist/{start-YLR2SFHU.js → start-2LNPPG74.js} +40 -16
  264. package/dist/start-2LNPPG74.js.map +1 -0
  265. package/dist/{static-MB2CD5Y3.js → static-25H5K42R.js} +3 -3
  266. package/dist/{static-MB2CD5Y3.js.map → static-25H5K42R.js.map} +1 -1
  267. package/dist/{theo-cloud-DQRP6S6M.js → theo-cloud-JL2KXHIS.js} +2 -2
  268. package/dist/{upgrade-readiness-ACGW44JC.js → upgrade-readiness-77P6VNB4.js} +1 -1
  269. package/dist/upgrade-readiness-77P6VNB4.js.map +1 -0
  270. package/dist/{vercel-J6G7ZHYQ.js → vercel-FP3C6LN6.js} +3 -3
  271. package/dist/vite-plugin/index.js +25 -25
  272. package/dist/vite-plugin/index.js.map +1 -1
  273. package/dist/{vite-plugin-6VVU6PPC.js → vite-plugin-X6YO3OUH.js} +14 -13
  274. package/package.json +9 -8
  275. package/dist/actions-virtual-module-LD3YKWIX.js.map +0 -1
  276. package/dist/actions-virtual-module-N7GKUS3D.js.map +0 -1
  277. package/dist/add-W6FNTAFS.js.map +0 -1
  278. package/dist/agents-typed-client-CHMVW7MK.js.map +0 -1
  279. package/dist/agents-typed-client-NJ73Z6XY.js.map +0 -1
  280. package/dist/app-typed-client-6YZRDAPY.js.map +0 -1
  281. package/dist/app-typed-client-V77SVU2O.js.map +0 -1
  282. package/dist/body-parser-web-FV5HWCY3.js.map +0 -1
  283. package/dist/body-parser-web-MUWBKZ3F.js.map +0 -1
  284. package/dist/build-BYLQZJT2.js.map +0 -1
  285. package/dist/build-request-body-preview-EOP2Y4F3.js.map +0 -1
  286. package/dist/build-request-body-preview-QMWD2IXK.js.map +0 -1
  287. package/dist/check-PD2FTKMM.js.map +0 -1
  288. package/dist/chunk-2ZX4J4SX.js.map +0 -1
  289. package/dist/chunk-45C3WUQ7.js.map +0 -1
  290. package/dist/chunk-5AVPWHUE.js.map +0 -1
  291. package/dist/chunk-5PU65T5W.js.map +0 -1
  292. package/dist/chunk-5QW7IQQU.js.map +0 -1
  293. package/dist/chunk-6NEXVBPY.js.map +0 -1
  294. package/dist/chunk-7BIM27LV.js.map +0 -1
  295. package/dist/chunk-7MQOHNHE.js.map +0 -1
  296. package/dist/chunk-ASDXVRJD.js.map +0 -1
  297. package/dist/chunk-AXVFVMLM.js.map +0 -1
  298. package/dist/chunk-C3ZZ56YZ.js.map +0 -1
  299. package/dist/chunk-D7ZH7DTG.js.map +0 -1
  300. package/dist/chunk-E25FBYJP.js.map +0 -1
  301. package/dist/chunk-E3JH6YUM.js +0 -1
  302. package/dist/chunk-ESC54TAK.js.map +0 -1
  303. package/dist/chunk-FEDSPOY6.js.map +0 -1
  304. package/dist/chunk-FH3DYBAN.js.map +0 -1
  305. package/dist/chunk-GSO77FSM.js.map +0 -1
  306. package/dist/chunk-GUUWDMR2.js.map +0 -1
  307. package/dist/chunk-GW5H4KB4.js.map +0 -1
  308. package/dist/chunk-GY5Q27BJ.js.map +0 -1
  309. package/dist/chunk-HZ6USUHC.js.map +0 -1
  310. package/dist/chunk-IAJ2JVEH.js.map +0 -1
  311. package/dist/chunk-IHJZPQEF.js.map +0 -1
  312. package/dist/chunk-IPC5UREF.js.map +0 -1
  313. package/dist/chunk-JAIKGP3Q.js.map +0 -1
  314. package/dist/chunk-JBCHWRKF.js.map +0 -1
  315. package/dist/chunk-JHEAWR3L.js +0 -1
  316. package/dist/chunk-JQJN6LFK.js.map +0 -1
  317. package/dist/chunk-JQSKBMXP.js.map +0 -1
  318. package/dist/chunk-KI7OWQUX.js.map +0 -1
  319. package/dist/chunk-KPRJS3II.js +0 -505
  320. package/dist/chunk-KPRJS3II.js.map +0 -1
  321. package/dist/chunk-M6NMS5LR.js.map +0 -1
  322. package/dist/chunk-NM4WF3XD.js.map +0 -1
  323. package/dist/chunk-NPMCKOX4.js +0 -1
  324. package/dist/chunk-OPLICDUB.js.map +0 -1
  325. package/dist/chunk-P37RZRFV.js.map +0 -1
  326. package/dist/chunk-QWBXUZAX.js.map +0 -1
  327. package/dist/chunk-RMU7EBRO.js.map +0 -1
  328. package/dist/chunk-SJIRP73B.js.map +0 -1
  329. package/dist/chunk-SPJNVWOK.js.map +0 -1
  330. package/dist/chunk-TSLSIRBR.js.map +0 -1
  331. package/dist/chunk-U3NTEK46.js.map +0 -1
  332. package/dist/chunk-UD3LFGDL.js.map +0 -1
  333. package/dist/chunk-UNLG36Z5.js.map +0 -1
  334. package/dist/chunk-UO7WS32S.js.map +0 -1
  335. package/dist/chunk-UUFYP2UM.js.map +0 -1
  336. package/dist/chunk-UVXB2ER7.js.map +0 -1
  337. package/dist/chunk-V3LJN2GS.js.map +0 -1
  338. package/dist/chunk-VMEWD57H.js.map +0 -1
  339. package/dist/chunk-WFNLNIJX.js.map +0 -1
  340. package/dist/chunk-WSJKACWB.js.map +0 -1
  341. package/dist/chunk-X2VVCJ4V.js.map +0 -1
  342. package/dist/chunk-X32XEJXR.js.map +0 -1
  343. package/dist/chunk-YB5DJJ4U.js.map +0 -1
  344. package/dist/chunk-ZEGYW52B.js.map +0 -1
  345. package/dist/chunk-ZJQ4O76G.js.map +0 -1
  346. package/dist/controller-swc-transform-URELVCBM.js.map +0 -1
  347. package/dist/controller-swc-transform-XV3ETSE3.js.map +0 -1
  348. package/dist/cookies-MJKMGJ7N.js.map +0 -1
  349. package/dist/db-3UNAMSFK.js.map +0 -1
  350. package/dist/dev-emit-2DL3MCLM.js.map +0 -1
  351. package/dist/dispatcher-63LBXYLE.js +0 -8
  352. package/dist/dispatcher-63LBXYLE.js.map +0 -1
  353. package/dist/dispatcher-EJHL6JMJ.js.map +0 -1
  354. package/dist/generate-5X4LG77M.js.map +0 -1
  355. package/dist/info-2OOXFTJX.js.map +0 -1
  356. package/dist/internal-api-FBFV265J.js.map +0 -1
  357. package/dist/internal-api-LFW7R65K.js.map +0 -1
  358. package/dist/load-config-3EAQTXPH.js.map +0 -1
  359. package/dist/mcp-ML4QK5ON.js.map +0 -1
  360. package/dist/node-BPJ3Z4DT.js +0 -10
  361. package/dist/node-BPJ3Z4DT.js.map +0 -1
  362. package/dist/openapi-2HVGJMSN.js.map +0 -1
  363. package/dist/registry-FKPH7XEL.js +0 -24
  364. package/dist/registry-FKPH7XEL.js.map +0 -1
  365. package/dist/router-TLEAOFID.js.map +0 -1
  366. package/dist/schema-LYOLNHZ7.js +0 -30
  367. package/dist/schema-LYOLNHZ7.js.map +0 -1
  368. package/dist/server-error-to-envelope-EOFUIUNB.js +0 -8
  369. package/dist/server-error-to-envelope-EOFUIUNB.js.map +0 -1
  370. package/dist/server-routes-hmr-PBHSKCQJ.js.map +0 -1
  371. package/dist/server-routes-hmr-VZXOP5YT.js.map +0 -1
  372. package/dist/services-json-Y3XODNB5.js.map +0 -1
  373. package/dist/services-typed-client-32KMTTXR.js.map +0 -1
  374. package/dist/services-typed-client-IETY2SAK.js.map +0 -1
  375. package/dist/start-YLR2SFHU.js.map +0 -1
  376. package/dist/upgrade-readiness-ACGW44JC.js.map +0 -1
  377. package/dist/vite-plugin-6VVU6PPC.js.map +0 -1
  378. /package/dist/{agent-U35G3WNE.js.map → agent-OCCL5RUY.js.map} +0 -0
  379. /package/dist/{aws-lambda-7GSCNLPY.js.map → aws-lambda-473QCOL6.js.map} +0 -0
  380. /package/dist/{bun-KP2KES6S.js.map → bun-OQUCL3XW.js.map} +0 -0
  381. /package/dist/{chunk-AFVTEAES.js.map → chunk-B7ONQ4QJ.js.map} +0 -0
  382. /package/dist/{chunk-L4GCEMNW.js.map → chunk-LNVMHQ2Z.js.map} +0 -0
  383. /package/dist/{chunk-NQRNDPZJ.js.map → chunk-OXCALO3W.js.map} +0 -0
  384. /package/dist/{chunk-FOZIR3TG.js.map → chunk-SMP2T335.js.map} +0 -0
  385. /package/dist/{cloudflare-C6E5SPAE.js.map → cloudflare-4YT5CK3P.js.map} +0 -0
  386. /package/dist/{deno-deploy-RFZN56X4.js.map → deno-deploy-YYN6BNLF.js.map} +0 -0
  387. /package/dist/{dev-emit-XVTJXZGA.js.map → dev-emit-J7V6GWSK.js.map} +0 -0
  388. /package/dist/{broadcast-4SX7R5XE.js.map → internal-api-ALXVBL56.js.map} +0 -0
  389. /package/dist/{chunk-DGUM43GV.js.map → load-config-ICCNMO74.js.map} +0 -0
  390. /package/dist/{netlify-PMLHVPN4.js.map → netlify-2WZUQYI3.js.map} +0 -0
  391. /package/dist/{chunk-E3JH6YUM.js.map → node-CMAYKDCM.js.map} +0 -0
  392. /package/dist/{routes-XNS3UM3B.js.map → routes-2RD4S5PZ.js.map} +0 -0
  393. /package/dist/{chunk-JHEAWR3L.js.map → schema-S553QCAU.js.map} +0 -0
  394. /package/dist/{theo-cloud-DQRP6S6M.js.map → theo-cloud-JL2KXHIS.js.map} +0 -0
  395. /package/dist/{vercel-J6G7ZHYQ.js.map → vercel-FP3C6LN6.js.map} +0 -0
  396. /package/dist/{chunk-NPMCKOX4.js.map → vite-plugin-X6YO3OUH.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/cli/commands/migrate/router.ts","../src/cli/commands/migrate/router-codemod.ts"],"sourcesContent":["/**\n * G6 T2.1 — `theokit migrate router` CLI subcommand.\n *\n * Plan: .claude/knowledge-base/plans/g6-router-convention-plan.md v1.1\n *\n * Wraps the pure `planRouterMigration` with side effects:\n * - EC-2: pre-flight `isPortInUse(3000|3100)` warning to prevent the\n * dev-server HMR cascade described in the edge-case review.\n * - EC-7: partial failure produces a typed `RouterMigrationPartialFailure`\n * with `filesAlreadyMigrated` so a re-run can continue from where it\n * stopped (idempotent by virtue of `planRouterMigration`).\n * - Prefers `git mv $from $to` so the rename appears as a single\n * history entry; falls back to `mkdir -p $(dirname $to) && fs.rename`\n * when not in a git repo or git mv fails.\n */\nimport { execFileSync } from 'node:child_process'\nimport { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs'\nimport { createServer } from 'node:net'\nimport { dirname, resolve } from 'node:path'\n\nimport {\n computeDepthDelta,\n planRouterMigration,\n rewriteRelativeImports,\n type RouterMigrationPlanItem,\n} from './router-codemod.js'\n\ninterface RouterMigrateOptions {\n /** Absolute path to `<project>/server/routes`. Defaults to `<cwd>/server/routes`. */\n routesDir?: string\n /**\n * Skip the EC-2 dev-server port pre-flight check (CI / non-TTY).\n * Default: false.\n */\n force?: boolean\n /** When true, prints the plan but performs no renames (dry-run). */\n dryRun?: boolean\n /** When true, suppresses stdout (used in tests). */\n silent?: boolean\n}\n\n/**\n * Thrown when the codemod completes with at least one successful rename\n * AND at least one failure — caller can re-run safely (idempotent) and\n * the second pass will skip already-migrated files.\n */\nclass RouterMigrationPartialFailure extends Error {\n override readonly name = 'RouterMigrationPartialFailure'\n readonly filesAlreadyMigrated: string[]\n readonly failedFile: string\n readonly causeMessage: string\n constructor(filesAlreadyMigrated: string[], failedFile: string, causeMessage: string) {\n super(\n `Router migration partial failure: ${filesAlreadyMigrated.length} files migrated successfully, then failed on ${failedFile}: ${causeMessage}. Re-run \\`theokit migrate router\\` to retry — already-migrated files will be skipped.`,\n )\n this.filesAlreadyMigrated = filesAlreadyMigrated\n this.failedFile = failedFile\n this.causeMessage = causeMessage\n }\n}\n\n/**\n * EC-2: dev-server detection. Returns true if the port is in use (someone\n * is already listening on localhost:<port>). Uses Node's `node:net` —\n * zero new deps.\n */\nexport async function isPortInUse(port: number): Promise<boolean> {\n return await new Promise<boolean>((resolve) => {\n const probe = createServer()\n probe.once('error', (err: NodeJS.ErrnoException) => {\n probe.close(() => {\n resolve(err.code === 'EADDRINUSE')\n })\n })\n probe.once('listening', () => {\n probe.close(() => {\n resolve(false)\n })\n })\n probe.listen(port, '127.0.0.1')\n })\n}\n\n/**\n * EC-2 pre-flight: returns the first port in use among the typical\n * theokit dev ports (3000 + 3100) so the caller can warn the user.\n */\nexport async function findRunningDevServerPort(): Promise<number | null> {\n for (const port of [3000, 3100]) {\n if (await isPortInUse(port)) return port\n }\n return null\n}\n\nfunction tryGitMv(from: string, to: string): boolean {\n try {\n mkdirSync(dirname(to), { recursive: true })\n // Arguments are absolute paths from a recursive walk of <routesDir>.\n // Pass as argv to avoid shell parsing entirely (no `shell: true`).\n // `git` is resolved via the operator's PATH (same security model as\n // every other CLI tool — `theokit dev`, `pnpm install`, etc.).\n\n execFileSync('git', ['mv', from, to], { stdio: 'pipe' })\n return true\n } catch {\n return false\n }\n}\n\nfunction fallbackRename(from: string, to: string): void {\n mkdirSync(dirname(to), { recursive: true })\n renameSync(from, to)\n}\n\nfunction applyRename(item: RouterMigrationPlanItem): void {\n if (!existsSync(item.from)) {\n // Idempotency: already migrated — skip silently\n return\n }\n if (existsSync(item.to)) {\n // The plan() phase would have thrown CollisionError if we knew about\n // it at plan time. This branch covers a race condition where the\n // target was created between plan and apply.\n throw new Error(\n `Refusing to overwrite existing file at ${item.to} during migration of ${item.from}`,\n )\n }\n if (!tryGitMv(item.from, item.to)) {\n fallbackRename(item.from, item.to)\n }\n}\n\n/**\n * Adjust relative imports inside the renamed file to compensate for the\n * extra nesting depth. Without this, `import { foo } from './chat'` inside\n * a file moved from `routes/admin.sdk-config.ts` → `routes/admin/sdk-config.ts`\n * would fail to resolve at typecheck/runtime — the import needs `../chat`\n * now that the file lives one level deeper.\n */\nfunction applyImportRewrite(item: RouterMigrationPlanItem, routesDir: string): void {\n const delta = computeDepthDelta(item.from, item.to, routesDir)\n if (delta <= 0) return\n const source = readFileSync(item.to, 'utf8')\n const rewritten = rewriteRelativeImports(source, delta)\n if (rewritten !== source) {\n writeFileSync(item.to, rewritten, 'utf8')\n }\n}\n\ninterface RouterMigrateResult {\n /** Successfully renamed (from, to) pairs. */\n migrated: RouterMigrationPlanItem[]\n /** Plan was empty — nothing to do (already-nested). */\n alreadyClean: boolean\n}\n\ntype LogFn = (msg: string) => void\n\nfunction makeLog(silent: boolean | undefined): LogFn {\n if (silent) {\n return (_msg: string) => {\n // intentionally silent\n }\n }\n return (msg: string) => {\n console.log(msg)\n }\n}\n\nasync function assertNoRunningDevServer(opts: RouterMigrateOptions): Promise<void> {\n if (opts.force) return\n const runningPort = await findRunningDevServerPort()\n if (runningPort !== null) {\n throw new Error(\n `Detected theokit dev server running on port ${runningPort}. STOP it before running migration to avoid HMR cascade (see EC-2). Re-run with --force to override.`,\n )\n }\n}\n\nfunction executeRenames(\n plan: readonly RouterMigrationPlanItem[],\n routesDir: string,\n log: LogFn,\n): RouterMigrationPlanItem[] {\n const migrated: RouterMigrationPlanItem[] = []\n for (const item of plan) {\n try {\n applyRename(item)\n applyImportRewrite(item, routesDir)\n migrated.push(item)\n log(` ✓ ${item.from} → ${item.to}`)\n } catch (err) {\n // EC-7: partial failure observability — emit structured error with\n // the list of already-migrated files so a re-run can recover.\n const causeMessage = err instanceof Error ? err.message : String(err)\n throw new RouterMigrationPartialFailure(\n migrated.map((m) => m.from),\n item.from,\n causeMessage,\n )\n }\n }\n return migrated\n}\n\nexport async function routerMigrateCommand(\n opts: RouterMigrateOptions = {},\n): Promise<RouterMigrateResult> {\n const routesDir = opts.routesDir ?? resolve(process.cwd(), 'server', 'routes')\n const log = makeLog(opts.silent)\n\n await assertNoRunningDevServer(opts)\n\n const plan = planRouterMigration(routesDir)\n if (plan.length === 0) {\n log(' ✓ Router already uses directory-nested convention. Nothing to do.')\n return { migrated: [], alreadyClean: true }\n }\n\n log(` → Migrating ${plan.length} dotted route(s) to directory-nested form...`)\n\n if (opts.dryRun) {\n for (const item of plan) {\n log(` [dry-run] ${item.from} → ${item.to}`)\n }\n return { migrated: [], alreadyClean: false }\n }\n\n const migrated = executeRenames(plan, routesDir, log)\n log(` ✓ Migrated ${migrated.length} route(s).`)\n return { migrated, alreadyClean: false }\n}\n","/**\n * G6 T2.1 — Pure codemod core for `theokit migrate router`.\n *\n * Plan: .claude/knowledge-base/plans/g6-router-convention-plan.md v1.1\n *\n * `planRouterMigration` walks `<routesDir>` recursively and returns the\n * set of (from, to) renames required to convert legacy dotted-basename\n * routes (`auth.[provider].login.ts`) into the directory-nested form\n * (`auth/[provider]/login.ts`). The function is PURE — it does NOT\n * touch the filesystem beyond `readdirSync`/`statSync`. The CLI subcommand\n * (`router.ts`) is responsible for executing the renames via `git mv`\n * or `fs.rename` with the appropriate error handling.\n *\n * Edge cases covered:\n * - EC-4: co-located `*.test.[jt]sx?` / `*.spec.[jt]sx?` files are\n * silently skipped (same filter as the scanner).\n * - EC-5: target collision detection is CASE-INSENSITIVE so a\n * macOS/Windows dev doesn't silently overwrite a sibling file that\n * differs only in case.\n * - Idempotent: invoked twice on the same tree, the second pass is empty.\n */\nimport { readdirSync, statSync } from 'node:fs'\nimport { extname, join, relative, sep } from 'node:path'\n\nconst ROUTE_EXTENSIONS = new Set(['.ts', '.tsx', '.js', '.jsx'])\nconst TEST_OR_SPEC_RE = /\\.(test|spec)\\.[jt]sx?$/\n\n/**\n * One pending rename emitted by `planRouterMigration`.\n */\nexport interface RouterMigrationPlanItem {\n /** Absolute path of the offending dotted-basename file. */\n from: string\n /** Absolute path of the proposed directory-nested replacement. */\n to: string\n}\n\n/**\n * `RouterMigrationCollisionError` is thrown when migrating a dotted file\n * would overwrite an existing file (case-insensitive). The caller MUST\n * resolve the conflict manually before re-running the codemod.\n */\nexport class RouterMigrationCollisionError extends Error {\n override readonly name = 'RouterMigrationCollisionError'\n readonly from: string\n readonly to: string\n constructor(from: string, to: string) {\n super(\n `Router migration collision: ${from} would rename to ${to}, but that file already exists (case-insensitive match). Resolve manually.`,\n )\n this.from = from\n this.to = to\n }\n}\n\n/**\n * Compute the depth delta (number of extra `..` levels needed) between\n * the original (dotted) path and the migrated (nested) path, relative\n * to a common `routesDir` ancestor.\n *\n * - `admin.sdk-config.ts` (depth 0) → `admin/sdk-config.ts` (depth 1): delta = 1\n * - `debug.stability.last.ts` (depth 0) → `debug/stability/last.ts` (depth 2): delta = 2\n * - `canvas/artifacts.[id].ts` (depth 1) → `canvas/artifacts/[id].ts` (depth 2): delta = 1\n */\nexport function computeDepthDelta(from: string, to: string, routesDir: string): number {\n const depthOf = (p: string): number => {\n const rel = relative(routesDir, p).replace(/\\\\/g, '/')\n // depth = number of `/` separators in the relative path\n return rel.split('/').length - 1\n }\n return depthOf(to) - depthOf(from)\n}\n\n/**\n * Rewrite all relative imports in `source` by prepending `../` × `delta`\n * to every `./X` or `../X` specifier. Absolute / package specifiers\n * (`theokit/server`, `zod`, `node:fs`) are untouched.\n *\n * Handles three import shapes:\n * - `import ... from './foo'`\n * - `import('./foo')` (dynamic)\n * - `import './foo'` (side-effect only)\n * - `export ... from './foo'` (re-exports)\n *\n * Pure: returns the new source; does NOT touch disk.\n */\nexport function rewriteRelativeImports(source: string, delta: number): string {\n if (delta <= 0) return source\n\n const prefix = '../'.repeat(delta)\n\n // Rewrites a captured relative specifier: `./foo` → `<prefix>foo`,\n // `../foo` → `<prefix>../foo`. Single source of truth for the algorithm\n // shared by all three import-shape regexes below.\n const transformSpecifier = (specifier: string): string => {\n if (specifier.startsWith('./')) return `${prefix}${specifier.slice(2)}`\n return `${prefix}${specifier}`\n }\n\n // Three narrow regexes keep us out of catastrophic-backtracking territory.\n // Each is anchored on a keyword (`from`, `import`) and uses a possessive\n // character class (`[^'\"]+`) for the specifier, so backtracking is bounded.\n const fromRe = /\\bfrom\\s+(['\"])(\\.{1,2}\\/[^'\"]+)\\1/g\n const dynRe = /\\bimport\\s*\\(\\s*(['\"])(\\.{1,2}\\/[^'\"]+)\\1\\s*\\)/g\n const sideRe = /\\bimport\\s+(['\"])(\\.{1,2}\\/[^'\"]+)\\1/g\n\n const fromSub = (_m: string, q: string, spec: string): string =>\n `from ${q}${transformSpecifier(spec)}${q}`\n const dynSub = (_m: string, q: string, spec: string): string =>\n `import(${q}${transformSpecifier(spec)}${q})`\n const sideSub = (_m: string, q: string, spec: string): string =>\n `import ${q}${transformSpecifier(spec)}${q}`\n\n // `from` covers both `import ... from '...'` and `export ... from '...'`\n // (the `\\bfrom\\s+` anchor matches the keyword position in both shapes).\n // `dynRe` handles `import('...')`. `sideRe` handles bare `import '...'`.\n // No overlap — `sideRe` requires `import` followed by whitespace then\n // a quote (vs. `import(` for dynRe and `import ... from` for fromRe).\n return source.replace(fromRe, fromSub).replace(dynRe, dynSub).replace(sideRe, sideSub)\n}\n\nfunction isTestOrSpecFile(filePath: string): boolean {\n return TEST_OR_SPEC_RE.test(filePath)\n}\n\nfunction hasDotOutsideBrackets(segment: string): boolean {\n let depth = 0\n for (const ch of segment) {\n if (ch === '[') depth++\n else if (ch === ']') depth--\n else if (ch === '.' && depth === 0) return true\n }\n return false\n}\n\nfunction splitDottedSegmentOutsideBrackets(segment: string): string[] {\n const parts: string[] = []\n let current = ''\n let depth = 0\n for (const ch of segment) {\n if (ch === '[') {\n depth++\n current += ch\n } else if (ch === ']') {\n depth--\n current += ch\n } else if (ch === '.' && depth === 0) {\n if (current) parts.push(current)\n current = ''\n } else {\n current += ch\n }\n }\n if (current) parts.push(current)\n return parts\n}\n\nfunction toDirectoryNestedPath(filePath: string, routesDir: string): string {\n const rel = relative(routesDir, filePath).replace(/\\\\/g, '/')\n const ext = extname(rel)\n const withoutExt = rel.slice(0, -ext.length)\n const flattened = withoutExt.split('/').flatMap(splitDottedSegmentOutsideBrackets)\n return join(routesDir, `${flattened.join(sep)}${ext}`)\n}\n\nfunction walkRoutes(root: string, onFile: (absPath: string) => void): void {\n let entries\n try {\n entries = readdirSync(root, { withFileTypes: true })\n } catch {\n return\n }\n for (const entry of entries) {\n if (entry.name.startsWith('_') || entry.name.startsWith('.')) continue\n const full = join(root, entry.name)\n if (entry.isDirectory()) {\n walkRoutes(full, onFile)\n } else if (entry.isFile() && ROUTE_EXTENSIONS.has(extname(entry.name))) {\n onFile(full)\n }\n }\n}\n\nfunction isDottedRouteFile(filePath: string, routesDir: string): boolean {\n const rel = relative(routesDir, filePath).replace(/\\\\/g, '/')\n const ext = extname(rel)\n const withoutExt = rel.slice(0, -ext.length)\n return withoutExt.split('/').some(hasDotOutsideBrackets)\n}\n\n/**\n * Compute the migration plan for a `<server>/routes` tree.\n *\n * Pure: does NOT mutate the filesystem.\n *\n * @throws RouterMigrationCollisionError when a target collides with an\n * existing file (case-insensitive).\n */\nexport function planRouterMigration(routesDir: string): RouterMigrationPlanItem[] {\n const plan: RouterMigrationPlanItem[] = []\n const existingPathsLowercase = new Set<string>()\n\n walkRoutes(routesDir, (absPath) => {\n existingPathsLowercase.add(absPath.toLowerCase())\n })\n\n walkRoutes(routesDir, (absPath) => {\n if (isTestOrSpecFile(absPath)) return\n if (!isDottedRouteFile(absPath, routesDir)) return\n\n const to = toDirectoryNestedPath(absPath, routesDir)\n\n // EC-5: case-insensitive collision check — macOS HFS+/APFS default\n // and Windows NTFS treat case-only differences as the same path. If\n // any pre-existing file at a case-insensitive match exists, the codemod\n // would silently overwrite on those platforms; we bail explicitly.\n const targetLower = to.toLowerCase()\n if (existingPathsLowercase.has(targetLower) && targetLower !== absPath.toLowerCase()) {\n throw new RouterMigrationCollisionError(absPath, to)\n }\n // Also guard against statSync race using an explicit existence check.\n try {\n if (statSync(to).isFile()) {\n throw new RouterMigrationCollisionError(absPath, to)\n }\n } catch (err) {\n if (err instanceof RouterMigrationCollisionError) throw err\n // ENOENT — fine, target does not exist\n }\n\n plan.push({ from: absPath, to })\n })\n\n return plan\n}\n"],"mappings":";;;;AAeA,SAAS,oBAAoB;AAC7B,SAAS,YAAY,WAAW,cAAc,YAAY,qBAAqB;AAC/E,SAAS,oBAAoB;AAC7B,SAAS,SAAS,eAAe;;;ACGjC,SAAS,aAAa,gBAAgB;AACtC,SAAS,SAAS,MAAM,UAAU,WAAW;AAE7C,IAAM,mBAAmB,oBAAI,IAAI,CAAC,OAAO,QAAQ,OAAO,MAAM,CAAC;AAC/D,IAAM,kBAAkB;AAiBjB,IAAM,gCAAN,cAA4C,MAAM;AAAA,EACrC,OAAO;AAAA,EAChB;AAAA,EACA;AAAA,EACT,YAAY,MAAc,IAAY;AACpC;AAAA,MACE,+BAA+B,IAAI,oBAAoB,EAAE;AAAA,IAC3D;AACA,SAAK,OAAO;AACZ,SAAK,KAAK;AAAA,EACZ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ACzE,WAAO,EAAE,UAAU,CAAC,GAAG,cAAc,KAAK;AAAA,EAC5C;AAEA,MAAI,sBAAiB,KAAK,MAAM,8CAA8C;AAE9E,MAAI,KAAK,QAAQ;AACf,eAAW,QAAQ,MAAM;AACvB,UAAI,kBAAkB,KAAK,IAAI,WAAM,KAAK,EAAE,EAAE;AAAA,IAChD;AACA,WAAO,EAAE,UAAU,CAAC,GAAG,cAAc,MAAM;AAAA,EAC7C;AAEA,QAAM,WAAW,eAAe,MAAM,WAAW,GAAG;AACpD,MAAI,qBAAgB,SAAS,MAAM,YAAY;AAC/C,SAAO,EAAE,UAAU,cAAc,MAAM;AACzC;","names":["resolve"]}
@@ -5,16 +5,16 @@ import {
5
5
  } from "./chunk-GEQJAFSV.js";
6
6
  import {
7
7
  loadConfig
8
- } from "./chunk-AFVTEAES.js";
8
+ } from "./chunk-B7ONQ4QJ.js";
9
9
  import "./chunk-GDN3PXFH.js";
10
- import "./chunk-GSO77FSM.js";
11
- import "./chunk-45C3WUQ7.js";
10
+ import "./chunk-HEK4SET7.js";
11
+ import "./chunk-QPVXGC7O.js";
12
12
  import {
13
13
  scanServerActions,
14
14
  scanServerRoutes,
15
15
  scanWebSocketRoutes
16
- } from "./chunk-FRUEDJFX.js";
17
- import "./chunk-P37RZRFV.js";
16
+ } from "./chunk-226KMIGZ.js";
17
+ import "./chunk-A7JBF5FO.js";
18
18
 
19
19
  // src/cli/commands/routes.ts
20
20
  import { resolve, relative } from "path";
@@ -62,4 +62,4 @@ async function routesCommand() {
62
62
  export {
63
63
  routesCommand
64
64
  };
65
- //# sourceMappingURL=routes-XNS3UM3B.js.map
65
+ //# sourceMappingURL=routes-2RD4S5PZ.js.map
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ import "tsx/esm";
3
+ import {
4
+ cacheSchema,
5
+ corsSchema,
6
+ rateLimitSchema,
7
+ securityHeadersSchema,
8
+ securitySchema,
9
+ storageSchema,
10
+ theoConfigSchema
11
+ } from "./chunk-HEK4SET7.js";
12
+ import "./chunk-QPVXGC7O.js";
13
+ export {
14
+ cacheSchema,
15
+ corsSchema,
16
+ rateLimitSchema,
17
+ securityHeadersSchema,
18
+ securitySchema,
19
+ storageSchema,
20
+ theoConfigSchema
21
+ };
22
+ //# sourceMappingURL=schema-S553QCAU.js.map
@@ -1,9 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  import { C as CustomTool } from '../../define-agent-tool-cRuSpidb.js';
3
- import { AcpTransport, HumanInTheLoopOptions, HitlDecision, streamAgentUIMessages } from '@theokit/agents';
3
+ import { AcpTransport } from '@theokit/agents';
4
+ export { InProcessApprovalRequest, InProcessApprovalRequiredError, InProcessAwaitApproval, StreamAgentTurnDeps, StreamAgentTurnInProcessInput, streamAgentTurnInProcess } from '@theokit/agents';
4
5
  import { CustomTool as CustomTool$1 } from '@theokit/sdk';
5
6
  import { V as VerifyFn } from '../../webhook-types-CNUZY7o1.js';
6
- import { UIMessageChunk } from 'ai';
7
7
 
8
8
  /**
9
9
  * M26 (ADR-0041) — `createWorkflowTool`: wrap an SDK `Workflow` as a `CustomTool`.
@@ -229,75 +229,6 @@ interface ChannelWebhookConfig {
229
229
  */
230
230
  declare function handleChannelWebhook(request: Request, urlPath: string, config: ChannelWebhookConfig): Promise<Response>;
231
231
 
232
- /**
233
- * M35 (multi-surface) — the in-process agent-turn seam (Model A).
234
- *
235
- * The FRAMEWORK-owned sibling of the HTTP `mountAgent` and the stdout `runAgentInTerminal`: it runs a
236
- * compiled agent with the SAME `compileAgentModule` + SAME `streamAgentUIMessages` (G2 — reuses the
237
- * SDK runtime, reimplements nothing), but returns the raw `UIMessageChunk` generator so ANY consumer
238
- * drives it directly — the Ink TUI (M35), a Tauri window (M36), or a test — in a SINGLE process with
239
- * NO HTTP loopback, NO port, and NO CSRF (there is no network boundary to defend).
240
- *
241
- * The ONLY difference from the HTTP mount is HITL resolution: the mount pauses the run and resolves
242
- * the approval via a SECOND HTTP request to `/approve/:id` (the approval registry). In-process there
243
- * is no second request — the caller resolves the approval INLINE via `awaitApproval` (e.g. the Ink
244
- * TUI's y/n prompt). The gated-tool map is `compiled.hitl` verbatim, so the pause semantics are
245
- * byte-identical to the HTTP path; only the resolver differs. Parity with the mount is by
246
- * construction: both compile the module, resolve function-form skills, and call `streamAgentUIMessages`
247
- * with the same `{ message, sessionId, hitl }`.
248
- *
249
- * Consumers WILL still receive `tool-approval-request` chunks from the returned generator — they are
250
- * INFORMATIONAL (render them or ignore them). The authoritative human gate is `awaitApproval`, which
251
- * the SDK awaits BEFORE the gated tool runs; the chunk is not the gate.
252
- */
253
-
254
- /** An inline approval request handed to the caller's `awaitApproval` (the Ink/Tauri prompt). */
255
- interface InProcessApprovalRequest {
256
- approvalId: string;
257
- toolName: string;
258
- opts: HumanInTheLoopOptions;
259
- }
260
- /** Resolve one gated-tool approval inline (approve/deny, or a structured {@link HitlDecision}). */
261
- type InProcessAwaitApproval = (req: InProcessApprovalRequest) => Promise<boolean | HitlDecision>;
262
- interface StreamAgentTurnInProcessInput {
263
- message: string;
264
- /**
265
- * M35 (multimodal) — images to send alongside the text. Threaded to the SDK's structured
266
- * `SDKUserMessage { text, images }` send form. Absent ⇒ the string send path is byte-unchanged.
267
- */
268
- images?: Parameters<typeof streamAgentUIMessages>[2]['images'];
269
- /** Resume key; a fresh id per run when omitted. */
270
- sessionId?: string;
271
- /**
272
- * Inline HITL resolver — required IFF the agent has `@HumanInTheLoop`-gated tools. Omitting it for a
273
- * gated agent is a fail-fast error, never a silent bypass (Rule 8, the #99 lesson).
274
- */
275
- awaitApproval?: InProcessAwaitApproval;
276
- /** Labels a fail-fast `AgentDefinitionError` (the file path). */
277
- source?: string;
278
- /** Abort signal forwarded to the SDK stream (client disconnect / window close). */
279
- signal?: AbortSignal;
280
- }
281
- /** Injectable stream fn (defaults to the real SDK bridge) — lets tests drive a deterministic stream. */
282
- interface StreamAgentTurnDeps {
283
- stream: typeof streamAgentUIMessages;
284
- }
285
- /**
286
- * Thrown when a gated agent is run in-process without an `awaitApproval` resolver. Refusing loudly is
287
- * the correct posture: silently running a `@HumanInTheLoop`-gated tool with no human gate is exactly
288
- * the #99 class of bug. Typed so callers can catch it distinctly.
289
- */
290
- declare class InProcessApprovalRequiredError extends Error {
291
- constructor(toolNames: readonly string[]);
292
- }
293
- /**
294
- * Run a compiled agent in-process and return its `UIMessageChunk` stream. `apiKey` is resolved by the
295
- * caller (same contract as the HTTP mount). Validation + compile happen SYNCHRONOUSLY (so a gated
296
- * agent without a resolver throws at call time, not lazily on first iteration); the returned value is
297
- * the SDK's `streamAgentUIMessages` generator.
298
- */
299
- declare function streamAgentTurnInProcess(mod: unknown, apiKey: string, input: StreamAgentTurnInProcessInput, deps?: StreamAgentTurnDeps): AsyncGenerator<UIMessageChunk>;
300
-
301
232
  /**
302
233
  * M30 (ADR-0041) — MCP Apps: `ui://` HTML resources for the MCP server (M16).
303
234
  *
@@ -389,4 +320,4 @@ interface StdioStreams {
389
320
  */
390
321
  declare function serveMcpStdio(mod: unknown, name: string, appResources: readonly AppResource[], streams: StdioStreams): Promise<void>;
391
322
 
392
- export { type AcpToolConfig, type AppResource, type AppResourceInput, type ChannelMessage, type ChannelWebhookConfig, type CodeModeApi, type CodeModeConfig, type CodeModePermission, CodeModePermissionDeniedError, type InProcessApprovalRequest, InProcessApprovalRequiredError, type InProcessAwaitApproval, type McpResourceContents, type McpResourceDescriptor, NodeAcpTransport, type Sandbox, type StdioStreams, type StreamAgentTurnDeps, type StreamAgentTurnInProcessInput, type VendorAgentClient, type VendorAgentToolConfig, type WorkflowLike, type WorkflowToolConfig, buildResourceDescriptors, createACPTool, createCodeMode, createVendorAgentTool, createWorkflowTool, defineAppResource, extractAppResources, handleChannelWebhook, handleMcpStdioLine, isChannelPath, parseChannelPath, readAppResource, serveMcpStdio, streamAgentTurnInProcess };
323
+ export { type AcpToolConfig, type AppResource, type AppResourceInput, type ChannelMessage, type ChannelWebhookConfig, type CodeModeApi, type CodeModeConfig, type CodeModePermission, CodeModePermissionDeniedError, type McpResourceContents, type McpResourceDescriptor, NodeAcpTransport, type Sandbox, type StdioStreams, type VendorAgentClient, type VendorAgentToolConfig, type WorkflowLike, type WorkflowToolConfig, buildResourceDescriptors, createACPTool, createCodeMode, createVendorAgentTool, createWorkflowTool, defineAppResource, extractAppResources, handleChannelWebhook, handleMcpStdioLine, isChannelPath, parseChannelPath, readAppResource, serveMcpStdio };
@@ -12,15 +12,15 @@ import {
12
12
  parseChannelPath,
13
13
  serveMcpStdio,
14
14
  streamAgentTurnInProcess
15
- } from "../../chunk-5AVPWHUE.js";
15
+ } from "../../chunk-FZG3JYB3.js";
16
16
  import {
17
17
  buildResourceDescriptors,
18
18
  defineAppResource,
19
19
  extractAppResources,
20
20
  readAppResource
21
- } from "../../chunk-HZ6USUHC.js";
22
- import "../../chunk-E25FBYJP.js";
23
- import "../../chunk-DGUM43GV.js";
21
+ } from "../../chunk-YOIVCCZT.js";
22
+ import "../../chunk-SAFGDIPQ.js";
23
+ import "../../chunk-XTHN6JBX.js";
24
24
  export {
25
25
  CodeModePermissionDeniedError,
26
26
  InProcessApprovalRequiredError,
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"sources":[],"mappings":"","names":[]}
@@ -23,12 +23,12 @@ import {
23
23
  verifyBackupCode,
24
24
  verifyOAuthState,
25
25
  verifyTotp
26
- } from "../../chunk-SJIRP73B.js";
27
- import "../../chunk-ZJQ4O76G.js";
26
+ } from "../../chunk-646CA6RV.js";
27
+ import "../../chunk-4FWBKX6G.js";
28
28
  import {
29
29
  generateNonce
30
- } from "../../chunk-C3ZZ56YZ.js";
31
- import "../../chunk-DGUM43GV.js";
30
+ } from "../../chunk-JA2ZAT5Q.js";
31
+ import "../../chunk-XTHN6JBX.js";
32
32
  export {
33
33
  AuthRequiredError,
34
34
  _resetKeyCacheForTests,
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"sources":[],"mappings":"","names":[]}
@@ -2,8 +2,8 @@ import {
2
2
  InMemoryUsageStorage,
3
3
  trackAgentRun,
4
4
  trackAgentTools
5
- } from "../../chunk-RMU7EBRO.js";
6
- import "../../chunk-DGUM43GV.js";
5
+ } from "../../chunk-SEELKQUM.js";
6
+ import "../../chunk-XTHN6JBX.js";
7
7
  export {
8
8
  InMemoryUsageStorage,
9
9
  trackAgentRun,
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"sources":[],"mappings":"","names":[]}
@@ -14,12 +14,12 @@ import {
14
14
  translateCronToVercel,
15
15
  validateCronSchedule,
16
16
  writeCronManifest
17
- } from "../../chunk-U3NTEK46.js";
18
- import "../../chunk-YB5DJJ4U.js";
19
- import "../../chunk-6NEXVBPY.js";
20
- import "../../chunk-7MQOHNHE.js";
21
- import "../../chunk-X2VVCJ4V.js";
22
- import "../../chunk-DGUM43GV.js";
17
+ } from "../../chunk-2ADKT37V.js";
18
+ import "../../chunk-VZTYCAO6.js";
19
+ import "../../chunk-RWNSW4FM.js";
20
+ import "../../chunk-52PDWL5S.js";
21
+ import "../../chunk-U267AOWS.js";
22
+ import "../../chunk-XTHN6JBX.js";
23
23
  export {
24
24
  CRON_MANIFEST_SCHEMA_VERSION,
25
25
  DuplicateCronNameError,
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"sources":[],"mappings":"","names":[]}
@@ -8,18 +8,18 @@ import {
8
8
  tool,
9
9
  uiMessageStreamResponse,
10
10
  websocket
11
- } from "../../chunk-JQJN6LFK.js";
11
+ } from "../../chunk-62EU2BVZ.js";
12
12
  import {
13
13
  HEALTH_PATH,
14
14
  READY_PATH,
15
15
  defineHealthRoute,
16
16
  defineReadyRoute,
17
17
  serveReservedRoute
18
- } from "../../chunk-V3LJN2GS.js";
18
+ } from "../../chunk-GAPBPRPP.js";
19
19
  import {
20
20
  applyTransform
21
- } from "../../chunk-E25FBYJP.js";
22
- import "../../chunk-DGUM43GV.js";
21
+ } from "../../chunk-SAFGDIPQ.js";
22
+ import "../../chunk-XTHN6JBX.js";
23
23
  export {
24
24
  HEALTH_PATH,
25
25
  READY_PATH,
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"sources":[],"mappings":"","names":[]}
@@ -2,7 +2,7 @@ import {
2
2
  MAX_ERROR_HTML_BYTES,
3
3
  loadCustomErrorPages,
4
4
  serveStaticFile
5
- } from "../../chunk-OPLICDUB.js";
5
+ } from "../../chunk-UW2TEAGR.js";
6
6
  import {
7
7
  BATCH_PATH,
8
8
  BatchPathConflictError,
@@ -24,21 +24,21 @@ import {
24
24
  runMiddlewareAndContext,
25
25
  sendError,
26
26
  sendJson
27
- } from "../../chunk-QWBXUZAX.js";
28
- import "../../chunk-GY5Q27BJ.js";
29
- import "../../chunk-WFNLNIJX.js";
30
- import "../../chunk-ZEGYW52B.js";
31
- import "../../chunk-TSLSIRBR.js";
32
- import "../../chunk-UD3LFGDL.js";
27
+ } from "../../chunk-37ZO643S.js";
28
+ import "../../chunk-47FFT43U.js";
29
+ import "../../chunk-KD5G3YXI.js";
30
+ import "../../chunk-FB2HBNIC.js";
31
+ import "../../chunk-OLGPYOLO.js";
32
+ import "../../chunk-AVQU5CQF.js";
33
33
  import {
34
34
  envelopeCodeToStatus
35
- } from "../../chunk-X32XEJXR.js";
35
+ } from "../../chunk-ACKBVBUI.js";
36
36
  import {
37
37
  NotFoundError,
38
38
  TheoError,
39
39
  fromUnknown,
40
40
  serverErrorToEnvelope
41
- } from "../../chunk-UVXB2ER7.js";
41
+ } from "../../chunk-7SABX4DJ.js";
42
42
  import {
43
43
  appendCookieToHeaders,
44
44
  appendDeleteCookieToHeaders,
@@ -48,8 +48,8 @@ import {
48
48
  parseCookieHeader,
49
49
  serializeCookie,
50
50
  setCookie
51
- } from "../../chunk-ZJQ4O76G.js";
52
- import "../../chunk-DGUM43GV.js";
51
+ } from "../../chunk-4FWBKX6G.js";
52
+ import "../../chunk-XTHN6JBX.js";
53
53
  export {
54
54
  BATCH_PATH,
55
55
  BatchPathConflictError,
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"sources":[],"mappings":"","names":[]}
@@ -29,14 +29,14 @@ export { G as GenericFactory, a as PoolLike, P as PostgresDatabaseConfig, c as R
29
29
  export { BodyTooLargeError, DEFAULT_MAX_BODY_BYTES, RawBodyResult, ReadRawBodyOptions, defineWebhook, dispatchWebhook, readRawBody, timingSafeEqual } from './webhook/index.js';
30
30
  export { D as DefineWebhookOptions, V as VerifyFn, a as VerifyResult, W as WebhookContext, b as WebhookDefinition } from '../webhook-types-CNUZY7o1.js';
31
31
  import { z } from 'zod';
32
- export { AcpToolConfig, AppResource, AppResourceInput, ChannelMessage, ChannelWebhookConfig, CodeModeApi, CodeModeConfig, CodeModePermission, CodeModePermissionDeniedError, InProcessApprovalRequest, InProcessApprovalRequiredError, InProcessAwaitApproval, McpResourceContents, McpResourceDescriptor, NodeAcpTransport, Sandbox, StdioStreams, StreamAgentTurnDeps, StreamAgentTurnInProcessInput, VendorAgentClient, VendorAgentToolConfig, WorkflowLike, WorkflowToolConfig, buildResourceDescriptors, createACPTool, createCodeMode, createVendorAgentTool, createWorkflowTool, defineAppResource, extractAppResources, handleChannelWebhook, handleMcpStdioLine, isChannelPath, parseChannelPath, readAppResource, serveMcpStdio, streamAgentTurnInProcess } from './agent/index.js';
32
+ export { AcpToolConfig, AppResource, AppResourceInput, ChannelMessage, ChannelWebhookConfig, CodeModeApi, CodeModeConfig, CodeModePermission, CodeModePermissionDeniedError, McpResourceContents, McpResourceDescriptor, NodeAcpTransport, Sandbox, StdioStreams, VendorAgentClient, VendorAgentToolConfig, WorkflowLike, WorkflowToolConfig, buildResourceDescriptors, createACPTool, createCodeMode, createVendorAgentTool, createWorkflowTool, defineAppResource, extractAppResources, handleChannelWebhook, handleMcpStdioLine, isChannelPath, parseChannelPath, readAppResource, serveMcpStdio } from './agent/index.js';
33
+ export { InProcessApprovalRequest, InProcessApprovalRequiredError, InProcessAwaitApproval, StreamAgentTurnDeps, StreamAgentTurnInProcessInput, streamAgentTurnInProcess } from '@theokit/agents';
33
34
  import { IncomingMessage } from 'node:http';
34
35
  import { W as WebOnRequestHook, b as WebPreHandlerHook, c as WebOnResponseHook, d as WebOnErrorHook } from '../plugin-types-D69-lJZ9.js';
35
36
  export { e as HookName, H as HookResult, O as OnErrorHook, f as OnRequestHook, g as OnResponseHook, P as PluginContext, h as PluginErrorContext, i as PreHandlerHook, R as RunHookOptions, a as TheoApp, T as TheoPlugin } from '../plugin-types-D69-lJZ9.js';
36
37
  export { a as ServiceDefinition, S as ServicesConfig, b as ServicesConfigInput, c as ServicesConfigOutput } from '../schema-BpH6ivDY.js';
37
38
  import 'ai';
38
39
  import 'vite';
39
- import '@theokit/agents';
40
40
  import '@theokit/sdk';
41
41
 
42
42
  /**
@@ -3,7 +3,7 @@ import {
3
3
  getStorageManager,
4
4
  useDatabase,
5
5
  useUnstorage
6
- } from "../chunk-ESC54TAK.js";
6
+ } from "../chunk-3DGIANAN.js";
7
7
  import {
8
8
  BodyTooLargeError,
9
9
  DEFAULT_MAX_BODY_BYTES,
@@ -11,12 +11,12 @@ import {
11
11
  dispatchWebhook,
12
12
  readRawBody,
13
13
  timingSafeEqual
14
- } from "../chunk-UUFYP2UM.js";
14
+ } from "../chunk-AM3QABW5.js";
15
15
  import {
16
16
  MAX_ERROR_HTML_BYTES,
17
17
  loadCustomErrorPages,
18
18
  serveStaticFile
19
- } from "../chunk-OPLICDUB.js";
19
+ } from "../chunk-UW2TEAGR.js";
20
20
  import {
21
21
  DuplicateJobNameError,
22
22
  InMemoryJobBackend,
@@ -28,7 +28,7 @@ import {
28
28
  defineJob,
29
29
  scanJobs,
30
30
  writeJobManifest
31
- } from "../chunk-GUUWDMR2.js";
31
+ } from "../chunk-L5Z6IY5U.js";
32
32
  import {
33
33
  ConsoleObservabilityAdapter,
34
34
  NoopObservabilityAdapter,
@@ -39,20 +39,20 @@ import {
39
39
  defineObservabilityAdapter,
40
40
  resolveAdapter,
41
41
  serializeSpansToOtlp
42
- } from "../chunk-KI7OWQUX.js";
43
- import "../chunk-NPMCKOX4.js";
42
+ } from "../chunk-KBGGQK4I.js";
43
+ import "../chunk-GUBN5UTT.js";
44
44
  import {
45
45
  createRouteRateLimiter,
46
46
  createRouteRateLimiterWeb,
47
47
  deriveKey,
48
48
  deriveKeyFromRequest,
49
49
  matchRoutePattern
50
- } from "../chunk-ASDXVRJD.js";
50
+ } from "../chunk-6KDXP472.js";
51
51
  import {
52
52
  ChannelManager
53
- } from "../chunk-NM4WF3XD.js";
54
- import "../chunk-E3JH6YUM.js";
55
- import "../chunk-JHEAWR3L.js";
53
+ } from "../chunk-4PBJ266F.js";
54
+ import "../chunk-7IHWXDJJ.js";
55
+ import "../chunk-WPJOTQA5.js";
56
56
  import {
57
57
  _resetEnvCache,
58
58
  executeWebRequest,
@@ -61,7 +61,7 @@ import {
61
61
  resolveTransformer,
62
62
  superjsonTransformer,
63
63
  validateRouteInput
64
- } from "../chunk-GW5H4KB4.js";
64
+ } from "../chunk-U3H53IIN.js";
65
65
  import {
66
66
  ActionError,
67
67
  ActionInputError,
@@ -88,17 +88,17 @@ import {
88
88
  runMiddlewareAndContext,
89
89
  sendError,
90
90
  sendJson
91
- } from "../chunk-QWBXUZAX.js";
91
+ } from "../chunk-37ZO643S.js";
92
92
  import {
93
93
  DuplicateContextKeyError,
94
94
  createOutbox,
95
95
  createOutboxDispatcher,
96
96
  createQueueClient
97
- } from "../chunk-GY5Q27BJ.js";
97
+ } from "../chunk-47FFT43U.js";
98
98
  import {
99
99
  findSuggestion,
100
100
  levenshtein
101
- } from "../chunk-5QW7IQQU.js";
101
+ } from "../chunk-NTDN54XO.js";
102
102
  import {
103
103
  FileTooLargeError,
104
104
  _resetWarnOnceForTests,
@@ -106,23 +106,23 @@ import {
106
106
  logRequest,
107
107
  parseRequestBody,
108
108
  warnOnce
109
- } from "../chunk-WFNLNIJX.js";
109
+ } from "../chunk-KD5G3YXI.js";
110
110
  import {
111
111
  DuplicateDecorationError,
112
112
  DuplicatePluginError,
113
113
  InvalidPluginShapeError,
114
114
  PluginRunner,
115
115
  createPluginRunnerFromConfig
116
- } from "../chunk-IAJ2JVEH.js";
116
+ } from "../chunk-VSLTKX5L.js";
117
117
  import {
118
118
  InMemoryStore,
119
119
  createRateLimiter,
120
120
  createRateLimiterWeb
121
- } from "../chunk-VMEWD57H.js";
121
+ } from "../chunk-KPKLIUUL.js";
122
122
  import {
123
123
  createProductionLoader,
124
124
  createViteLoader
125
- } from "../chunk-JQSKBMXP.js";
125
+ } from "../chunk-7LVM22VG.js";
126
126
  import {
127
127
  ActionScanError,
128
128
  compilePattern,
@@ -134,11 +134,11 @@ import {
134
134
  scanServerRoutes,
135
135
  scanWebSocketRoutes,
136
136
  writeManifest
137
- } from "../chunk-IHJZPQEF.js";
138
- import "../chunk-WSJKACWB.js";
137
+ } from "../chunk-L4Y6RJ4E.js";
138
+ import "../chunk-C34PMLSN.js";
139
139
  import {
140
140
  scanMiddlewares
141
- } from "../chunk-ZEGYW52B.js";
141
+ } from "../chunk-FB2HBNIC.js";
142
142
  import {
143
143
  CSP_REPORT_PATH,
144
144
  CSRF_READINESS_PATH,
@@ -154,7 +154,7 @@ import {
154
154
  handleCsrfReadinessRequest,
155
155
  normalizeLegacy,
156
156
  normalizeNew
157
- } from "../chunk-JBCHWRKF.js";
157
+ } from "../chunk-MTEWLGVY.js";
158
158
  import {
159
159
  CSRF_WARN_CODE,
160
160
  CSRF_WARN_DOCS_URL,
@@ -162,21 +162,21 @@ import {
162
162
  matchDisallowed,
163
163
  validateCsrf,
164
164
  validateCsrfRequest
165
- } from "../chunk-TSLSIRBR.js";
165
+ } from "../chunk-OLGPYOLO.js";
166
166
  import {
167
167
  JsonStdoutSink,
168
168
  createNoOpLogger,
169
169
  safeAudit
170
- } from "../chunk-UD3LFGDL.js";
170
+ } from "../chunk-AVQU5CQF.js";
171
171
  import {
172
172
  envelopeCodeToStatus
173
- } from "../chunk-X32XEJXR.js";
173
+ } from "../chunk-ACKBVBUI.js";
174
174
  import {
175
175
  NotFoundError,
176
176
  TheoError,
177
177
  fromUnknown,
178
178
  serverErrorToEnvelope
179
- } from "../chunk-UVXB2ER7.js";
179
+ } from "../chunk-7SABX4DJ.js";
180
180
  import {
181
181
  CodeModePermissionDeniedError,
182
182
  InProcessApprovalRequiredError,
@@ -191,13 +191,13 @@ import {
191
191
  parseChannelPath,
192
192
  serveMcpStdio,
193
193
  streamAgentTurnInProcess
194
- } from "../chunk-5AVPWHUE.js";
194
+ } from "../chunk-FZG3JYB3.js";
195
195
  import {
196
196
  buildResourceDescriptors,
197
197
  defineAppResource,
198
198
  extractAppResources,
199
199
  readAppResource
200
- } from "../chunk-HZ6USUHC.js";
200
+ } from "../chunk-YOIVCCZT.js";
201
201
  import {
202
202
  AuthRequiredError,
203
203
  _resetKeyCacheForTests,
@@ -223,7 +223,7 @@ import {
223
223
  verifyBackupCode,
224
224
  verifyOAuthState,
225
225
  verifyTotp
226
- } from "../chunk-SJIRP73B.js";
226
+ } from "../chunk-646CA6RV.js";
227
227
  import {
228
228
  appendCookieToHeaders,
229
229
  appendDeleteCookieToHeaders,
@@ -233,15 +233,15 @@ import {
233
233
  parseCookieHeader,
234
234
  serializeCookie,
235
235
  setCookie
236
- } from "../chunk-ZJQ4O76G.js";
236
+ } from "../chunk-4FWBKX6G.js";
237
237
  import {
238
238
  generateNonce
239
- } from "../chunk-C3ZZ56YZ.js";
239
+ } from "../chunk-JA2ZAT5Q.js";
240
240
  import {
241
241
  InMemoryUsageStorage,
242
242
  trackAgentRun,
243
243
  trackAgentTools
244
- } from "../chunk-RMU7EBRO.js";
244
+ } from "../chunk-SEELKQUM.js";
245
245
  import {
246
246
  CRON_MANIFEST_SCHEMA_VERSION,
247
247
  DuplicateCronNameError,
@@ -258,11 +258,11 @@ import {
258
258
  translateCronToVercel,
259
259
  validateCronSchedule,
260
260
  writeCronManifest
261
- } from "../chunk-U3NTEK46.js";
262
- import "../chunk-YB5DJJ4U.js";
263
- import "../chunk-6NEXVBPY.js";
264
- import "../chunk-7MQOHNHE.js";
265
- import "../chunk-X2VVCJ4V.js";
261
+ } from "../chunk-2ADKT37V.js";
262
+ import "../chunk-VZTYCAO6.js";
263
+ import "../chunk-RWNSW4FM.js";
264
+ import "../chunk-52PDWL5S.js";
265
+ import "../chunk-U267AOWS.js";
266
266
  import {
267
267
  action,
268
268
  defineChannel,
@@ -273,18 +273,18 @@ import {
273
273
  tool,
274
274
  uiMessageStreamResponse,
275
275
  websocket
276
- } from "../chunk-JQJN6LFK.js";
276
+ } from "../chunk-62EU2BVZ.js";
277
277
  import {
278
278
  HEALTH_PATH,
279
279
  READY_PATH,
280
280
  defineHealthRoute,
281
281
  defineReadyRoute,
282
282
  serveReservedRoute
283
- } from "../chunk-V3LJN2GS.js";
283
+ } from "../chunk-GAPBPRPP.js";
284
284
  import {
285
285
  applyTransform
286
- } from "../chunk-E25FBYJP.js";
287
- import "../chunk-DGUM43GV.js";
286
+ } from "../chunk-SAFGDIPQ.js";
287
+ import "../chunk-XTHN6JBX.js";
288
288
 
289
289
  // src/server/openapi/serve-docs.ts
290
290
  import { existsSync, readFileSync, statSync } from "fs";