@animalabs/agent-framework 0.22.2 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (997) hide show
  1. package/README.md +108 -4
  2. package/dist/src/agent.d.ts +108 -17
  3. package/dist/src/agent.d.ts.map +1 -1
  4. package/dist/src/agent.js +207 -67
  5. package/dist/src/agent.js.map +1 -1
  6. package/dist/src/api/mcp-server-core.js +1 -1
  7. package/dist/src/api/mcp-server-core.js.map +1 -1
  8. package/dist/src/api/server.d.ts.map +1 -1
  9. package/dist/src/api/server.js +5 -1
  10. package/dist/src/api/server.js.map +1 -1
  11. package/dist/src/api/types.d.ts +1 -1
  12. package/dist/src/api/types.d.ts.map +1 -1
  13. package/dist/src/branch-names.d.ts +14 -0
  14. package/dist/src/branch-names.d.ts.map +1 -0
  15. package/dist/src/branch-names.js +22 -0
  16. package/dist/src/branch-names.js.map +1 -0
  17. package/dist/src/closest-names.d.ts +28 -0
  18. package/dist/src/closest-names.d.ts.map +1 -0
  19. package/dist/src/closest-names.js +98 -0
  20. package/dist/src/closest-names.js.map +1 -0
  21. package/dist/src/code-execution/index.d.ts +1 -1
  22. package/dist/src/code-execution/index.d.ts.map +1 -1
  23. package/dist/src/code-execution/index.js.map +1 -1
  24. package/dist/src/code-execution/py-runner.d.ts +50 -7
  25. package/dist/src/code-execution/py-runner.d.ts.map +1 -1
  26. package/dist/src/code-execution/py-runner.js +258 -90
  27. package/dist/src/code-execution/py-runner.js.map +1 -1
  28. package/dist/src/code-execution/runtime-py.d.ts +3 -2
  29. package/dist/src/code-execution/runtime-py.d.ts.map +1 -1
  30. package/dist/src/code-execution/runtime-py.js +94 -8
  31. package/dist/src/code-execution/runtime-py.js.map +1 -1
  32. package/dist/src/code-execution/tool-definition.d.ts +17 -1
  33. package/dist/src/code-execution/tool-definition.d.ts.map +1 -1
  34. package/dist/src/code-execution/tool-definition.js +72 -6
  35. package/dist/src/code-execution/tool-definition.js.map +1 -1
  36. package/dist/src/config-checks.d.ts +28 -0
  37. package/dist/src/config-checks.d.ts.map +1 -0
  38. package/dist/src/config-checks.js +56 -0
  39. package/dist/src/config-checks.js.map +1 -0
  40. package/dist/src/deadline-timer.d.ts +21 -0
  41. package/dist/src/deadline-timer.d.ts.map +1 -0
  42. package/dist/src/deadline-timer.js +43 -0
  43. package/dist/src/deadline-timer.js.map +1 -0
  44. package/dist/src/error-message.d.ts +30 -0
  45. package/dist/src/error-message.d.ts.map +1 -0
  46. package/dist/src/error-message.js +50 -0
  47. package/dist/src/error-message.js.map +1 -0
  48. package/dist/src/framework.d.ts +1529 -165
  49. package/dist/src/framework.d.ts.map +1 -1
  50. package/dist/src/framework.js +8264 -1939
  51. package/dist/src/framework.js.map +1 -1
  52. package/dist/src/gate/event-gate.d.ts +8 -0
  53. package/dist/src/gate/event-gate.d.ts.map +1 -1
  54. package/dist/src/gate/event-gate.js +36 -5
  55. package/dist/src/gate/event-gate.js.map +1 -1
  56. package/dist/src/held-writes.d.ts +16 -0
  57. package/dist/src/held-writes.d.ts.map +1 -0
  58. package/dist/src/held-writes.js +56 -0
  59. package/dist/src/held-writes.js.map +1 -0
  60. package/dist/src/index.d.ts +10 -4
  61. package/dist/src/index.d.ts.map +1 -1
  62. package/dist/src/index.js +11 -5
  63. package/dist/src/index.js.map +1 -1
  64. package/dist/src/mcpl/capability-grant.d.ts +4 -0
  65. package/dist/src/mcpl/capability-grant.d.ts.map +1 -1
  66. package/dist/src/mcpl/capability-grant.js +1 -1
  67. package/dist/src/mcpl/capability-grant.js.map +1 -1
  68. package/dist/src/mcpl/channel-registry.d.ts +233 -18
  69. package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
  70. package/dist/src/mcpl/channel-registry.js +975 -386
  71. package/dist/src/mcpl/channel-registry.js.map +1 -1
  72. package/dist/src/mcpl/checkpoint-manager.d.ts +21 -1
  73. package/dist/src/mcpl/checkpoint-manager.d.ts.map +1 -1
  74. package/dist/src/mcpl/checkpoint-manager.js +91 -30
  75. package/dist/src/mcpl/checkpoint-manager.js.map +1 -1
  76. package/dist/src/mcpl/conversation-router.d.ts +19 -3
  77. package/dist/src/mcpl/conversation-router.d.ts.map +1 -1
  78. package/dist/src/mcpl/conversation-router.js +23 -8
  79. package/dist/src/mcpl/conversation-router.js.map +1 -1
  80. package/dist/src/mcpl/convert-block.d.ts +20 -0
  81. package/dist/src/mcpl/convert-block.d.ts.map +1 -0
  82. package/dist/src/mcpl/convert-block.js +88 -0
  83. package/dist/src/mcpl/convert-block.js.map +1 -0
  84. package/dist/src/mcpl/errors.d.ts +13 -0
  85. package/dist/src/mcpl/errors.d.ts.map +1 -1
  86. package/dist/src/mcpl/errors.js +28 -0
  87. package/dist/src/mcpl/errors.js.map +1 -1
  88. package/dist/src/mcpl/hook-orchestrator.d.ts +23 -0
  89. package/dist/src/mcpl/hook-orchestrator.d.ts.map +1 -1
  90. package/dist/src/mcpl/hook-orchestrator.js +83 -72
  91. package/dist/src/mcpl/hook-orchestrator.js.map +1 -1
  92. package/dist/src/mcpl/inbound-source.d.ts +114 -0
  93. package/dist/src/mcpl/inbound-source.d.ts.map +1 -0
  94. package/dist/src/mcpl/inbound-source.js +83 -0
  95. package/dist/src/mcpl/inbound-source.js.map +1 -0
  96. package/dist/src/mcpl/index.d.ts +7 -1
  97. package/dist/src/mcpl/index.d.ts.map +1 -1
  98. package/dist/src/mcpl/index.js +5 -1
  99. package/dist/src/mcpl/index.js.map +1 -1
  100. package/dist/src/mcpl/inference-router.d.ts +19 -13
  101. package/dist/src/mcpl/inference-router.d.ts.map +1 -1
  102. package/dist/src/mcpl/inference-router.js +155 -87
  103. package/dist/src/mcpl/inference-router.js.map +1 -1
  104. package/dist/src/mcpl/log-value.d.ts +7 -0
  105. package/dist/src/mcpl/log-value.d.ts.map +1 -1
  106. package/dist/src/mcpl/log-value.js +9 -0
  107. package/dist/src/mcpl/log-value.js.map +1 -1
  108. package/dist/src/mcpl/modern-connection.d.ts +227 -0
  109. package/dist/src/mcpl/modern-connection.d.ts.map +1 -0
  110. package/dist/src/mcpl/modern-connection.js +1088 -0
  111. package/dist/src/mcpl/modern-connection.js.map +1 -0
  112. package/dist/src/mcpl/prefix-rule.d.ts +18 -0
  113. package/dist/src/mcpl/prefix-rule.d.ts.map +1 -0
  114. package/dist/src/mcpl/prefix-rule.js +25 -0
  115. package/dist/src/mcpl/prefix-rule.js.map +1 -0
  116. package/dist/src/mcpl/protocol-family.d.ts +179 -0
  117. package/dist/src/mcpl/protocol-family.d.ts.map +1 -0
  118. package/dist/src/mcpl/protocol-family.js +697 -0
  119. package/dist/src/mcpl/protocol-family.js.map +1 -0
  120. package/dist/src/mcpl/push-coalescer.d.ts +58 -17
  121. package/dist/src/mcpl/push-coalescer.d.ts.map +1 -1
  122. package/dist/src/mcpl/push-coalescer.js +93 -32
  123. package/dist/src/mcpl/push-coalescer.js.map +1 -1
  124. package/dist/src/mcpl/push-handler.d.ts +16 -9
  125. package/dist/src/mcpl/push-handler.d.ts.map +1 -1
  126. package/dist/src/mcpl/push-handler.js +18 -83
  127. package/dist/src/mcpl/push-handler.js.map +1 -1
  128. package/dist/src/mcpl/reference-fetcher.d.ts +76 -13
  129. package/dist/src/mcpl/reference-fetcher.d.ts.map +1 -1
  130. package/dist/src/mcpl/reference-fetcher.js +275 -66
  131. package/dist/src/mcpl/reference-fetcher.js.map +1 -1
  132. package/dist/src/mcpl/references.d.ts +98 -18
  133. package/dist/src/mcpl/references.d.ts.map +1 -1
  134. package/dist/src/mcpl/references.js +170 -32
  135. package/dist/src/mcpl/references.js.map +1 -1
  136. package/dist/src/mcpl/server-connection.d.ts +406 -31
  137. package/dist/src/mcpl/server-connection.d.ts.map +1 -1
  138. package/dist/src/mcpl/server-connection.js +1331 -272
  139. package/dist/src/mcpl/server-connection.js.map +1 -1
  140. package/dist/src/mcpl/server-registry.d.ts +35 -6
  141. package/dist/src/mcpl/server-registry.d.ts.map +1 -1
  142. package/dist/src/mcpl/server-registry.js +63 -13
  143. package/dist/src/mcpl/server-registry.js.map +1 -1
  144. package/dist/src/mcpl/skip-reply-wake.d.ts +36 -0
  145. package/dist/src/mcpl/skip-reply-wake.d.ts.map +1 -0
  146. package/dist/src/mcpl/skip-reply-wake.js +55 -0
  147. package/dist/src/mcpl/skip-reply-wake.js.map +1 -0
  148. package/dist/src/mcpl/tool-result-normalize.d.ts +54 -0
  149. package/dist/src/mcpl/tool-result-normalize.d.ts.map +1 -0
  150. package/dist/src/mcpl/tool-result-normalize.js +232 -0
  151. package/dist/src/mcpl/tool-result-normalize.js.map +1 -0
  152. package/dist/src/mcpl/transport.d.ts +104 -12
  153. package/dist/src/mcpl/transport.d.ts.map +1 -1
  154. package/dist/src/mcpl/transport.js +315 -85
  155. package/dist/src/mcpl/transport.js.map +1 -1
  156. package/dist/src/mcpl/types.d.ts +76 -19
  157. package/dist/src/mcpl/types.d.ts.map +1 -1
  158. package/dist/src/mcpl/types.js.map +1 -1
  159. package/dist/src/mcpl/visible-content.d.ts +16 -0
  160. package/dist/src/mcpl/visible-content.d.ts.map +1 -1
  161. package/dist/src/mcpl/visible-content.js +26 -0
  162. package/dist/src/mcpl/visible-content.js.map +1 -1
  163. package/dist/src/module-registry.d.ts +34 -6
  164. package/dist/src/module-registry.d.ts.map +1 -1
  165. package/dist/src/module-registry.js +119 -31
  166. package/dist/src/module-registry.js.map +1 -1
  167. package/dist/src/modules/api/index.d.ts +1 -1
  168. package/dist/src/modules/api/index.d.ts.map +1 -1
  169. package/dist/src/modules/api/index.js +3 -2
  170. package/dist/src/modules/api/index.js.map +1 -1
  171. package/dist/src/modules/discord/discord-js-client.d.ts +43 -2
  172. package/dist/src/modules/discord/discord-js-client.d.ts.map +1 -1
  173. package/dist/src/modules/discord/discord-js-client.js +286 -67
  174. package/dist/src/modules/discord/discord-js-client.js.map +1 -1
  175. package/dist/src/modules/discord/index.d.ts +53 -5
  176. package/dist/src/modules/discord/index.d.ts.map +1 -1
  177. package/dist/src/modules/discord/index.js +712 -186
  178. package/dist/src/modules/discord/index.js.map +1 -1
  179. package/dist/src/modules/discord/refusal.d.ts +14 -0
  180. package/dist/src/modules/discord/refusal.d.ts.map +1 -0
  181. package/dist/src/modules/discord/refusal.js +14 -0
  182. package/dist/src/modules/discord/refusal.js.map +1 -0
  183. package/dist/src/modules/discord/types.d.ts +27 -4
  184. package/dist/src/modules/discord/types.d.ts.map +1 -1
  185. package/dist/src/modules/health/index.d.ts.map +1 -1
  186. package/dist/src/modules/health/index.js +8 -3
  187. package/dist/src/modules/health/index.js.map +1 -1
  188. package/dist/src/modules/history/index.d.ts +3 -1
  189. package/dist/src/modules/history/index.d.ts.map +1 -1
  190. package/dist/src/modules/history/index.js +359 -127
  191. package/dist/src/modules/history/index.js.map +1 -1
  192. package/dist/src/modules/history/semantic.d.ts +28 -1
  193. package/dist/src/modules/history/semantic.d.ts.map +1 -1
  194. package/dist/src/modules/history/semantic.js +177 -32
  195. package/dist/src/modules/history/semantic.js.map +1 -1
  196. package/dist/src/modules/index.d.ts +1 -1
  197. package/dist/src/modules/index.d.ts.map +1 -1
  198. package/dist/src/modules/index.js +1 -1
  199. package/dist/src/modules/index.js.map +1 -1
  200. package/dist/src/modules/unknown-tool.d.ts +10 -0
  201. package/dist/src/modules/unknown-tool.d.ts.map +1 -0
  202. package/dist/src/modules/unknown-tool.js +17 -0
  203. package/dist/src/modules/unknown-tool.js.map +1 -0
  204. package/dist/src/modules/workspace/disk-agreement.d.ts +57 -4
  205. package/dist/src/modules/workspace/disk-agreement.d.ts.map +1 -1
  206. package/dist/src/modules/workspace/disk-agreement.js +75 -7
  207. package/dist/src/modules/workspace/disk-agreement.js.map +1 -1
  208. package/dist/src/modules/workspace/effects.d.ts +66 -7
  209. package/dist/src/modules/workspace/effects.d.ts.map +1 -1
  210. package/dist/src/modules/workspace/effects.js +303 -46
  211. package/dist/src/modules/workspace/effects.js.map +1 -1
  212. package/dist/src/modules/workspace/index.d.ts +313 -45
  213. package/dist/src/modules/workspace/index.d.ts.map +1 -1
  214. package/dist/src/modules/workspace/index.js +1404 -304
  215. package/dist/src/modules/workspace/index.js.map +1 -1
  216. package/dist/src/modules/workspace/observe.d.ts +315 -16
  217. package/dist/src/modules/workspace/observe.d.ts.map +1 -1
  218. package/dist/src/modules/workspace/observe.js +727 -37
  219. package/dist/src/modules/workspace/observe.js.map +1 -1
  220. package/dist/src/modules/workspace/reconcile.d.ts +58 -7
  221. package/dist/src/modules/workspace/reconcile.d.ts.map +1 -1
  222. package/dist/src/modules/workspace/reconcile.js +521 -56
  223. package/dist/src/modules/workspace/reconcile.js.map +1 -1
  224. package/dist/src/modules/workspace/types.d.ts +28 -5
  225. package/dist/src/modules/workspace/types.d.ts.map +1 -1
  226. package/dist/src/modules/workspace/types.js.map +1 -1
  227. package/dist/src/modules/workspace/watcher.d.ts +49 -2
  228. package/dist/src/modules/workspace/watcher.d.ts.map +1 -1
  229. package/dist/src/modules/workspace/watcher.js +158 -29
  230. package/dist/src/modules/workspace/watcher.js.map +1 -1
  231. package/dist/src/prose-drafts.d.ts +240 -0
  232. package/dist/src/prose-drafts.d.ts.map +1 -0
  233. package/dist/src/prose-drafts.js +362 -0
  234. package/dist/src/prose-drafts.js.map +1 -0
  235. package/dist/src/prose-segments.d.ts +21 -2
  236. package/dist/src/prose-segments.d.ts.map +1 -1
  237. package/dist/src/prose-segments.js +46 -9
  238. package/dist/src/prose-segments.js.map +1 -1
  239. package/dist/src/recovery/offline-branch.d.ts +1 -0
  240. package/dist/src/recovery/offline-branch.d.ts.map +1 -1
  241. package/dist/src/recovery/offline-branch.js +3 -1
  242. package/dist/src/recovery/offline-branch.js.map +1 -1
  243. package/dist/src/safe-slice.d.ts +5 -1
  244. package/dist/src/safe-slice.d.ts.map +1 -1
  245. package/dist/src/safe-slice.js +9 -1
  246. package/dist/src/safe-slice.js.map +1 -1
  247. package/dist/src/silent-heartbeat.d.ts +112 -39
  248. package/dist/src/silent-heartbeat.d.ts.map +1 -1
  249. package/dist/src/silent-heartbeat.js +100 -29
  250. package/dist/src/silent-heartbeat.js.map +1 -1
  251. package/dist/src/tool-args.d.ts +40 -0
  252. package/dist/src/tool-args.d.ts.map +1 -0
  253. package/dist/src/tool-args.js +207 -0
  254. package/dist/src/tool-args.js.map +1 -0
  255. package/dist/src/tool-image-ledger.d.ts +87 -19
  256. package/dist/src/tool-image-ledger.d.ts.map +1 -1
  257. package/dist/src/tool-image-ledger.js +135 -32
  258. package/dist/src/tool-image-ledger.js.map +1 -1
  259. package/dist/src/tool-presentation.d.ts +9 -0
  260. package/dist/src/tool-presentation.d.ts.map +1 -1
  261. package/dist/src/tool-presentation.js +266 -62
  262. package/dist/src/tool-presentation.js.map +1 -1
  263. package/dist/src/tool-result-guard.d.ts.map +1 -1
  264. package/dist/src/tool-result-guard.js +7 -10
  265. package/dist/src/tool-result-guard.js.map +1 -1
  266. package/dist/src/tool-result-history.d.ts +32 -3
  267. package/dist/src/tool-result-history.d.ts.map +1 -1
  268. package/dist/src/tool-result-history.js +106 -19
  269. package/dist/src/tool-result-history.js.map +1 -1
  270. package/dist/src/tune-out/coordinator.d.ts +25 -1
  271. package/dist/src/tune-out/coordinator.d.ts.map +1 -1
  272. package/dist/src/tune-out/coordinator.js +260 -65
  273. package/dist/src/tune-out/coordinator.js.map +1 -1
  274. package/dist/src/types/agent.d.ts +44 -22
  275. package/dist/src/types/agent.d.ts.map +1 -1
  276. package/dist/src/types/events.d.ts +25 -0
  277. package/dist/src/types/events.d.ts.map +1 -1
  278. package/dist/src/types/framework.d.ts +38 -7
  279. package/dist/src/types/framework.d.ts.map +1 -1
  280. package/dist/src/types/inference-log.d.ts +1 -1
  281. package/dist/src/types/inference-log.d.ts.map +1 -1
  282. package/dist/src/types/module.d.ts +77 -14
  283. package/dist/src/types/module.d.ts.map +1 -1
  284. package/dist/src/types/trace.d.ts +97 -8
  285. package/dist/src/types/trace.d.ts.map +1 -1
  286. package/dist/src/usage/usage-tracker.d.ts +5 -0
  287. package/dist/src/usage/usage-tracker.d.ts.map +1 -1
  288. package/dist/src/usage/usage-tracker.js +35 -8
  289. package/dist/src/usage/usage-tracker.js.map +1 -1
  290. package/package.json +5 -4
  291. package/src/agent.ts +257 -72
  292. package/src/api/mcp-server-core.ts +1 -1
  293. package/src/api/server.ts +4 -1
  294. package/src/api/types.ts +1 -1
  295. package/src/branch-names.ts +19 -0
  296. package/src/closest-names.ts +94 -0
  297. package/src/code-execution/index.ts +1 -0
  298. package/src/code-execution/py-runner.ts +304 -93
  299. package/src/code-execution/runtime-py.ts +94 -8
  300. package/src/code-execution/tool-definition.ts +85 -7
  301. package/src/config-checks.ts +50 -0
  302. package/src/deadline-timer.ts +44 -0
  303. package/src/error-message.ts +48 -0
  304. package/src/framework.ts +8625 -1984
  305. package/src/gate/event-gate.ts +38 -5
  306. package/src/held-writes.ts +59 -0
  307. package/src/index.ts +29 -5
  308. package/src/mcpl/capability-grant.ts +1 -1
  309. package/src/mcpl/channel-registry.ts +1095 -411
  310. package/src/mcpl/checkpoint-manager.ts +104 -29
  311. package/src/mcpl/conversation-router.ts +28 -8
  312. package/src/mcpl/convert-block.ts +105 -0
  313. package/src/mcpl/errors.ts +28 -0
  314. package/src/mcpl/hook-orchestrator.ts +84 -77
  315. package/src/mcpl/inbound-source.ts +156 -0
  316. package/src/mcpl/index.ts +23 -1
  317. package/src/mcpl/inference-router.ts +179 -103
  318. package/src/mcpl/log-value.ts +10 -0
  319. package/src/mcpl/modern-connection.ts +1182 -0
  320. package/src/mcpl/prefix-rule.ts +32 -0
  321. package/src/mcpl/protocol-family.ts +691 -0
  322. package/src/mcpl/push-coalescer.ts +110 -36
  323. package/src/mcpl/push-handler.ts +20 -90
  324. package/src/mcpl/reference-fetcher.ts +318 -67
  325. package/src/mcpl/references.ts +183 -34
  326. package/src/mcpl/server-connection.ts +1404 -280
  327. package/src/mcpl/server-registry.ts +63 -14
  328. package/src/mcpl/skip-reply-wake.ts +73 -0
  329. package/src/mcpl/tool-result-normalize.ts +294 -0
  330. package/src/mcpl/transport.ts +320 -76
  331. package/src/mcpl/types.ts +77 -19
  332. package/src/mcpl/visible-content.ts +28 -0
  333. package/src/module-registry.ts +126 -36
  334. package/src/modules/api/index.ts +3 -2
  335. package/src/modules/discord/discord-js-client.ts +306 -74
  336. package/src/modules/discord/index.ts +737 -201
  337. package/src/modules/discord/refusal.ts +13 -0
  338. package/src/modules/discord/types.ts +27 -6
  339. package/src/modules/health/index.ts +8 -3
  340. package/src/modules/history/index.ts +410 -120
  341. package/src/modules/history/semantic.ts +189 -32
  342. package/src/modules/index.ts +1 -1
  343. package/src/modules/unknown-tool.ts +16 -0
  344. package/src/modules/workspace/disk-agreement.ts +97 -8
  345. package/src/modules/workspace/effects.ts +291 -36
  346. package/src/modules/workspace/index.ts +1469 -321
  347. package/src/modules/workspace/observe.ts +784 -41
  348. package/src/modules/workspace/reconcile.ts +619 -64
  349. package/src/modules/workspace/types.ts +28 -5
  350. package/src/modules/workspace/watcher.ts +154 -30
  351. package/src/prose-drafts.ts +481 -0
  352. package/src/prose-segments.ts +51 -8
  353. package/src/recovery/offline-branch.ts +4 -1
  354. package/src/safe-slice.ts +9 -1
  355. package/src/silent-heartbeat.ts +184 -59
  356. package/src/tool-args.ts +213 -0
  357. package/src/tool-image-ledger.ts +153 -34
  358. package/src/tool-presentation.ts +233 -42
  359. package/src/tool-result-guard.ts +7 -8
  360. package/src/tool-result-history.ts +124 -20
  361. package/src/tune-out/coordinator.ts +259 -65
  362. package/src/types/agent.ts +44 -24
  363. package/src/types/events.ts +25 -0
  364. package/src/types/framework.ts +38 -7
  365. package/src/types/inference-log.ts +1 -1
  366. package/src/types/module.ts +79 -14
  367. package/src/types/trace.ts +103 -8
  368. package/src/usage/usage-tracker.ts +32 -8
  369. package/dist/test/activation-request-sanitize.test.d.ts +0 -2
  370. package/dist/test/activation-request-sanitize.test.d.ts.map +0 -1
  371. package/dist/test/activation-request-sanitize.test.js +0 -89
  372. package/dist/test/activation-request-sanitize.test.js.map +0 -1
  373. package/dist/test/agent-cache-ttl.test.d.ts +0 -2
  374. package/dist/test/agent-cache-ttl.test.d.ts.map +0 -1
  375. package/dist/test/agent-cache-ttl.test.js +0 -41
  376. package/dist/test/agent-cache-ttl.test.js.map +0 -1
  377. package/dist/test/agent-runtime-settings.test.d.ts +0 -2
  378. package/dist/test/agent-runtime-settings.test.d.ts.map +0 -1
  379. package/dist/test/agent-runtime-settings.test.js +0 -1598
  380. package/dist/test/agent-runtime-settings.test.js.map +0 -1
  381. package/dist/test/api-admin-gate.test.d.ts +0 -2
  382. package/dist/test/api-admin-gate.test.d.ts.map +0 -1
  383. package/dist/test/api-admin-gate.test.js +0 -116
  384. package/dist/test/api-admin-gate.test.js.map +0 -1
  385. package/dist/test/assistant-persist-refusal.test.d.ts +0 -2
  386. package/dist/test/assistant-persist-refusal.test.d.ts.map +0 -1
  387. package/dist/test/assistant-persist-refusal.test.js +0 -63
  388. package/dist/test/assistant-persist-refusal.test.js.map +0 -1
  389. package/dist/test/batched-wake-locus.test.d.ts +0 -2
  390. package/dist/test/batched-wake-locus.test.d.ts.map +0 -1
  391. package/dist/test/batched-wake-locus.test.js +0 -166
  392. package/dist/test/batched-wake-locus.test.js.map +0 -1
  393. package/dist/test/busy-agent-scheduler.test.d.ts +0 -2
  394. package/dist/test/busy-agent-scheduler.test.d.ts.map +0 -1
  395. package/dist/test/busy-agent-scheduler.test.js +0 -92
  396. package/dist/test/busy-agent-scheduler.test.js.map +0 -1
  397. package/dist/test/channel-incoming-targeting.test.d.ts +0 -2
  398. package/dist/test/channel-incoming-targeting.test.d.ts.map +0 -1
  399. package/dist/test/channel-incoming-targeting.test.js +0 -81
  400. package/dist/test/channel-incoming-targeting.test.js.map +0 -1
  401. package/dist/test/channel-label-history.test.d.ts +0 -2
  402. package/dist/test/channel-label-history.test.d.ts.map +0 -1
  403. package/dist/test/channel-label-history.test.js +0 -424
  404. package/dist/test/channel-label-history.test.js.map +0 -1
  405. package/dist/test/channel-lifecycle-provenance.test.d.ts +0 -2
  406. package/dist/test/channel-lifecycle-provenance.test.d.ts.map +0 -1
  407. package/dist/test/channel-lifecycle-provenance.test.js +0 -47
  408. package/dist/test/channel-lifecycle-provenance.test.js.map +0 -1
  409. package/dist/test/channel-registry-routing.test.d.ts +0 -2
  410. package/dist/test/channel-registry-routing.test.d.ts.map +0 -1
  411. package/dist/test/channel-registry-routing.test.js +0 -446
  412. package/dist/test/channel-registry-routing.test.js.map +0 -1
  413. package/dist/test/channel-registry-typing.test.d.ts +0 -2
  414. package/dist/test/channel-registry-typing.test.d.ts.map +0 -1
  415. package/dist/test/channel-registry-typing.test.js +0 -91
  416. package/dist/test/channel-registry-typing.test.js.map +0 -1
  417. package/dist/test/channels-changed-respond-first.test.d.ts +0 -2
  418. package/dist/test/channels-changed-respond-first.test.d.ts.map +0 -1
  419. package/dist/test/channels-changed-respond-first.test.js +0 -74
  420. package/dist/test/channels-changed-respond-first.test.js.map +0 -1
  421. package/dist/test/checkpoint-attribution.test.d.ts +0 -2
  422. package/dist/test/checkpoint-attribution.test.d.ts.map +0 -1
  423. package/dist/test/checkpoint-attribution.test.js +0 -200
  424. package/dist/test/checkpoint-attribution.test.js.map +0 -1
  425. package/dist/test/code-execution.test.d.ts +0 -11
  426. package/dist/test/code-execution.test.d.ts.map +0 -1
  427. package/dist/test/code-execution.test.js +0 -1272
  428. package/dist/test/code-execution.test.js.map +0 -1
  429. package/dist/test/component-defaults.test.d.ts +0 -2
  430. package/dist/test/component-defaults.test.d.ts.map +0 -1
  431. package/dist/test/component-defaults.test.js +0 -54
  432. package/dist/test/component-defaults.test.js.map +0 -1
  433. package/dist/test/conversation-fork-injection-scoping.test.d.ts +0 -2
  434. package/dist/test/conversation-fork-injection-scoping.test.d.ts.map +0 -1
  435. package/dist/test/conversation-fork-injection-scoping.test.js +0 -200
  436. package/dist/test/conversation-fork-injection-scoping.test.js.map +0 -1
  437. package/dist/test/conversation-router.test.d.ts +0 -2
  438. package/dist/test/conversation-router.test.d.ts.map +0 -1
  439. package/dist/test/conversation-router.test.js +0 -174
  440. package/dist/test/conversation-router.test.js.map +0 -1
  441. package/dist/test/conversation-routing.test.d.ts +0 -7
  442. package/dist/test/conversation-routing.test.d.ts.map +0 -1
  443. package/dist/test/conversation-routing.test.js +0 -621
  444. package/dist/test/conversation-routing.test.js.map +0 -1
  445. package/dist/test/deferred-wake-integrity.test.d.ts +0 -29
  446. package/dist/test/deferred-wake-integrity.test.d.ts.map +0 -1
  447. package/dist/test/deferred-wake-integrity.test.js +0 -320
  448. package/dist/test/deferred-wake-integrity.test.js.map +0 -1
  449. package/dist/test/discord-awareness-outbox.test.d.ts +0 -2
  450. package/dist/test/discord-awareness-outbox.test.d.ts.map +0 -1
  451. package/dist/test/discord-awareness-outbox.test.js +0 -371
  452. package/dist/test/discord-awareness-outbox.test.js.map +0 -1
  453. package/dist/test/discord-history-delete-window.test.d.ts +0 -2
  454. package/dist/test/discord-history-delete-window.test.d.ts.map +0 -1
  455. package/dist/test/discord-history-delete-window.test.js +0 -81
  456. package/dist/test/discord-history-delete-window.test.js.map +0 -1
  457. package/dist/test/discord-history-sync.test.d.ts +0 -2
  458. package/dist/test/discord-history-sync.test.d.ts.map +0 -1
  459. package/dist/test/discord-history-sync.test.js +0 -56
  460. package/dist/test/discord-history-sync.test.js.map +0 -1
  461. package/dist/test/discord-typing-keepalive.test.d.ts +0 -2
  462. package/dist/test/discord-typing-keepalive.test.d.ts.map +0 -1
  463. package/dist/test/discord-typing-keepalive.test.js +0 -77
  464. package/dist/test/discord-typing-keepalive.test.js.map +0 -1
  465. package/dist/test/ephemeral-settle.test.d.ts +0 -2
  466. package/dist/test/ephemeral-settle.test.d.ts.map +0 -1
  467. package/dist/test/ephemeral-settle.test.js +0 -354
  468. package/dist/test/ephemeral-settle.test.js.map +0 -1
  469. package/dist/test/event-gate-passthrough.test.d.ts +0 -15
  470. package/dist/test/event-gate-passthrough.test.d.ts.map +0 -1
  471. package/dist/test/event-gate-passthrough.test.js +0 -289
  472. package/dist/test/event-gate-passthrough.test.js.map +0 -1
  473. package/dist/test/event-gate-policy-mutation.test.d.ts +0 -2
  474. package/dist/test/event-gate-policy-mutation.test.d.ts.map +0 -1
  475. package/dist/test/event-gate-policy-mutation.test.js +0 -137
  476. package/dist/test/event-gate-policy-mutation.test.js.map +0 -1
  477. package/dist/test/event-gate-rate-limit.test.d.ts +0 -2
  478. package/dist/test/event-gate-rate-limit.test.d.ts.map +0 -1
  479. package/dist/test/event-gate-rate-limit.test.js +0 -627
  480. package/dist/test/event-gate-rate-limit.test.js.map +0 -1
  481. package/dist/test/event-gate-script.test.d.ts +0 -2
  482. package/dist/test/event-gate-script.test.d.ts.map +0 -1
  483. package/dist/test/event-gate-script.test.js +0 -95
  484. package/dist/test/event-gate-script.test.js.map +0 -1
  485. package/dist/test/event-gate-selfwake.test.d.ts +0 -15
  486. package/dist/test/event-gate-selfwake.test.d.ts.map +0 -1
  487. package/dist/test/event-gate-selfwake.test.js +0 -125
  488. package/dist/test/event-gate-selfwake.test.js.map +0 -1
  489. package/dist/test/event-gate-tags.test.d.ts +0 -2
  490. package/dist/test/event-gate-tags.test.d.ts.map +0 -1
  491. package/dist/test/event-gate-tags.test.js +0 -76
  492. package/dist/test/event-gate-tags.test.js.map +0 -1
  493. package/dist/test/event-gate.test.d.ts +0 -2
  494. package/dist/test/event-gate.test.d.ts.map +0 -1
  495. package/dist/test/event-gate.test.js +0 -919
  496. package/dist/test/event-gate.test.js.map +0 -1
  497. package/dist/test/explicit-prose-routing.test.d.ts +0 -11
  498. package/dist/test/explicit-prose-routing.test.d.ts.map +0 -1
  499. package/dist/test/explicit-prose-routing.test.js +0 -1715
  500. package/dist/test/explicit-prose-routing.test.js.map +0 -1
  501. package/dist/test/framework.test.d.ts +0 -5
  502. package/dist/test/framework.test.d.ts.map +0 -1
  503. package/dist/test/framework.test.js +0 -1048
  504. package/dist/test/framework.test.js.map +0 -1
  505. package/dist/test/gather-context-timeout.test.d.ts +0 -2
  506. package/dist/test/gather-context-timeout.test.d.ts.map +0 -1
  507. package/dist/test/gather-context-timeout.test.js +0 -120
  508. package/dist/test/gather-context-timeout.test.js.map +0 -1
  509. package/dist/test/health-snapshot.test.d.ts +0 -2
  510. package/dist/test/health-snapshot.test.d.ts.map +0 -1
  511. package/dist/test/health-snapshot.test.js +0 -74
  512. package/dist/test/health-snapshot.test.js.map +0 -1
  513. package/dist/test/helpers/coalescing-fixture.d.ts +0 -74
  514. package/dist/test/helpers/coalescing-fixture.d.ts.map +0 -1
  515. package/dist/test/helpers/coalescing-fixture.js +0 -152
  516. package/dist/test/helpers/coalescing-fixture.js.map +0 -1
  517. package/dist/test/helpers/coalescing-kill-child.d.ts +0 -2
  518. package/dist/test/helpers/coalescing-kill-child.d.ts.map +0 -1
  519. package/dist/test/helpers/coalescing-kill-child.js +0 -24
  520. package/dist/test/helpers/coalescing-kill-child.js.map +0 -1
  521. package/dist/test/helpers/mock-membrane.d.ts +0 -53
  522. package/dist/test/helpers/mock-membrane.d.ts.map +0 -1
  523. package/dist/test/helpers/mock-membrane.js +0 -168
  524. package/dist/test/helpers/mock-membrane.js.map +0 -1
  525. package/dist/test/helpers/pytc-stop-rows.d.ts +0 -11
  526. package/dist/test/helpers/pytc-stop-rows.d.ts.map +0 -1
  527. package/dist/test/helpers/pytc-stop-rows.js +0 -143
  528. package/dist/test/helpers/pytc-stop-rows.js.map +0 -1
  529. package/dist/test/helpers/quiesce-crash-child.d.ts +0 -2
  530. package/dist/test/helpers/quiesce-crash-child.d.ts.map +0 -1
  531. package/dist/test/helpers/quiesce-crash-child.js +0 -156
  532. package/dist/test/helpers/quiesce-crash-child.js.map +0 -1
  533. package/dist/test/hide-then-turn.test.d.ts +0 -2
  534. package/dist/test/hide-then-turn.test.d.ts.map +0 -1
  535. package/dist/test/hide-then-turn.test.js +0 -101
  536. package/dist/test/hide-then-turn.test.js.map +0 -1
  537. package/dist/test/history-module-overview.test.d.ts +0 -2
  538. package/dist/test/history-module-overview.test.d.ts.map +0 -1
  539. package/dist/test/history-module-overview.test.js +0 -711
  540. package/dist/test/history-module-overview.test.js.map +0 -1
  541. package/dist/test/history-module-realstore.test.d.ts +0 -2
  542. package/dist/test/history-module-realstore.test.d.ts.map +0 -1
  543. package/dist/test/history-module-realstore.test.js +0 -363
  544. package/dist/test/history-module-realstore.test.js.map +0 -1
  545. package/dist/test/history-module-semantic.test.d.ts +0 -2
  546. package/dist/test/history-module-semantic.test.d.ts.map +0 -1
  547. package/dist/test/history-module-semantic.test.js +0 -213
  548. package/dist/test/history-module-semantic.test.js.map +0 -1
  549. package/dist/test/history-module-ux.test.d.ts +0 -2
  550. package/dist/test/history-module-ux.test.d.ts.map +0 -1
  551. package/dist/test/history-module-ux.test.js +0 -304
  552. package/dist/test/history-module-ux.test.js.map +0 -1
  553. package/dist/test/history-module.test.d.ts +0 -2
  554. package/dist/test/history-module.test.d.ts.map +0 -1
  555. package/dist/test/history-module.test.js +0 -619
  556. package/dist/test/history-module.test.js.map +0 -1
  557. package/dist/test/history-semantic-review-findings.test.d.ts +0 -2
  558. package/dist/test/history-semantic-review-findings.test.d.ts.map +0 -1
  559. package/dist/test/history-semantic-review-findings.test.js +0 -338
  560. package/dist/test/history-semantic-review-findings.test.js.map +0 -1
  561. package/dist/test/history-semantic-sync-converges.test.d.ts +0 -2
  562. package/dist/test/history-semantic-sync-converges.test.d.ts.map +0 -1
  563. package/dist/test/history-semantic-sync-converges.test.js +0 -109
  564. package/dist/test/history-semantic-sync-converges.test.js.map +0 -1
  565. package/dist/test/host-quiesce.test.d.ts +0 -2
  566. package/dist/test/host-quiesce.test.d.ts.map +0 -1
  567. package/dist/test/host-quiesce.test.js +0 -988
  568. package/dist/test/host-quiesce.test.js.map +0 -1
  569. package/dist/test/inference-exhaustion-rewind.test.d.ts +0 -2
  570. package/dist/test/inference-exhaustion-rewind.test.d.ts.map +0 -1
  571. package/dist/test/inference-exhaustion-rewind.test.js +0 -387
  572. package/dist/test/inference-exhaustion-rewind.test.js.map +0 -1
  573. package/dist/test/inference-failure-bounds.test.d.ts +0 -2
  574. package/dist/test/inference-failure-bounds.test.d.ts.map +0 -1
  575. package/dist/test/inference-failure-bounds.test.js +0 -1202
  576. package/dist/test/inference-failure-bounds.test.js.map +0 -1
  577. package/dist/test/inference-failure-observability.test.d.ts +0 -2
  578. package/dist/test/inference-failure-observability.test.d.ts.map +0 -1
  579. package/dist/test/inference-failure-observability.test.js +0 -84
  580. package/dist/test/inference-failure-observability.test.js.map +0 -1
  581. package/dist/test/journal-tool.test.d.ts +0 -2
  582. package/dist/test/journal-tool.test.d.ts.map +0 -1
  583. package/dist/test/journal-tool.test.js +0 -33
  584. package/dist/test/journal-tool.test.js.map +0 -1
  585. package/dist/test/kv-unified-open-flight-retry.test.d.ts +0 -2
  586. package/dist/test/kv-unified-open-flight-retry.test.d.ts.map +0 -1
  587. package/dist/test/kv-unified-open-flight-retry.test.js +0 -189
  588. package/dist/test/kv-unified-open-flight-retry.test.js.map +0 -1
  589. package/dist/test/kv-unified-wiring.test.d.ts +0 -2
  590. package/dist/test/kv-unified-wiring.test.d.ts.map +0 -1
  591. package/dist/test/kv-unified-wiring.test.js +0 -95
  592. package/dist/test/kv-unified-wiring.test.js.map +0 -1
  593. package/dist/test/late-events-after-stop.test.d.ts +0 -2
  594. package/dist/test/late-events-after-stop.test.d.ts.map +0 -1
  595. package/dist/test/late-events-after-stop.test.js +0 -122
  596. package/dist/test/late-events-after-stop.test.js.map +0 -1
  597. package/dist/test/liveness-watchdog.test.d.ts +0 -2
  598. package/dist/test/liveness-watchdog.test.d.ts.map +0 -1
  599. package/dist/test/liveness-watchdog.test.js +0 -94
  600. package/dist/test/liveness-watchdog.test.js.map +0 -1
  601. package/dist/test/machine-close-provenance.test.d.ts +0 -2
  602. package/dist/test/machine-close-provenance.test.d.ts.map +0 -1
  603. package/dist/test/machine-close-provenance.test.js +0 -116
  604. package/dist/test/machine-close-provenance.test.js.map +0 -1
  605. package/dist/test/maintenance-timer.test.d.ts +0 -2
  606. package/dist/test/maintenance-timer.test.d.ts.map +0 -1
  607. package/dist/test/maintenance-timer.test.js +0 -1827
  608. package/dist/test/maintenance-timer.test.js.map +0 -1
  609. package/dist/test/mcp-server-bin.test.d.ts +0 -2
  610. package/dist/test/mcp-server-bin.test.d.ts.map +0 -1
  611. package/dist/test/mcp-server-bin.test.js +0 -142
  612. package/dist/test/mcp-server-bin.test.js.map +0 -1
  613. package/dist/test/mcpl-access-provider.test.d.ts +0 -2
  614. package/dist/test/mcpl-access-provider.test.d.ts.map +0 -1
  615. package/dist/test/mcpl-access-provider.test.js +0 -20
  616. package/dist/test/mcpl-access-provider.test.js.map +0 -1
  617. package/dist/test/mcpl-awareness-barrier.test.d.ts +0 -2
  618. package/dist/test/mcpl-awareness-barrier.test.d.ts.map +0 -1
  619. package/dist/test/mcpl-awareness-barrier.test.js +0 -769
  620. package/dist/test/mcpl-awareness-barrier.test.js.map +0 -1
  621. package/dist/test/mcpl-capability-grant.test.d.ts +0 -10
  622. package/dist/test/mcpl-capability-grant.test.d.ts.map +0 -1
  623. package/dist/test/mcpl-capability-grant.test.js +0 -111
  624. package/dist/test/mcpl-capability-grant.test.js.map +0 -1
  625. package/dist/test/mcpl-capability-scoping.test.d.ts +0 -2
  626. package/dist/test/mcpl-capability-scoping.test.d.ts.map +0 -1
  627. package/dist/test/mcpl-capability-scoping.test.js +0 -266
  628. package/dist/test/mcpl-capability-scoping.test.js.map +0 -1
  629. package/dist/test/mcpl-child-env.test.d.ts +0 -2
  630. package/dist/test/mcpl-child-env.test.d.ts.map +0 -1
  631. package/dist/test/mcpl-child-env.test.js +0 -158
  632. package/dist/test/mcpl-child-env.test.js.map +0 -1
  633. package/dist/test/mcpl-coalesced-content-parity.test.d.ts +0 -2
  634. package/dist/test/mcpl-coalesced-content-parity.test.d.ts.map +0 -1
  635. package/dist/test/mcpl-coalesced-content-parity.test.js +0 -532
  636. package/dist/test/mcpl-coalesced-content-parity.test.js.map +0 -1
  637. package/dist/test/mcpl-coalescing.test.d.ts +0 -2
  638. package/dist/test/mcpl-coalescing.test.d.ts.map +0 -1
  639. package/dist/test/mcpl-coalescing.test.js +0 -1125
  640. package/dist/test/mcpl-coalescing.test.js.map +0 -1
  641. package/dist/test/mcpl-config-diagnostics.test.d.ts +0 -2
  642. package/dist/test/mcpl-config-diagnostics.test.d.ts.map +0 -1
  643. package/dist/test/mcpl-config-diagnostics.test.js +0 -452
  644. package/dist/test/mcpl-config-diagnostics.test.js.map +0 -1
  645. package/dist/test/mcpl-empty-content.test.d.ts +0 -2
  646. package/dist/test/mcpl-empty-content.test.d.ts.map +0 -1
  647. package/dist/test/mcpl-empty-content.test.js +0 -368
  648. package/dist/test/mcpl-empty-content.test.js.map +0 -1
  649. package/dist/test/mcpl-gate-roundtrip.test.d.ts +0 -2
  650. package/dist/test/mcpl-gate-roundtrip.test.d.ts.map +0 -1
  651. package/dist/test/mcpl-gate-roundtrip.test.js +0 -285
  652. package/dist/test/mcpl-gate-roundtrip.test.js.map +0 -1
  653. package/dist/test/mcpl-list-status.test.d.ts +0 -2
  654. package/dist/test/mcpl-list-status.test.d.ts.map +0 -1
  655. package/dist/test/mcpl-list-status.test.js +0 -82
  656. package/dist/test/mcpl-list-status.test.js.map +0 -1
  657. package/dist/test/mcpl-manifest-changed.test.d.ts +0 -2
  658. package/dist/test/mcpl-manifest-changed.test.d.ts.map +0 -1
  659. package/dist/test/mcpl-manifest-changed.test.js +0 -178
  660. package/dist/test/mcpl-manifest-changed.test.js.map +0 -1
  661. package/dist/test/mcpl-push-convert.test.d.ts +0 -2
  662. package/dist/test/mcpl-push-convert.test.d.ts.map +0 -1
  663. package/dist/test/mcpl-push-convert.test.js +0 -42
  664. package/dist/test/mcpl-push-convert.test.js.map +0 -1
  665. package/dist/test/mcpl-reconnect-events.test.d.ts +0 -2
  666. package/dist/test/mcpl-reconnect-events.test.d.ts.map +0 -1
  667. package/dist/test/mcpl-reconnect-events.test.js +0 -144
  668. package/dist/test/mcpl-reconnect-events.test.js.map +0 -1
  669. package/dist/test/mcpl-reconnect-reregistration.test.d.ts +0 -2
  670. package/dist/test/mcpl-reconnect-reregistration.test.d.ts.map +0 -1
  671. package/dist/test/mcpl-reconnect-reregistration.test.js +0 -238
  672. package/dist/test/mcpl-reconnect-reregistration.test.js.map +0 -1
  673. package/dist/test/mcpl-reference-fetcher.test.d.ts +0 -2
  674. package/dist/test/mcpl-reference-fetcher.test.d.ts.map +0 -1
  675. package/dist/test/mcpl-reference-fetcher.test.js +0 -427
  676. package/dist/test/mcpl-reference-fetcher.test.js.map +0 -1
  677. package/dist/test/mcpl-reference-fields.test.d.ts +0 -2
  678. package/dist/test/mcpl-reference-fields.test.d.ts.map +0 -1
  679. package/dist/test/mcpl-reference-fields.test.js +0 -149
  680. package/dist/test/mcpl-reference-fields.test.js.map +0 -1
  681. package/dist/test/mcpl-rejection-log-lines.test.d.ts +0 -2
  682. package/dist/test/mcpl-rejection-log-lines.test.d.ts.map +0 -1
  683. package/dist/test/mcpl-rejection-log-lines.test.js +0 -349
  684. package/dist/test/mcpl-rejection-log-lines.test.js.map +0 -1
  685. package/dist/test/mcpl-request-timeout.test.d.ts +0 -2
  686. package/dist/test/mcpl-request-timeout.test.d.ts.map +0 -1
  687. package/dist/test/mcpl-request-timeout.test.js +0 -138
  688. package/dist/test/mcpl-request-timeout.test.js.map +0 -1
  689. package/dist/test/mcpl-runtime-lifecycle.test.d.ts +0 -7
  690. package/dist/test/mcpl-runtime-lifecycle.test.d.ts.map +0 -1
  691. package/dist/test/mcpl-runtime-lifecycle.test.js +0 -142
  692. package/dist/test/mcpl-runtime-lifecycle.test.js.map +0 -1
  693. package/dist/test/mcpl-stderr-tail.test.d.ts +0 -2
  694. package/dist/test/mcpl-stderr-tail.test.d.ts.map +0 -1
  695. package/dist/test/mcpl-stderr-tail.test.js +0 -210
  696. package/dist/test/mcpl-stderr-tail.test.js.map +0 -1
  697. package/dist/test/mcpl-tool-class-listing.test.d.ts +0 -2
  698. package/dist/test/mcpl-tool-class-listing.test.d.ts.map +0 -1
  699. package/dist/test/mcpl-tool-class-listing.test.js +0 -147
  700. package/dist/test/mcpl-tool-class-listing.test.js.map +0 -1
  701. package/dist/test/mcpl-tool-classes.test.d.ts +0 -7
  702. package/dist/test/mcpl-tool-classes.test.d.ts.map +0 -1
  703. package/dist/test/mcpl-tool-classes.test.js +0 -80
  704. package/dist/test/mcpl-tool-classes.test.js.map +0 -1
  705. package/dist/test/mcpl-tool-lifecycle-e2e.test.d.ts +0 -2
  706. package/dist/test/mcpl-tool-lifecycle-e2e.test.d.ts.map +0 -1
  707. package/dist/test/mcpl-tool-lifecycle-e2e.test.js +0 -237
  708. package/dist/test/mcpl-tool-lifecycle-e2e.test.js.map +0 -1
  709. package/dist/test/mcpl-tool-lifecycle-emitter.test.d.ts +0 -11
  710. package/dist/test/mcpl-tool-lifecycle-emitter.test.d.ts.map +0 -1
  711. package/dist/test/mcpl-tool-lifecycle-emitter.test.js +0 -412
  712. package/dist/test/mcpl-tool-lifecycle-emitter.test.js.map +0 -1
  713. package/dist/test/mcpl-tool-lifecycle-script.test.d.ts +0 -2
  714. package/dist/test/mcpl-tool-lifecycle-script.test.d.ts.map +0 -1
  715. package/dist/test/mcpl-tool-lifecycle-script.test.js +0 -288
  716. package/dist/test/mcpl-tool-lifecycle-script.test.js.map +0 -1
  717. package/dist/test/mcpl-tool-lifecycle.test.d.ts +0 -11
  718. package/dist/test/mcpl-tool-lifecycle.test.d.ts.map +0 -1
  719. package/dist/test/mcpl-tool-lifecycle.test.js +0 -270
  720. package/dist/test/mcpl-tool-lifecycle.test.js.map +0 -1
  721. package/dist/test/mcpl-transport-close.test.d.ts +0 -2
  722. package/dist/test/mcpl-transport-close.test.d.ts.map +0 -1
  723. package/dist/test/mcpl-transport-close.test.js +0 -373
  724. package/dist/test/mcpl-transport-close.test.js.map +0 -1
  725. package/dist/test/mcpl-transport-spawn.test.d.ts +0 -2
  726. package/dist/test/mcpl-transport-spawn.test.d.ts.map +0 -1
  727. package/dist/test/mcpl-transport-spawn.test.js +0 -58
  728. package/dist/test/mcpl-transport-spawn.test.js.map +0 -1
  729. package/dist/test/mcpl-ws-transport.test.d.ts +0 -2
  730. package/dist/test/mcpl-ws-transport.test.d.ts.map +0 -1
  731. package/dist/test/mcpl-ws-transport.test.js +0 -259
  732. package/dist/test/mcpl-ws-transport.test.js.map +0 -1
  733. package/dist/test/module-context-integration.test.d.ts +0 -18
  734. package/dist/test/module-context-integration.test.d.ts.map +0 -1
  735. package/dist/test/module-context-integration.test.js +0 -181
  736. package/dist/test/module-context-integration.test.js.map +0 -1
  737. package/dist/test/offline-recovery-branch.test.d.ts +0 -2
  738. package/dist/test/offline-recovery-branch.test.d.ts.map +0 -1
  739. package/dist/test/offline-recovery-branch.test.js +0 -570
  740. package/dist/test/offline-recovery-branch.test.js.map +0 -1
  741. package/dist/test/operator-surgery.test.d.ts +0 -2
  742. package/dist/test/operator-surgery.test.d.ts.map +0 -1
  743. package/dist/test/operator-surgery.test.js +0 -595
  744. package/dist/test/operator-surgery.test.js.map +0 -1
  745. package/dist/test/ops-alert.test.d.ts +0 -2
  746. package/dist/test/ops-alert.test.d.ts.map +0 -1
  747. package/dist/test/ops-alert.test.js +0 -153
  748. package/dist/test/ops-alert.test.js.map +0 -1
  749. package/dist/test/overbudget-drain-breaker.test.d.ts +0 -2
  750. package/dist/test/overbudget-drain-breaker.test.d.ts.map +0 -1
  751. package/dist/test/overbudget-drain-breaker.test.js +0 -198
  752. package/dist/test/overbudget-drain-breaker.test.js.map +0 -1
  753. package/dist/test/pack-installs-alone.test.d.ts +0 -2
  754. package/dist/test/pack-installs-alone.test.d.ts.map +0 -1
  755. package/dist/test/pack-installs-alone.test.js +0 -284
  756. package/dist/test/pack-installs-alone.test.js.map +0 -1
  757. package/dist/test/per-agent-delivery.test.d.ts +0 -2
  758. package/dist/test/per-agent-delivery.test.d.ts.map +0 -1
  759. package/dist/test/per-agent-delivery.test.js +0 -108
  760. package/dist/test/per-agent-delivery.test.js.map +0 -1
  761. package/dist/test/physical-window-restart.test.d.ts +0 -16
  762. package/dist/test/physical-window-restart.test.d.ts.map +0 -1
  763. package/dist/test/physical-window-restart.test.js +0 -487
  764. package/dist/test/physical-window-restart.test.js.map +0 -1
  765. package/dist/test/placed-reaction-baseline.test.d.ts +0 -2
  766. package/dist/test/placed-reaction-baseline.test.d.ts.map +0 -1
  767. package/dist/test/placed-reaction-baseline.test.js +0 -312
  768. package/dist/test/placed-reaction-baseline.test.js.map +0 -1
  769. package/dist/test/present-while-acting.test.d.ts +0 -19
  770. package/dist/test/present-while-acting.test.d.ts.map +0 -1
  771. package/dist/test/present-while-acting.test.js +0 -1649
  772. package/dist/test/present-while-acting.test.js.map +0 -1
  773. package/dist/test/prose-segments.test.d.ts +0 -2
  774. package/dist/test/prose-segments.test.d.ts.map +0 -1
  775. package/dist/test/prose-segments.test.js +0 -52
  776. package/dist/test/prose-segments.test.js.map +0 -1
  777. package/dist/test/prose-stream-router.test.d.ts +0 -2
  778. package/dist/test/prose-stream-router.test.d.ts.map +0 -1
  779. package/dist/test/prose-stream-router.test.js +0 -171
  780. package/dist/test/prose-stream-router.test.js.map +0 -1
  781. package/dist/test/provider-acceleration-cooldown.test.d.ts +0 -2
  782. package/dist/test/provider-acceleration-cooldown.test.d.ts.map +0 -1
  783. package/dist/test/provider-acceleration-cooldown.test.js +0 -435
  784. package/dist/test/provider-acceleration-cooldown.test.js.map +0 -1
  785. package/dist/test/provider-waits.test.d.ts +0 -2
  786. package/dist/test/provider-waits.test.d.ts.map +0 -1
  787. package/dist/test/provider-waits.test.js +0 -2259
  788. package/dist/test/provider-waits.test.js.map +0 -1
  789. package/dist/test/puppet-tool-call.test.d.ts +0 -2
  790. package/dist/test/puppet-tool-call.test.d.ts.map +0 -1
  791. package/dist/test/puppet-tool-call.test.js +0 -226
  792. package/dist/test/puppet-tool-call.test.js.map +0 -1
  793. package/dist/test/puppet-turn-reservation.test.d.ts +0 -2
  794. package/dist/test/puppet-turn-reservation.test.d.ts.map +0 -1
  795. package/dist/test/puppet-turn-reservation.test.js +0 -139
  796. package/dist/test/puppet-turn-reservation.test.js.map +0 -1
  797. package/dist/test/reaction-baseline-platform.test.d.ts +0 -2
  798. package/dist/test/reaction-baseline-platform.test.d.ts.map +0 -1
  799. package/dist/test/reaction-baseline-platform.test.js +0 -124
  800. package/dist/test/reaction-baseline-platform.test.js.map +0 -1
  801. package/dist/test/record-journal.test.d.ts +0 -6
  802. package/dist/test/record-journal.test.d.ts.map +0 -1
  803. package/dist/test/record-journal.test.js +0 -269
  804. package/dist/test/record-journal.test.js.map +0 -1
  805. package/dist/test/refusal-reaction-baseline.test.d.ts +0 -2
  806. package/dist/test/refusal-reaction-baseline.test.d.ts.map +0 -1
  807. package/dist/test/refusal-reaction-baseline.test.js +0 -81
  808. package/dist/test/refusal-reaction-baseline.test.js.map +0 -1
  809. package/dist/test/refusal-rewind.test.d.ts +0 -2
  810. package/dist/test/refusal-rewind.test.d.ts.map +0 -1
  811. package/dist/test/refusal-rewind.test.js +0 -117
  812. package/dist/test/refusal-rewind.test.js.map +0 -1
  813. package/dist/test/refusal-single-call.test.d.ts +0 -2
  814. package/dist/test/refusal-single-call.test.d.ts.map +0 -1
  815. package/dist/test/refusal-single-call.test.js +0 -177
  816. package/dist/test/refusal-single-call.test.js.map +0 -1
  817. package/dist/test/release-bump.test.d.ts +0 -2
  818. package/dist/test/release-bump.test.d.ts.map +0 -1
  819. package/dist/test/release-bump.test.js +0 -248
  820. package/dist/test/release-bump.test.js.map +0 -1
  821. package/dist/test/release-changelog.test.d.ts +0 -2
  822. package/dist/test/release-changelog.test.d.ts.map +0 -1
  823. package/dist/test/release-changelog.test.js +0 -159
  824. package/dist/test/release-changelog.test.js.map +0 -1
  825. package/dist/test/release-holds.test.d.ts +0 -2
  826. package/dist/test/release-holds.test.d.ts.map +0 -1
  827. package/dist/test/release-holds.test.js +0 -456
  828. package/dist/test/release-holds.test.js.map +0 -1
  829. package/dist/test/same-round-think-policy.test.d.ts +0 -2
  830. package/dist/test/same-round-think-policy.test.d.ts.map +0 -1
  831. package/dist/test/same-round-think-policy.test.js +0 -853
  832. package/dist/test/same-round-think-policy.test.js.map +0 -1
  833. package/dist/test/save-recent-image.test.d.ts +0 -26
  834. package/dist/test/save-recent-image.test.d.ts.map +0 -1
  835. package/dist/test/save-recent-image.test.js +0 -974
  836. package/dist/test/save-recent-image.test.js.map +0 -1
  837. package/dist/test/shutdown-errors.test.d.ts +0 -2
  838. package/dist/test/shutdown-errors.test.d.ts.map +0 -1
  839. package/dist/test/shutdown-errors.test.js +0 -662
  840. package/dist/test/shutdown-errors.test.js.map +0 -1
  841. package/dist/test/silent-heartbeat-rows.test.d.ts +0 -2
  842. package/dist/test/silent-heartbeat-rows.test.d.ts.map +0 -1
  843. package/dist/test/silent-heartbeat-rows.test.js +0 -451
  844. package/dist/test/silent-heartbeat-rows.test.js.map +0 -1
  845. package/dist/test/silent-heartbeat.test.d.ts +0 -2
  846. package/dist/test/silent-heartbeat.test.d.ts.map +0 -1
  847. package/dist/test/silent-heartbeat.test.js +0 -165
  848. package/dist/test/silent-heartbeat.test.js.map +0 -1
  849. package/dist/test/state-scaling-e2e.test.d.ts +0 -22
  850. package/dist/test/state-scaling-e2e.test.d.ts.map +0 -1
  851. package/dist/test/state-scaling-e2e.test.js +0 -206
  852. package/dist/test/state-scaling-e2e.test.js.map +0 -1
  853. package/dist/test/state-scaling.test.d.ts +0 -12
  854. package/dist/test/state-scaling.test.d.ts.map +0 -1
  855. package/dist/test/state-scaling.test.js +0 -251
  856. package/dist/test/state-scaling.test.js.map +0 -1
  857. package/dist/test/stop-with-host-operations.test.d.ts +0 -20
  858. package/dist/test/stop-with-host-operations.test.d.ts.map +0 -1
  859. package/dist/test/stop-with-host-operations.test.js +0 -1174
  860. package/dist/test/stop-with-host-operations.test.js.map +0 -1
  861. package/dist/test/stop-with-work-in-flight.test.d.ts +0 -23
  862. package/dist/test/stop-with-work-in-flight.test.d.ts.map +0 -1
  863. package/dist/test/stop-with-work-in-flight.test.js +0 -784
  864. package/dist/test/stop-with-work-in-flight.test.js.map +0 -1
  865. package/dist/test/surgery-marks-receipt.test.d.ts +0 -2
  866. package/dist/test/surgery-marks-receipt.test.d.ts.map +0 -1
  867. package/dist/test/surgery-marks-receipt.test.js +0 -540
  868. package/dist/test/surgery-marks-receipt.test.js.map +0 -1
  869. package/dist/test/thinking-token-stamp.test.d.ts +0 -12
  870. package/dist/test/thinking-token-stamp.test.d.ts.map +0 -1
  871. package/dist/test/thinking-token-stamp.test.js +0 -129
  872. package/dist/test/thinking-token-stamp.test.js.map +0 -1
  873. package/dist/test/timezone.test.d.ts +0 -2
  874. package/dist/test/timezone.test.d.ts.map +0 -1
  875. package/dist/test/timezone.test.js +0 -18
  876. package/dist/test/timezone.test.js.map +0 -1
  877. package/dist/test/tool-batch-hook.test.d.ts +0 -8
  878. package/dist/test/tool-batch-hook.test.d.ts.map +0 -1
  879. package/dist/test/tool-batch-hook.test.js +0 -275
  880. package/dist/test/tool-batch-hook.test.js.map +0 -1
  881. package/dist/test/tool-policy.test.d.ts +0 -2
  882. package/dist/test/tool-policy.test.d.ts.map +0 -1
  883. package/dist/test/tool-policy.test.js +0 -51
  884. package/dist/test/tool-policy.test.js.map +0 -1
  885. package/dist/test/tool-presentation.test.d.ts +0 -2
  886. package/dist/test/tool-presentation.test.d.ts.map +0 -1
  887. package/dist/test/tool-presentation.test.js +0 -268
  888. package/dist/test/tool-presentation.test.js.map +0 -1
  889. package/dist/test/tool-result-content.test.d.ts +0 -2
  890. package/dist/test/tool-result-content.test.d.ts.map +0 -1
  891. package/dist/test/tool-result-content.test.js +0 -37
  892. package/dist/test/tool-result-content.test.js.map +0 -1
  893. package/dist/test/tool-result-guard.test.d.ts +0 -2
  894. package/dist/test/tool-result-guard.test.d.ts.map +0 -1
  895. package/dist/test/tool-result-guard.test.js +0 -3729
  896. package/dist/test/tool-result-guard.test.js.map +0 -1
  897. package/dist/test/tool-result-history.test.d.ts +0 -7
  898. package/dist/test/tool-result-history.test.d.ts.map +0 -1
  899. package/dist/test/tool-result-history.test.js +0 -156
  900. package/dist/test/tool-result-history.test.js.map +0 -1
  901. package/dist/test/tool-result-spill.test.d.ts +0 -13
  902. package/dist/test/tool-result-spill.test.d.ts.map +0 -1
  903. package/dist/test/tool-result-spill.test.js +0 -586
  904. package/dist/test/tool-result-spill.test.js.map +0 -1
  905. package/dist/test/tool-wrapper-prose-guard-integration.test.d.ts +0 -2
  906. package/dist/test/tool-wrapper-prose-guard-integration.test.d.ts.map +0 -1
  907. package/dist/test/tool-wrapper-prose-guard-integration.test.js +0 -485
  908. package/dist/test/tool-wrapper-prose-guard-integration.test.js.map +0 -1
  909. package/dist/test/tool-wrapper-prose-guard.test.d.ts +0 -2
  910. package/dist/test/tool-wrapper-prose-guard.test.d.ts.map +0 -1
  911. package/dist/test/tool-wrapper-prose-guard.test.js +0 -34
  912. package/dist/test/tool-wrapper-prose-guard.test.js.map +0 -1
  913. package/dist/test/tools-observe-parser-conformance.test.d.ts +0 -2
  914. package/dist/test/tools-observe-parser-conformance.test.d.ts.map +0 -1
  915. package/dist/test/tools-observe-parser-conformance.test.js +0 -129
  916. package/dist/test/tools-observe-parser-conformance.test.js.map +0 -1
  917. package/dist/test/trunk-channel-routing.test.d.ts +0 -19
  918. package/dist/test/trunk-channel-routing.test.d.ts.map +0 -1
  919. package/dist/test/trunk-channel-routing.test.js +0 -652
  920. package/dist/test/trunk-channel-routing.test.js.map +0 -1
  921. package/dist/test/tune-out-e2e.test.d.ts +0 -2
  922. package/dist/test/tune-out-e2e.test.d.ts.map +0 -1
  923. package/dist/test/tune-out-e2e.test.js +0 -142
  924. package/dist/test/tune-out-e2e.test.js.map +0 -1
  925. package/dist/test/tune-out-gate-composition.test.d.ts +0 -2
  926. package/dist/test/tune-out-gate-composition.test.d.ts.map +0 -1
  927. package/dist/test/tune-out-gate-composition.test.js +0 -221
  928. package/dist/test/tune-out-gate-composition.test.js.map +0 -1
  929. package/dist/test/tune-out-lifecycle.test.d.ts +0 -2
  930. package/dist/test/tune-out-lifecycle.test.d.ts.map +0 -1
  931. package/dist/test/tune-out-lifecycle.test.js +0 -121
  932. package/dist/test/tune-out-lifecycle.test.js.map +0 -1
  933. package/dist/test/turn-trigger-provenance.test.d.ts +0 -2
  934. package/dist/test/turn-trigger-provenance.test.d.ts.map +0 -1
  935. package/dist/test/turn-trigger-provenance.test.js +0 -137
  936. package/dist/test/turn-trigger-provenance.test.js.map +0 -1
  937. package/dist/test/unconvertible-tool-result.test.d.ts +0 -2
  938. package/dist/test/unconvertible-tool-result.test.d.ts.map +0 -1
  939. package/dist/test/unconvertible-tool-result.test.js +0 -358
  940. package/dist/test/unconvertible-tool-result.test.js.map +0 -1
  941. package/dist/test/unsent-compiles.test.d.ts +0 -2
  942. package/dist/test/unsent-compiles.test.d.ts.map +0 -1
  943. package/dist/test/unsent-compiles.test.js +0 -139
  944. package/dist/test/unsent-compiles.test.js.map +0 -1
  945. package/dist/test/usage-accounting.test.d.ts +0 -2
  946. package/dist/test/usage-accounting.test.d.ts.map +0 -1
  947. package/dist/test/usage-accounting.test.js +0 -13
  948. package/dist/test/usage-accounting.test.js.map +0 -1
  949. package/dist/test/usage-tracker.test.d.ts +0 -2
  950. package/dist/test/usage-tracker.test.d.ts.map +0 -1
  951. package/dist/test/usage-tracker.test.js +0 -129
  952. package/dist/test/usage-tracker.test.js.map +0 -1
  953. package/dist/test/utils-surface.test.d.ts +0 -2
  954. package/dist/test/utils-surface.test.d.ts.map +0 -1
  955. package/dist/test/utils-surface.test.js +0 -145
  956. package/dist/test/utils-surface.test.js.map +0 -1
  957. package/dist/test/workspace-branch-continuation.test.d.ts +0 -15
  958. package/dist/test/workspace-branch-continuation.test.d.ts.map +0 -1
  959. package/dist/test/workspace-branch-continuation.test.js +0 -183
  960. package/dist/test/workspace-branch-continuation.test.js.map +0 -1
  961. package/dist/test/workspace-materialize-freshness.test.d.ts +0 -16
  962. package/dist/test/workspace-materialize-freshness.test.d.ts.map +0 -1
  963. package/dist/test/workspace-materialize-freshness.test.js +0 -252
  964. package/dist/test/workspace-materialize-freshness.test.js.map +0 -1
  965. package/dist/test/workspace-path-containment.test.d.ts +0 -19
  966. package/dist/test/workspace-path-containment.test.d.ts.map +0 -1
  967. package/dist/test/workspace-path-containment.test.js +0 -91
  968. package/dist/test/workspace-path-containment.test.js.map +0 -1
  969. package/dist/test/workspace-read-file-from-disk.test.d.ts +0 -17
  970. package/dist/test/workspace-read-file-from-disk.test.d.ts.map +0 -1
  971. package/dist/test/workspace-read-file-from-disk.test.js +0 -174
  972. package/dist/test/workspace-read-file-from-disk.test.js.map +0 -1
  973. package/dist/test/workspace-read-image.test.d.ts +0 -2
  974. package/dist/test/workspace-read-image.test.d.ts.map +0 -1
  975. package/dist/test/workspace-read-image.test.js +0 -597
  976. package/dist/test/workspace-read-image.test.js.map +0 -1
  977. package/dist/test/workspace-read-text.test.d.ts +0 -2
  978. package/dist/test/workspace-read-text.test.d.ts.map +0 -1
  979. package/dist/test/workspace-read-text.test.js +0 -101
  980. package/dist/test/workspace-read-text.test.js.map +0 -1
  981. package/dist/test/workspace-restore-order.test.d.ts +0 -16
  982. package/dist/test/workspace-restore-order.test.d.ts.map +0 -1
  983. package/dist/test/workspace-restore-order.test.js +0 -140
  984. package/dist/test/workspace-restore-order.test.js.map +0 -1
  985. package/dist/test/workspace-three-way.test.d.ts +0 -12
  986. package/dist/test/workspace-three-way.test.d.ts.map +0 -1
  987. package/dist/test/workspace-three-way.test.js +0 -4094
  988. package/dist/test/workspace-three-way.test.js.map +0 -1
  989. package/dist/test/workspace-watcher.test.d.ts +0 -2
  990. package/dist/test/workspace-watcher.test.d.ts.map +0 -1
  991. package/dist/test/workspace-watcher.test.js +0 -281
  992. package/dist/test/workspace-watcher.test.js.map +0 -1
  993. package/dist/test/xml-round-persist.test.d.ts +0 -19
  994. package/dist/test/xml-round-persist.test.d.ts.map +0 -1
  995. package/dist/test/xml-round-persist.test.js +0 -235
  996. package/dist/test/xml-round-persist.test.js.map +0 -1
  997. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -1,427 +0,0 @@
