pi-proactive 0.0.0-stage → 0.2.0-beta.2

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 (1450) hide show
  1. package/CHANGELOG.md +119 -0
  2. package/LICENSE +54 -0
  3. package/README.md +705 -2
  4. package/build/extensions/proactive.js +2467 -0
  5. package/build/src/activity.js +130 -0
  6. package/build/src/commands.js +496 -0
  7. package/build/src/config.js +483 -0
  8. package/build/src/content.js +198 -0
  9. package/build/src/daemon-config.js +488 -0
  10. package/build/src/daemon.js +702 -0
  11. package/build/src/dedupe.js +187 -0
  12. package/build/src/envelope.js +283 -0
  13. package/build/src/guard.js +74 -0
  14. package/build/src/health.js +734 -0
  15. package/build/src/idle.js +388 -0
  16. package/build/src/lineage.js +426 -0
  17. package/build/src/mailbox.js +984 -0
  18. package/build/src/outbox.js +26 -0
  19. package/build/src/peer-spawn.js +383 -0
  20. package/build/src/peer.js +1002 -0
  21. package/build/src/registry.js +583 -0
  22. package/build/src/scheduler.js +301 -0
  23. package/build/src/socket.js +496 -0
  24. package/build/src/task-store.js +438 -0
  25. package/build/src/thread.js +196 -0
  26. package/build/src/trigger.js +458 -0
  27. package/build/src/types.js +1 -0
  28. package/node_modules/typebox/build/compile/code.d.mts +12 -0
  29. package/node_modules/typebox/build/compile/code.mjs +64 -0
  30. package/node_modules/typebox/build/compile/compile.d.mts +6 -0
  31. package/node_modules/typebox/build/compile/compile.mjs +12 -0
  32. package/node_modules/typebox/build/compile/index.d.mts +8 -0
  33. package/node_modules/typebox/build/compile/index.mjs +14 -0
  34. package/node_modules/typebox/build/compile/validator.d.mts +35 -0
  35. package/node_modules/typebox/build/compile/validator.mjs +95 -0
  36. package/node_modules/typebox/build/error/errors.d.mts +208 -0
  37. package/node_modules/typebox/build/error/errors.mjs +18 -0
  38. package/node_modules/typebox/build/error/index.d.mts +1 -0
  39. package/node_modules/typebox/build/error/index.mjs +1 -0
  40. package/node_modules/typebox/build/format/_registry.d.mts +15 -0
  41. package/node_modules/typebox/build/format/_registry.mjs +96 -0
  42. package/node_modules/typebox/build/format/date.d.mts +6 -0
  43. package/node_modules/typebox/build/format/date.mjs +19 -0
  44. package/node_modules/typebox/build/format/date_time.d.mts +7 -0
  45. package/node_modules/typebox/build/format/date_time.mjs +20 -0
  46. package/node_modules/typebox/build/format/duration.d.mts +5 -0
  47. package/node_modules/typebox/build/format/duration.mjs +8 -0
  48. package/node_modules/typebox/build/format/email.d.mts +5 -0
  49. package/node_modules/typebox/build/format/email.mjs +8 -0
  50. package/node_modules/typebox/build/format/format.d.mts +22 -0
  51. package/node_modules/typebox/build/format/format.mjs +22 -0
  52. package/node_modules/typebox/build/format/hostname.d.mts +7 -0
  53. package/node_modules/typebox/build/format/hostname.mjs +10 -0
  54. package/node_modules/typebox/build/format/idn_email.d.mts +6 -0
  55. package/node_modules/typebox/build/format/idn_email.mjs +9 -0
  56. package/node_modules/typebox/build/format/idn_hostname.d.mts +8 -0
  57. package/node_modules/typebox/build/format/idn_hostname.mjs +11 -0
  58. package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
  59. package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
  60. package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
  61. package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
  62. package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
  63. package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
  64. package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
  65. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +43 -0
  66. package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
  67. package/node_modules/typebox/build/format/idna/index.mjs +2 -0
  68. package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
  69. package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
  70. package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
  71. package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
  72. package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
  73. package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
  74. package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
  75. package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
  76. package/node_modules/typebox/build/format/index.d.mts +4 -0
  77. package/node_modules/typebox/build/format/index.mjs +4 -0
  78. package/node_modules/typebox/build/format/ipv4.d.mts +5 -0
  79. package/node_modules/typebox/build/format/ipv4.mjs +8 -0
  80. package/node_modules/typebox/build/format/ipv6.d.mts +5 -0
  81. package/node_modules/typebox/build/format/ipv6.mjs +8 -0
  82. package/node_modules/typebox/build/format/iri.d.mts +5 -0
  83. package/node_modules/typebox/build/format/iri.mjs +42 -0
  84. package/node_modules/typebox/build/format/iri_reference.d.mts +5 -0
  85. package/node_modules/typebox/build/format/iri_reference.mjs +14 -0
  86. package/node_modules/typebox/build/format/json_pointer.d.mts +6 -0
  87. package/node_modules/typebox/build/format/json_pointer.mjs +9 -0
  88. package/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +6 -0
  89. package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +9 -0
  90. package/node_modules/typebox/build/format/regex.d.mts +5 -0
  91. package/node_modules/typebox/build/format/regex.mjs +13 -0
  92. package/node_modules/typebox/build/format/relative_json_pointer.d.mts +6 -0
  93. package/node_modules/typebox/build/format/relative_json_pointer.mjs +9 -0
  94. package/node_modules/typebox/build/format/time.d.mts +5 -0
  95. package/node_modules/typebox/build/format/time.mjs +32 -0
  96. package/node_modules/typebox/build/format/uri.d.mts +5 -0
  97. package/node_modules/typebox/build/format/uri.mjs +8 -0
  98. package/node_modules/typebox/build/format/uri_reference.d.mts +5 -0
  99. package/node_modules/typebox/build/format/uri_reference.mjs +8 -0
  100. package/node_modules/typebox/build/format/uri_template.d.mts +5 -0
  101. package/node_modules/typebox/build/format/uri_template.mjs +9 -0
  102. package/node_modules/typebox/build/format/url.d.mts +6 -0
  103. package/node_modules/typebox/build/format/url.mjs +8 -0
  104. package/node_modules/typebox/build/format/uuid.d.mts +6 -0
  105. package/node_modules/typebox/build/format/uuid.mjs +9 -0
  106. package/node_modules/typebox/build/guard/emit.d.mts +56 -0
  107. package/node_modules/typebox/build/guard/emit.mjs +191 -0
  108. package/node_modules/typebox/build/guard/globals.d.mts +35 -0
  109. package/node_modules/typebox/build/guard/globals.mjs +90 -0
  110. package/node_modules/typebox/build/guard/guard.d.mts +73 -0
  111. package/node_modules/typebox/build/guard/guard.mjs +226 -0
  112. package/node_modules/typebox/build/guard/index.d.mts +6 -0
  113. package/node_modules/typebox/build/guard/index.mjs +12 -0
  114. package/node_modules/typebox/build/guard/native.d.mts +20 -0
  115. package/node_modules/typebox/build/guard/native.mjs +60 -0
  116. package/node_modules/typebox/build/guard/unicode/unicode.d.mts +6 -0
  117. package/node_modules/typebox/build/guard/unicode/unicode.mjs +35 -0
  118. package/node_modules/typebox/build/guard/unicode/unicode_segment.d.mts +6 -0
  119. package/node_modules/typebox/build/guard/unicode/unicode_segment.mjs +165 -0
  120. package/node_modules/typebox/build/index.d.mts +8 -0
  121. package/node_modules/typebox/build/index.mjs +14 -0
  122. package/node_modules/typebox/build/schema/build.d.mts +39 -0
  123. package/node_modules/typebox/build/schema/build.mjs +118 -0
  124. package/node_modules/typebox/build/schema/check.d.mts +6 -0
  125. package/node_modules/typebox/build/schema/check.mjs +14 -0
  126. package/node_modules/typebox/build/schema/compile.d.mts +23 -0
  127. package/node_modules/typebox/build/schema/compile.mjs +46 -0
  128. package/node_modules/typebox/build/schema/engine/_context.d.mts +34 -0
  129. package/node_modules/typebox/build/schema/engine/_context.mjs +137 -0
  130. package/node_modules/typebox/build/schema/engine/_exact_optional.d.mts +3 -0
  131. package/node_modules/typebox/build/schema/engine/_exact_optional.mjs +20 -0
  132. package/node_modules/typebox/build/schema/engine/_externals.d.mts +7 -0
  133. package/node_modules/typebox/build/schema/engine/_externals.mjs +25 -0
  134. package/node_modules/typebox/build/schema/engine/_functions.d.mts +6 -0
  135. package/node_modules/typebox/build/schema/engine/_functions.mjs +65 -0
  136. package/node_modules/typebox/build/schema/engine/_pathing.d.mts +1 -0
  137. package/node_modules/typebox/build/schema/engine/_pathing.mjs +11 -0
  138. package/node_modules/typebox/build/schema/engine/_reducer.d.mts +4 -0
  139. package/node_modules/typebox/build/schema/engine/_reducer.mjs +45 -0
  140. package/node_modules/typebox/build/schema/engine/_refine.d.mts +6 -0
  141. package/node_modules/typebox/build/schema/engine/_refine.mjs +34 -0
  142. package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
  143. package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
  144. package/node_modules/typebox/build/schema/engine/_stack.d.mts +36 -0
  145. package/node_modules/typebox/build/schema/engine/_stack.mjs +150 -0
  146. package/node_modules/typebox/build/schema/engine/_unique.d.mts +4 -0
  147. package/node_modules/typebox/build/schema/engine/_unique.mjs +9 -0
  148. package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +6 -0
  149. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +60 -0
  150. package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +6 -0
  151. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +118 -0
  152. package/node_modules/typebox/build/schema/engine/allOf.d.mts +6 -0
  153. package/node_modules/typebox/build/schema/engine/allOf.mjs +47 -0
  154. package/node_modules/typebox/build/schema/engine/anyOf.d.mts +6 -0
  155. package/node_modules/typebox/build/schema/engine/anyOf.mjs +47 -0
  156. package/node_modules/typebox/build/schema/engine/boolean.d.mts +5 -0
  157. package/node_modules/typebox/build/schema/engine/boolean.mjs +21 -0
  158. package/node_modules/typebox/build/schema/engine/const.d.mts +6 -0
  159. package/node_modules/typebox/build/schema/engine/const.mjs +26 -0
  160. package/node_modules/typebox/build/schema/engine/contains.d.mts +6 -0
  161. package/node_modules/typebox/build/schema/engine/contains.mjs +50 -0
  162. package/node_modules/typebox/build/schema/engine/dependencies.d.mts +6 -0
  163. package/node_modules/typebox/build/schema/engine/dependencies.mjs +43 -0
  164. package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +6 -0
  165. package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +36 -0
  166. package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +6 -0
  167. package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +39 -0
  168. package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +6 -0
  169. package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +29 -0
  170. package/node_modules/typebox/build/schema/engine/enum.d.mts +6 -0
  171. package/node_modules/typebox/build/schema/engine/enum.mjs +29 -0
  172. package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +6 -0
  173. package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +21 -0
  174. package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +6 -0
  175. package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +21 -0
  176. package/node_modules/typebox/build/schema/engine/format.d.mts +6 -0
  177. package/node_modules/typebox/build/schema/engine/format.mjs +29 -0
  178. package/node_modules/typebox/build/schema/engine/if.d.mts +6 -0
  179. package/node_modules/typebox/build/schema/engine/if.mjs +39 -0
  180. package/node_modules/typebox/build/schema/engine/index.d.mts +49 -0
  181. package/node_modules/typebox/build/schema/engine/index.mjs +55 -0
  182. package/node_modules/typebox/build/schema/engine/items.d.mts +6 -0
  183. package/node_modules/typebox/build/schema/engine/items.mjs +91 -0
  184. package/node_modules/typebox/build/schema/engine/maxContains.d.mts +6 -0
  185. package/node_modules/typebox/build/schema/engine/maxContains.mjs +38 -0
  186. package/node_modules/typebox/build/schema/engine/maxItems.d.mts +6 -0
  187. package/node_modules/typebox/build/schema/engine/maxItems.mjs +21 -0
  188. package/node_modules/typebox/build/schema/engine/maxLength.d.mts +6 -0
  189. package/node_modules/typebox/build/schema/engine/maxLength.mjs +21 -0
  190. package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +6 -0
  191. package/node_modules/typebox/build/schema/engine/maxProperties.mjs +21 -0
  192. package/node_modules/typebox/build/schema/engine/maximum.d.mts +6 -0
  193. package/node_modules/typebox/build/schema/engine/maximum.mjs +21 -0
  194. package/node_modules/typebox/build/schema/engine/minContains.d.mts +6 -0
  195. package/node_modules/typebox/build/schema/engine/minContains.mjs +47 -0
  196. package/node_modules/typebox/build/schema/engine/minItems.d.mts +6 -0
  197. package/node_modules/typebox/build/schema/engine/minItems.mjs +21 -0
  198. package/node_modules/typebox/build/schema/engine/minLength.d.mts +6 -0
  199. package/node_modules/typebox/build/schema/engine/minLength.mjs +21 -0
  200. package/node_modules/typebox/build/schema/engine/minProperties.d.mts +6 -0
  201. package/node_modules/typebox/build/schema/engine/minProperties.mjs +21 -0
  202. package/node_modules/typebox/build/schema/engine/minimum.d.mts +6 -0
  203. package/node_modules/typebox/build/schema/engine/minimum.mjs +21 -0
  204. package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +6 -0
  205. package/node_modules/typebox/build/schema/engine/multipleOf.mjs +21 -0
  206. package/node_modules/typebox/build/schema/engine/not.d.mts +6 -0
  207. package/node_modules/typebox/build/schema/engine/not.mjs +35 -0
  208. package/node_modules/typebox/build/schema/engine/oneOf.d.mts +6 -0
  209. package/node_modules/typebox/build/schema/engine/oneOf.mjs +54 -0
  210. package/node_modules/typebox/build/schema/engine/pattern.d.mts +6 -0
  211. package/node_modules/typebox/build/schema/engine/pattern.mjs +25 -0
  212. package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +6 -0
  213. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +46 -0
  214. package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +6 -0
  215. package/node_modules/typebox/build/schema/engine/prefixItems.mjs +35 -0
  216. package/node_modules/typebox/build/schema/engine/properties.d.mts +6 -0
  217. package/node_modules/typebox/build/schema/engine/properties.mjs +76 -0
  218. package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +6 -0
  219. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +34 -0
  220. package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +6 -0
  221. package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +29 -0
  222. package/node_modules/typebox/build/schema/engine/ref.d.mts +6 -0
  223. package/node_modules/typebox/build/schema/engine/ref.mjs +56 -0
  224. package/node_modules/typebox/build/schema/engine/required.d.mts +6 -0
  225. package/node_modules/typebox/build/schema/engine/required.mjs +28 -0
  226. package/node_modules/typebox/build/schema/engine/schema.d.mts +9 -0
  227. package/node_modules/typebox/build/schema/engine/schema.mjs +360 -0
  228. package/node_modules/typebox/build/schema/engine/type.d.mts +6 -0
  229. package/node_modules/typebox/build/schema/engine/type.mjs +66 -0
  230. package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +6 -0
  231. package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +47 -0
  232. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +6 -0
  233. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +47 -0
  234. package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +6 -0
  235. package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +47 -0
  236. package/node_modules/typebox/build/schema/errors.d.mts +6 -0
  237. package/node_modules/typebox/build/schema/errors.mjs +18 -0
  238. package/node_modules/typebox/build/schema/index.d.mts +3 -0
  239. package/node_modules/typebox/build/schema/index.mjs +9 -0
  240. package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
  241. package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
  242. package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
  243. package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
  244. package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
  245. package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
  246. package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
  247. package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
  248. package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
  249. package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
  250. package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
  251. package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
  252. package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
  253. package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
  254. package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
  255. package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
  256. package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
  257. package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
  258. package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
  259. package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
  260. package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
  261. package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
  262. package/node_modules/typebox/build/schema/parse.d.mts +14 -0
  263. package/node_modules/typebox/build/schema/parse.mjs +35 -0
  264. package/node_modules/typebox/build/schema/pointer/index.d.mts +2 -0
  265. package/node_modules/typebox/build/schema/pointer/index.mjs +2 -0
  266. package/node_modules/typebox/build/schema/pointer/pointer.d.mts +5 -0
  267. package/node_modules/typebox/build/schema/pointer/pointer.mjs +89 -0
  268. package/node_modules/typebox/build/schema/pointer/pointer_get.d.mts +9 -0
  269. package/node_modules/typebox/build/schema/pointer/pointer_get.mjs +2 -0
  270. package/node_modules/typebox/build/schema/resolve/index.d.mts +1 -0
  271. package/node_modules/typebox/build/schema/resolve/index.mjs +1 -0
  272. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +9 -0
  273. package/node_modules/typebox/build/schema/resolve/resolve.mjs +331 -0
  274. package/node_modules/typebox/build/schema/schema.d.mts +12 -0
  275. package/node_modules/typebox/build/schema/schema.mjs +12 -0
  276. package/node_modules/typebox/build/schema/static/_canonical.d.mts +7 -0
  277. package/node_modules/typebox/build/schema/static/_canonical.mjs +2 -0
  278. package/node_modules/typebox/build/schema/static/_comparer.d.mts +6 -0
  279. package/node_modules/typebox/build/schema/static/_comparer.mjs +2 -0
  280. package/node_modules/typebox/build/schema/static/_elements.d.mts +18 -0
  281. package/node_modules/typebox/build/schema/static/_elements.mjs +2 -0
  282. package/node_modules/typebox/build/schema/static/additionalProperties.d.mts +7 -0
  283. package/node_modules/typebox/build/schema/static/additionalProperties.mjs +3 -0
  284. package/node_modules/typebox/build/schema/static/allOf.d.mts +3 -0
  285. package/node_modules/typebox/build/schema/static/allOf.mjs +2 -0
  286. package/node_modules/typebox/build/schema/static/anyOf.d.mts +3 -0
  287. package/node_modules/typebox/build/schema/static/anyOf.mjs +2 -0
  288. package/node_modules/typebox/build/schema/static/const.d.mts +1 -0
  289. package/node_modules/typebox/build/schema/static/const.mjs +2 -0
  290. package/node_modules/typebox/build/schema/static/enum.d.mts +1 -0
  291. package/node_modules/typebox/build/schema/static/enum.mjs +2 -0
  292. package/node_modules/typebox/build/schema/static/if.d.mts +15 -0
  293. package/node_modules/typebox/build/schema/static/if.mjs +2 -0
  294. package/node_modules/typebox/build/schema/static/index.d.mts +1 -0
  295. package/node_modules/typebox/build/schema/static/index.mjs +1 -0
  296. package/node_modules/typebox/build/schema/static/items.d.mts +7 -0
  297. package/node_modules/typebox/build/schema/static/items.mjs +2 -0
  298. package/node_modules/typebox/build/schema/static/oneOf.d.mts +3 -0
  299. package/node_modules/typebox/build/schema/static/oneOf.mjs +2 -0
  300. package/node_modules/typebox/build/schema/static/patternProperties.d.mts +7 -0
  301. package/node_modules/typebox/build/schema/static/patternProperties.mjs +2 -0
  302. package/node_modules/typebox/build/schema/static/prefixItems.d.mts +3 -0
  303. package/node_modules/typebox/build/schema/static/prefixItems.mjs +2 -0
  304. package/node_modules/typebox/build/schema/static/properties.d.mts +32 -0
  305. package/node_modules/typebox/build/schema/static/properties.mjs +2 -0
  306. package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
  307. package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
  308. package/node_modules/typebox/build/schema/static/ref.d.mts +8 -0
  309. package/node_modules/typebox/build/schema/static/ref.mjs +3 -0
  310. package/node_modules/typebox/build/schema/static/required.d.mts +3 -0
  311. package/node_modules/typebox/build/schema/static/required.mjs +3 -0
  312. package/node_modules/typebox/build/schema/static/schema.d.mts +59 -0
  313. package/node_modules/typebox/build/schema/static/schema.mjs +2 -0
  314. package/node_modules/typebox/build/schema/static/static.d.mts +4 -0
  315. package/node_modules/typebox/build/schema/static/static.mjs +3 -0
  316. package/node_modules/typebox/build/schema/static/type.d.mts +4 -0
  317. package/node_modules/typebox/build/schema/static/type.mjs +3 -0
  318. package/node_modules/typebox/build/schema/static/unevaluatedProperties.d.mts +7 -0
  319. package/node_modules/typebox/build/schema/static/unevaluatedProperties.mjs +3 -0
  320. package/node_modules/typebox/build/schema/types/_refine.d.mts +13 -0
  321. package/node_modules/typebox/build/schema/types/_refine.mjs +18 -0
  322. package/node_modules/typebox/build/schema/types/additionalItems.d.mts +9 -0
  323. package/node_modules/typebox/build/schema/types/additionalItems.mjs +14 -0
  324. package/node_modules/typebox/build/schema/types/additionalProperties.d.mts +9 -0
  325. package/node_modules/typebox/build/schema/types/additionalProperties.mjs +14 -0
  326. package/node_modules/typebox/build/schema/types/allOf.d.mts +9 -0
  327. package/node_modules/typebox/build/schema/types/allOf.mjs +15 -0
  328. package/node_modules/typebox/build/schema/types/anchor.d.mts +8 -0
  329. package/node_modules/typebox/build/schema/types/anchor.mjs +12 -0
  330. package/node_modules/typebox/build/schema/types/anyOf.d.mts +9 -0
  331. package/node_modules/typebox/build/schema/types/anyOf.mjs +15 -0
  332. package/node_modules/typebox/build/schema/types/const.d.mts +9 -0
  333. package/node_modules/typebox/build/schema/types/const.mjs +12 -0
  334. package/node_modules/typebox/build/schema/types/contains.d.mts +9 -0
  335. package/node_modules/typebox/build/schema/types/contains.mjs +14 -0
  336. package/node_modules/typebox/build/schema/types/default.d.mts +9 -0
  337. package/node_modules/typebox/build/schema/types/default.mjs +12 -0
  338. package/node_modules/typebox/build/schema/types/defs.d.mts +6 -0
  339. package/node_modules/typebox/build/schema/types/defs.mjs +12 -0
  340. package/node_modules/typebox/build/schema/types/dependencies.d.mts +11 -0
  341. package/node_modules/typebox/build/schema/types/dependencies.mjs +16 -0
  342. package/node_modules/typebox/build/schema/types/dependentRequired.d.mts +9 -0
  343. package/node_modules/typebox/build/schema/types/dependentRequired.mjs +15 -0
  344. package/node_modules/typebox/build/schema/types/dependentSchemas.d.mts +9 -0
  345. package/node_modules/typebox/build/schema/types/dependentSchemas.mjs +15 -0
  346. package/node_modules/typebox/build/schema/types/dynamicAnchor.d.mts +8 -0
  347. package/node_modules/typebox/build/schema/types/dynamicAnchor.mjs +12 -0
  348. package/node_modules/typebox/build/schema/types/dynamicRef.d.mts +8 -0
  349. package/node_modules/typebox/build/schema/types/dynamicRef.mjs +12 -0
  350. package/node_modules/typebox/build/schema/types/else.d.mts +9 -0
  351. package/node_modules/typebox/build/schema/types/else.mjs +14 -0
  352. package/node_modules/typebox/build/schema/types/enum.d.mts +9 -0
  353. package/node_modules/typebox/build/schema/types/enum.mjs +13 -0
  354. package/node_modules/typebox/build/schema/types/exclusiveMaximum.d.mts +9 -0
  355. package/node_modules/typebox/build/schema/types/exclusiveMaximum.mjs +13 -0
  356. package/node_modules/typebox/build/schema/types/exclusiveMinimum.d.mts +9 -0
  357. package/node_modules/typebox/build/schema/types/exclusiveMinimum.mjs +13 -0
  358. package/node_modules/typebox/build/schema/types/format.d.mts +9 -0
  359. package/node_modules/typebox/build/schema/types/format.mjs +13 -0
  360. package/node_modules/typebox/build/schema/types/id.d.mts +9 -0
  361. package/node_modules/typebox/build/schema/types/id.mjs +13 -0
  362. package/node_modules/typebox/build/schema/types/if.d.mts +9 -0
  363. package/node_modules/typebox/build/schema/types/if.mjs +14 -0
  364. package/node_modules/typebox/build/schema/types/index.d.mts +51 -0
  365. package/node_modules/typebox/build/schema/types/index.mjs +57 -0
  366. package/node_modules/typebox/build/schema/types/items.d.mts +19 -0
  367. package/node_modules/typebox/build/schema/types/items.mjs +26 -0
  368. package/node_modules/typebox/build/schema/types/maxContains.d.mts +9 -0
  369. package/node_modules/typebox/build/schema/types/maxContains.mjs +13 -0
  370. package/node_modules/typebox/build/schema/types/maxItems.d.mts +9 -0
  371. package/node_modules/typebox/build/schema/types/maxItems.mjs +13 -0
  372. package/node_modules/typebox/build/schema/types/maxLength.d.mts +9 -0
  373. package/node_modules/typebox/build/schema/types/maxLength.mjs +13 -0
  374. package/node_modules/typebox/build/schema/types/maxProperties.d.mts +9 -0
  375. package/node_modules/typebox/build/schema/types/maxProperties.mjs +13 -0
  376. package/node_modules/typebox/build/schema/types/maximum.d.mts +9 -0
  377. package/node_modules/typebox/build/schema/types/maximum.mjs +13 -0
  378. package/node_modules/typebox/build/schema/types/minContains.d.mts +9 -0
  379. package/node_modules/typebox/build/schema/types/minContains.mjs +13 -0
  380. package/node_modules/typebox/build/schema/types/minItems.d.mts +9 -0
  381. package/node_modules/typebox/build/schema/types/minItems.mjs +13 -0
  382. package/node_modules/typebox/build/schema/types/minLength.d.mts +9 -0
  383. package/node_modules/typebox/build/schema/types/minLength.mjs +13 -0
  384. package/node_modules/typebox/build/schema/types/minProperties.d.mts +9 -0
  385. package/node_modules/typebox/build/schema/types/minProperties.mjs +13 -0
  386. package/node_modules/typebox/build/schema/types/minimum.d.mts +9 -0
  387. package/node_modules/typebox/build/schema/types/minimum.mjs +13 -0
  388. package/node_modules/typebox/build/schema/types/multipleOf.d.mts +9 -0
  389. package/node_modules/typebox/build/schema/types/multipleOf.mjs +13 -0
  390. package/node_modules/typebox/build/schema/types/not.d.mts +9 -0
  391. package/node_modules/typebox/build/schema/types/not.mjs +14 -0
  392. package/node_modules/typebox/build/schema/types/oneOf.d.mts +9 -0
  393. package/node_modules/typebox/build/schema/types/oneOf.mjs +15 -0
  394. package/node_modules/typebox/build/schema/types/pattern.d.mts +9 -0
  395. package/node_modules/typebox/build/schema/types/pattern.mjs +14 -0
  396. package/node_modules/typebox/build/schema/types/patternProperties.d.mts +9 -0
  397. package/node_modules/typebox/build/schema/types/patternProperties.mjs +15 -0
  398. package/node_modules/typebox/build/schema/types/prefixItems.d.mts +8 -0
  399. package/node_modules/typebox/build/schema/types/prefixItems.mjs +14 -0
  400. package/node_modules/typebox/build/schema/types/properties.d.mts +9 -0
  401. package/node_modules/typebox/build/schema/types/properties.mjs +15 -0
  402. package/node_modules/typebox/build/schema/types/propertyNames.d.mts +9 -0
  403. package/node_modules/typebox/build/schema/types/propertyNames.mjs +15 -0
  404. package/node_modules/typebox/build/schema/types/recursiveAnchor.d.mts +12 -0
  405. package/node_modules/typebox/build/schema/types/recursiveAnchor.mjs +19 -0
  406. package/node_modules/typebox/build/schema/types/recursiveRef.d.mts +8 -0
  407. package/node_modules/typebox/build/schema/types/recursiveRef.mjs +12 -0
  408. package/node_modules/typebox/build/schema/types/ref.d.mts +9 -0
  409. package/node_modules/typebox/build/schema/types/ref.mjs +13 -0
  410. package/node_modules/typebox/build/schema/types/required.d.mts +9 -0
  411. package/node_modules/typebox/build/schema/types/required.mjs +14 -0
  412. package/node_modules/typebox/build/schema/types/schema.d.mts +9 -0
  413. package/node_modules/typebox/build/schema/types/schema.mjs +14 -0
  414. package/node_modules/typebox/build/schema/types/then.d.mts +9 -0
  415. package/node_modules/typebox/build/schema/types/then.mjs +14 -0
  416. package/node_modules/typebox/build/schema/types/type.d.mts +9 -0
  417. package/node_modules/typebox/build/schema/types/type.mjs +15 -0
  418. package/node_modules/typebox/build/schema/types/unevaluatedItems.d.mts +9 -0
  419. package/node_modules/typebox/build/schema/types/unevaluatedItems.mjs +14 -0
  420. package/node_modules/typebox/build/schema/types/unevaluatedProperties.d.mts +9 -0
  421. package/node_modules/typebox/build/schema/types/unevaluatedProperties.mjs +14 -0
  422. package/node_modules/typebox/build/schema/types/uniqueItems.d.mts +9 -0
  423. package/node_modules/typebox/build/schema/types/uniqueItems.mjs +13 -0
  424. package/node_modules/typebox/build/system/arguments/arguments.d.mts +5 -0
  425. package/node_modules/typebox/build/system/arguments/arguments.mjs +9 -0
  426. package/node_modules/typebox/build/system/arguments/index.d.mts +1 -0
  427. package/node_modules/typebox/build/system/arguments/index.mjs +1 -0
  428. package/node_modules/typebox/build/system/environment/environment.d.mts +1 -0
  429. package/node_modules/typebox/build/system/environment/environment.mjs +1 -0
  430. package/node_modules/typebox/build/system/environment/evaluate.d.mts +9 -0
  431. package/node_modules/typebox/build/system/environment/evaluate.mjs +37 -0
  432. package/node_modules/typebox/build/system/environment/index.d.mts +1 -0
  433. package/node_modules/typebox/build/system/environment/index.mjs +1 -0
  434. package/node_modules/typebox/build/system/hashing/hash.d.mts +4 -0
  435. package/node_modules/typebox/build/system/hashing/hash.mjs +261 -0
  436. package/node_modules/typebox/build/system/hashing/index.d.mts +1 -0
  437. package/node_modules/typebox/build/system/hashing/index.mjs +1 -0
  438. package/node_modules/typebox/build/system/index.d.mts +4 -0
  439. package/node_modules/typebox/build/system/index.mjs +4 -0
  440. package/node_modules/typebox/build/system/locale/_config.d.mts +7 -0
  441. package/node_modules/typebox/build/system/locale/_config.mjs +15 -0
  442. package/node_modules/typebox/build/system/locale/_locale.d.mts +40 -0
  443. package/node_modules/typebox/build/system/locale/_locale.mjs +40 -0
  444. package/node_modules/typebox/build/system/locale/ar_001.d.mts +3 -0
  445. package/node_modules/typebox/build/system/locale/ar_001.mjs +40 -0
  446. package/node_modules/typebox/build/system/locale/bn_BD.d.mts +3 -0
  447. package/node_modules/typebox/build/system/locale/bn_BD.mjs +40 -0
  448. package/node_modules/typebox/build/system/locale/cs_CZ.d.mts +3 -0
  449. package/node_modules/typebox/build/system/locale/cs_CZ.mjs +40 -0
  450. package/node_modules/typebox/build/system/locale/de_DE.d.mts +3 -0
  451. package/node_modules/typebox/build/system/locale/de_DE.mjs +40 -0
  452. package/node_modules/typebox/build/system/locale/el_GR.d.mts +3 -0
  453. package/node_modules/typebox/build/system/locale/el_GR.mjs +40 -0
  454. package/node_modules/typebox/build/system/locale/en_US.d.mts +3 -0
  455. package/node_modules/typebox/build/system/locale/en_US.mjs +40 -0
  456. package/node_modules/typebox/build/system/locale/es_419.d.mts +3 -0
  457. package/node_modules/typebox/build/system/locale/es_419.mjs +40 -0
  458. package/node_modules/typebox/build/system/locale/es_AR.d.mts +3 -0
  459. package/node_modules/typebox/build/system/locale/es_AR.mjs +40 -0
  460. package/node_modules/typebox/build/system/locale/es_ES.d.mts +3 -0
  461. package/node_modules/typebox/build/system/locale/es_ES.mjs +40 -0
  462. package/node_modules/typebox/build/system/locale/es_MX.d.mts +3 -0
  463. package/node_modules/typebox/build/system/locale/es_MX.mjs +40 -0
  464. package/node_modules/typebox/build/system/locale/fa_IR.d.mts +3 -0
  465. package/node_modules/typebox/build/system/locale/fa_IR.mjs +40 -0
  466. package/node_modules/typebox/build/system/locale/fil_PH.d.mts +3 -0
  467. package/node_modules/typebox/build/system/locale/fil_PH.mjs +40 -0
  468. package/node_modules/typebox/build/system/locale/fr_CA.d.mts +3 -0
  469. package/node_modules/typebox/build/system/locale/fr_CA.mjs +40 -0
  470. package/node_modules/typebox/build/system/locale/fr_FR.d.mts +3 -0
  471. package/node_modules/typebox/build/system/locale/fr_FR.mjs +40 -0
  472. package/node_modules/typebox/build/system/locale/ha_NG.d.mts +3 -0
  473. package/node_modules/typebox/build/system/locale/ha_NG.mjs +40 -0
  474. package/node_modules/typebox/build/system/locale/hi_IN.d.mts +3 -0
  475. package/node_modules/typebox/build/system/locale/hi_IN.mjs +40 -0
  476. package/node_modules/typebox/build/system/locale/hu_HU.d.mts +3 -0
  477. package/node_modules/typebox/build/system/locale/hu_HU.mjs +40 -0
  478. package/node_modules/typebox/build/system/locale/id_ID.d.mts +3 -0
  479. package/node_modules/typebox/build/system/locale/id_ID.mjs +40 -0
  480. package/node_modules/typebox/build/system/locale/index.d.mts +1 -0
  481. package/node_modules/typebox/build/system/locale/index.mjs +1 -0
  482. package/node_modules/typebox/build/system/locale/it_IT.d.mts +3 -0
  483. package/node_modules/typebox/build/system/locale/it_IT.mjs +40 -0
  484. package/node_modules/typebox/build/system/locale/ja_JP.d.mts +3 -0
  485. package/node_modules/typebox/build/system/locale/ja_JP.mjs +40 -0
  486. package/node_modules/typebox/build/system/locale/ko_KR.d.mts +3 -0
  487. package/node_modules/typebox/build/system/locale/ko_KR.mjs +40 -0
  488. package/node_modules/typebox/build/system/locale/ms_MY.d.mts +3 -0
  489. package/node_modules/typebox/build/system/locale/ms_MY.mjs +40 -0
  490. package/node_modules/typebox/build/system/locale/nl_NL.d.mts +3 -0
  491. package/node_modules/typebox/build/system/locale/nl_NL.mjs +40 -0
  492. package/node_modules/typebox/build/system/locale/pl_PL.d.mts +3 -0
  493. package/node_modules/typebox/build/system/locale/pl_PL.mjs +40 -0
  494. package/node_modules/typebox/build/system/locale/pt_BR.d.mts +3 -0
  495. package/node_modules/typebox/build/system/locale/pt_BR.mjs +40 -0
  496. package/node_modules/typebox/build/system/locale/pt_PT.d.mts +3 -0
  497. package/node_modules/typebox/build/system/locale/pt_PT.mjs +40 -0
  498. package/node_modules/typebox/build/system/locale/ro_RO.d.mts +3 -0
  499. package/node_modules/typebox/build/system/locale/ro_RO.mjs +40 -0
  500. package/node_modules/typebox/build/system/locale/ru_RU.d.mts +3 -0
  501. package/node_modules/typebox/build/system/locale/ru_RU.mjs +40 -0
  502. package/node_modules/typebox/build/system/locale/sv_SE.d.mts +3 -0
  503. package/node_modules/typebox/build/system/locale/sv_SE.mjs +40 -0
  504. package/node_modules/typebox/build/system/locale/sw_TZ.d.mts +3 -0
  505. package/node_modules/typebox/build/system/locale/sw_TZ.mjs +40 -0
  506. package/node_modules/typebox/build/system/locale/th_TH.d.mts +3 -0
  507. package/node_modules/typebox/build/system/locale/th_TH.mjs +40 -0
  508. package/node_modules/typebox/build/system/locale/tr_TR.d.mts +3 -0
  509. package/node_modules/typebox/build/system/locale/tr_TR.mjs +40 -0
  510. package/node_modules/typebox/build/system/locale/uk_UA.d.mts +3 -0
  511. package/node_modules/typebox/build/system/locale/uk_UA.mjs +40 -0
  512. package/node_modules/typebox/build/system/locale/ur_PK.d.mts +3 -0
  513. package/node_modules/typebox/build/system/locale/ur_PK.mjs +40 -0
  514. package/node_modules/typebox/build/system/locale/vi_VN.d.mts +3 -0
  515. package/node_modules/typebox/build/system/locale/vi_VN.mjs +40 -0
  516. package/node_modules/typebox/build/system/locale/yo_NG.d.mts +3 -0
  517. package/node_modules/typebox/build/system/locale/yo_NG.mjs +40 -0
  518. package/node_modules/typebox/build/system/locale/zh_Hans.d.mts +3 -0
  519. package/node_modules/typebox/build/system/locale/zh_Hans.mjs +40 -0
  520. package/node_modules/typebox/build/system/locale/zh_Hant.d.mts +3 -0
  521. package/node_modules/typebox/build/system/locale/zh_Hant.mjs +40 -0
  522. package/node_modules/typebox/build/system/memory/assign.d.mts +8 -0
  523. package/node_modules/typebox/build/system/memory/assign.mjs +19 -0
  524. package/node_modules/typebox/build/system/memory/clone.d.mts +4 -0
  525. package/node_modules/typebox/build/system/memory/clone.mjs +25 -0
  526. package/node_modules/typebox/build/system/memory/create.d.mts +4 -0
  527. package/node_modules/typebox/build/system/memory/create.mjs +34 -0
  528. package/node_modules/typebox/build/system/memory/deep.d.mts +2 -0
  529. package/node_modules/typebox/build/system/memory/deep.mjs +108 -0
  530. package/node_modules/typebox/build/system/memory/discard.d.mts +4 -0
  531. package/node_modules/typebox/build/system/memory/discard.mjs +19 -0
  532. package/node_modules/typebox/build/system/memory/finalize.d.mts +4 -0
  533. package/node_modules/typebox/build/system/memory/finalize.mjs +30 -0
  534. package/node_modules/typebox/build/system/memory/index.d.mts +1 -0
  535. package/node_modules/typebox/build/system/memory/index.mjs +1 -0
  536. package/node_modules/typebox/build/system/memory/keys.d.mts +2 -0
  537. package/node_modules/typebox/build/system/memory/keys.mjs +8 -0
  538. package/node_modules/typebox/build/system/memory/memory.d.mts +6 -0
  539. package/node_modules/typebox/build/system/memory/memory.mjs +7 -0
  540. package/node_modules/typebox/build/system/memory/metrics.d.mts +14 -0
  541. package/node_modules/typebox/build/system/memory/metrics.mjs +8 -0
  542. package/node_modules/typebox/build/system/memory/update.d.mts +4 -0
  543. package/node_modules/typebox/build/system/memory/update.mjs +60 -0
  544. package/node_modules/typebox/build/system/settings/index.d.mts +1 -0
  545. package/node_modules/typebox/build/system/settings/index.mjs +1 -0
  546. package/node_modules/typebox/build/system/settings/internal.d.mts +2 -0
  547. package/node_modules/typebox/build/system/settings/internal.mjs +20 -0
  548. package/node_modules/typebox/build/system/settings/settings.d.mts +91 -0
  549. package/node_modules/typebox/build/system/settings/settings.mjs +50 -0
  550. package/node_modules/typebox/build/system/system.d.mts +6 -0
  551. package/node_modules/typebox/build/system/system.mjs +6 -0
  552. package/node_modules/typebox/build/system/unreachable/index.d.mts +1 -0
  553. package/node_modules/typebox/build/system/unreachable/index.mjs +1 -0
  554. package/node_modules/typebox/build/system/unreachable/unreachable.d.mts +3 -0
  555. package/node_modules/typebox/build/system/unreachable/unreachable.mjs +6 -0
  556. package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
  557. package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
  558. package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
  559. package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
  560. package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
  561. package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
  562. package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
  563. package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
  564. package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
  565. package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
  566. package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
  567. package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
  568. package/node_modules/typebox/build/type/action/capitalize.d.mts +11 -0
  569. package/node_modules/typebox/build/type/action/capitalize.mjs +11 -0
  570. package/node_modules/typebox/build/type/action/conditional.d.mts +12 -0
  571. package/node_modules/typebox/build/type/action/conditional.mjs +13 -0
  572. package/node_modules/typebox/build/type/action/constructor_parameters.d.mts +11 -0
  573. package/node_modules/typebox/build/type/action/constructor_parameters.mjs +11 -0
  574. package/node_modules/typebox/build/type/action/evaluate.d.mts +11 -0
  575. package/node_modules/typebox/build/type/action/evaluate.mjs +11 -0
  576. package/node_modules/typebox/build/type/action/exclude.d.mts +11 -0
  577. package/node_modules/typebox/build/type/action/exclude.mjs +11 -0
  578. package/node_modules/typebox/build/type/action/extract.d.mts +11 -0
  579. package/node_modules/typebox/build/type/action/extract.mjs +11 -0
  580. package/node_modules/typebox/build/type/action/index.d.mts +30 -0
  581. package/node_modules/typebox/build/type/action/index.mjs +30 -0
  582. package/node_modules/typebox/build/type/action/indexed.d.mts +14 -0
  583. package/node_modules/typebox/build/type/action/indexed.mjs +14 -0
  584. package/node_modules/typebox/build/type/action/instance_type.d.mts +11 -0
  585. package/node_modules/typebox/build/type/action/instance_type.mjs +11 -0
  586. package/node_modules/typebox/build/type/action/interface.d.mts +14 -0
  587. package/node_modules/typebox/build/type/action/interface.mjs +22 -0
  588. package/node_modules/typebox/build/type/action/keyof.d.mts +11 -0
  589. package/node_modules/typebox/build/type/action/keyof.mjs +11 -0
  590. package/node_modules/typebox/build/type/action/lowercase.d.mts +11 -0
  591. package/node_modules/typebox/build/type/action/lowercase.mjs +11 -0
  592. package/node_modules/typebox/build/type/action/mapped.d.mts +13 -0
  593. package/node_modules/typebox/build/type/action/mapped.mjs +13 -0
  594. package/node_modules/typebox/build/type/action/module.d.mts +13 -0
  595. package/node_modules/typebox/build/type/action/module.mjs +13 -0
  596. package/node_modules/typebox/build/type/action/non_nullable.d.mts +11 -0
  597. package/node_modules/typebox/build/type/action/non_nullable.mjs +11 -0
  598. package/node_modules/typebox/build/type/action/omit.d.mts +14 -0
  599. package/node_modules/typebox/build/type/action/omit.mjs +14 -0
  600. package/node_modules/typebox/build/type/action/parameters.d.mts +11 -0
  601. package/node_modules/typebox/build/type/action/parameters.mjs +11 -0
  602. package/node_modules/typebox/build/type/action/partial.d.mts +11 -0
  603. package/node_modules/typebox/build/type/action/partial.mjs +11 -0
  604. package/node_modules/typebox/build/type/action/pick.d.mts +14 -0
  605. package/node_modules/typebox/build/type/action/pick.mjs +14 -0
  606. package/node_modules/typebox/build/type/action/readonly_object.d.mts +16 -0
  607. package/node_modules/typebox/build/type/action/readonly_object.mjs +19 -0
  608. package/node_modules/typebox/build/type/action/required.d.mts +11 -0
  609. package/node_modules/typebox/build/type/action/required.mjs +11 -0
  610. package/node_modules/typebox/build/type/action/return_type.d.mts +11 -0
  611. package/node_modules/typebox/build/type/action/return_type.mjs +11 -0
  612. package/node_modules/typebox/build/type/action/uncapitalize.d.mts +11 -0
  613. package/node_modules/typebox/build/type/action/uncapitalize.mjs +11 -0
  614. package/node_modules/typebox/build/type/action/uppercase.d.mts +11 -0
  615. package/node_modules/typebox/build/type/action/uppercase.mjs +11 -0
  616. package/node_modules/typebox/build/type/action/with.d.mts +11 -0
  617. package/node_modules/typebox/build/type/action/with.mjs +11 -0
  618. package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +20 -0
  619. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +66 -0
  620. package/node_modules/typebox/build/type/engine/call/index.d.mts +1 -0
  621. package/node_modules/typebox/build/type/engine/call/index.mjs +1 -0
  622. package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +21 -0
  623. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +79 -0
  624. package/node_modules/typebox/build/type/engine/call/resolve_arguments.d.mts +13 -0
  625. package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +33 -0
  626. package/node_modules/typebox/build/type/engine/call/resolve_target.d.mts +25 -0
  627. package/node_modules/typebox/build/type/engine/call/resolve_target.mjs +27 -0
  628. package/node_modules/typebox/build/type/engine/conditional/index.d.mts +1 -0
  629. package/node_modules/typebox/build/type/engine/conditional/index.mjs +1 -0
  630. package/node_modules/typebox/build/type/engine/conditional/instantiate.d.mts +12 -0
  631. package/node_modules/typebox/build/type/engine/conditional/instantiate.mjs +23 -0
  632. package/node_modules/typebox/build/type/engine/constructor_parameters/index.d.mts +1 -0
  633. package/node_modules/typebox/build/type/engine/constructor_parameters/index.mjs +1 -0
  634. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +14 -0
  635. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +25 -0
  636. package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +8 -0
  637. package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +16 -0
  638. package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +21 -0
  639. package/node_modules/typebox/build/type/engine/cyclic/check.mjs +45 -0
  640. package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +22 -0
  641. package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +47 -0
  642. package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +28 -0
  643. package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +47 -0
  644. package/node_modules/typebox/build/type/engine/cyclic/index.d.mts +6 -0
  645. package/node_modules/typebox/build/type/engine/cyclic/index.mjs +6 -0
  646. package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +17 -0
  647. package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +31 -0
  648. package/node_modules/typebox/build/type/engine/cyclic/target.d.mts +10 -0
  649. package/node_modules/typebox/build/type/engine/cyclic/target.mjs +16 -0
  650. package/node_modules/typebox/build/type/engine/enum/index.d.mts +1 -0
  651. package/node_modules/typebox/build/type/engine/enum/index.mjs +1 -0
  652. package/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.d.mts +8 -0
  653. package/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.mjs +9 -0
  654. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +15 -0
  655. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +37 -0
  656. package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +11 -0
  657. package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +18 -0
  658. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +15 -0
  659. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +33 -0
  660. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +12 -0
  661. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +33 -0
  662. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +26 -0
  663. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +56 -0
  664. package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +6 -0
  665. package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +10 -0
  666. package/node_modules/typebox/build/type/engine/evaluate/index.d.mts +9 -0
  667. package/node_modules/typebox/build/type/engine/evaluate/index.mjs +9 -0
  668. package/node_modules/typebox/build/type/engine/evaluate/instantiate.d.mts +8 -0
  669. package/node_modules/typebox/build/type/engine/evaluate/instantiate.mjs +12 -0
  670. package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +24 -0
  671. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +36 -0
  672. package/node_modules/typebox/build/type/engine/evaluate/property.d.mts +30 -0
  673. package/node_modules/typebox/build/type/engine/evaluate/property.mjs +29 -0
  674. package/node_modules/typebox/build/type/engine/exclude/index.d.mts +1 -0
  675. package/node_modules/typebox/build/type/engine/exclude/index.mjs +1 -0
  676. package/node_modules/typebox/build/type/engine/exclude/instantiate.d.mts +9 -0
  677. package/node_modules/typebox/build/type/engine/exclude/instantiate.mjs +16 -0
  678. package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +10 -0
  679. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +22 -0
  680. package/node_modules/typebox/build/type/engine/extract/index.d.mts +1 -0
  681. package/node_modules/typebox/build/type/engine/extract/index.mjs +1 -0
  682. package/node_modules/typebox/build/type/engine/extract/instantiate.d.mts +9 -0
  683. package/node_modules/typebox/build/type/engine/extract/instantiate.mjs +16 -0
  684. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +10 -0
  685. package/node_modules/typebox/build/type/engine/extract/operation.mjs +22 -0
  686. package/node_modules/typebox/build/type/engine/helpers/index.d.mts +3 -0
  687. package/node_modules/typebox/build/type/engine/helpers/index.mjs +3 -0
  688. package/node_modules/typebox/build/type/engine/helpers/keys.d.mts +3 -0
  689. package/node_modules/typebox/build/type/engine/helpers/keys.mjs +8 -0
  690. package/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.d.mts +7 -0
  691. package/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.mjs +15 -0
  692. package/node_modules/typebox/build/type/engine/helpers/union.d.mts +7 -0
  693. package/node_modules/typebox/build/type/engine/helpers/union.mjs +3 -0
  694. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +8 -0
  695. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +11 -0
  696. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  697. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  698. package/node_modules/typebox/build/type/engine/index.d.mts +31 -0
  699. package/node_modules/typebox/build/type/engine/index.mjs +37 -0
  700. package/node_modules/typebox/build/type/engine/indexable/from_cyclic.d.mts +6 -0
  701. package/node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs +8 -0
  702. package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
  703. package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
  704. package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +6 -0
  705. package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +8 -0
  706. package/node_modules/typebox/build/type/engine/indexable/from_intersect.d.mts +5 -0
  707. package/node_modules/typebox/build/type/engine/indexable/from_intersect.mjs +8 -0
  708. package/node_modules/typebox/build/type/engine/indexable/from_literal.d.mts +3 -0
  709. package/node_modules/typebox/build/type/engine/indexable/from_literal.mjs +5 -0
  710. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +5 -0
  711. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +8 -0
  712. package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +19 -0
  713. package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +25 -0
  714. package/node_modules/typebox/build/type/engine/indexable/from_union.d.mts +4 -0
  715. package/node_modules/typebox/build/type/engine/indexable/from_union.mjs +7 -0
  716. package/node_modules/typebox/build/type/engine/indexable/to_indexable.d.mts +9 -0
  717. package/node_modules/typebox/build/type/engine/indexable/to_indexable.mjs +14 -0
  718. package/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.d.mts +10 -0
  719. package/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.mjs +12 -0
  720. package/node_modules/typebox/build/type/engine/indexed/array_indexer.d.mts +12 -0
  721. package/node_modules/typebox/build/type/engine/indexed/array_indexer.mjs +18 -0
  722. package/node_modules/typebox/build/type/engine/indexed/from_array.d.mts +15 -0
  723. package/node_modules/typebox/build/type/engine/indexed/from_array.mjs +35 -0
  724. package/node_modules/typebox/build/type/engine/indexed/from_object.d.mts +16 -0
  725. package/node_modules/typebox/build/type/engine/indexed/from_object.mjs +40 -0
  726. package/node_modules/typebox/build/type/engine/indexed/from_tuple.d.mts +13 -0
  727. package/node_modules/typebox/build/type/engine/indexed/from_tuple.mjs +35 -0
  728. package/node_modules/typebox/build/type/engine/indexed/from_type.d.mts +11 -0
  729. package/node_modules/typebox/build/type/engine/indexed/from_type.mjs +14 -0
  730. package/node_modules/typebox/build/type/engine/indexed/index.d.mts +1 -0
  731. package/node_modules/typebox/build/type/engine/indexed/index.mjs +1 -0
  732. package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +16 -0
  733. package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +28 -0
  734. package/node_modules/typebox/build/type/engine/instance_type/index.d.mts +1 -0
  735. package/node_modules/typebox/build/type/engine/instance_type/index.mjs +1 -0
  736. package/node_modules/typebox/build/type/engine/instance_type/instantiate.d.mts +12 -0
  737. package/node_modules/typebox/build/type/engine/instance_type/instantiate.mjs +21 -0
  738. package/node_modules/typebox/build/type/engine/instantiate.d.mts +178 -0
  739. package/node_modules/typebox/build/type/engine/instantiate.mjs +158 -0
  740. package/node_modules/typebox/build/type/engine/interface/index.d.mts +1 -0
  741. package/node_modules/typebox/build/type/engine/interface/index.mjs +1 -0
  742. package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +15 -0
  743. package/node_modules/typebox/build/type/engine/interface/instantiate.mjs +23 -0
  744. package/node_modules/typebox/build/type/engine/intrinsics/from_literal.d.mts +5 -0
  745. package/node_modules/typebox/build/type/engine/intrinsics/from_literal.mjs +9 -0
  746. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +6 -0
  747. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +8 -0
  748. package/node_modules/typebox/build/type/engine/intrinsics/from_type.d.mts +10 -0
  749. package/node_modules/typebox/build/type/engine/intrinsics/from_type.mjs +13 -0
  750. package/node_modules/typebox/build/type/engine/intrinsics/from_union.d.mts +6 -0
  751. package/node_modules/typebox/build/type/engine/intrinsics/from_union.mjs +7 -0
  752. package/node_modules/typebox/build/type/engine/intrinsics/index.d.mts +1 -0
  753. package/node_modules/typebox/build/type/engine/intrinsics/index.mjs +1 -0
  754. package/node_modules/typebox/build/type/engine/intrinsics/instantiate.d.mts +38 -0
  755. package/node_modules/typebox/build/type/engine/intrinsics/instantiate.mjs +52 -0
  756. package/node_modules/typebox/build/type/engine/intrinsics/mapping.d.mts +9 -0
  757. package/node_modules/typebox/build/type/engine/intrinsics/mapping.mjs +4 -0
  758. package/node_modules/typebox/build/type/engine/keyof/from_any.d.mts +6 -0
  759. package/node_modules/typebox/build/type/engine/keyof/from_any.mjs +8 -0
  760. package/node_modules/typebox/build/type/engine/keyof/from_array.d.mts +4 -0
  761. package/node_modules/typebox/build/type/engine/keyof/from_array.mjs +5 -0
  762. package/node_modules/typebox/build/type/engine/keyof/from_object.d.mts +10 -0
  763. package/node_modules/typebox/build/type/engine/keyof/from_object.mjs +20 -0
  764. package/node_modules/typebox/build/type/engine/keyof/from_record.d.mts +4 -0
  765. package/node_modules/typebox/build/type/engine/keyof/from_record.mjs +5 -0
  766. package/node_modules/typebox/build/type/engine/keyof/from_tuple.d.mts +5 -0
  767. package/node_modules/typebox/build/type/engine/keyof/from_tuple.mjs +7 -0
  768. package/node_modules/typebox/build/type/engine/keyof/from_type.d.mts +15 -0
  769. package/node_modules/typebox/build/type/engine/keyof/from_type.mjs +23 -0
  770. package/node_modules/typebox/build/type/engine/keyof/index.d.mts +1 -0
  771. package/node_modules/typebox/build/type/engine/keyof/index.mjs +1 -0
  772. package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +16 -0
  773. package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +29 -0
  774. package/node_modules/typebox/build/type/engine/mapped/index.d.mts +1 -0
  775. package/node_modules/typebox/build/type/engine/mapped/index.mjs +1 -0
  776. package/node_modules/typebox/build/type/engine/mapped/instantiate.d.mts +10 -0
  777. package/node_modules/typebox/build/type/engine/mapped/instantiate.mjs +15 -0
  778. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +22 -0
  779. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +42 -0
  780. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +17 -0
  781. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +39 -0
  782. package/node_modules/typebox/build/type/engine/module/index.d.mts +1 -0
  783. package/node_modules/typebox/build/type/engine/module/index.mjs +1 -0
  784. package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +19 -0
  785. package/node_modules/typebox/build/type/engine/module/instantiate.mjs +36 -0
  786. package/node_modules/typebox/build/type/engine/non_nullable/index.d.mts +1 -0
  787. package/node_modules/typebox/build/type/engine/non_nullable/index.mjs +1 -0
  788. package/node_modules/typebox/build/type/engine/non_nullable/instantiate.d.mts +14 -0
  789. package/node_modules/typebox/build/type/engine/non_nullable/instantiate.mjs +22 -0
  790. package/node_modules/typebox/build/type/engine/object/collapse.d.mts +12 -0
  791. package/node_modules/typebox/build/type/engine/object/collapse.mjs +14 -0
  792. package/node_modules/typebox/build/type/engine/object/from_cyclic.d.mts +6 -0
  793. package/node_modules/typebox/build/type/engine/object/from_cyclic.mjs +8 -0
  794. package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
  795. package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
  796. package/node_modules/typebox/build/type/engine/object/from_intersect.d.mts +17 -0
  797. package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +22 -0
  798. package/node_modules/typebox/build/type/engine/object/from_object.d.mts +3 -0
  799. package/node_modules/typebox/build/type/engine/object/from_object.mjs +4 -0
  800. package/node_modules/typebox/build/type/engine/object/from_tuple.d.mts +6 -0
  801. package/node_modules/typebox/build/type/engine/object/from_tuple.mjs +9 -0
  802. package/node_modules/typebox/build/type/engine/object/from_type.d.mts +16 -0
  803. package/node_modules/typebox/build/type/engine/object/from_type.mjs +23 -0
  804. package/node_modules/typebox/build/type/engine/object/from_union.d.mts +12 -0
  805. package/node_modules/typebox/build/type/engine/object/from_union.mjs +19 -0
  806. package/node_modules/typebox/build/type/engine/object/index.d.mts +1 -0
  807. package/node_modules/typebox/build/type/engine/object/index.mjs +1 -0
  808. package/node_modules/typebox/build/type/engine/omit/from_type.d.mts +12 -0
  809. package/node_modules/typebox/build/type/engine/omit/from_type.mjs +18 -0
  810. package/node_modules/typebox/build/type/engine/omit/index.d.mts +1 -0
  811. package/node_modules/typebox/build/type/engine/omit/index.mjs +1 -0
  812. package/node_modules/typebox/build/type/engine/omit/instantiate.d.mts +9 -0
  813. package/node_modules/typebox/build/type/engine/omit/instantiate.mjs +16 -0
  814. package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +8 -0
  815. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +11 -0
  816. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  817. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
  818. package/node_modules/typebox/build/type/engine/parameters/index.d.mts +1 -0
  819. package/node_modules/typebox/build/type/engine/parameters/index.mjs +1 -0
  820. package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +14 -0
  821. package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +25 -0
  822. package/node_modules/typebox/build/type/engine/partial/from_cyclic.d.mts +10 -0
  823. package/node_modules/typebox/build/type/engine/partial/from_cyclic.mjs +11 -0
  824. package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
  825. package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
  826. package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +5 -0
  827. package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +8 -0
  828. package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +8 -0
  829. package/node_modules/typebox/build/type/engine/partial/from_object.mjs +11 -0
  830. package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +14 -0
  831. package/node_modules/typebox/build/type/engine/partial/from_type.mjs +20 -0
  832. package/node_modules/typebox/build/type/engine/partial/from_union.d.mts +5 -0
  833. package/node_modules/typebox/build/type/engine/partial/from_union.mjs +7 -0
  834. package/node_modules/typebox/build/type/engine/partial/index.d.mts +1 -0
  835. package/node_modules/typebox/build/type/engine/partial/index.mjs +1 -0
  836. package/node_modules/typebox/build/type/engine/partial/instantiate.d.mts +9 -0
  837. package/node_modules/typebox/build/type/engine/partial/instantiate.mjs +15 -0
  838. package/node_modules/typebox/build/type/engine/patterns/index.d.mts +2 -0
  839. package/node_modules/typebox/build/type/engine/patterns/index.mjs +2 -0
  840. package/node_modules/typebox/build/type/engine/patterns/pattern.d.mts +6 -0
  841. package/node_modules/typebox/build/type/engine/patterns/pattern.mjs +11 -0
  842. package/node_modules/typebox/build/type/engine/patterns/template.d.mts +7 -0
  843. package/node_modules/typebox/build/type/engine/patterns/template.mjs +20 -0
  844. package/node_modules/typebox/build/type/engine/pick/from_type.d.mts +13 -0
  845. package/node_modules/typebox/build/type/engine/pick/from_type.mjs +20 -0
  846. package/node_modules/typebox/build/type/engine/pick/index.d.mts +1 -0
  847. package/node_modules/typebox/build/type/engine/pick/index.mjs +1 -0
  848. package/node_modules/typebox/build/type/engine/pick/instantiate.d.mts +9 -0
  849. package/node_modules/typebox/build/type/engine/pick/instantiate.mjs +16 -0
  850. package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
  851. package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
  852. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
  853. package/node_modules/typebox/build/type/engine/priority/priority.mjs +27 -0
  854. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +8 -0
  855. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +11 -0
  856. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  857. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  858. package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +5 -0
  859. package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +7 -0
  860. package/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.d.mts +10 -0
  861. package/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.mjs +11 -0
  862. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
  863. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
  864. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +5 -0
  865. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +8 -0
  866. package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +8 -0
  867. package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +11 -0
  868. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +5 -0
  869. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +7 -0
  870. package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +18 -0
  871. package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +25 -0
  872. package/node_modules/typebox/build/type/engine/readonly_object/from_union.d.mts +5 -0
  873. package/node_modules/typebox/build/type/engine/readonly_object/from_union.mjs +7 -0
  874. package/node_modules/typebox/build/type/engine/readonly_object/index.d.mts +1 -0
  875. package/node_modules/typebox/build/type/engine/readonly_object/index.mjs +1 -0
  876. package/node_modules/typebox/build/type/engine/readonly_object/instantiate.d.mts +9 -0
  877. package/node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs +15 -0
  878. package/node_modules/typebox/build/type/engine/record/from_key.d.mts +24 -0
  879. package/node_modules/typebox/build/type/engine/record/from_key.mjs +40 -0
  880. package/node_modules/typebox/build/type/engine/record/from_key_any.d.mts +4 -0
  881. package/node_modules/typebox/build/type/engine/record/from_key_any.mjs +6 -0
  882. package/node_modules/typebox/build/type/engine/record/from_key_boolean.d.mts +7 -0
  883. package/node_modules/typebox/build/type/engine/record/from_key_boolean.mjs +5 -0
  884. package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +6 -0
  885. package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +8 -0
  886. package/node_modules/typebox/build/type/engine/record/from_key_integer.d.mts +5 -0
  887. package/node_modules/typebox/build/type/engine/record/from_key_integer.mjs +7 -0
  888. package/node_modules/typebox/build/type/engine/record/from_key_intersect.d.mts +5 -0
  889. package/node_modules/typebox/build/type/engine/record/from_key_intersect.mjs +8 -0
  890. package/node_modules/typebox/build/type/engine/record/from_key_literal.d.mts +11 -0
  891. package/node_modules/typebox/build/type/engine/record/from_key_literal.mjs +10 -0
  892. package/node_modules/typebox/build/type/engine/record/from_key_number.d.mts +5 -0
  893. package/node_modules/typebox/build/type/engine/record/from_key_number.mjs +7 -0
  894. package/node_modules/typebox/build/type/engine/record/from_key_string.d.mts +5 -0
  895. package/node_modules/typebox/build/type/engine/record/from_key_string.mjs +12 -0
  896. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +8 -0
  897. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +12 -0
  898. package/node_modules/typebox/build/type/engine/record/from_key_union.d.mts +20 -0
  899. package/node_modules/typebox/build/type/engine/record/from_key_union.mjs +39 -0
  900. package/node_modules/typebox/build/type/engine/record/index.d.mts +1 -0
  901. package/node_modules/typebox/build/type/engine/record/index.mjs +1 -0
  902. package/node_modules/typebox/build/type/engine/record/instantiate.d.mts +9 -0
  903. package/node_modules/typebox/build/type/engine/record/instantiate.mjs +17 -0
  904. package/node_modules/typebox/build/type/engine/record/record_create.d.mts +3 -0
  905. package/node_modules/typebox/build/type/engine/record/record_create.mjs +7 -0
  906. package/node_modules/typebox/build/type/engine/ref/index.d.mts +1 -0
  907. package/node_modules/typebox/build/type/engine/ref/index.mjs +1 -0
  908. package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +6 -0
  909. package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +10 -0
  910. package/node_modules/typebox/build/type/engine/required/from_cyclic.d.mts +10 -0
  911. package/node_modules/typebox/build/type/engine/required/from_cyclic.mjs +11 -0
  912. package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
  913. package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
  914. package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +5 -0
  915. package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +8 -0
  916. package/node_modules/typebox/build/type/engine/required/from_object.d.mts +8 -0
  917. package/node_modules/typebox/build/type/engine/required/from_object.mjs +11 -0
  918. package/node_modules/typebox/build/type/engine/required/from_type.d.mts +14 -0
  919. package/node_modules/typebox/build/type/engine/required/from_type.mjs +20 -0
  920. package/node_modules/typebox/build/type/engine/required/from_union.d.mts +5 -0
  921. package/node_modules/typebox/build/type/engine/required/from_union.mjs +7 -0
  922. package/node_modules/typebox/build/type/engine/required/index.d.mts +1 -0
  923. package/node_modules/typebox/build/type/engine/required/index.mjs +1 -0
  924. package/node_modules/typebox/build/type/engine/required/instantiate.d.mts +9 -0
  925. package/node_modules/typebox/build/type/engine/required/instantiate.mjs +15 -0
  926. package/node_modules/typebox/build/type/engine/rest/index.d.mts +1 -0
  927. package/node_modules/typebox/build/type/engine/rest/index.mjs +1 -0
  928. package/node_modules/typebox/build/type/engine/rest/spread.d.mts +12 -0
  929. package/node_modules/typebox/build/type/engine/rest/spread.mjs +19 -0
  930. package/node_modules/typebox/build/type/engine/return_type/index.d.mts +1 -0
  931. package/node_modules/typebox/build/type/engine/return_type/index.mjs +1 -0
  932. package/node_modules/typebox/build/type/engine/return_type/instantiate.d.mts +12 -0
  933. package/node_modules/typebox/build/type/engine/return_type/instantiate.mjs +21 -0
  934. package/node_modules/typebox/build/type/engine/template_literal/create.d.mts +1 -0
  935. package/node_modules/typebox/build/type/engine/template_literal/create.mjs +5 -0
  936. package/node_modules/typebox/build/type/engine/template_literal/decode.d.mts +30 -0
  937. package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +81 -0
  938. package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +33 -0
  939. package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +81 -0
  940. package/node_modules/typebox/build/type/engine/template_literal/index.d.mts +6 -0
  941. package/node_modules/typebox/build/type/engine/template_literal/index.mjs +6 -0
  942. package/node_modules/typebox/build/type/engine/template_literal/instantiate.d.mts +9 -0
  943. package/node_modules/typebox/build/type/engine/template_literal/instantiate.mjs +15 -0
  944. package/node_modules/typebox/build/type/engine/template_literal/is_finite.d.mts +12 -0
  945. package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +26 -0
  946. package/node_modules/typebox/build/type/engine/template_literal/is_pattern.d.mts +6 -0
  947. package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +10 -0
  948. package/node_modules/typebox/build/type/engine/template_literal/static.d.mts +18 -0
  949. package/node_modules/typebox/build/type/engine/template_literal/static.mjs +2 -0
  950. package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +16 -0
  951. package/node_modules/typebox/build/type/engine/this/expand_this.mjs +26 -0
  952. package/node_modules/typebox/build/type/engine/this/index.d.mts +1 -0
  953. package/node_modules/typebox/build/type/engine/this/index.mjs +1 -0
  954. package/node_modules/typebox/build/type/engine/tuple/to_object.d.mts +12 -0
  955. package/node_modules/typebox/build/type/engine/tuple/to_object.mjs +14 -0
  956. package/node_modules/typebox/build/type/engine/with/index.d.mts +1 -0
  957. package/node_modules/typebox/build/type/engine/with/index.mjs +1 -0
  958. package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
  959. package/node_modules/typebox/build/type/engine/with/instantiate.mjs +14 -0
  960. package/node_modules/typebox/build/type/extends/any.d.mts +9 -0
  961. package/node_modules/typebox/build/type/extends/any.mjs +12 -0
  962. package/node_modules/typebox/build/type/extends/array.d.mts +20 -0
  963. package/node_modules/typebox/build/type/extends/array.mjs +21 -0
  964. package/node_modules/typebox/build/type/extends/bigint.d.mts +7 -0
  965. package/node_modules/typebox/build/type/extends/bigint.mjs +9 -0
  966. package/node_modules/typebox/build/type/extends/boolean.d.mts +7 -0
  967. package/node_modules/typebox/build/type/extends/boolean.mjs +9 -0
  968. package/node_modules/typebox/build/type/extends/constructor.d.mts +10 -0
  969. package/node_modules/typebox/build/type/extends/constructor.mjs +17 -0
  970. package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
  971. package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
  972. package/node_modules/typebox/build/type/extends/enum.d.mts +7 -0
  973. package/node_modules/typebox/build/type/extends/enum.mjs +7 -0
  974. package/node_modules/typebox/build/type/extends/extends.d.mts +13 -0
  975. package/node_modules/typebox/build/type/extends/extends.mjs +17 -0
  976. package/node_modules/typebox/build/type/extends/extends_left.d.mts +53 -0
  977. package/node_modules/typebox/build/type/extends/extends_left.mjs +80 -0
  978. package/node_modules/typebox/build/type/extends/extends_right.d.mts +27 -0
  979. package/node_modules/typebox/build/type/extends/extends_right.mjs +49 -0
  980. package/node_modules/typebox/build/type/extends/function.d.mts +10 -0
  981. package/node_modules/typebox/build/type/extends/function.mjs +17 -0
  982. package/node_modules/typebox/build/type/extends/index.d.mts +2 -0
  983. package/node_modules/typebox/build/type/extends/index.mjs +2 -0
  984. package/node_modules/typebox/build/type/extends/inference.d.mts +34 -0
  985. package/node_modules/typebox/build/type/extends/inference.mjs +75 -0
  986. package/node_modules/typebox/build/type/extends/integer.d.mts +8 -0
  987. package/node_modules/typebox/build/type/extends/integer.mjs +10 -0
  988. package/node_modules/typebox/build/type/extends/intersect.d.mts +6 -0
  989. package/node_modules/typebox/build/type/extends/intersect.mjs +15 -0
  990. package/node_modules/typebox/build/type/extends/literal.d.mts +18 -0
  991. package/node_modules/typebox/build/type/extends/literal.mjs +44 -0
  992. package/node_modules/typebox/build/type/extends/never.d.mts +8 -0
  993. package/node_modules/typebox/build/type/extends/never.mjs +9 -0
  994. package/node_modules/typebox/build/type/extends/null.d.mts +7 -0
  995. package/node_modules/typebox/build/type/extends/null.mjs +9 -0
  996. package/node_modules/typebox/build/type/extends/number.d.mts +7 -0
  997. package/node_modules/typebox/build/type/extends/number.mjs +9 -0
  998. package/node_modules/typebox/build/type/extends/object.d.mts +32 -0
  999. package/node_modules/typebox/build/type/extends/object.mjs +109 -0
  1000. package/node_modules/typebox/build/type/extends/parameters.d.mts +15 -0
  1001. package/node_modules/typebox/build/type/extends/parameters.mjs +28 -0
  1002. package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
  1003. package/node_modules/typebox/build/type/extends/record.mjs +23 -0
  1004. package/node_modules/typebox/build/type/extends/result.d.mts +24 -0
  1005. package/node_modules/typebox/build/type/extends/result.mjs +36 -0
  1006. package/node_modules/typebox/build/type/extends/return_type.d.mts +7 -0
  1007. package/node_modules/typebox/build/type/extends/return_type.mjs +9 -0
  1008. package/node_modules/typebox/build/type/extends/string.d.mts +7 -0
  1009. package/node_modules/typebox/build/type/extends/string.mjs +9 -0
  1010. package/node_modules/typebox/build/type/extends/symbol.d.mts +7 -0
  1011. package/node_modules/typebox/build/type/extends/symbol.mjs +9 -0
  1012. package/node_modules/typebox/build/type/extends/template_literal.d.mts +6 -0
  1013. package/node_modules/typebox/build/type/extends/template_literal.mjs +7 -0
  1014. package/node_modules/typebox/build/type/extends/tuple.d.mts +23 -0
  1015. package/node_modules/typebox/build/type/extends/tuple.mjs +81 -0
  1016. package/node_modules/typebox/build/type/extends/undefined.d.mts +8 -0
  1017. package/node_modules/typebox/build/type/extends/undefined.mjs +10 -0
  1018. package/node_modules/typebox/build/type/extends/union.d.mts +11 -0
  1019. package/node_modules/typebox/build/type/extends/union.mjs +24 -0
  1020. package/node_modules/typebox/build/type/extends/unknown.d.mts +9 -0
  1021. package/node_modules/typebox/build/type/extends/unknown.mjs +12 -0
  1022. package/node_modules/typebox/build/type/extends/void.d.mts +7 -0
  1023. package/node_modules/typebox/build/type/extends/void.mjs +9 -0
  1024. package/node_modules/typebox/build/type/index.d.mts +5 -0
  1025. package/node_modules/typebox/build/type/index.mjs +5 -0
  1026. package/node_modules/typebox/build/type/script/index.d.mts +1 -0
  1027. package/node_modules/typebox/build/type/script/index.mjs +1 -0
  1028. package/node_modules/typebox/build/type/script/mapping.d.mts +356 -0
  1029. package/node_modules/typebox/build/type/script/mapping.mjs +528 -0
  1030. package/node_modules/typebox/build/type/script/parser.d.mts +256 -0
  1031. package/node_modules/typebox/build/type/script/parser.mjs +140 -0
  1032. package/node_modules/typebox/build/type/script/script.d.mts +16 -0
  1033. package/node_modules/typebox/build/type/script/script.mjs +22 -0
  1034. package/node_modules/typebox/build/type/script/token/bigint.d.mts +8 -0
  1035. package/node_modules/typebox/build/type/script/token/bigint.mjs +14 -0
  1036. package/node_modules/typebox/build/type/script/token/const.d.mts +11 -0
  1037. package/node_modules/typebox/build/type/script/token/const.mjs +18 -0
  1038. package/node_modules/typebox/build/type/script/token/ident.d.mts +16 -0
  1039. package/node_modules/typebox/build/type/script/token/ident.mjs +26 -0
  1040. package/node_modules/typebox/build/type/script/token/index.d.mts +12 -0
  1041. package/node_modules/typebox/build/type/script/token/index.mjs +12 -0
  1042. package/node_modules/typebox/build/type/script/token/integer.d.mts +11 -0
  1043. package/node_modules/typebox/build/type/script/token/integer.mjs +19 -0
  1044. package/node_modules/typebox/build/type/script/token/internal/char.d.mts +75 -0
  1045. package/node_modules/typebox/build/type/script/token/internal/char.mjs +26 -0
  1046. package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -0
  1047. package/node_modules/typebox/build/type/script/token/internal/guard.mjs +15 -0
  1048. package/node_modules/typebox/build/type/script/token/internal/many.d.mts +7 -0
  1049. package/node_modules/typebox/build/type/script/token/internal/many.mjs +14 -0
  1050. package/node_modules/typebox/build/type/script/token/internal/match.d.mts +6 -0
  1051. package/node_modules/typebox/build/type/script/token/internal/match.mjs +11 -0
  1052. package/node_modules/typebox/build/type/script/token/internal/optional.d.mts +5 -0
  1053. package/node_modules/typebox/build/type/script/token/internal/optional.mjs +9 -0
  1054. package/node_modules/typebox/build/type/script/token/internal/take.d.mts +6 -0
  1055. package/node_modules/typebox/build/type/script/token/internal/take.mjs +30 -0
  1056. package/node_modules/typebox/build/type/script/token/internal/trim.d.mts +19 -0
  1057. package/node_modules/typebox/build/type/script/token/internal/trim.mjs +34 -0
  1058. package/node_modules/typebox/build/type/script/token/number.d.mts +11 -0
  1059. package/node_modules/typebox/build/type/script/token/number.mjs +19 -0
  1060. package/node_modules/typebox/build/type/script/token/rest.d.mts +4 -0
  1061. package/node_modules/typebox/build/type/script/token/rest.mjs +9 -0
  1062. package/node_modules/typebox/build/type/script/token/span.d.mts +11 -0
  1063. package/node_modules/typebox/build/type/script/token/span.mjs +24 -0
  1064. package/node_modules/typebox/build/type/script/token/string.d.mts +11 -0
  1065. package/node_modules/typebox/build/type/script/token/string.mjs +20 -0
  1066. package/node_modules/typebox/build/type/script/token/unsigned_integer.d.mts +16 -0
  1067. package/node_modules/typebox/build/type/script/token/unsigned_integer.mjs +26 -0
  1068. package/node_modules/typebox/build/type/script/token/unsigned_number.d.mts +17 -0
  1069. package/node_modules/typebox/build/type/script/token/unsigned_number.mjs +38 -0
  1070. package/node_modules/typebox/build/type/script/token/until.d.mts +7 -0
  1071. package/node_modules/typebox/build/type/script/token/until.mjs +21 -0
  1072. package/node_modules/typebox/build/type/script/token/until_1.d.mts +5 -0
  1073. package/node_modules/typebox/build/type/script/token/until_1.mjs +12 -0
  1074. package/node_modules/typebox/build/type/types/_codec.d.mts +30 -0
  1075. package/node_modules/typebox/build/type/types/_codec.mjs +60 -0
  1076. package/node_modules/typebox/build/type/types/_immutable.d.mts +9 -0
  1077. package/node_modules/typebox/build/type/types/_immutable.mjs +18 -0
  1078. package/node_modules/typebox/build/type/types/_optional.d.mts +9 -0
  1079. package/node_modules/typebox/build/type/types/_optional.mjs +18 -0
  1080. package/node_modules/typebox/build/type/types/_readonly.d.mts +9 -0
  1081. package/node_modules/typebox/build/type/types/_readonly.mjs +18 -0
  1082. package/node_modules/typebox/build/type/types/_refine.d.mts +24 -0
  1083. package/node_modules/typebox/build/type/types/_refine.mjs +36 -0
  1084. package/node_modules/typebox/build/type/types/any.d.mts +10 -0
  1085. package/node_modules/typebox/build/type/types/any.mjs +18 -0
  1086. package/node_modules/typebox/build/type/types/array.d.mts +18 -0
  1087. package/node_modules/typebox/build/type/types/array.mjs +25 -0
  1088. package/node_modules/typebox/build/type/types/bigint.d.mts +12 -0
  1089. package/node_modules/typebox/build/type/types/bigint.mjs +21 -0
  1090. package/node_modules/typebox/build/type/types/boolean.d.mts +11 -0
  1091. package/node_modules/typebox/build/type/types/boolean.mjs +17 -0
  1092. package/node_modules/typebox/build/type/types/call.d.mts +16 -0
  1093. package/node_modules/typebox/build/type/types/call.mjs +23 -0
  1094. package/node_modules/typebox/build/type/types/constructor.d.mts +18 -0
  1095. package/node_modules/typebox/build/type/types/constructor.mjs +24 -0
  1096. package/node_modules/typebox/build/type/types/cyclic.d.mts +16 -0
  1097. package/node_modules/typebox/build/type/types/cyclic.mjs +29 -0
  1098. package/node_modules/typebox/build/type/types/deferred.d.mts +13 -0
  1099. package/node_modules/typebox/build/type/types/deferred.mjs +16 -0
  1100. package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
  1101. package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
  1102. package/node_modules/typebox/build/type/types/enum.d.mts +18 -0
  1103. package/node_modules/typebox/build/type/types/enum.mjs +22 -0
  1104. package/node_modules/typebox/build/type/types/function.d.mts +21 -0
  1105. package/node_modules/typebox/build/type/types/function.mjs +25 -0
  1106. package/node_modules/typebox/build/type/types/generic.d.mts +13 -0
  1107. package/node_modules/typebox/build/type/types/generic.mjs +17 -0
  1108. package/node_modules/typebox/build/type/types/identifier.d.mts +11 -0
  1109. package/node_modules/typebox/build/type/types/identifier.mjs +17 -0
  1110. package/node_modules/typebox/build/type/types/index.d.mts +45 -0
  1111. package/node_modules/typebox/build/type/types/index.mjs +51 -0
  1112. package/node_modules/typebox/build/type/types/infer.d.mts +15 -0
  1113. package/node_modules/typebox/build/type/types/infer.mjs +20 -0
  1114. package/node_modules/typebox/build/type/types/integer.d.mts +12 -0
  1115. package/node_modules/typebox/build/type/types/integer.mjs +21 -0
  1116. package/node_modules/typebox/build/type/types/intersect.d.mts +15 -0
  1117. package/node_modules/typebox/build/type/types/intersect.mjs +24 -0
  1118. package/node_modules/typebox/build/type/types/literal.d.mts +31 -0
  1119. package/node_modules/typebox/build/type/types/literal.mjs +62 -0
  1120. package/node_modules/typebox/build/type/types/never.d.mts +12 -0
  1121. package/node_modules/typebox/build/type/types/never.mjs +22 -0
  1122. package/node_modules/typebox/build/type/types/null.d.mts +11 -0
  1123. package/node_modules/typebox/build/type/types/null.mjs +17 -0
  1124. package/node_modules/typebox/build/type/types/number.d.mts +12 -0
  1125. package/node_modules/typebox/build/type/types/number.mjs +21 -0
  1126. package/node_modules/typebox/build/type/types/object.d.mts +18 -0
  1127. package/node_modules/typebox/build/type/types/object.mjs +28 -0
  1128. package/node_modules/typebox/build/type/types/parameter.d.mts +17 -0
  1129. package/node_modules/typebox/build/type/types/parameter.mjs +21 -0
  1130. package/node_modules/typebox/build/type/types/properties.d.mts +43 -0
  1131. package/node_modules/typebox/build/type/types/properties.mjs +15 -0
  1132. package/node_modules/typebox/build/type/types/record.d.mts +52 -0
  1133. package/node_modules/typebox/build/type/types/record.mjs +66 -0
  1134. package/node_modules/typebox/build/type/types/ref.d.mts +19 -0
  1135. package/node_modules/typebox/build/type/types/ref.mjs +18 -0
  1136. package/node_modules/typebox/build/type/types/rest.d.mts +11 -0
  1137. package/node_modules/typebox/build/type/types/rest.mjs +17 -0
  1138. package/node_modules/typebox/build/type/types/schema.d.mts +176 -0
  1139. package/node_modules/typebox/build/type/types/schema.mjs +15 -0
  1140. package/node_modules/typebox/build/type/types/static.d.mts +45 -0
  1141. package/node_modules/typebox/build/type/types/static.mjs +3 -0
  1142. package/node_modules/typebox/build/type/types/string.d.mts +12 -0
  1143. package/node_modules/typebox/build/type/types/string.mjs +22 -0
  1144. package/node_modules/typebox/build/type/types/symbol.d.mts +11 -0
  1145. package/node_modules/typebox/build/type/types/symbol.mjs +17 -0
  1146. package/node_modules/typebox/build/type/types/template_literal.d.mts +28 -0
  1147. package/node_modules/typebox/build/type/types/template_literal.mjs +37 -0
  1148. package/node_modules/typebox/build/type/types/this.d.mts +14 -0
  1149. package/node_modules/typebox/build/type/types/this.mjs +17 -0
  1150. package/node_modules/typebox/build/type/types/tuple.d.mts +38 -0
  1151. package/node_modules/typebox/build/type/types/tuple.mjs +25 -0
  1152. package/node_modules/typebox/build/type/types/undefined.d.mts +11 -0
  1153. package/node_modules/typebox/build/type/types/undefined.mjs +17 -0
  1154. package/node_modules/typebox/build/type/types/union.d.mts +15 -0
  1155. package/node_modules/typebox/build/type/types/union.mjs +24 -0
  1156. package/node_modules/typebox/build/type/types/unknown.d.mts +10 -0
  1157. package/node_modules/typebox/build/type/types/unknown.mjs +17 -0
  1158. package/node_modules/typebox/build/type/types/unsafe.d.mts +10 -0
  1159. package/node_modules/typebox/build/type/types/unsafe.mjs +20 -0
  1160. package/node_modules/typebox/build/type/types/void.d.mts +11 -0
  1161. package/node_modules/typebox/build/type/types/void.mjs +17 -0
  1162. package/node_modules/typebox/build/typebox.d.mts +69 -0
  1163. package/node_modules/typebox/build/typebox.mjs +85 -0
  1164. package/node_modules/typebox/build/value/assert/assert.d.mts +14 -0
  1165. package/node_modules/typebox/build/value/assert/assert.mjs +28 -0
  1166. package/node_modules/typebox/build/value/assert/index.d.mts +1 -0
  1167. package/node_modules/typebox/build/value/assert/index.mjs +1 -0
  1168. package/node_modules/typebox/build/value/check/check.d.mts +5 -0
  1169. package/node_modules/typebox/build/value/check/check.mjs +11 -0
  1170. package/node_modules/typebox/build/value/check/index.d.mts +1 -0
  1171. package/node_modules/typebox/build/value/check/index.mjs +1 -0
  1172. package/node_modules/typebox/build/value/clean/additional.d.mts +2 -0
  1173. package/node_modules/typebox/build/value/clean/additional.mjs +6 -0
  1174. package/node_modules/typebox/build/value/clean/clean.d.mts +15 -0
  1175. package/node_modules/typebox/build/value/clean/clean.mjs +17 -0
  1176. package/node_modules/typebox/build/value/clean/from_array.d.mts +2 -0
  1177. package/node_modules/typebox/build/value/clean/from_array.mjs +8 -0
  1178. package/node_modules/typebox/build/value/clean/from_cyclic.d.mts +2 -0
  1179. package/node_modules/typebox/build/value/clean/from_cyclic.mjs +6 -0
  1180. package/node_modules/typebox/build/value/clean/from_intersect.d.mts +2 -0
  1181. package/node_modules/typebox/build/value/clean/from_intersect.mjs +26 -0
  1182. package/node_modules/typebox/build/value/clean/from_object.d.mts +2 -0
  1183. package/node_modules/typebox/build/value/clean/from_object.mjs +31 -0
  1184. package/node_modules/typebox/build/value/clean/from_record.d.mts +2 -0
  1185. package/node_modules/typebox/build/value/clean/from_record.mjs +32 -0
  1186. package/node_modules/typebox/build/value/clean/from_ref.d.mts +2 -0
  1187. package/node_modules/typebox/build/value/clean/from_ref.mjs +8 -0
  1188. package/node_modules/typebox/build/value/clean/from_tuple.d.mts +2 -0
  1189. package/node_modules/typebox/build/value/clean/from_tuple.mjs +14 -0
  1190. package/node_modules/typebox/build/value/clean/from_type.d.mts +2 -0
  1191. package/node_modules/typebox/build/value/clean/from_type.mjs +21 -0
  1192. package/node_modules/typebox/build/value/clean/from_union.d.mts +2 -0
  1193. package/node_modules/typebox/build/value/clean/from_union.mjs +12 -0
  1194. package/node_modules/typebox/build/value/clean/index.d.mts +1 -0
  1195. package/node_modules/typebox/build/value/clean/index.mjs +1 -0
  1196. package/node_modules/typebox/build/value/clone/clone.d.mts +6 -0
  1197. package/node_modules/typebox/build/value/clone/clone.mjs +10 -0
  1198. package/node_modules/typebox/build/value/clone/index.d.mts +1 -0
  1199. package/node_modules/typebox/build/value/clone/index.mjs +1 -0
  1200. package/node_modules/typebox/build/value/codec/callback.d.mts +2 -0
  1201. package/node_modules/typebox/build/value/codec/callback.mjs +25 -0
  1202. package/node_modules/typebox/build/value/codec/decode.d.mts +12 -0
  1203. package/node_modules/typebox/build/value/codec/decode.mjs +52 -0
  1204. package/node_modules/typebox/build/value/codec/encode.d.mts +12 -0
  1205. package/node_modules/typebox/build/value/codec/encode.mjs +52 -0
  1206. package/node_modules/typebox/build/value/codec/from_array.d.mts +2 -0
  1207. package/node_modules/typebox/build/value/codec/from_array.mjs +35 -0
  1208. package/node_modules/typebox/build/value/codec/from_cyclic.d.mts +2 -0
  1209. package/node_modules/typebox/build/value/codec/from_cyclic.mjs +8 -0
  1210. package/node_modules/typebox/build/value/codec/from_intersect.d.mts +2 -0
  1211. package/node_modules/typebox/build/value/codec/from_intersect.mjs +58 -0
  1212. package/node_modules/typebox/build/value/codec/from_object.d.mts +2 -0
  1213. package/node_modules/typebox/build/value/codec/from_object.mjs +42 -0
  1214. package/node_modules/typebox/build/value/codec/from_record.d.mts +2 -0
  1215. package/node_modules/typebox/build/value/codec/from_record.mjs +39 -0
  1216. package/node_modules/typebox/build/value/codec/from_ref.d.mts +2 -0
  1217. package/node_modules/typebox/build/value/codec/from_ref.mjs +31 -0
  1218. package/node_modules/typebox/build/value/codec/from_tuple.d.mts +2 -0
  1219. package/node_modules/typebox/build/value/codec/from_tuple.mjs +32 -0
  1220. package/node_modules/typebox/build/value/codec/from_type.d.mts +2 -0
  1221. package/node_modules/typebox/build/value/codec/from_type.mjs +22 -0
  1222. package/node_modules/typebox/build/value/codec/from_union.d.mts +2 -0
  1223. package/node_modules/typebox/build/value/codec/from_union.mjs +39 -0
  1224. package/node_modules/typebox/build/value/codec/has.d.mts +5 -0
  1225. package/node_modules/typebox/build/value/codec/has.mjs +93 -0
  1226. package/node_modules/typebox/build/value/codec/index.d.mts +3 -0
  1227. package/node_modules/typebox/build/value/codec/index.mjs +3 -0
  1228. package/node_modules/typebox/build/value/convert/convert.d.mts +13 -0
  1229. package/node_modules/typebox/build/value/convert/convert.mjs +15 -0
  1230. package/node_modules/typebox/build/value/convert/from_additional.d.mts +6 -0
  1231. package/node_modules/typebox/build/value/convert/from_additional.mjs +18 -0
  1232. package/node_modules/typebox/build/value/convert/from_array.d.mts +2 -0
  1233. package/node_modules/typebox/build/value/convert/from_array.mjs +7 -0
  1234. package/node_modules/typebox/build/value/convert/from_bigint.d.mts +2 -0
  1235. package/node_modules/typebox/build/value/convert/from_bigint.mjs +6 -0
  1236. package/node_modules/typebox/build/value/convert/from_boolean.d.mts +2 -0
  1237. package/node_modules/typebox/build/value/convert/from_boolean.mjs +6 -0
  1238. package/node_modules/typebox/build/value/convert/from_cyclic.d.mts +2 -0
  1239. package/node_modules/typebox/build/value/convert/from_cyclic.mjs +6 -0
  1240. package/node_modules/typebox/build/value/convert/from_enum.d.mts +2 -0
  1241. package/node_modules/typebox/build/value/convert/from_enum.mjs +6 -0
  1242. package/node_modules/typebox/build/value/convert/from_integer.d.mts +2 -0
  1243. package/node_modules/typebox/build/value/convert/from_integer.mjs +6 -0
  1244. package/node_modules/typebox/build/value/convert/from_intersect.d.mts +2 -0
  1245. package/node_modules/typebox/build/value/convert/from_intersect.mjs +8 -0
  1246. package/node_modules/typebox/build/value/convert/from_literal.d.mts +2 -0
  1247. package/node_modules/typebox/build/value/convert/from_literal.mjs +44 -0
  1248. package/node_modules/typebox/build/value/convert/from_null.d.mts +2 -0
  1249. package/node_modules/typebox/build/value/convert/from_null.mjs +6 -0
  1250. package/node_modules/typebox/build/value/convert/from_number.d.mts +2 -0
  1251. package/node_modules/typebox/build/value/convert/from_number.mjs +6 -0
  1252. package/node_modules/typebox/build/value/convert/from_object.d.mts +2 -0
  1253. package/node_modules/typebox/build/value/convert/from_object.mjs +28 -0
  1254. package/node_modules/typebox/build/value/convert/from_record.d.mts +2 -0
  1255. package/node_modules/typebox/build/value/convert/from_record.mjs +23 -0
  1256. package/node_modules/typebox/build/value/convert/from_ref.d.mts +2 -0
  1257. package/node_modules/typebox/build/value/convert/from_ref.mjs +8 -0
  1258. package/node_modules/typebox/build/value/convert/from_string.d.mts +2 -0
  1259. package/node_modules/typebox/build/value/convert/from_string.mjs +6 -0
  1260. package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +2 -0
  1261. package/node_modules/typebox/build/value/convert/from_template_literal.mjs +6 -0
  1262. package/node_modules/typebox/build/value/convert/from_tuple.d.mts +2 -0
  1263. package/node_modules/typebox/build/value/convert/from_tuple.mjs +11 -0
  1264. package/node_modules/typebox/build/value/convert/from_type.d.mts +2 -0
  1265. package/node_modules/typebox/build/value/convert/from_type.mjs +43 -0
  1266. package/node_modules/typebox/build/value/convert/from_undefined.d.mts +2 -0
  1267. package/node_modules/typebox/build/value/convert/from_undefined.mjs +6 -0
  1268. package/node_modules/typebox/build/value/convert/from_union.d.mts +2 -0
  1269. package/node_modules/typebox/build/value/convert/from_union.mjs +13 -0
  1270. package/node_modules/typebox/build/value/convert/from_void.d.mts +2 -0
  1271. package/node_modules/typebox/build/value/convert/from_void.mjs +6 -0
  1272. package/node_modules/typebox/build/value/convert/index.d.mts +1 -0
  1273. package/node_modules/typebox/build/value/convert/index.mjs +1 -0
  1274. package/node_modules/typebox/build/value/convert/try/index.d.mts +1 -0
  1275. package/node_modules/typebox/build/value/convert/try/index.mjs +1 -0
  1276. package/node_modules/typebox/build/value/convert/try/try.d.mts +8 -0
  1277. package/node_modules/typebox/build/value/convert/try/try.mjs +8 -0
  1278. package/node_modules/typebox/build/value/convert/try/try_array.d.mts +2 -0
  1279. package/node_modules/typebox/build/value/convert/try/try_array.mjs +6 -0
  1280. package/node_modules/typebox/build/value/convert/try/try_bigint.d.mts +2 -0
  1281. package/node_modules/typebox/build/value/convert/try/try_bigint.mjs +45 -0
  1282. package/node_modules/typebox/build/value/convert/try/try_boolean.d.mts +2 -0
  1283. package/node_modules/typebox/build/value/convert/try/try_boolean.mjs +41 -0
  1284. package/node_modules/typebox/build/value/convert/try/try_null.d.mts +2 -0
  1285. package/node_modules/typebox/build/value/convert/try/try_null.mjs +44 -0
  1286. package/node_modules/typebox/build/value/convert/try/try_number.d.mts +2 -0
  1287. package/node_modules/typebox/build/value/convert/try/try_number.mjs +44 -0
  1288. package/node_modules/typebox/build/value/convert/try/try_result.d.mts +8 -0
  1289. package/node_modules/typebox/build/value/convert/try/try_result.mjs +17 -0
  1290. package/node_modules/typebox/build/value/convert/try/try_string.d.mts +2 -0
  1291. package/node_modules/typebox/build/value/convert/try/try_string.mjs +12 -0
  1292. package/node_modules/typebox/build/value/convert/try/try_undefined.d.mts +2 -0
  1293. package/node_modules/typebox/build/value/convert/try/try_undefined.mjs +44 -0
  1294. package/node_modules/typebox/build/value/create/create.d.mts +5 -0
  1295. package/node_modules/typebox/build/value/create/create.mjs +11 -0
  1296. package/node_modules/typebox/build/value/create/error.d.mts +5 -0
  1297. package/node_modules/typebox/build/value/create/error.mjs +7 -0
  1298. package/node_modules/typebox/build/value/create/from_array.d.mts +2 -0
  1299. package/node_modules/typebox/build/value/create/from_array.mjs +10 -0
  1300. package/node_modules/typebox/build/value/create/from_bigint.d.mts +2 -0
  1301. package/node_modules/typebox/build/value/create/from_bigint.mjs +7 -0
  1302. package/node_modules/typebox/build/value/create/from_boolean.d.mts +2 -0
  1303. package/node_modules/typebox/build/value/create/from_boolean.mjs +4 -0
  1304. package/node_modules/typebox/build/value/create/from_constructor.d.mts +2 -0
  1305. package/node_modules/typebox/build/value/create/from_constructor.mjs +10 -0
  1306. package/node_modules/typebox/build/value/create/from_cyclic.d.mts +2 -0
  1307. package/node_modules/typebox/build/value/create/from_cyclic.mjs +6 -0
  1308. package/node_modules/typebox/build/value/create/from_default.d.mts +3 -0
  1309. package/node_modules/typebox/build/value/create/from_default.mjs +10 -0
  1310. package/node_modules/typebox/build/value/create/from_enum.d.mts +2 -0
  1311. package/node_modules/typebox/build/value/create/from_enum.mjs +6 -0
  1312. package/node_modules/typebox/build/value/create/from_function.d.mts +2 -0
  1313. package/node_modules/typebox/build/value/create/from_function.mjs +6 -0
  1314. package/node_modules/typebox/build/value/create/from_integer.d.mts +2 -0
  1315. package/node_modules/typebox/build/value/create/from_integer.mjs +8 -0
  1316. package/node_modules/typebox/build/value/create/from_intersect.d.mts +2 -0
  1317. package/node_modules/typebox/build/value/create/from_intersect.mjs +8 -0
  1318. package/node_modules/typebox/build/value/create/from_literal.d.mts +2 -0
  1319. package/node_modules/typebox/build/value/create/from_literal.mjs +4 -0
  1320. package/node_modules/typebox/build/value/create/from_never.d.mts +2 -0
  1321. package/node_modules/typebox/build/value/create/from_never.mjs +5 -0
  1322. package/node_modules/typebox/build/value/create/from_null.d.mts +2 -0
  1323. package/node_modules/typebox/build/value/create/from_null.mjs +4 -0
  1324. package/node_modules/typebox/build/value/create/from_number.d.mts +2 -0
  1325. package/node_modules/typebox/build/value/create/from_number.mjs +8 -0
  1326. package/node_modules/typebox/build/value/create/from_object.d.mts +2 -0
  1327. package/node_modules/typebox/build/value/create/from_object.mjs +9 -0
  1328. package/node_modules/typebox/build/value/create/from_record.d.mts +2 -0
  1329. package/node_modules/typebox/build/value/create/from_record.mjs +8 -0
  1330. package/node_modules/typebox/build/value/create/from_ref.d.mts +2 -0
  1331. package/node_modules/typebox/build/value/create/from_ref.mjs +9 -0
  1332. package/node_modules/typebox/build/value/create/from_string.d.mts +2 -0
  1333. package/node_modules/typebox/build/value/create/from_string.mjs +9 -0
  1334. package/node_modules/typebox/build/value/create/from_symbol.d.mts +2 -0
  1335. package/node_modules/typebox/build/value/create/from_symbol.mjs +4 -0
  1336. package/node_modules/typebox/build/value/create/from_template_literal.d.mts +2 -0
  1337. package/node_modules/typebox/build/value/create/from_template_literal.mjs +11 -0
  1338. package/node_modules/typebox/build/value/create/from_tuple.d.mts +2 -0
  1339. package/node_modules/typebox/build/value/create/from_tuple.mjs +5 -0
  1340. package/node_modules/typebox/build/value/create/from_type.d.mts +2 -0
  1341. package/node_modules/typebox/build/value/create/from_type.mjs +61 -0
  1342. package/node_modules/typebox/build/value/create/from_undefined.d.mts +2 -0
  1343. package/node_modules/typebox/build/value/create/from_undefined.mjs +4 -0
  1344. package/node_modules/typebox/build/value/create/from_union.d.mts +2 -0
  1345. package/node_modules/typebox/build/value/create/from_union.mjs +9 -0
  1346. package/node_modules/typebox/build/value/create/from_void.d.mts +2 -0
  1347. package/node_modules/typebox/build/value/create/from_void.mjs +4 -0
  1348. package/node_modules/typebox/build/value/create/index.d.mts +2 -0
  1349. package/node_modules/typebox/build/value/create/index.mjs +2 -0
  1350. package/node_modules/typebox/build/value/default/default.d.mts +13 -0
  1351. package/node_modules/typebox/build/value/default/default.mjs +15 -0
  1352. package/node_modules/typebox/build/value/default/from_array.d.mts +2 -0
  1353. package/node_modules/typebox/build/value/default/from_array.mjs +12 -0
  1354. package/node_modules/typebox/build/value/default/from_cyclic.d.mts +2 -0
  1355. package/node_modules/typebox/build/value/default/from_cyclic.mjs +7 -0
  1356. package/node_modules/typebox/build/value/default/from_default.d.mts +3 -0
  1357. package/node_modules/typebox/build/value/default/from_default.mjs +13 -0
  1358. package/node_modules/typebox/build/value/default/from_intersect.d.mts +2 -0
  1359. package/node_modules/typebox/build/value/default/from_intersect.mjs +9 -0
  1360. package/node_modules/typebox/build/value/default/from_object.d.mts +2 -0
  1361. package/node_modules/typebox/build/value/default/from_object.mjs +32 -0
  1362. package/node_modules/typebox/build/value/default/from_record.d.mts +2 -0
  1363. package/node_modules/typebox/build/value/default/from_record.mjs +26 -0
  1364. package/node_modules/typebox/build/value/default/from_ref.d.mts +2 -0
  1365. package/node_modules/typebox/build/value/default/from_ref.mjs +9 -0
  1366. package/node_modules/typebox/build/value/default/from_tuple.d.mts +2 -0
  1367. package/node_modules/typebox/build/value/default/from_tuple.mjs +14 -0
  1368. package/node_modules/typebox/build/value/default/from_type.d.mts +2 -0
  1369. package/node_modules/typebox/build/value/default/from_type.mjs +25 -0
  1370. package/node_modules/typebox/build/value/default/from_union.d.mts +2 -0
  1371. package/node_modules/typebox/build/value/default/from_union.mjs +14 -0
  1372. package/node_modules/typebox/build/value/default/index.d.mts +1 -0
  1373. package/node_modules/typebox/build/value/default/index.mjs +1 -0
  1374. package/node_modules/typebox/build/value/delta/diff.d.mts +10 -0
  1375. package/node_modules/typebox/build/value/delta/diff.mjs +135 -0
  1376. package/node_modules/typebox/build/value/delta/edit.d.mts +24 -0
  1377. package/node_modules/typebox/build/value/delta/edit.mjs +17 -0
  1378. package/node_modules/typebox/build/value/delta/index.d.mts +3 -0
  1379. package/node_modules/typebox/build/value/delta/index.mjs +3 -0
  1380. package/node_modules/typebox/build/value/delta/patch.d.mts +8 -0
  1381. package/node_modules/typebox/build/value/delta/patch.mjs +42 -0
  1382. package/node_modules/typebox/build/value/equal/equal.d.mts +2 -0
  1383. package/node_modules/typebox/build/value/equal/equal.mjs +6 -0
  1384. package/node_modules/typebox/build/value/equal/index.d.mts +1 -0
  1385. package/node_modules/typebox/build/value/equal/index.mjs +1 -0
  1386. package/node_modules/typebox/build/value/errors/errors.d.mts +6 -0
  1387. package/node_modules/typebox/build/value/errors/errors.mjs +12 -0
  1388. package/node_modules/typebox/build/value/errors/index.d.mts +1 -0
  1389. package/node_modules/typebox/build/value/errors/index.mjs +1 -0
  1390. package/node_modules/typebox/build/value/hash/hash.d.mts +6 -0
  1391. package/node_modules/typebox/build/value/hash/hash.mjs +10 -0
  1392. package/node_modules/typebox/build/value/hash/index.d.mts +1 -0
  1393. package/node_modules/typebox/build/value/hash/index.mjs +1 -0
  1394. package/node_modules/typebox/build/value/index.d.mts +20 -0
  1395. package/node_modules/typebox/build/value/index.mjs +29 -0
  1396. package/node_modules/typebox/build/value/parse/index.d.mts +1 -0
  1397. package/node_modules/typebox/build/value/parse/index.mjs +1 -0
  1398. package/node_modules/typebox/build/value/parse/parse.d.mts +11 -0
  1399. package/node_modules/typebox/build/value/parse/parse.mjs +53 -0
  1400. package/node_modules/typebox/build/value/pipeline/index.d.mts +1 -0
  1401. package/node_modules/typebox/build/value/pipeline/index.mjs +1 -0
  1402. package/node_modules/typebox/build/value/pipeline/pipeline.d.mts +10 -0
  1403. package/node_modules/typebox/build/value/pipeline/pipeline.mjs +15 -0
  1404. package/node_modules/typebox/build/value/pointer/index.d.mts +1 -0
  1405. package/node_modules/typebox/build/value/pointer/index.mjs +1 -0
  1406. package/node_modules/typebox/build/value/repair/error.d.mts +7 -0
  1407. package/node_modules/typebox/build/value/repair/error.mjs +8 -0
  1408. package/node_modules/typebox/build/value/repair/from_array.d.mts +2 -0
  1409. package/node_modules/typebox/build/value/repair/from_array.mjs +39 -0
  1410. package/node_modules/typebox/build/value/repair/from_cyclic.d.mts +2 -0
  1411. package/node_modules/typebox/build/value/repair/from_cyclic.mjs +6 -0
  1412. package/node_modules/typebox/build/value/repair/from_enum.d.mts +2 -0
  1413. package/node_modules/typebox/build/value/repair/from_enum.mjs +6 -0
  1414. package/node_modules/typebox/build/value/repair/from_intersect.d.mts +2 -0
  1415. package/node_modules/typebox/build/value/repair/from_intersect.mjs +8 -0
  1416. package/node_modules/typebox/build/value/repair/from_object.d.mts +2 -0
  1417. package/node_modules/typebox/build/value/repair/from_object.mjs +33 -0
  1418. package/node_modules/typebox/build/value/repair/from_record.d.mts +2 -0
  1419. package/node_modules/typebox/build/value/repair/from_record.mjs +33 -0
  1420. package/node_modules/typebox/build/value/repair/from_ref.d.mts +2 -0
  1421. package/node_modules/typebox/build/value/repair/from_ref.mjs +9 -0
  1422. package/node_modules/typebox/build/value/repair/from_template_literal.d.mts +2 -0
  1423. package/node_modules/typebox/build/value/repair/from_template_literal.mjs +7 -0
  1424. package/node_modules/typebox/build/value/repair/from_tuple.d.mts +2 -0
  1425. package/node_modules/typebox/build/value/repair/from_tuple.mjs +12 -0
  1426. package/node_modules/typebox/build/value/repair/from_type.d.mts +2 -0
  1427. package/node_modules/typebox/build/value/repair/from_type.mjs +88 -0
  1428. package/node_modules/typebox/build/value/repair/from_union.d.mts +2 -0
  1429. package/node_modules/typebox/build/value/repair/from_union.mjs +24 -0
  1430. package/node_modules/typebox/build/value/repair/from_unknown.d.mts +2 -0
  1431. package/node_modules/typebox/build/value/repair/from_unknown.mjs +12 -0
  1432. package/node_modules/typebox/build/value/repair/index.d.mts +1 -0
  1433. package/node_modules/typebox/build/value/repair/index.mjs +1 -0
  1434. package/node_modules/typebox/build/value/repair/repair.d.mts +17 -0
  1435. package/node_modules/typebox/build/value/repair/repair.mjs +20 -0
  1436. package/node_modules/typebox/build/value/shared/index.d.mts +3 -0
  1437. package/node_modules/typebox/build/value/shared/index.mjs +4 -0
  1438. package/node_modules/typebox/build/value/shared/optional_undefined.d.mts +2 -0
  1439. package/node_modules/typebox/build/value/shared/optional_undefined.mjs +15 -0
  1440. package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +7 -0
  1441. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +83 -0
  1442. package/node_modules/typebox/build/value/shared/union_score_select.d.mts +3 -0
  1443. package/node_modules/typebox/build/value/shared/union_score_select.mjs +51 -0
  1444. package/node_modules/typebox/build/value/value.d.mts +15 -0
  1445. package/node_modules/typebox/build/value/value.mjs +15 -0
  1446. package/node_modules/typebox/license +23 -0
  1447. package/node_modules/typebox/package.json +87 -0
  1448. package/node_modules/typebox/readme.md +339 -0
  1449. package/package.json +51 -4
  1450. package/skills/pi-proactive/SKILL.md +182 -0
