theokit 0.48.13 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/README.md +1 -0
  2. package/dist/{actions-virtual-module-YQXRSSMW.js → actions-virtual-module-5WBVSDOM.js} +22 -12
  3. package/dist/actions-virtual-module-5WBVSDOM.js.map +1 -0
  4. package/dist/{actions-virtual-module-LB4NGONI.js → actions-virtual-module-ZYLMNW6K.js} +13 -8
  5. package/dist/{actions-virtual-module-LB4NGONI.js.map → actions-virtual-module-ZYLMNW6K.js.map} +1 -1
  6. package/dist/adapters/agent-mount.d.ts +127 -0
  7. package/dist/adapters/agent-mount.js +24 -0
  8. package/dist/adapters/security-headers.d.ts +132 -0
  9. package/dist/adapters/security-headers.js +64 -0
  10. package/dist/adapters/security-headers.js.map +1 -0
  11. package/dist/adapters/web-shim.d.ts +100 -13
  12. package/dist/adapters/web-shim.js +158 -54
  13. package/dist/adapters/web-shim.js.map +1 -1
  14. package/dist/agent-GKUEL6OH.js +15 -0
  15. package/dist/agent-scan-BZa-pagG.d.ts +16 -0
  16. package/dist/{app-typed-client-GHO3EWZK.js → app-typed-client-4LAIEGFX.js} +23 -13
  17. package/dist/app-typed-client-4LAIEGFX.js.map +1 -0
  18. package/dist/{app-typed-client-G3J5G7E5.js → app-typed-client-DQM3Y6YY.js} +14 -9
  19. package/dist/app-typed-client-DQM3Y6YY.js.map +1 -0
  20. package/dist/aws-lambda-VKMYUMP2.js +261 -0
  21. package/dist/aws-lambda-VKMYUMP2.js.map +1 -0
  22. package/dist/{build-WU6AKKIB.js → build-FLX6VF7Q.js} +71 -26
  23. package/dist/build-FLX6VF7Q.js.map +1 -0
  24. package/dist/{bun-33RD6K7O.js → bun-L7PP6ID5.js} +105 -13
  25. package/dist/bun-L7PP6ID5.js.map +1 -0
  26. package/dist/{check-45NKUVSQ.js → check-GIPZBFTX.js} +2 -2
  27. package/dist/{chunk-KD5G3YXI.js → chunk-2AMLGJJA.js} +35 -9
  28. package/dist/chunk-2AMLGJJA.js.map +1 -0
  29. package/dist/chunk-3PBAN2YE.js +146 -0
  30. package/dist/chunk-3PBAN2YE.js.map +1 -0
  31. package/dist/{chunk-HBU2GIMZ.js → chunk-3QPVEJ7D.js} +15 -9
  32. package/dist/chunk-3QPVEJ7D.js.map +1 -0
  33. package/dist/{chunk-47CINLWF.js → chunk-44J2ANQC.js} +2 -2
  34. package/dist/{chunk-IEES3CHD.js → chunk-47MM2JUK.js} +8 -2
  35. package/dist/chunk-47MM2JUK.js.map +1 -0
  36. package/dist/chunk-4X6H2BXP.js +108 -0
  37. package/dist/chunk-4X6H2BXP.js.map +1 -0
  38. package/dist/{chunk-A7JBF5FO.js → chunk-5K4TDLRG.js} +8 -5
  39. package/dist/chunk-5K4TDLRG.js.map +1 -0
  40. package/dist/chunk-5YPXXSYY.js +181 -0
  41. package/dist/chunk-5YPXXSYY.js.map +1 -0
  42. package/dist/{chunk-YGAXV5HR.js → chunk-6J4JWHDJ.js} +191 -112
  43. package/dist/chunk-6J4JWHDJ.js.map +1 -0
  44. package/dist/chunk-72DMJBXI.js +424 -0
  45. package/dist/chunk-72DMJBXI.js.map +1 -0
  46. package/dist/chunk-7PM6K5EV.js +513 -0
  47. package/dist/chunk-7PM6K5EV.js.map +1 -0
  48. package/dist/{chunk-MTEWLGVY.js → chunk-BPYMC7SU.js} +4 -48
  49. package/dist/chunk-BPYMC7SU.js.map +1 -0
  50. package/dist/chunk-BU6RJPPJ.js +421 -0
  51. package/dist/chunk-BU6RJPPJ.js.map +1 -0
  52. package/dist/{chunk-FB2HBNIC.js → chunk-BX6EUYHU.js} +6 -2
  53. package/dist/chunk-BX6EUYHU.js.map +1 -0
  54. package/dist/{chunk-BIVCP6X5.js → chunk-C62IZEJI.js} +465 -202
  55. package/dist/chunk-C62IZEJI.js.map +1 -0
  56. package/dist/chunk-D4VP2QPR.js +16 -0
  57. package/dist/chunk-D4VP2QPR.js.map +1 -0
  58. package/dist/{chunk-J5MXCGKA.js → chunk-DHAD2O3S.js} +6 -6
  59. package/dist/chunk-DHAD2O3S.js.map +1 -0
  60. package/dist/chunk-E43VJ3E5.js +188 -0
  61. package/dist/chunk-E43VJ3E5.js.map +1 -0
  62. package/dist/chunk-EVZKNA2W.js +110 -0
  63. package/dist/chunk-EVZKNA2W.js.map +1 -0
  64. package/dist/chunk-FD4ZDTQ6.js +181 -0
  65. package/dist/chunk-FD4ZDTQ6.js.map +1 -0
  66. package/dist/chunk-FDOOBTXJ.js +17 -0
  67. package/dist/chunk-FDOOBTXJ.js.map +1 -0
  68. package/dist/chunk-FH3SQR6P.js +275 -0
  69. package/dist/chunk-FH3SQR6P.js.map +1 -0
  70. package/dist/chunk-HJHGTFEJ.js +23 -0
  71. package/dist/chunk-HJHGTFEJ.js.map +1 -0
  72. package/dist/{chunk-LXAESF4Y.js → chunk-HK4AZBKX.js} +7 -4
  73. package/dist/chunk-HK4AZBKX.js.map +1 -0
  74. package/dist/{chunk-T5C46IIU.js → chunk-HWBRS4DZ.js} +28 -269
  75. package/dist/chunk-HWBRS4DZ.js.map +1 -0
  76. package/dist/chunk-IRQGAC4L.js +52 -0
  77. package/dist/chunk-IRQGAC4L.js.map +1 -0
  78. package/dist/{chunk-FNTLKHZ7.js → chunk-JDN5SAAD.js} +7 -4
  79. package/dist/chunk-JDN5SAAD.js.map +1 -0
  80. package/dist/{chunk-GXEX4CBH.js → chunk-JIKNR5LX.js} +673 -484
  81. package/dist/chunk-JIKNR5LX.js.map +1 -0
  82. package/dist/{chunk-GRI4XHBJ.js → chunk-JWRCZIA4.js} +266 -108
  83. package/dist/chunk-JWRCZIA4.js.map +1 -0
  84. package/dist/{chunk-E576KYYT.js → chunk-KI4DOTN4.js} +25 -2
  85. package/dist/chunk-KI4DOTN4.js.map +1 -0
  86. package/dist/{chunk-ZB7D62OA.js → chunk-KUZVRJ7M.js} +3 -3
  87. package/dist/chunk-L4VFNFDL.js +248 -0
  88. package/dist/chunk-L4VFNFDL.js.map +1 -0
  89. package/dist/chunk-M2WC5MF7.js +127 -0
  90. package/dist/chunk-M2WC5MF7.js.map +1 -0
  91. package/dist/{chunk-O3JIAU3V.js → chunk-MCTC6HSE.js} +157 -103
  92. package/dist/chunk-MCTC6HSE.js.map +1 -0
  93. package/dist/{chunk-PXFXSFJL.js → chunk-NZ5JU6D3.js} +9 -9
  94. package/dist/{chunk-YRBR424R.js → chunk-OAUI273L.js} +338 -165
  95. package/dist/chunk-OAUI273L.js.map +1 -0
  96. package/dist/chunk-OGLS76RN.js +43 -0
  97. package/dist/chunk-OGLS76RN.js.map +1 -0
  98. package/dist/{chunk-7LVM22VG.js → chunk-OQCRCXCP.js} +6 -6
  99. package/dist/chunk-OQCRCXCP.js.map +1 -0
  100. package/dist/{chunk-OLGPYOLO.js → chunk-P6OS7652.js} +5 -2
  101. package/dist/chunk-P6OS7652.js.map +1 -0
  102. package/dist/chunk-Q5L5EGWZ.js +26 -0
  103. package/dist/chunk-Q5L5EGWZ.js.map +1 -0
  104. package/dist/{chunk-S433N3CT.js → chunk-QTHVHNJJ.js} +6 -36
  105. package/dist/chunk-QTHVHNJJ.js.map +1 -0
  106. package/dist/chunk-RPET332G.js +84 -0
  107. package/dist/chunk-RPET332G.js.map +1 -0
  108. package/dist/{chunk-646CA6RV.js → chunk-RQW5YMH7.js} +12 -4
  109. package/dist/chunk-RQW5YMH7.js.map +1 -0
  110. package/dist/{chunk-XALU5LCU.js → chunk-RWNYIU6A.js} +550 -146
  111. package/dist/chunk-RWNYIU6A.js.map +1 -0
  112. package/dist/chunk-SL7YUHPV.js +111 -0
  113. package/dist/chunk-SL7YUHPV.js.map +1 -0
  114. package/dist/chunk-U5PWXS3J.js +39 -0
  115. package/dist/chunk-U5PWXS3J.js.map +1 -0
  116. package/dist/chunk-ULDCFL2O.js +273 -0
  117. package/dist/chunk-ULDCFL2O.js.map +1 -0
  118. package/dist/{chunk-RWNSW4FM.js → chunk-UMNXCU3K.js} +12 -6
  119. package/dist/{chunk-RWNSW4FM.js.map → chunk-UMNXCU3K.js.map} +1 -1
  120. package/dist/chunk-VI7ZANB3.js +193 -0
  121. package/dist/chunk-VI7ZANB3.js.map +1 -0
  122. package/dist/chunk-VQPHPQ5L.js +14 -0
  123. package/dist/chunk-VQPHPQ5L.js.map +1 -0
  124. package/dist/chunk-WNJTJRM6.js +147 -0
  125. package/dist/chunk-WNJTJRM6.js.map +1 -0
  126. package/dist/chunk-WOBSEO75.js +790 -0
  127. package/dist/chunk-WOBSEO75.js.map +1 -0
  128. package/dist/{chunk-BMHS4WAN.js → chunk-XS7EX55U.js} +156 -42
  129. package/dist/chunk-XS7EX55U.js.map +1 -0
  130. package/dist/chunk-YN4W7LCX.js +31 -0
  131. package/dist/chunk-YN4W7LCX.js.map +1 -0
  132. package/dist/chunk-YSJOZEI6.js +1 -0
  133. package/dist/{chunk-JA2ZAT5Q.js → chunk-Z4PJMZLM.js} +2 -2
  134. package/dist/chunk-Z4PJMZLM.js.map +1 -0
  135. package/dist/{chunk-7VPQHEAJ.js → chunk-ZNZISJDZ.js} +6 -2
  136. package/dist/chunk-ZNZISJDZ.js.map +1 -0
  137. package/dist/chunk-ZWN3AODA.js +11 -0
  138. package/dist/chunk-ZWN3AODA.js.map +1 -0
  139. package/dist/cli/index.js +25 -10
  140. package/dist/cli/index.js.map +1 -1
  141. package/dist/client/core.d.ts +1 -1
  142. package/dist/client/core.js +2 -0
  143. package/dist/client/core.js.map +1 -1
  144. package/dist/client/index.d.ts +44 -10
  145. package/dist/client/index.js +35 -0
  146. package/dist/client/index.js.map +1 -1
  147. package/dist/cloudflare-SIG42OIW.js +335 -0
  148. package/dist/cloudflare-SIG42OIW.js.map +1 -0
  149. package/dist/config-support-WQHQIJTA.js +104 -0
  150. package/dist/config-support-WQHQIJTA.js.map +1 -0
  151. package/dist/{csrf-BBrEZSBW.d.ts → csrf-Dgot9qSM.d.ts} +1 -1
  152. package/dist/deno-deploy-LQAYOOPW.js +196 -0
  153. package/dist/deno-deploy-LQAYOOPW.js.map +1 -0
  154. package/dist/{dev-MUWJAZRD.js → dev-ANDSEVLB.js} +28 -18
  155. package/dist/dev-ANDSEVLB.js.map +1 -0
  156. package/dist/{dev-emit-GWD6IXV7.js → dev-emit-BFNMDCPB.js} +5 -5
  157. package/dist/{dev-emit-NBT6JD7R.js → dev-emit-MVAJAFGX.js} +5 -3
  158. package/dist/dev-emit-MVAJAFGX.js.map +1 -0
  159. package/dist/engine-singleton-X4R7AZBJ.js +315 -0
  160. package/dist/engine-singleton-X4R7AZBJ.js.map +1 -0
  161. package/dist/{generate-Y3GWM57K.js → generate-EN6EDITF.js} +43 -4
  162. package/dist/generate-EN6EDITF.js.map +1 -0
  163. package/dist/index-CzxtQcnp.d.ts +1058 -0
  164. package/dist/index.d.ts +4 -0
  165. package/dist/index.js +24 -13
  166. package/dist/index.js.map +1 -1
  167. package/dist/{info-XW7HGUPH.js → info-Y55RWS42.js} +8 -6
  168. package/dist/{info-XW7HGUPH.js.map → info-Y55RWS42.js.map} +1 -1
  169. package/dist/{internal-api-V5L65YSJ.js → internal-api-IP35YU3G.js} +22 -12
  170. package/dist/{internal-api-WEOSTMSN.js → internal-api-OPU456AT.js} +30 -16
  171. package/dist/internal-api-OPU456AT.js.map +1 -0
  172. package/dist/load-config-4ATXQUN3.js +16 -0
  173. package/dist/match-DmGgxjIU.d.ts +44 -0
  174. package/dist/{mcp-ULUFJNSZ.js → mcp-5LLNAGKA.js} +7 -7
  175. package/dist/netlify-C2IRCZKI.js +245 -0
  176. package/dist/netlify-C2IRCZKI.js.map +1 -0
  177. package/dist/node-OSVPYQ3D.js +10 -0
  178. package/dist/nonce-BXt7Qu_C.d.ts +31 -0
  179. package/dist/observability-bootstrap-MZMSOE66.js +15 -0
  180. package/dist/{openapi-HZXR335W.js → openapi-VFPEZSRI.js} +13 -11
  181. package/dist/{openapi-HZXR335W.js.map → openapi-VFPEZSRI.js.map} +1 -1
  182. package/dist/{plugin-runner-BFEcgtmJ.d.ts → plugin-runner-BVMOSxvb.d.ts} +1 -1
  183. package/dist/{plugin-types-D69-lJZ9.d.ts → plugin-types-BUVfUQ0V.d.ts} +13 -1
  184. package/dist/preview-GHPT2EQ5.js +23 -0
  185. package/dist/preview-GHPT2EQ5.js.map +1 -0
  186. package/dist/provider-resolver-Dx6QuWrw.d.ts +128 -0
  187. package/dist/registry-KBZDCFVQ.js +23 -0
  188. package/dist/route-config-Cm_ZMA1C.d.ts +72 -0
  189. package/dist/route-policy-BxOycCDq.d.ts +65 -0
  190. package/dist/router/element-scroll-restoration.d.ts +28 -0
  191. package/dist/router/element-scroll-restoration.js +96 -0
  192. package/dist/router/element-scroll-restoration.js.map +1 -0
  193. package/dist/{routes-OLNQX7CT.js → routes-BPLU3ISV.js} +11 -9
  194. package/dist/{routes-OLNQX7CT.js.map → routes-BPLU3ISV.js.map} +1 -1
  195. package/dist/{scan-7MJC6PYU.js → scan-YJEE4KQK.js} +2 -2
  196. package/dist/{schema-ZO3OSWVG.js → schema-SOAD43RQ.js} +7 -5
  197. package/dist/schemas-4AXHQMV3.js +25 -0
  198. package/dist/schemas-4AXHQMV3.js.map +1 -0
  199. package/dist/security-headers-Ccj7ncNx.d.ts +129 -0
  200. package/dist/server/agent/index.d.ts +2 -90
  201. package/dist/server/agent/index.js +1 -1
  202. package/dist/server/auth/index.d.ts +2 -21
  203. package/dist/server/auth/index.js +3 -2
  204. package/dist/server/cron/index.js +4 -3
  205. package/dist/server/define/index.d.ts +51 -57
  206. package/dist/server/define/index.js +10 -1
  207. package/dist/server/http/index.d.ts +7 -5
  208. package/dist/server/http/index.js +56 -12
  209. package/dist/server/index.d.ts +47 -439
  210. package/dist/server/index.js +119 -201
  211. package/dist/server/index.js.map +1 -1
  212. package/dist/server/jobs/index.js +4 -3
  213. package/dist/server/observability/index.d.ts +109 -35
  214. package/dist/server/observability/index.js +10 -7
  215. package/dist/server/plugins/index.d.ts +3 -3
  216. package/dist/server/scan/index.d.ts +47 -12
  217. package/dist/server/scan/index.js +13 -4
  218. package/dist/server/security/index.d.ts +61 -103
  219. package/dist/server/security/index.js +15 -6
  220. package/dist/server/webhook/index.d.ts +90 -3
  221. package/dist/server/webhook/index.js +12 -2
  222. package/dist/server-boundary-6B4ZQUY7.js +148 -0
  223. package/dist/server-boundary-6B4ZQUY7.js.map +1 -0
  224. package/dist/server-boundary-7VZQRPPX.js +133 -0
  225. package/dist/server-boundary-7VZQRPPX.js.map +1 -0
  226. package/dist/{services-typed-client-PSAGRPFF.js → services-typed-client-XGT5SUUN.js} +2 -2
  227. package/dist/{start-KR2JJR7K.js → start-UZDMOT7I.js} +342 -111
  228. package/dist/start-UZDMOT7I.js.map +1 -0
  229. package/dist/{static-M2W4HUWS.js → static-SVDWIOXJ.js} +24 -13
  230. package/dist/static-SVDWIOXJ.js.map +1 -0
  231. package/dist/{theo-cloud-XAHWOUFK.js → theo-cloud-3ET4G5T6.js} +9 -2
  232. package/dist/theo-cloud-3ET4G5T6.js.map +1 -0
  233. package/dist/vercel-BMCQKCWE.js +277 -0
  234. package/dist/vercel-BMCQKCWE.js.map +1 -0
  235. package/dist/vite-plugin/index.js +24 -13
  236. package/dist/vite-plugin-VKCT2LF2.js +42 -0
  237. package/dist/vite-plugin-VKCT2LF2.js.map +1 -0
  238. package/package.json +19 -6
  239. package/dist/actions-virtual-module-YQXRSSMW.js.map +0 -1
  240. package/dist/agent-7JJW3TPB.js +0 -15
  241. package/dist/app-typed-client-G3J5G7E5.js.map +0 -1
  242. package/dist/app-typed-client-GHO3EWZK.js.map +0 -1
  243. package/dist/aws-lambda-CYNDGU5O.js +0 -172
  244. package/dist/aws-lambda-CYNDGU5O.js.map +0 -1
  245. package/dist/build-WU6AKKIB.js.map +0 -1
  246. package/dist/bun-33RD6K7O.js.map +0 -1
  247. package/dist/chunk-646CA6RV.js.map +0 -1
  248. package/dist/chunk-6E5WKMDS.js +0 -67
  249. package/dist/chunk-6E5WKMDS.js.map +0 -1
  250. package/dist/chunk-6GGWS7J3.js +0 -91
  251. package/dist/chunk-6GGWS7J3.js.map +0 -1
  252. package/dist/chunk-7LVM22VG.js.map +0 -1
  253. package/dist/chunk-7VPQHEAJ.js.map +0 -1
  254. package/dist/chunk-A7JBF5FO.js.map +0 -1
  255. package/dist/chunk-AM3QABW5.js +0 -161
  256. package/dist/chunk-AM3QABW5.js.map +0 -1
  257. package/dist/chunk-BIVCP6X5.js.map +0 -1
  258. package/dist/chunk-BMHS4WAN.js.map +0 -1
  259. package/dist/chunk-E576KYYT.js.map +0 -1
  260. package/dist/chunk-FB2HBNIC.js.map +0 -1
  261. package/dist/chunk-FNTLKHZ7.js.map +0 -1
  262. package/dist/chunk-GRI4XHBJ.js.map +0 -1
  263. package/dist/chunk-GVW5EKEU.js +0 -422
  264. package/dist/chunk-GVW5EKEU.js.map +0 -1
  265. package/dist/chunk-GXEX4CBH.js.map +0 -1
  266. package/dist/chunk-HBU2GIMZ.js.map +0 -1
  267. package/dist/chunk-IEES3CHD.js.map +0 -1
  268. package/dist/chunk-J5MXCGKA.js.map +0 -1
  269. package/dist/chunk-JA2ZAT5Q.js.map +0 -1
  270. package/dist/chunk-KD5G3YXI.js.map +0 -1
  271. package/dist/chunk-LNVMHQ2Z.js +0 -54
  272. package/dist/chunk-LNVMHQ2Z.js.map +0 -1
  273. package/dist/chunk-LXAESF4Y.js.map +0 -1
  274. package/dist/chunk-MTEWLGVY.js.map +0 -1
  275. package/dist/chunk-O3JIAU3V.js.map +0 -1
  276. package/dist/chunk-OJLL4YD6.js +0 -403
  277. package/dist/chunk-OJLL4YD6.js.map +0 -1
  278. package/dist/chunk-OLGPYOLO.js.map +0 -1
  279. package/dist/chunk-S433N3CT.js.map +0 -1
  280. package/dist/chunk-T5C46IIU.js.map +0 -1
  281. package/dist/chunk-U267AOWS.js +0 -28
  282. package/dist/chunk-U267AOWS.js.map +0 -1
  283. package/dist/chunk-UW2TEAGR.js +0 -77
  284. package/dist/chunk-UW2TEAGR.js.map +0 -1
  285. package/dist/chunk-WPJOTQA5.js +0 -1
  286. package/dist/chunk-XALU5LCU.js.map +0 -1
  287. package/dist/chunk-XR74JD4M.js +0 -457
  288. package/dist/chunk-XR74JD4M.js.map +0 -1
  289. package/dist/chunk-YGAXV5HR.js.map +0 -1
  290. package/dist/chunk-YRBR424R.js.map +0 -1
  291. package/dist/cloudflare-KYUWCEPL.js +0 -122
  292. package/dist/cloudflare-KYUWCEPL.js.map +0 -1
  293. package/dist/deno-deploy-CCTB7HGS.js +0 -107
  294. package/dist/deno-deploy-CCTB7HGS.js.map +0 -1
  295. package/dist/dev-MUWJAZRD.js.map +0 -1
  296. package/dist/dev-emit-NBT6JD7R.js.map +0 -1
  297. package/dist/generate-Y3GWM57K.js.map +0 -1
  298. package/dist/index-BEtEv6ZH.d.ts +0 -575
  299. package/dist/load-config-VKD6LKWU.js +0 -14
  300. package/dist/match-CfbEFRG4.d.ts +0 -26
  301. package/dist/netlify-AFMDNKT4.js +0 -150
  302. package/dist/netlify-AFMDNKT4.js.map +0 -1
  303. package/dist/node-ZJQEJSP3.js +0 -10
  304. package/dist/registry-GKR3EWRW.js +0 -23
  305. package/dist/start-KR2JJR7K.js.map +0 -1
  306. package/dist/static-M2W4HUWS.js.map +0 -1
  307. package/dist/theo-cloud-XAHWOUFK.js.map +0 -1
  308. package/dist/vercel-SRS2DH6O.js +0 -133
  309. package/dist/vercel-SRS2DH6O.js.map +0 -1
  310. package/dist/vite-plugin-VPJFD4HK.js +0 -36
  311. /package/dist/{chunk-WPJOTQA5.js.map → adapters/agent-mount.js.map} +0 -0
  312. /package/dist/{agent-7JJW3TPB.js.map → agent-GKUEL6OH.js.map} +0 -0
  313. /package/dist/{check-45NKUVSQ.js.map → check-GIPZBFTX.js.map} +0 -0
  314. /package/dist/{chunk-47CINLWF.js.map → chunk-44J2ANQC.js.map} +0 -0
  315. /package/dist/{chunk-ZB7D62OA.js.map → chunk-KUZVRJ7M.js.map} +0 -0
  316. /package/dist/{chunk-PXFXSFJL.js.map → chunk-NZ5JU6D3.js.map} +0 -0
  317. /package/dist/{internal-api-WEOSTMSN.js.map → chunk-YSJOZEI6.js.map} +0 -0
  318. /package/dist/{dev-emit-GWD6IXV7.js.map → dev-emit-BFNMDCPB.js.map} +0 -0
  319. /package/dist/{internal-api-V5L65YSJ.js.map → internal-api-IP35YU3G.js.map} +0 -0
  320. /package/dist/{load-config-VKD6LKWU.js.map → load-config-4ATXQUN3.js.map} +0 -0
  321. /package/dist/{mcp-ULUFJNSZ.js.map → mcp-5LLNAGKA.js.map} +0 -0
  322. /package/dist/{node-ZJQEJSP3.js.map → node-OSVPYQ3D.js.map} +0 -0
  323. /package/dist/{scan-7MJC6PYU.js.map → observability-bootstrap-MZMSOE66.js.map} +0 -0
  324. /package/dist/{registry-GKR3EWRW.js.map → registry-KBZDCFVQ.js.map} +0 -0
  325. /package/dist/{schema-ZO3OSWVG.js.map → scan-YJEE4KQK.js.map} +0 -0
  326. /package/dist/{vite-plugin-VPJFD4HK.js.map → schema-SOAD43RQ.js.map} +0 -0
  327. /package/dist/{services-typed-client-PSAGRPFF.js.map → services-typed-client-XGT5SUUN.js.map} +0 -0
