@harrylabsj/kiwi-merchant-cloud 0.12.6 → 0.12.8

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 (1292) hide show
  1. package/app/a2a/access/workbuddy-address.d.ts +45 -0
  2. package/app/a2a/access/workbuddy-address.js +88 -0
  3. package/app/a2a/access/workbuddy-address.js.map +1 -0
  4. package/app/a2a/client/client.d.ts +6 -0
  5. package/app/a2a/client/client.js +27 -2
  6. package/app/a2a/client/client.js.map +1 -1
  7. package/app/a2a/client/types.d.ts +5 -0
  8. package/app/a2a/server/server.d.ts +5 -0
  9. package/app/a2a/server/server.js +10 -2
  10. package/app/a2a/server/server.js.map +1 -1
  11. package/app/agent/merchant/merchant-client.js +2 -1
  12. package/app/agent/merchant/merchant-client.js.map +1 -1
  13. package/app/buyer-core/a2a-knp.d.ts +18 -1
  14. package/app/buyer-core/a2a-knp.js +29 -5
  15. package/app/buyer-core/a2a-knp.js.map +1 -1
  16. package/app/buyer-core/a2a-negotiator.d.ts +4 -0
  17. package/app/buyer-core/a2a-negotiator.js +3 -0
  18. package/app/buyer-core/a2a-negotiator.js.map +1 -1
  19. package/app/buyer-core/a2a-quote-fetcher.d.ts +47 -0
  20. package/app/buyer-core/a2a-quote-fetcher.js +109 -11
  21. package/app/buyer-core/a2a-quote-fetcher.js.map +1 -1
  22. package/app/buyer-core/build-service.d.ts +7 -0
  23. package/app/buyer-core/build-service.js +67 -0
  24. package/app/buyer-core/build-service.js.map +1 -1
  25. package/app/buyer-core/merchant-index.js +3 -0
  26. package/app/buyer-core/merchant-index.js.map +1 -1
  27. package/app/buyer-core/protocol-recovery.js +7 -0
  28. package/app/buyer-core/protocol-recovery.js.map +1 -1
  29. package/app/buyer-core/service.d.ts +14 -0
  30. package/app/buyer-core/service.js.map +1 -1
  31. package/app/cloud/access/workbuddy-share-link.d.ts +92 -0
  32. package/app/cloud/access/workbuddy-share-link.js +150 -0
  33. package/app/cloud/access/workbuddy-share-link.js.map +1 -0
  34. package/app/cloud/bootstrap.js +33 -0
  35. package/app/cloud/bootstrap.js.map +1 -1
  36. package/app/cloud/catalog-client.d.ts +66 -0
  37. package/app/cloud/catalog-client.js +155 -0
  38. package/app/cloud/catalog-client.js.map +1 -1
  39. package/app/cloud/config.d.ts +6 -0
  40. package/app/cloud/config.js +4 -0
  41. package/app/cloud/config.js.map +1 -1
  42. package/app/cloud/connect-service.d.ts +68 -0
  43. package/app/cloud/connect-service.js +198 -0
  44. package/app/cloud/connect-service.js.map +1 -1
  45. package/app/cloud/http-router.d.ts +5 -0
  46. package/app/cloud/http-router.js +7 -0
  47. package/app/cloud/http-router.js.map +1 -1
  48. package/app/cloud-sample/products.json +3 -3
  49. package/app/discovery/catalog-source/kiwi-record.d.ts +10 -0
  50. package/app/discovery/catalog-source/kiwi-record.js.map +1 -1
  51. package/app/discovery/catalog-source/merchant-access.d.ts +77 -0
  52. package/app/discovery/catalog-source/merchant-access.js +279 -0
  53. package/app/discovery/catalog-source/merchant-access.js.map +1 -0
  54. package/app/http/merchant-management/api.d.ts +21 -0
  55. package/app/http/merchant-management/api.js +79 -0
  56. package/app/http/merchant-management/api.js.map +1 -1
  57. package/app/http/merchant-management/page.js +81 -1
  58. package/app/http/merchant-management/page.js.map +1 -1
  59. package/app/merchant-runtime/manager.d.ts +13 -1
  60. package/app/merchant-runtime/manager.js +19 -3
  61. package/app/merchant-runtime/manager.js.map +1 -1
  62. package/app/tools/trusted-buyer-keys.d.ts +31 -0
  63. package/app/tools/trusted-buyer-keys.js +98 -0
  64. package/app/tools/trusted-buyer-keys.js.map +1 -0
  65. package/app/tools/workbuddy-echo.d.ts +69 -0
  66. package/app/tools/workbuddy-echo.js +132 -0
  67. package/app/tools/workbuddy-echo.js.map +1 -0
  68. package/build-manifest.json +42782 -41752
  69. package/contracts/kiwi-catalog/1.0/agent-record.schema.json +21 -0
  70. package/contracts/kiwi-contracts.lock.json +2 -2
  71. package/contracts/manifest.json +2 -2
  72. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/README.md +356 -0
  73. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/cloudflare.d.ts +53 -0
  74. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/cloudflare.d.ts.map +1 -0
  75. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/cloudflare.js +64 -0
  76. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/cloudflare.js.map +1 -0
  77. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/declarations.d.ts +43 -0
  78. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/declarations.d.ts.map +1 -0
  79. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/declarations.js +320 -0
  80. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/declarations.js.map +1 -0
  81. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/identifier.d.ts +6 -0
  82. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/identifier.d.ts.map +1 -0
  83. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/identifier.js +13 -0
  84. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/identifier.js.map +1 -0
  85. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/index.d.ts +11 -0
  86. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/index.d.ts.map +1 -0
  87. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/index.js +10 -0
  88. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/index.js.map +1 -0
  89. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/portable.d.ts +15 -0
  90. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/portable.d.ts.map +1 -0
  91. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/portable.js +12 -0
  92. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/portable.js.map +1 -0
  93. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.d.ts +66 -0
  94. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.d.ts.map +1 -0
  95. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.js +494 -0
  96. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.js.map +1 -0
  97. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/host.d.ts +13 -0
  98. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/host.d.ts.map +1 -0
  99. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js +72 -0
  100. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js.map +1 -0
  101. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.d.ts +63 -0
  102. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.d.ts.map +1 -0
  103. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.js +80 -0
  104. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.js.map +1 -0
  105. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.d.ts +45 -0
  106. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.d.ts.map +1 -0
  107. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js +520 -0
  108. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js.map +1 -0
  109. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.d.ts +110 -0
  110. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.d.ts.map +1 -0
  111. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.js +15 -0
  112. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.js.map +1 -0
  113. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.d.ts +102 -0
  114. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.d.ts.map +1 -0
  115. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.js +175 -0
  116. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.js.map +1 -0
  117. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.d.ts +24 -0
  118. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.d.ts.map +1 -0
  119. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.js +293 -0
  120. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.js.map +1 -0
  121. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.d.ts +2 -0
  122. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.d.ts.map +1 -0
  123. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.js +38 -0
  124. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.js.map +1 -0
  125. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/source.d.ts +36 -0
  126. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/source.d.ts.map +1 -0
  127. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/source.js +98 -0
  128. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/source.js.map +1 -0
  129. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/types.d.ts +232 -0
  130. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/types.d.ts.map +1 -0
  131. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/types.js +2 -0
  132. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/types.js.map +1 -0
  133. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/wasm.d.ts +12 -0
  134. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/wasm.d.ts.map +1 -0
  135. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/wasm.js +24 -0
  136. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/dist/wasm.js.map +1 -0
  137. package/node_modules/@earendil-works/pi-durable/node_modules/@earendil-works/pi-codemode/package.json +76 -0
  138. package/node_modules/body-parser/README.md +17 -13
  139. package/node_modules/body-parser/lib/read.js +74 -57
  140. package/node_modules/body-parser/lib/types/json.js +11 -11
  141. package/node_modules/body-parser/lib/types/urlencoded.js +5 -5
  142. package/node_modules/body-parser/lib/utils.js +0 -15
  143. package/node_modules/body-parser/package.json +7 -12
  144. package/node_modules/fast-uri/.github/workflows/release.yml +35 -0
  145. package/node_modules/fast-uri/README.md +8 -0
  146. package/node_modules/fast-uri/index.js +98 -18
  147. package/node_modules/fast-uri/lib/utils.js +52 -0
  148. package/node_modules/fast-uri/package.json +1 -1
  149. package/node_modules/fast-uri/test/host-delimiter-security.test.js +94 -0
  150. package/node_modules/fast-uri/test/relative-normalization-security.test.js +156 -0
  151. package/node_modules/fast-uri/test/reserved-path-normalization.test.js +32 -4
  152. package/node_modules/fast-uri/test/scheme-validation.test.js +53 -14
  153. package/node_modules/ip-address/README.md +104 -104
  154. package/node_modules/ip-address/dist/common.js +2 -2
  155. package/node_modules/ip-address/dist/common.js.map +1 -1
  156. package/node_modules/ip-address/dist/ipv4.js +7 -0
  157. package/node_modules/ip-address/dist/ipv4.js.map +1 -1
  158. package/node_modules/ip-address/dist/ipv6.js +7 -4
  159. package/node_modules/ip-address/dist/ipv6.js.map +1 -1
  160. package/node_modules/ip-address/dist/v6/constants.d.ts +3 -0
  161. package/node_modules/ip-address/dist/v6/constants.js +3 -0
  162. package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  163. package/node_modules/ip-address/package.json +3 -2
  164. package/node_modules/qs/.editorconfig +1 -1
  165. package/node_modules/qs/.github/THREAT_MODEL.md +4 -2
  166. package/node_modules/qs/CHANGELOG.md +61 -14
  167. package/node_modules/qs/README.md +57 -4
  168. package/node_modules/qs/dist/qs.js +19 -19
  169. package/node_modules/qs/eslint.config.mjs +61 -50
  170. package/node_modules/qs/lib/formats.js +7 -2
  171. package/node_modules/qs/lib/parse.js +105 -8
  172. package/node_modules/qs/lib/stringify.js +9 -7
  173. package/node_modules/qs/lib/utils.js +145 -13
  174. package/node_modules/qs/package.json +8 -8
  175. package/node_modules/qs/test/parse.js +440 -2
  176. package/node_modules/qs/test/stringify.js +485 -33
  177. package/node_modules/qs/test/utils.js +245 -3
  178. package/node_modules/zod/README.md +29 -2
  179. package/node_modules/zod/compile.cjs +96 -0
  180. package/node_modules/zod/compile.d.cts +1 -0
  181. package/node_modules/zod/compile.d.ts +1 -0
  182. package/node_modules/zod/compile.js +52 -0
  183. package/node_modules/zod/index.cjs +21 -2
  184. package/node_modules/zod/index.d.cts +1 -2
  185. package/node_modules/zod/index.d.ts +1 -2
  186. package/node_modules/zod/index.js +5 -2
  187. package/node_modules/zod/locales/index.cjs +19 -0
  188. package/node_modules/zod/mini/index.cjs +19 -0
  189. package/node_modules/zod/package.json +20 -8
  190. package/node_modules/zod/src/compile.ts +56 -0
  191. package/node_modules/zod/src/index.ts +5 -2
  192. package/node_modules/zod/src/v3/ZodError.ts +22 -12
  193. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  194. package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
  195. package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
  196. package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
  197. package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
  198. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
  199. package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
  200. package/node_modules/zod/src/v3/types.ts +5 -5
  201. package/node_modules/zod/src/v4/classic/checks.ts +1 -0
  202. package/node_modules/zod/src/v4/classic/compat.ts +26 -18
  203. package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
  204. package/node_modules/zod/src/v4/classic/errors.ts +59 -44
  205. package/node_modules/zod/src/v4/classic/external.ts +14 -9
  206. package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -78
  207. package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
  208. package/node_modules/zod/src/v4/classic/index.ts +2 -2
  209. package/node_modules/zod/src/v4/classic/iso.ts +2 -72
  210. package/node_modules/zod/src/v4/classic/parse.ts +10 -4
  211. package/node_modules/zod/src/v4/classic/schemas.ts +640 -375
  212. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
  213. package/node_modules/zod/src/v4/classic/tests/array.test.ts +29 -2
  214. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +186 -0
  215. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
  216. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
  217. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
  218. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
  219. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +3 -3
  220. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
  221. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
  222. package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
  223. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
  224. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
  225. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
  226. package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
  227. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
  228. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +261 -13
  229. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
  230. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
  231. package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
  232. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -10
  233. package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
  234. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
  235. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
  236. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  237. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
  238. package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
  239. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
  240. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -0
  241. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
  242. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
  243. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
  244. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
  245. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
  246. package/node_modules/zod/src/v4/classic/tests/map.test.ts +19 -0
  247. package/node_modules/zod/src/v4/classic/tests/number.test.ts +85 -9
  248. package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
  249. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
  250. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
  251. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
  252. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  253. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
  254. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  255. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
  256. package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
  257. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +79 -3
  258. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
  259. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
  260. package/node_modules/zod/src/v4/classic/tests/set.test.ts +15 -0
  261. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  262. package/node_modules/zod/src/v4/classic/tests/string.test.ts +222 -6
  263. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
  264. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +44 -3
  265. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
  266. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
  267. package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
  268. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
  269. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
  270. package/node_modules/zod/src/v4/core/api.ts +87 -35
  271. package/node_modules/zod/src/v4/core/checks.ts +119 -146
  272. package/node_modules/zod/src/v4/core/compile.ts +2322 -0
  273. package/node_modules/zod/src/v4/core/core.ts +99 -22
  274. package/node_modules/zod/src/v4/core/doc.ts +17 -9
  275. package/node_modules/zod/src/v4/core/errors.ts +113 -25
  276. package/node_modules/zod/src/v4/core/index.ts +3 -0
  277. package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
  278. package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
  279. package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
  280. package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
  281. package/node_modules/zod/src/v4/core/parse.ts +164 -50
  282. package/node_modules/zod/src/v4/core/regexes.ts +42 -15
  283. package/node_modules/zod/src/v4/core/registries.ts +2 -2
  284. package/node_modules/zod/src/v4/core/schemas.ts +1035 -539
  285. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  286. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
  287. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  288. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
  289. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
  290. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
  291. package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
  292. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  293. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
  294. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
  295. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
  296. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
  297. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  298. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
  299. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  300. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
  301. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
  302. package/node_modules/zod/src/v4/core/to-json-schema.ts +283 -48
  303. package/node_modules/zod/src/v4/core/util.ts +467 -157
  304. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  305. package/node_modules/zod/src/v4/core/visit.ts +193 -0
  306. package/node_modules/zod/src/v4/index.ts +3 -3
  307. package/node_modules/zod/src/v4/locales/ar.ts +5 -0
  308. package/node_modules/zod/src/v4/locales/az.ts +5 -0
  309. package/node_modules/zod/src/v4/locales/be.ts +12 -0
  310. package/node_modules/zod/src/v4/locales/bg.ts +5 -0
  311. package/node_modules/zod/src/v4/locales/bn.ts +123 -0
  312. package/node_modules/zod/src/v4/locales/ca.ts +5 -0
  313. package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
  314. package/node_modules/zod/src/v4/locales/cs.ts +5 -0
  315. package/node_modules/zod/src/v4/locales/da.ts +7 -2
  316. package/node_modules/zod/src/v4/locales/de.ts +5 -0
  317. package/node_modules/zod/src/v4/locales/el.ts +3 -0
  318. package/node_modules/zod/src/v4/locales/en.ts +17 -4
  319. package/node_modules/zod/src/v4/locales/eo.ts +5 -0
  320. package/node_modules/zod/src/v4/locales/es.ts +4 -0
  321. package/node_modules/zod/src/v4/locales/fa.ts +5 -0
  322. package/node_modules/zod/src/v4/locales/fi.ts +5 -0
  323. package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
  324. package/node_modules/zod/src/v4/locales/fr.ts +21 -14
  325. package/node_modules/zod/src/v4/locales/gu.ts +123 -0
  326. package/node_modules/zod/src/v4/locales/he.ts +8 -1
  327. package/node_modules/zod/src/v4/locales/hi.ts +126 -0
  328. package/node_modules/zod/src/v4/locales/hr.ts +4 -0
  329. package/node_modules/zod/src/v4/locales/hu.ts +5 -0
  330. package/node_modules/zod/src/v4/locales/hy.ts +11 -0
  331. package/node_modules/zod/src/v4/locales/id.ts +5 -0
  332. package/node_modules/zod/src/v4/locales/index.ts +11 -0
  333. package/node_modules/zod/src/v4/locales/is.ts +5 -0
  334. package/node_modules/zod/src/v4/locales/it.ts +5 -0
  335. package/node_modules/zod/src/v4/locales/ja.ts +5 -0
  336. package/node_modules/zod/src/v4/locales/ka.ts +5 -0
  337. package/node_modules/zod/src/v4/locales/km.ts +5 -0
  338. package/node_modules/zod/src/v4/locales/kn.ts +126 -0
  339. package/node_modules/zod/src/v4/locales/ko.ts +5 -0
  340. package/node_modules/zod/src/v4/locales/lt.ts +4 -0
  341. package/node_modules/zod/src/v4/locales/mk.ts +5 -0
  342. package/node_modules/zod/src/v4/locales/ms.ts +5 -0
  343. package/node_modules/zod/src/v4/locales/ne.ts +128 -0
  344. package/node_modules/zod/src/v4/locales/nl.ts +5 -0
  345. package/node_modules/zod/src/v4/locales/nn.ts +121 -0
  346. package/node_modules/zod/src/v4/locales/no.ts +7 -2
  347. package/node_modules/zod/src/v4/locales/ota.ts +5 -0
  348. package/node_modules/zod/src/v4/locales/pl.ts +5 -0
  349. package/node_modules/zod/src/v4/locales/ps.ts +5 -0
  350. package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
  351. package/node_modules/zod/src/v4/locales/pt.ts +101 -58
  352. package/node_modules/zod/src/v4/locales/ro.ts +3 -0
  353. package/node_modules/zod/src/v4/locales/ru.ts +12 -0
  354. package/node_modules/zod/src/v4/locales/sk.ts +123 -0
  355. package/node_modules/zod/src/v4/locales/sl.ts +5 -0
  356. package/node_modules/zod/src/v4/locales/sv.ts +7 -2
  357. package/node_modules/zod/src/v4/locales/ta.ts +5 -0
  358. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  359. package/node_modules/zod/src/v4/locales/th.ts +5 -0
  360. package/node_modules/zod/src/v4/locales/tk.ts +113 -0
  361. package/node_modules/zod/src/v4/locales/tr.ts +5 -0
  362. package/node_modules/zod/src/v4/locales/uk.ts +5 -0
  363. package/node_modules/zod/src/v4/locales/ur.ts +5 -0
  364. package/node_modules/zod/src/v4/locales/uz.ts +3 -0
  365. package/node_modules/zod/src/v4/locales/vi.ts +5 -0
  366. package/node_modules/zod/src/v4/locales/yo.ts +5 -0
  367. package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
  368. package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
  369. package/node_modules/zod/src/v4/mini/checks.ts +1 -0
  370. package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
  371. package/node_modules/zod/src/v4/mini/external.ts +12 -1
  372. package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
  373. package/node_modules/zod/src/v4/mini/parse.ts +2 -0
  374. package/node_modules/zod/src/v4/mini/schemas.ts +167 -63
  375. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
  376. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
  377. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
  378. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
  379. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  380. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
  381. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
  382. package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
  383. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
  384. package/node_modules/zod/src/v4/mini/tests/index.test.ts +158 -5
  385. package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
  386. package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
  387. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  388. package/node_modules/zod/src/v4/mini/tests/string.test.ts +44 -0
  389. package/node_modules/zod/v3/ZodError.cjs +41 -12
  390. package/node_modules/zod/v3/ZodError.d.cts +1 -1
  391. package/node_modules/zod/v3/ZodError.d.ts +1 -1
  392. package/node_modules/zod/v3/ZodError.js +22 -12
  393. package/node_modules/zod/v3/errors.cjs +19 -0
  394. package/node_modules/zod/v3/external.cjs +19 -0
  395. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  396. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  397. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  398. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  399. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  400. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  401. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  402. package/node_modules/zod/v3/index.cjs +19 -0
  403. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  404. package/node_modules/zod/v3/types.cjs +26 -5
  405. package/node_modules/zod/v3/types.js +7 -5
  406. package/node_modules/zod/v4/classic/checks.cjs +21 -1
  407. package/node_modules/zod/v4/classic/checks.d.cts +1 -1
  408. package/node_modules/zod/v4/classic/checks.d.ts +1 -1
  409. package/node_modules/zod/v4/classic/checks.js +1 -1
  410. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  411. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  412. package/node_modules/zod/v4/classic/compat.d.cts +9 -11
  413. package/node_modules/zod/v4/classic/compat.d.ts +9 -11
  414. package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
  415. package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
  416. package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
  417. package/node_modules/zod/v4/classic/deep-partial.js +13 -0
  418. package/node_modules/zod/v4/classic/errors.cjs +62 -34
  419. package/node_modules/zod/v4/classic/errors.d.cts +3 -4
  420. package/node_modules/zod/v4/classic/errors.d.ts +3 -4
  421. package/node_modules/zod/v4/classic/errors.js +43 -34
  422. package/node_modules/zod/v4/classic/external.cjs +51 -27
  423. package/node_modules/zod/v4/classic/external.d.cts +5 -2
  424. package/node_modules/zod/v4/classic/external.d.ts +5 -2
  425. package/node_modules/zod/v4/classic/external.js +5 -8
  426. package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
  427. package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
  428. package/node_modules/zod/v4/classic/in-out.cjs +82 -0
  429. package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
  430. package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
  431. package/node_modules/zod/v4/classic/in-out.js +36 -0
  432. package/node_modules/zod/v4/classic/index.cjs +21 -2
  433. package/node_modules/zod/v4/classic/index.d.cts +1 -2
  434. package/node_modules/zod/v4/classic/index.d.ts +1 -2
  435. package/node_modules/zod/v4/classic/index.js +2 -2
  436. package/node_modules/zod/v4/classic/iso.cjs +30 -22
  437. package/node_modules/zod/v4/classic/iso.d.cts +2 -17
  438. package/node_modules/zod/v4/classic/iso.d.ts +2 -17
  439. package/node_modules/zod/v4/classic/iso.js +2 -17
  440. package/node_modules/zod/v4/classic/parse.cjs +23 -1
  441. package/node_modules/zod/v4/classic/parse.d.cts +17 -4
  442. package/node_modules/zod/v4/classic/parse.d.ts +17 -4
  443. package/node_modules/zod/v4/classic/parse.js +1 -0
  444. package/node_modules/zod/v4/classic/schemas.cjs +591 -426
  445. package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
  446. package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
  447. package/node_modules/zod/v4/classic/schemas.js +564 -424
  448. package/node_modules/zod/v4/core/api.cjs +66 -24
  449. package/node_modules/zod/v4/core/api.d.cts +22 -12
  450. package/node_modules/zod/v4/core/api.d.ts +22 -12
  451. package/node_modules/zod/v4/core/api.js +44 -24
  452. package/node_modules/zod/v4/core/checks.cjs +88 -128
  453. package/node_modules/zod/v4/core/checks.d.cts +29 -13
  454. package/node_modules/zod/v4/core/checks.d.ts +29 -13
  455. package/node_modules/zod/v4/core/checks.js +68 -127
  456. package/node_modules/zod/v4/core/compile.cjs +1916 -0
  457. package/node_modules/zod/v4/core/compile.d.cts +65 -0
  458. package/node_modules/zod/v4/core/compile.d.ts +65 -0
  459. package/node_modules/zod/v4/core/compile.js +1866 -0
  460. package/node_modules/zod/v4/core/core.cjs +101 -19
  461. package/node_modules/zod/v4/core/core.d.cts +16 -4
  462. package/node_modules/zod/v4/core/core.d.ts +16 -4
  463. package/node_modules/zod/v4/core/core.js +83 -20
  464. package/node_modules/zod/v4/core/doc.cjs +31 -9
  465. package/node_modules/zod/v4/core/doc.d.cts +3 -1
  466. package/node_modules/zod/v4/core/doc.d.ts +3 -1
  467. package/node_modules/zod/v4/core/doc.js +12 -9
  468. package/node_modules/zod/v4/core/errors.cjs +126 -25
  469. package/node_modules/zod/v4/core/errors.d.cts +4 -0
  470. package/node_modules/zod/v4/core/errors.d.ts +4 -0
  471. package/node_modules/zod/v4/core/errors.js +107 -25
  472. package/node_modules/zod/v4/core/index.cjs +24 -1
  473. package/node_modules/zod/v4/core/index.d.cts +3 -0
  474. package/node_modules/zod/v4/core/index.d.ts +3 -0
  475. package/node_modules/zod/v4/core/index.js +3 -0
  476. package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
  477. package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
  478. package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
  479. package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
  480. package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
  481. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  482. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  483. package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
  484. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  485. package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
  486. package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
  487. package/node_modules/zod/v4/core/memoizer.cjs +360 -0
  488. package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
  489. package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
  490. package/node_modules/zod/v4/core/memoizer.js +311 -0
  491. package/node_modules/zod/v4/core/parse.cjs +148 -46
  492. package/node_modules/zod/v4/core/parse.d.cts +14 -11
  493. package/node_modules/zod/v4/core/parse.d.ts +14 -11
  494. package/node_modules/zod/v4/core/parse.js +127 -45
  495. package/node_modules/zod/v4/core/regexes.cjs +54 -17
  496. package/node_modules/zod/v4/core/regexes.d.cts +5 -0
  497. package/node_modules/zod/v4/core/regexes.d.ts +5 -0
  498. package/node_modules/zod/v4/core/regexes.js +32 -15
  499. package/node_modules/zod/v4/core/registries.cjs +19 -0
  500. package/node_modules/zod/v4/core/registries.js +2 -2
  501. package/node_modules/zod/v4/core/schemas.cjs +815 -386
  502. package/node_modules/zod/v4/core/schemas.d.cts +126 -35
  503. package/node_modules/zod/v4/core/schemas.d.ts +126 -35
  504. package/node_modules/zod/v4/core/schemas.js +783 -386
  505. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  506. package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
  507. package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
  508. package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
  509. package/node_modules/zod/v4/core/to-json-schema.js +247 -44
  510. package/node_modules/zod/v4/core/util.cjs +387 -157
  511. package/node_modules/zod/v4/core/util.d.cts +81 -1
  512. package/node_modules/zod/v4/core/util.d.ts +81 -1
  513. package/node_modules/zod/v4/core/util.js +355 -156
  514. package/node_modules/zod/v4/core/versions.cjs +21 -2
  515. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  516. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  517. package/node_modules/zod/v4/core/versions.js +2 -2
  518. package/node_modules/zod/v4/core/visit.cjs +214 -0
  519. package/node_modules/zod/v4/core/visit.d.cts +30 -0
  520. package/node_modules/zod/v4/core/visit.d.ts +30 -0
  521. package/node_modules/zod/v4/core/visit.js +169 -0
  522. package/node_modules/zod/v4/index.cjs +34 -5
  523. package/node_modules/zod/v4/index.d.cts +2 -2
  524. package/node_modules/zod/v4/index.d.ts +2 -2
  525. package/node_modules/zod/v4/index.js +3 -2
  526. package/node_modules/zod/v4/locales/ar.cjs +5 -0
  527. package/node_modules/zod/v4/locales/ar.js +5 -0
  528. package/node_modules/zod/v4/locales/az.cjs +5 -0
  529. package/node_modules/zod/v4/locales/az.js +5 -0
  530. package/node_modules/zod/v4/locales/be.cjs +12 -0
  531. package/node_modules/zod/v4/locales/be.js +12 -0
  532. package/node_modules/zod/v4/locales/bg.cjs +5 -0
  533. package/node_modules/zod/v4/locales/bg.js +5 -0
  534. package/node_modules/zod/v4/locales/bn.cjs +140 -0
  535. package/node_modules/zod/v4/locales/bn.d.cts +5 -0
  536. package/node_modules/zod/v4/locales/bn.d.ts +4 -0
  537. package/node_modules/zod/v4/locales/bn.js +113 -0
  538. package/node_modules/zod/v4/locales/ca.cjs +5 -0
  539. package/node_modules/zod/v4/locales/ca.js +5 -0
  540. package/node_modules/zod/v4/locales/ckb.cjs +160 -0
  541. package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
  542. package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
  543. package/node_modules/zod/v4/locales/ckb.js +133 -0
  544. package/node_modules/zod/v4/locales/cs.cjs +5 -0
  545. package/node_modules/zod/v4/locales/cs.js +5 -0
  546. package/node_modules/zod/v4/locales/da.cjs +7 -2
  547. package/node_modules/zod/v4/locales/da.js +7 -2
  548. package/node_modules/zod/v4/locales/de.cjs +5 -0
  549. package/node_modules/zod/v4/locales/de.js +5 -0
  550. package/node_modules/zod/v4/locales/el.cjs +3 -0
  551. package/node_modules/zod/v4/locales/el.js +3 -0
  552. package/node_modules/zod/v4/locales/en.cjs +16 -4
  553. package/node_modules/zod/v4/locales/en.js +16 -4
  554. package/node_modules/zod/v4/locales/eo.cjs +5 -0
  555. package/node_modules/zod/v4/locales/eo.js +5 -0
  556. package/node_modules/zod/v4/locales/es.cjs +4 -0
  557. package/node_modules/zod/v4/locales/es.js +4 -0
  558. package/node_modules/zod/v4/locales/fa.cjs +5 -0
  559. package/node_modules/zod/v4/locales/fa.js +5 -0
  560. package/node_modules/zod/v4/locales/fi.cjs +5 -0
  561. package/node_modules/zod/v4/locales/fi.js +5 -0
  562. package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
  563. package/node_modules/zod/v4/locales/fr-CA.js +5 -0
  564. package/node_modules/zod/v4/locales/fr.cjs +18 -14
  565. package/node_modules/zod/v4/locales/fr.js +18 -14
  566. package/node_modules/zod/v4/locales/gu.cjs +140 -0
  567. package/node_modules/zod/v4/locales/gu.d.cts +5 -0
  568. package/node_modules/zod/v4/locales/gu.d.ts +4 -0
  569. package/node_modules/zod/v4/locales/gu.js +113 -0
  570. package/node_modules/zod/v4/locales/he.cjs +7 -0
  571. package/node_modules/zod/v4/locales/he.js +7 -0
  572. package/node_modules/zod/v4/locales/hi.cjs +138 -0
  573. package/node_modules/zod/v4/locales/hi.d.cts +5 -0
  574. package/node_modules/zod/v4/locales/hi.d.ts +4 -0
  575. package/node_modules/zod/v4/locales/hi.js +111 -0
  576. package/node_modules/zod/v4/locales/hr.cjs +4 -0
  577. package/node_modules/zod/v4/locales/hr.js +4 -0
  578. package/node_modules/zod/v4/locales/hu.cjs +5 -0
  579. package/node_modules/zod/v4/locales/hu.js +5 -0
  580. package/node_modules/zod/v4/locales/hy.cjs +11 -0
  581. package/node_modules/zod/v4/locales/hy.js +11 -0
  582. package/node_modules/zod/v4/locales/id.cjs +5 -0
  583. package/node_modules/zod/v4/locales/id.js +5 -0
  584. package/node_modules/zod/v4/locales/index.cjs +43 -2
  585. package/node_modules/zod/v4/locales/index.d.cts +11 -0
  586. package/node_modules/zod/v4/locales/index.d.ts +11 -0
  587. package/node_modules/zod/v4/locales/index.js +11 -0
  588. package/node_modules/zod/v4/locales/is.cjs +5 -0
  589. package/node_modules/zod/v4/locales/is.js +5 -0
  590. package/node_modules/zod/v4/locales/it.cjs +5 -0
  591. package/node_modules/zod/v4/locales/it.js +5 -0
  592. package/node_modules/zod/v4/locales/ja.cjs +5 -0
  593. package/node_modules/zod/v4/locales/ja.js +5 -0
  594. package/node_modules/zod/v4/locales/ka.cjs +5 -0
  595. package/node_modules/zod/v4/locales/ka.js +5 -0
  596. package/node_modules/zod/v4/locales/km.cjs +5 -0
  597. package/node_modules/zod/v4/locales/km.js +5 -0
  598. package/node_modules/zod/v4/locales/kn.cjs +143 -0
  599. package/node_modules/zod/v4/locales/kn.d.cts +5 -0
  600. package/node_modules/zod/v4/locales/kn.d.ts +4 -0
  601. package/node_modules/zod/v4/locales/kn.js +116 -0
  602. package/node_modules/zod/v4/locales/ko.cjs +5 -0
  603. package/node_modules/zod/v4/locales/ko.js +5 -0
  604. package/node_modules/zod/v4/locales/lt.cjs +4 -0
  605. package/node_modules/zod/v4/locales/lt.js +4 -0
  606. package/node_modules/zod/v4/locales/mk.cjs +5 -0
  607. package/node_modules/zod/v4/locales/mk.js +5 -0
  608. package/node_modules/zod/v4/locales/ms.cjs +5 -0
  609. package/node_modules/zod/v4/locales/ms.js +5 -0
  610. package/node_modules/zod/v4/locales/ne.cjs +138 -0
  611. package/node_modules/zod/v4/locales/ne.d.cts +5 -0
  612. package/node_modules/zod/v4/locales/ne.d.ts +4 -0
  613. package/node_modules/zod/v4/locales/ne.js +111 -0
  614. package/node_modules/zod/v4/locales/nl.cjs +5 -0
  615. package/node_modules/zod/v4/locales/nl.js +5 -0
  616. package/node_modules/zod/v4/locales/nn.cjs +140 -0
  617. package/node_modules/zod/v4/locales/nn.d.cts +5 -0
  618. package/node_modules/zod/v4/locales/nn.d.ts +4 -0
  619. package/node_modules/zod/v4/locales/nn.js +113 -0
  620. package/node_modules/zod/v4/locales/no.cjs +7 -2
  621. package/node_modules/zod/v4/locales/no.js +7 -2
  622. package/node_modules/zod/v4/locales/ota.cjs +5 -0
  623. package/node_modules/zod/v4/locales/ota.js +5 -0
  624. package/node_modules/zod/v4/locales/pl.cjs +5 -0
  625. package/node_modules/zod/v4/locales/pl.js +5 -0
  626. package/node_modules/zod/v4/locales/ps.cjs +5 -0
  627. package/node_modules/zod/v4/locales/ps.js +5 -0
  628. package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
  629. package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
  630. package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
  631. package/node_modules/zod/v4/locales/pt-BR.js +143 -0
  632. package/node_modules/zod/v4/locales/pt.cjs +89 -55
  633. package/node_modules/zod/v4/locales/pt.js +89 -55
  634. package/node_modules/zod/v4/locales/ro.cjs +3 -0
  635. package/node_modules/zod/v4/locales/ro.js +3 -0
  636. package/node_modules/zod/v4/locales/ru.cjs +12 -0
  637. package/node_modules/zod/v4/locales/ru.js +12 -0
  638. package/node_modules/zod/v4/locales/sk.cjs +143 -0
  639. package/node_modules/zod/v4/locales/sk.d.cts +5 -0
  640. package/node_modules/zod/v4/locales/sk.d.ts +4 -0
  641. package/node_modules/zod/v4/locales/sk.js +116 -0
  642. package/node_modules/zod/v4/locales/sl.cjs +5 -0
  643. package/node_modules/zod/v4/locales/sl.js +5 -0
  644. package/node_modules/zod/v4/locales/sv.cjs +7 -2
  645. package/node_modules/zod/v4/locales/sv.js +7 -2
  646. package/node_modules/zod/v4/locales/ta.cjs +5 -0
  647. package/node_modules/zod/v4/locales/ta.js +5 -0
  648. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  649. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  650. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  651. package/node_modules/zod/v4/locales/tg.js +117 -0
  652. package/node_modules/zod/v4/locales/th.cjs +5 -0
  653. package/node_modules/zod/v4/locales/th.js +5 -0
  654. package/node_modules/zod/v4/locales/tk.cjs +134 -0
  655. package/node_modules/zod/v4/locales/tk.d.cts +5 -0
  656. package/node_modules/zod/v4/locales/tk.d.ts +4 -0
  657. package/node_modules/zod/v4/locales/tk.js +107 -0
  658. package/node_modules/zod/v4/locales/tr.cjs +5 -0
  659. package/node_modules/zod/v4/locales/tr.js +5 -0
  660. package/node_modules/zod/v4/locales/uk.cjs +5 -0
  661. package/node_modules/zod/v4/locales/uk.js +5 -0
  662. package/node_modules/zod/v4/locales/ur.cjs +5 -0
  663. package/node_modules/zod/v4/locales/ur.js +5 -0
  664. package/node_modules/zod/v4/locales/uz.cjs +3 -0
  665. package/node_modules/zod/v4/locales/uz.js +3 -0
  666. package/node_modules/zod/v4/locales/vi.cjs +5 -0
  667. package/node_modules/zod/v4/locales/vi.js +5 -0
  668. package/node_modules/zod/v4/locales/yo.cjs +5 -0
  669. package/node_modules/zod/v4/locales/yo.js +5 -0
  670. package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
  671. package/node_modules/zod/v4/locales/zh-CN.js +5 -0
  672. package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
  673. package/node_modules/zod/v4/locales/zh-TW.js +5 -0
  674. package/node_modules/zod/v4/mini/checks.cjs +21 -1
  675. package/node_modules/zod/v4/mini/checks.d.cts +1 -1
  676. package/node_modules/zod/v4/mini/checks.d.ts +1 -1
  677. package/node_modules/zod/v4/mini/checks.js +1 -1
  678. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  679. package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
  680. package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
  681. package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
  682. package/node_modules/zod/v4/mini/deep-partial.js +13 -0
  683. package/node_modules/zod/v4/mini/external.cjs +33 -1
  684. package/node_modules/zod/v4/mini/external.d.cts +5 -2
  685. package/node_modules/zod/v4/mini/external.d.ts +5 -2
  686. package/node_modules/zod/v4/mini/external.js +3 -1
  687. package/node_modules/zod/v4/mini/in-out.cjs +82 -0
  688. package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
  689. package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
  690. package/node_modules/zod/v4/mini/in-out.js +36 -0
  691. package/node_modules/zod/v4/mini/index.cjs +19 -0
  692. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  693. package/node_modules/zod/v4/mini/parse.cjs +22 -1
  694. package/node_modules/zod/v4/mini/parse.d.cts +1 -1
  695. package/node_modules/zod/v4/mini/parse.d.ts +1 -1
  696. package/node_modules/zod/v4/mini/parse.js +1 -1
  697. package/node_modules/zod/v4/mini/schemas.cjs +117 -53
  698. package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
  699. package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
  700. package/node_modules/zod/v4/mini/schemas.js +92 -51
  701. package/node_modules/zod/v4-mini/index.cjs +19 -0
  702. package/package.json +7 -7
  703. package/runtime-package.json +13 -8
  704. package/shipping-sbom.cdx.json +159 -160
  705. package/shipping-source.json +12 -12
  706. package/node_modules/zod/src/v4/core/config.ts +0 -15
  707. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/README.md +0 -0
  708. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/index.d.ts +0 -0
  709. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/index.d.ts.map +0 -0
  710. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/index.js +0 -0
  711. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/index.js.map +0 -0
  712. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/memory.d.ts +0 -0
  713. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/memory.d.ts.map +0 -0
  714. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/memory.js +0 -0
  715. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/memory.js.map +0 -0
  716. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/noop.d.ts +0 -0
  717. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/noop.d.ts.map +0 -0
  718. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/noop.js +0 -0
  719. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/noop.js.map +0 -0
  720. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/conformance.d.ts +0 -0
  721. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/conformance.d.ts.map +0 -0
  722. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/conformance.js +0 -0
  723. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/conformance.js.map +0 -0
  724. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/index.d.ts +0 -0
  725. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/index.d.ts.map +0 -0
  726. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/index.js +0 -0
  727. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/index.js.map +0 -0
  728. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/types.d.ts +0 -0
  729. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/types.d.ts.map +0 -0
  730. /package/node_modules/@earendil-works/{pi-codemode/dist → pi-ai/node_modules/@earendil-works/pi-telemetry/dist/testing}/types.js +0 -0
  731. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/dist/testing/types.js.map +0 -0
  732. /package/node_modules/@earendil-works/{pi-telemetry → pi-ai/node_modules/@earendil-works/pi-telemetry}/package.json +0 -0
  733. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/README.md +0 -0
  734. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/cloudflare.d.ts +0 -0
  735. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/cloudflare.d.ts.map +0 -0
  736. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/cloudflare.js +0 -0
  737. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/cloudflare.js.map +0 -0
  738. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/declarations.d.ts +0 -0
  739. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/declarations.d.ts.map +0 -0
  740. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/declarations.js +0 -0
  741. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/declarations.js.map +0 -0
  742. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/identifier.d.ts +0 -0
  743. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/identifier.d.ts.map +0 -0
  744. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/identifier.js +0 -0
  745. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/identifier.js.map +0 -0
  746. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/index.d.ts +0 -0
  747. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/index.d.ts.map +0 -0
  748. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/index.js +0 -0
  749. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/index.js.map +0 -0
  750. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/portable.d.ts +0 -0
  751. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/portable.d.ts.map +0 -0
  752. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/portable.js +0 -0
  753. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/portable.js.map +0 -0
  754. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/execution.d.ts +0 -0
  755. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/execution.d.ts.map +0 -0
  756. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/execution.js +0 -0
  757. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/execution.js.map +0 -0
  758. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/host.d.ts +0 -0
  759. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/host.d.ts.map +0 -0
  760. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/host.js +0 -0
  761. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/host.js.map +0 -0
  762. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/inline.d.ts +0 -0
  763. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/inline.d.ts.map +0 -0
  764. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/inline.js +0 -0
  765. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/inline.js.map +0 -0
  766. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/prelude-source.d.ts +0 -0
  767. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/prelude-source.d.ts.map +0 -0
  768. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/prelude-source.js +0 -0
  769. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/prelude-source.js.map +0 -0
  770. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/protocol.d.ts +0 -0
  771. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/protocol.d.ts.map +0 -0
  772. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/protocol.js +0 -0
  773. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/protocol.js.map +0 -0
  774. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/remote.d.ts +0 -0
  775. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/remote.d.ts.map +0 -0
  776. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/remote.js +0 -0
  777. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/remote.js.map +0 -0
  778. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/vm.d.ts +0 -0
  779. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/vm.d.ts.map +0 -0
  780. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/vm.js +0 -0
  781. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/vm.js.map +0 -0
  782. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/worker.d.ts +0 -0
  783. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/worker.d.ts.map +0 -0
  784. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/worker.js +0 -0
  785. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/runtime/worker.js.map +0 -0
  786. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/source.d.ts +0 -0
  787. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/source.d.ts.map +0 -0
  788. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/source.js +0 -0
  789. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/source.js.map +0 -0
  790. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/types.d.ts +0 -0
  791. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/types.d.ts.map +0 -0
  792. /package/node_modules/@earendil-works/{pi-telemetry/dist/testing → pi-coding-agent/node_modules/@earendil-works/pi-codemode/dist}/types.js +0 -0
  793. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/types.js.map +0 -0
  794. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/wasm.d.ts +0 -0
  795. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/wasm.d.ts.map +0 -0
  796. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/wasm.js +0 -0
  797. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/dist/wasm.js.map +0 -0
  798. /package/node_modules/@earendil-works/{pi-codemode → pi-coding-agent/node_modules/@earendil-works/pi-codemode}/package.json +0 -0
  799. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/CHANGELOG.md +0 -0
  800. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/LICENSES/modelcontextprotocol-typescript-sdk.txt +0 -0
  801. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/README.md +0 -0
  802. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/auth-provider.d.ts +0 -0
  803. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/auth-provider.d.ts.map +0 -0
  804. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/auth-provider.js +0 -0
  805. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/auth-provider.js.map +0 -0
  806. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/client.d.ts +0 -0
  807. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/client.d.ts.map +0 -0
  808. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/client.js +0 -0
  809. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/client.js.map +0 -0
  810. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/index.d.ts +0 -0
  811. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/index.d.ts.map +0 -0
  812. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/index.js +0 -0
  813. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/index.js.map +0 -0
  814. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/callback.d.ts +0 -0
  815. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/callback.d.ts.map +0 -0
  816. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/callback.js +0 -0
  817. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/callback.js.map +0 -0
  818. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/discovery.d.ts +0 -0
  819. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/discovery.d.ts.map +0 -0
  820. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/discovery.js +0 -0
  821. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/discovery.js.map +0 -0
  822. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/errors.d.ts +0 -0
  823. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/errors.d.ts.map +0 -0
  824. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/errors.js +0 -0
  825. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/errors.js.map +0 -0
  826. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/flow.d.ts +0 -0
  827. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/flow.d.ts.map +0 -0
  828. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/flow.js +0 -0
  829. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/flow.js.map +0 -0
  830. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/index.d.ts +0 -0
  831. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/index.d.ts.map +0 -0
  832. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/index.js +0 -0
  833. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/index.js.map +0 -0
  834. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/provider.d.ts +0 -0
  835. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/provider.d.ts.map +0 -0
  836. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/provider.js +0 -0
  837. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/provider.js.map +0 -0
  838. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/types.d.ts +0 -0
  839. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/types.d.ts.map +0 -0
  840. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/types.js +0 -0
  841. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/oauth/types.js.map +0 -0
  842. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/content.d.ts +0 -0
  843. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/content.d.ts.map +0 -0
  844. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/content.js +0 -0
  845. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/content.js.map +0 -0
  846. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/jsonrpc.d.ts +0 -0
  847. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/jsonrpc.d.ts.map +0 -0
  848. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/jsonrpc.js +0 -0
  849. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/jsonrpc.js.map +0 -0
  850. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/types.d.ts +0 -0
  851. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/types.d.ts.map +0 -0
  852. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/types.js +0 -0
  853. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/protocol/types.js.map +0 -0
  854. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/testing/index.d.ts +0 -0
  855. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/testing/index.d.ts.map +0 -0
  856. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/testing/index.js +0 -0
  857. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/testing/index.js.map +0 -0
  858. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/in-memory.d.ts +0 -0
  859. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/in-memory.d.ts.map +0 -0
  860. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/in-memory.js +0 -0
  861. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/in-memory.js.map +0 -0
  862. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/stdio.d.ts +0 -0
  863. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/stdio.d.ts.map +0 -0
  864. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/stdio.js +0 -0
  865. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/stdio.js.map +0 -0
  866. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/streamable-http.d.ts +0 -0
  867. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/streamable-http.d.ts.map +0 -0
  868. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/streamable-http.js +0 -0
  869. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/streamable-http.js.map +0 -0
  870. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/transport.d.ts +0 -0
  871. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/transport.d.ts.map +0 -0
  872. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/transport.js +0 -0
  873. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/dist/transports/transport.js.map +0 -0
  874. /package/node_modules/@earendil-works/{pi-mcp → pi-coding-agent/node_modules/@earendil-works/pi-mcp}/package.json +0 -0
  875. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/README.md +0 -0
  876. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/alt-screen-search.d.ts +0 -0
  877. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/alt-screen-search.d.ts.map +0 -0
  878. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/alt-screen-search.js +0 -0
  879. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/alt-screen-search.js.map +0 -0
  880. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/autocomplete.d.ts +0 -0
  881. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/autocomplete.d.ts.map +0 -0
  882. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/autocomplete.js +0 -0
  883. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/autocomplete.js.map +0 -0
  884. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/colors.d.ts +0 -0
  885. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/colors.d.ts.map +0 -0
  886. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/colors.js +0 -0
  887. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/colors.js.map +0 -0
  888. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/alt-screen-flash.d.ts +0 -0
  889. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/alt-screen-flash.d.ts.map +0 -0
  890. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/alt-screen-flash.js +0 -0
  891. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/alt-screen-flash.js.map +0 -0
  892. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/box.d.ts +0 -0
  893. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/box.d.ts.map +0 -0
  894. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/box.js +0 -0
  895. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/box.js.map +0 -0
  896. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/cancellable-loader.d.ts +0 -0
  897. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/cancellable-loader.d.ts.map +0 -0
  898. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/cancellable-loader.js +0 -0
  899. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/cancellable-loader.js.map +0 -0
  900. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/editor.d.ts +0 -0
  901. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/editor.d.ts.map +0 -0
  902. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/editor.js +0 -0
  903. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/editor.js.map +0 -0
  904. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/h-stack.d.ts +0 -0
  905. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/h-stack.d.ts.map +0 -0
  906. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/h-stack.js +0 -0
  907. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/h-stack.js.map +0 -0
  908. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/image.d.ts +0 -0
  909. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/image.d.ts.map +0 -0
  910. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/image.js +0 -0
  911. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/image.js.map +0 -0
  912. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/input.d.ts +0 -0
  913. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/input.d.ts.map +0 -0
  914. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/input.js +0 -0
  915. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/input.js.map +0 -0
  916. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/loader.d.ts +0 -0
  917. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/loader.d.ts.map +0 -0
  918. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/loader.js +0 -0
  919. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/loader.js.map +0 -0
  920. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/markdown.d.ts +0 -0
  921. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/markdown.d.ts.map +0 -0
  922. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/markdown.js +0 -0
  923. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/markdown.js.map +0 -0
  924. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/mouse-region.d.ts +0 -0
  925. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/mouse-region.d.ts.map +0 -0
  926. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/mouse-region.js +0 -0
  927. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/mouse-region.js.map +0 -0
  928. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/scroll-view.d.ts +0 -0
  929. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/scroll-view.d.ts.map +0 -0
  930. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/scroll-view.js +0 -0
  931. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/scroll-view.js.map +0 -0
  932. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/select-list.d.ts +0 -0
  933. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/select-list.d.ts.map +0 -0
  934. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/select-list.js +0 -0
  935. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/select-list.js.map +0 -0
  936. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/settings-list.d.ts +0 -0
  937. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/settings-list.d.ts.map +0 -0
  938. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/settings-list.js +0 -0
  939. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/settings-list.js.map +0 -0
  940. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/spacer.d.ts +0 -0
  941. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/spacer.d.ts.map +0 -0
  942. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/spacer.js +0 -0
  943. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/spacer.js.map +0 -0
  944. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/stack.d.ts +0 -0
  945. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/stack.d.ts.map +0 -0
  946. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/stack.js +0 -0
  947. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/stack.js.map +0 -0
  948. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/text.d.ts +0 -0
  949. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/text.d.ts.map +0 -0
  950. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/text.js +0 -0
  951. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/text.js.map +0 -0
  952. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/truncated-text.d.ts +0 -0
  953. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/truncated-text.d.ts.map +0 -0
  954. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/truncated-text.js +0 -0
  955. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/truncated-text.js.map +0 -0
  956. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/v-stack.d.ts +0 -0
  957. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/v-stack.d.ts.map +0 -0
  958. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/v-stack.js +0 -0
  959. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/components/v-stack.js.map +0 -0
  960. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/editor-component.d.ts +0 -0
  961. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/editor-component.d.ts.map +0 -0
  962. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/editor-component.js +0 -0
  963. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/editor-component.js.map +0 -0
  964. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/fuzzy.d.ts +0 -0
  965. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/fuzzy.d.ts.map +0 -0
  966. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/fuzzy.js +0 -0
  967. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/fuzzy.js.map +0 -0
  968. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/index.d.ts +0 -0
  969. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/index.d.ts.map +0 -0
  970. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/index.js +0 -0
  971. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/index.js.map +0 -0
  972. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keybindings.d.ts +0 -0
  973. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keybindings.d.ts.map +0 -0
  974. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keybindings.js +0 -0
  975. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keybindings.js.map +0 -0
  976. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keys.d.ts +0 -0
  977. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keys.d.ts.map +0 -0
  978. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keys.js +0 -0
  979. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/keys.js.map +0 -0
  980. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/kill-ring.d.ts +0 -0
  981. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/kill-ring.d.ts.map +0 -0
  982. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/kill-ring.js +0 -0
  983. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/kill-ring.js.map +0 -0
  984. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/latex.d.ts +0 -0
  985. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/latex.d.ts.map +0 -0
  986. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/latex.js +0 -0
  987. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/latex.js.map +0 -0
  988. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout-node.d.ts +0 -0
  989. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout-node.d.ts.map +0 -0
  990. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout-node.js +0 -0
  991. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout-node.js.map +0 -0
  992. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout.d.ts +0 -0
  993. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout.d.ts.map +0 -0
  994. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout.js +0 -0
  995. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/layout.js.map +0 -0
  996. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-modifiers.d.ts +0 -0
  997. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-modifiers.d.ts.map +0 -0
  998. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-modifiers.js +0 -0
  999. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-modifiers.js.map +0 -0
  1000. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-module-path.d.ts +0 -0
  1001. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-module-path.d.ts.map +0 -0
  1002. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-module-path.js +0 -0
  1003. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-module-path.js.map +0 -0
  1004. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-platform.d.ts +0 -0
  1005. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-platform.d.ts.map +0 -0
  1006. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-platform.js +0 -0
  1007. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/native-platform.js.map +0 -0
  1008. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/oklab.d.ts +0 -0
  1009. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/oklab.d.ts.map +0 -0
  1010. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/oklab.js +0 -0
  1011. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/oklab.js.map +0 -0
  1012. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/program-status.d.ts +0 -0
  1013. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/program-status.d.ts.map +0 -0
  1014. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/program-status.js +0 -0
  1015. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/program-status.js.map +0 -0
  1016. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/stdin-buffer.d.ts +0 -0
  1017. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/stdin-buffer.d.ts.map +0 -0
  1018. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/stdin-buffer.js +0 -0
  1019. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/stdin-buffer.js.map +0 -0
  1020. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-colors.d.ts +0 -0
  1021. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-colors.d.ts.map +0 -0
  1022. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-colors.js +0 -0
  1023. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-colors.js.map +0 -0
  1024. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-image.d.ts +0 -0
  1025. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-image.d.ts.map +0 -0
  1026. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-image.js +0 -0
  1027. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal-image.js.map +0 -0
  1028. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal.d.ts +0 -0
  1029. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal.d.ts.map +0 -0
  1030. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal.js +0 -0
  1031. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/terminal.js.map +0 -0
  1032. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-alt-screen.d.ts +0 -0
  1033. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-alt-screen.d.ts.map +0 -0
  1034. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-alt-screen.js +0 -0
  1035. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-alt-screen.js.map +0 -0
  1036. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-main-screen.d.ts +0 -0
  1037. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-main-screen.d.ts.map +0 -0
  1038. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-main-screen.js +0 -0
  1039. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui-main-screen.js.map +0 -0
  1040. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui.d.ts +0 -0
  1041. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui.d.ts.map +0 -0
  1042. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui.js +0 -0
  1043. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/tui.js.map +0 -0
  1044. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/undo-stack.d.ts +0 -0
  1045. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/undo-stack.d.ts.map +0 -0
  1046. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/undo-stack.js +0 -0
  1047. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/undo-stack.js.map +0 -0
  1048. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/utils.d.ts +0 -0
  1049. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/utils.d.ts.map +0 -0
  1050. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/utils.js +0 -0
  1051. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/utils.js.map +0 -0
  1052. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/wheel-scroll.d.ts +0 -0
  1053. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/wheel-scroll.d.ts.map +0 -0
  1054. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/wheel-scroll.js +0 -0
  1055. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/wheel-scroll.js.map +0 -0
  1056. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/word-navigation.d.ts +0 -0
  1057. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/word-navigation.d.ts.map +0 -0
  1058. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/word-navigation.js +0 -0
  1059. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/dist/word-navigation.js.map +0 -0
  1060. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/clipboard.h +0 -0
  1061. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/darwin/README.md +0 -0
  1062. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/darwin/build.sh +0 -0
  1063. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/darwin/prebuilds/darwin-arm64/darwin-platform.node +0 -0
  1064. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/darwin/prebuilds/darwin-x64/darwin-platform.node +0 -0
  1065. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/darwin/src/darwin-platform.m +0 -0
  1066. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/linux/README.md +0 -0
  1067. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/linux/build.sh +0 -0
  1068. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/linux/prebuilds/linux-arm64/linux-platform-x11.node +0 -0
  1069. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/linux/prebuilds/linux-x64/linux-platform-x11.node +0 -0
  1070. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/linux/src/clipboard-worker.h +0 -0
  1071. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/linux/src/linux-platform-x11.c +0 -0
  1072. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/napi.h +0 -0
  1073. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/win32/README.md +0 -0
  1074. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/win32/build.mjs +0 -0
  1075. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/win32/prebuilds/win32-arm64/win32-platform.node +0 -0
  1076. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/win32/prebuilds/win32-x64/win32-platform.node +0 -0
  1077. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/native/win32/src/win32-platform.c +0 -0
  1078. /package/node_modules/@earendil-works/{pi-tui → pi-coding-agent/node_modules/@earendil-works/pi-tui}/package.json +0 -0
  1079. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/LICENSE +0 -0
  1080. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/README.md +0 -0
  1081. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Agent.md +0 -0
  1082. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/BalancedPool.md +0 -0
  1083. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/CacheStorage.md +0 -0
  1084. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/CacheStore.md +0 -0
  1085. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Client.md +0 -0
  1086. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/ClientStats.md +0 -0
  1087. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Connector.md +0 -0
  1088. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/ContentType.md +0 -0
  1089. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Cookies.md +0 -0
  1090. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Debug.md +0 -0
  1091. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/DiagnosticsChannel.md +0 -0
  1092. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Dispatcher.md +0 -0
  1093. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/EnvHttpProxyAgent.md +0 -0
  1094. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Errors.md +0 -0
  1095. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/EventSource.md +0 -0
  1096. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Fetch.md +0 -0
  1097. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/GlobalInstallation.md +0 -0
  1098. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/H2CClient.md +0 -0
  1099. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Interceptors.md +0 -0
  1100. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/MockAgent.md +0 -0
  1101. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/MockCallHistory.md +0 -0
  1102. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/MockCallHistoryLog.md +0 -0
  1103. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/MockClient.md +0 -0
  1104. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/MockErrors.md +0 -0
  1105. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/MockPool.md +0 -0
  1106. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Pool.md +0 -0
  1107. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/PoolStats.md +0 -0
  1108. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/ProxyAgent.md +0 -0
  1109. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/RedirectHandler.md +0 -0
  1110. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/RetryAgent.md +0 -0
  1111. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/RetryHandler.md +0 -0
  1112. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/RoundRobinPool.md +0 -0
  1113. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/SnapshotAgent.md +0 -0
  1114. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Socks5ProxyAgent.md +0 -0
  1115. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/Util.md +0 -0
  1116. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/WebSocket.md +0 -0
  1117. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/api/api-lifecycle.md +0 -0
  1118. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/client-certificate.md +0 -0
  1119. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/crawling.md +0 -0
  1120. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/migrating-from-v7-to-v8.md +0 -0
  1121. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/mocking-request.md +0 -0
  1122. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/proxy.md +0 -0
  1123. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/undici-vs-builtin-fetch.md +0 -0
  1124. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/best-practices/writing-tests.md +0 -0
  1125. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/getting-started.md +0 -0
  1126. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/index.md +0 -0
  1127. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/site.json +0 -0
  1128. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/docs/docs/type-map.json +0 -0
  1129. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/index-fetch.js +0 -0
  1130. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/index.d.ts +0 -0
  1131. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/index.js +0 -0
  1132. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/abort-signal.js +0 -0
  1133. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/api-connect.js +0 -0
  1134. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/api-pipeline.js +0 -0
  1135. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/api-request.js +0 -0
  1136. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/api-stream.js +0 -0
  1137. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/api-upgrade.js +0 -0
  1138. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/index.js +0 -0
  1139. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/api/readable.js +0 -0
  1140. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/cache/memory-cache-store.js +0 -0
  1141. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/cache/sqlite-cache-store.js +0 -0
  1142. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/connect.js +0 -0
  1143. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/constants.js +0 -0
  1144. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/diagnostics.js +0 -0
  1145. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/errors.js +0 -0
  1146. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/request.js +0 -0
  1147. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/socks5-client.js +0 -0
  1148. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/socks5-utils.js +0 -0
  1149. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/symbols.js +0 -0
  1150. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/tree.js +0 -0
  1151. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/core/util.js +0 -0
  1152. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/agent.js +0 -0
  1153. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/balanced-pool.js +0 -0
  1154. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/client-h1.js +0 -0
  1155. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/client-h2.js +0 -0
  1156. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/client.js +0 -0
  1157. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/dispatcher-base.js +0 -0
  1158. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/dispatcher.js +0 -0
  1159. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/dispatcher1-wrapper.js +0 -0
  1160. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/env-http-proxy-agent.js +0 -0
  1161. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/fixed-queue.js +0 -0
  1162. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/h2c-client.js +0 -0
  1163. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/pool-base.js +0 -0
  1164. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/pool.js +0 -0
  1165. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/proxy-agent.js +0 -0
  1166. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/retry-agent.js +0 -0
  1167. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/round-robin-pool.js +0 -0
  1168. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/dispatcher/socks5-proxy-agent.js +0 -0
  1169. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/encoding/index.js +0 -0
  1170. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/global.js +0 -0
  1171. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/handler/cache-handler.js +0 -0
  1172. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/handler/cache-revalidation-handler.js +0 -0
  1173. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/handler/decorator-handler.js +0 -0
  1174. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/handler/deduplication-handler.js +0 -0
  1175. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/handler/redirect-handler.js +0 -0
  1176. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/handler/retry-handler.js +0 -0
  1177. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/cache.js +0 -0
  1178. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/decompress.js +0 -0
  1179. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/deduplicate.js +0 -0
  1180. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/dns.js +0 -0
  1181. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/dump.js +0 -0
  1182. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/redirect.js +0 -0
  1183. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/response-error.js +0 -0
  1184. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/interceptor/retry.js +0 -0
  1185. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/llhttp/constants.d.ts +0 -0
  1186. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/llhttp/constants.js +0 -0
  1187. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/llhttp/llhttp-wasm.js +0 -0
  1188. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/llhttp/llhttp_simd-wasm.js +0 -0
  1189. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/llhttp/utils.d.ts +0 -0
  1190. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/llhttp/utils.js +0 -0
  1191. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-agent.js +0 -0
  1192. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-call-history.js +0 -0
  1193. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-client.js +0 -0
  1194. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-errors.js +0 -0
  1195. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-interceptor.js +0 -0
  1196. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-pool.js +0 -0
  1197. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-symbols.js +0 -0
  1198. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/mock-utils.js +0 -0
  1199. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/pending-interceptors-formatter.js +0 -0
  1200. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/snapshot-agent.js +0 -0
  1201. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/snapshot-recorder.js +0 -0
  1202. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/mock/snapshot-utils.js +0 -0
  1203. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/util/cache.js +0 -0
  1204. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/util/date.js +0 -0
  1205. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/util/runtime-features.js +0 -0
  1206. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/util/stats.js +0 -0
  1207. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/util/timers.js +0 -0
  1208. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cache/cache.js +0 -0
  1209. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cache/cachestorage.js +0 -0
  1210. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cache/util.js +0 -0
  1211. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cookies/constants.js +0 -0
  1212. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cookies/index.js +0 -0
  1213. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cookies/parse.js +0 -0
  1214. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/cookies/util.js +0 -0
  1215. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/eventsource/eventsource-stream.js +0 -0
  1216. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/eventsource/eventsource.js +0 -0
  1217. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/eventsource/util.js +0 -0
  1218. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/LICENSE +0 -0
  1219. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/body.js +0 -0
  1220. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/constants.js +0 -0
  1221. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/data-url.js +0 -0
  1222. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/formdata-parser.js +0 -0
  1223. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/formdata.js +0 -0
  1224. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/global.js +0 -0
  1225. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/headers.js +0 -0
  1226. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/index.js +0 -0
  1227. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/request.js +0 -0
  1228. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/response.js +0 -0
  1229. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/fetch/util.js +0 -0
  1230. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/infra/index.js +0 -0
  1231. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/subresource-integrity/Readme.md +0 -0
  1232. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/subresource-integrity/subresource-integrity.js +0 -0
  1233. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/webidl/index.js +0 -0
  1234. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/connection.js +0 -0
  1235. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/constants.js +0 -0
  1236. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/events.js +0 -0
  1237. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/frame.js +0 -0
  1238. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/permessage-deflate.js +0 -0
  1239. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/receiver.js +0 -0
  1240. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/sender.js +0 -0
  1241. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/stream/websocketerror.js +0 -0
  1242. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/stream/websocketstream.js +0 -0
  1243. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/util.js +0 -0
  1244. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/lib/web/websocket/websocket.js +0 -0
  1245. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/package.json +0 -0
  1246. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/scripts/strip-comments.js +0 -0
  1247. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/README.md +0 -0
  1248. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/agent.d.ts +0 -0
  1249. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/api.d.ts +0 -0
  1250. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/balanced-pool.d.ts +0 -0
  1251. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/cache-interceptor.d.ts +0 -0
  1252. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/cache.d.ts +0 -0
  1253. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/client-stats.d.ts +0 -0
  1254. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/client.d.ts +0 -0
  1255. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/connector.d.ts +0 -0
  1256. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/content-type.d.ts +0 -0
  1257. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/cookies.d.ts +0 -0
  1258. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/diagnostics-channel.d.ts +0 -0
  1259. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/dispatcher.d.ts +0 -0
  1260. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/dispatcher1-wrapper.d.ts +0 -0
  1261. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/env-http-proxy-agent.d.ts +0 -0
  1262. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/errors.d.ts +0 -0
  1263. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/eventsource.d.ts +0 -0
  1264. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/fetch.d.ts +0 -0
  1265. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/formdata.d.ts +0 -0
  1266. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/global-dispatcher.d.ts +0 -0
  1267. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/global-origin.d.ts +0 -0
  1268. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/h2c-client.d.ts +0 -0
  1269. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/handlers.d.ts +0 -0
  1270. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/header.d.ts +0 -0
  1271. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/index.d.ts +0 -0
  1272. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/interceptors.d.ts +0 -0
  1273. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/mock-agent.d.ts +0 -0
  1274. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/mock-call-history.d.ts +0 -0
  1275. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/mock-client.d.ts +0 -0
  1276. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/mock-errors.d.ts +0 -0
  1277. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/mock-interceptor.d.ts +0 -0
  1278. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/mock-pool.d.ts +0 -0
  1279. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/patch.d.ts +0 -0
  1280. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/pool-stats.d.ts +0 -0
  1281. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/pool.d.ts +0 -0
  1282. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/proxy-agent.d.ts +0 -0
  1283. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/readable.d.ts +0 -0
  1284. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/retry-agent.d.ts +0 -0
  1285. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/retry-handler.d.ts +0 -0
  1286. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/round-robin-pool.d.ts +0 -0
  1287. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/snapshot-agent.d.ts +0 -0
  1288. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/socks5-proxy-agent.d.ts +0 -0
  1289. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/util.d.ts +0 -0
  1290. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/utility.d.ts +0 -0
  1291. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/webidl.d.ts +0 -0
  1292. /package/node_modules/{undici → @earendil-works/pi-coding-agent/node_modules/undici}/types/websocket.d.ts +0 -0