@@ -0,0 +1,1002 @@
1
+ /**
2
+ * `src/peer.ts` —— M5a:**逐条** reply 归因(问 → 答 → 回信 一一对应)。
3
+ *
4
+ * 定位:纯逻辑模块 —— **无 IO、不 import 宿主包**,只依赖 `envelope.ts` / `types.ts`。
5
+ * 这样才能在单测里独立验证「哪条回答属于哪条提问」,不牵动宿主运行时。
6
+ *
7
+ * 为什么需要它:M4i 的 ask→reply 是一回合一封 reply(拿到「下一条」assistant 文本就回)。
8
+ * 并发提问时无法关联 —— 回答可能被回给错的提问。本模块用 **pending 登记表** 把
9
+ * 「谁问的(requester / correlationId / threadId)」与「哪条回答」显式绑定。
10
+ *
11
+ * 归因规则(**逐条关联**):
12
+ * 1. 无 pending → 返回 `null`(**不回复**:不把用户自己的话当回答回信);
13
+ * 2. 恰好一个 pending → 归给它,`ambiguous:false`;
14
+ * 3. 多个 pending → 归给**最早未决**(`askedAt` 最小,平局取先登记者),
15
+ * 并置 `ambiguous:true`(**歧义降级**:如实标注,不假装确定);其余 pending **保留**;
16
+ * 4. `buildReply()` 把 `correlationId` 与 `threadId` **原样带回**,`from`=我、`to`=对端、
17
+ * `kind:"reply"`、`intent:"queue"`(**回信是后续,不是插话**:ADR-3「默认 followUp 不打断」);
18
+ * 5. 归因成功后该 pending **移出**(同一条回答不会被回两次)。
19
+ */
20
+ import { randomUUID } from "node:crypto";
21
+ import { createEnvelope, HUMAN_ORIGIN_CUSTOM_TYPE } from "./envelope.js";
22
+ /** 默认等待回信窗口:10 分钟。 */
23
+ export const DEFAULT_EXPECT_REPLY_WITHIN_MS = 600_000;
24
+ /** 默认登记表上限:64 条。 */
25
+ export const DEFAULT_MAX_PENDING = 64;
26
+ /** 缺省的 agentId(接线方应显式传入真实 agentId)。 */
27
+ const DEFAULT_AGENT_ID = "self";
28
+ /** 歧义归因的正文标注前缀(**如实告知对端**,不假装确定)。 */
29
+ export const AMBIGUOUS_MARKER = "【歧义归因】";
30
+ /** 迟到回答的正文标注前缀(**如实告知对端**:回答来晚了)。 */
31
+ export const LATE_MARKER = "【回答已超过等待时限】";
32
+ /** 歧义原因:提问登记之后**用户又说了话**(这条回答可能是在回答用户,不是在回答对端)。 */
33
+ export const USER_SPOKE_REASON = "提问后用户曾发言,回答归属存疑";
34
+ /**
35
+ * 构造回信信封:`correlationId` / `threadId` **原样带回**,`from`=我、`to`=对端、
36
+ * `kind:"reply"`、`intent:"queue"`。
37
+ *
38
+ * **`intent:"queue"`(M5c)**:回信是**后续**,不是插话 —— ADR-3「默认 followUp 不打断」。
39
+ *
40
+ * `threadId` 缺失时**不携带** `threadId` 键(不写 `undefined` 字段)。
41
+ */
42
+ export function buildReply(input) {
43
+ const { pending, agentId } = input;
44
+ // 正文标注(**如实**,不假装确定):歧义(含原因)→ 迟到 → 原文。
45
+ let body = input.body;
46
+ if (input.ambiguous === true) {
47
+ body = `${AMBIGUOUS_MARKER}${input.ambiguousReason ? `(${input.ambiguousReason})` : ""}${body}`;
48
+ }
49
+ if (input.late === true)
50
+ body = `${LATE_MARKER}${body}`;
51
+ const reply = createEnvelope({
52
+ from: agentId,
53
+ to: pending.requester,
54
+ kind: "reply",
55
+ intent: "queue",
56
+ body,
57
+ subject: pending.subject ? `Re: ${pending.subject}` : undefined,
58
+ threadId: pending.threadId,
59
+ correlationId: pending.correlationId,
60
+ replyTo: pending.requester,
61
+ ...(input.now === undefined ? {} : { createdAt: input.now }),
62
+ });
63
+ // 继承 ask 的 hop / maxHops(Minor-5):否则信封级 hop 上限在「问→答」之间被重置,
64
+ // 防不住 A→B→A 的多轮往返(hop 不得大于 maxHops —— ask 本身已通过校验)。
65
+ //
66
+ // **G-R2 —— 待规格裁决**:规格(docs/a2a-protocol.md §4.1 字段表 / §4.4 / §4.5)**只**给
67
+ // `correlationId` 写了兜底链,对 `reply` 是否继承被回复信封的 `hop`/`maxHops` **只字未提** →
68
+ // 第三方只能猜(继承 or 归零),两边在 `hop=maxHops` 的链路上会给出不同的拒绝行为。
69
+ // 在协调者裁决前**保持现状(继承)**,**不改行为**;改法文本见 SPECFIX 任务卡的报告
70
+ // (由协调者落文档)。
71
+ if (pending.hop !== undefined)
72
+ reply.hop = pending.hop;
73
+ if (pending.maxHops !== undefined)
74
+ reply.maxHops = pending.maxHops;
75
+ return reply;
76
+ }
77
+ /**
78
+ * 逐条 reply 归因器:登记待答的 ask,把模型回答归给对应的那一条并生成回信。
79
+ *
80
+ * 无状态外部依赖 —— 不碰文件、不碰 socket、不碰宿主 API。
81
+ */
82
+ export class PeerResponder {
83
+ expectReplyWithinMs;
84
+ maxPending;
85
+ nowFn;
86
+ agentId;
87
+ entries = [];
88
+ /**
89
+ * **已过期但保留**的 pending(Major-2)。
90
+ *
91
+ * 过期 ≠ 丢弃:迟到的回答仍必须回信(否则闭环在「回答来得慢」这一正常场景下静默断裂)。
92
+ * 保留有上界(`maxPending`)→ 不会无限增长。
93
+ */
94
+ expiredEntries = [];
95
+ seq = 0;
96
+ constructor(opts = {}) {
97
+ this.expectReplyWithinMs = opts.expectReplyWithinMs ?? DEFAULT_EXPECT_REPLY_WITHIN_MS;
98
+ this.maxPending = opts.maxPending ?? DEFAULT_MAX_PENDING;
99
+ this.nowFn = opts.now ?? (() => Date.now());
100
+ this.agentId = opts.agentId ?? DEFAULT_AGENT_ID;
101
+ }
102
+ /**
103
+ * 登记一条待答的 ask。
104
+ *
105
+ * - 非 `kind:"ask"` → 返回 `null`(不登记);
106
+ * - 登记表已满(`maxPending`)→ 返回 `null`(**拒收**,防堆积);
107
+ * - 成功 → 返回登记好的 `PendingAsk`。
108
+ */
109
+ onAsk(envelope) {
110
+ if (!envelope || envelope.kind !== "ask")
111
+ return null;
112
+ if (this.entries.length >= this.maxPending)
113
+ return null;
114
+ const pending = {
115
+ // ask 没带 correlationId 时用 ask 的 id 兜底 —— 对端仍能对上号。
116
+ correlationId: envelope.correlationId ?? envelope.id,
117
+ requester: envelope.from,
118
+ askedAt: this.nowFn(),
119
+ };
120
+ if (envelope.threadId !== undefined)
121
+ pending.threadId = envelope.threadId;
122
+ if (envelope.subject !== undefined)
123
+ pending.subject = envelope.subject;
124
+ // 记住 hop / maxHops → 回信继承(Minor-5)。
125
+ if (typeof envelope.hop === "number")
126
+ pending.hop = envelope.hop;
127
+ if (typeof envelope.maxHops === "number")
128
+ pending.maxHops = envelope.maxHops;
129
+ this.entries.push({ pending, seq: this.seq++, userSpoke: false });
130
+ return pending;
131
+ }
132
+ /**
133
+ * 把一条 assistant 文本归因给某条 pending,并生成回信计划。
134
+ *
135
+ * - 无 pending / 空白文本 → `null`(**不回信**);
136
+ * - 唯一 pending → 归给它(`ambiguous:false`);
137
+ * - 多个 pending → 归给**最早未决**(`ambiguous:true`),其余保留;
138
+ * - 归因成功后该 pending 移出登记表(同一段文本不会被回两次)。
139
+ */
140
+ onAssistantText(text, now) {
141
+ if (typeof text !== "string")
142
+ return null;
143
+ const body = text.trim();
144
+ if (body === "")
145
+ return null;
146
+ if (this.entries.length === 0 && this.expiredEntries.length === 0)
147
+ return null;
148
+ // 有未决提问就归给未决的;**全部过期**时归给最早那条过期提问(Major-2:迟到回答仍要回信)。
149
+ const late = this.entries.length === 0;
150
+ const pool = late ? this.expiredEntries : this.entries;
151
+ const ambiguous = pool.length > 1;
152
+ const idx = this.pickEarliest(pool);
153
+ const entry = pool.splice(idx, 1)[0];
154
+ // 提问之后用户又说了话 → 归因存疑(Major-3):不得当作确定答案回给对端。
155
+ const userSpoke = entry.userSpoke === true;
156
+ const ambiguousFinal = ambiguous || userSpoke;
157
+ const reason = userSpoke ? USER_SPOKE_REASON : undefined;
158
+ const reply = buildReply({
159
+ pending: entry.pending,
160
+ body,
161
+ agentId: this.agentId,
162
+ ambiguous: ambiguousFinal,
163
+ ...(reason === undefined ? {} : { ambiguousReason: reason }),
164
+ late,
165
+ ...(now === undefined ? {} : { now }),
166
+ });
167
+ return {
168
+ reply,
169
+ ambiguous: ambiguousFinal,
170
+ pending: entry.pending,
171
+ late,
172
+ ...(reason === undefined ? {} : { ambiguousReason: reason }),
173
+ };
174
+ }
175
+ /**
176
+ * 把超时的 pending 标过期并移出,返回被移出的那些(供调用方记日志/告警)。
177
+ *
178
+ * 判定:`now - askedAt > expectReplyWithinMs`(**严格超过**才算过期)。
179
+ */
180
+ expireStale(now) {
181
+ const t = now ?? this.nowFn();
182
+ const expired = [];
183
+ const kept = [];
184
+ for (const e of this.entries) {
185
+ if (t - e.pending.askedAt > this.expectReplyWithinMs)
186
+ expired.push(e);
187
+ else
188
+ kept.push(e);
189
+ }
190
+ this.entries.length = 0;
191
+ this.entries.push(...kept);
192
+ // **过期 ≠ 丢弃**(Major-2):移入「已过期但保留」区 → 迟到的回答仍会回信。
193
+ // 保留有上界(`maxPending`)→ 内存不会无限增长。
194
+ this.expiredEntries.push(...expired);
195
+ while (this.expiredEntries.length > this.maxPending)
196
+ this.expiredEntries.shift();
197
+ return expired.map((e) => e.pending);
198
+ }
199
+ /**
200
+ * 记录「用户又说了话」(Major-3)。
201
+ *
202
+ * 语义:宿主不携带 correlationId → 实现**无法判别**一条 assistant 文本是在回答对端
203
+ * 还是在回答用户。凡是在提问登记**之后**发生过用户输入的 pending,其后续回答的归因
204
+ * 必须标为歧义(或干脆不回信)—— 不得当作确定答案回过去。
205
+ *
206
+ * @param at 用户发言的时刻(缺省 = 当前时间)。
207
+ */
208
+ noteUserInput(at = this.nowFn()) {
209
+ for (const e of [...this.entries, ...this.expiredEntries]) {
210
+ if (e.pending.askedAt <= at)
211
+ e.userSpoke = true;
212
+ }
213
+ }
214
+ /** 当前待答条数。 */
215
+ pendingCount() {
216
+ return this.entries.length;
217
+ }
218
+ /** 当前待答列表(副本,改动不影响内部状态)。 */
219
+ pendingList() {
220
+ return this.entries.map((e) => e.pending);
221
+ }
222
+ /** 取「最早未决」的下标:`askedAt` 最小,平局取先登记者。 */
223
+ pickEarliest(pool) {
224
+ let best = 0;
225
+ for (let i = 1; i < pool.length; i++) {
226
+ const a = pool[i].pending.askedAt;
227
+ const b = pool[best].pending.askedAt;
228
+ if (a < b || (a === b && pool[i].seq < pool[best].seq))
229
+ best = i;
230
+ }
231
+ return best;
232
+ }
233
+ }
234
+ // ============================================================================
235
+ // ASKLOOP:提问方侧的语义闭环(ask → reply → 结局 → 不再追问)
236
+ // ============================================================================
237
+ /**
238
+ * 「等待超时」通知的**正文标记**(协议级约定,规范 §6.5)。
239
+ *
240
+ * 为什么需要它:提问方收到的是一条 `kind:"reply"`,但它可能**不是答案**,
241
+ * 而是对端「我没在时限内回答」的如实通知 → 必须能把它与真答案区分开,
242
+ * 否则会把「超时」记成「已答」(闭环假绿)。
243
+ *
244
+ * 约定写在协议里 → 第三方对端也能照此实现(参考对端 `reference-peer/peer.py`)。
245
+ */
246
+ export const TIMEOUT_NOTICE_MARKER = "【等待超时】";
247
+ /**
248
+ * 「**对端已下线**」的正文标记(协议级约定,与 `TIMEOUT_NOTICE_MARKER` 同族)。
249
+ *
250
+ * 用途:会话优雅退出前 **drain**(把在途 ask 逐条回一条)时,回信用这个标记开头 →
251
+ * 提问方据此把这条提问判为 **`unreachable`**(不是 `answered`)——
252
+ * 「对方下线了」**不是答案**(否则闭环会假绿:提问方以为问到了答案)。
253
+ *
254
+ * 第三方对端照此实现即可对齐语义(见 `docs/a2a-protocol.md`)。
255
+ */
256
+ export const PEER_OFFLINE_MARKER = "【对端已下线】";
257
+ /** 默认等待回信上界:10 分钟(与对端一致)。 */
258
+ export const DEFAULT_ASK_WAIT_MS = 600_000;
259
+ /** 默认「连续未答达上限即停止」的次数。 */
260
+ export const DEFAULT_MAX_UNANSWERED = 3;
261
+ /** 默认退避基数:5 分钟。 */
262
+ export const DEFAULT_ASK_BACKOFF_MS = 300_000;
263
+ /**
264
+ * 提问方的 **ask 账本**:登记已发出的 ask → 配对回信 → 记结局 → **决定还问不ask。
265
+ *
266
+ * 为什么必须有它(KK-7):没有「已问过/已回应」状态时,提问方只能靠频率护栏压制,
267
+ * 频率被限住、**语义没闭环**(实测 196 问 / 3 答,还在一直问)。
268
+ *
269
+ * 状态机(每个对端一份):
270
+ *
271
+ * ```
272
+ * 发出 ask
273
+ * idle ──────────────────▶ waiting
274
+ * ▲ │
275
+ * │ 对端重新 busy(复位) ├─ 收到 reply(真答案)──▶ answered(不再追问)
276
+ * │ ├─ 收到「等待超时」通知 ─▶ unanswered
277
+ * │ └─ 超过等待上界 ─────────▶ unanswered
278
+ * │ │
279
+ * │ 未达上限 ────┴──▶ idle(退避后重试)
280
+ * │ 达上限 ────────────▶ stopped(停止该对端)
281
+ * └────────────────────────────────────────────────────────────┘
282
+ * ```
283
+ *
284
+ * - **answered / stopped 都由「对端重新进入 busy」复位**(对端开始新工作 → 再问才有意义);
285
+ * - **不可达**(提问没送达)→ 记 `unreachable` + 退避(不计入「连续未答」,避免把离线的对端误停)。
286
+ */
287
+ export class AskLedger {
288
+ nowFn;
289
+ waitMs;
290
+ maxUnanswered;
291
+ backoffMs;
292
+ /** correlationId → 未决 ask。 */
293
+ outstanding = new Map();
294
+ /** peer → 状态。 */
295
+ peers = new Map();
296
+ constructor(opts = {}) {
297
+ this.nowFn = opts.now ?? (() => Date.now());
298
+ this.waitMs = opts.waitMs ?? DEFAULT_ASK_WAIT_MS;
299
+ this.maxUnanswered = opts.maxUnanswered ?? DEFAULT_MAX_UNANSWERED;
300
+ this.backoffMs = opts.backoffMs ?? DEFAULT_ASK_BACKOFF_MS;
301
+ }
302
+ /**
303
+ * 登记一条**已发出**的 ask(提问方视角)。
304
+ *
305
+ * 只登记**对端已收下**的 ask(投递失败/不可达 → 走 `noteUnreachable`)——
306
+ * 否则会把「根本没送到」算成「问了没答」。
307
+ */
308
+ recordAsk(input) {
309
+ const at = input.askedAt ?? this.nowFn();
310
+ const ask = {
311
+ peer: input.peer,
312
+ correlationId: input.correlationId,
313
+ askedAt: at,
314
+ };
315
+ if (input.threadKey !== undefined)
316
+ ask.threadKey = input.threadKey;
317
+ if (input.humanOrigin === true)
318
+ ask.humanOrigin = true;
319
+ this.outstanding.set(ask.correlationId, ask);
320
+ const rec = this.recordOf(input.peer);
321
+ rec.state = "waiting";
322
+ rec.askCount += 1;
323
+ rec.latestCorrelationId = ask.correlationId;
324
+ rec.reason = `已提问,等待回答(${ask.correlationId})`;
325
+ rec.nextAskAt = undefined;
326
+ return ask;
327
+ }
328
+ /**
329
+ * 收到一条回信 → 配对未决 ask → 记结局。
330
+ *
331
+ * - 配不上(迟到的回答 / 对不上号的回信)→ 返回 `null`(**不臆造**对应关系);
332
+ * - 正文以 `TIMEOUT_NOTICE_MARKER` 开头 → 结局是 `unanswered`(不是 `answered`)。
333
+ */
334
+ onReply(reply) {
335
+ if (!reply || typeof reply.from !== "string")
336
+ return null;
337
+ let ask;
338
+ if (reply.correlationId !== undefined) {
339
+ ask = this.outstanding.get(reply.correlationId);
340
+ }
341
+ else {
342
+ // **没有** correlationId → 只在「该对端恰好有一条未决」时兜底配对。
343
+ // 带了 correlationId 却对不上 → **不配对**(不得臆造对应关系)。
344
+ const candidates = [...this.outstanding.values()].filter((a) => a.peer === reply.from);
345
+ if (candidates.length === 1)
346
+ ask = candidates[0];
347
+ }
348
+ if (ask === undefined)
349
+ return null;
350
+ this.outstanding.delete(ask.correlationId);
351
+ const replyBody = typeof reply.body === "string" ? reply.body : "";
352
+ const timedOut = replyBody.startsWith(TIMEOUT_NOTICE_MARKER);
353
+ // 「对端已下线」≠ 答案:结局记 unreachable(对方走了,这条提问永远不会有答案)。
354
+ const wentOffline = replyBody.startsWith(PEER_OFFLINE_MARKER);
355
+ const outcome = timedOut ? "unanswered" : wentOffline ? "unreachable" : "answered";
356
+ const reason = timedOut
357
+ ? "对端等待超时(未在时限内回答)"
358
+ : wentOffline
359
+ ? "对端已下线(会话结束,未作答)"
360
+ : "已收到对端的回答";
361
+ return this.applyOutcome(ask, outcome, reason);
362
+ }
363
+ /**
364
+ * 扫描超时未答的 ask → 结局 `unanswered`。
365
+ *
366
+ * 判定:`now - askedAt > waitMs`(**严格超过**才算超时,与对端 pending 的过期口径一致)。
367
+ */
368
+ expire(now) {
369
+ const t = now ?? this.nowFn();
370
+ const events = [];
371
+ for (const ask of [...this.outstanding.values()]) {
372
+ if (t - ask.askedAt <= this.waitMs)
373
+ continue;
374
+ this.outstanding.delete(ask.correlationId);
375
+ events.push(this.applyOutcome(ask, "unanswered", "等待回信超时(对端未在时限内回答)"));
376
+ }
377
+ return events;
378
+ }
379
+ /**
380
+ * 提问**没送达**对端(对端不可达 / 被拒 / 已过期)→ 结局 `unreachable`。
381
+ *
382
+ * 不计入「连续未答」(避免把离线的对端误停),但**要退避**(别每轮都问一个离线对端)。
383
+ */
384
+ noteUnreachable(input) {
385
+ const at = input.at ?? this.nowFn();
386
+ const ask = { peer: input.peer, correlationId: input.correlationId, askedAt: at };
387
+ if (input.threadKey !== undefined)
388
+ ask.threadKey = input.threadKey;
389
+ this.outstanding.delete(input.correlationId);
390
+ return this.applyOutcome(ask, "unreachable", input.reason ?? "对端不可达(提问未送达)");
391
+ }
392
+ /** 现在**该不该**问这个对端(停止追问的状态机判定)。 */
393
+ canAsk(peer, now) {
394
+ const rec = this.peers.get(peer);
395
+ if (rec === undefined)
396
+ return true;
397
+ if (rec.state === "waiting" || rec.state === "answered" || rec.state === "stopped")
398
+ return false;
399
+ const t = now ?? this.nowFn();
400
+ if (rec.nextAskAt !== undefined && t < rec.nextAskAt)
401
+ return false;
402
+ return true;
403
+ }
404
+ /** 某个对端的可观测状态。 */
405
+ status(peer) {
406
+ const rec = this.peers.get(peer);
407
+ if (rec === undefined) {
408
+ return { peer, state: "idle", askCount: 0, unansweredCount: 0 };
409
+ }
410
+ const out = {
411
+ peer,
412
+ state: rec.state,
413
+ askCount: rec.askCount,
414
+ unansweredCount: rec.unansweredCount,
415
+ };
416
+ if (rec.reason !== undefined)
417
+ out.reason = rec.reason;
418
+ if (rec.nextAskAt !== undefined)
419
+ out.nextAskAt = rec.nextAskAt;
420
+ if (rec.latestCorrelationId !== undefined) {
421
+ const ask = this.outstanding.get(rec.latestCorrelationId);
422
+ if (ask !== undefined)
423
+ out.outstanding = ask;
424
+ }
425
+ return out;
426
+ }
427
+ /**
428
+ * 对端**重新进入忙碌**(开始新工作)→ 复位「已答 / 已停止」→ 可以再问。
429
+ *
430
+ * 理由:问的是「在忙什么」—— 对端开始新工作后,这个问题才重新有意义;
431
+ * 对端一直闲着还一直问,就是噪声(实测 196 问的来源)。
432
+ */
433
+ notePeerBusy(peer) {
434
+ const rec = this.peers.get(peer);
435
+ if (rec === undefined)
436
+ return;
437
+ if (rec.state !== "answered" && rec.state !== "stopped")
438
+ return;
439
+ rec.state = "idle";
440
+ rec.reason = undefined;
441
+ rec.nextAskAt = undefined;
442
+ }
443
+ /** 当前未决 ask 数。 */
444
+ outstandingCount() {
445
+ return this.outstanding.size;
446
+ }
447
+ /** 还有**在途提问**的对端 id 集合(用于死亡检测:这些对端一死,提问立即结案)。 */
448
+ outstandingPeers() {
449
+ const out = new Set();
450
+ for (const ask of this.outstanding.values())
451
+ out.add(ask.peer);
452
+ return [...out];
453
+ }
454
+ /** 某个对端当前**未决**的 ask 列表(发出去了、还没收到结局)。 */
455
+ outstandingAsks(peer) {
456
+ const out = [];
457
+ for (const ask of this.outstanding.values()) {
458
+ if (ask.peer === peer)
459
+ out.push(ask);
460
+ }
461
+ return out;
462
+ }
463
+ /**
464
+ * **对端死亡**(心跳过期 / 判定不可达)→ 在途 ask **立即**结案「对端已死亡」,
465
+ * 并**不再追问**该对端。
466
+ *
467
+ * 语义(三条,缺一不可):
468
+ * 1. 每条在途 ask 的结局记为 `unreachable`(**不是** `unanswered`——它没有被回答的机会);
469
+ * 2. 该对端的状态置为 `stopped` → `canAsk()` 恒为 false → **不再追问**;
470
+ * 3. 复位条件不变:对端**重新进入忙碌**(`notePeerBusy`)才恢复(它可能换了新会话)。
471
+ *
472
+ * 复用既有账本(**不另造一套**「我发出的提问」台账)。
473
+ */
474
+ notePeerDead(peer, opts) {
475
+ const reason = opts?.reason ?? "对端已死亡(心跳过期)";
476
+ const events = [];
477
+ for (const ask of [...this.outstanding.values()]) {
478
+ if (ask.peer !== peer)
479
+ continue;
480
+ this.outstanding.delete(ask.correlationId);
481
+ events.push(this.applyOutcome(ask, "unreachable", reason));
482
+ }
483
+ const rec = this.recordOf(peer);
484
+ rec.state = "stopped";
485
+ rec.reason = `${reason}(不再追问该对端)`;
486
+ rec.nextAskAt = undefined;
487
+ return events;
488
+ }
489
+ // ---- 内部实现 ----
490
+ recordOf(peer) {
491
+ let rec = this.peers.get(peer);
492
+ if (rec === undefined) {
493
+ rec = { peer, state: "idle", askCount: 0, unansweredCount: 0 };
494
+ this.peers.set(peer, rec);
495
+ }
496
+ return rec;
497
+ }
498
+ /** 记结局 + 推进该对端的状态机。 */
499
+ applyOutcome(ask, outcome, reason) {
500
+ const at = this.nowFn();
501
+ const rec = this.recordOf(ask.peer);
502
+ const event = {
503
+ type: "outcome",
504
+ at,
505
+ cause: "peer-ask",
506
+ outcome,
507
+ correlationId: ask.correlationId,
508
+ peer: ask.peer,
509
+ askedAt: ask.askedAt,
510
+ elapsedMs: Math.max(0, at - ask.askedAt),
511
+ reason,
512
+ };
513
+ // 人侧发起的提问 → 结局带上这个标记(回信要能通知到人眼前)。
514
+ if (ask.humanOrigin === true)
515
+ event.humanOrigin = true;
516
+ if (ask.threadKey !== undefined)
517
+ event.threadId = ask.threadKey;
518
+ if (outcome === "answered") {
519
+ rec.state = "answered";
520
+ rec.reason = reason;
521
+ rec.nextAskAt = undefined;
522
+ }
523
+ else if (outcome === "unanswered") {
524
+ rec.unansweredCount += 1;
525
+ if (rec.unansweredCount >= this.maxUnanswered) {
526
+ rec.state = "stopped";
527
+ rec.reason = `连续 ${rec.unansweredCount} 次未获回答 → 停止问该对端`;
528
+ rec.nextAskAt = undefined;
529
+ }
530
+ else {
531
+ rec.state = "idle";
532
+ const wait = this.backoffMs * rec.unansweredCount;
533
+ rec.nextAskAt = at + wait;
534
+ rec.reason = `未获回答(第 ${rec.unansweredCount} 次,退避 ${wait}ms 后再问)`;
535
+ }
536
+ }
537
+ else {
538
+ // unreachable:不算「未答」,但要退避(别每轮都问一个送不到的对端)。
539
+ rec.state = "idle";
540
+ rec.nextAskAt = at + this.backoffMs;
541
+ rec.reason = reason;
542
+ }
543
+ return event;
544
+ }
545
+ /** 某个对端当前**未决**的 ask 数(发出去了、还没收到结局)→ 「在途任务数」的一半。 */
546
+ outstandingFor(peer) {
547
+ let n = 0;
548
+ for (const ask of this.outstanding.values()) {
549
+ if (ask.peer === peer)
550
+ n += 1;
551
+ }
552
+ return n;
553
+ }
554
+ }
555
+ /** 默认连续空闲阈值(10 分钟)。 */
556
+ export const DEFAULT_AFTER_IDLE_MS = 600_000;
557
+ /** 默认心跳周期(30 秒,与注册表一致)。 */
558
+ export const DEFAULT_WATCH_HEARTBEAT_MS = 30_000;
559
+ /** 心跳过期倍数(与注册表 `OFFLINE_HEARTBEAT_FACTOR` 一致):超过 3 个周期未刷新即视为不新鲜。 */
560
+ /** peer watch 的最小询问周期(ms,5 分钟):防止 `afterIdleMs` 很小退化成刷屏。 */
561
+ export const DEFAULT_WATCH_CYCLE_MS = 300_000;
562
+ export const WATCH_OFFLINE_FACTOR = 3;
563
+ /**
564
+ * peer watch 判定器(纯逻辑)。
565
+ *
566
+ * 用法:`observe(当前在线 peer)` → `targets(当前在线 peer)` → 发出询问后 `markAsked(agentId)`。
567
+ */
568
+ export class PeerWatch {
569
+ enabledFlag;
570
+ afterIdleMs;
571
+ cycleMs;
572
+ nowFn;
573
+ selfAgentId;
574
+ /** 会话角色(缺省 = 不限定)。 */
575
+ role;
576
+ /** 随会话的 watch 名单(空 = 不限定)。 */
577
+ watchList;
578
+ /** agentId → 本机第一次观察到它 idle 的时刻。 */
579
+ idleSince = new Map();
580
+ /** agentId → 上次询问的时刻。 */
581
+ lastAskedAt = new Map();
582
+ /** agentId → 未获回复的询问次数(环路计数)。 */
583
+ hops = new Map();
584
+ constructor(opts = {}) {
585
+ this.enabledFlag = opts.enabled ?? false;
586
+ this.afterIdleMs = opts.afterIdleMs ?? DEFAULT_AFTER_IDLE_MS;
587
+ this.cycleMs = opts.cycleMs ?? Math.max(this.afterIdleMs, DEFAULT_WATCH_CYCLE_MS);
588
+ this.nowFn = opts.now ?? (() => Date.now());
589
+ this.selfAgentId = opts.selfAgentId ?? "";
590
+ this.role = opts.role;
591
+ this.watchList = [...(opts.watchList ?? [])];
592
+ }
593
+ /** 是否开启。 */
594
+ get enabled() {
595
+ return this.enabledFlag;
596
+ }
597
+ /**
598
+ * 记录一次观测:更新每个 peer 的空闲起点。
599
+ *
600
+ * - 观察到 busy → 清空空闲起点(空闲时长不跨 busy 累计);
601
+ * - 观察到 idle → 首次见到时记下当前时刻;
602
+ * - 本轮没出现的 peer → 一并清掉(已下线)。
603
+ */
604
+ observe(peers) {
605
+ const now = this.nowFn();
606
+ const seen = new Set();
607
+ for (const p of peers) {
608
+ seen.add(p.agentId);
609
+ if (p.status !== "idle") {
610
+ this.idleSince.delete(p.agentId);
611
+ continue;
612
+ }
613
+ if (!this.idleSince.has(p.agentId))
614
+ this.idleSince.set(p.agentId, now);
615
+ }
616
+ for (const id of [...this.idleSince.keys()]) {
617
+ if (!seen.has(id))
618
+ this.idleSince.delete(id);
619
+ }
620
+ }
621
+ /**
622
+ * 本轮应当询问的 peer(已过滤:非 idle / 心跳不新鲜 / 空闲不足 / 本周期已问过)。
623
+ */
624
+ targets(peers) {
625
+ if (!this.enabledFlag)
626
+ return [];
627
+ // **角色作用域**(KK-10):执行者只被 watch → 永不主动问(避免 N² 问询)。
628
+ if (this.role === "worker")
629
+ return [];
630
+ const now = this.nowFn();
631
+ const out = [];
632
+ for (const p of peers) {
633
+ if (p.agentId === this.selfAgentId)
634
+ continue;
635
+ // **随会话的 watch 名单**:不在名单里的对端一律不问(名单外的对端只是「看得见」)。
636
+ if (this.watchList.length > 0 && !this.watchList.includes(p.agentId))
637
+ continue;
638
+ if (p.status !== "idle")
639
+ continue;
640
+ if (!this.isFresh(p, now))
641
+ continue;
642
+ const since = this.idleSince.get(p.agentId);
643
+ if (since === undefined)
644
+ continue;
645
+ if (now - since < this.afterIdleMs)
646
+ continue;
647
+ const asked = this.lastAskedAt.get(p.agentId);
648
+ if (asked !== undefined && now - asked < this.cycleMs)
649
+ continue;
650
+ out.push(p);
651
+ }
652
+ return out;
653
+ }
654
+ /** 标记已询问(进入下一个周期前不再询问同一个 peer)。 */
655
+ markAsked(agentId) {
656
+ this.lastAskedAt.set(agentId, this.nowFn());
657
+ }
658
+ /** 某个 peer 当前未获回复的询问次数。 */
659
+ hopFor(agentId) {
660
+ return this.hops.get(agentId) ?? 0;
661
+ }
662
+ /** 询问次数 +1 并返回新值。 */
663
+ noteHop(agentId) {
664
+ const next = this.hopFor(agentId) + 1;
665
+ this.hops.set(agentId, next);
666
+ return next;
667
+ }
668
+ /** 收到该 peer 的回复 → 环路计数归零。 */
669
+ resetHop(agentId) {
670
+ this.hops.delete(agentId);
671
+ }
672
+ /** 心跳是否新鲜(未超过 3 个心跳周期)。 */
673
+ isFresh(p, now) {
674
+ const hb = p.heartbeatMs ?? DEFAULT_WATCH_HEARTBEAT_MS;
675
+ return now - p.lastSeen <= hb * WATCH_OFFLINE_FACTOR;
676
+ }
677
+ }
678
+ /**
679
+ * `/proactive peers` 的文本:name / agentId / status / 距上次心跳 / currentTask。
680
+ */
681
+ export function formatPeerList(peers, now) {
682
+ if (peers.length === 0)
683
+ return "当前没有在线的 peer。";
684
+ const lines = [`在线 peer(${peers.length} 个):`];
685
+ for (const p of peers) {
686
+ const since = Math.max(0, now - p.lastSeen);
687
+ const parts = [
688
+ `${p.name || p.agentId}`,
689
+ `(${p.agentId})`,
690
+ p.status === "idle" ? "空闲" : p.status === "offline" ? "离线" : "忙碌",
691
+ `心跳 ${Math.round(since / 1000)}s 前`,
692
+ p.currentTask ? `当前任务:${p.currentTask}` : "当前任务:—",
693
+ ];
694
+ lines.push(`- ${parts.join(" · ")}`);
695
+ }
696
+ return lines.join("\n");
697
+ }
698
+ // ============================================================================
699
+ // 人侧发指令(人类 → agent peer):`/proactive tell`
700
+ // ============================================================================
701
+ //
702
+ // 定位:**纯逻辑**(无 IO)—— 命令解析 / 目标解析 / 信封构造 / 信任判定都在这里,
703
+ // 扩展层只做「接线 + 投递 + 回执」。这样单测能独立验证「人敲的命令到底变成了什么信封」。
704
+ //
705
+ // 三条硬纪律(与本项目的既有病根对着干):
706
+ // 1. **不得另造投递通道** —— 构造出来的信封只能走既有唯一出站入口 `deliverToPeer`;
707
+ // 2. **回执如实** —— 「已送达 / 已落盘待其上线 / 未送达」三态必须分清(queued ≠ 已送达);
708
+ // 3. **人类发起 ≠ 免检** —— 人类标记只增加**可识别性**,不豁免来源校验(`strict` 照旧)。
709
+ /**
710
+ * 人侧发指令允许的 `kind`(`reply` 不在其中:回信必须配 `correlationId`,不是人能直接下的语义)。
711
+ *
712
+ * **类型口径**:`kind` 的类型一律是 `DeliverKind`(唯一真源)—— 这里给的是**取值子集**,
713
+ * 由 `parseTellCommand()` 在运行时校验(不放宽 `DeliverKind`,也不另立一个 kind 类型)。
714
+ */
715
+ export const TELL_KINDS = ["ask", "task", "notify"];
716
+ /** `/proactive tell` 的用法(错误提示与 help 共用同一句,避免两处说法漂移)。 */
717
+ export const TELL_USAGE = "用法:/proactive tell <peer> <内容> [--kind ask|task|notify] [--thread <id>] [--subject <标题>]";
718
+ /**
719
+ * 解析 `/proactive tell` 的参数串。
720
+ *
721
+ * 口径:
722
+ * - 目标 = 第一个非参数词;其余词(去掉参数后)原样拼成**正文**(内部空白不丢);
723
+ * - `--kind` 缺省 `ask`(人给对端下指令最常见的诉求是「要回话」);
724
+ * - `--kind` 只接受 `ask|task|notify`(`reply` 需配 `correlationId`,人侧不直接发);
725
+ * - 未知参数 → **报错**(不静默吞掉,避免拼错参数还发出去)。
726
+ */
727
+ export function parseTellCommand(args) {
728
+ const flags = new Map();
729
+ let rest = args;
730
+ const take = (name, pattern) => {
731
+ const m = pattern.exec(rest);
732
+ if (m === null)
733
+ return null;
734
+ flags.set(name, m[1] ?? "");
735
+ rest = rest.replace(pattern, " ");
736
+ return m[1] ?? "";
737
+ };
738
+ const kindRaw = take("kind", /--kind[ \t]+(\S+)/);
739
+ if (kindRaw === null && /--kind(?![ \t]+\S)/.test(rest)) {
740
+ return { ok: false, error: `--kind 缺参数。${TELL_USAGE}` };
741
+ }
742
+ const threadRaw = take("thread", /--thread[ \t]+(\S+)/);
743
+ const subjectRaw = take("subject", /--subject[ \t]+(\S+)/);
744
+ const unknown = rest.match(/--[A-Za-z][\w-]*/);
745
+ if (unknown !== null) {
746
+ return { ok: false, error: `未知参数「${unknown[0]}」。${TELL_USAGE}` };
747
+ }
748
+ // 目标 = 第一个词;正文 = 余下**原样**(内部空白不丢)。
749
+ const split = /^(\S+)\s*([\s\S]*)$/.exec(rest.trim());
750
+ const target = split?.[1];
751
+ const body = (split?.[2] ?? "").trim();
752
+ if (target === undefined) {
753
+ return { ok: false, error: `缺少目标对端。${TELL_USAGE}` };
754
+ }
755
+ if (body === "") {
756
+ return { ok: false, error: `缺少指令内容。${TELL_USAGE}` };
757
+ }
758
+ let kind = "ask";
759
+ if (kindRaw !== null) {
760
+ if (!TELL_KINDS.includes(kindRaw)) {
761
+ return { ok: false, error: `--kind 非法「${kindRaw}」(允许 ${TELL_KINDS.join("|")})。${TELL_USAGE}` };
762
+ }
763
+ kind = kindRaw;
764
+ }
765
+ const command = { target, body, kind };
766
+ if (typeof threadRaw === "string" && threadRaw !== "")
767
+ command.threadId = threadRaw;
768
+ if (typeof subjectRaw === "string" && subjectRaw !== "")
769
+ command.subject = subjectRaw;
770
+ return { ok: true, command };
771
+ }
772
+ /**
773
+ * 解析目标对端(名字 / agentId / 前缀)。
774
+ *
775
+ * 口径(**比注册表的 `resolve()` 更保守**,理由见函数注释):
776
+ * - 完整 agentId 逐字命中 → 直接用它(无歧义);
777
+ * - 名字命中 1 个 → 用它;命中多个 → **拒绝 + 列出候选**(不替人挑一个);
778
+ * - 前缀命中 1 个 → 用它;命中多个 → **拒绝 + 列出候选**;
779
+ * - 一个都没命中 → **拒绝**(明确说找不到;**不**静默丢一封信到不存在的邮箱)。
780
+ *
781
+ * 为什么比 `Registry.resolve()` 更保守:注册表的口径是「在线优先」(同名里恰好一个在线就选它),
782
+ * 对**人**下指令来说「我 tell bob,结果发给了另一个 bob」是事故 → 人侧一律拒绝并列出候选。
783
+ * (模型侧 `message_agent` 仍走注册表原口径 —— 全局口径由 PEERLIFE2 裁决,不在本卡改动。)
784
+ */
785
+ export function resolveTellTarget(entries, target) {
786
+ const exact = entries.filter((e) => e.agentId === target);
787
+ if (exact.length === 1)
788
+ return { ok: true, agentId: exact[0].agentId };
789
+ const byName = entries.filter((e) => e.name === target);
790
+ if (byName.length === 1)
791
+ return { ok: true, agentId: byName[0].agentId };
792
+ if (byName.length > 1) {
793
+ return {
794
+ ok: false,
795
+ error: `目标「${target}」存在同名歧义(匹配到 ${byName.length} 个 agent),无法确定发给谁:${formatTellCandidates(byName)}(请用完整 agentId 指定)`,
796
+ candidates: byName,
797
+ };
798
+ }
799
+ const byPrefix = entries.filter((e) => e.agentId.startsWith(target) || e.name.startsWith(target));
800
+ if (byPrefix.length === 1)
801
+ return { ok: true, agentId: byPrefix[0].agentId };
802
+ if (byPrefix.length > 1) {
803
+ return {
804
+ ok: false,
805
+ error: `目标「${target}」存在前缀歧义(匹配到 ${byPrefix.length} 个 agent),无法确定发给谁:${formatTellCandidates(byPrefix)}(请用完整 agentId 指定)`,
806
+ candidates: byPrefix,
807
+ };
808
+ }
809
+ const known = entries.map((e) => e.name || e.agentId);
810
+ return {
811
+ ok: false,
812
+ error: `找不到目标对端「${target}」(当前已知 ${entries.length} 个:${known.join(", ") || "无"})`,
813
+ candidates: [],
814
+ };
815
+ }
816
+ /** 候选清单的可读写法:`agentId(名字·状态)`。 */
817
+ export function formatTellCandidates(candidates) {
818
+ return candidates.map((c) => `${c.agentId}(${c.name}·${c.status})`).join(", ");
819
+ }
820
+ /**
821
+ * 构造人侧发指令的信封。
822
+ *
823
+ * 关键点:
824
+ * - `from` = 本会话 agentId → 收信侧的 strict 校验(注册表逐字命中 + 主机一致)**照旧通过**
825
+ * (人类发起**不豁免**任何校验);
826
+ * - `customType` = `proactive:human` → 收信侧**能识别**这条是人类直接下达的
827
+ * (是否给特权由收信侧的受信集合决定,见 `humanOriginLabel`);
828
+ * - `kind:"ask"` 必须带 `correlationId` → 回信能配回这条提问(否则人等不到答案)。
829
+ */
830
+ export function buildTellEnvelope(input) {
831
+ const correlationId = input.kind === "ask" ? (input.correlationId ?? `ask-${randomUUID()}`) : input.correlationId;
832
+ return createEnvelope({
833
+ from: input.from,
834
+ to: input.to,
835
+ kind: input.kind,
836
+ intent: input.intent ?? "wake",
837
+ body: input.body,
838
+ subject: input.subject,
839
+ threadId: input.threadId ?? `human-${randomUUID()}`,
840
+ correlationId,
841
+ customType: HUMAN_ORIGIN_CUSTOM_TYPE,
842
+ ...(input.now === undefined ? {} : { createdAt: input.now }),
843
+ });
844
+ }
845
+ /** 受信「人类发起方」集合的环境变量名(逗号分隔的 agentId)。 */
846
+ export const TRUSTED_HUMAN_SENDERS_ENV = "PI_PROACTIVE_TRUSTED_HUMAN_SENDERS";
847
+ /** 读受信「人类发起方」集合(缺省 = 空集 = **谁都不受信**)。 */
848
+ export function resolveTrustedHumanSenders(env = process.env) {
849
+ const raw = env[TRUSTED_HUMAN_SENDERS_ENV];
850
+ if (typeof raw !== "string" || raw.trim() === "")
851
+ return [];
852
+ return raw
853
+ .split(",")
854
+ .map((s) => s.trim())
855
+ .filter((s) => s !== "");
856
+ }
857
+ /** 发送方是否在受信「人类发起方」集合里。 */
858
+ export function isTrustedHumanSender(agentId, trusted) {
859
+ return trusted.includes(agentId);
860
+ }
861
+ /** 已验证的人类指令标记(收信侧注入给模型看)。 */
862
+ export const HUMAN_ORIGIN_VERIFIED_MARK = "【人类指令(已验证)】";
863
+ /** 未受信的人类指令声称标记(**如实标注**,不给特权)。 */
864
+ export const HUMAN_ORIGIN_UNVERIFIED_MARK = "【对端声称是人类指令(未受信)】";
865
+ /**
866
+ * 收信侧判定这条信封是不是「人类发起」,以及**能不能信**。
867
+ *
868
+ * - 不是人类发起(没有 `proactive:human` 标记)→ `undefined`(不标任何东西);
869
+ * - 是人类发起且发送方在受信集合里 → 已验证标记;
870
+ * - 是人类发起但发送方**不在**受信集合 → 未受信标记(如实说「对端声称」)。
871
+ *
872
+ * **为什么不把「带标记」直接当成人类**:任何 peer 都能在信封里写这个标记 →
873
+ * 把「带标记」直接当人类 = 任何对端都能冒充人类下指令。受信集合是**部署关注点**
874
+ * (与 §8.4「来源校验是部署关注点」同型):收信侧自己决定信谁。
875
+ */
876
+ export function humanOriginLabel(envelope, trusted) {
877
+ if (envelope.customType !== HUMAN_ORIGIN_CUSTOM_TYPE)
878
+ return undefined;
879
+ return isTrustedHumanSender(envelope.from, trusted)
880
+ ? HUMAN_ORIGIN_VERIFIED_MARK
881
+ : HUMAN_ORIGIN_UNVERIFIED_MARK;
882
+ }
883
+ export function formatPeerDirectory(dir) {
884
+ const lines = [];
885
+ const online = dir.peers.filter((p) => p.status !== "offline").length;
886
+ const offline = dir.peers.length - online;
887
+ if (dir.peers.length === 0) {
888
+ lines.push("没有匹配的对端。");
889
+ }
890
+ else {
891
+ lines.push(`对端(${dir.peers.length} 个:在线 ${online} · 离线 ${offline}):`);
892
+ for (const p of dir.peers) {
893
+ const parts = [
894
+ `${p.name || p.agentId}`,
895
+ `(${p.agentId})`,
896
+ p.status === "idle" ? "空闲" : p.status === "busy" ? "忙碌" : "离线",
897
+ `心跳 ${Math.round(p.heartbeatAgeMs / 1000)}s 前`,
898
+ `能力 ${p.capabilities.length > 0 ? p.capabilities.join(",") : "—"}`,
899
+ `在途 ${p.inFlight}`,
900
+ `传输 ${p.transport}`,
901
+ ];
902
+ // 墓碑:离线条目带下线时间与原因(在线条目不带 → 字段集按状态裁剪,渲染口径统一)。
903
+ if (p.status === "offline") {
904
+ parts.push(`下线 ${p.offlineAt === undefined ? "时间未知" : new Date(p.offlineAt).toISOString()}`);
905
+ parts.push(`下线原因 ${p.offlineReason ?? "未记录"}`);
906
+ }
907
+ lines.push(`- ${parts.join(" · ")}`);
908
+ }
909
+ }
910
+ if (dir.ambiguous !== null) {
911
+ lines.push(`注意:同名歧义(${dir.ambiguous.join(", ")})—— message_agent 按这个名字发送也会因歧义被拒;请用完整 agentId 指定其中一个。`);
912
+ }
913
+ return lines.join("\n");
914
+ }
915
+ /**
916
+ * peer 生命周期状态机(**纯逻辑、无 IO**):跟踪每个对端处在哪个状态、何时进入、
917
+ * 以及**死亡**判定(心跳过期 = 崩溃)。
918
+ *
919
+ * 死亡判定的口径与注册表**逐字一致**(`registry.isExpired()`)→ 不造第二套「在不在」判定。
920
+ */
921
+ export class PeerLifecycle {
922
+ nowFn;
923
+ entries = new Map();
924
+ constructor(opts = {}) {
925
+ this.nowFn = opts.now ?? (() => Date.now());
926
+ }
927
+ /** 某对端的状态;**未被跟踪** → `undefined`(不臆造)。 */
928
+ state(agentId) {
929
+ return this.entries.get(agentId)?.state;
930
+ }
931
+ /** 某对端的生命周期条目(副本)。 */
932
+ entry(agentId) {
933
+ const e = this.entries.get(agentId);
934
+ return e === undefined ? undefined : { ...e };
935
+ }
936
+ /** 全部被跟踪的对端(副本)。 */
937
+ list() {
938
+ return [...this.entries.values()].map((e) => ({ ...e }));
939
+ }
940
+ /**
941
+ * 推进状态(并记录进入时刻)。
942
+ *
943
+ * `dead` 是**终态**:已经死了的对端不会被推回别的状态(墓碑不被覆盖)。
944
+ */
945
+ transition(agentId, to, reason) {
946
+ const prev = this.entries.get(agentId);
947
+ if (prev !== undefined && prev.state === "dead")
948
+ return { ...prev };
949
+ const at = this.nowFn();
950
+ const entry = { agentId, state: to, since: at };
951
+ if (to === "dead") {
952
+ entry.offlineAt = at;
953
+ entry.offlineReason = reason ?? "未记录原因";
954
+ }
955
+ this.entries.set(agentId, entry);
956
+ return entry;
957
+ }
958
+ /**
959
+ * **死亡检测**:对端心跳过期(= 崩溃,没走到 `unregister()`)→ 状态置 `dead` + 记墓碑。
960
+ *
961
+ * 只读注册表(**不写**)——写墓碑由调用方做(`registry.markDead()`),
962
+ * 这样本模块保持「纯逻辑、无 IO」。
963
+ *
964
+ * @param candidates 要检查的对端 id(缺省 = 被本状态机跟踪的全部对端)。
965
+ * @returns 本轮**新**死掉的对端(已死的不重复报)。
966
+ */
967
+ detectDead(registry, candidates) {
968
+ const now = this.nowFn();
969
+ const dead = [];
970
+ const ids = candidates ?? [...this.entries.keys()];
971
+ for (const agentId of ids) {
972
+ const tracked = this.entries.get(agentId);
973
+ if (tracked !== undefined && tracked.state === "dead")
974
+ continue;
975
+ const info = registry.findByAgentId(agentId);
976
+ if (info === null || info === undefined) {
977
+ dead.push(this.transition(agentId, "dead", "注册表条目已消失"));
978
+ continue;
979
+ }
980
+ if (registry.isExpired(info, now)) {
981
+ dead.push(this.transition(agentId, "dead", "心跳过期(可能崩溃)"));
982
+ }
983
+ }
984
+ return dead;
985
+ }
986
+ }
987
+ /**
988
+ * **drain**:为每一条「我欠答的 ask」生成一条「我下线了」的回信(**纯逻辑,不做 IO**)。
989
+ *
990
+ * 语义:优雅退出前,把在途 ask **逐条**回执 —— 正文带 `PEER_OFFLINE_MARKER` →
991
+ * 提问方据此记 `unreachable`(对方下线 ≠ 得到答案)。
992
+ *
993
+ * 投递由调用方做(扩展层有 socket / 邮箱两条通道)。
994
+ */
995
+ export function buildDrainReplies(pending, agentId, now) {
996
+ return pending.map((p) => buildReply({
997
+ pending: p,
998
+ body: `${PEER_OFFLINE_MARKER}我下线了(会话结束,未能作答)`,
999
+ agentId,
1000
+ ...(now === undefined ? {} : { now }),
1001
+ }));
1002
+ }