@@ -1,65 +1,16 @@
1
+ import { R as RouteConfig } from '../../route-config-Cm_ZMA1C.js';
1
2
  import { z } from 'zod';
2
3
  import { W as WebSocketHandler, b as WebSocketLike } from '../../define-websocket-DzPn1sR6.js';
3
4
  export { a as WebSocketHandlerWeb } from '../../define-websocket-DzPn1sR6.js';
4
5
  import { b as ToolTransform, C as CustomTool } from '../../define-agent-tool-cRuSpidb.js';
5
6
  export { D as DefineAgentToolSpec, T as ToolContextMessage, a as ToolHandlerContext, c as applyTransform } from '../../define-agent-tool-cRuSpidb.js';
6
- import { f as OnRequestHook, i as PreHandlerHook, g as OnResponseHook, O as OnErrorHook, T as TheoPlugin } from '../../plugin-types-D69-lJZ9.js';
7
+ import { R as RoutePolicy } from '../../route-policy-BxOycCDq.js';
8
+ export { A as AccessDecision, b as RoutePolicyInput, a as RouteSubject, e as evaluateRoutePolicy, r as requireOwner, s as subjectFromContext } from '../../route-policy-BxOycCDq.js';
9
+ import { c as OnRequestHook, f as PreHandlerHook, d as OnResponseHook, O as OnErrorHook, T as TheoPlugin } from '../../plugin-types-BUVfUQ0V.js';
7
10
  import { WireChunk } from '@theokit/presenter/wire';
