tenjin-cli 0.1.0-alpha.34 → 0.1.0-alpha.35

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 (332) hide show
  1. package/NOTICE.md +30 -0
  2. package/README.md +20 -18
  3. package/dist/{_esm-MMYV66AX.js → _esm-2KST7HQ7.js} +4 -4
  4. package/dist/{alive-VOIL5W3I.js → alive-5TV22PNF.js} +13 -13
  5. package/dist/{auth-UHD3QFX4.js → auth-XI7BJFLW.js} +4 -4
  6. package/dist/balance-DFHC6XEU.js +71 -0
  7. package/dist/{ccip-CS7K5QRQ.js → ccip-HOW3DZYF.js} +3 -3
  8. package/dist/{chunk-RJ5HRPAZ.js → chunk-24XKUN2S.js} +68 -10
  9. package/dist/chunk-24XKUN2S.js.map +1 -0
  10. package/dist/chunk-2L7TDGLV.js +56 -0
  11. package/dist/chunk-2L7TDGLV.js.map +1 -0
  12. package/dist/{chunk-PZHBPGDE.js → chunk-34SAECKZ.js} +34 -10
  13. package/dist/chunk-34SAECKZ.js.map +1 -0
  14. package/dist/{chunk-EQZ2CCWC.js → chunk-3Y2EHT4F.js} +5 -2
  15. package/dist/chunk-3Y2EHT4F.js.map +1 -0
  16. package/dist/{chunk-FSYH7J75.js → chunk-3Y6BHIN6.js} +3 -3
  17. package/dist/{chunk-FZZWTDWP.js → chunk-3YPL6T3P.js} +6 -6
  18. package/dist/{chunk-JEZMWJEF.js → chunk-44MVIRZH.js} +4 -4
  19. package/dist/{chunk-27FIHFXF.js → chunk-45MMSBHA.js} +5 -5
  20. package/dist/{chunk-QXP3Z3JN.js → chunk-4MBCJFY4.js} +35 -3
  21. package/dist/chunk-4MBCJFY4.js.map +1 -0
  22. package/dist/chunk-4TPL54KW.js +227 -0
  23. package/dist/chunk-4TPL54KW.js.map +1 -0
  24. package/dist/{chunk-7JB6SYJX.js → chunk-54ELBTKE.js} +2 -2
  25. package/dist/{chunk-6J64MQFD.js → chunk-5F4OB5B3.js} +21 -15
  26. package/dist/chunk-5F4OB5B3.js.map +1 -0
  27. package/dist/{chunk-PYVQ74D5.js → chunk-5HN4KVQU.js} +189 -117
  28. package/dist/chunk-5HN4KVQU.js.map +1 -0
  29. package/dist/{chunk-VFKPIIV2.js → chunk-5J4E5GYI.js} +35 -32
  30. package/dist/chunk-5J4E5GYI.js.map +1 -0
  31. package/dist/chunk-5USBZ2MU.js +58 -0
  32. package/dist/chunk-5USBZ2MU.js.map +1 -0
  33. package/dist/chunk-64WOMNYR.js +183 -0
  34. package/dist/chunk-64WOMNYR.js.map +1 -0
  35. package/dist/{chunk-APWELUI7.js → chunk-65RS4LQS.js} +57 -43
  36. package/dist/chunk-65RS4LQS.js.map +1 -0
  37. package/dist/{chunk-HWZO6HYZ.js → chunk-6QMDUDF2.js} +3 -3
  38. package/dist/{chunk-FNBGRKS6.js → chunk-7V25UAQO.js} +2 -2
  39. package/dist/chunk-BGA4DO5M.js +719 -0
  40. package/dist/chunk-BGA4DO5M.js.map +1 -0
  41. package/dist/chunk-BVP7YK2J.js +706 -0
  42. package/dist/chunk-BVP7YK2J.js.map +1 -0
  43. package/dist/chunk-C265QIMJ.js +83 -0
  44. package/dist/chunk-C265QIMJ.js.map +1 -0
  45. package/dist/{chunk-MXN2ZEUB.js → chunk-D6M3ZK66.js} +2 -2
  46. package/dist/chunk-D6M3ZK66.js.map +1 -0
  47. package/dist/chunk-DJ36BM62.js +78 -0
  48. package/dist/chunk-DJ36BM62.js.map +1 -0
  49. package/dist/{chunk-JOKPBYXP.js → chunk-DTEWAVNE.js} +2 -2
  50. package/dist/chunk-F2KJAJ7T.js +13 -0
  51. package/dist/chunk-F2KJAJ7T.js.map +1 -0
  52. package/dist/{chunk-KAILF7QA.js → chunk-F43CV6UC.js} +2 -2
  53. package/dist/{chunk-ACO7ZCR2.js → chunk-FKVJKLPI.js} +2 -2
  54. package/dist/{chunk-43HLS2HM.js → chunk-FYFHH7V5.js} +54 -3
  55. package/dist/{chunk-43HLS2HM.js.map → chunk-FYFHH7V5.js.map} +1 -1
  56. package/dist/{chunk-2F5JUAHZ.js → chunk-GAJC4BQZ.js} +3 -3
  57. package/dist/{chunk-L7N73ZAW.js → chunk-HAZAN4UM.js} +2 -2
  58. package/dist/{chunk-6QJZA6EX.js → chunk-HI5XQOX2.js} +2 -2
  59. package/dist/{chunk-BOENA6XR.js → chunk-HKGUKAQW.js} +6 -6
  60. package/dist/{chunk-LJSCGIYH.js → chunk-HPRVFJPM.js} +2 -2
  61. package/dist/{chunk-OO6FIBL7.js → chunk-HZKANST2.js} +3 -6
  62. package/dist/chunk-HZKANST2.js.map +1 -0
  63. package/dist/{chunk-UVDJ5SSQ.js → chunk-I557SAOM.js} +8 -2
  64. package/dist/chunk-I557SAOM.js.map +1 -0
  65. package/dist/{chunk-SDUOJRSV.js → chunk-IGLWLH73.js} +3 -3
  66. package/dist/{chunk-3AKH7ODX.js → chunk-INSIW65E.js} +5 -5
  67. package/dist/{chunk-PNHNXUSL.js → chunk-IULCDMVG.js} +12 -1
  68. package/dist/chunk-IULCDMVG.js.map +1 -0
  69. package/dist/{chunk-JF4T4HCQ.js → chunk-IVNSUAVC.js} +10 -5
  70. package/dist/chunk-IVNSUAVC.js.map +1 -0
  71. package/dist/chunk-JDQZCREI.js +87 -0
  72. package/dist/chunk-JDQZCREI.js.map +1 -0
  73. package/dist/{chunk-2P3NJTHE.js → chunk-JHFFUVON.js} +23 -23
  74. package/dist/{chunk-7JVARP5R.js → chunk-JTILUN4W.js} +55 -29
  75. package/dist/{chunk-7JVARP5R.js.map → chunk-JTILUN4W.js.map} +1 -1
  76. package/dist/{chunk-2TO5F6CT.js → chunk-K5KNGC4I.js} +8 -8
  77. package/dist/{chunk-HUWTFKEM.js → chunk-KAQ4Q3TO.js} +3 -3
  78. package/dist/{chunk-E6VP6MQM.js → chunk-KGUE5AVX.js} +4 -4
  79. package/dist/chunk-KGUE5AVX.js.map +1 -0
  80. package/dist/{chunk-GS5RZF7U.js → chunk-KLDMLWXT.js} +2 -2
  81. package/dist/{chunk-HN2EN6P4.js → chunk-KNKDMTHU.js} +5 -5
  82. package/dist/chunk-LDA6TAYQ.js +95 -0
  83. package/dist/chunk-LDA6TAYQ.js.map +1 -0
  84. package/dist/chunk-LWSSIZOY.js +347 -0
  85. package/dist/chunk-LWSSIZOY.js.map +1 -0
  86. package/dist/{chunk-5VWQSCDO.js → chunk-MAHNZA6C.js} +89 -9
  87. package/dist/chunk-MAHNZA6C.js.map +1 -0
  88. package/dist/{chunk-46HAB26L.js → chunk-MEWZCIA6.js} +56 -9
  89. package/dist/chunk-MEWZCIA6.js.map +1 -0
  90. package/dist/{chunk-R2KMLONN.js → chunk-MJDO4EXD.js} +4 -4
  91. package/dist/{chunk-IHVUE3XF.js → chunk-NJA6NT3A.js} +3 -3
  92. package/dist/{chunk-TSIID2LV.js → chunk-ODRPASFP.js} +375 -1166
  93. package/dist/chunk-ODRPASFP.js.map +1 -0
  94. package/dist/{chunk-S3JKF3IK.js → chunk-OJJFANO6.js} +3 -3
  95. package/dist/{chunk-56SOPRM2.js → chunk-OQWPRFAC.js} +344 -4
  96. package/dist/chunk-OQWPRFAC.js.map +1 -0
  97. package/dist/{chunk-QEZZDIQT.js → chunk-P6YQWIT2.js} +4053 -4039
  98. package/dist/chunk-P6YQWIT2.js.map +1 -0
  99. package/dist/{chunk-GGGEGMWC.js → chunk-Q6RSJCXB.js} +9 -9
  100. package/dist/{chunk-OTIUEUIS.js → chunk-QKEUKBRK.js} +7 -7
  101. package/dist/{chunk-X52BVGCJ.js → chunk-QQDPRTLP.js} +5 -5
  102. package/dist/chunk-QQYCYAKI.js +79 -0
  103. package/dist/chunk-QQYCYAKI.js.map +1 -0
  104. package/dist/chunk-R4KDH477.js +1064 -0
  105. package/dist/chunk-R4KDH477.js.map +1 -0
  106. package/dist/{chunk-6AQSUBNR.js → chunk-RGCPELQN.js} +2 -2
  107. package/dist/{chunk-AXODGQ23.js → chunk-RGVCOG2S.js} +9 -2
  108. package/dist/{chunk-AXODGQ23.js.map → chunk-RGVCOG2S.js.map} +1 -1
  109. package/dist/chunk-SOLNJ3AZ.js +209 -0
  110. package/dist/chunk-SOLNJ3AZ.js.map +1 -0
  111. package/dist/{chunk-LQ33RLHL.js → chunk-TFT2X7SH.js} +3 -3
  112. package/dist/chunk-TVWCLUBI.js +293 -0
  113. package/dist/chunk-TVWCLUBI.js.map +1 -0
  114. package/dist/{chunk-VH7JMLTG.js → chunk-UIB33QQP.js} +25 -16
  115. package/dist/chunk-UIB33QQP.js.map +1 -0
  116. package/dist/chunk-V6GIVALQ.js +1889 -0
  117. package/dist/chunk-V6GIVALQ.js.map +1 -0
  118. package/dist/{chunk-IVHGQNIN.js → chunk-VHXCPXUS.js} +8 -8
  119. package/dist/{chunk-7DW7GAM6.js → chunk-VU6GMWF6.js} +2 -2
  120. package/dist/chunk-VWZYE3NC.js +8415 -0
  121. package/dist/chunk-VWZYE3NC.js.map +1 -0
  122. package/dist/{chunk-3X4GOMXT.js → chunk-W2GXIARJ.js} +12 -7
  123. package/dist/chunk-W2GXIARJ.js.map +1 -0
  124. package/dist/chunk-W4G3K3V7.js +288 -0
  125. package/dist/chunk-W4G3K3V7.js.map +1 -0
  126. package/dist/{chunk-FHXTEVO7.js → chunk-W74LJ5OT.js} +21 -28
  127. package/dist/chunk-W74LJ5OT.js.map +1 -0
  128. package/dist/{chunk-FOEPH67T.js → chunk-W7ELYLYK.js} +1 -74
  129. package/dist/chunk-W7ELYLYK.js.map +1 -0
  130. package/dist/{chunk-YU3DLVSQ.js → chunk-XSCGUO2U.js} +5 -5
  131. package/dist/{chunk-EPCIJLLU.js → chunk-XWROSMI5.js} +9 -9
  132. package/dist/{chunk-HMT6L65V.js → chunk-YJGEVBKZ.js} +4 -4
  133. package/dist/{chunk-7U3P4PB7.js → chunk-ZEYA2WWX.js} +4 -4
  134. package/dist/chunk-ZEYA2WWX.js.map +1 -0
  135. package/dist/chunk-ZRC7Z5X3.js +82 -0
  136. package/dist/chunk-ZRC7Z5X3.js.map +1 -0
  137. package/dist/{chunk-I47ARU5G.js → chunk-ZS7JIUJ3.js} +2 -2
  138. package/dist/{claude-cli-2YKABJJZ.js → claude-cli-GIIHOBGT.js} +4 -2
  139. package/dist/claude-install-BAUSJMW3.js +64 -0
  140. package/dist/{cli-BFDKEX53.js → cli-QY4KKA3D.js} +116 -49
  141. package/dist/cli-QY4KKA3D.js.map +1 -0
  142. package/dist/{client-XMWEKXX7.js → client-3YQKORVK.js} +4 -4
  143. package/dist/{codex-host-B6NAUWL6.js → codex-host-ZON3S6HU.js} +5 -5
  144. package/dist/{codex-install-GTGO5FYN.js → codex-install-HZV2DOAB.js} +62 -47
  145. package/dist/codex-install-HZV2DOAB.js.map +1 -0
  146. package/dist/{config-THJANIU5.js → config-QZOBMTEL.js} +18 -18
  147. package/dist/{config-names-JU54HYWY.js → config-names-Z5NZD5R2.js} +18 -18
  148. package/dist/{config-rules-VNU23RL4.js → config-rules-YOYHS6YL.js} +19 -19
  149. package/dist/config-subagents-WQV2ZAD5.js +362 -0
  150. package/dist/config-subagents-WQV2ZAD5.js.map +1 -0
  151. package/dist/{connect-HPWS7U63.js → connect-YDWTYU4B.js} +28 -27
  152. package/dist/{connect-HPWS7U63.js.map → connect-YDWTYU4B.js.map} +1 -1
  153. package/dist/core-0a66n3e7-TTP554XV.js +127 -0
  154. package/dist/core-0a66n3e7-TTP554XV.js.map +1 -0
  155. package/dist/core-0bmnpbz2-C2JIRVZO.js +10790 -0
  156. package/dist/core-0bmnpbz2-C2JIRVZO.js.map +1 -0
  157. package/dist/core-9je8ee1j-74DGHWPV.js +30 -0
  158. package/dist/core-9je8ee1j-74DGHWPV.js.map +1 -0
  159. package/dist/core-wadgcjfh-TSZFQZGH.js +666 -0
  160. package/dist/core-wadgcjfh-TSZFQZGH.js.map +1 -0
  161. package/dist/core-zg882d22-LKV5DZYW.js +37 -0
  162. package/dist/core-zg882d22-LKV5DZYW.js.map +1 -0
  163. package/dist/{decision-JIIHDTOF.js → decision-QSKHOGCO.js} +6 -6
  164. package/dist/{doctor-4MMHBRDU.js → doctor-ZWJXRD75.js} +67 -66
  165. package/dist/doctor-ZWJXRD75.js.map +1 -0
  166. package/dist/{explicit-AGENAX6E.js → explicit-ME2NRADQ.js} +45 -42
  167. package/dist/{explicit-AGENAX6E.js.map → explicit-ME2NRADQ.js.map} +1 -1
  168. package/dist/flush-stdio-NYIJ3QXT.js +18 -0
  169. package/dist/{fund-MLXUH24Q.js → fund-VF7TLDJH.js} +110 -34
  170. package/dist/fund-VF7TLDJH.js.map +1 -0
  171. package/dist/{hook-command-UB7FOEUL.js → hook-command-VZ27MGWO.js} +21 -20
  172. package/dist/hosts/claude/.claude-plugin/marketplace.json +2 -2
  173. package/dist/hosts/claude/tenjin/.claude-plugin/plugin.json +2 -2
  174. package/dist/hosts/claude/tenjin/hooks/hook-data.ts +152 -0
  175. package/dist/hosts/claude/tenjin/hooks/hooks.json +7 -0
  176. package/dist/hosts/claude/tenjin/hooks/model-viewer.tsx +2987 -0
  177. package/dist/hosts/claude/tenjin/hooks/register.tsx +265 -30
  178. package/dist/hosts/claude/tenjin/skills/tenjin-pay/SKILL.md +14 -4
  179. package/dist/hosts/claude/tenjin/types/index.d.ts +133 -0
  180. package/dist/{hosts-WNQKYKP2.js → hosts-3EMTVM4H.js} +5 -3
  181. package/dist/index.js +16 -13
  182. package/dist/index.js.map +1 -1
  183. package/dist/{install-Q5SHHEDH.js → install-ZA7L2UF3.js} +34 -30
  184. package/dist/{install-funding-EGSW2KEP.js → install-funding-JDGYTF72.js} +9 -13
  185. package/dist/{install-identity-OID43B4D.js → install-identity-FFAYEFLX.js} +8 -8
  186. package/dist/{install-wallet-TZFWY5GK.js → install-wallet-2SFOVE3Q.js} +48 -33
  187. package/dist/{install-wallet-TZFWY5GK.js.map → install-wallet-2SFOVE3Q.js.map} +1 -1
  188. package/dist/mcp-36S6MK3C.js +67642 -0
  189. package/dist/mcp-36S6MK3C.js.map +1 -0
  190. package/dist/new-install-5L4GY3LN.js +51 -0
  191. package/dist/{package-NRHU7HBR.js → package-BONDXSV3.js} +2 -2
  192. package/dist/{passphrase-3JEVW5XG.js → passphrase-T4ULBN4M.js} +4 -4
  193. package/dist/{pay-I47AIUQR.js → pay-CMV5KL74.js} +37 -30
  194. package/dist/{payments-A5FNI5GN.js → payments-Z6UBZL4Z.js} +10 -10
  195. package/dist/reclaim-subagent-credit-ABSF67SJ.js +105 -0
  196. package/dist/reclaim-subagent-credit-ABSF67SJ.js.map +1 -0
  197. package/dist/{routing-quote-QQW2I5MH.js → routing-quote-AHLAREXR.js} +16 -18
  198. package/dist/{run-4SHEOBIU.js → run-JH7ELYAM.js} +41 -38
  199. package/dist/{runtime-BABJMHY7.js → runtime-2GX4ALJP.js} +12 -12
  200. package/dist/{runtime-activate-N6VLQI2C.js → runtime-activate-IDQ2NCSP.js} +9 -9
  201. package/dist/{runtime-launchers-GMAUICRW.js → runtime-launchers-YAPKCBHV.js} +7 -7
  202. package/dist/{runtime-place-DOEWFTF3.js → runtime-place-4POL4KK4.js} +3 -3
  203. package/dist/{send-ECXS6JEO.js → send-ELXFKEKY.js} +17 -17
  204. package/dist/{status-AHE5HSR7.js → status-FXUFWJDM.js} +89 -36
  205. package/dist/status-FXUFWJDM.js.map +1 -0
  206. package/dist/{status-line-63XFJAXR.js → status-line-IH5JBWBC.js} +11 -11
  207. package/dist/{streamableHttp-Z3YF6LTQ.js → streamableHttp-CP2ZQBIK.js} +4 -4
  208. package/dist/{uninstall-YGQPRCVY.js → uninstall-LJZUKM4D.js} +42 -38
  209. package/dist/{uninstall-YGQPRCVY.js.map → uninstall-LJZUKM4D.js.map} +1 -1
  210. package/dist/{update-GTLMLFA3.js → update-EUIX72IX.js} +34 -30
  211. package/dist/{usage-FCWP2CHO.js → usage-EKDC7LUC.js} +13 -13
  212. package/dist/{usdc-25RNBYYR.js → usdc-YIHK2OMC.js} +5 -5
  213. package/dist/{viemAdapter-By13KInL-3CG63XDX.js → viemAdapter-By13KInL-PRLSIESK.js} +2 -2
  214. package/dist/viemAdapter-By13KInL-PRLSIESK.js.map +1 -0
  215. package/dist/wallet-HSW757W6.js +80 -0
  216. package/dist/wallet-HSW757W6.js.map +1 -0
  217. package/docs/agent-permissions.md +19 -11
  218. package/docs/router-reference.md +21 -12
  219. package/docs/safety-model.md +4 -2
  220. package/docs/subagents-internals.md +97 -0
  221. package/docs/subagents.md +348 -0
  222. package/package.json +4 -1
  223. package/dist/balance-RQW5T5FB.js +0 -55
  224. package/dist/chunk-3X4GOMXT.js.map +0 -1
  225. package/dist/chunk-46HAB26L.js.map +0 -1
  226. package/dist/chunk-56SOPRM2.js.map +0 -1
  227. package/dist/chunk-5VWQSCDO.js.map +0 -1
  228. package/dist/chunk-6J64MQFD.js.map +0 -1
  229. package/dist/chunk-7U3P4PB7.js.map +0 -1
  230. package/dist/chunk-APWELUI7.js.map +0 -1
  231. package/dist/chunk-E6VP6MQM.js.map +0 -1
  232. package/dist/chunk-EQZ2CCWC.js.map +0 -1
  233. package/dist/chunk-FHXTEVO7.js.map +0 -1
  234. package/dist/chunk-FOEPH67T.js.map +0 -1
  235. package/dist/chunk-IVXPIIZJ.js +0 -91
  236. package/dist/chunk-IVXPIIZJ.js.map +0 -1
  237. package/dist/chunk-JF4T4HCQ.js.map +0 -1
  238. package/dist/chunk-LPQNZKSG.js +0 -269
  239. package/dist/chunk-LPQNZKSG.js.map +0 -1
  240. package/dist/chunk-MXN2ZEUB.js.map +0 -1
  241. package/dist/chunk-OO6FIBL7.js.map +0 -1
  242. package/dist/chunk-PNHNXUSL.js.map +0 -1
  243. package/dist/chunk-PYVQ74D5.js.map +0 -1
  244. package/dist/chunk-PZHBPGDE.js.map +0 -1
  245. package/dist/chunk-QEZZDIQT.js.map +0 -1
  246. package/dist/chunk-QXP3Z3JN.js.map +0 -1
  247. package/dist/chunk-RJ5HRPAZ.js.map +0 -1
  248. package/dist/chunk-TSIID2LV.js.map +0 -1
  249. package/dist/chunk-UVDJ5SSQ.js.map +0 -1
  250. package/dist/chunk-VFKPIIV2.js.map +0 -1
  251. package/dist/chunk-VH7JMLTG.js.map +0 -1
  252. package/dist/claude-install-7CVYQ73E.js +0 -60
  253. package/dist/cli-BFDKEX53.js.map +0 -1
  254. package/dist/codex-install-GTGO5FYN.js.map +0 -1
  255. package/dist/doctor-4MMHBRDU.js.map +0 -1
  256. package/dist/fund-MLXUH24Q.js.map +0 -1
  257. package/dist/mcp-CC3H7LFO.js +0 -3655
  258. package/dist/mcp-CC3H7LFO.js.map +0 -1
  259. package/dist/status-AHE5HSR7.js.map +0 -1
  260. package/dist/wallet-CJGEHP2Q.js +0 -64
  261. /package/dist/{_esm-MMYV66AX.js.map → _esm-2KST7HQ7.js.map} +0 -0
  262. /package/dist/{alive-VOIL5W3I.js.map → alive-5TV22PNF.js.map} +0 -0
  263. /package/dist/{auth-UHD3QFX4.js.map → auth-XI7BJFLW.js.map} +0 -0
  264. /package/dist/{balance-RQW5T5FB.js.map → balance-DFHC6XEU.js.map} +0 -0
  265. /package/dist/{ccip-CS7K5QRQ.js.map → ccip-HOW3DZYF.js.map} +0 -0
  266. /package/dist/{chunk-FSYH7J75.js.map → chunk-3Y6BHIN6.js.map} +0 -0
  267. /package/dist/{chunk-FZZWTDWP.js.map → chunk-3YPL6T3P.js.map} +0 -0
  268. /package/dist/{chunk-JEZMWJEF.js.map → chunk-44MVIRZH.js.map} +0 -0
  269. /package/dist/{chunk-27FIHFXF.js.map → chunk-45MMSBHA.js.map} +0 -0
  270. /package/dist/{chunk-7JB6SYJX.js.map → chunk-54ELBTKE.js.map} +0 -0
  271. /package/dist/{chunk-HWZO6HYZ.js.map → chunk-6QMDUDF2.js.map} +0 -0
  272. /package/dist/{chunk-FNBGRKS6.js.map → chunk-7V25UAQO.js.map} +0 -0
  273. /package/dist/{chunk-JOKPBYXP.js.map → chunk-DTEWAVNE.js.map} +0 -0
  274. /package/dist/{chunk-KAILF7QA.js.map → chunk-F43CV6UC.js.map} +0 -0
  275. /package/dist/{chunk-ACO7ZCR2.js.map → chunk-FKVJKLPI.js.map} +0 -0
  276. /package/dist/{chunk-2F5JUAHZ.js.map → chunk-GAJC4BQZ.js.map} +0 -0
  277. /package/dist/{chunk-L7N73ZAW.js.map → chunk-HAZAN4UM.js.map} +0 -0
  278. /package/dist/{chunk-6QJZA6EX.js.map → chunk-HI5XQOX2.js.map} +0 -0
  279. /package/dist/{chunk-BOENA6XR.js.map → chunk-HKGUKAQW.js.map} +0 -0
  280. /package/dist/{chunk-LJSCGIYH.js.map → chunk-HPRVFJPM.js.map} +0 -0
  281. /package/dist/{chunk-SDUOJRSV.js.map → chunk-IGLWLH73.js.map} +0 -0
  282. /package/dist/{chunk-3AKH7ODX.js.map → chunk-INSIW65E.js.map} +0 -0
  283. /package/dist/{chunk-2P3NJTHE.js.map → chunk-JHFFUVON.js.map} +0 -0
  284. /package/dist/{chunk-2TO5F6CT.js.map → chunk-K5KNGC4I.js.map} +0 -0
  285. /package/dist/{chunk-HUWTFKEM.js.map → chunk-KAQ4Q3TO.js.map} +0 -0
  286. /package/dist/{chunk-GS5RZF7U.js.map → chunk-KLDMLWXT.js.map} +0 -0
  287. /package/dist/{chunk-HN2EN6P4.js.map → chunk-KNKDMTHU.js.map} +0 -0
  288. /package/dist/{chunk-R2KMLONN.js.map → chunk-MJDO4EXD.js.map} +0 -0
  289. /package/dist/{chunk-IHVUE3XF.js.map → chunk-NJA6NT3A.js.map} +0 -0
  290. /package/dist/{chunk-S3JKF3IK.js.map → chunk-OJJFANO6.js.map} +0 -0
  291. /package/dist/{chunk-GGGEGMWC.js.map → chunk-Q6RSJCXB.js.map} +0 -0
  292. /package/dist/{chunk-OTIUEUIS.js.map → chunk-QKEUKBRK.js.map} +0 -0
  293. /package/dist/{chunk-X52BVGCJ.js.map → chunk-QQDPRTLP.js.map} +0 -0
  294. /package/dist/{chunk-6AQSUBNR.js.map → chunk-RGCPELQN.js.map} +0 -0
  295. /package/dist/{chunk-LQ33RLHL.js.map → chunk-TFT2X7SH.js.map} +0 -0
  296. /package/dist/{chunk-IVHGQNIN.js.map → chunk-VHXCPXUS.js.map} +0 -0
  297. /package/dist/{chunk-7DW7GAM6.js.map → chunk-VU6GMWF6.js.map} +0 -0
  298. /package/dist/{chunk-YU3DLVSQ.js.map → chunk-XSCGUO2U.js.map} +0 -0
  299. /package/dist/{chunk-EPCIJLLU.js.map → chunk-XWROSMI5.js.map} +0 -0
  300. /package/dist/{chunk-HMT6L65V.js.map → chunk-YJGEVBKZ.js.map} +0 -0
  301. /package/dist/{chunk-I47ARU5G.js.map → chunk-ZS7JIUJ3.js.map} +0 -0
  302. /package/dist/{claude-cli-2YKABJJZ.js.map → claude-cli-GIIHOBGT.js.map} +0 -0
  303. /package/dist/{claude-install-7CVYQ73E.js.map → claude-install-BAUSJMW3.js.map} +0 -0
  304. /package/dist/{client-XMWEKXX7.js.map → client-3YQKORVK.js.map} +0 -0
  305. /package/dist/{codex-host-B6NAUWL6.js.map → codex-host-ZON3S6HU.js.map} +0 -0
  306. /package/dist/{config-THJANIU5.js.map → config-QZOBMTEL.js.map} +0 -0
  307. /package/dist/{config-names-JU54HYWY.js.map → config-names-Z5NZD5R2.js.map} +0 -0
  308. /package/dist/{config-rules-VNU23RL4.js.map → config-rules-YOYHS6YL.js.map} +0 -0
  309. /package/dist/{decision-JIIHDTOF.js.map → decision-QSKHOGCO.js.map} +0 -0
  310. /package/dist/{hook-command-UB7FOEUL.js.map → flush-stdio-NYIJ3QXT.js.map} +0 -0
  311. /package/dist/{hosts-WNQKYKP2.js.map → hook-command-VZ27MGWO.js.map} +0 -0
  312. /package/dist/{install-Q5SHHEDH.js.map → hosts-3EMTVM4H.js.map} +0 -0
  313. /package/dist/{install-funding-EGSW2KEP.js.map → install-ZA7L2UF3.js.map} +0 -0
  314. /package/dist/{install-identity-OID43B4D.js.map → install-funding-JDGYTF72.js.map} +0 -0
  315. /package/dist/{package-NRHU7HBR.js.map → install-identity-FFAYEFLX.js.map} +0 -0
  316. /package/dist/{passphrase-3JEVW5XG.js.map → new-install-5L4GY3LN.js.map} +0 -0
  317. /package/dist/{pay-I47AIUQR.js.map → package-BONDXSV3.js.map} +0 -0
  318. /package/dist/{routing-quote-QQW2I5MH.js.map → passphrase-T4ULBN4M.js.map} +0 -0
  319. /package/dist/{run-4SHEOBIU.js.map → pay-CMV5KL74.js.map} +0 -0
  320. /package/dist/{payments-A5FNI5GN.js.map → payments-Z6UBZL4Z.js.map} +0 -0
  321. /package/dist/{runtime-activate-N6VLQI2C.js.map → routing-quote-AHLAREXR.js.map} +0 -0
  322. /package/dist/{runtime-launchers-GMAUICRW.js.map → run-JH7ELYAM.js.map} +0 -0
  323. /package/dist/{runtime-BABJMHY7.js.map → runtime-2GX4ALJP.js.map} +0 -0
  324. /package/dist/{runtime-place-DOEWFTF3.js.map → runtime-activate-IDQ2NCSP.js.map} +0 -0
  325. /package/dist/{update-GTLMLFA3.js.map → runtime-launchers-YAPKCBHV.js.map} +0 -0
  326. /package/dist/{usdc-25RNBYYR.js.map → runtime-place-4POL4KK4.js.map} +0 -0
  327. /package/dist/{send-ECXS6JEO.js.map → send-ELXFKEKY.js.map} +0 -0
  328. /package/dist/{status-line-63XFJAXR.js.map → status-line-IH5JBWBC.js.map} +0 -0
  329. /package/dist/{streamableHttp-Z3YF6LTQ.js.map → streamableHttp-CP2ZQBIK.js.map} +0 -0
  330. /package/dist/{viemAdapter-By13KInL-3CG63XDX.js.map → update-EUIX72IX.js.map} +0 -0
  331. /package/dist/{usage-FCWP2CHO.js.map → usage-EKDC7LUC.js.map} +0 -0
  332. /package/dist/{wallet-CJGEHP2Q.js.map → usdc-YIHK2OMC.js.map} +0 -0