1
- /**
2
- * RFC-005 fetcher vectors (§11: 4, 5, 10, 11, 12 + origin/expiry/budget)
3
- * against a live local HTTP server.
4
- *
5
- * Run: node --import tsx --test test/mcpl-reference-fetcher.test.ts
6
- */
7
- import test from 'node:test';
8
- import assert from 'node:assert/strict';
9
- import { createServer } from 'node:http';
10
- import { createHash } from 'node:crypto';
11
- import { ReferenceFetcher, normalizedOrigin } from '../src/mcpl/reference-fetcher.js';
12
- import { ReferenceRegistry, classifyBlock, referenceExpiry, referenceRegistry } from '../src/mcpl/references.js';
13
- import { AgentFramework } from '../src/framework.js';
14
- const PAYLOAD = Buffer.from('RIFF-not-really-a-wav-'.repeat(100));
15
- const DIGEST = 'sha256:' + createHash('sha256').update(PAYLOAD).digest('base64url');
16
- let lastAuth = null;
17
- /** Requests served, by path and query. */
18
- const hits = new Map();
19
- const server = createServer((req, res) => {
20
- const url = new URL(req.url ?? '/', 'http://x');
21
- lastAuth = req.headers.authorization ?? null;
22
- hits.set(req.url ?? '/', (hits.get(req.url ?? '/') ?? 0) + 1);
23
- if (url.pathname === '/ok') {
24
- res.writeHead(200, { 'content-type': 'audio/wav' });
25
- res.end(PAYLOAD);
26
- }
27
- else if (url.pathname === '/redirect') {
28
- res.writeHead(302, { location: 'http://evil.example/x' });
29
- res.end();
30
- }
31
- else if (url.pathname === '/octet') {
32
- res.writeHead(200, { 'content-type': 'application/octet-stream' });
33
- res.end(PAYLOAD);
34
- }
35
- else if (url.pathname === '/untyped') {
36
- // no content-type header, and bytes no sniffer recognizes
37
- res.writeHead(200);
38
- res.end(Buffer.from('plain bytes, nothing to sniff'));
39
- }
40
- else if (url.pathname === '/octet-untyped') {
41
- // a header type with no extension of its own, over bytes no sniffer recognizes
42
- res.writeHead(200, { 'content-type': 'application/octet-stream' });
43
- res.end(Buffer.from('plain bytes, nothing to sniff'));
44
- }
45
- else if (url.pathname === '/c1-only-typed') {
46
- // a header type that is nothing but a C1 control, over bytes no sniffer recognizes
47
- res.writeHead(200, { 'content-type': '\u0085' });
48
- res.end(Buffer.from('plain bytes, nothing to sniff'));
49
- }
50
- else if (url.pathname === '/c1-typed') {
51
- // a header type carrying a C1 control (sent as the Latin-1 byte 0x85),
52
- // over bytes no sniffer recognizes
53
- res.writeHead(200, { 'content-type': 'text/pl\u0085ain; charset=utf-8' });
54
- res.end(Buffer.from('plain bytes, nothing to sniff'));
55
- }
56
- else if (url.pathname === '/liar') {
57
- // claims small in testimony, streams big (vector 10)
58
- res.writeHead(200, { 'content-type': 'application/octet-stream' });
59
- res.end(Buffer.alloc(200_000, 7));
60
- }
61
- else {
62
- res.writeHead(404);
63
- res.end();
64
- }
65
- });
66
- await new Promise((r) => server.listen(0, '127.0.0.1', r));
67
- const port = server.address().port;
68
- const ORIGIN = `http://127.0.0.1:${port}`;
69
- const saved = [];
70
- function makeFetcher(bindings) {
71
- return new ReferenceFetcher((id) => bindings[id], async (name, data, mime) => { saved.push({ name, bytes: data.length, mime }); return `scratch/refs/${name}`; });
72
- }
73
- function makeRecord(reg, uri, extra = {}, serverId = 'srv') {
74
- const c = classifyBlock({ type: 'resource', uri, ...extra });
75
- assert.equal(c.kind, 'reference');
76
- return reg.register(c.testimony, serverId);
77
- }
78
- test('happy path: origin-bound fetch, bearer auth applied host-side, digest verified', async () => {
79
- const reg = new ReferenceRegistry();
80
- const f = makeFetcher({ srv: { url: `ws://127.0.0.1:${port}`, token: 'sekrit' } });
81
- const rec = makeRecord(reg, `${ORIGIN}/ok`, { sizeBytes: PAYLOAD.length, digest: DIGEST, mimeType: 'audio/wav', disposition: 'never' });
82
- const out = await f.fetch(rec);
83
- assert.equal(out.ok, true, out.error);
84
- assert.equal(out.bytes, PAYLOAD.length);
85
- assert.equal(out.digestVerified, true);
86
- assert.equal(lastAuth, 'Bearer sekrit', 'connection credential must ride as a header, host-side');
87
- assert.equal(rec.fetchedPath, `scratch/refs/${rec.refId}.wav`, 'storage name is host-generated from the record');
88
- // idempotent: second fetch returns the cached materialization
89
- const again = await f.fetch(rec);
90
- assert.equal(again.path, out.path);
91
- });
92
- test('vector 5: digest mismatch is never presented', async () => {
93
- const reg = new ReferenceRegistry();
94
- const f = makeFetcher({ srv: { url: ORIGIN } });
95
- const rec = makeRecord(reg, `${ORIGIN}/ok`, { digest: 'sha256:' + 'B'.repeat(43) });
96
- const out = await f.fetch(rec);
97
- assert.equal(out.ok, false);
98
- assert.match(out.error, /digest mismatch/);
99
- assert.equal(rec.fetchedPath, undefined);
100
- });
101
- test('vector 10: stream past the ceiling aborts on actual bytes', async () => {
102
- const reg = new ReferenceRegistry();
103
- const f = makeFetcher({ srv: { url: ORIGIN } });
104
- const rec = makeRecord(reg, `${ORIGIN}/liar`, { sizeBytes: 100 });
105
- const out = await f.fetch(rec, { maxBytes: 50_000 });
106
- assert.equal(out.ok, false);
107
- assert.match(out.error, /exceeded ceiling/);
108
- });
109
- test('vector 4: a claim already over the ceiling refuses without dialing', async () => {
110
- const reg = new ReferenceRegistry();
111
- const f = makeFetcher({ srv: { url: ORIGIN } });
112
- const rec = makeRecord(reg, `${ORIGIN}/ok`, { sizeBytes: 10_000_000 });
113
- const out = await f.fetch(rec, { maxBytes: 1000 });
114
- assert.equal(out.ok, false);
115
- assert.match(out.error, /exceeds fetch ceiling/);
116
- });
117
- test('vector 11: non-http(s) scheme refused', async () => {
118
- const reg = new ReferenceRegistry();
119
- const f = makeFetcher({ srv: { url: ORIGIN } });
120
- const rec = makeRecord(reg, 'file:///etc/passwd');
121
- const out = await f.fetch(rec);
122
- assert.equal(out.ok, false);
123
- assert.match(out.error, /scheme not allowed|third-party/);
124
- });
125
- test('vector 12: redirects refused, no traversal', async () => {
126
- const reg = new ReferenceRegistry();
127
- const f = makeFetcher({ srv: { url: ORIGIN } });
128
- const rec = makeRecord(reg, `${ORIGIN}/redirect`);
129
- const out = await f.fetch(rec);
130
- assert.equal(out.ok, false);
131
- assert.match(out.error, /redirect refused/);
132
- });
133
- test('third-party origin refused (v1 policy: dialed origin only)', async () => {
134
- const reg = new ReferenceRegistry();
135
- const f = makeFetcher({ srv: { url: ORIGIN } });
136
- const rec = makeRecord(reg, 'https://cdn.example.com/thing.wav');
137
- const out = await f.fetch(rec);
138
- assert.equal(out.ok, false);
139
- assert.match(out.error, /third-party origin/);
140
- });
141
- test('vector 16: expired (and unparseable-expiry) references refuse locally, and take no eager slot', async () => {
142
- const reg = new ReferenceRegistry();
143
- const f = makeFetcher({ srv: { url: ORIGIN } });
144
- for (const [expiresAt, why] of [['2001-01-01T00:00:00Z', /has passed/], ['not-a-date', /does not parse/]]) {
145
- // Small, sized and from the dialed origin: only its expiry keeps it from the eager default.
146
- const rec = makeRecord(reg, `${ORIGIN}/ok?e=${expiresAt}`, { expiresAt, sizeBytes: PAYLOAD.length });
147
- assert.equal(f.isEagerEligible(rec), false, `${expiresAt}: the eager default would only be refused`);
148
- const out = await f.fetch(rec);
149
- assert.equal(out.ok, false);
150
- assert.match(out.error, /expired/);
151
- assert.match(out.error, why);
152
- }
153
- });
154
- test('vector 16: an expiry rejected as a field refuses locally, with nothing dialed, and takes no eager slot', async () => {
155
- const reg = new ReferenceRegistry();
156
- const f = makeFetcher({ srv: { url: ORIGIN } });
157
- const before = saved.length;
158
- lastAuth = 'untouched';
159
- for (const [label, expiresAt] of [['overlong', 'x'.repeat(65)], ['numeric', 1_900_000_000], ['null', null]]) {
160
- const rec = makeRecord(reg, `${ORIGIN}/ok?e=${label}`, { expiresAt, sizeBytes: PAYLOAD.length });
161
- assert.deepEqual(rec.testimony.rejectedFields, ['expiresAt'], label);
162
- assert.equal(f.isEagerEligible(rec), false, `${label}: the eager default would only be refused`);
163
- const out = await f.fetch(rec);
164
- assert.equal(out.ok, false, label);
165
- assert.match(out.error, /rejected as a field/, label);
166
- }
167
- assert.equal(saved.length, before, 'nothing saved');
168
- assert.equal(lastAuth, 'untouched', 'the origin was never dialed');
169
- });
170
- test('a reference whose expiry is still ahead is fetched', async () => {
171
- const reg = new ReferenceRegistry();
172
- const f = makeFetcher({ srv: { url: ORIGIN } });
173
- const rec = makeRecord(reg, `${ORIGIN}/ok?e=future`, { expiresAt: '2999-01-01T00:00:00Z', sizeBytes: PAYLOAD.length });
174
- assert.equal(f.isEagerEligible(rec), true);
175
- const out = await f.fetch(rec);
176
- assert.equal(out.ok, true, out.error);
177
- });
178
- test('a claimed type that neither the bytes nor a header override reaches the result without controls', async () => {
179
- const reg = new ReferenceRegistry();
180
- const f = makeFetcher({ srv: { url: ORIGIN } });
181
- const rec = makeRecord(reg, `${ORIGIN}/untyped`, { mimeType: 'text/\u202Eplain\u061C' });
182
- assert.equal(rec.testimony.mimeType, 'text/\u202Eplain\u061C', 'testimony keeps what the server said');
183
- const out = await f.fetch(rec);
184
- assert.equal(out.ok, true, out.error);
185
- assert.equal(out.mimeType, 'text/plain', 'fetch_reference shows it as a label is shown');
186
- assert.equal(saved.at(-1).mime, 'text/plain');
187
- });
188
- test('a header type that sanitizes to nothing counts as absent, so the claimed type names the result', async () => {
189
- const reg = new ReferenceRegistry();
190
- const f = makeFetcher({ srv: { url: ORIGIN } });
191
- const rec = makeRecord(reg, `${ORIGIN}/c1-only-typed`, { mimeType: 'text/plain' });
192
- const out = await f.fetch(rec);
193
- assert.equal(out.ok, true, out.error);
194
- assert.equal(out.mimeType, 'text/plain');
195
- assert.equal(saved.at(-1).mime, 'text/plain', 'the saved type');
196
- assert.equal(rec.verifiedMimeType, 'text/plain', "the record's verified type");
197
- assert.equal(rec.fetchedPath, `scratch/refs/${rec.refId}.txt`);
198
- });
199
- test('a claimed type that sanitizes to nothing counts as absent: octet-stream, saved as .bin', async () => {
200
- const reg = new ReferenceRegistry();
201
- const f = makeFetcher({ srv: { url: ORIGIN } });
202
- // Bidi controls between spaces: nothing is left once they're stripped and the ends trimmed.
203
- const rec = makeRecord(reg, `${ORIGIN}/untyped?claim=empty`, { mimeType: ' \u202E \u061C ' });
204
- const out = await f.fetch(rec);
205
- assert.equal(out.ok, true, out.error);
206
- assert.equal(out.mimeType, 'application/octet-stream');
207
- assert.equal(saved.at(-1).mime, 'application/octet-stream');
208
- assert.equal(rec.fetchedPath, `scratch/refs/${rec.refId}.bin`);
209
- });
210
- test('the response header type is shown as a label is shown, wherever it names the saved type', async () => {
211
- const reg = new ReferenceRegistry();
212
- const f = makeFetcher({ srv: { url: ORIGIN } });
213
- const rec = makeRecord(reg, `${ORIGIN}/c1-typed`);
214
- const out = await f.fetch(rec);
215
- assert.equal(out.ok, true, out.error);
216
- assert.equal(out.mimeType, 'text/plain', "fetch_reference's mime_type");
217
- assert.equal(saved.at(-1).mime, 'text/plain', 'the saved type');
218
- assert.equal(rec.verifiedMimeType, 'text/plain', "the record's verified type, which a later fetch serves");
219
- assert.equal(rec.fetchedPath, `scratch/refs/${rec.refId}.txt`, 'its extension comes from the label');
220
- });
221
- test("where the bytes and header name no extension, the claimed type names it as its label reads", async () => {
222
- const reg = new ReferenceRegistry();
223
- const f = makeFetcher({ srv: { url: ORIGIN } });
224
- const rec = makeRecord(reg, `${ORIGIN}/octet-untyped`, { mimeType: 'text/\u202Eplain' });
225
- const out = await f.fetch(rec);
226
- assert.equal(out.ok, true, out.error);
227
- assert.equal(out.mimeType, 'application/octet-stream', 'the header names the type');
228
- assert.equal(rec.fetchedPath, `scratch/refs/${rec.refId}.txt`);
229
- });
230
- test("a server's type naming an Object.prototype member saves as .bin, not as inherited text", async () => {
231
- const reg = new ReferenceRegistry();
232
- const f = makeFetcher({ srv: { url: ORIGIN } });
233
- const rec = makeRecord(reg, `${ORIGIN}/untyped?claim=constructor`, { mimeType: 'constructor' });
234
- const out = await f.fetch(rec);
235
- assert.equal(out.ok, true, out.error);
236
- assert.equal(rec.fetchedPath, `scratch/refs/${rec.refId}.bin`);
237
- });
238
- test('a copy saved earlier is still served once its expiry has passed or reads as rejected', async () => {
239
- const reg = new ReferenceRegistry();
240
- const f = makeFetcher({ srv: { url: ORIGIN } });
241
- const readings = {
242
- passed: { expiresAt: '2001-01-01T00:00:00Z' },
243
- rejected: { expiresAt: undefined, rejectedFields: ['expiresAt'] },
244
- };
245
- for (const [reading, testimony] of Object.entries(readings)) {
246
- const rec = makeRecord(reg, `${ORIGIN}/ok?saved=${reading}`, { expiresAt: '2999-01-01T00:00:00Z' });
247
- const first = await f.fetch(rec);
248
- assert.equal(first.ok, true, first.error);
249
- // Its expiry now reads as one the fetcher refuses: the clock passed it,
250
- // or the record's testimony changed while its fetch was in flight.
251
- Object.assign(rec.testimony, testimony);
252
- assert.equal(referenceExpiry(rec.testimony), reading);
253
- lastAuth = 'untouched';
254
- const again = await f.fetch(rec);
255
- assert.equal(again.ok, true, `${reading}: ${again.error}`);
256
- assert.equal(again.path, first.path, reading);
257
- assert.equal(lastAuth, 'untouched', `${reading}: served from the saved copy, with nothing dialed`);
258
- }
259
- });
260
- /** The framework's eager default, autoFetchReferences, run over `content`
261
- * as a tool result from server `srv`, with this file's fetcher. It
262
- * registers in the process-wide referenceRegistry, so each test's uris are
263
- * its own. */
264
- async function eagerFetch(content) {
265
- const fetcher = makeFetcher({ srv: { url: ORIGIN } });
266
- const framework = Object.create(AgentFramework.prototype);
267
- framework.getReferenceFetcher = () => fetcher;
268
- await framework.autoFetchReferences(content, 'srv', true);
269
- }
270
- test('the eager default skips expired references, so the live ones after them get its slots', async (t) => {
271
- const errors = t.mock.method(console, 'error', () => { });
272
- // Nine small references from the dialed origin, the first three expired:
273
- // passed, unparseable and rejected as a field.
274
- const expired = ['2001-01-01T00:00:00Z', 'not-a-date', 'x'.repeat(65)].map((expiresAt, i) => ({ type: 'resource', uri: `${ORIGIN}/ok?eager-expired=${i}`, sizeBytes: PAYLOAD.length, expiresAt }));
275
- const live = Array.from({ length: 6 }, (_, i) => ({ type: 'resource', uri: `${ORIGIN}/ok?eager-live=${i}`, sizeBytes: PAYLOAD.length }));
276
- await eagerFetch([...expired, ...live]);
277
- for (const block of live) {
278
- assert.ok(referenceRegistry.findByUri(block.uri)?.fetchedPath, `${block.uri} took an eager slot`);
279
- }
280
- for (const block of expired) {
281
- assert.equal(referenceRegistry.findByUri(block.uri)?.fetchedPath, undefined, `${block.uri} took none`);
282
- }
283
- const refusals = errors.mock.calls.map((call) => String(call.arguments[0])).filter((line) => line.includes('[rfc005]'));
284
- assert.deepEqual(refusals, [], 'no refused fetch is logged');
285
- });
286
- test('a uri the result repeats takes one eager slot, and the slots stop at eight', async () => {
287
- // Nine distinct small references, the first sent twice: ten blocks.
288
- const blocks = Array.from({ length: 9 }, (_, i) => ({ type: 'resource', uri: `${ORIGIN}/ok?eager-distinct=${i}`, sizeBytes: PAYLOAD.length }));
289
- await eagerFetch([blocks[0], ...blocks]);
290
- for (const block of blocks.slice(0, 8)) {
291
- assert.ok(referenceRegistry.findByUri(block.uri)?.fetchedPath, `${block.uri} took an eager slot`);
292
- }
293
- assert.equal(referenceRegistry.findByUri(blocks[8].uri)?.fetchedPath, undefined, 'the ninth stays lazy');
294
- });
295
- test('within one result, a uri that any block calls expired takes no eager slot; a later result can refresh it', async (t) => {
296
- const errors = t.mock.method(console, 'error', () => { });
297
- const block = (uri, expiresAt) => ({ type: 'resource', uri, sizeBytes: PAYLOAD.length, ...(expiresAt ? { expiresAt } : {}) });
298
- for (const order of ['expired-first', 'expired-last']) {
299
- const uri = `${ORIGIN}/ok?eager-mixed=${order}`;
300
- const expired = block(uri, '2001-01-01T00:00:00Z');
301
- await eagerFetch(order === 'expired-first' ? [expired, block(uri)] : [block(uri), expired]);
302
- assert.equal(referenceRegistry.findByUri(uri)?.fetchedPath, undefined, `${order}: no slot`);
303
- }
304
- const refusals = errors.mock.calls.map((call) => String(call.arguments[0])).filter((line) => line.includes('[rfc005]'));
305
- assert.deepEqual(refusals, [], 'no refused fetch is logged');
306
- // A later result re-issues the uri with a fresh expiry, as a re-signed URL would.
307
- const refreshed = `${ORIGIN}/ok?eager-mixed=expired-first`;
308
- await eagerFetch([block(refreshed, '2999-01-01T00:00:00Z')]);
309
- assert.ok(referenceRegistry.findByUri(refreshed)?.fetchedPath, 'the later result\'s fresh testimony stands');
310
- });
311
- // The registry holds 2000 records. Found by Beth-2389's and Beatrice-2379's
312
- // reads of this change; these adapt their probes.
313
- const REGISTRY_RECORDS = 2000;
314
- const registerResource = (uri, sizeBytes) => {
315
- const c = classifyBlock({ type: 'resource', uri, ...(sizeBytes !== undefined ? { sizeBytes } : {}) });
316
- if (c.kind !== 'reference')
317
- throw new Error('fixture: not a reference');
318
- return referenceRegistry.register(c.testimony, 'srv');
319
- };
320
- test("a uri a result mentions isn't evicted by the result's later blocks, so its eager copy lands in the record its stub names", async () => {
321
- const target = '/ok?registered=again';
322
- // Fill the registry so that the target's record is its oldest.
323
- const first = registerResource(`${ORIGIN}${target}`, PAYLOAD.length);
324
- for (let i = 1; i < REGISTRY_RECORDS; i++)
325
- registerResource(`${ORIGIN}/history?registered=again&i=${i}`);
326
- await eagerFetch([
327
- { type: 'resource', uri: `${ORIGIN}${target}`, sizeBytes: PAYLOAD.length },
328
- { type: 'resource', uri: `${ORIGIN}/ok?registered=again-new`, sizeBytes: PAYLOAD.length }, // a new uri, which evicts one record
329
- ]);
330
- assert.equal(hits.get(target) ?? 0, 1, 'requests for the target');
331
- assert.equal(referenceRegistry.findByUri(`${ORIGIN}${target}`), first, 'the registry still holds the target');
332
- assert.ok(first.fetchedPath, 'and its record holds the copy');
333
- });
334
- for (const expired of [true, false]) {
335
- test(`past the registry's bound, a repeated uri ${expired ? 'that a block calls expired still takes no eager slot' : 'still takes one eager slot'} when the result itself evicts its record`, async () => {
336
- const tag = expired ? 'expired' : 'fresh';
337
- const target = `/ok?past-bound=${tag}`;
338
- const first = registerResource(`${ORIGIN}${target}`, PAYLOAD.length);
339
- // The target, then as many new uris as the registry holds (sizes
340
- // unclaimed, so none is eager-eligible), then the target again: the new
341
- // uris evict its first record, and its last block registers a second.
342
- await eagerFetch([
343
- { type: 'resource', uri: `${ORIGIN}${target}`, sizeBytes: PAYLOAD.length, ...(expired ? { expiresAt: '2001-01-01T00:00:00Z' } : {}) },
344
- ...Array.from({ length: REGISTRY_RECORDS }, (_, i) => ({ type: 'resource', uri: `${ORIGIN}/filler?past-bound=${tag}&i=${i}` })),
345
- { type: 'resource', uri: `${ORIGIN}${target}`, sizeBytes: PAYLOAD.length },
346
- ]);
347
- const current = referenceRegistry.findByUri(`${ORIGIN}${target}`);
348
- assert.notEqual(current?.refId, first.refId, 'the result evicted the target\'s record, and its last block registered a second');
349
- assert.equal(hits.get(target) ?? 0, expired ? 0 : 1, 'requests for the target');
350
- if (!expired)
351
- assert.ok(current?.fetchedPath, "the uri's current record, the one its stub names, holds the copy");
352
- });
353
- }
354
- test('per-server budget exhausts cumulatively', async () => {
355
- const reg = new ReferenceRegistry();
356
- const f = makeFetcher({ srv: { url: ORIGIN, autofetch: { maxTotalBytes: PAYLOAD.length + 10 } } });
357
- const a = await f.fetch(makeRecord(reg, `${ORIGIN}/ok?n=1`));
358
- assert.equal(a.ok, true, a.error);
359
- const b = await f.fetch(makeRecord(reg, `${ORIGIN}/ok?n=2`));
360
- assert.equal(b.ok, false);
361
- assert.match(b.error, /budget/);
362
- });
363
- test('eager eligibility: small + sized + connection origin only', () => {
364
- const reg = new ReferenceRegistry();
365
- const f = makeFetcher({ srv: { url: ORIGIN } });
366
- assert.equal(f.isEagerEligible(makeRecord(reg, `${ORIGIN}/a`, { sizeBytes: 1000 })), true);
367
- assert.equal(f.isEagerEligible(makeRecord(reg, `${ORIGIN}/b`, { sizeBytes: 50_000_000 })), false, 'over eager ceiling');
368
- assert.equal(f.isEagerEligible(makeRecord(reg, `${ORIGIN}/c`)), false, 'no sizeBytes claim');
369
- assert.equal(f.isEagerEligible(makeRecord(reg, `https://cdn.example/d`, { sizeBytes: 10 })), false, 'third-party');
370
- {
371
- // explicit-undefined would trigger makeRecord's default; build directly
372
- const c = classifyBlock({ type: 'resource', uri: `${ORIGIN}/e`, sizeBytes: 10 });
373
- assert.equal(c.kind, 'reference');
374
- const rec = reg.register(c.testimony, undefined);
375
- assert.equal(f.isEagerEligible(rec), false, 'no server binding');
376
- }
377
- });
378
- test('vector 20 substrate: registry dedup + defined miss', () => {
379
- const reg = new ReferenceRegistry();
380
- const a = makeRecord(reg, `${ORIGIN}/same`);
381
- const b = makeRecord(reg, `${ORIGIN}/same`);
382
- assert.equal(a.refId, b.refId, 'same uri+server shares a record');
383
- assert.equal(reg.get('ref_nope'), undefined, 'stale/unknown id is a defined miss');
384
- });
385
- test('normalizedOrigin maps ws/wss and elides default ports', () => {
386
- assert.equal(normalizedOrigin('ws://Host.Example:80/x'), 'http://host.example');
387
- assert.equal(normalizedOrigin('wss://host.example/x'), 'https://host.example');
388
- assert.equal(normalizedOrigin('https://host.example:8443'), 'https://host.example:8443');
389
- assert.equal(normalizedOrigin('not a url'), null);
390
- });
391
- test.after(() => { server.close(); });
392
- test('binding upgrade: unbound stub-time registration gains the dispatch serverId', () => {
393
- const reg = new ReferenceRegistry();
394
- const c = classifyBlock({ type: 'resource', uri: `${ORIGIN}/upgrade.wav`, sizeBytes: 10 });
395
- assert.equal(c.kind, 'reference');
396
- const t = c.testimony;
397
- const unbound = reg.register(t); // stub site: no server context
398
- const bound = reg.register(t, 'srv'); // dispatch: knows the server
399
- assert.equal(unbound.refId, bound.refId, 'one record, not a fork');
400
- assert.equal(unbound.serverId, 'srv', 'binding upgraded in place');
401
- });
402
- test('testimony refreshes while unfetched, freezes after fetch', async () => {
403
- const reg = new ReferenceRegistry();
404
- const f = makeFetcher({ srv: { url: ORIGIN } });
405
- const mk = (digest) => {
406
- const c = classifyBlock({ type: 'resource', uri: `${ORIGIN}/ok?refresh=1`, digest });
407
- return c.testimony;
408
- };
409
- const stale = 'sha256:' + 'C'.repeat(43);
410
- const rec = reg.register(mk(stale), 'srv');
411
- reg.register(mk(DIGEST), 'srv'); // re-issued with the real digest
412
- assert.equal(rec.testimony.digest, DIGEST, 'unfetched record must take the new digest');
413
- const out = await f.fetch(rec);
414
- assert.equal(out.ok, true, out.error);
415
- reg.register(mk(stale), 'srv'); // later stale re-issue
416
- assert.equal(rec.testimony.digest, DIGEST, 'fetched record keeps verified testimony');
417
- });
418
- test('vector 13: magic bytes beat a lying Content-Type header for storage type', async () => {
419
- const reg = new ReferenceRegistry();
420
- const f = makeFetcher({ srv: { url: ORIGIN } });
421
- const rec = makeRecord(reg, `${ORIGIN}/octet`); // server sends RIFF bytes as octet-stream
422
- const out = await f.fetch(rec);
423
- assert.equal(out.ok, true, out.error);
424
- assert.equal(out.mimeType, 'audio/wav', 'sniffed type must win');
425
- assert.ok(rec.fetchedPath.endsWith('.wav'), rec.fetchedPath);
426
- });
427
- //# sourceMappingURL=mcpl-reference-fetcher.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcpl-reference-fetcher.test.js","sourceRoot":"","sources":["../../test/mcpl-reference-fetcher.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACjH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAClE,MAAM,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAEpF,IAAI,QAAQ,GAAkB,IAAI,CAAC;AACnC,0CAA0C;AAC1C,MAAM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,CAAC,CAAC,CAAqB,uBAAuB;IAC3E,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,yCAAyC,CAAC,CAAC;AACxF,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,0EAA0E,EAAE,KAAK,IAAI,EAAE;IAC1F,MAAM,GAAG,GAAG,IAAI,iBAAiB,EAAE,CAAC;IACpC,MAAM,CAAC,GAAG,WAAW,CAAC,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IAChD,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,EAAE,GAAG,MAAM,QAAQ,CAAC,CAAC,CAAK,0CAA0C;IAC9F,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,uBAAuB,CAAC,CAAC;IACjE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,WAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;AAChE,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=mcpl-reference-fields.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcpl-reference-fields.test.d.ts","sourceRoot":"","sources":["../../test/mcpl-reference-fields.test.ts"],"names":[],"mappings":""}
@@ -1,149 +0,0 @@
1
- import { test } from 'node:test';
2
- import assert from 'node:assert/strict';
3
- import { buildReferenceStub, classifyBlock, isReferenceExpired, sanitizeLabel, REFERENCE_LIMITS, referenceRegistry, referenceStubOrNull, } from '../src/mcpl/references.js';
4
- const fields = ['name', 'mimeType', 'expiresAt'];
5
- const types = ['resource', 'image', 'audio'];
6
- function reference(type, extra = {}) {
7
- const block = { type, uri: 'https://example.test/optional-fields', disposition: 'never', ...extra };
8
- const parsed = classifyBlock(block);
9
- assert.equal(parsed.kind, 'reference');
10
- if (parsed.kind !== 'reference')
11
- throw new Error('expected reference');
12
- return { block, testimony: parsed.testimony };
13
- }
14
- for (const field of fields) {
15
- test('drops overlong optional ' + field + ' while preserving each reference block and disposition', () => {
16
- for (const type of types) {
17
- const { block, testimony } = reference(type, { [field]: 'x'.repeat(REFERENCE_LIMITS[field] + 1) });
18
- assert.equal(testimony[field], undefined, 'invalid optional metadata is absent, not repaired');
19
- assert.deepEqual(testimony.rejectedFields, [field]);
20
- assert.deepEqual(testimony.truncatedFields, []);
21
- assert.equal(testimony.uri, block.uri);
22
- assert.equal(testimony.disposition, 'never');
23
- assert.ok(referenceStubOrNull(block)?.startsWith('[ref_'));
24
- assert.ok(!referenceStubOrNull(block)?.includes(block.uri));
25
- }
26
- });
27
- test('admits ' + field + ' exactly at its JSON Schema code-point limit without changing it', () => {
28
- for (const value of ['', 'x'.repeat(REFERENCE_LIMITS[field]), '🪶'.repeat(REFERENCE_LIMITS[field])]) {
29
- const { testimony } = reference('resource', { [field]: value });
30
- assert.equal(testimony[field], value);
31
- assert.deepEqual(testimony.rejectedFields, []);
32
- assert.deepEqual(testimony.truncatedFields, []);
33
- }
34
- const { testimony } = reference('resource', { [field]: '🪶'.repeat(REFERENCE_LIMITS[field]) + 'x' });
35
- assert.equal(testimony[field], undefined);
36
- assert.deepEqual(testimony.rejectedFields, [field]);
37
- });
38
- }
39
- test('wrong-type optional fields are dropped while a bad required URI rejects the block', () => {
40
- const { testimony } = reference('resource', { name: 123, mimeType: null, expiresAt: [] });
41
- assert.equal(testimony.name, undefined);
42
- assert.equal(testimony.mimeType, undefined);
43
- assert.equal(testimony.expiresAt, undefined);
44
- assert.deepEqual(testimony.rejectedFields.sort(), ['expiresAt', 'mimeType', 'name']);
45
- assert.equal(testimony.disposition, 'never');
46
- for (const uri of [undefined, null, '', 'x'.repeat(REFERENCE_LIMITS.uri + 1)]) {
47
- assert.equal(classifyBlock({ type: 'resource', uri, disposition: 'never' }).kind, 'invalid');
48
- }
49
- });
50
- test('schema-admitted metadata still uses independent sanitized and bounded display labels', () => {
51
- const name = 'A'.repeat(REFERENCE_LIMITS.name - 2) + '\u202E\n';
52
- const mimeType = 'B'.repeat(REFERENCE_LIMITS.mimeType);
53
- const { testimony } = reference('resource', { name, mimeType });
54
- const stub = buildReferenceStub(testimony);
55
- const record = referenceRegistry.findByUri(testimony.uri);
56
- assert.equal(record.testimony.name, name, 'display bounds do not alter admitted testimony');
57
- assert.equal(record.testimony.mimeType, mimeType);
58
- assert.ok(stub.includes('A'.repeat(119) + '…'));
59
- assert.ok(stub.includes('B'.repeat(119) + '…'));
60
- assert.ok(!stub.includes('\u202E') && !stub.includes('\n'));
61
- assert.ok(!stub.includes(testimony.uri));
62
- assert.ok(stub.length < 350);
63
- });
64
- test('an admitted but unparseable expiry still fails closed; a schema-invalid expiry is absent, and fails closed too', () => {
65
- const validShape = reference('resource', { expiresAt: 'not-a-date' }).testimony;
66
- assert.equal(isReferenceExpired(validShape), true);
67
- const invalidShape = reference('resource', { expiresAt: 'x'.repeat(REFERENCE_LIMITS.expiresAt + 1) }).testimony;
68
- assert.equal(invalidShape.expiresAt, undefined);
69
- assert.deepEqual(invalidShape.rejectedFields, ['expiresAt']);
70
- assert.equal(isReferenceExpired(invalidShape), true, 'an overlong expiry is never read as immortal');
71
- const notAString = reference('resource', { expiresAt: 1_900_000_000 }).testimony;
72
- assert.equal(isReferenceExpired(notAString), true, 'nor is one that is not a string');
73
- const nullExpiry = reference('resource', { expiresAt: null }).testimony;
74
- assert.deepEqual(nullExpiry.rejectedFields, ['expiresAt'], 'null is not a string either');
75
- assert.equal(isReferenceExpired(nullExpiry), true, 'and fails closed too');
76
- const absent = reference('resource', {}).testimony;
77
- assert.equal(isReferenceExpired(absent), false, 'a reference that claims no expiry has none');
78
- const future = reference('resource', { expiresAt: '2999-01-01T00:00:00Z' }).testimony;
79
- assert.equal(isReferenceExpired(future, Date.parse('2026-10-12T00:00:00Z')), false, 'an expiry still ahead has not passed');
80
- // Only a rejected expiry makes a reference expired: other rejected fields don't.
81
- const badName = reference('resource', { name: 123, sizeBytes: -1, digest: 'sha256:short' }).testimony;
82
- assert.deepEqual(badName.rejectedFields.sort(), ['digest', 'name', 'sizeBytes']);
83
- assert.equal(isReferenceExpired(badName), false);
84
- });
85
- test('the stub shows every server label without controls, and leaves out one that sanitizes to nothing', () => {
86
- // Its own uri: the saved path it sets below stays on this test's record in the shared registry.
87
- const { testimony } = reference('resource', {
88
- uri: 'https://example.test/stub-labels', name: '\u061C\u202E', mimeType: 'image/\u202Epng\u061C', sizeBytes: 10,
89
- });
90
- const stub = buildReferenceStub(testimony, 'from \u2066a\u0085tool\u2069');
91
- assert.ok(!/[\u0000-\u001F\u007F-\u009F\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/.test(stub), stub);
92
- assert.ok(stub.includes('image/png, 10B claimed'), stub);
93
- assert.ok(stub.includes('from atool'), stub);
94
- const segments = stub.slice(stub.indexOf('] ') + 2).split(' — ');
95
- assert.ok(segments.every((part) => part.trim() !== ''), `no empty segment for the name that sanitized away: ${JSON.stringify(stub)}`);
96
- const record = referenceRegistry.findByUri(testimony.uri);
97
- record.fetchedPath = 'scratch/refs/\u202Eevil\u061C.bin';
98
- assert.ok(buildReferenceStub(testimony).includes('saved: scratch/refs/evil.bin'));
99
- });
100
- test('the stub leaves out a type, or a provenance, that sanitizes to nothing', () => {
101
- const typeGone = reference('resource', { uri: 'https://example.test/stub-type-gone', mimeType: '\u202E\u061C', sizeBytes: 10 }).testimony;
102
- const typeStub = buildReferenceStub(typeGone, 'from a tool');
103
- assert.equal(typeStub, `[${referenceRegistry.findByUri(typeGone.uri).refId}] 10B claimed — from a tool — fetch with fetch_reference`);
104
- const originGone = reference('resource', { uri: 'https://example.test/stub-origin-gone', mimeType: 'image/png' }).testimony;
105
- const originStub = buildReferenceStub(originGone, '\u2066\u0085\u2069');
106
- assert.equal(originStub, `[${referenceRegistry.findByUri(originGone.uri).refId}] image/png — fetch with fetch_reference`);
107
- });
108
- test("an expired reference's stub says why, where a live one's advises fetch_reference", () => {
109
- const cases = [['2001-01-01T00:00:00Z', /expired: its expiresAt has passed/], ['not-a-date', /treated as expired: its expiresAt does not parse/],
110
- ['x'.repeat(REFERENCE_LIMITS.expiresAt + 1), /treated as expired: its expiresAt was rejected as a field/]];
111
- for (const [i, [expiresAt, why]] of cases.entries()) {
112
- const { testimony } = reference('resource', { uri: `https://example.test/stub-expired-${i}`, expiresAt });
113
- const stub = buildReferenceStub(testimony);
114
- assert.match(stub, why);
115
- assert.ok(!stub.includes('fetch_reference'), stub);
116
- }
117
- const live = reference('resource', { uri: 'https://example.test/stub-live', expiresAt: '2999-01-01T00:00:00Z' }).testimony;
118
- assert.match(buildReferenceStub(live), /\] fetch with fetch_reference$/);
119
- // A copy saved before its expiry passed is still served, and its stub says where.
120
- const saved = reference('resource', { uri: 'https://example.test/stub-expired-0', expiresAt: '2001-01-01T00:00:00Z' }).testimony;
121
- referenceRegistry.findByUri(saved.uri).fetchedPath = 'scratch/refs/kept.png';
122
- assert.match(buildReferenceStub(saved), /\] saved: scratch\/refs\/kept\.png$/);
123
- });
124
- test('display labels lose every bidi control, the Arabic letter mark included', () => {
125
- const controls = ['\u061C', '\u200E', '\u200F', '\u202A', '\u202B', '\u202C', '\u202D', '\u202E', '\u2066', '\u2067', '\u2068', '\u2069'];
126
- for (const ch of controls) {
127
- assert.equal(sanitizeLabel(`a${ch}b`, 100), 'ab', `U+${ch.codePointAt(0).toString(16).toUpperCase().padStart(4, '0')}`);
128
- }
129
- assert.equal(sanitizeLabel('a\u0000\u001F\u007F\u0085\u009Fb', 100), 'ab', 'C0, DEL and C1 controls');
130
- assert.equal(sanitizeLabel('\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u05E2\u05D1\u05E8\u05D9\u05EA', 100), '\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u05E2\u05D1\u05E8\u05D9\u05EA', 'right-to-left text itself is kept');
131
- });
132
- test('display labels are trimmed, so a label of whitespace is nothing', () => {
133
- assert.equal(sanitizeLabel(' \uFEFFimage/png \u202E', 100), 'image/png', 'whitespace and a BOM left at either end');
134
- assert.equal(sanitizeLabel('a b', 100), 'a b', 'inner whitespace is kept');
135
- assert.equal(sanitizeLabel(' \u00A0 ', 100), '');
136
- });
137
- test('large invalid labels cannot change the bounded model-visible stub', () => {
138
- const { testimony } = reference('audio', {
139
- name: 'x'.repeat(1024 * 1024), mimeType: 'y'.repeat(1024 * 1024), sizeBytes: 1024,
140
- });
141
- assert.equal(testimony.name, undefined);
142
- assert.equal(testimony.mimeType, undefined);
143
- const stub = buildReferenceStub(testimony, 'server');
144
- assert.ok(stub.length < 150);
145
- assert.ok(stub.includes('claimed'));
146
- assert.ok(stub.includes('fetch with fetch_reference'), `an unfetched reference's stub: ${stub}`);
147
- assert.ok(!stub.includes(testimony.uri));
148
- });
149
- //# sourceMappingURL=mcpl-reference-fields.test.js.map