8
11
  import { IncomingMessage } from 'node:http';
9
12
  export { H as HEALTH_PATH, a as HealthRouteConfig, b as READY_PATH, c as ReadyRouteConfig, d as ReservedResponse, R as ReservedRoutes, e as defineHealthRoute, f as defineReadyRoute, s as serveReservedRoute } from '../../health-route-C0hk64_U.js';
10
13
 
11
- /**
12
- * core/contracts/route-config.ts
13
- *
14
- * Canonical home for `RouteConfig<TQuery, TBody, TParams, TCtx, TResponse>` —
15
- * the contract shape consumed by `defineRoute()` (server) and
16
- * `defineCachedRoute()` (cache).
17
- *
18
- * Moved here in T2.2 of architecture-cleanup so `cache → core/contracts`
19
- * is the legal edge (replacing the prior `cache → server` violation).
20
- *
21
- * GAP-4 (plan v1.1): the 5-arity generic shape `<TQuery, TBody, TParams, TCtx, TResponse>`
22
- * MUST be preserved byte-by-byte. Type tests assert this in
23
- * `tests/unit/route-config-generic-arity.test.ts`.
24
- */
25
-
26
- interface RouteConfig<TQuery extends z.ZodType = z.ZodUndefined, TBody extends z.ZodType = z.ZodUndefined, TParams extends z.ZodType = z.ZodUndefined, TCtx = unknown, TResponse = unknown> {
27
- query?: TQuery;
28
- body?: TBody;
29
- params?: TParams;
30
- status?: number;
31
- /**
32
- * Optional Zod schema for the handler's plain-object return value. When
33
- * present, BOTH runtimes (Node `executeRoute` + Web `executeWebRequest`)
34
- * validate the handler's plain-object return against it BEFORE serializing.
35
- *
36
- * A mismatch is a SERVER fault (the handler violated its own declared
37
- * contract) → 500 `INTERNAL_SERVER_ERROR`, distinct from the 400 used for
38
- * input (`query`/`body`/`params`) validation failures.
39
- *
40
- * `Response`-instance returns (and `undefined`/`null` → 204) are NOT
41
- * validated. This is a plain optional field — runtime validation only; the
42
- * handler return type is NOT statically inferred from `response` (YAGNI).
43
- */
44
- response?: z.ZodType;
45
- /**
46
- * Opt out of CSRF enforcement for this route. Use for endpoints that
47
- * legitimately receive third-party POSTs (Stripe webhooks, GitHub
48
- * webhooks, OAuth callbacks). Defaults to enforced per `config.security.csrf`.
49
- *
50
- * Setting `csrf: false` only disables the per-route check — it does NOT
51
- * disable the global mode setting for other routes.
52
- */
53
- csrf?: false;
54
- handler: (ctx: {
55
- query: z.infer<TQuery>;
56
- body: z.infer<TBody>;
57
- params: z.infer<TParams>;
58
- request: Request;
59
- ctx: TCtx;
60
- }) => TResponse | Promise<TResponse>;
61
- }
62
-
63
14
  /**
64
15
  * Action wire-protocol accept mode per plan g3-server-actions-and-useaction
65
16
  * v1.2 ADR D1. Default behavior (when omitted) is `'json'`. `'form'` opts the
@@ -95,7 +46,31 @@ interface ActionConfig<TInput extends z.ZodType, TCtx = unknown> {
95
46
  }) => unknown;
96
47
  }
97
48
 
98
- type MiddlewareHandler = (request: Request, next: (request: Request) => Promise<Response>) => Response | Promise<Response>;
49
+ /**
50
+ * A middleware, as the framework's own builder produces it (usetheokit/theokit#345).
51
+ *
52
+ * `(request, context)`: read the request as a Web `Request`, decorate `context` for the route that
53
+ * follows, and RETURN a `Response` to answer the request yourself. Returning nothing continues to
54
+ * the next middleware, and then to the route.
55
+ *
56
+ * ## Why not `(request, next) => Response`
57
+ *
58
+ * That was this type's first shape, and it described a continuation pipeline nothing in this
59
+ * repository implements: the file-scan runner runs BEFORE routing, so it has no downstream
60
+ * `Response` to hand back from `next(request)`. The consequence was measured rather than
61
+ * theorised — `MiddlewareHandler` had **zero runtime consumers**, while `README.md` documented the
62
+ * builder that produces it as the way to write middleware. A published builder whose output nothing
63
+ * can call is worse than a missing one, because it reads as supported.
64
+ *
65
+ * This shape is the one that fits the model AND already runs: `executeWebRequest` has invoked
66
+ * `(request, context) => Response | void` since T3.2 (`http/web-middleware-runner.ts`). Adopting it
67
+ * here converges two of the three middleware contracts instead of adding a fourth.
68
+ *
69
+ * The Express-style `(req, res, next)` export keeps working in `server/middleware/*.ts`. It is
70
+ * Node-bound — which is why it cannot be the framework's contract — but evicting it would break
71
+ * every app that has one.
72
+ */
73
+ type MiddlewareHandler = (request: Request, context: Record<string, unknown>) => Response | undefined | void | Promise<Response | undefined | void>;
99
74
 