@@ -0,0 +1,293 @@
1
+ /**
2
+ * Drives one QuickJS VM through one script, independent of the transport that connects it to the
3
+ * host. The worker thread, the in-thread launcher, and the remote server all run the VM through
4
+ * this module, so the bridge between prelude and host exists once.
5
+ *
6
+ * Contract with the caller:
7
+ * - `post` receives every message for the host, synchronously from inside VM callbacks. The
8
+ * caller must not re-enter the VM from `post` (no `deliver`, no `dispose`); a worker posts to
9
+ * another thread, and the in-thread launcher defers delivery to a microtask.
10
+ * - `deliver` hands the VM a tool result and runs the script until it waits again. It must only be
11
+ * called while the VM is idle, which holds for any caller that never re-enters from `post`.
12
+ * - `shouldInterrupt` is polled by QuickJS while the script runs, and here between batches of
13
+ * promise jobs. Returning true throws an uncatchable error in the script; the VM then reports
14
+ * `crash` or a failed `done`. The job batches matter for a script such as `while (true) await
15
+ * null`: every iteration is a separate job that executes only a few opcodes, so QuickJS's own
16
+ * polling, which counts opcodes, would let it run for a long time between polls.
17
+ * - The VM never decides on its own when it is finished: after `done` or `crash` it stays alive
18
+ * until the caller disposes it (or terminates the worker that hosts it).
19
+ *
20
+ * Failures after the VM exists are reported as a `crash` message; `startVm` only rejects when the
21
+ * VM cannot be created at all.
22
+ *
23
+ * Deterministic mode (`data.deterministic`, used by `CodemodeSandboxBase.start()`): a script must make the same
24
+ * calls with the same arguments every time it runs with the same results, so a host can replay it after a restart.
25
+ * The VM is otherwise deterministic, because it only runs when the host delivers something and has no timers.
26
+ * What remains is fixed here:
27
+ * - Time: every WASI clock reads virtual time, `startedAt` and then the `now` of the result being processed, never going backwards.
28
+ * While the context is created, the realtime clock reads a value derived from the seed instead, because QuickJS
29
+ * seeds `Math.random()` from the first clock read, and which read comes first is the engine's business.
30
+ * - Randomness: `random_get` draws from a PRNG over the seed.
31
+ * - Timezone: UTC, not the host's.
32
+ * - Garbage collection: `WeakRef` and `FinalizationRegistry` are not available; collection timing is not.
33
+ * - Delivery order: results carry a `seq` and are applied strictly in that order, buffering early ones, because a
34
+ * transport (RPC replies) may deliver them in another order than the host sent them.
35
+ * The VM reports `started` with its fingerprint before the script runs, and `idle` with the number of calls issued
36
+ * after each drain, so the host can check a replay step by step.
37
+ */
38
+ import { Intrinsics, JSException, MAX_STACK_SIZE, QuickJS } from "quickjs-wasi";
39
+ import { PRELUDE_SOURCE } from "./prelude-source.js";
40
+ /**
41
+ * Bumped whenever this module or the prelude changes what a deterministic script observes, beyond what the
42
+ * fingerprint's other parts (engine versions, prelude hash, limits) already capture.
43
+ */
44
+ const DETERMINISTIC_VERSION = 1;
45
+ /** FNV-1a over UTF-16 code units, as 8 hex digits: identifies the prelude in the fingerprint. */
46
+ function fnv1a(text) {
47
+ let hash = 0x811c9dc5;
48
+ for (let index = 0; index < text.length; index++) {
49
+ hash ^= text.charCodeAt(index);
50
+ hash = Math.imul(hash, 0x01000193);
51
+ }
52
+ return (hash >>> 0).toString(16).padStart(8, "0");
53
+ }
54
+ const PRELUDE_HASH = fnv1a(PRELUDE_SOURCE);
55
+ /** mulberry32: a small, fast PRNG; one 32-bit draw per call. */
56
+ function prng(seed) {
57
+ let state = seed >>> 0;
58
+ return () => {
59
+ state = (state + 0x6d2b79f5) >>> 0;
60
+ let value = Math.imul(state ^ (state >>> 15), 1 | state);
61
+ value = (value + Math.imul(value ^ (value >>> 7), 61 | value)) ^ value;
62
+ return (value ^ (value >>> 14)) >>> 0;
63
+ };
64
+ }
65
+ /** WASI clock and random functions for deterministic mode, on top of {@link discardOutput}. */
66
+ function deterministicWasi(clock) {
67
+ const random = prng(clock.seed ^ 0x9e3779b9);
68
+ return (memory) => ({
69
+ ...discardOutput(memory),
70
+ clock_time_get(clockId, _precision, resultPtr) {
71
+ let nanoseconds;
72
+ // QuickJS seeds Math.random() from this reading in microseconds and turns 0 into 1, so seed s reads s + 1.
73
+ if (clock.creating)
74
+ nanoseconds = clockId === 0 ? BigInt(clock.seed + 1) * 1000n : 0n;
75
+ else if (clockId === 0)
76
+ nanoseconds = BigInt(Math.round(clock.now)) * 1000000n;
77
+ else
78
+ nanoseconds = BigInt(Math.round(clock.now - clock.startedAt)) * 1000000n;
79
+ new DataView(memory.buffer).setBigUint64(resultPtr, nanoseconds, true);
80
+ return 0;
81
+ },
82
+ random_get(bufPtr, bufLen) {
83
+ const bytes = new Uint8Array(memory.buffer, bufPtr, bufLen);
84
+ for (let index = 0; index < bufLen; index += 4) {
85
+ const value = random();
86
+ for (let byte = 0; byte < 4 && index + byte < bufLen; byte++)
87
+ bytes[index + byte] = value >>> (byte * 8);
88
+ }
89
+ return 0;
90
+ },
91
+ });
92
+ }
93
+ /**
94
+ * QuickJS writes engine diagnostics to fd 1 and 2, which the default shim
95
+ * forwards to the host's stdout and stderr. That output belongs to the host
96
+ * application (for example a TUI), so it is discarded. Reporting every byte as
97
+ * written keeps libc from retrying.
98
+ */
99
+ function discardOutput(memory) {
100
+ return {
101
+ fd_write(_fd, iovsPtr, iovsLen, nwrittenPtr) {
102
+ const view = new DataView(memory.buffer);
103
+ let written = 0;
104
+ for (let i = 0; i < iovsLen; i++) {
105
+ written += view.getUint32(iovsPtr + i * 8 + 4, true);
106
+ }
107
+ view.setUint32(nwrittenPtr, written, true);
108
+ return 0;
109
+ },
110
+ };
111
+ }
112
+ function describeException(error) {
113
+ const head = error.message ? `${error.name}: ${error.message}` : error.name;
114
+ const stack = error.stack?.trimEnd();
115
+ return JSON.stringify({ name: error.name, message: error.message, stack: stack ? `${head}\n${stack}` : head });
116
+ }
117
+ /** Promise jobs run between two `shouldInterrupt` polls while draining the job queue. */
118
+ const JOBS_PER_POLL = 50;
119
+ function crashMessage(error) {
120
+ return { type: "crash", message: error instanceof Error ? `${error.name}: ${error.message}` : String(error) };
121
+ }
122
+ export async function startVm(options) {
123
+ const { data, post } = options;
124
+ const maxStackSize = options.maxStackSize ?? MAX_STACK_SIZE;
125
+ const deterministic = data.deterministic;
126
+ const clock = deterministic && {
127
+ creating: true,
128
+ startedAt: deterministic.startedAt,
129
+ now: deterministic.startedAt,
130
+ seed: deterministic.seed >>> 0,
131
+ };
132
+ const vm = await QuickJS.create({
133
+ wasm: options.wasm,
134
+ memoryLimit: data.memoryLimitBytes,
135
+ // Without a guard, deep recursion overflows the wasm stack and traps instead of throwing a
136
+ // catchable RangeError.
137
+ maxStackSize,
138
+ interruptHandler: options.shouldInterrupt,
139
+ wasi: clock ? deterministicWasi(clock) : discardOutput,
140
+ ...(clock ? { timezoneOffset: 0, intrinsics: Intrinsics.ALL & ~Intrinsics.WEAK_REF } : {}),
141
+ });
142
+ if (clock)
143
+ clock.creating = false;
144
+ let disposed = false;
145
+ /** Calls the script has issued, tools and globals; reported with every `idle`. */
146
+ let issued = 0;
147
+ /** Deterministic mode: the next result to apply, and results that arrived before it. */
148
+ let nextSeq = 1;
149
+ /** The result being processed, 0 during the script's first run; reported with `done`. */
150
+ let current = 0;
151
+ const early = new Map();
152
+ const apply = (message) => {
153
+ vm.withScope(() => {
154
+ vm.callFunction(settle, api, vm.newNumber(message.id), message.ok ? vm.true : vm.false, message.payload === undefined ? vm.undefined : vm.newString(message.payload), message.properties === undefined ? vm.undefined : vm.newString(message.properties));
155
+ });
156
+ drain();
157
+ };
158
+ const session = {
159
+ deliver(message) {
160
+ if (disposed)
161
+ return;
162
+ try {
163
+ if (!clock) {
164
+ apply(message);
165
+ return;
166
+ }
167
+ const { seq } = message;
168
+ if (seq === undefined || !Number.isInteger(seq) || seq < nextSeq || early.has(seq)) {
169
+ throw new Error(`Result ${message.id} has sequence number ${seq}, expected ${nextSeq} or later, once`);
170
+ }
171
+ early.set(seq, message);
172
+ for (let next = early.get(nextSeq); next !== undefined; next = early.get(nextSeq)) {
173
+ early.delete(nextSeq);
174
+ // Never backwards: a resumed host's clock may be behind the one that started the run.
175
+ if (next.now !== undefined && Number.isFinite(next.now))
176
+ clock.now = Math.max(clock.now, next.now);
177
+ current = nextSeq;
178
+ apply(next);
179
+ post({ type: "idle", seq: nextSeq, issued });
180
+ nextSeq++;
181
+ }
182
+ }
183
+ catch (error) {
184
+ post(crashMessage(error));
185
+ }
186
+ },
187
+ dispose() {
188
+ if (disposed)
189
+ return;
190
+ disposed = true;
191
+ vm.dispose();
192
+ },
193
+ };
194
+ let api;
195
+ let settle;
196
+ let stalled;
197
+ // `executePendingJobs()` runs the queue to empty without a chance to interrupt, so jobs run one at a
198
+ // time through the (internal, but public) exports; quickjs-wasi is pinned to an exact version.
199
+ const exports = vm._getExports();
200
+ /** Run queued jobs, then fail a script that waits on nothing that can ever resume it. */
201
+ const drain = () => {
202
+ let jobs = 0;
203
+ while (exports.qjs_is_job_pending()) {
204
+ // A job only fails for uncatchable errors, such as an interrupt.
205
+ if (exports.qjs_execute_pending_job() < 0)
206
+ throw new Error("Promise job failed");
207
+ if (++jobs % JOBS_PER_POLL === 0 && options.shouldInterrupt())
208
+ throw new Error("Execution interrupted");
209
+ }
210
+ vm.callFunction(stalled, api).dispose();
211
+ };
212
+ try {
213
+ // Called from the prelude with primitives only.
214
+ const bridge = vm.newFunction("bridge", (kind, a, b, c) => {
215
+ switch (kind.toString()) {
216
+ case "call":
217
+ case "global":
218
+ issued++;
219
+ post({
220
+ type: "call",
221
+ id: a.toNumber(),
222
+ target: kind.toString() === "call" ? "tool" : "global",
223
+ name: b.toString(),
224
+ args: c === undefined || c.isUndefined ? undefined : c.toString(),
225
+ });
226
+ break;
227
+ case "output":
228
+ post({
229
+ type: "output",
230
+ item: a.toString() === "image"
231
+ ? { type: "image", data: b.toString(), mimeType: c.toString() }
232
+ : a.toString() === "console"
233
+ ? { type: "text", text: b.toString(), console: true }
234
+ : { type: "text", text: b.toString() },
235
+ });
236
+ break;
237
+ case "done": {
238
+ // The host stops the VM on `done`, so the `idle` of this drain never arrives: report its numbers here.
239
+ const during = clock ? { during: { seq: current, issued } } : {};
240
+ if (a.toBoolean()) {
241
+ post({
242
+ type: "done",
243
+ ok: true,
244
+ value: b === undefined || b.isUndefined ? undefined : b.toString(),
245
+ writes: c.toString(),
246
+ ...during,
247
+ });
248
+ }
249
+ else {
250
+ post({ type: "done", ok: false, error: b.toString(), ...during });
251
+ }
252
+ break;
253
+ }
254
+ }
255
+ return vm.undefined;
256
+ });
257
+ // These handles live as long as the VM, which the caller disposes as a whole.
258
+ api = vm.withScope((scope) => scope.escape(vm.callFunction(vm.evalCode(PRELUDE_SOURCE, "codemode-prelude.js"), vm.undefined, bridge, vm.newString(JSON.stringify(data.tools)), vm.newString(JSON.stringify(data.globals)), vm.newString(JSON.stringify(data.store)))));
259
+ settle = api.getProp("settle");
260
+ const run = api.getProp("run");
261
+ stalled = api.getProp("stalled");
262
+ if (clock) {
263
+ const versions = vm.versions;
264
+ const budget = options.interruptBudget ?? "none";
265
+ post({
266
+ type: "started",
267
+ fingerprint: `quickjs-wasi ${versions["quickjs-wasi"]}, quickjs ${versions.quickjs}, prelude ${PRELUDE_HASH}, deterministic ${DETERMINISTIC_VERSION}, stack ${maxStackSize}, heap ${data.memoryLimitBytes ?? "none"}, budget ${budget}`,
268
+ });
269
+ }
270
+ // The prefix shares the first line with the script so reported line numbers
271
+ // match the script as written.
272
+ let fn;
273
+ try {
274
+ fn = vm.evalCode(`(async (tools, console) => {${data.code}\n})`, "codemode.js");
275
+ }
276
+ catch (error) {
277
+ if (!(error instanceof JSException))
278
+ throw error;
279
+ post({ type: "done", ok: false, error: describeException(error) });
280
+ return session;
281
+ }
282
+ vm.callFunction(run, api, fn).dispose();
283
+ fn.dispose();
284
+ drain();
285
+ if (clock)
286
+ post({ type: "idle", seq: 0, issued });
287
+ }
288
+ catch (error) {
289
+ post(crashMessage(error));
290
+ }
291
+ return session;
292
+ }
293
+ //# sourceMappingURL=vm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vm.js","sourceRoot":"","sources":["../../src/runtime/vm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAsB,cAAc,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEpG,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAyBrD;;;GAGG;AACH,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEhC,iGAAiG;AACjG,SAAS,KAAK,CAAC,IAAY;IAC1B,IAAI,IAAI,GAAG,UAAU,CAAC;IACtB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QAClD,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC/B,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,YAAY,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;AAE3C,gEAAgE;AAChE,SAAS,IAAI,CAAC,IAAY;IACzB,IAAI,KAAK,GAAG,IAAI,KAAK,CAAC,CAAC;IACvB,OAAO,GAAG,EAAE;QACX,KAAK,GAAG,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,KAAK,GAAG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C;AAChB,CAAC","sourcesContent":["/**\n * Drives one QuickJS VM through one script, independent of the transport that connects it to the\n * host. The worker thread, the in-thread launcher, and the remote server all run the VM through\n * this module, so the bridge between prelude and host exists once.\n *\n * Contract with the caller:\n * - `post` receives every message for the host, synchronously from inside VM callbacks. The\n * caller must not re-enter the VM from `post` (no `deliver`, no `dispose`); a worker posts to\n * another thread, and the in-thread launcher defers delivery to a microtask.\n * - `deliver` hands the VM a tool result and runs the script until it waits again. It must only be\n * called while the VM is idle, which holds for any caller that never re-enters from `post`.\n * - `shouldInterrupt` is polled by QuickJS while the script runs, and here between batches of\n * promise jobs. Returning true throws an uncatchable error in the script; the VM then reports\n * `crash` or a failed `done`. The job batches matter for a script such as `while (true) await\n * null`: every iteration is a separate job that executes only a few opcodes, so QuickJS's own\n * polling, which counts opcodes, would let it run for a long time between polls.\n * - The VM never decides on its own when it is finished: after `done` or `crash` it stays alive\n * until the caller disposes it (or terminates the worker that hosts it).\n *\n * Failures after the VM exists are reported as a `crash` message; `startVm` only rejects when the\n * VM cannot be created at all.\n *\n * Deterministic mode (`data.deterministic`, used by `CodemodeSandboxBase.start()`): a script must make the same\n * calls with the same arguments every time it runs with the same results, so a host can replay it after a restart.\n * The VM is otherwise deterministic, because it only runs when the host delivers something and has no timers.\n * What remains is fixed here:\n * - Time: every WASI clock reads virtual time, `startedAt` and then the `now` of the result being processed, never going backwards.\n * While the context is created, the realtime clock reads a value derived from the seed instead, because QuickJS\n * seeds `Math.random()` from the first clock read, and which read comes first is the engine's business.\n * - Randomness: `random_get` draws from a PRNG over the seed.\n * - Timezone: UTC, not the host's.\n * - Garbage collection: `WeakRef` and `FinalizationRegistry` are not available; collection timing is not.\n * - Delivery order: results carry a `seq` and are applied strictly in that order, buffering early ones, because a\n * transport (RPC replies) may deliver them in another order than the host sent them.\n * The VM reports `started` with its fingerprint before the script runs, and `idle` with the number of calls issued\n * after each drain, so the host can check a replay step by step.\n */\nimport { Intrinsics, JSException, type JSValueHandle, MAX_STACK_SIZE, QuickJS } from \"quickjs-wasi\";\nimport type { CodemodeWasmModule } from \"../wasm.ts\";\nimport { PRELUDE_SOURCE } from \"./prelude-source.ts\";\nimport type { HostToWorkerMessage, VmStartData, WorkerToHostMessage } from \"./protocol.ts\";\n\nexport interface VmSession {\n\tdeliver(message: HostToWorkerMessage): void;\n\t/** Releases the VM's wasm instance. The session must not be used afterwards. */\n\tdispose(): void;\n}\n\nexport interface StartVmOptions {\n\tdata: VmStartData;\n\twasm: CodemodeWasmModule;\n\t/**\n\t * QuickJS's guard on its own stack, which turns deep recursion into a catchable `RangeError`.\n\t * The wasm frames also use the host thread's native stack, so the guard must trip before that\n\t * stack runs out: a host overflow fails the whole execution instead. Default: `MAX_STACK_SIZE`\n\t * (512 KiB), which fits the 4 MB stack of a Node worker thread but not a 1 MB main thread.\n\t */\n\tmaxStackSize?: number;\n\t/** Interrupt polls this VM may use, if the launcher counts them; part of the fingerprint. */\n\tinterruptBudget?: number;\n\tpost(message: WorkerToHostMessage): void;\n\tshouldInterrupt(): boolean;\n}\n\n/**\n * Bumped whenever this module or the prelude changes what a deterministic script observes, beyond what the\n * fingerprint's other parts (engine versions, prelude hash, limits) already capture.\n */\nconst DETERMINISTIC_VERSION = 1;\n\n/** FNV-1a over UTF-16 code units, as 8 hex digits: identifies the prelude in the fingerprint. */\nfunction fnv1a(text: string): string {\n\tlet hash = 0x811c9dc5;\n\tfor (let index = 0; index < text.length; index++) {\n\t\thash ^= text.charCodeAt(index);\n\t\thash = Math.imul(hash, 0x01000193);\n\t}\n\treturn (hash >>> 0).toString(16).padStart(8, \"0\");\n}\n\nconst PRELUDE_HASH = fnv1a(PRELUDE_SOURCE);\n\n/** mulberry32: a small, fast PRNG; one 32-bit draw per call. */\nfunction prng(seed: number): () => number {\n\tlet state = seed >>> 0;\n\treturn () => {\n\t\tstate = (state + 0x6d2b79f5) >>> 0;\n\t\tlet value = Math.imul(state ^ (state >>> 15), 1 | state);\n\t\tvalue = (value + Math.imul(value ^ (value >>> 7), 61 | value)) ^ value;\n\t\treturn (value ^ (value >>> 14)) >>> 0;\n\t};\n}\n\n/** The deterministic VM's clock: seed-derived while the context is created, then virtual time. */\ninterface VirtualClock {\n\tcreating: boolean;\n\tstartedAt: number;\n\tnow: number;\n\tseed: number;\n}\n\n/** WASI clock and random functions for deterministic mode, on top of {@link discardOutput}. */\nfunction deterministicWasi(clock: VirtualClock) {\n\tconst random = prng(clock.seed ^ 0x9e3779b9);\n\treturn (memory: { readonly buffer: ArrayBufferLike }) => ({\n\t\t...discardOutput(memory),\n\t\tclock_time_get(clockId: number, _precision: bigint, resultPtr: number): number {\n\t\t\tlet nanoseconds: bigint;\n\t\t\t// QuickJS seeds Math.random() from this reading in microseconds and turns 0 into 1, so seed s reads s + 1.\n\t\t\tif (clock.creating) nanoseconds = clockId === 0 ? BigInt(clock.seed + 1) * 1000n : 0n;\n\t\t\telse if (clockId === 0) nanoseconds = BigInt(Math.round(clock.now)) * 1_000_000n;\n\t\t\telse nanoseconds = BigInt(Math.round(clock.now - clock.startedAt)) * 1_000_000n;\n\t\t\tnew DataView(memory.buffer).setBigUint64(resultPtr, nanoseconds, true);\n\t\t\treturn 0;\n\t\t},\n\t\trandom_get(bufPtr: number, bufLen: number): number {\n\t\t\tconst bytes = new Uint8Array(memory.buffer, bufPtr, bufLen);\n\t\t\tfor (let index = 0; index < bufLen; index += 4) {\n\t\t\t\tconst value = random();\n\t\t\t\tfor (let byte = 0; byte < 4 && index + byte < bufLen; byte++) bytes[index + byte] = value >>> (byte * 8);\n\t\t\t}\n\t\t\treturn 0;\n\t\t},\n\t});\n}\n\n/**\n * QuickJS writes engine diagnostics to fd 1 and 2, which the default shim\n * forwards to the host's stdout and stderr. That output belongs to the host\n * application (for example a TUI), so it is discarded. Reporting every byte as\n * written keeps libc from retrying.\n */\nfunction discardOutput(memory: { readonly buffer: ArrayBufferLike }) {\n\treturn {\n\t\tfd_write(_fd: number, iovsPtr: number, iovsLen: number, nwrittenPtr: number): number {\n\t\t\tconst view = new DataView(memory.buffer);\n\t\t\tlet written = 0;\n\t\t\tfor (let i = 0; i < iovsLen; i++) {\n\t\t\t\twritten += view.getUint32(iovsPtr + i * 8 + 4, true);\n\t\t\t}\n\t\t\tview.setUint32(nwrittenPtr, written, true);\n\t\t\treturn 0;\n\t\t},\n\t};\n}\n\nfunction describeException(error: JSException): string {\n\tconst head = error.message ? `${error.name}: ${error.message}` : error.name;\n\tconst stack = error.stack?.trimEnd();\n\treturn JSON.stringify({ name: error.name, message: error.message, stack: stack ? `${head}\\n${stack}` : head });\n}\n\n/** Promise jobs run between two `shouldInterrupt` polls while draining the job queue. */\nconst JOBS_PER_POLL = 50;\n\nfunction crashMessage(error: unknown): WorkerToHostMessage {\n\treturn { type: \"crash\", message: error instanceof Error ? `${error.name}: ${error.message}` : String(error) };\n}\n\nexport async function startVm(options: StartVmOptions): Promise<VmSession> {\n\tconst { data, post } = options;\n\tconst maxStackSize = options.maxStackSize ?? MAX_STACK_SIZE;\n\tconst deterministic = data.deterministic;\n\tconst clock: VirtualClock | undefined = deterministic && {\n\t\tcreating: true,\n\t\tstartedAt: deterministic.startedAt,\n\t\tnow: deterministic.startedAt,\n\t\tseed: deterministic.seed >>> 0,\n\t};\n\tconst vm = await QuickJS.create({\n\t\twasm: options.wasm,\n\t\tmemoryLimit: data.memoryLimitBytes,\n\t\t// Without a guard, deep recursion overflows the wasm stack and traps instead of throwing a\n\t\t// catchable RangeError.\n\t\tmaxStackSize,\n\t\tinterruptHandler: options.shouldInterrupt,\n\t\twasi: clock ? deterministicWasi(clock) : discardOutput,\n\t\t...(clock ? { timezoneOffset: 0, intrinsics: Intrinsics.ALL & ~Intrinsics.WEAK_REF } : {}),\n\t});\n\tif (clock) clock.creating = false;\n\tlet disposed = false;\n\t/** Calls the script has issued, tools and globals; reported with every `idle`. */\n\tlet issued = 0;\n\t/** Deterministic mode: the next result to apply, and results that arrived before it. */\n\tlet nextSeq = 1;\n\t/** The result being processed, 0 during the script's first run; reported with `done`. */\n\tlet current = 0;\n\tconst early = new Map<number, HostToWorkerMessage>();\n\tconst apply = (message: HostToWorkerMessage): void => {\n\t\tvm.withScope(() => {\n\t\t\tvm.callFunction(\n\t\t\t\tsettle,\n\t\t\t\tapi,\n\t\t\t\tvm.newNumber(message.id),\n\t\t\t\tmessage.ok ? vm.true : vm.false,\n\t\t\t\tmessage.payload === undefined ? vm.undefined : vm.newString(message.payload),\n\t\t\t\tmessage.properties === undefined ? vm.undefined : vm.newString(message.properties),\n\t\t\t);\n\t\t});\n\t\tdrain();\n\t};\n\tconst session: VmSession = {\n\t\tdeliver(message) {\n\t\t\tif (disposed) return;\n\t\t\ttry {\n\t\t\t\tif (!clock) {\n\t\t\t\t\tapply(message);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst { seq } = message;\n\t\t\t\tif (seq === undefined || !Number.isInteger(seq) || seq < nextSeq || early.has(seq)) {\n\t\t\t\t\tthrow new Error(`Result ${message.id} has sequence number ${seq}, expected ${nextSeq} or later, once`);\n\t\t\t\t}\n\t\t\t\tearly.set(seq, message);\n\t\t\t\tfor (let next = early.get(nextSeq); next !== undefined; next = early.get(nextSeq)) {\n\t\t\t\t\tearly.delete(nextSeq);\n\t\t\t\t\t// Never backwards: a resumed host's clock may be behind the one that started the run.\n\t\t\t\t\tif (next.now !== undefined && Number.isFinite(next.now)) clock.now = Math.max(clock.now, next.now);\n\t\t\t\t\tcurrent = nextSeq;\n\t\t\t\t\tapply(next);\n\t\t\t\t\tpost({ type: \"idle\", seq: nextSeq, issued });\n\t\t\t\t\tnextSeq++;\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tpost(crashMessage(error));\n\t\t\t}\n\t\t},\n\t\tdispose() {\n\t\t\tif (disposed) return;\n\t\t\tdisposed = true;\n\t\t\tvm.dispose();\n\t\t},\n\t};\n\n\tlet api: JSValueHandle;\n\tlet settle: JSValueHandle;\n\tlet stalled: JSValueHandle;\n\t// `executePendingJobs()` runs the queue to empty without a chance to interrupt, so jobs run one at a\n\t// time through the (internal, but public) exports; quickjs-wasi is pinned to an exact version.\n\tconst exports = vm._getExports();\n\t/** Run queued jobs, then fail a script that waits on nothing that can ever resume it. */\n\tconst drain = () => {\n\t\tlet jobs = 0;\n\t\twhile (exports.qjs_is_job_pending()) {\n\t\t\t// A job only fails for uncatchable errors, such as an interrupt.\n\t\t\tif (exports.qjs_execute_pending_job() < 0) throw new Error(\"Promise job failed\");\n\t\t\tif (++jobs % JOBS_PER_POLL === 0 && options.shouldInterrupt()) throw new Error(\"Execution interrupted\");\n\t\t}\n\t\tvm.callFunction(stalled, api).dispose();\n\t};\n\n\ttry {\n\t\t// Called from the prelude with primitives only.\n\t\tconst bridge = vm.newFunction(\"bridge\", (kind, a, b, c) => {\n\t\t\tswitch (kind.toString()) {\n\t\t\t\tcase \"call\":\n\t\t\t\tcase \"global\":\n\t\t\t\t\tissued++;\n\t\t\t\t\tpost({\n\t\t\t\t\t\ttype: \"call\",\n\t\t\t\t\t\tid: a.toNumber(),\n\t\t\t\t\t\ttarget: kind.toString() === \"call\" ? \"tool\" : \"global\",\n\t\t\t\t\t\tname: b.toString(),\n\t\t\t\t\t\targs: c === undefined || c.isUndefined ? undefined : c.toString(),\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"output\":\n\t\t\t\t\tpost({\n\t\t\t\t\t\ttype: \"output\",\n\t\t\t\t\t\titem:\n\t\t\t\t\t\t\ta.toString() === \"image\"\n\t\t\t\t\t\t\t\t? { type: \"image\", data: b.toString(), mimeType: c.toString() }\n\t\t\t\t\t\t\t\t: a.toString() === \"console\"\n\t\t\t\t\t\t\t\t\t? { type: \"text\", text: b.toString(), console: true }\n\t\t\t\t\t\t\t\t\t: { type: \"text\", text: b.toString() },\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"done\": {\n\t\t\t\t\t// The host stops the VM on `done`, so the `idle` of this drain never arrives: report its numbers here.\n\t\t\t\t\tconst during = clock ? { during: { seq: current, issued } } : {};\n\t\t\t\t\tif (a.toBoolean()) {\n\t\t\t\t\t\tpost({\n\t\t\t\t\t\t\ttype: \"done\",\n\t\t\t\t\t\t\tok: true,\n\t\t\t\t\t\t\tvalue: b === undefined || b.isUndefined ? undefined : b.toString(),\n\t\t\t\t\t\t\twrites: c.toString(),\n\t\t\t\t\t\t\t...during,\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpost({ type: \"done\", ok: false, error: b.toString(), ...during });\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn vm.undefined;\n\t\t});\n\n\t\t// These handles live as long as the VM, which the caller disposes as a whole.\n\t\tapi = vm.withScope((scope) =>\n\t\t\tscope.escape(\n\t\t\t\tvm.callFunction(\n\t\t\t\t\tvm.evalCode(PRELUDE_SOURCE, \"codemode-prelude.js\"),\n\t\t\t\t\tvm.undefined,\n\t\t\t\t\tbridge,\n\t\t\t\t\tvm.newString(JSON.stringify(data.tools)),\n\t\t\t\t\tvm.newString(JSON.stringify(data.globals)),\n\t\t\t\t\tvm.newString(JSON.stringify(data.store)),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\tsettle = api.getProp(\"settle\");\n\t\tconst run = api.getProp(\"run\");\n\t\tstalled = api.getProp(\"stalled\");\n\t\tif (clock) {\n\t\t\tconst versions = vm.versions;\n\t\t\tconst budget = options.interruptBudget ?? \"none\";\n\t\t\tpost({\n\t\t\t\ttype: \"started\",\n\t\t\t\tfingerprint: `quickjs-wasi ${versions[\"quickjs-wasi\"]}, quickjs ${versions.quickjs}, prelude ${PRELUDE_HASH}, deterministic ${DETERMINISTIC_VERSION}, stack ${maxStackSize}, heap ${data.memoryLimitBytes ?? \"none\"}, budget ${budget}`,\n\t\t\t});\n\t\t}\n\n\t\t// The prefix shares the first line with the script so reported line numbers\n\t\t// match the script as written.\n\t\tlet fn: JSValueHandle;\n\t\ttry {\n\t\t\tfn = vm.evalCode(`(async (tools, console) => {${data.code}\\n})`, \"codemode.js\");\n\t\t} catch (error) {\n\t\t\tif (!(error instanceof JSException)) throw error;\n\t\t\tpost({ type: \"done\", ok: false, error: describeException(error) });\n\t\t\treturn session;\n\t\t}\n\t\tvm.callFunction(run, api, fn).dispose();\n\t\tfn.dispose();\n\t\tdrain();\n\t\tif (clock) post({ type: \"idle\", seq: 0, issued });\n\t} catch (error) {\n\t\tpost(crashMessage(error));\n\t}\n\treturn session;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/runtime/worker.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Worker thread entry. One worker runs one script inside a fresh QuickJS VM
3
+ * (a separate wasm instance), relays tool calls and output to the host, and
4
+ * reports the result. The host terminates the worker when the script settles,
5
+ * times out, or is aborted; the worker exists so that a spinning script never
6
+ * blocks the host thread.
7
+ *
8
+ * Importing this module starts the worker. Hosts that bundle their code (for
9
+ * example a Bun compiled executable) add a file that imports
10
+ * `@earendil-works/pi-codemode/worker` as a separate entrypoint and pass its URL
11
+ * or embedded-module string specifier as `workerUrl`.
12
+ */
13
+ import { parentPort, workerData } from "node:worker_threads";
14
+ import { isHostToWorkerMessage } from "./protocol.js";
15
+ import { startVm } from "./vm.js";
16
+ function post(message) {
17
+ parentPort?.postMessage(message);
18
+ }
19
+ async function main(data) {
20
+ const interrupt = new Int32Array(data.interrupt);
21
+ // The VM lives until the host terminates the worker, so the session is never disposed.
22
+ const session = await startVm({
23
+ data,
24
+ wasm: data.wasm,
25
+ post,
26
+ shouldInterrupt: () => Atomics.load(interrupt, 0) !== 0,
27
+ });
28
+ parentPort?.on("message", (message) => {
29
+ if (isHostToWorkerMessage(message))
30
+ session.deliver(message);
31
+ });
32
+ }
33
+ if (parentPort) {
34
+ main(workerData).catch((error) => {
35
+ post({ type: "crash", message: error instanceof Error ? `${error.name}: ${error.message}` : String(error) });
36
+ });
37
+ }
38
+ //# sourceMappingURL=worker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.js","sourceRoot":"","sources":["../../src/runtime/worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAA6C,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,SAAS,IAAI,CAAC,OAA4B;IACzC,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC;AAED,KAAK,UAAU,IAAI,CAAC,IAAgB;IACnC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACjD,uFAAuF;IACvF,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC;QAC7B,IAAI;QACJ,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,IAAI;QACJ,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC;KACvD,CAAC,CAAC;IACH,UAAU,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,OAAgB,EAAE,EAAE;QAC9C,IAAI,qBAAqB,CAAC,OAAO,CAAC;YAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,UAAU,EAAE,CAAC;IAChB,IAAI,CAAC,UAAwB,CAAC,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;QACvD,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC9G,CAAC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Worker thread entry. One worker runs one script inside a fresh QuickJS VM\n * (a separate wasm instance), relays tool calls and output to the host, and\n * reports the result. The host terminates the worker when the script settles,\n * times out, or is aborted; the worker exists so that a spinning script never\n * blocks the host thread.\n *\n * Importing this module starts the worker. Hosts that bundle their code (for\n * example a Bun compiled executable) add a file that imports\n * `@earendil-works/pi-codemode/worker` as a separate entrypoint and pass its URL\n * or embedded-module string specifier as `workerUrl`.\n */\nimport { parentPort, workerData } from \"node:worker_threads\";\nimport { isHostToWorkerMessage, type WorkerData, type WorkerToHostMessage } from \"./protocol.ts\";\nimport { startVm } from \"./vm.ts\";\n\nfunction post(message: WorkerToHostMessage): void {\n\tparentPort?.postMessage(message);\n}\n\nasync function main(data: WorkerData): Promise<void> {\n\tconst interrupt = new Int32Array(data.interrupt);\n\t// The VM lives until the host terminates the worker, so the session is never disposed.\n\tconst session = await startVm({\n\t\tdata,\n\t\twasm: data.wasm,\n\t\tpost,\n\t\tshouldInterrupt: () => Atomics.load(interrupt, 0) !== 0,\n\t});\n\tparentPort?.on(\"message\", (message: unknown) => {\n\t\tif (isHostToWorkerMessage(message)) session.deliver(message);\n\t});\n}\n\nif (parentPort) {\n\tmain(workerData as WorkerData).catch((error: unknown) => {\n\t\tpost({ type: \"crash\", message: error instanceof Error ? `${error.name}: ${error.message}` : String(error) });\n\t});\n}\n"]}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Codemode source format: JavaScript, optionally preceded by one options line.
3
+ *
4
+ * ```js
5
+ * // @options: {"max_output_tokens": 2000, "timeout_ms": 30000}
6
+ * const text = await tools.read({ path: "package.json" });
7
+ * text(JSON.parse(text).name);
8
+ * ```
9
+ */
10
+ export declare const CODEMODE_OPTIONS_PREFIX = "// @options:";
11
+ /**
12
+ * Lark grammar for providers with grammar-constrained tool input. It only fixes the shape of the
13
+ * options line; the options JSON and the code are checked by {@link parseCodemodeSource}.
14
+ */
15
+ export declare const CODEMODE_SOURCE_GRAMMAR: string;
16
+ export interface CodemodeSourceOptions {
17
+ /** Token budget for the script's output. */
18
+ maxOutputTokens?: number;
19
+ /** Hard deadline for the whole script in milliseconds, including tool calls. */
20
+ timeoutMs?: number;
21
+ }
22
+ export interface ParsedCodemodeSource {
23
+ /** The script with the options line replaced by an empty line, so line numbers are unchanged. */
24
+ code: string;
25
+ options: CodemodeSourceOptions;
26
+ }
27
+ export declare class CodemodeSourceError extends Error {
28
+ constructor(message: string);
29
+ }
30
+ /**
31
+ * Split an optional first-line `// @options: {...}` from the script. Throws
32
+ * {@link CodemodeSourceError} for empty input, invalid options, and an options line that is not the
33
+ * first line, which would otherwise be ignored without notice.
34
+ */
35
+ export declare function parseCodemodeSource(input: string): ParsedCodemodeSource;
36
+ //# sourceMappingURL=source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,uBAAuB,iBAAiB,CAAC;AAOtD;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAQnC,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACrC,4CAA4C;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACpC,iGAAiG;IACjG,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,qBAAqB,CAAC;CAC/B;AAED,qBAAa,mBAAoB,SAAQ,KAAK;IAC7C,YAAY,OAAO,EAAE,MAAM,EAG1B;CACD;AA8CD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,CAwBvE"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Codemode source format: JavaScript, optionally preceded by one options line.
3
+ *
4
+ * ```js
5
+ * // @options: {"max_output_tokens": 2000, "timeout_ms": 30000}
6
+ * const text = await tools.read({ path: "package.json" });
7
+ * text(JSON.parse(text).name);
8
+ * ```
9
+ */
10
+ export const CODEMODE_OPTIONS_PREFIX = "// @options:";
11
+ const SUPPORTED_FIELDS = ["max_output_tokens", "timeout_ms"];
12
+ const SUPPORTED_FIELDS_TEXT = "`max_output_tokens` and `timeout_ms`";
13
+ /** Largest delay `setTimeout` supports, which bounds `timeout_ms`. */
14
+ const MAX_TIMEOUT_MS = 2_147_483_647;
15
+ /**
16
+ * Lark grammar for providers with grammar-constrained tool input. It only fixes the shape of the
17
+ * options line; the options JSON and the code are checked by {@link parseCodemodeSource}.
18
+ */
19
+ export const CODEMODE_SOURCE_GRAMMAR = String.raw `
20
+ start: options_source | plain_source
21
+ options_source: OPTIONS_LINE NEWLINE SOURCE
22
+ plain_source: SOURCE
23
+
24
+ OPTIONS_LINE: /[ \t]*\/\/ @options:[^\r\n]*/
25
+ NEWLINE: /\r?\n/
26
+ SOURCE: /[\s\S]+/
27
+ `;
28
+ export class CodemodeSourceError extends Error {
29
+ constructor(message) {
30
+ super(message);
31
+ this.name = "CodemodeSourceError";
32
+ }
33
+ }
34
+ function isSafeInteger(value) {
35
+ return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
36
+ }
37
+ function parseOptions(directive) {
38
+ if (directive === "") {
39
+ throw new CodemodeSourceError(`@options must be a JSON object with supported fields ${SUPPORTED_FIELDS_TEXT}`);
40
+ }
41
+ let value;
42
+ try {
43
+ value = JSON.parse(directive);
44
+ }
45
+ catch (error) {
46
+ throw new CodemodeSourceError(`@options must be valid JSON with supported fields ${SUPPORTED_FIELDS_TEXT}: ${error instanceof Error ? error.message : String(error)}`);
47
+ }
48
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
49
+ throw new CodemodeSourceError(`@options must be a JSON object with supported fields ${SUPPORTED_FIELDS_TEXT}`);
50
+ }
51
+ const fields = value;
52
+ for (const key of Object.keys(fields)) {
53
+ if (!SUPPORTED_FIELDS.includes(key)) {
54
+ throw new CodemodeSourceError(`@options only supports ${SUPPORTED_FIELDS_TEXT}; got \`${key}\``);
55
+ }
56
+ }
57
+ const options = {};
58
+ const { max_output_tokens, timeout_ms } = fields;
59
+ if (max_output_tokens !== undefined) {
60
+ if (!isSafeInteger(max_output_tokens)) {
61
+ throw new CodemodeSourceError("@options field `max_output_tokens` must be a non-negative safe integer");
62
+ }
63
+ options.maxOutputTokens = max_output_tokens;
64
+ }
65
+ if (timeout_ms !== undefined) {
66
+ if (!isSafeInteger(timeout_ms) || timeout_ms === 0 || timeout_ms > MAX_TIMEOUT_MS) {
67
+ throw new CodemodeSourceError(`@options field \`timeout_ms\` must be a positive integer up to ${MAX_TIMEOUT_MS}`);
68
+ }
69
+ options.timeoutMs = timeout_ms;
70
+ }
71
+ return options;
72
+ }
73
+ /**
74
+ * Split an optional first-line `// @options: {...}` from the script. Throws
75
+ * {@link CodemodeSourceError} for empty input, invalid options, and an options line that is not the
76
+ * first line, which would otherwise be ignored without notice.
77
+ */
78
+ export function parseCodemodeSource(input) {
79
+ if (input.trim() === "") {
80
+ throw new CodemodeSourceError('Expected JavaScript source text (non-empty). Provide JS only, optionally with a first line `// @options: {"max_output_tokens": 1000}`.');
81
+ }
82
+ const lines = input.split("\n");
83
+ const misplaced = lines.findIndex((line, index) => index > 0 && line.trimStart().startsWith(CODEMODE_OPTIONS_PREFIX));
84
+ if (misplaced !== -1) {
85
+ throw new CodemodeSourceError(`The ${CODEMODE_OPTIONS_PREFIX} line must be the first line of the input; found one on line ${misplaced + 1}`);
86
+ }
87
+ const newline = input.indexOf("\n");
88
+ const firstLine = lines[0].replace(/\r$/, "");
89
+ const trimmed = firstLine.trimStart();
90
+ if (!trimmed.startsWith(CODEMODE_OPTIONS_PREFIX))
91
+ return { code: input, options: {} };
92
+ const code = newline === -1 ? "" : input.slice(newline);
93
+ if (code.trim() === "") {
94
+ throw new CodemodeSourceError("The @options line must be followed by JavaScript source on subsequent lines");
95
+ }
96
+ return { code, options: parseOptions(trimmed.slice(CODEMODE_OPTIONS_PREFIX.length).trim()) };
97
+ }
98
+ //# sourceMappingURL=source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAEtD,MAAM,gBAAgB,GAAG,CAAC,mBAAmB,EAAE,YAAY,CAAU,CAAC;AACtE,MAAM,qBAAqB,GAAG,sCAAsC,CAAC;AACrE,sEAAsE;AACtE,MAAM,cAAc,GAAG,aAAa,CAAC;AAErC;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;CAQhD,CAAC;AAeF,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC7C,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACnC,CAAC;CACD;AAED,SAAS,aAAa,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAC/E,CAAC;AAED,SAAS,YAAY,CAAC,SAAiB;IACtC,IAAI,SAAS,KAAK,EAAE,EAAE,CAAC;QACtB,MAAM,IAAI,mBAAmB,CAAC,wDAAwD,qBAAqB,EAAE,CAAC,CAAC;IAChH,CAAC;IACD,IAAI,KAAc,CAAC;IACnB,IAAI,CAAC;QACJ,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,IAAI,mBAAmB,CAC5B,qDAAqD,qBAAqB,KAAK,KAAK,YAAY,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,CAAC,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;AAC9F,CAAC","sourcesContent":["/**\n * Codemode source format: JavaScript, optionally preceded by one options line.\n *\n * ```js\n * // @options: {\"max_output_tokens\": 2000, \"timeout_ms\": 30000}\n * const text = await tools.read({ path: \"package.json\" });\n * text(JSON.parse(text).name);\n * ```\n */\n\nexport const CODEMODE_OPTIONS_PREFIX = \"// @options:\";\n\nconst SUPPORTED_FIELDS = [\"max_output_tokens\", \"timeout_ms\"] as const;\nconst SUPPORTED_FIELDS_TEXT = \"`max_output_tokens` and `timeout_ms`\";\n/** Largest delay `setTimeout` supports, which bounds `timeout_ms`. */\nconst MAX_TIMEOUT_MS = 2_147_483_647;\n\n/**\n * Lark grammar for providers with grammar-constrained tool input. It only fixes the shape of the\n * options line; the options JSON and the code are checked by {@link parseCodemodeSource}.\n */\nexport const CODEMODE_SOURCE_GRAMMAR = String.raw`\nstart: options_source | plain_source\noptions_source: OPTIONS_LINE NEWLINE SOURCE\nplain_source: SOURCE\n\nOPTIONS_LINE: /[ \\t]*\\/\\/ @options:[^\\r\\n]*/\nNEWLINE: /\\r?\\n/\nSOURCE: /[\\s\\S]+/\n`;\n\nexport interface CodemodeSourceOptions {\n\t/** Token budget for the script's output. */\n\tmaxOutputTokens?: number;\n\t/** Hard deadline for the whole script in milliseconds, including tool calls. */\n\ttimeoutMs?: number;\n}\n\nexport interface ParsedCodemodeSource {\n\t/** The script with the options line replaced by an empty line, so line numbers are unchanged. */\n\tcode: string;\n\toptions: CodemodeSourceOptions;\n}\n\nexport class CodemodeSourceError extends Error {\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"CodemodeSourceError\";\n\t}\n}\n\nfunction isSafeInteger(value: unknown): value is number {\n\treturn typeof value === \"number\" && Number.isSafeInteger(value) && value >= 0;\n}\n\nfunction parseOptions(directive: string): CodemodeSourceOptions {\n\tif (directive === \"\") {\n\t\tthrow new CodemodeSourceError(`@options must be a JSON object with supported fields ${SUPPORTED_FIELDS_TEXT}`);\n\t}\n\tlet value: unknown;\n\ttry {\n\t\tvalue = JSON.parse(directive);\n\t} catch (error) {\n\t\tthrow new CodemodeSourceError(\n\t\t\t`@options must be valid JSON with supported fields ${SUPPORTED_FIELDS_TEXT}: ${error instanceof Error ? error.message : String(error)}`,\n\t\t);\n\t}\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n\t\tthrow new CodemodeSourceError(`@options must be a JSON object with supported fields ${SUPPORTED_FIELDS_TEXT}`);\n\t}\n\tconst fields = value as Record<string, unknown>;\n\tfor (const key of Object.keys(fields)) {\n\t\tif (!(SUPPORTED_FIELDS as readonly string[]).includes(key)) {\n\t\t\tthrow new CodemodeSourceError(`@options only supports ${SUPPORTED_FIELDS_TEXT}; got \\`${key}\\``);\n\t\t}\n\t}\n\tconst options: CodemodeSourceOptions = {};\n\tconst { max_output_tokens, timeout_ms } = fields;\n\tif (max_output_tokens !== undefined) {\n\t\tif (!isSafeInteger(max_output_tokens)) {\n\t\t\tthrow new CodemodeSourceError(\"@options field `max_output_tokens` must be a non-negative safe integer\");\n\t\t}\n\t\toptions.maxOutputTokens = max_output_tokens;\n\t}\n\tif (timeout_ms !== undefined) {\n\t\tif (!isSafeInteger(timeout_ms) || timeout_ms === 0 || timeout_ms > MAX_TIMEOUT_MS) {\n\t\t\tthrow new CodemodeSourceError(\n\t\t\t\t`@options field \\`timeout_ms\\` must be a positive integer up to ${MAX_TIMEOUT_MS}`,\n\t\t\t);\n\t\t}\n\t\toptions.timeoutMs = timeout_ms;\n\t}\n\treturn options;\n}\n\n/**\n * Split an optional first-line `// @options: {...}` from the script. Throws\n * {@link CodemodeSourceError} for empty input, invalid options, and an options line that is not the\n * first line, which would otherwise be ignored without notice.\n */\nexport function parseCodemodeSource(input: string): ParsedCodemodeSource {\n\tif (input.trim() === \"\") {\n\t\tthrow new CodemodeSourceError(\n\t\t\t'Expected JavaScript source text (non-empty). Provide JS only, optionally with a first line `// @options: {\"max_output_tokens\": 1000}`.',\n\t\t);\n\t}\n\tconst lines = input.split(\"\\n\");\n\tconst misplaced = lines.findIndex(\n\t\t(line, index) => index > 0 && line.trimStart().startsWith(CODEMODE_OPTIONS_PREFIX),\n\t);\n\tif (misplaced !== -1) {\n\t\tthrow new CodemodeSourceError(\n\t\t\t`The ${CODEMODE_OPTIONS_PREFIX} line must be the first line of the input; found one on line ${misplaced + 1}`,\n\t\t);\n\t}\n\tconst newline = input.indexOf(\"\\n\");\n\tconst firstLine = lines[0].replace(/\\r$/, \"\");\n\tconst trimmed = firstLine.trimStart();\n\tif (!trimmed.startsWith(CODEMODE_OPTIONS_PREFIX)) return { code: input, options: {} };\n\tconst code = newline === -1 ? \"\" : input.slice(newline);\n\tif (code.trim() === \"\") {\n\t\tthrow new CodemodeSourceError(\"The @options line must be followed by JavaScript source on subsequent lines\");\n\t}\n\treturn { code, options: parseOptions(trimmed.slice(CODEMODE_OPTIONS_PREFIX.length).trim()) };\n}\n"]}