@@ -0,0 +1,1064 @@
1
+ import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
+ import {
3
+ require_ajv,
4
+ require_applicator,
5
+ require_codegen,
6
+ require_compile,
7
+ require_core,
8
+ require_core2,
9
+ require_dependencies,
10
+ require_discriminator,
11
+ require_dist,
12
+ require_format,
13
+ require_metadata,
14
+ require_names,
15
+ require_ref,
16
+ require_ref_error,
17
+ require_util,
18
+ require_validate,
19
+ require_validation,
20
+ require_validation_error
21
+ } from "./chunk-QKYUCITR.js";
22
+ import {
23
+ mask
24
+ } from "./chunk-7SLOTLO7.js";
25
+ import {
26
+ __commonJS,
27
+ __toESM
28
+ } from "./chunk-ZXTAQYNA.js";
29
+
30
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js
31
+ var require_dynamicAnchor = __commonJS({
32
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports) {
33
+ "use strict";
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.dynamicAnchor = void 0;
36
+ var codegen_1 = require_codegen();
37
+ var names_1 = require_names();
38
+ var compile_1 = require_compile();
39
+ var ref_1 = require_ref();
40
+ var def = {
41
+ keyword: "$dynamicAnchor",
42
+ schemaType: "string",
43
+ code: (cxt) => dynamicAnchor(cxt, cxt.schema)
44
+ };
45
+ function dynamicAnchor(cxt, anchor) {
46
+ const { gen, it } = cxt;
47
+ it.schemaEnv.root.dynamicAnchors[anchor] = true;
48
+ const v = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`;
49
+ const validate = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt);
50
+ gen.if((0, codegen_1._)`!${v}`, () => gen.assign(v, validate));
51
+ }
52
+ exports.dynamicAnchor = dynamicAnchor;
53
+ function _getValidate(cxt) {
54
+ const { schemaEnv, schema, self } = cxt.it;
55
+ const { root, baseId, localRefs, meta } = schemaEnv.root;
56
+ const { schemaId } = self.opts;
57
+ const sch = new compile_1.SchemaEnv({ schema, schemaId, root, baseId, localRefs, meta });
58
+ compile_1.compileSchema.call(self, sch);
59
+ return (0, ref_1.getValidate)(cxt, sch);
60
+ }
61
+ exports.default = def;
62
+ }
63
+ });
64
+
65
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js
66
+ var require_dynamicRef = __commonJS({
67
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports) {
68
+ "use strict";
69
+ Object.defineProperty(exports, "__esModule", { value: true });
70
+ exports.dynamicRef = void 0;
71
+ var codegen_1 = require_codegen();
72
+ var names_1 = require_names();
73
+ var ref_1 = require_ref();
74
+ var def = {
75
+ keyword: "$dynamicRef",
76
+ schemaType: "string",
77
+ code: (cxt) => dynamicRef(cxt, cxt.schema)
78
+ };
79
+ function dynamicRef(cxt, ref) {
80
+ const { gen, keyword, it } = cxt;
81
+ if (ref[0] !== "#")
82
+ throw new Error(`"${keyword}" only supports hash fragment reference`);
83
+ const anchor = ref.slice(1);
84
+ if (it.allErrors) {
85
+ _dynamicRef();
86
+ } else {
87
+ const valid = gen.let("valid", false);
88
+ _dynamicRef(valid);
89
+ cxt.ok(valid);
90
+ }
91
+ function _dynamicRef(valid) {
92
+ if (it.schemaEnv.root.dynamicAnchors[anchor]) {
93
+ const v = gen.let("_v", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`);
94
+ gen.if(v, _callRef(v, valid), _callRef(it.validateName, valid));
95
+ } else {
96
+ _callRef(it.validateName, valid)();
97
+ }
98
+ }
99
+ function _callRef(validate, valid) {
100
+ return valid ? () => gen.block(() => {
101
+ (0, ref_1.callRef)(cxt, validate);
102
+ gen.let(valid, true);
103
+ }) : () => (0, ref_1.callRef)(cxt, validate);
104
+ }
105
+ }
106
+ exports.dynamicRef = dynamicRef;
107
+ exports.default = def;
108
+ }
109
+ });
110
+
111
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js
112
+ var require_recursiveAnchor = __commonJS({
113
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports) {
114
+ "use strict";
115
+ Object.defineProperty(exports, "__esModule", { value: true });
116
+ var dynamicAnchor_1 = require_dynamicAnchor();
117
+ var util_1 = require_util();
118
+ var def = {
119
+ keyword: "$recursiveAnchor",
120
+ schemaType: "boolean",
121
+ code(cxt) {
122
+ if (cxt.schema)
123
+ (0, dynamicAnchor_1.dynamicAnchor)(cxt, "");
124
+ else
125
+ (0, util_1.checkStrictMode)(cxt.it, "$recursiveAnchor: false is ignored");
126
+ }
127
+ };
128
+ exports.default = def;
129
+ }
130
+ });
131
+
132
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js
133
+ var require_recursiveRef = __commonJS({
134
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports) {
135
+ "use strict";
136
+ Object.defineProperty(exports, "__esModule", { value: true });
137
+ var dynamicRef_1 = require_dynamicRef();
138
+ var def = {
139
+ keyword: "$recursiveRef",
140
+ schemaType: "string",
141
+ code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema)
142
+ };
143
+ exports.default = def;
144
+ }
145
+ });
146
+
147
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js
148
+ var require_dynamic = __commonJS({
149
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports) {
150
+ "use strict";
151
+ Object.defineProperty(exports, "__esModule", { value: true });
152
+ var dynamicAnchor_1 = require_dynamicAnchor();
153
+ var dynamicRef_1 = require_dynamicRef();
154
+ var recursiveAnchor_1 = require_recursiveAnchor();
155
+ var recursiveRef_1 = require_recursiveRef();
156
+ var dynamic = [dynamicAnchor_1.default, dynamicRef_1.default, recursiveAnchor_1.default, recursiveRef_1.default];
157
+ exports.default = dynamic;
158
+ }
159
+ });
160
+
161
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js
162
+ var require_dependentRequired = __commonJS({
163
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports) {
164
+ "use strict";
165
+ Object.defineProperty(exports, "__esModule", { value: true });
166
+ var dependencies_1 = require_dependencies();
167
+ var def = {
168
+ keyword: "dependentRequired",
169
+ type: "object",
170
+ schemaType: "object",
171
+ error: dependencies_1.error,
172
+ code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt)
173
+ };
174
+ exports.default = def;
175
+ }
176
+ });
177
+
178
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js
179
+ var require_dependentSchemas = __commonJS({
180
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports) {
181
+ "use strict";
182
+ Object.defineProperty(exports, "__esModule", { value: true });
183
+ var dependencies_1 = require_dependencies();
184
+ var def = {
185
+ keyword: "dependentSchemas",
186
+ type: "object",
187
+ schemaType: "object",
188
+ code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt)
189
+ };
190
+ exports.default = def;
191
+ }
192
+ });
193
+
194
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js
195
+ var require_limitContains = __commonJS({
196
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports) {
197
+ "use strict";
198
+ Object.defineProperty(exports, "__esModule", { value: true });
199
+ var util_1 = require_util();
200
+ var def = {
201
+ keyword: ["maxContains", "minContains"],
202
+ type: "array",
203
+ schemaType: "number",
204
+ code({ keyword, parentSchema, it }) {
205
+ if (parentSchema.contains === void 0) {
206
+ (0, util_1.checkStrictMode)(it, `"${keyword}" without "contains" is ignored`);
207
+ }
208
+ }
209
+ };
210
+ exports.default = def;
211
+ }
212
+ });
213
+
214
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js
215
+ var require_next = __commonJS({
216
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js"(exports) {
217
+ "use strict";
218
+ Object.defineProperty(exports, "__esModule", { value: true });
219
+ var dependentRequired_1 = require_dependentRequired();
220
+ var dependentSchemas_1 = require_dependentSchemas();
221
+ var limitContains_1 = require_limitContains();
222
+ var next = [dependentRequired_1.default, dependentSchemas_1.default, limitContains_1.default];
223
+ exports.default = next;
224
+ }
225
+ });
226
+
227
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js
228
+ var require_unevaluatedProperties = __commonJS({
229
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports) {
230
+ "use strict";
231
+ Object.defineProperty(exports, "__esModule", { value: true });
232
+ var codegen_1 = require_codegen();
233
+ var util_1 = require_util();
234
+ var names_1 = require_names();
235
+ var error = {
236
+ message: "must NOT have unevaluated properties",
237
+ params: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}`
238
+ };
239
+ var def = {
240
+ keyword: "unevaluatedProperties",
241
+ type: "object",
242
+ schemaType: ["boolean", "object"],
243
+ trackErrors: true,
244
+ error,
245
+ code(cxt) {
246
+ const { gen, schema, data, errsCount, it } = cxt;
247
+ if (!errsCount)
248
+ throw new Error("ajv implementation error");
249
+ const { allErrors, props } = it;
250
+ if (props instanceof codegen_1.Name) {
251
+ gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));
252
+ } else if (props !== true) {
253
+ gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));
254
+ }
255
+ it.props = true;
256
+ cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
257
+ function unevaluatedPropCode(key) {
258
+ if (schema === false) {
259
+ cxt.setParams({ unevaluatedProperty: key });
260
+ cxt.error();
261
+ if (!allErrors)
262
+ gen.break();
263
+ return;
264
+ }
265
+ if (!(0, util_1.alwaysValidSchema)(it, schema)) {
266
+ const valid = gen.name("valid");
267
+ cxt.subschema({
268
+ keyword: "unevaluatedProperties",
269
+ dataProp: key,
270
+ dataPropType: util_1.Type.Str
271
+ }, valid);
272
+ if (!allErrors)
273
+ gen.if((0, codegen_1.not)(valid), () => gen.break());
274
+ }
275
+ }
276
+ function unevaluatedDynamic(evaluatedProps, key) {
277
+ return (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`;
278
+ }
279
+ function unevaluatedStatic(evaluatedProps, key) {
280
+ const ps = [];
281
+ for (const p in evaluatedProps) {
282
+ if (evaluatedProps[p] === true)
283
+ ps.push((0, codegen_1._)`${key} !== ${p}`);
284
+ }
285
+ return (0, codegen_1.and)(...ps);
286
+ }
287
+ }
288
+ };
289
+ exports.default = def;
290
+ }
291
+ });
292
+
293
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js
294
+ var require_unevaluatedItems = __commonJS({
295
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports) {
296
+ "use strict";
297
+ Object.defineProperty(exports, "__esModule", { value: true });
298
+ var codegen_1 = require_codegen();
299
+ var util_1 = require_util();
300
+ var error = {
301
+ message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
302
+ params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
303
+ };
304
+ var def = {
305
+ keyword: "unevaluatedItems",
306
+ type: "array",
307
+ schemaType: ["boolean", "object"],
308
+ error,
309
+ code(cxt) {
310
+ const { gen, schema, data, it } = cxt;
311
+ const items = it.items || 0;
312
+ if (items === true)
313
+ return;
314
+ const len = gen.const("len", (0, codegen_1._)`${data}.length`);
315
+ if (schema === false) {
316
+ cxt.setParams({ len: items });
317
+ cxt.fail((0, codegen_1._)`${len} > ${items}`);
318
+ } else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
319
+ const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`);
320
+ gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items));
321
+ cxt.ok(valid);
322
+ }
323
+ it.items = true;
324
+ function validateItems(valid, from) {
325
+ gen.forRange("i", from, len, (i) => {
326
+ cxt.subschema({ keyword: "unevaluatedItems", dataProp: i, dataPropType: util_1.Type.Num }, valid);
327
+ if (!it.allErrors)
328
+ gen.if((0, codegen_1.not)(valid), () => gen.break());
329
+ });
330
+ }
331
+ }
332
+ };
333
+ exports.default = def;
334
+ }
335
+ });
336
+
337
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js
338
+ var require_unevaluated = __commonJS({
339
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports) {
340
+ "use strict";
341
+ Object.defineProperty(exports, "__esModule", { value: true });
342
+ var unevaluatedProperties_1 = require_unevaluatedProperties();
343
+ var unevaluatedItems_1 = require_unevaluatedItems();
344
+ var unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default];
345
+ exports.default = unevaluated;
346
+ }
347
+ });
348
+
349
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js
350
+ var require_draft2020 = __commonJS({
351
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js"(exports) {
352
+ "use strict";
353
+ Object.defineProperty(exports, "__esModule", { value: true });
354
+ var core_1 = require_core2();
355
+ var validation_1 = require_validation();
356
+ var applicator_1 = require_applicator();
357
+ var dynamic_1 = require_dynamic();
358
+ var next_1 = require_next();
359
+ var unevaluated_1 = require_unevaluated();
360
+ var format_1 = require_format();
361
+ var metadata_1 = require_metadata();
362
+ var draft2020Vocabularies = [
363
+ dynamic_1.default,
364
+ core_1.default,
365
+ validation_1.default,
366
+ (0, applicator_1.default)(true),
367
+ format_1.default,
368
+ metadata_1.metadataVocabulary,
369
+ metadata_1.contentVocabulary,
370
+ next_1.default,
371
+ unevaluated_1.default
372
+ ];
373
+ exports.default = draft2020Vocabularies;
374
+ }
375
+ });
376
+
377
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json
378
+ var require_schema = __commonJS({
379
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports, module) {
380
+ module.exports = {
381
+ $schema: "https://json-schema.org/draft/2020-12/schema",
382
+ $id: "https://json-schema.org/draft/2020-12/schema",
383
+ $vocabulary: {
384
+ "https://json-schema.org/draft/2020-12/vocab/core": true,
385
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true,
386
+ "https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
387
+ "https://json-schema.org/draft/2020-12/vocab/validation": true,
388
+ "https://json-schema.org/draft/2020-12/vocab/meta-data": true,
389
+ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
390
+ "https://json-schema.org/draft/2020-12/vocab/content": true
391
+ },
392
+ $dynamicAnchor: "meta",
393
+ title: "Core and Validation specifications meta-schema",
394
+ allOf: [
395
+ { $ref: "meta/core" },
396
+ { $ref: "meta/applicator" },
397
+ { $ref: "meta/unevaluated" },
398
+ { $ref: "meta/validation" },
399
+ { $ref: "meta/meta-data" },
400
+ { $ref: "meta/format-annotation" },
401
+ { $ref: "meta/content" }
402
+ ],
403
+ type: ["object", "boolean"],
404
+ $comment: "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
405
+ properties: {
406
+ definitions: {
407
+ $comment: '"definitions" has been replaced by "$defs".',
408
+ type: "object",
409
+ additionalProperties: { $dynamicRef: "#meta" },
410
+ deprecated: true,
411
+ default: {}
412
+ },
413
+ dependencies: {
414
+ $comment: '"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',
415
+ type: "object",
416
+ additionalProperties: {
417
+ anyOf: [{ $dynamicRef: "#meta" }, { $ref: "meta/validation#/$defs/stringArray" }]
418
+ },
419
+ deprecated: true,
420
+ default: {}
421
+ },
422
+ $recursiveAnchor: {
423
+ $comment: '"$recursiveAnchor" has been replaced by "$dynamicAnchor".',
424
+ $ref: "meta/core#/$defs/anchorString",
425
+ deprecated: true
426
+ },
427
+ $recursiveRef: {
428
+ $comment: '"$recursiveRef" has been replaced by "$dynamicRef".',
429
+ $ref: "meta/core#/$defs/uriReferenceString",
430
+ deprecated: true
431
+ }
432
+ }
433
+ };
434
+ }
435
+ });
436
+
437
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json
438
+ var require_applicator2 = __commonJS({
439
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports, module) {
440
+ module.exports = {
441
+ $schema: "https://json-schema.org/draft/2020-12/schema",
442
+ $id: "https://json-schema.org/draft/2020-12/meta/applicator",
443
+ $vocabulary: {
444
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true
445
+ },
446
+ $dynamicAnchor: "meta",
447
+ title: "Applicator vocabulary meta-schema",
448
+ type: ["object", "boolean"],
449
+ properties: {
450
+ prefixItems: { $ref: "#/$defs/schemaArray" },
451
+ items: { $dynamicRef: "#meta" },
452
+ contains: { $dynamicRef: "#meta" },
453
+ additionalProperties: { $dynamicRef: "#meta" },
454
+ properties: {
455
+ type: "object",
456
+ additionalProperties: { $dynamicRef: "#meta" },
457
+ default: {}
458
+ },
459
+ patternProperties: {
460
+ type: "object",
461
+ additionalProperties: { $dynamicRef: "#meta" },
462
+ propertyNames: { format: "regex" },
463
+ default: {}
464
+ },
465
+ dependentSchemas: {
466
+ type: "object",
467
+ additionalProperties: { $dynamicRef: "#meta" },
468
+ default: {}
469
+ },
470
+ propertyNames: { $dynamicRef: "#meta" },
471
+ if: { $dynamicRef: "#meta" },
472
+ then: { $dynamicRef: "#meta" },
473
+ else: { $dynamicRef: "#meta" },
474
+ allOf: { $ref: "#/$defs/schemaArray" },
475
+ anyOf: { $ref: "#/$defs/schemaArray" },
476
+ oneOf: { $ref: "#/$defs/schemaArray" },
477
+ not: { $dynamicRef: "#meta" }
478
+ },
479
+ $defs: {
480
+ schemaArray: {
481
+ type: "array",
482
+ minItems: 1,
483
+ items: { $dynamicRef: "#meta" }
484
+ }
485
+ }
486
+ };
487
+ }
488
+ });
489
+
490
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json
491
+ var require_unevaluated2 = __commonJS({
492
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports, module) {
493
+ module.exports = {
494
+ $schema: "https://json-schema.org/draft/2020-12/schema",
495
+ $id: "https://json-schema.org/draft/2020-12/meta/unevaluated",
496
+ $vocabulary: {
497
+ "https://json-schema.org/draft/2020-12/vocab/unevaluated": true
498
+ },
499
+ $dynamicAnchor: "meta",
500
+ title: "Unevaluated applicator vocabulary meta-schema",
501
+ type: ["object", "boolean"],
502
+ properties: {
503
+ unevaluatedItems: { $dynamicRef: "#meta" },
504
+ unevaluatedProperties: { $dynamicRef: "#meta" }
505
+ }
506
+ };
507
+ }
508
+ });
509
+
510
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json
511
+ var require_content = __commonJS({
512
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports, module) {
513
+ module.exports = {
514
+ $schema: "https://json-schema.org/draft/2020-12/schema",
515
+ $id: "https://json-schema.org/draft/2020-12/meta/content",
516
+ $vocabulary: {
517
+ "https://json-schema.org/draft/2020-12/vocab/content": true
518
+ },
519
+ $dynamicAnchor: "meta",
520
+ title: "Content vocabulary meta-schema",
521
+ type: ["object", "boolean"],
522
+ properties: {
523
+ contentEncoding: { type: "string" },
524
+ contentMediaType: { type: "string" },
525
+ contentSchema: { $dynamicRef: "#meta" }
526
+ }
527
+ };
528
+ }
529
+ });
530
+
531
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json
532
+ var require_core3 = __commonJS({
533
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports, module) {
534
+ module.exports = {
535
+ $schema: "https://json-schema.org/draft/2020-12/schema",
536
+ $id: "https://json-schema.org/draft/2020-12/meta/core",
537
+ $vocabulary: {
538
+ "https://json-schema.org/draft/2020-12/vocab/core": true
539
+ },
540
+ $dynamicAnchor: "meta",
541
+ title: "Core vocabulary meta-schema",
542
+ type: ["object", "boolean"],
543
+ properties: {
544
+ $id: {
545
+ $ref: "#/$defs/uriReferenceString",
546
+ $comment: "Non-empty fragments not allowed.",
547
+ pattern: "^[^#]*#?$"
548
+ },
549
+ $schema: { $ref: "#/$defs/uriString" },
550
+ $ref: { $ref: "#/$defs/uriReferenceString" },
551
+ $anchor: { $ref: "#/$defs/anchorString" },
552
+ $dynamicRef: { $ref: "#/$defs/uriReferenceString" },
553
+ $dynamicAnchor: { $ref: "#/$defs/anchorString" },
554
+ $vocabulary: {
555
+ type: "object",
556
+ propertyNames: { $ref: "#/$defs/uriString" },
557
+ additionalProperties: {
558
+ type: "boolean"
559
+ }
560
+ },
561
+ $comment: {
562
+ type: "string"
563
+ },
564
+ $defs: {
565
+ type: "object",
566
+ additionalProperties: { $dynamicRef: "#meta" }
567
+ }
568
+ },
569
+ $defs: {
570
+ anchorString: {
571
+ type: "string",
572
+ pattern: "^[A-Za-z_][-A-Za-z0-9._]*$"
573
+ },
574
+ uriString: {
575
+ type: "string",
576
+ format: "uri"
577
+ },
578
+ uriReferenceString: {
579
+ type: "string",
580
+ format: "uri-reference"
581
+ }
582
+ }
583
+ };
584
+ }
585
+ });
586
+
587
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json
588
+ var require_format_annotation = __commonJS({
589
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports, module) {
590
+ module.exports = {
591
+ $schema: "https://json-schema.org/draft/2020-12/schema",
592
+ $id: "https://json-schema.org/draft/2020-12/meta/format-annotation",
593
+ $vocabulary: {
594
+ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true
595
+ },
596
+ $dynamicAnchor: "meta",
597
+ title: "Format vocabulary meta-schema for annotation results",
598
+ type: ["object", "boolean"],
599
+ properties: {
600
+ format: { type: "string" }
601
+ }
602
+ };
603
+ }
604
+ });
605
+
606
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json
607
+ var require_meta_data = __commonJS({
608
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports, module) {
609
+ module.exports = {
610
+ $schema: "https://json-schema.org/draft/2020-12/schema",
611
+ $id: "https://json-schema.org/draft/2020-12/meta/meta-data",
612
+ $vocabulary: {
613
+ "https://json-schema.org/draft/2020-12/vocab/meta-data": true
614
+ },
615
+ $dynamicAnchor: "meta",
616
+ title: "Meta-data vocabulary meta-schema",
617
+ type: ["object", "boolean"],
618
+ properties: {
619
+ title: {
620
+ type: "string"
621
+ },
622
+ description: {
623
+ type: "string"
624
+ },
625
+ default: true,
626
+ deprecated: {
627
+ type: "boolean",
628
+ default: false
629
+ },
630
+ readOnly: {
631
+ type: "boolean",
632
+ default: false
633
+ },
634
+ writeOnly: {
635
+ type: "boolean",
636
+ default: false
637
+ },
638
+ examples: {
639
+ type: "array",
640
+ items: true
641
+ }
642
+ }
643
+ };
644
+ }
645
+ });
646
+
647
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json
648
+ var require_validation2 = __commonJS({
649
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports, module) {
650
+ module.exports = {
651
+ $schema: "https://json-schema.org/draft/2020-12/schema",
652
+ $id: "https://json-schema.org/draft/2020-12/meta/validation",
653
+ $vocabulary: {
654
+ "https://json-schema.org/draft/2020-12/vocab/validation": true
655
+ },
656
+ $dynamicAnchor: "meta",
657
+ title: "Validation vocabulary meta-schema",
658
+ type: ["object", "boolean"],
659
+ properties: {
660
+ type: {
661
+ anyOf: [
662
+ { $ref: "#/$defs/simpleTypes" },
663
+ {
664
+ type: "array",
665
+ items: { $ref: "#/$defs/simpleTypes" },
666
+ minItems: 1,
667
+ uniqueItems: true
668
+ }
669
+ ]
670
+ },
671
+ const: true,
672
+ enum: {
673
+ type: "array",
674
+ items: true
675
+ },
676
+ multipleOf: {
677
+ type: "number",
678
+ exclusiveMinimum: 0
679
+ },
680
+ maximum: {
681
+ type: "number"
682
+ },
683
+ exclusiveMaximum: {
684
+ type: "number"
685
+ },
686
+ minimum: {
687
+ type: "number"
688
+ },
689
+ exclusiveMinimum: {
690
+ type: "number"
691
+ },
692
+ maxLength: { $ref: "#/$defs/nonNegativeInteger" },
693
+ minLength: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
694
+ pattern: {
695
+ type: "string",
696
+ format: "regex"
697
+ },
698
+ maxItems: { $ref: "#/$defs/nonNegativeInteger" },
699
+ minItems: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
700
+ uniqueItems: {
701
+ type: "boolean",
702
+ default: false
703
+ },
704
+ maxContains: { $ref: "#/$defs/nonNegativeInteger" },
705
+ minContains: {
706
+ $ref: "#/$defs/nonNegativeInteger",
707
+ default: 1
708
+ },
709
+ maxProperties: { $ref: "#/$defs/nonNegativeInteger" },
710
+ minProperties: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
711
+ required: { $ref: "#/$defs/stringArray" },
712
+ dependentRequired: {
713
+ type: "object",
714
+ additionalProperties: {
715
+ $ref: "#/$defs/stringArray"
716
+ }
717
+ }
718
+ },
719
+ $defs: {
720
+ nonNegativeInteger: {
721
+ type: "integer",
722
+ minimum: 0
723
+ },
724
+ nonNegativeIntegerDefault0: {
725
+ $ref: "#/$defs/nonNegativeInteger",
726
+ default: 0
727
+ },
728
+ simpleTypes: {
729
+ enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
730
+ },
731
+ stringArray: {
732
+ type: "array",
733
+ items: { type: "string" },
734
+ uniqueItems: true,
735
+ default: []
736
+ }
737
+ }
738
+ };
739
+ }
740
+ });
741
+
742
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js
743
+ var require_json_schema_2020_12 = __commonJS({
744
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports) {
745
+ "use strict";
746
+ Object.defineProperty(exports, "__esModule", { value: true });
747
+ var metaSchema = require_schema();
748
+ var applicator = require_applicator2();
749
+ var unevaluated = require_unevaluated2();
750
+ var content = require_content();
751
+ var core = require_core3();
752
+ var format = require_format_annotation();
753
+ var metadata = require_meta_data();
754
+ var validation = require_validation2();
755
+ var META_SUPPORT_DATA = ["/properties"];
756
+ function addMetaSchema2020($data) {
757
+ ;
758
+ [
759
+ metaSchema,
760
+ applicator,
761
+ unevaluated,
762
+ content,
763
+ core,
764
+ with$data(this, format),
765
+ metadata,
766
+ with$data(this, validation)
767
+ ].forEach((sch) => this.addMetaSchema(sch, void 0, false));
768
+ return this;
769
+ function with$data(ajv, sch) {
770
+ return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;
771
+ }
772
+ }
773
+ exports.default = addMetaSchema2020;
774
+ }
775
+ });
776
+
777
+ // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js
778
+ var require__ = __commonJS({
779
+ "node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js"(exports, module) {
780
+ "use strict";
781
+ Object.defineProperty(exports, "__esModule", { value: true });
782
+ exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0;
783
+ var core_1 = require_core();
784
+ var draft2020_1 = require_draft2020();
785
+ var discriminator_1 = require_discriminator();
786
+ var json_schema_2020_12_1 = require_json_schema_2020_12();
787
+ var META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema";
788
+ var Ajv20202 = class extends core_1.default {
789
+ constructor(opts = {}) {
790
+ super({
791
+ ...opts,
792
+ dynamicRef: true,
793
+ next: true,
794
+ unevaluated: true
795
+ });
796
+ }
797
+ _addVocabularies() {
798
+ super._addVocabularies();
799
+ draft2020_1.default.forEach((v) => this.addVocabulary(v));
800
+ if (this.opts.discriminator)
801
+ this.addKeyword(discriminator_1.default);
802
+ }
803
+ _addDefaultMetaSchema() {
804
+ super._addDefaultMetaSchema();
805
+ const { $data, meta } = this.opts;
806
+ if (!meta)
807
+ return;
808
+ json_schema_2020_12_1.default.call(this, $data);
809
+ this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
810
+ }
811
+ defaultMeta() {
812
+ return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
813
+ }
814
+ };
815
+ exports.Ajv2020 = Ajv20202;
816
+ module.exports = exports = Ajv20202;
817
+ module.exports.Ajv2020 = Ajv20202;
818
+ Object.defineProperty(exports, "__esModule", { value: true });
819
+ exports.default = Ajv20202;
820
+ var validate_1 = require_validate();
821
+ Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
822
+ return validate_1.KeywordCxt;
823
+ } });
824
+ var codegen_1 = require_codegen();
825
+ Object.defineProperty(exports, "_", { enumerable: true, get: function() {
826
+ return codegen_1._;
827
+ } });
828
+ Object.defineProperty(exports, "str", { enumerable: true, get: function() {
829
+ return codegen_1.str;
830
+ } });
831
+ Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
832
+ return codegen_1.stringify;
833
+ } });
834
+ Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
835
+ return codegen_1.nil;
836
+ } });
837
+ Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
838
+ return codegen_1.Name;
839
+ } });
840
+ Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
841
+ return codegen_1.CodeGen;
842
+ } });
843
+ var validation_error_1 = require_validation_error();
844
+ Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() {
845
+ return validation_error_1.default;
846
+ } });
847
+ var ref_error_1 = require_ref_error();
848
+ Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() {
849
+ return ref_error_1.default;
850
+ } });
851
+ }
852
+ });
853
+
854
+ // src/lib/request-schema.ts
855
+ var import_ajv = __toESM(require_ajv(), 1);
856
+ var import__ = __toESM(require__(), 1);
857
+ var import_ajv_formats = __toESM(require_dist(), 1);
858
+ import { createHash } from "node:crypto";
859
+ var MAX_SCHEMA_BYTES = 96 * 1024;
860
+ var MAX_VALUE_BYTES = 64 * 1024;
861
+ var MAX_BODY_BYTES = 4 * 1024 * 1024;
862
+ var MAX_DEPTH = 24;
863
+ var VALIDATOR_CACHE_LIMIT = 128;
864
+ var DRAFT_07 = "http://json-schema.org/draft-07/schema#";
865
+ function stable(value) {
866
+ if (Array.isArray(value)) return `[${value.map(stable).join(",")}]`;
867
+ if (value !== null && typeof value === "object") {
868
+ const object = value;
869
+ return `{${Object.keys(object).sort().map((key) => `${JSON.stringify(key)}:${stable(object[key])}`).join(",")}}`;
870
+ }
871
+ return JSON.stringify(value) ?? "null";
872
+ }
873
+ function canonicalHash(value) {
874
+ return createHash("sha256").update(stable(value)).digest("hex");
875
+ }
876
+ function walk(value, schemaMode, depth = 0) {
877
+ if (depth > MAX_DEPTH) throw new Error("Schema or value exceeds the nesting limit.");
878
+ if (Array.isArray(value)) {
879
+ for (const entry of value) walk(entry, schemaMode, depth + 1);
880
+ return;
881
+ }
882
+ if (value === null || typeof value !== "object") return;
883
+ for (const [key, entry] of Object.entries(value)) {
884
+ if (["__proto__", "constructor", "prototype"].includes(key)) {
885
+ throw new Error(`Forbidden object key: ${key}`);
886
+ }
887
+ if (schemaMode && key === "$ref" && typeof entry === "string" && !entry.startsWith("#/")) {
888
+ throw new Error("Remote or recursive schema references are unsupported.");
889
+ }
890
+ if (schemaMode && (key === "pattern" && typeof entry === "string" || key === "patternProperties")) {
891
+ throw new Error("Regular-expression schema constraints are unsupported.");
892
+ }
893
+ walk(entry, schemaMode, depth + 1);
894
+ }
895
+ }
896
+ var validators = /* @__PURE__ */ new Map();
897
+ function compile(schema, { allErrors = false, ignoreUnknown = false, project = false } = {}) {
898
+ if (Buffer.byteLength(stable(schema)) > MAX_SCHEMA_BYTES) {
899
+ throw new Error("Schema exceeds its size limit.");
900
+ }
901
+ const key = `${canonicalHash(schema)}${allErrors ? ":all" : ""}${ignoreUnknown ? ":lenient" : ""}${project ? ":project" : ""}`;
902
+ const cached = validators.get(key);
903
+ if (cached !== void 0) return cached;
904
+ walk(schema, true);
905
+ const options = {
906
+ strict: true,
907
+ strictTypes: false,
908
+ strictTuples: false,
909
+ strictRequired: false,
910
+ ...ignoreUnknown ? { strictSchema: false, logger: false } : {},
911
+ allErrors,
912
+ validateFormats: true,
913
+ coerceTypes: false,
914
+ useDefaults: false,
915
+ removeAdditional: project ? "all" : false,
916
+ allowUnionTypes: true
917
+ };
918
+ const ajv = schema.$schema === DRAFT_07 ? new import_ajv.default(options) : new import__.default(options);
919
+ if (!ajv.getSchema(DRAFT_07)) ajv.addMetaSchema({ $id: DRAFT_07 });
920
+ (0, import_ajv_formats.default)(ajv);
921
+ const compiled = ajv.compile(schema);
922
+ if (validators.size >= VALIDATOR_CACHE_LIMIT) {
923
+ validators.delete(validators.keys().next().value);
924
+ }
925
+ validators.set(key, compiled);
926
+ return compiled;
927
+ }
928
+ function checkValue(schema, value) {
929
+ try {
930
+ if (schema === null || typeof schema !== "object" || Array.isArray(schema)) {
931
+ throw new Error("A schema must be a JSON Schema object.");
932
+ }
933
+ const validate = compile(schema);
934
+ if (validate(value)) return { valid: true, errors: [] };
935
+ return {
936
+ valid: false,
937
+ errors: (validate.errors ?? []).map(
938
+ (e) => `${e.instancePath || "/"} ${e.message ?? "invalid"}`
939
+ )
940
+ };
941
+ } catch (err) {
942
+ return { valid: false, errors: [err instanceof Error ? err.message : String(err)] };
943
+ }
944
+ }
945
+ function withoutPatterns(value) {
946
+ if (Array.isArray(value)) return value.map(withoutPatterns);
947
+ if (value === null || typeof value !== "object") return value;
948
+ return Object.fromEntries(
949
+ Object.entries(value).filter(
950
+ ([key, entry]) => !(key === "pattern" && typeof entry === "string") && key !== "patternProperties"
951
+ ).map(([key, entry]) => [key, withoutPatterns(entry)])
952
+ );
953
+ }
954
+ function describeProblem(error) {
955
+ const at = error.instancePath.replace(/^\//, "").replaceAll("/", ".");
956
+ const field = (name) => at ? `${at}.${name}` : name;
957
+ const subject = at || "the input";
958
+ const { params } = error;
959
+ switch (error.keyword) {
960
+ case "required":
961
+ return `${field(String(params.missingProperty))} is required`;
962
+ case "additionalProperties":
963
+ return `${subject} has no field ${JSON.stringify(params.additionalProperty)}`;
964
+ case "enum":
965
+ return `${subject} must be one of ${params.allowedValues.map((v) => JSON.stringify(v)).join(", ")}`;
966
+ case "const":
967
+ return `${subject} must be ${JSON.stringify(params.allowedValue)}`;
968
+ case "type":
969
+ return `${subject} must be ${String(params.type)}`;
970
+ default:
971
+ return `${subject} ${error.message ?? "is invalid"}`;
972
+ }
973
+ }
974
+ function inputProblems(schema, value) {
975
+ if (schema === null || typeof schema !== "object" || Array.isArray(schema)) return void 0;
976
+ let validate;
977
+ try {
978
+ validate = compile(withoutPatterns(schema), {
979
+ allErrors: true,
980
+ ignoreUnknown: true
981
+ });
982
+ } catch {
983
+ return void 0;
984
+ }
985
+ try {
986
+ const json = JSON.stringify(value);
987
+ if (json === void 0 || Buffer.byteLength(json) > MAX_VALUE_BYTES) {
988
+ return ["the input is not JSON, or exceeds its size limit"];
989
+ }
990
+ walk(value, false);
991
+ } catch (err) {
992
+ return [err instanceof Error ? err.message : String(err)];
993
+ }
994
+ if (validate(value)) return [];
995
+ return [...new Set((validate.errors ?? []).map(describeProblem))];
996
+ }
997
+ function assertResultSchema(schema) {
998
+ if (schema === null || typeof schema !== "object" || Array.isArray(schema)) {
999
+ throw new Error("A result success schema must be a JSON Schema object.");
1000
+ }
1001
+ compile(schema);
1002
+ }
1003
+ function preview(body) {
1004
+ const flat = mask(body).replace(/\s+/g, " ").trim();
1005
+ return flat.length <= 300 ? flat : `${flat.slice(0, 300)}\u2026`;
1006
+ }
1007
+ function validateResultBody(schema, body) {
1008
+ const bytes = Buffer.byteLength(body);
1009
+ const base = () => ({ json: false, bytes, maxBytes: MAX_BODY_BYTES, preview: preview(body) });
1010
+ if (bytes > MAX_BODY_BYTES) {
1011
+ return {
1012
+ valid: false,
1013
+ unvalidated: true,
1014
+ reason: `The result is ${bytes} bytes, over the ${MAX_BODY_BYTES} byte validation limit, so its success schema was not checked.`,
1015
+ diagnosis: { ...base(), failed: "too-large" }
1016
+ };
1017
+ }
1018
+ let value;
1019
+ try {
1020
+ value = JSON.parse(body);
1021
+ walk(value, false);
1022
+ } catch (err) {
1023
+ return {
1024
+ valid: false,
1025
+ reason: `The result is not a supported bounded JSON document (${err instanceof Error ? err.message : String(err)}).`,
1026
+ diagnosis: { ...base(), failed: "not-json" }
1027
+ };
1028
+ }
1029
+ const check = checkValue(schema, value);
1030
+ if (check.valid) return { valid: true };
1031
+ const failed = check.errors[0] ?? "the success rule";
1032
+ return {
1033
+ valid: false,
1034
+ reason: `The result does not satisfy its success schema: ${failed}`,
1035
+ diagnosis: { ...base(), json: true, failed }
1036
+ };
1037
+ }
1038
+ function projectBody(schema, body) {
1039
+ if (schema === null || typeof schema !== "object" || Array.isArray(schema)) return void 0;
1040
+ if (Buffer.byteLength(body) > MAX_BODY_BYTES) return void 0;
1041
+ try {
1042
+ const value = JSON.parse(body);
1043
+ walk(value, false);
1044
+ const project = compile(withoutPatterns(schema), {
1045
+ allErrors: true,
1046
+ ignoreUnknown: true,
1047
+ project: true
1048
+ });
1049
+ project(value);
1050
+ return { value };
1051
+ } catch {
1052
+ return void 0;
1053
+ }
1054
+ }
1055
+
1056
+ export {
1057
+ stable,
1058
+ canonicalHash,
1059
+ inputProblems,
1060
+ assertResultSchema,
1061
+ validateResultBody,
1062
+ projectBody
1063
+ };
1064
+ //# sourceMappingURL=chunk-R4KDH477.js.map