100
75
  /**
101
76
  * M31 Phase 3 — `route()`, the fluent builder that replaces `defineRoute({...})`.
@@ -133,6 +108,16 @@ interface RouteBuilder<TQuery extends z.ZodType = z.ZodUndefined, TBody extends
133
108
  status(code: number): RouteBuilder<TQuery, TBody, TParams, TCtx, TResponse, THandlerSet>;
134
109
  /** Opt out of CSRF enforcement for this route (webhooks / OAuth callbacks). */
135
110
  csrf(disabled: false): RouteBuilder<TQuery, TBody, TParams, TCtx, TResponse, THandlerSet>;
111
+ /**
112
+ * Declare who may call this route (ADR 0001). Required — the scanner refuses a
113
+ * route file whose HTTP export declares no policy, and `'public'` is a
114
+ * declaration rather than a default.
115
+ *
116
+ * The policy is evaluated by the Node executor, the Web executor and
117
+ * `callProcedure` from one implementation, so a browser, a desktop shell and a
118
+ * terminal all get the same answer.
119
+ */
120
+ policy(policy: RoutePolicy<z.infer<TQuery>, z.infer<TBody>, z.infer<TParams>>): RouteBuilder<TQuery, TBody, TParams, TCtx, TResponse, THandlerSet>;
136
121
  /**
137
122
  * Set the handler. Its `ctx` infers `query/body/params` from the schemas set above. Required
138
123
  * before `.build()`.
@@ -151,8 +136,9 @@ interface RouteBuilder<TQuery extends z.ZodType = z.ZodUndefined, TBody extends
151
136
  build(...guard: THandlerSet extends true ? [] : [error: MissingHandlerError]): RouteConfig<TQuery, TBody, TParams, TCtx, TResponse>;
152
137
  }
153
138
  /**
154
- * Start a fluent route definition. Chain `.query/.body/.params/.response/.status/.csrf` (all
155
- * optional), then `.handler()` (required) and `.build()` for the `RouteConfig`.
139
+ * Start a fluent route definition. Chain `.query/.body/.params/.response/.status/.csrf`, declare
140
+ * `.policy()` (which the route scanner requires), then `.handler()` and `.build()` for the
141
+ * `RouteConfig`.
156
142
  */
157
143
  declare function route(): RouteBuilder;
158
144
 
@@ -342,6 +328,14 @@ declare function tool<TName extends string>(name: TName): ToolBuilder<TName>;
342
328
  * .onRequest((ctx) => { ctx.ctx.requestId = crypto.randomUUID() })
343
329
  * .onResponse((ctx) => { ctx.response.setHeader('x-request-id', String(ctx.ctx.requestId)) })
344
330
  * .build()
331
+ *
332
+ * `ctx.request` is a Web `Request`, so `ctx.request.url` is ABSOLUTE. Match a path through `URL`,
333
+ * never with `startsWith('/…')` — that comparison is false for every real request, and a hook that
334
+ * never matches looks exactly like one with nothing to say:
335
+ *
336
+ * .onResponse((ctx) => {
337
+ * if (new URL(ctx.request.url).pathname.startsWith('/api/')) { … }
338
+ * })
345
339
  */
346
340
 
347
341
  /** The fluent plugin builder. `name` is set at entry; every hook is optional and may repeat. */
@@ -408,4 +402,4 @@ interface WebChannelHandler<TMessage = unknown> {
408
402
  */
409
403
  declare function defineWebChannel<TMessage = unknown>(handler: WebChannelHandler<TMessage>): WebChannelHandler<TMessage>;
410
404
 
411
- export { type ActionAccept, type ActionBuilder, type ActionConfig, type ChannelHandler, CustomTool, type MiddlewareBuilder, type MiddlewareHandler, type PluginBuilder, type RouteBuilder, type RouteConfig, type ToolBuilder, ToolTransform, type WebChannelHandler, type WebSocketBuilder, WebSocketHandler, WebSocketLike, action, defineChannel, defineWebChannel, middleware, plugin, route, tool, uiMessageStreamResponse, websocket };
405
+ export { type ActionAccept, type ActionBuilder, type ActionConfig, type ChannelHandler, CustomTool, type MiddlewareBuilder, type MiddlewareHandler, type PluginBuilder, type RouteBuilder, RouteConfig, RoutePolicy, type ToolBuilder, ToolTransform, type WebChannelHandler, type WebSocketBuilder, WebSocketHandler, WebSocketLike, action, defineChannel, defineWebChannel, middleware, plugin, route, tool, uiMessageStreamResponse, websocket };
@@ -8,7 +8,13 @@ import {
8
8
  tool,
9
9
  uiMessageStreamResponse,
10
10
  websocket
11
- } from "../../chunk-J5MXCGKA.js";
11
+ } from "../../chunk-DHAD2O3S.js";
12
+ import "../../chunk-D4VP2QPR.js";
13
+ import {
14
+ evaluateRoutePolicy,
15
+ requireOwner,
16
+ subjectFromContext
17
+ } from "../../chunk-YN4W7LCX.js";
12
18
  import {
13
19
  HEALTH_PATH,
14
20
  READY_PATH,
@@ -29,10 +35,13 @@ export {
29
35
  defineHealthRoute,
30
36
  defineReadyRoute,
31
37
  defineWebChannel,
38
+ evaluateRoutePolicy,
32
39
  middleware,
33
40
  plugin,
41
+ requireOwner,
34
42
  route,
35
43
  serveReservedRoute,
44
+ subjectFromContext,
36
45
  tool,
37
46
  uiMessageStreamResponse,
38
47
  websocket
@@ -1,11 +1,13 @@
1
- export { B as BATCH_PATH, a as BatchExecuteFn, b as BatchPathConflictError, c as BatchPayload, d as BatchRequestItem, e as BatchResponse, f as BatchResultItem, C as CookieOptions, g as CorsConfig, h as CorsHandler, i as CorsOrigin, j as CorsWebHandler, k as CustomErrorPages, E as ExecuteActionOptions, l as ExecuteRouteContext, H as HandleBatchOptions, M as MAX_ERROR_HTML_BYTES, m as MiddlewareResult, N as NotFoundError, S as STRIPPED_HEADERS, n as SendErrorInput, o as SendErrorOptions, T as TRACE_HEADER, p as TRACE_PARENT_HEADER, q as TheoError, _ as _resetMiddlewareCacheForTests, s as appendCookieToHeaders, t as appendDeleteCookieToHeaders, u as createCorsHandler, v as createCorsWebHandler, w as deleteCookie, x as envelopeCodeToStatus, y as executeAction, z as executeRoute, A as extractTraceId, D as extractTraceIdFromRequest, F as fromUnknown, G as getCookie, I as getCookieFromRequest, J as handleBatchRequest, K as handleRequestError, L as handleWebRequestError, P as loadCustomErrorPages, Q as matchesOrigin, R as parseCookieHeader, U as parseTraceparent, W as runMiddlewareAndContext, X as sendError, Y as sendJson, Z as serializeCookie, $ as serveStaticFile, a0 as serverErrorToEnvelope, a1 as setCookie } from '../../index-BEtEv6ZH.js';
1
+ export { A as ActionError, b as ActionInputError, B as BATCH_PATH, e as BatchExecuteFn, f as BatchPathConflictError, g as BatchPayload, h as BatchRequestItem, i as BatchResponse, j as BatchResultItem, C as CookieOptions, l as CorsConfig, m as CorsHandler, n as CorsOrigin, o as CorsWebHandler, p as CustomErrorPages, E as ExecuteActionOptions, q as ExecuteRouteContext, F as FileTooLargeError, H as HandleBatchOptions, M as MAX_ERROR_HTML_BYTES, r as MiddlewareResult, N as NotFoundError, t as ProcedureInputError, u as ProcedureOutputError, S as STRIPPED_HEADERS, y as SendErrorInput, z as SendErrorOptions, T as TRACE_HEADER, G as TRACE_PARENT_HEADER, I as TheoError, W as W3CTraceContext, _ as _resetMiddlewareCacheForTests, L as appendCookieToHeaders, Q as appendDeleteCookieToHeaders, V as callProcedure, X as createCorsHandler, Y as createCorsWebHandler, Z as createOpenApiHandler, $ as createServerContext, a0 as deleteCookie, a1 as envelopeCodeToStatus, a2 as executeAction, a3 as executeRoute, a4 as executeWebRequest, a5 as extractTraceId, a6 as extractTraceIdFromRequest, a7 as extractUniversalIssues, a8 as extractW3CTraceContext, a9 as fromUnknown, aa as getCookie, ab as getCookieFromRequest, ac as handleBatchRequest, ad as handleRequestError, ae as handleWebRequestError, af as isActionError, ag as isInputError, ah as jsonTransformer, ai as loadCustomErrorPages, aj as matchesOrigin, ak as parseCookieHeader, al as parseRequestBody, am as parseTraceparent, an as parseTraceparentContext, ao as resolveTransformer, ap as runMiddlewareAndContext, aq as sendError, ar as sendJson, as as serializeCookie, at as serveStaticFile, au as serverErrorToEnvelope, av as setCookie, aw as superjsonTransformer, ax as validateRouteInput } from '../../index-CzxtQcnp.js';
2
2
  import '../../error-envelope-DG47lt8E.js';
3
3
  import 'node:http';
4
- import '../../plugin-types-D69-lJZ9.js';
5
- import '../../plugin-runner-BFEcgtmJ.js';
4
+ import '../../plugin-types-BUVfUQ0V.js';
5
+ import '../../plugin-runner-BVMOSxvb.js';
6
6
  import '../../job-backend-CgC8Xf33.js';
7
- import '../../match-CfbEFRG4.js';
7
+ import '../../match-DmGgxjIU.js';
8
8
  import 'vite';
9
- import '../../csrf-BBrEZSBW.js';
9
+ import '../../csrf-Dgot9qSM.js';
10
10
  import '../../audit-log-BQWM5YLG.js';
11
11
  import 'zod';
12
+ import '../../route-config-Cm_ZMA1C.js';
13
+ import '../../route-policy-BxOycCDq.js';
@@ -1,34 +1,56 @@
1
1
  import {
2
2
  MAX_ERROR_HTML_BYTES,
3
+ ProcedureInputError,
4
+ ProcedureOutputError,
5
+ callProcedure,
6
+ createOpenApiHandler,
3
7
  loadCustomErrorPages,
4
8
  serveStaticFile
5
- } from "../../chunk-UW2TEAGR.js";
9
+ } from "../../chunk-ULDCFL2O.js";
6
10
  import {
11
+ jsonTransformer,
12
+ resolveTransformer,
13
+ superjsonTransformer
14
+ } from "../../chunk-OGLS76RN.js";
15
+ import {
16
+ ActionError,
17
+ ActionInputError,
7
18
  BATCH_PATH,
8
19
  BatchPathConflictError,
9
20
  STRIPPED_HEADERS,
10
- TRACE_HEADER,
11
- TRACE_PARENT_HEADER,
12
21
  _resetMiddlewareCacheForTests,
13
22
  createCorsHandler,
14
23
  createCorsWebHandler,
24
+ createServerContext,
15
25
  executeAction,
16
26
  executeRoute,
17
- extractTraceId,
18
- extractTraceIdFromRequest,
27
+ executeWebRequest,
28
+ extractUniversalIssues,
19
29
  handleBatchRequest,
20
30
  handleRequestError,
21
31
  handleWebRequestError,
32
+ isActionError,
33
+ isInputError,
22
34
  matchesOrigin,
23
- parseTraceparent,
24
35
  runMiddlewareAndContext,
25
36
  sendError,
26
- sendJson
27
- } from "../../chunk-XALU5LCU.js";
37
+ sendJson,
38
+ validateRouteInput
39
+ } from "../../chunk-RWNYIU6A.js";
28
40
  import "../../chunk-47FFT43U.js";
29
- import "../../chunk-KD5G3YXI.js";
30
- import "../../chunk-FB2HBNIC.js";
31
- import "../../chunk-OLGPYOLO.js";
41
+ import {
42
+ FileTooLargeError,
43
+ TRACE_HEADER,
44
+ TRACE_PARENT_HEADER,
45
+ extractTraceId,
46
+ extractTraceIdFromRequest,
47
+ extractW3CTraceContext,
48
+ parseRequestBody,
49
+ parseTraceparent,
50
+ parseTraceparentContext
51
+ } from "../../chunk-72DMJBXI.js";
52
+ import "../../chunk-BX6EUYHU.js";
53
+ import "../../chunk-P6OS7652.js";
32
54
  import "../../chunk-AVQU5CQF.js";
33
55
  import {
34
56
  envelopeCodeToStatus
@@ -49,12 +71,20 @@ import {
49
71
  serializeCookie,
50
72
  setCookie
51
73
  } from "../../chunk-4FWBKX6G.js";
74
+ import "../../chunk-ZWN3AODA.js";
75
+ import "../../chunk-D4VP2QPR.js";
76
+ import "../../chunk-YN4W7LCX.js";
52
77
  import "../../chunk-XTHN6JBX.js";
53
78
  export {
79
+ ActionError,
80
+ ActionInputError,
54
81
  BATCH_PATH,
55
82
  BatchPathConflictError,
83
+ FileTooLargeError,
56
84
  MAX_ERROR_HTML_BYTES,
57
85
  NotFoundError,
86
+ ProcedureInputError,
87
+ ProcedureOutputError,
58
88
  STRIPPED_HEADERS,
59
89
  TRACE_HEADER,
60
90
  TRACE_PARENT_HEADER,
@@ -62,30 +92,44 @@ export {
62
92
  _resetMiddlewareCacheForTests,
63
93
  appendCookieToHeaders,
64
94
  appendDeleteCookieToHeaders,
95
+ callProcedure,
65
96
  createCorsHandler,
66
97
  createCorsWebHandler,
98
+ createOpenApiHandler,
99
+ createServerContext,
67
100
  deleteCookie,
68
101
  envelopeCodeToStatus,
69
102
  executeAction,
70
103
  executeRoute,
104
+ executeWebRequest,
71
105
  extractTraceId,
72
106
  extractTraceIdFromRequest,
107
+ extractUniversalIssues,
108
+ extractW3CTraceContext,
73
109
  fromUnknown,
74
110
  getCookie,
75
111
  getCookieFromRequest,
76
112
  handleBatchRequest,
77
113
  handleRequestError,
78
114
  handleWebRequestError,
115
+ isActionError,
116
+ isInputError,
117
+ jsonTransformer,
79
118
  loadCustomErrorPages,
80
119
  matchesOrigin,
81
120
  parseCookieHeader,
121
+ parseRequestBody,
82
122
  parseTraceparent,
123
+ parseTraceparentContext,
124
+ resolveTransformer,
83
125
  runMiddlewareAndContext,
84
126
  sendError,
85
127
  sendJson,
86
128
  serializeCookie,
87
129
  serveStaticFile,
88
130
  serverErrorToEnvelope,
89
- setCookie
131
+ setCookie,
132
+ superjsonTransformer,
133
+ validateRouteInput
90
134
  };
91
135
  //# sourceMappingURL=index.js.map