agenticreplay 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1565) hide show
  1. package/README.md +14 -13
  2. package/bin/agenticreplay.js +2 -0
  3. package/node_modules/@agenticreplay/adapters/dist/claude-code.d.ts +37 -0
  4. package/node_modules/@agenticreplay/adapters/dist/claude-code.d.ts.map +1 -0
  5. package/node_modules/@agenticreplay/adapters/dist/claude-code.js +103 -0
  6. package/node_modules/@agenticreplay/adapters/dist/claude-code.js.map +1 -0
  7. package/node_modules/@agenticreplay/adapters/dist/codex.d.ts +36 -0
  8. package/node_modules/@agenticreplay/adapters/dist/codex.d.ts.map +1 -0
  9. package/node_modules/@agenticreplay/adapters/dist/codex.js +130 -0
  10. package/node_modules/@agenticreplay/adapters/dist/codex.js.map +1 -0
  11. package/node_modules/@agenticreplay/adapters/dist/contract.d.ts +65 -0
  12. package/node_modules/@agenticreplay/adapters/dist/contract.d.ts.map +1 -0
  13. package/node_modules/@agenticreplay/adapters/dist/contract.js +460 -0
  14. package/node_modules/@agenticreplay/adapters/dist/contract.js.map +1 -0
  15. package/node_modules/@agenticreplay/adapters/dist/cursor.d.ts +40 -0
  16. package/node_modules/@agenticreplay/adapters/dist/cursor.d.ts.map +1 -0
  17. package/node_modules/@agenticreplay/adapters/dist/cursor.js +71 -0
  18. package/node_modules/@agenticreplay/adapters/dist/cursor.js.map +1 -0
  19. package/node_modules/@agenticreplay/adapters/dist/detect.d.ts +47 -0
  20. package/node_modules/@agenticreplay/adapters/dist/detect.d.ts.map +1 -0
  21. package/node_modules/@agenticreplay/adapters/dist/detect.js +123 -0
  22. package/node_modules/@agenticreplay/adapters/dist/detect.js.map +1 -0
  23. package/node_modules/@agenticreplay/adapters/dist/env.d.ts +60 -0
  24. package/node_modules/@agenticreplay/adapters/dist/env.d.ts.map +1 -0
  25. package/node_modules/@agenticreplay/adapters/dist/env.js +99 -0
  26. package/node_modules/@agenticreplay/adapters/dist/env.js.map +1 -0
  27. package/node_modules/@agenticreplay/adapters/dist/exec.d.ts +25 -0
  28. package/node_modules/@agenticreplay/adapters/dist/exec.d.ts.map +1 -0
  29. package/node_modules/@agenticreplay/adapters/dist/exec.js +51 -0
  30. package/node_modules/@agenticreplay/adapters/dist/exec.js.map +1 -0
  31. package/node_modules/@agenticreplay/adapters/dist/generic-openai.d.ts +8 -0
  32. package/node_modules/@agenticreplay/adapters/dist/generic-openai.d.ts.map +1 -0
  33. package/node_modules/@agenticreplay/adapters/dist/generic-openai.js +31 -0
  34. package/node_modules/@agenticreplay/adapters/dist/generic-openai.js.map +1 -0
  35. package/node_modules/@agenticreplay/adapters/dist/goose.d.ts +39 -0
  36. package/node_modules/@agenticreplay/adapters/dist/goose.d.ts.map +1 -0
  37. package/node_modules/@agenticreplay/adapters/dist/goose.js +81 -0
  38. package/node_modules/@agenticreplay/adapters/dist/goose.js.map +1 -0
  39. package/node_modules/@agenticreplay/adapters/dist/grok.d.ts +23 -0
  40. package/node_modules/@agenticreplay/adapters/dist/grok.d.ts.map +1 -0
  41. package/node_modules/@agenticreplay/adapters/dist/grok.js +50 -0
  42. package/node_modules/@agenticreplay/adapters/dist/grok.js.map +1 -0
  43. package/node_modules/@agenticreplay/adapters/dist/hermes.d.ts +70 -0
  44. package/node_modules/@agenticreplay/adapters/dist/hermes.d.ts.map +1 -0
  45. package/node_modules/@agenticreplay/adapters/dist/hermes.js +88 -0
  46. package/node_modules/@agenticreplay/adapters/dist/hermes.js.map +1 -0
  47. package/node_modules/@agenticreplay/adapters/dist/index.d.ts +25 -0
  48. package/node_modules/@agenticreplay/adapters/dist/index.d.ts.map +1 -0
  49. package/node_modules/@agenticreplay/adapters/dist/index.js +25 -0
  50. package/node_modules/@agenticreplay/adapters/dist/index.js.map +1 -0
  51. package/node_modules/@agenticreplay/adapters/dist/indexrag.d.ts +27 -0
  52. package/node_modules/@agenticreplay/adapters/dist/indexrag.d.ts.map +1 -0
  53. package/node_modules/@agenticreplay/adapters/dist/indexrag.js +236 -0
  54. package/node_modules/@agenticreplay/adapters/dist/indexrag.js.map +1 -0
  55. package/node_modules/@agenticreplay/adapters/dist/kilo.d.ts +21 -0
  56. package/node_modules/@agenticreplay/adapters/dist/kilo.d.ts.map +1 -0
  57. package/node_modules/@agenticreplay/adapters/dist/kilo.js +35 -0
  58. package/node_modules/@agenticreplay/adapters/dist/kilo.js.map +1 -0
  59. package/node_modules/@agenticreplay/adapters/dist/mcode.d.ts +81 -0
  60. package/node_modules/@agenticreplay/adapters/dist/mcode.d.ts.map +1 -0
  61. package/node_modules/@agenticreplay/adapters/dist/mcode.js +368 -0
  62. package/node_modules/@agenticreplay/adapters/dist/mcode.js.map +1 -0
  63. package/node_modules/@agenticreplay/adapters/dist/mcp-config.d.ts +17 -0
  64. package/node_modules/@agenticreplay/adapters/dist/mcp-config.d.ts.map +1 -0
  65. package/node_modules/@agenticreplay/adapters/dist/mcp-config.js +62 -0
  66. package/node_modules/@agenticreplay/adapters/dist/mcp-config.js.map +1 -0
  67. package/node_modules/@agenticreplay/adapters/dist/mimo.d.ts +26 -0
  68. package/node_modules/@agenticreplay/adapters/dist/mimo.d.ts.map +1 -0
  69. package/node_modules/@agenticreplay/adapters/dist/mimo.js +40 -0
  70. package/node_modules/@agenticreplay/adapters/dist/mimo.js.map +1 -0
  71. package/node_modules/@agenticreplay/adapters/dist/node.d.ts +19 -0
  72. package/node_modules/@agenticreplay/adapters/dist/node.d.ts.map +1 -0
  73. package/node_modules/@agenticreplay/adapters/dist/node.js +59 -0
  74. package/node_modules/@agenticreplay/adapters/dist/node.js.map +1 -0
  75. package/node_modules/@agenticreplay/adapters/dist/openclaw.d.ts +19 -0
  76. package/node_modules/@agenticreplay/adapters/dist/openclaw.d.ts.map +1 -0
  77. package/node_modules/@agenticreplay/adapters/dist/openclaw.js +43 -0
  78. package/node_modules/@agenticreplay/adapters/dist/openclaw.js.map +1 -0
  79. package/node_modules/@agenticreplay/adapters/dist/opencode-api-bases.d.ts +2 -0
  80. package/node_modules/@agenticreplay/adapters/dist/opencode-api-bases.d.ts.map +1 -0
  81. package/node_modules/@agenticreplay/adapters/dist/opencode-api-bases.js +201 -0
  82. package/node_modules/@agenticreplay/adapters/dist/opencode-api-bases.js.map +1 -0
  83. package/node_modules/@agenticreplay/adapters/dist/opencode-capture.d.ts +26 -0
  84. package/node_modules/@agenticreplay/adapters/dist/opencode-capture.d.ts.map +1 -0
  85. package/node_modules/@agenticreplay/adapters/dist/opencode-capture.js +132 -0
  86. package/node_modules/@agenticreplay/adapters/dist/opencode-capture.js.map +1 -0
  87. package/node_modules/@agenticreplay/adapters/dist/opencode-catalog.d.ts +5 -0
  88. package/node_modules/@agenticreplay/adapters/dist/opencode-catalog.d.ts.map +1 -0
  89. package/node_modules/@agenticreplay/adapters/dist/opencode-catalog.js +43 -0
  90. package/node_modules/@agenticreplay/adapters/dist/opencode-catalog.js.map +1 -0
  91. package/node_modules/@agenticreplay/adapters/dist/opencode-config.d.ts +40 -0
  92. package/node_modules/@agenticreplay/adapters/dist/opencode-config.d.ts.map +1 -0
  93. package/node_modules/@agenticreplay/adapters/dist/opencode-config.js +185 -0
  94. package/node_modules/@agenticreplay/adapters/dist/opencode-config.js.map +1 -0
  95. package/node_modules/@agenticreplay/adapters/dist/opencode.d.ts +10 -0
  96. package/node_modules/@agenticreplay/adapters/dist/opencode.d.ts.map +1 -0
  97. package/node_modules/@agenticreplay/adapters/dist/opencode.js +243 -0
  98. package/node_modules/@agenticreplay/adapters/dist/opencode.js.map +1 -0
  99. package/node_modules/@agenticreplay/adapters/dist/qwen.d.ts +51 -0
  100. package/node_modules/@agenticreplay/adapters/dist/qwen.d.ts.map +1 -0
  101. package/node_modules/@agenticreplay/adapters/dist/qwen.js +105 -0
  102. package/node_modules/@agenticreplay/adapters/dist/qwen.js.map +1 -0
  103. package/node_modules/@agenticreplay/adapters/dist/registry.d.ts +19 -0
  104. package/node_modules/@agenticreplay/adapters/dist/registry.d.ts.map +1 -0
  105. package/node_modules/@agenticreplay/adapters/dist/registry.js +110 -0
  106. package/node_modules/@agenticreplay/adapters/dist/registry.js.map +1 -0
  107. package/node_modules/@agenticreplay/adapters/dist/scaffold.d.ts +26 -0
  108. package/node_modules/@agenticreplay/adapters/dist/scaffold.d.ts.map +1 -0
  109. package/node_modules/@agenticreplay/adapters/dist/scaffold.js +125 -0
  110. package/node_modules/@agenticreplay/adapters/dist/scaffold.js.map +1 -0
  111. package/node_modules/@agenticreplay/adapters/dist/session.d.ts +47 -0
  112. package/node_modules/@agenticreplay/adapters/dist/session.d.ts.map +1 -0
  113. package/node_modules/@agenticreplay/adapters/dist/session.js +112 -0
  114. package/node_modules/@agenticreplay/adapters/dist/session.js.map +1 -0
  115. package/node_modules/@agenticreplay/adapters/dist/zcode.d.ts +60 -0
  116. package/node_modules/@agenticreplay/adapters/dist/zcode.d.ts.map +1 -0
  117. package/node_modules/@agenticreplay/adapters/dist/zcode.js +424 -0
  118. package/node_modules/@agenticreplay/adapters/dist/zcode.js.map +1 -0
  119. package/node_modules/@agenticreplay/adapters/package.json +29 -0
  120. package/node_modules/@agenticreplay/core/dist/blobs.d.ts +21 -0
  121. package/node_modules/@agenticreplay/core/dist/blobs.d.ts.map +1 -0
  122. package/node_modules/@agenticreplay/core/dist/blobs.js +102 -0
  123. package/node_modules/@agenticreplay/core/dist/blobs.js.map +1 -0
  124. package/node_modules/@agenticreplay/core/dist/fetch.d.ts +38 -0
  125. package/node_modules/@agenticreplay/core/dist/fetch.d.ts.map +1 -0
  126. package/node_modules/@agenticreplay/core/dist/fetch.js +47 -0
  127. package/node_modules/@agenticreplay/core/dist/fetch.js.map +1 -0
  128. package/node_modules/@agenticreplay/core/dist/graph.d.ts +106 -0
  129. package/node_modules/@agenticreplay/core/dist/graph.d.ts.map +1 -0
  130. package/node_modules/@agenticreplay/core/dist/graph.js +394 -0
  131. package/node_modules/@agenticreplay/core/dist/graph.js.map +1 -0
  132. package/node_modules/@agenticreplay/core/dist/index.d.ts +9 -0
  133. package/node_modules/@agenticreplay/core/dist/index.d.ts.map +1 -0
  134. package/node_modules/@agenticreplay/core/dist/index.js +9 -0
  135. package/node_modules/@agenticreplay/core/dist/index.js.map +1 -0
  136. package/node_modules/@agenticreplay/core/dist/paths.d.ts +45 -0
  137. package/node_modules/@agenticreplay/core/dist/paths.d.ts.map +1 -0
  138. package/node_modules/@agenticreplay/core/dist/paths.js +149 -0
  139. package/node_modules/@agenticreplay/core/dist/paths.js.map +1 -0
  140. package/node_modules/@agenticreplay/core/dist/private-files.d.ts +37 -0
  141. package/node_modules/@agenticreplay/core/dist/private-files.d.ts.map +1 -0
  142. package/node_modules/@agenticreplay/core/dist/private-files.js +353 -0
  143. package/node_modules/@agenticreplay/core/dist/private-files.js.map +1 -0
  144. package/node_modules/@agenticreplay/core/dist/reader.d.ts +45 -0
  145. package/node_modules/@agenticreplay/core/dist/reader.d.ts.map +1 -0
  146. package/node_modules/@agenticreplay/core/dist/reader.js +152 -0
  147. package/node_modules/@agenticreplay/core/dist/reader.js.map +1 -0
  148. package/node_modules/@agenticreplay/core/dist/redaction.d.ts +69 -0
  149. package/node_modules/@agenticreplay/core/dist/redaction.d.ts.map +1 -0
  150. package/node_modules/@agenticreplay/core/dist/redaction.js +768 -0
  151. package/node_modules/@agenticreplay/core/dist/redaction.js.map +1 -0
  152. package/node_modules/@agenticreplay/core/dist/writer.d.ts +75 -0
  153. package/node_modules/@agenticreplay/core/dist/writer.d.ts.map +1 -0
  154. package/node_modules/@agenticreplay/core/dist/writer.js +368 -0
  155. package/node_modules/@agenticreplay/core/dist/writer.js.map +1 -0
  156. package/node_modules/@agenticreplay/core/package.json +26 -0
  157. package/node_modules/@agenticreplay/fs-capture/dist/capture.d.ts +84 -0
  158. package/node_modules/@agenticreplay/fs-capture/dist/capture.d.ts.map +1 -0
  159. package/node_modules/@agenticreplay/fs-capture/dist/capture.js +147 -0
  160. package/node_modules/@agenticreplay/fs-capture/dist/capture.js.map +1 -0
  161. package/node_modules/@agenticreplay/fs-capture/dist/git.d.ts +25 -0
  162. package/node_modules/@agenticreplay/fs-capture/dist/git.d.ts.map +1 -0
  163. package/node_modules/@agenticreplay/fs-capture/dist/git.js +108 -0
  164. package/node_modules/@agenticreplay/fs-capture/dist/git.js.map +1 -0
  165. package/node_modules/@agenticreplay/fs-capture/dist/index.d.ts +4 -0
  166. package/node_modules/@agenticreplay/fs-capture/dist/index.d.ts.map +1 -0
  167. package/node_modules/@agenticreplay/fs-capture/dist/index.js +4 -0
  168. package/node_modules/@agenticreplay/fs-capture/dist/index.js.map +1 -0
  169. package/node_modules/@agenticreplay/fs-capture/dist/shadow.d.ts +271 -0
  170. package/node_modules/@agenticreplay/fs-capture/dist/shadow.d.ts.map +1 -0
  171. package/node_modules/@agenticreplay/fs-capture/dist/shadow.js +668 -0
  172. package/node_modules/@agenticreplay/fs-capture/dist/shadow.js.map +1 -0
  173. package/node_modules/@agenticreplay/fs-capture/package.json +25 -0
  174. package/node_modules/@agenticreplay/mcp-shim/dist/cli.d.ts +100 -0
  175. package/node_modules/@agenticreplay/mcp-shim/dist/cli.d.ts.map +1 -0
  176. package/node_modules/@agenticreplay/mcp-shim/dist/cli.js +334 -0
  177. package/node_modules/@agenticreplay/mcp-shim/dist/cli.js.map +1 -0
  178. package/node_modules/@agenticreplay/mcp-shim/dist/framing.d.ts +41 -0
  179. package/node_modules/@agenticreplay/mcp-shim/dist/framing.d.ts.map +1 -0
  180. package/node_modules/@agenticreplay/mcp-shim/dist/framing.js +94 -0
  181. package/node_modules/@agenticreplay/mcp-shim/dist/framing.js.map +1 -0
  182. package/node_modules/@agenticreplay/mcp-shim/dist/index.d.ts +5 -0
  183. package/node_modules/@agenticreplay/mcp-shim/dist/index.d.ts.map +1 -0
  184. package/node_modules/@agenticreplay/mcp-shim/dist/index.js +5 -0
  185. package/node_modules/@agenticreplay/mcp-shim/dist/index.js.map +1 -0
  186. package/node_modules/@agenticreplay/mcp-shim/dist/mock.d.ts +70 -0
  187. package/node_modules/@agenticreplay/mcp-shim/dist/mock.d.ts.map +1 -0
  188. package/node_modules/@agenticreplay/mcp-shim/dist/mock.js +138 -0
  189. package/node_modules/@agenticreplay/mcp-shim/dist/mock.js.map +1 -0
  190. package/node_modules/@agenticreplay/mcp-shim/dist/shim.d.ts +24 -0
  191. package/node_modules/@agenticreplay/mcp-shim/dist/shim.d.ts.map +1 -0
  192. package/node_modules/@agenticreplay/mcp-shim/dist/shim.js +105 -0
  193. package/node_modules/@agenticreplay/mcp-shim/dist/shim.js.map +1 -0
  194. package/node_modules/@agenticreplay/mcp-shim/package.json +26 -0
  195. package/node_modules/@agenticreplay/node-instrument/dist/capture.d.ts +58 -0
  196. package/node_modules/@agenticreplay/node-instrument/dist/capture.d.ts.map +1 -0
  197. package/node_modules/@agenticreplay/node-instrument/dist/capture.js +404 -0
  198. package/node_modules/@agenticreplay/node-instrument/dist/capture.js.map +1 -0
  199. package/node_modules/@agenticreplay/node-instrument/dist/index.d.ts +4 -0
  200. package/node_modules/@agenticreplay/node-instrument/dist/index.d.ts.map +1 -0
  201. package/node_modules/@agenticreplay/node-instrument/dist/index.js +4 -0
  202. package/node_modules/@agenticreplay/node-instrument/dist/index.js.map +1 -0
  203. package/node_modules/@agenticreplay/node-instrument/dist/install.d.ts +47 -0
  204. package/node_modules/@agenticreplay/node-instrument/dist/install.d.ts.map +1 -0
  205. package/node_modules/@agenticreplay/node-instrument/dist/install.js +174 -0
  206. package/node_modules/@agenticreplay/node-instrument/dist/install.js.map +1 -0
  207. package/node_modules/@agenticreplay/node-instrument/dist/rewrite.d.ts +33 -0
  208. package/node_modules/@agenticreplay/node-instrument/dist/rewrite.d.ts.map +1 -0
  209. package/node_modules/@agenticreplay/node-instrument/dist/rewrite.js +61 -0
  210. package/node_modules/@agenticreplay/node-instrument/dist/rewrite.js.map +1 -0
  211. package/node_modules/@agenticreplay/node-instrument/package.json +23 -0
  212. package/node_modules/@agenticreplay/plugin-api/dist/canonical.d.ts +87 -0
  213. package/node_modules/@agenticreplay/plugin-api/dist/canonical.d.ts.map +1 -0
  214. package/node_modules/@agenticreplay/plugin-api/dist/canonical.js +10 -0
  215. package/node_modules/@agenticreplay/plugin-api/dist/canonical.js.map +1 -0
  216. package/node_modules/@agenticreplay/plugin-api/dist/index.d.ts +3 -0
  217. package/node_modules/@agenticreplay/plugin-api/dist/index.d.ts.map +1 -0
  218. package/node_modules/@agenticreplay/plugin-api/dist/index.js +3 -0
  219. package/node_modules/@agenticreplay/plugin-api/dist/index.js.map +1 -0
  220. package/node_modules/@agenticreplay/plugin-api/dist/plugins.d.ts +258 -0
  221. package/node_modules/@agenticreplay/plugin-api/dist/plugins.d.ts.map +1 -0
  222. package/node_modules/@agenticreplay/plugin-api/dist/plugins.js +2 -0
  223. package/node_modules/@agenticreplay/plugin-api/dist/plugins.js.map +1 -0
  224. package/node_modules/@agenticreplay/plugin-api/package.json +22 -0
  225. package/node_modules/@agenticreplay/providers/dist/index.d.ts +34 -0
  226. package/node_modules/@agenticreplay/providers/dist/index.d.ts.map +1 -0
  227. package/node_modules/@agenticreplay/providers/dist/index.js +34 -0
  228. package/node_modules/@agenticreplay/providers/dist/index.js.map +1 -0
  229. package/node_modules/@agenticreplay/providers/dist/pricing.d.ts +44 -0
  230. package/node_modules/@agenticreplay/providers/dist/pricing.d.ts.map +1 -0
  231. package/node_modules/@agenticreplay/providers/dist/pricing.js +126 -0
  232. package/node_modules/@agenticreplay/providers/dist/pricing.js.map +1 -0
  233. package/node_modules/@agenticreplay/providers/dist/translate/anthropic.d.ts +66 -0
  234. package/node_modules/@agenticreplay/providers/dist/translate/anthropic.d.ts.map +1 -0
  235. package/node_modules/@agenticreplay/providers/dist/translate/anthropic.js +569 -0
  236. package/node_modules/@agenticreplay/providers/dist/translate/anthropic.js.map +1 -0
  237. package/node_modules/@agenticreplay/providers/dist/translate/openai-responses.d.ts +51 -0
  238. package/node_modules/@agenticreplay/providers/dist/translate/openai-responses.d.ts.map +1 -0
  239. package/node_modules/@agenticreplay/providers/dist/translate/openai-responses.js +574 -0
  240. package/node_modules/@agenticreplay/providers/dist/translate/openai-responses.js.map +1 -0
  241. package/node_modules/@agenticreplay/providers/dist/translate/openai.d.ts +60 -0
  242. package/node_modules/@agenticreplay/providers/dist/translate/openai.d.ts.map +1 -0
  243. package/node_modules/@agenticreplay/providers/dist/translate/openai.js +577 -0
  244. package/node_modules/@agenticreplay/providers/dist/translate/openai.js.map +1 -0
  245. package/node_modules/@agenticreplay/providers/dist/translate/sse.d.ts +29 -0
  246. package/node_modules/@agenticreplay/providers/dist/translate/sse.d.ts.map +1 -0
  247. package/node_modules/@agenticreplay/providers/dist/translate/sse.js +97 -0
  248. package/node_modules/@agenticreplay/providers/dist/translate/sse.js.map +1 -0
  249. package/node_modules/@agenticreplay/providers/dist/translate/util.d.ts +34 -0
  250. package/node_modules/@agenticreplay/providers/dist/translate/util.d.ts.map +1 -0
  251. package/node_modules/@agenticreplay/providers/dist/translate/util.js +106 -0
  252. package/node_modules/@agenticreplay/providers/dist/translate/util.js.map +1 -0
  253. package/node_modules/@agenticreplay/providers/package.json +26 -0
  254. package/node_modules/@agenticreplay/proxy/dist/ca.d.ts +45 -0
  255. package/node_modules/@agenticreplay/proxy/dist/ca.d.ts.map +1 -0
  256. package/node_modules/@agenticreplay/proxy/dist/ca.js +264 -0
  257. package/node_modules/@agenticreplay/proxy/dist/ca.js.map +1 -0
  258. package/node_modules/@agenticreplay/proxy/dist/der.d.ts +51 -0
  259. package/node_modules/@agenticreplay/proxy/dist/der.d.ts.map +1 -0
  260. package/node_modules/@agenticreplay/proxy/dist/der.js +144 -0
  261. package/node_modules/@agenticreplay/proxy/dist/der.js.map +1 -0
  262. package/node_modules/@agenticreplay/proxy/dist/dialects.d.ts +81 -0
  263. package/node_modules/@agenticreplay/proxy/dist/dialects.d.ts.map +1 -0
  264. package/node_modules/@agenticreplay/proxy/dist/dialects.js +329 -0
  265. package/node_modules/@agenticreplay/proxy/dist/dialects.js.map +1 -0
  266. package/node_modules/@agenticreplay/proxy/dist/forward.d.ts +34 -0
  267. package/node_modules/@agenticreplay/proxy/dist/forward.d.ts.map +1 -0
  268. package/node_modules/@agenticreplay/proxy/dist/forward.js +44 -0
  269. package/node_modules/@agenticreplay/proxy/dist/forward.js.map +1 -0
  270. package/node_modules/@agenticreplay/proxy/dist/index.d.ts +9 -0
  271. package/node_modules/@agenticreplay/proxy/dist/index.d.ts.map +1 -0
  272. package/node_modules/@agenticreplay/proxy/dist/index.js +9 -0
  273. package/node_modules/@agenticreplay/proxy/dist/index.js.map +1 -0
  274. package/node_modules/@agenticreplay/proxy/dist/intercept.d.ts +234 -0
  275. package/node_modules/@agenticreplay/proxy/dist/intercept.d.ts.map +1 -0
  276. package/node_modules/@agenticreplay/proxy/dist/intercept.js +1258 -0
  277. package/node_modules/@agenticreplay/proxy/dist/intercept.js.map +1 -0
  278. package/node_modules/@agenticreplay/proxy/dist/matching.d.ts +109 -0
  279. package/node_modules/@agenticreplay/proxy/dist/matching.d.ts.map +1 -0
  280. package/node_modules/@agenticreplay/proxy/dist/matching.js +928 -0
  281. package/node_modules/@agenticreplay/proxy/dist/matching.js.map +1 -0
  282. package/node_modules/@agenticreplay/proxy/dist/retrieval.d.ts +93 -0
  283. package/node_modules/@agenticreplay/proxy/dist/retrieval.d.ts.map +1 -0
  284. package/node_modules/@agenticreplay/proxy/dist/retrieval.js +233 -0
  285. package/node_modules/@agenticreplay/proxy/dist/retrieval.js.map +1 -0
  286. package/node_modules/@agenticreplay/proxy/dist/server.d.ts +327 -0
  287. package/node_modules/@agenticreplay/proxy/dist/server.d.ts.map +1 -0
  288. package/node_modules/@agenticreplay/proxy/dist/server.js +2291 -0
  289. package/node_modules/@agenticreplay/proxy/dist/server.js.map +1 -0
  290. package/node_modules/@agenticreplay/proxy/dist/tls-hosts.d.ts +54 -0
  291. package/node_modules/@agenticreplay/proxy/dist/tls-hosts.d.ts.map +1 -0
  292. package/node_modules/@agenticreplay/proxy/dist/tls-hosts.js +178 -0
  293. package/node_modules/@agenticreplay/proxy/dist/tls-hosts.js.map +1 -0
  294. package/node_modules/@agenticreplay/proxy/package.json +28 -0
  295. package/node_modules/@agenticreplay/schema/dist/constants.d.ts +30 -0
  296. package/node_modules/@agenticreplay/schema/dist/constants.d.ts.map +1 -0
  297. package/node_modules/@agenticreplay/schema/dist/constants.js +66 -0
  298. package/node_modules/@agenticreplay/schema/dist/constants.js.map +1 -0
  299. package/node_modules/@agenticreplay/schema/dist/index.d.ts +4 -0
  300. package/node_modules/@agenticreplay/schema/dist/index.d.ts.map +1 -0
  301. package/node_modules/@agenticreplay/schema/dist/index.js +4 -0
  302. package/node_modules/@agenticreplay/schema/dist/index.js.map +1 -0
  303. package/node_modules/@agenticreplay/schema/dist/types.d.ts +97 -0
  304. package/node_modules/@agenticreplay/schema/dist/types.d.ts.map +1 -0
  305. package/node_modules/@agenticreplay/schema/dist/types.js +7 -0
  306. package/node_modules/@agenticreplay/schema/dist/types.js.map +1 -0
  307. package/node_modules/@agenticreplay/schema/dist/validate.d.ts +13 -0
  308. package/node_modules/@agenticreplay/schema/dist/validate.d.ts.map +1 -0
  309. package/node_modules/@agenticreplay/schema/dist/validate.js +44 -0
  310. package/node_modules/@agenticreplay/schema/dist/validate.js.map +1 -0
  311. package/node_modules/@agenticreplay/schema/package.json +28 -0
  312. package/node_modules/@agenticreplay/shell-shim/dist/index.d.ts +4 -0
  313. package/node_modules/@agenticreplay/shell-shim/dist/index.d.ts.map +1 -0
  314. package/node_modules/@agenticreplay/shell-shim/dist/index.js +4 -0
  315. package/node_modules/@agenticreplay/shell-shim/dist/index.js.map +1 -0
  316. package/node_modules/@agenticreplay/shell-shim/dist/install.d.ts +75 -0
  317. package/node_modules/@agenticreplay/shell-shim/dist/install.d.ts.map +1 -0
  318. package/node_modules/@agenticreplay/shell-shim/dist/install.js +353 -0
  319. package/node_modules/@agenticreplay/shell-shim/dist/install.js.map +1 -0
  320. package/node_modules/@agenticreplay/shell-shim/dist/resolve.d.ts +2 -0
  321. package/node_modules/@agenticreplay/shell-shim/dist/resolve.d.ts.map +1 -0
  322. package/node_modules/@agenticreplay/shell-shim/dist/resolve.js +97 -0
  323. package/node_modules/@agenticreplay/shell-shim/dist/resolve.js.map +1 -0
  324. package/node_modules/@agenticreplay/shell-shim/dist/runner-bin.d.ts +3 -0
  325. package/node_modules/@agenticreplay/shell-shim/dist/runner-bin.d.ts.map +1 -0
  326. package/node_modules/@agenticreplay/shell-shim/dist/runner-bin.js +4 -0
  327. package/node_modules/@agenticreplay/shell-shim/dist/runner-bin.js.map +1 -0
  328. package/node_modules/@agenticreplay/shell-shim/dist/runner.d.ts +45 -0
  329. package/node_modules/@agenticreplay/shell-shim/dist/runner.d.ts.map +1 -0
  330. package/node_modules/@agenticreplay/shell-shim/dist/runner.js +105 -0
  331. package/node_modules/@agenticreplay/shell-shim/dist/runner.js.map +1 -0
  332. package/node_modules/@agenticreplay/shell-shim/package.json +26 -0
  333. package/node_modules/@agenticreplay/viewer/dist/bundle.d.ts +11 -0
  334. package/node_modules/@agenticreplay/viewer/dist/bundle.d.ts.map +1 -0
  335. package/node_modules/@agenticreplay/viewer/dist/bundle.js +36 -0
  336. package/node_modules/@agenticreplay/viewer/dist/bundle.js.map +1 -0
  337. package/node_modules/@agenticreplay/viewer/dist/client/main.d.ts +12 -0
  338. package/node_modules/@agenticreplay/viewer/dist/client/main.d.ts.map +1 -0
  339. package/node_modules/@agenticreplay/viewer/dist/client/main.js +249 -0
  340. package/node_modules/@agenticreplay/viewer/dist/client/main.js.map +1 -0
  341. package/node_modules/@agenticreplay/viewer/dist/credit.d.ts +22 -0
  342. package/node_modules/@agenticreplay/viewer/dist/credit.d.ts.map +1 -0
  343. package/node_modules/@agenticreplay/viewer/dist/credit.js +22 -0
  344. package/node_modules/@agenticreplay/viewer/dist/credit.js.map +1 -0
  345. package/node_modules/@agenticreplay/viewer/dist/css.d.ts +11 -0
  346. package/node_modules/@agenticreplay/viewer/dist/css.d.ts.map +1 -0
  347. package/node_modules/@agenticreplay/viewer/dist/css.js +410 -0
  348. package/node_modules/@agenticreplay/viewer/dist/css.js.map +1 -0
  349. package/node_modules/@agenticreplay/viewer/dist/export.d.ts +21 -0
  350. package/node_modules/@agenticreplay/viewer/dist/export.d.ts.map +1 -0
  351. package/node_modules/@agenticreplay/viewer/dist/export.js +22 -0
  352. package/node_modules/@agenticreplay/viewer/dist/export.js.map +1 -0
  353. package/node_modules/@agenticreplay/viewer/dist/html.d.ts +32 -0
  354. package/node_modules/@agenticreplay/viewer/dist/html.d.ts.map +1 -0
  355. package/node_modules/@agenticreplay/viewer/dist/html.js +252 -0
  356. package/node_modules/@agenticreplay/viewer/dist/html.js.map +1 -0
  357. package/node_modules/@agenticreplay/viewer/dist/index.d.ts +16 -0
  358. package/node_modules/@agenticreplay/viewer/dist/index.d.ts.map +1 -0
  359. package/node_modules/@agenticreplay/viewer/dist/index.js +16 -0
  360. package/node_modules/@agenticreplay/viewer/dist/index.js.map +1 -0
  361. package/node_modules/@agenticreplay/viewer/dist/render.d.ts +126 -0
  362. package/node_modules/@agenticreplay/viewer/dist/render.d.ts.map +1 -0
  363. package/node_modules/@agenticreplay/viewer/dist/render.js +699 -0
  364. package/node_modules/@agenticreplay/viewer/dist/render.js.map +1 -0
  365. package/node_modules/@agenticreplay/viewer/dist/serve.d.ts +21 -0
  366. package/node_modules/@agenticreplay/viewer/dist/serve.d.ts.map +1 -0
  367. package/node_modules/@agenticreplay/viewer/dist/serve.js +122 -0
  368. package/node_modules/@agenticreplay/viewer/dist/serve.js.map +1 -0
  369. package/node_modules/@agenticreplay/viewer/dist/trace-dir.d.ts +28 -0
  370. package/node_modules/@agenticreplay/viewer/dist/trace-dir.d.ts.map +1 -0
  371. package/node_modules/@agenticreplay/viewer/dist/trace-dir.js +120 -0
  372. package/node_modules/@agenticreplay/viewer/dist/trace-dir.js.map +1 -0
  373. package/node_modules/@agenticreplay/viewer/package.json +25 -0
  374. package/node_modules/ajv/.runkit_example.js +23 -0
  375. package/node_modules/ajv/LICENSE +22 -0
  376. package/node_modules/ajv/README.md +207 -0
  377. package/node_modules/ajv/dist/2019.d.ts +19 -0
  378. package/node_modules/ajv/dist/2019.js +61 -0
  379. package/node_modules/ajv/dist/2019.js.map +1 -0
  380. package/node_modules/ajv/dist/2020.d.ts +19 -0
  381. package/node_modules/ajv/dist/2020.js +55 -0
  382. package/node_modules/ajv/dist/2020.js.map +1 -0
  383. package/node_modules/ajv/dist/ajv.d.ts +18 -0
  384. package/node_modules/ajv/dist/ajv.js +50 -0
  385. package/node_modules/ajv/dist/ajv.js.map +1 -0
  386. package/node_modules/ajv/dist/compile/codegen/code.d.ts +40 -0
  387. package/node_modules/ajv/dist/compile/codegen/code.js +156 -0
  388. package/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
  389. package/node_modules/ajv/dist/compile/codegen/index.d.ts +79 -0
  390. package/node_modules/ajv/dist/compile/codegen/index.js +697 -0
  391. package/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
  392. package/node_modules/ajv/dist/compile/codegen/scope.d.ts +79 -0
  393. package/node_modules/ajv/dist/compile/codegen/scope.js +143 -0
  394. package/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
  395. package/node_modules/ajv/dist/compile/errors.d.ts +13 -0
  396. package/node_modules/ajv/dist/compile/errors.js +123 -0
  397. package/node_modules/ajv/dist/compile/errors.js.map +1 -0
  398. package/node_modules/ajv/dist/compile/index.d.ts +80 -0
  399. package/node_modules/ajv/dist/compile/index.js +242 -0
  400. package/node_modules/ajv/dist/compile/index.js.map +1 -0
  401. package/node_modules/ajv/dist/compile/jtd/parse.d.ts +4 -0
  402. package/node_modules/ajv/dist/compile/jtd/parse.js +350 -0
  403. package/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -0
  404. package/node_modules/ajv/dist/compile/jtd/serialize.d.ts +4 -0
  405. package/node_modules/ajv/dist/compile/jtd/serialize.js +236 -0
  406. package/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -0
  407. package/node_modules/ajv/dist/compile/jtd/types.d.ts +6 -0
  408. package/node_modules/ajv/dist/compile/jtd/types.js +14 -0
  409. package/node_modules/ajv/dist/compile/jtd/types.js.map +1 -0
  410. package/node_modules/ajv/dist/compile/names.d.ts +20 -0
  411. package/node_modules/ajv/dist/compile/names.js +28 -0
  412. package/node_modules/ajv/dist/compile/names.js.map +1 -0
  413. package/node_modules/ajv/dist/compile/ref_error.d.ts +6 -0
  414. package/node_modules/ajv/dist/compile/ref_error.js +12 -0
  415. package/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
  416. package/node_modules/ajv/dist/compile/resolve.d.ts +12 -0
  417. package/node_modules/ajv/dist/compile/resolve.js +155 -0
  418. package/node_modules/ajv/dist/compile/resolve.js.map +1 -0
  419. package/node_modules/ajv/dist/compile/rules.d.ts +28 -0
  420. package/node_modules/ajv/dist/compile/rules.js +26 -0
  421. package/node_modules/ajv/dist/compile/rules.js.map +1 -0
  422. package/node_modules/ajv/dist/compile/util.d.ts +40 -0
  423. package/node_modules/ajv/dist/compile/util.js +178 -0
  424. package/node_modules/ajv/dist/compile/util.js.map +1 -0
  425. package/node_modules/ajv/dist/compile/validate/applicability.d.ts +6 -0
  426. package/node_modules/ajv/dist/compile/validate/applicability.js +19 -0
  427. package/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
  428. package/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +4 -0
  429. package/node_modules/ajv/dist/compile/validate/boolSchema.js +50 -0
  430. package/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
  431. package/node_modules/ajv/dist/compile/validate/dataType.d.ts +17 -0
  432. package/node_modules/ajv/dist/compile/validate/dataType.js +203 -0
  433. package/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
  434. package/node_modules/ajv/dist/compile/validate/defaults.d.ts +2 -0
  435. package/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
  436. package/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
  437. package/node_modules/ajv/dist/compile/validate/index.d.ts +42 -0
  438. package/node_modules/ajv/dist/compile/validate/index.js +520 -0
  439. package/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
  440. package/node_modules/ajv/dist/compile/validate/keyword.d.ts +8 -0
  441. package/node_modules/ajv/dist/compile/validate/keyword.js +124 -0
  442. package/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
  443. package/node_modules/ajv/dist/compile/validate/subschema.d.ts +47 -0
  444. package/node_modules/ajv/dist/compile/validate/subschema.js +81 -0
  445. package/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
  446. package/node_modules/ajv/dist/core.d.ts +174 -0
  447. package/node_modules/ajv/dist/core.js +618 -0
  448. package/node_modules/ajv/dist/core.js.map +1 -0
  449. package/node_modules/ajv/dist/jtd.d.ts +47 -0
  450. package/node_modules/ajv/dist/jtd.js +72 -0
  451. package/node_modules/ajv/dist/jtd.js.map +1 -0
  452. package/node_modules/ajv/dist/refs/data.json +13 -0
  453. package/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +2 -0
  454. package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +28 -0
  455. package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map +1 -0
  456. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +53 -0
  457. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +17 -0
  458. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +57 -0
  459. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +14 -0
  460. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +37 -0
  461. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +90 -0
  462. package/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +39 -0
  463. package/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +2 -0
  464. package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +30 -0
  465. package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map +1 -0
  466. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +48 -0
  467. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +17 -0
  468. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +51 -0
  469. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  470. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  471. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  472. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +90 -0
  473. package/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +55 -0
  474. package/node_modules/ajv/dist/refs/json-schema-draft-06.json +137 -0
  475. package/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
  476. package/node_modules/ajv/dist/refs/json-schema-secure.json +88 -0
  477. package/node_modules/ajv/dist/refs/jtd-schema.d.ts +3 -0
  478. package/node_modules/ajv/dist/refs/jtd-schema.js +118 -0
  479. package/node_modules/ajv/dist/refs/jtd-schema.js.map +1 -0
  480. package/node_modules/ajv/dist/runtime/equal.d.ts +6 -0
  481. package/node_modules/ajv/dist/runtime/equal.js +7 -0
  482. package/node_modules/ajv/dist/runtime/equal.js.map +1 -0
  483. package/node_modules/ajv/dist/runtime/parseJson.d.ts +18 -0
  484. package/node_modules/ajv/dist/runtime/parseJson.js +185 -0
  485. package/node_modules/ajv/dist/runtime/parseJson.js.map +1 -0
  486. package/node_modules/ajv/dist/runtime/quote.d.ts +5 -0
  487. package/node_modules/ajv/dist/runtime/quote.js +30 -0
  488. package/node_modules/ajv/dist/runtime/quote.js.map +1 -0
  489. package/node_modules/ajv/dist/runtime/re2.d.ts +6 -0
  490. package/node_modules/ajv/dist/runtime/re2.js +6 -0
  491. package/node_modules/ajv/dist/runtime/re2.js.map +1 -0
  492. package/node_modules/ajv/dist/runtime/timestamp.d.ts +5 -0
  493. package/node_modules/ajv/dist/runtime/timestamp.js +42 -0
  494. package/node_modules/ajv/dist/runtime/timestamp.js.map +1 -0
  495. package/node_modules/ajv/dist/runtime/ucs2length.d.ts +5 -0
  496. package/node_modules/ajv/dist/runtime/ucs2length.js +24 -0
  497. package/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
  498. package/node_modules/ajv/dist/runtime/uri.d.ts +6 -0
  499. package/node_modules/ajv/dist/runtime/uri.js +6 -0
  500. package/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  501. package/node_modules/ajv/dist/runtime/validation_error.d.ts +7 -0
  502. package/node_modules/ajv/dist/runtime/validation_error.js +11 -0
  503. package/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
  504. package/node_modules/ajv/dist/standalone/index.d.ts +6 -0
  505. package/node_modules/ajv/dist/standalone/index.js +90 -0
  506. package/node_modules/ajv/dist/standalone/index.js.map +1 -0
  507. package/node_modules/ajv/dist/standalone/instance.d.ts +12 -0
  508. package/node_modules/ajv/dist/standalone/instance.js +35 -0
  509. package/node_modules/ajv/dist/standalone/instance.js.map +1 -0
  510. package/node_modules/ajv/dist/types/index.d.ts +183 -0
  511. package/node_modules/ajv/dist/types/index.js +3 -0
  512. package/node_modules/ajv/dist/types/index.js.map +1 -0
  513. package/node_modules/ajv/dist/types/json-schema.d.ts +125 -0
  514. package/node_modules/ajv/dist/types/json-schema.js +3 -0
  515. package/node_modules/ajv/dist/types/json-schema.js.map +1 -0
  516. package/node_modules/ajv/dist/types/jtd-schema.d.ts +174 -0
  517. package/node_modules/ajv/dist/types/jtd-schema.js +3 -0
  518. package/node_modules/ajv/dist/types/jtd-schema.js.map +1 -0
  519. package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +8 -0
  520. package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
  521. package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
  522. package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +6 -0
  523. package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
  524. package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
  525. package/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +3 -0
  526. package/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
  527. package/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
  528. package/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +4 -0
  529. package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
  530. package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
  531. package/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +7 -0
  532. package/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -0
  533. package/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
  534. package/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +21 -0
  535. package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +85 -0
  536. package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
  537. package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +3 -0
  538. package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +11 -0
  539. package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map +1 -0
  540. package/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +6 -0
  541. package/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
  542. package/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
  543. package/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +13 -0
  544. package/node_modules/ajv/dist/vocabularies/applicator/index.js +44 -0
  545. package/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
  546. package/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +5 -0
  547. package/node_modules/ajv/dist/vocabularies/applicator/items.js +52 -0
  548. package/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
  549. package/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +6 -0
  550. package/node_modules/ajv/dist/vocabularies/applicator/items2020.js +30 -0
  551. package/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
  552. package/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +4 -0
  553. package/node_modules/ajv/dist/vocabularies/applicator/not.js +26 -0
  554. package/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
  555. package/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +6 -0
  556. package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -0
  557. package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
  558. package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +3 -0
  559. package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +75 -0
  560. package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
  561. package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +3 -0
  562. package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +12 -0
  563. package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
  564. package/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +3 -0
  565. package/node_modules/ajv/dist/vocabularies/applicator/properties.js +54 -0
  566. package/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
  567. package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +6 -0
  568. package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +38 -0
  569. package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
  570. package/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +3 -0
  571. package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +13 -0
  572. package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
  573. package/node_modules/ajv/dist/vocabularies/code.d.ts +17 -0
  574. package/node_modules/ajv/dist/vocabularies/code.js +131 -0
  575. package/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
  576. package/node_modules/ajv/dist/vocabularies/core/id.d.ts +3 -0
  577. package/node_modules/ajv/dist/vocabularies/core/id.js +10 -0
  578. package/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
  579. package/node_modules/ajv/dist/vocabularies/core/index.d.ts +3 -0
  580. package/node_modules/ajv/dist/vocabularies/core/index.js +16 -0
  581. package/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
  582. package/node_modules/ajv/dist/vocabularies/core/ref.d.ts +8 -0
  583. package/node_modules/ajv/dist/vocabularies/core/ref.js +122 -0
  584. package/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
  585. package/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +5 -0
  586. package/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -0
  587. package/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
  588. package/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +10 -0
  589. package/node_modules/ajv/dist/vocabularies/discriminator/types.js +9 -0
  590. package/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
  591. package/node_modules/ajv/dist/vocabularies/draft2020.d.ts +3 -0
  592. package/node_modules/ajv/dist/vocabularies/draft2020.js +23 -0
  593. package/node_modules/ajv/dist/vocabularies/draft2020.js.map +1 -0
  594. package/node_modules/ajv/dist/vocabularies/draft7.d.ts +3 -0
  595. package/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
  596. package/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
  597. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +5 -0
  598. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +30 -0
  599. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map +1 -0
  600. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +5 -0
  601. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +51 -0
  602. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +1 -0
  603. package/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +3 -0
  604. package/node_modules/ajv/dist/vocabularies/dynamic/index.js +9 -0
  605. package/node_modules/ajv/dist/vocabularies/dynamic/index.js.map +1 -0
  606. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +3 -0
  607. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +16 -0
  608. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map +1 -0
  609. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +3 -0
  610. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +10 -0
  611. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map +1 -0
  612. package/node_modules/ajv/dist/vocabularies/errors.d.ts +9 -0
  613. package/node_modules/ajv/dist/vocabularies/errors.js +3 -0
  614. package/node_modules/ajv/dist/vocabularies/errors.js.map +1 -0
  615. package/node_modules/ajv/dist/vocabularies/format/format.d.ts +8 -0
  616. package/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
  617. package/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
  618. package/node_modules/ajv/dist/vocabularies/format/index.d.ts +3 -0
  619. package/node_modules/ajv/dist/vocabularies/format/index.js +6 -0
  620. package/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
  621. package/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +6 -0
  622. package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +71 -0
  623. package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +1 -0
  624. package/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +5 -0
  625. package/node_modules/ajv/dist/vocabularies/jtd/elements.js +24 -0
  626. package/node_modules/ajv/dist/vocabularies/jtd/elements.js.map +1 -0
  627. package/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +6 -0
  628. package/node_modules/ajv/dist/vocabularies/jtd/enum.js +43 -0
  629. package/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +1 -0
  630. package/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +9 -0
  631. package/node_modules/ajv/dist/vocabularies/jtd/error.js +20 -0
  632. package/node_modules/ajv/dist/vocabularies/jtd/error.js.map +1 -0
  633. package/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +10 -0
  634. package/node_modules/ajv/dist/vocabularies/jtd/index.js +29 -0
  635. package/node_modules/ajv/dist/vocabularies/jtd/index.js.map +1 -0
  636. package/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +5 -0
  637. package/node_modules/ajv/dist/vocabularies/jtd/metadata.js +25 -0
  638. package/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +1 -0
  639. package/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +4 -0
  640. package/node_modules/ajv/dist/vocabularies/jtd/nullable.js +22 -0
  641. package/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +1 -0
  642. package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +3 -0
  643. package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +15 -0
  644. package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map +1 -0
  645. package/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +22 -0
  646. package/node_modules/ajv/dist/vocabularies/jtd/properties.js +149 -0
  647. package/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +1 -0
  648. package/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +4 -0
  649. package/node_modules/ajv/dist/vocabularies/jtd/ref.js +67 -0
  650. package/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +1 -0
  651. package/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +10 -0
  652. package/node_modules/ajv/dist/vocabularies/jtd/type.js +69 -0
  653. package/node_modules/ajv/dist/vocabularies/jtd/type.js.map +1 -0
  654. package/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +3 -0
  655. package/node_modules/ajv/dist/vocabularies/jtd/union.js +12 -0
  656. package/node_modules/ajv/dist/vocabularies/jtd/union.js.map +1 -0
  657. package/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +5 -0
  658. package/node_modules/ajv/dist/vocabularies/jtd/values.js +51 -0
  659. package/node_modules/ajv/dist/vocabularies/jtd/values.js.map +1 -0
  660. package/node_modules/ajv/dist/vocabularies/metadata.d.ts +3 -0
  661. package/node_modules/ajv/dist/vocabularies/metadata.js +18 -0
  662. package/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
  663. package/node_modules/ajv/dist/vocabularies/next.d.ts +3 -0
  664. package/node_modules/ajv/dist/vocabularies/next.js +8 -0
  665. package/node_modules/ajv/dist/vocabularies/next.js.map +1 -0
  666. package/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +3 -0
  667. package/node_modules/ajv/dist/vocabularies/unevaluated/index.js +7 -0
  668. package/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map +1 -0
  669. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +6 -0
  670. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +40 -0
  671. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +1 -0
  672. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +6 -0
  673. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +65 -0
  674. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +1 -0
  675. package/node_modules/ajv/dist/vocabularies/validation/const.d.ts +6 -0
  676. package/node_modules/ajv/dist/vocabularies/validation/const.js +25 -0
  677. package/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
  678. package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +5 -0
  679. package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +12 -0
  680. package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map +1 -0
  681. package/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +8 -0
  682. package/node_modules/ajv/dist/vocabularies/validation/enum.js +48 -0
  683. package/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
  684. package/node_modules/ajv/dist/vocabularies/validation/index.d.ts +16 -0
  685. package/node_modules/ajv/dist/vocabularies/validation/index.js +33 -0
  686. package/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
  687. package/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +3 -0
  688. package/node_modules/ajv/dist/vocabularies/validation/limitContains.js +15 -0
  689. package/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +1 -0
  690. package/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +3 -0
  691. package/node_modules/ajv/dist/vocabularies/validation/limitItems.js +24 -0
  692. package/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
  693. package/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +3 -0
  694. package/node_modules/ajv/dist/vocabularies/validation/limitLength.js +27 -0
  695. package/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
  696. package/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +11 -0
  697. package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +27 -0
  698. package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
  699. package/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +3 -0
  700. package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +24 -0
  701. package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
  702. package/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +8 -0
  703. package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +26 -0
  704. package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
  705. package/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +8 -0
  706. package/node_modules/ajv/dist/vocabularies/validation/pattern.js +33 -0
  707. package/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  708. package/node_modules/ajv/dist/vocabularies/validation/required.d.ts +8 -0
  709. package/node_modules/ajv/dist/vocabularies/validation/required.js +79 -0
  710. package/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
  711. package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +9 -0
  712. package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +64 -0
  713. package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
  714. package/node_modules/ajv/lib/2019.ts +81 -0
  715. package/node_modules/ajv/lib/2020.ts +75 -0
  716. package/node_modules/ajv/lib/ajv.ts +70 -0
  717. package/node_modules/ajv/lib/compile/codegen/code.ts +169 -0
  718. package/node_modules/ajv/lib/compile/codegen/index.ts +852 -0
  719. package/node_modules/ajv/lib/compile/codegen/scope.ts +215 -0
  720. package/node_modules/ajv/lib/compile/errors.ts +184 -0
  721. package/node_modules/ajv/lib/compile/index.ts +324 -0
  722. package/node_modules/ajv/lib/compile/jtd/parse.ts +411 -0
  723. package/node_modules/ajv/lib/compile/jtd/serialize.ts +277 -0
  724. package/node_modules/ajv/lib/compile/jtd/types.ts +16 -0
  725. package/node_modules/ajv/lib/compile/names.ts +27 -0
  726. package/node_modules/ajv/lib/compile/ref_error.ts +13 -0
  727. package/node_modules/ajv/lib/compile/resolve.ts +149 -0
  728. package/node_modules/ajv/lib/compile/rules.ts +50 -0
  729. package/node_modules/ajv/lib/compile/util.ts +213 -0
  730. package/node_modules/ajv/lib/compile/validate/applicability.ts +22 -0
  731. package/node_modules/ajv/lib/compile/validate/boolSchema.ts +47 -0
  732. package/node_modules/ajv/lib/compile/validate/dataType.ts +230 -0
  733. package/node_modules/ajv/lib/compile/validate/defaults.ts +32 -0
  734. package/node_modules/ajv/lib/compile/validate/index.ts +582 -0
  735. package/node_modules/ajv/lib/compile/validate/keyword.ts +171 -0
  736. package/node_modules/ajv/lib/compile/validate/subschema.ts +135 -0
  737. package/node_modules/ajv/lib/core.ts +892 -0
  738. package/node_modules/ajv/lib/jtd.ts +132 -0
  739. package/node_modules/ajv/lib/refs/data.json +13 -0
  740. package/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +28 -0
  741. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +53 -0
  742. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +17 -0
  743. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +57 -0
  744. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +14 -0
  745. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +37 -0
  746. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +90 -0
  747. package/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +39 -0
  748. package/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +30 -0
  749. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +48 -0
  750. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +17 -0
  751. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +51 -0
  752. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  753. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  754. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  755. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +90 -0
  756. package/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +55 -0
  757. package/node_modules/ajv/lib/refs/json-schema-draft-06.json +137 -0
  758. package/node_modules/ajv/lib/refs/json-schema-draft-07.json +151 -0
  759. package/node_modules/ajv/lib/refs/json-schema-secure.json +88 -0
  760. package/node_modules/ajv/lib/refs/jtd-schema.ts +130 -0
  761. package/node_modules/ajv/lib/runtime/equal.ts +7 -0
  762. package/node_modules/ajv/lib/runtime/parseJson.ts +177 -0
  763. package/node_modules/ajv/lib/runtime/quote.ts +31 -0
  764. package/node_modules/ajv/lib/runtime/re2.ts +6 -0
  765. package/node_modules/ajv/lib/runtime/timestamp.ts +46 -0
  766. package/node_modules/ajv/lib/runtime/ucs2length.ts +20 -0
  767. package/node_modules/ajv/lib/runtime/uri.ts +6 -0
  768. package/node_modules/ajv/lib/runtime/validation_error.ts +13 -0
  769. package/node_modules/ajv/lib/standalone/index.ts +100 -0
  770. package/node_modules/ajv/lib/standalone/instance.ts +36 -0
  771. package/node_modules/ajv/lib/types/index.ts +244 -0
  772. package/node_modules/ajv/lib/types/json-schema.ts +187 -0
  773. package/node_modules/ajv/lib/types/jtd-schema.ts +273 -0
  774. package/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +56 -0
  775. package/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +118 -0
  776. package/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +22 -0
  777. package/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +14 -0
  778. package/node_modules/ajv/lib/vocabularies/applicator/contains.ts +109 -0
  779. package/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +112 -0
  780. package/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +11 -0
  781. package/node_modules/ajv/lib/vocabularies/applicator/if.ts +80 -0
  782. package/node_modules/ajv/lib/vocabularies/applicator/index.ts +53 -0
  783. package/node_modules/ajv/lib/vocabularies/applicator/items.ts +59 -0
  784. package/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +36 -0
  785. package/node_modules/ajv/lib/vocabularies/applicator/not.ts +38 -0
  786. package/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +82 -0
  787. package/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +91 -0
  788. package/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +12 -0
  789. package/node_modules/ajv/lib/vocabularies/applicator/properties.ts +57 -0
  790. package/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +50 -0
  791. package/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +13 -0
  792. package/node_modules/ajv/lib/vocabularies/code.ts +168 -0
  793. package/node_modules/ajv/lib/vocabularies/core/id.ts +10 -0
  794. package/node_modules/ajv/lib/vocabularies/core/index.ts +16 -0
  795. package/node_modules/ajv/lib/vocabularies/core/ref.ts +129 -0
  796. package/node_modules/ajv/lib/vocabularies/discriminator/index.ts +113 -0
  797. package/node_modules/ajv/lib/vocabularies/discriminator/types.ts +12 -0
  798. package/node_modules/ajv/lib/vocabularies/draft2020.ts +23 -0
  799. package/node_modules/ajv/lib/vocabularies/draft7.ts +17 -0
  800. package/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +31 -0
  801. package/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +51 -0
  802. package/node_modules/ajv/lib/vocabularies/dynamic/index.ts +9 -0
  803. package/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +14 -0
  804. package/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +10 -0
  805. package/node_modules/ajv/lib/vocabularies/errors.ts +18 -0
  806. package/node_modules/ajv/lib/vocabularies/format/format.ts +120 -0
  807. package/node_modules/ajv/lib/vocabularies/format/index.ts +6 -0
  808. package/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +89 -0
  809. package/node_modules/ajv/lib/vocabularies/jtd/elements.ts +32 -0
  810. package/node_modules/ajv/lib/vocabularies/jtd/enum.ts +45 -0
  811. package/node_modules/ajv/lib/vocabularies/jtd/error.ts +23 -0
  812. package/node_modules/ajv/lib/vocabularies/jtd/index.ts +37 -0
  813. package/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +24 -0
  814. package/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +21 -0
  815. package/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +15 -0
  816. package/node_modules/ajv/lib/vocabularies/jtd/properties.ts +184 -0
  817. package/node_modules/ajv/lib/vocabularies/jtd/ref.ts +76 -0
  818. package/node_modules/ajv/lib/vocabularies/jtd/type.ts +75 -0
  819. package/node_modules/ajv/lib/vocabularies/jtd/union.ts +12 -0
  820. package/node_modules/ajv/lib/vocabularies/jtd/values.ts +58 -0
  821. package/node_modules/ajv/lib/vocabularies/metadata.ts +17 -0
  822. package/node_modules/ajv/lib/vocabularies/next.ts +8 -0
  823. package/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +7 -0
  824. package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +47 -0
  825. package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +85 -0
  826. package/node_modules/ajv/lib/vocabularies/validation/const.ts +28 -0
  827. package/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +23 -0
  828. package/node_modules/ajv/lib/vocabularies/validation/enum.ts +54 -0
  829. package/node_modules/ajv/lib/vocabularies/validation/index.ts +49 -0
  830. package/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +16 -0
  831. package/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +26 -0
  832. package/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +30 -0
  833. package/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +42 -0
  834. package/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +26 -0
  835. package/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +34 -0
  836. package/node_modules/ajv/lib/vocabularies/validation/pattern.ts +39 -0
  837. package/node_modules/ajv/lib/vocabularies/validation/required.ts +98 -0
  838. package/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +79 -0
  839. package/node_modules/ajv/package.json +126 -0
  840. package/node_modules/ajv-formats/LICENSE +21 -0
  841. package/node_modules/ajv-formats/README.md +125 -0
  842. package/node_modules/ajv-formats/dist/formats.d.ts +9 -0
  843. package/node_modules/ajv-formats/dist/formats.js +208 -0
  844. package/node_modules/ajv-formats/dist/formats.js.map +1 -0
  845. package/node_modules/ajv-formats/dist/index.d.ts +15 -0
  846. package/node_modules/ajv-formats/dist/index.js +37 -0
  847. package/node_modules/ajv-formats/dist/index.js.map +1 -0
  848. package/node_modules/ajv-formats/dist/limit.d.ts +10 -0
  849. package/node_modules/ajv-formats/dist/limit.js +69 -0
  850. package/node_modules/ajv-formats/dist/limit.js.map +1 -0
  851. package/node_modules/ajv-formats/package.json +74 -0
  852. package/node_modules/ajv-formats/src/formats.ts +269 -0
  853. package/node_modules/ajv-formats/src/index.ts +62 -0
  854. package/node_modules/ajv-formats/src/limit.ts +99 -0
  855. package/node_modules/fast-deep-equal/LICENSE +21 -0
  856. package/node_modules/fast-deep-equal/README.md +96 -0
  857. package/node_modules/fast-deep-equal/es6/index.d.ts +2 -0
  858. package/node_modules/fast-deep-equal/es6/index.js +72 -0
  859. package/node_modules/fast-deep-equal/es6/react.d.ts +2 -0
  860. package/node_modules/fast-deep-equal/es6/react.js +79 -0
  861. package/node_modules/fast-deep-equal/index.d.ts +4 -0
  862. package/node_modules/fast-deep-equal/index.js +46 -0
  863. package/node_modules/fast-deep-equal/package.json +61 -0
  864. package/node_modules/fast-deep-equal/react.d.ts +2 -0
  865. package/node_modules/fast-deep-equal/react.js +53 -0
  866. package/node_modules/fast-uri/.gitattributes +2 -0
  867. package/node_modules/fast-uri/.github/dependabot.yml +13 -0
  868. package/node_modules/fast-uri/.github/workflows/ci.yml +106 -0
  869. package/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
  870. package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +24 -0
  871. package/node_modules/fast-uri/LICENSE +30 -0
  872. package/node_modules/fast-uri/README.md +152 -0
  873. package/node_modules/fast-uri/benchmark/benchmark.mjs +159 -0
  874. package/node_modules/fast-uri/benchmark/equal.mjs +51 -0
  875. package/node_modules/fast-uri/benchmark/non-simple-domain.mjs +22 -0
  876. package/node_modules/fast-uri/benchmark/package.json +17 -0
  877. package/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +24 -0
  878. package/node_modules/fast-uri/benchmark/ws-is-secure.mjs +65 -0
  879. package/node_modules/fast-uri/eslint.config.js +6 -0
  880. package/node_modules/fast-uri/index.js +631 -0
  881. package/node_modules/fast-uri/lib/schemes.js +272 -0
  882. package/node_modules/fast-uri/lib/utils.js +747 -0
  883. package/node_modules/fast-uri/package.json +68 -0
  884. package/node_modules/fast-uri/test/ajv.test.js +43 -0
  885. package/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
  886. package/node_modules/fast-uri/test/equal.test.js +145 -0
  887. package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +503 -0
  888. package/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +120 -0
  889. package/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
  890. package/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
  891. package/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
  892. package/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
  893. package/node_modules/fast-uri/test/parse.test.js +327 -0
  894. package/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
  895. package/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
  896. package/node_modules/fast-uri/test/resolve.test.js +87 -0
  897. package/node_modules/fast-uri/test/rfc-3986.test.js +90 -0
  898. package/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
  899. package/node_modules/fast-uri/test/security-normalization.test.js +178 -0
  900. package/node_modules/fast-uri/test/security.test.js +431 -0
  901. package/node_modules/fast-uri/test/serialize.test.js +151 -0
  902. package/node_modules/fast-uri/test/uri-js-compatibility.test.js +33 -0
  903. package/node_modules/fast-uri/test/uri-js.test.js +912 -0
  904. package/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
  905. package/node_modules/fast-uri/test/util.test.js +38 -0
  906. package/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
  907. package/node_modules/fast-uri/tsconfig.json +9 -0
  908. package/node_modules/fast-uri/types/index.d.ts +60 -0
  909. package/node_modules/fast-uri/types/index.test-d.ts +17 -0
  910. package/node_modules/json-schema-traverse/.eslintrc.yml +27 -0
  911. package/node_modules/json-schema-traverse/.github/FUNDING.yml +2 -0
  912. package/node_modules/json-schema-traverse/.github/workflows/build.yml +28 -0
  913. package/node_modules/json-schema-traverse/.github/workflows/publish.yml +27 -0
  914. package/node_modules/json-schema-traverse/LICENSE +21 -0
  915. package/node_modules/json-schema-traverse/README.md +95 -0
  916. package/node_modules/json-schema-traverse/index.d.ts +40 -0
  917. package/node_modules/json-schema-traverse/index.js +93 -0
  918. package/node_modules/json-schema-traverse/package.json +43 -0
  919. package/node_modules/json-schema-traverse/spec/.eslintrc.yml +6 -0
  920. package/node_modules/json-schema-traverse/spec/fixtures/schema.js +125 -0
  921. package/node_modules/json-schema-traverse/spec/index.spec.js +171 -0
  922. package/node_modules/require-from-string/index.js +34 -0
  923. package/node_modules/require-from-string/license +21 -0
  924. package/node_modules/require-from-string/package.json +28 -0
  925. package/node_modules/require-from-string/readme.md +56 -0
  926. package/package.json +49 -2
  927. package/packages/cli/dist/agent-spans.d.ts +238 -0
  928. package/packages/cli/dist/agent-spans.d.ts.map +1 -0
  929. package/packages/cli/dist/agent-spans.js +677 -0
  930. package/packages/cli/dist/agent-spans.js.map +1 -0
  931. package/packages/cli/dist/api.d.ts +127 -0
  932. package/packages/cli/dist/api.d.ts.map +1 -0
  933. package/packages/cli/dist/api.js +159 -0
  934. package/packages/cli/dist/api.js.map +1 -0
  935. package/packages/cli/dist/archive.d.ts +24 -0
  936. package/packages/cli/dist/archive.d.ts.map +1 -0
  937. package/packages/cli/dist/archive.js +230 -0
  938. package/packages/cli/dist/archive.js.map +1 -0
  939. package/packages/cli/dist/args.d.ts +57 -0
  940. package/packages/cli/dist/args.d.ts.map +1 -0
  941. package/packages/cli/dist/args.js +180 -0
  942. package/packages/cli/dist/args.js.map +1 -0
  943. package/packages/cli/dist/attach.d.ts +48 -0
  944. package/packages/cli/dist/attach.d.ts.map +1 -0
  945. package/packages/cli/dist/attach.js +153 -0
  946. package/packages/cli/dist/attach.js.map +1 -0
  947. package/packages/cli/dist/capture-limits.d.ts +7 -0
  948. package/packages/cli/dist/capture-limits.d.ts.map +1 -0
  949. package/packages/cli/dist/capture-limits.js +13 -0
  950. package/packages/cli/dist/capture-limits.js.map +1 -0
  951. package/packages/cli/dist/cli.d.ts +3 -0
  952. package/packages/cli/dist/cli.d.ts.map +1 -0
  953. package/packages/cli/dist/cli.js +4 -0
  954. package/packages/cli/dist/cli.js.map +1 -0
  955. package/packages/cli/dist/commands/attach.d.ts +49 -0
  956. package/packages/cli/dist/commands/attach.d.ts.map +1 -0
  957. package/packages/cli/dist/commands/attach.js +350 -0
  958. package/packages/cli/dist/commands/attach.js.map +1 -0
  959. package/packages/cli/dist/commands/compare.d.ts +27 -0
  960. package/packages/cli/dist/commands/compare.d.ts.map +1 -0
  961. package/packages/cli/dist/commands/compare.js +187 -0
  962. package/packages/cli/dist/commands/compare.js.map +1 -0
  963. package/packages/cli/dist/commands/doctor.d.ts +24 -0
  964. package/packages/cli/dist/commands/doctor.d.ts.map +1 -0
  965. package/packages/cli/dist/commands/doctor.js +402 -0
  966. package/packages/cli/dist/commands/doctor.js.map +1 -0
  967. package/packages/cli/dist/commands/gc.d.ts +24 -0
  968. package/packages/cli/dist/commands/gc.d.ts.map +1 -0
  969. package/packages/cli/dist/commands/gc.js +326 -0
  970. package/packages/cli/dist/commands/gc.js.map +1 -0
  971. package/packages/cli/dist/commands/inspect.d.ts +45 -0
  972. package/packages/cli/dist/commands/inspect.d.ts.map +1 -0
  973. package/packages/cli/dist/commands/inspect.js +375 -0
  974. package/packages/cli/dist/commands/inspect.js.map +1 -0
  975. package/packages/cli/dist/commands/quickstart.d.ts +48 -0
  976. package/packages/cli/dist/commands/quickstart.d.ts.map +1 -0
  977. package/packages/cli/dist/commands/quickstart.js +413 -0
  978. package/packages/cli/dist/commands/quickstart.js.map +1 -0
  979. package/packages/cli/dist/commands/record.d.ts +31 -0
  980. package/packages/cli/dist/commands/record.d.ts.map +1 -0
  981. package/packages/cli/dist/commands/record.js +958 -0
  982. package/packages/cli/dist/commands/record.js.map +1 -0
  983. package/packages/cli/dist/commands/replay.d.ts +184 -0
  984. package/packages/cli/dist/commands/replay.d.ts.map +1 -0
  985. package/packages/cli/dist/commands/replay.js +2014 -0
  986. package/packages/cli/dist/commands/replay.js.map +1 -0
  987. package/packages/cli/dist/commands/scrub.d.ts +34 -0
  988. package/packages/cli/dist/commands/scrub.d.ts.map +1 -0
  989. package/packages/cli/dist/commands/scrub.js +765 -0
  990. package/packages/cli/dist/commands/scrub.js.map +1 -0
  991. package/packages/cli/dist/commands/setup.d.ts +23 -0
  992. package/packages/cli/dist/commands/setup.d.ts.map +1 -0
  993. package/packages/cli/dist/commands/setup.js +239 -0
  994. package/packages/cli/dist/commands/setup.js.map +1 -0
  995. package/packages/cli/dist/commands/sync.d.ts +236 -0
  996. package/packages/cli/dist/commands/sync.d.ts.map +1 -0
  997. package/packages/cli/dist/commands/sync.js +1270 -0
  998. package/packages/cli/dist/commands/sync.js.map +1 -0
  999. package/packages/cli/dist/config.d.ts +69 -0
  1000. package/packages/cli/dist/config.d.ts.map +1 -0
  1001. package/packages/cli/dist/config.js +144 -0
  1002. package/packages/cli/dist/config.js.map +1 -0
  1003. package/packages/cli/dist/exchange-events.d.ts +80 -0
  1004. package/packages/cli/dist/exchange-events.d.ts.map +1 -0
  1005. package/packages/cli/dist/exchange-events.js +296 -0
  1006. package/packages/cli/dist/exchange-events.js.map +1 -0
  1007. package/packages/cli/dist/flags.d.ts +41 -0
  1008. package/packages/cli/dist/flags.d.ts.map +1 -0
  1009. package/packages/cli/dist/flags.js +292 -0
  1010. package/packages/cli/dist/flags.js.map +1 -0
  1011. package/packages/cli/dist/fs-events.d.ts +19 -0
  1012. package/packages/cli/dist/fs-events.d.ts.map +1 -0
  1013. package/packages/cli/dist/fs-events.js +89 -0
  1014. package/packages/cli/dist/fs-events.js.map +1 -0
  1015. package/packages/cli/dist/index.d.ts +18 -0
  1016. package/packages/cli/dist/index.d.ts.map +1 -0
  1017. package/packages/cli/dist/index.js +18 -0
  1018. package/packages/cli/dist/index.js.map +1 -0
  1019. package/packages/cli/dist/main.d.ts +2 -0
  1020. package/packages/cli/dist/main.d.ts.map +1 -0
  1021. package/packages/cli/dist/main.js +404 -0
  1022. package/packages/cli/dist/main.js.map +1 -0
  1023. package/packages/cli/dist/mcp-server.d.ts +44 -0
  1024. package/packages/cli/dist/mcp-server.d.ts.map +1 -0
  1025. package/packages/cli/dist/mcp-server.js +250 -0
  1026. package/packages/cli/dist/mcp-server.js.map +1 -0
  1027. package/packages/cli/dist/mcp.d.ts +126 -0
  1028. package/packages/cli/dist/mcp.d.ts.map +1 -0
  1029. package/packages/cli/dist/mcp.js +290 -0
  1030. package/packages/cli/dist/mcp.js.map +1 -0
  1031. package/packages/cli/dist/out.d.ts +107 -0
  1032. package/packages/cli/dist/out.d.ts.map +1 -0
  1033. package/packages/cli/dist/out.js +280 -0
  1034. package/packages/cli/dist/out.js.map +1 -0
  1035. package/packages/cli/dist/rasterize.d.ts +62 -0
  1036. package/packages/cli/dist/rasterize.d.ts.map +1 -0
  1037. package/packages/cli/dist/rasterize.js +154 -0
  1038. package/packages/cli/dist/rasterize.js.map +1 -0
  1039. package/packages/cli/dist/serial.d.ts +19 -0
  1040. package/packages/cli/dist/serial.d.ts.map +1 -0
  1041. package/packages/cli/dist/serial.js +34 -0
  1042. package/packages/cli/dist/serial.js.map +1 -0
  1043. package/packages/cli/dist/share-card.d.ts +73 -0
  1044. package/packages/cli/dist/share-card.d.ts.map +1 -0
  1045. package/packages/cli/dist/share-card.js +413 -0
  1046. package/packages/cli/dist/share-card.js.map +1 -0
  1047. package/packages/cli/dist/snapshot.d.ts +39 -0
  1048. package/packages/cli/dist/snapshot.d.ts.map +1 -0
  1049. package/packages/cli/dist/snapshot.js +43 -0
  1050. package/packages/cli/dist/snapshot.js.map +1 -0
  1051. package/packages/cli/dist/tls-capture.d.ts +135 -0
  1052. package/packages/cli/dist/tls-capture.d.ts.map +1 -0
  1053. package/packages/cli/dist/tls-capture.js +586 -0
  1054. package/packages/cli/dist/tls-capture.js.map +1 -0
  1055. package/packages/cli/dist/upstream.d.ts +29 -0
  1056. package/packages/cli/dist/upstream.d.ts.map +1 -0
  1057. package/packages/cli/dist/upstream.js +41 -0
  1058. package/packages/cli/dist/upstream.js.map +1 -0
  1059. package/packages/cli/dist/version.d.ts +2 -0
  1060. package/packages/cli/dist/version.d.ts.map +1 -0
  1061. package/packages/cli/dist/version.js +18 -0
  1062. package/packages/cli/dist/version.js.map +1 -0
  1063. package/packages/cli/package.json +11 -11
  1064. package/.dockerignore +0 -11
  1065. package/.gitattributes +0 -19
  1066. package/.github/workflows/ci.yml +0 -146
  1067. package/.grok-plugin/plugin.json +0 -12
  1068. package/.mcp.json +0 -8
  1069. package/.prettierignore +0 -4
  1070. package/.prettierrc.json +0 -1
  1071. package/CONTRIBUTING.md +0 -106
  1072. package/Dockerfile +0 -30
  1073. package/MAINTAINERS.md +0 -24
  1074. package/RELEASING.md +0 -183
  1075. package/SECURITY.md +0 -149
  1076. package/capture/CAPTURE-RUNBOOK.md +0 -271
  1077. package/capture/CURSOR-HTTP2.md +0 -226
  1078. package/capture/README.md +0 -349
  1079. package/capture/capture-run.gif +0 -0
  1080. package/capture/capture.mjs +0 -1883
  1081. package/capture/fable-capture.gif +0 -0
  1082. package/capture/fable-capture.mp4 +0 -0
  1083. package/capture/muse-shim.mjs +0 -114
  1084. package/capture/render-run.mjs +0 -125
  1085. package/capture/render.mjs +0 -228
  1086. package/companion-kiokuko-dsh.patch +0 -7806
  1087. package/docs/agenticreplay-acceptance.md +0 -135
  1088. package/docs/architecture.md +0 -160
  1089. package/docs/chain-card.png +0 -0
  1090. package/docs/compare-card.png +0 -0
  1091. package/docs/demo-cli.gif +0 -0
  1092. package/docs/demo-viewer.gif +0 -0
  1093. package/docs/fidelity.md +0 -16
  1094. package/docs/good-first-issues.md +0 -78
  1095. package/docs/graph-card.png +0 -0
  1096. package/docs/how-to/compare-models-on-the-same-failure.md +0 -58
  1097. package/docs/how-to/debug-a-failing-agent-run.md +0 -127
  1098. package/docs/how-to/why-did-my-agent-delete-my-file.md +0 -92
  1099. package/docs/i18n/README.ar.md +0 -597
  1100. package/docs/i18n/README.de.md +0 -648
  1101. package/docs/i18n/README.es.md +0 -642
  1102. package/docs/i18n/README.fr.md +0 -649
  1103. package/docs/i18n/README.ja.md +0 -608
  1104. package/docs/i18n/README.ko.md +0 -598
  1105. package/docs/i18n/README.zh-CN.md +0 -574
  1106. package/docs/integrations.md +0 -628
  1107. package/docs/launch-path.md +0 -215
  1108. package/docs/media/README.md +0 -101
  1109. package/docs/media/sync-transcript.txt +0 -18
  1110. package/docs/media/transcript.txt +0 -29
  1111. package/docs/opencode-capture.md +0 -137
  1112. package/docs/plugins.md +0 -250
  1113. package/docs/proposals/action-graph-and-reasoning.md +0 -354
  1114. package/docs/sync-card.png +0 -0
  1115. package/docs/validation.md +0 -52
  1116. package/docs/viewer-timeline.png +0 -0
  1117. package/examples/traces/README.md +0 -50
  1118. package/examples/traces/run_9f2c14a03b71/blobs/1b/1b694f32b8c582ace6b35ad64050e532fb3ee3ecc1a2763a82cf42ad0f2a3dd0 +0 -10
  1119. package/examples/traces/run_9f2c14a03b71/blobs/51/517b5b8ec6c3b13121dbaec61784e2a024247c7c4efd9ba068b582ee57bd2764 +0 -4
  1120. package/examples/traces/run_9f2c14a03b71/blobs/5b/5bba1bd069013d86363f69c00c1ae77c84c4e113aeeb7431c8141af4fed76860 +0 -7
  1121. package/examples/traces/run_9f2c14a03b71/blobs/84/84247e7b385fd5f99a6728a509838e52ef963af92f44ef6eccbed6910de1438d +0 -10
  1122. package/examples/traces/run_9f2c14a03b71/blobs/ac/ac9b4be9bdf7fe63c7b5135e2d14c4c0745a48771e733804869790590455f8e8 +0 -7
  1123. package/examples/traces/run_9f2c14a03b71/events.jsonl +0 -31
  1124. package/examples/traces/run_9f2c14a03b71/manifest.json +0 -46
  1125. package/examples/traces/run_9f2c14a03b71/redactions.json +0 -17
  1126. package/llms.txt +0 -26
  1127. package/packages/adapters/fixtures/harness/claude-code.json +0 -12
  1128. package/packages/adapters/fixtures/harness/codex.json +0 -10
  1129. package/packages/adapters/fixtures/harness/cursor.json +0 -10
  1130. package/packages/adapters/fixtures/harness/exec.json +0 -10
  1131. package/packages/adapters/fixtures/harness/generic-openai.json +0 -14
  1132. package/packages/adapters/fixtures/harness/goose.json +0 -14
  1133. package/packages/adapters/fixtures/harness/grok.json +0 -18
  1134. package/packages/adapters/fixtures/harness/hermes.json +0 -10
  1135. package/packages/adapters/fixtures/harness/indexrag.json +0 -21
  1136. package/packages/adapters/fixtures/harness/kilo.json +0 -10
  1137. package/packages/adapters/fixtures/harness/mcode.json +0 -10
  1138. package/packages/adapters/fixtures/harness/mimo.json +0 -10
  1139. package/packages/adapters/fixtures/harness/node.json +0 -22
  1140. package/packages/adapters/fixtures/harness/openclaw.json +0 -21
  1141. package/packages/adapters/fixtures/harness/opencode.json +0 -20
  1142. package/packages/adapters/fixtures/harness/qwen.json +0 -20
  1143. package/packages/adapters/fixtures/harness/zcode.json +0 -10
  1144. package/packages/adapters/package.json +0 -29
  1145. package/packages/adapters/src/claude-code.ts +0 -109
  1146. package/packages/adapters/src/codex.ts +0 -135
  1147. package/packages/adapters/src/contract.ts +0 -531
  1148. package/packages/adapters/src/cursor.ts +0 -76
  1149. package/packages/adapters/src/detect.ts +0 -132
  1150. package/packages/adapters/src/env.ts +0 -118
  1151. package/packages/adapters/src/exec.ts +0 -59
  1152. package/packages/adapters/src/generic-openai.ts +0 -36
  1153. package/packages/adapters/src/goose.ts +0 -87
  1154. package/packages/adapters/src/grok.ts +0 -60
  1155. package/packages/adapters/src/hermes.ts +0 -92
  1156. package/packages/adapters/src/index.ts +0 -24
  1157. package/packages/adapters/src/indexrag.ts +0 -254
  1158. package/packages/adapters/src/kilo.ts +0 -39
  1159. package/packages/adapters/src/mcode.ts +0 -392
  1160. package/packages/adapters/src/mcp-config.ts +0 -84
  1161. package/packages/adapters/src/mimo.ts +0 -44
  1162. package/packages/adapters/src/node.ts +0 -71
  1163. package/packages/adapters/src/openclaw.ts +0 -50
  1164. package/packages/adapters/src/opencode-api-bases.ts +0 -200
  1165. package/packages/adapters/src/opencode-capture.ts +0 -164
  1166. package/packages/adapters/src/opencode-catalog.ts +0 -44
  1167. package/packages/adapters/src/opencode-config.ts +0 -209
  1168. package/packages/adapters/src/opencode.ts +0 -257
  1169. package/packages/adapters/src/qwen.ts +0 -113
  1170. package/packages/adapters/src/registry.ts +0 -121
  1171. package/packages/adapters/src/scaffold.ts +0 -173
  1172. package/packages/adapters/src/session.ts +0 -138
  1173. package/packages/adapters/src/zcode.ts +0 -440
  1174. package/packages/adapters/test/adapters.test.ts +0 -666
  1175. package/packages/adapters/test/contract.test.ts +0 -601
  1176. package/packages/adapters/test/exec-adapter.test.ts +0 -114
  1177. package/packages/adapters/test/harness-versions.test.ts +0 -220
  1178. package/packages/adapters/test/indexrag.test.ts +0 -192
  1179. package/packages/adapters/test/mcode.test.ts +0 -678
  1180. package/packages/adapters/test/mcp-config.test.ts +0 -118
  1181. package/packages/adapters/test/named-agents.test.ts +0 -262
  1182. package/packages/adapters/test/node-adapter.test.ts +0 -98
  1183. package/packages/adapters/test/opencode-capture.test.ts +0 -137
  1184. package/packages/adapters/test/opencode-catalog.test.ts +0 -178
  1185. package/packages/adapters/test/opencode-config.test.ts +0 -63
  1186. package/packages/adapters/test/scaffold.test.ts +0 -156
  1187. package/packages/adapters/test/session.test.ts +0 -368
  1188. package/packages/adapters/test/zcode.test.ts +0 -497
  1189. package/packages/adapters/tsconfig.json +0 -16
  1190. package/packages/cli/README.md +0 -92
  1191. package/packages/cli/src/agent-spans.ts +0 -752
  1192. package/packages/cli/src/api.ts +0 -275
  1193. package/packages/cli/src/archive.ts +0 -264
  1194. package/packages/cli/src/args.ts +0 -207
  1195. package/packages/cli/src/attach.ts +0 -178
  1196. package/packages/cli/src/capture-limits.ts +0 -21
  1197. package/packages/cli/src/cli.ts +0 -4
  1198. package/packages/cli/src/commands/attach.ts +0 -441
  1199. package/packages/cli/src/commands/compare.ts +0 -218
  1200. package/packages/cli/src/commands/doctor.ts +0 -447
  1201. package/packages/cli/src/commands/gc.ts +0 -372
  1202. package/packages/cli/src/commands/inspect.ts +0 -482
  1203. package/packages/cli/src/commands/quickstart.ts +0 -479
  1204. package/packages/cli/src/commands/record.ts +0 -1069
  1205. package/packages/cli/src/commands/replay.ts +0 -2289
  1206. package/packages/cli/src/commands/scrub.ts +0 -865
  1207. package/packages/cli/src/commands/setup.ts +0 -294
  1208. package/packages/cli/src/commands/sync.ts +0 -1429
  1209. package/packages/cli/src/config.ts +0 -182
  1210. package/packages/cli/src/exchange-events.ts +0 -369
  1211. package/packages/cli/src/flags.ts +0 -316
  1212. package/packages/cli/src/fs-events.ts +0 -103
  1213. package/packages/cli/src/index.ts +0 -17
  1214. package/packages/cli/src/main.ts +0 -419
  1215. package/packages/cli/src/mcp-server.ts +0 -314
  1216. package/packages/cli/src/mcp.ts +0 -350
  1217. package/packages/cli/src/out.ts +0 -350
  1218. package/packages/cli/src/rasterize.ts +0 -205
  1219. package/packages/cli/src/serial.ts +0 -38
  1220. package/packages/cli/src/share-card.ts +0 -514
  1221. package/packages/cli/src/snapshot.ts +0 -80
  1222. package/packages/cli/src/tls-capture.ts +0 -688
  1223. package/packages/cli/src/upstream.ts +0 -75
  1224. package/packages/cli/src/version.ts +0 -21
  1225. package/packages/cli/test/agent-spans-drain.test.ts +0 -157
  1226. package/packages/cli/test/agent-spans-race.test.ts +0 -97
  1227. package/packages/cli/test/agent-spans.test.ts +0 -1032
  1228. package/packages/cli/test/api.test.ts +0 -178
  1229. package/packages/cli/test/archive.test.ts +0 -143
  1230. package/packages/cli/test/args.test.ts +0 -164
  1231. package/packages/cli/test/attach-command.test.ts +0 -356
  1232. package/packages/cli/test/attach.test.ts +0 -198
  1233. package/packages/cli/test/capture-oracle.test.ts +0 -160
  1234. package/packages/cli/test/capture-warning.test.ts +0 -215
  1235. package/packages/cli/test/chain-card.test.ts +0 -190
  1236. package/packages/cli/test/claude-capture.test.ts +0 -242
  1237. package/packages/cli/test/compare.test.ts +0 -329
  1238. package/packages/cli/test/config-permission-failure.test.ts +0 -41
  1239. package/packages/cli/test/config.test.ts +0 -239
  1240. package/packages/cli/test/declared-inside-replay.test.ts +0 -170
  1241. package/packages/cli/test/doctor.test.ts +0 -276
  1242. package/packages/cli/test/e2e.test.ts +0 -1230
  1243. package/packages/cli/test/exchange-events.test.ts +0 -345
  1244. package/packages/cli/test/failure-lines.test.ts +0 -47
  1245. package/packages/cli/test/fixtures/deaf-agent.mjs +0 -11
  1246. package/packages/cli/test/fixtures/embedding-agent.mjs +0 -32
  1247. package/packages/cli/test/fixtures/fake-agent.mjs +0 -114
  1248. package/packages/cli/test/fixtures/fake-model.mjs +0 -105
  1249. package/packages/cli/test/fixtures/gateway-agent.mjs +0 -20
  1250. package/packages/cli/test/fixtures/ide-parent.mjs +0 -34
  1251. package/packages/cli/test/fixtures/mcp-agent.mjs +0 -64
  1252. package/packages/cli/test/fixtures/proxy-call.mjs +0 -105
  1253. package/packages/cli/test/fixtures/responses-agent.mjs +0 -82
  1254. package/packages/cli/test/fixtures/responses-model.mjs +0 -94
  1255. package/packages/cli/test/fixtures/tls-agent.mjs +0 -35
  1256. package/packages/cli/test/fixtures/vercel-agent.mjs +0 -81
  1257. package/packages/cli/test/flag-values.test.ts +0 -162
  1258. package/packages/cli/test/flags.test.ts +0 -313
  1259. package/packages/cli/test/fork-provenance.test.ts +0 -224
  1260. package/packages/cli/test/fork-tls.test.ts +0 -190
  1261. package/packages/cli/test/gateway-e2e.test.ts +0 -110
  1262. package/packages/cli/test/gc.test.ts +0 -531
  1263. package/packages/cli/test/generated-esm.test.ts +0 -87
  1264. package/packages/cli/test/graph-card.test.ts +0 -249
  1265. package/packages/cli/test/graph-command.test.ts +0 -258
  1266. package/packages/cli/test/grok-bot-e2e.test.ts +0 -349
  1267. package/packages/cli/test/inspect.test.ts +0 -412
  1268. package/packages/cli/test/intercept-failures.test.ts +0 -74
  1269. package/packages/cli/test/json-only.test.ts +0 -88
  1270. package/packages/cli/test/json-output.test.ts +0 -221
  1271. package/packages/cli/test/list-gateway.test.ts +0 -770
  1272. package/packages/cli/test/mcp-capture.test.ts +0 -498
  1273. package/packages/cli/test/mcp-server.test.ts +0 -315
  1274. package/packages/cli/test/nested-repo-replay.test.ts +0 -972
  1275. package/packages/cli/test/no-credential-in-attrs.test.ts +0 -255
  1276. package/packages/cli/test/opencode-capture.test.ts +0 -422
  1277. package/packages/cli/test/opencode-catalog-capture.test.ts +0 -175
  1278. package/packages/cli/test/out.test.ts +0 -491
  1279. package/packages/cli/test/pinned-fetch.test.ts +0 -154
  1280. package/packages/cli/test/prompt-scrub.test.ts +0 -132
  1281. package/packages/cli/test/publish-order.test.ts +0 -87
  1282. package/packages/cli/test/quickstart.test.ts +0 -579
  1283. package/packages/cli/test/rasterize.test.ts +0 -86
  1284. package/packages/cli/test/record-detection.test.ts +0 -156
  1285. package/packages/cli/test/record-teardown.test.ts +0 -203
  1286. package/packages/cli/test/replay-putback.test.ts +0 -242
  1287. package/packages/cli/test/replay-spill.test.ts +0 -116
  1288. package/packages/cli/test/replay-teardown.test.ts +0 -143
  1289. package/packages/cli/test/replay-trace.test.ts +0 -199
  1290. package/packages/cli/test/replay-transport.test.ts +0 -113
  1291. package/packages/cli/test/reset-roots.test.ts +0 -67
  1292. package/packages/cli/test/responses-e2e.test.ts +0 -119
  1293. package/packages/cli/test/retrieval-context.test.ts +0 -168
  1294. package/packages/cli/test/review-regressions.test.ts +0 -168
  1295. package/packages/cli/test/route-decision.test.ts +0 -134
  1296. package/packages/cli/test/run-dir-sidecars.test.ts +0 -779
  1297. package/packages/cli/test/scrub.test.ts +0 -936
  1298. package/packages/cli/test/serial.test.ts +0 -65
  1299. package/packages/cli/test/setup.test.ts +0 -535
  1300. package/packages/cli/test/share-card.test.ts +0 -135
  1301. package/packages/cli/test/shell-capture.test.ts +0 -184
  1302. package/packages/cli/test/shell-frames-drain.test.ts +0 -91
  1303. package/packages/cli/test/snapshot-retry.test.ts +0 -54
  1304. package/packages/cli/test/support-claims.test.ts +0 -127
  1305. package/packages/cli/test/sync-credentials.test.ts +0 -177
  1306. package/packages/cli/test/sync.test.ts +0 -1709
  1307. package/packages/cli/test/tls-intercept.test.ts +0 -548
  1308. package/packages/cli/test/upstream-visible.test.ts +0 -314
  1309. package/packages/cli/test/vercel-sdk-e2e.test.ts +0 -105
  1310. package/packages/cli/test/version.test.ts +0 -20
  1311. package/packages/cli/tsconfig.json +0 -40
  1312. package/packages/core/package.json +0 -26
  1313. package/packages/core/src/blobs.ts +0 -109
  1314. package/packages/core/src/fetch.ts +0 -48
  1315. package/packages/core/src/graph.ts +0 -450
  1316. package/packages/core/src/index.ts +0 -8
  1317. package/packages/core/src/paths.ts +0 -180
  1318. package/packages/core/src/private-files.ts +0 -394
  1319. package/packages/core/src/reader.ts +0 -175
  1320. package/packages/core/src/redaction.ts +0 -826
  1321. package/packages/core/src/writer.ts +0 -467
  1322. package/packages/core/test/blobs.test.ts +0 -170
  1323. package/packages/core/test/capture-contract.test.ts +0 -179
  1324. package/packages/core/test/data-uri-redaction.test.ts +0 -758
  1325. package/packages/core/test/graph.test.ts +0 -520
  1326. package/packages/core/test/integration.test.ts +0 -148
  1327. package/packages/core/test/paths-permission-failure.test.ts +0 -53
  1328. package/packages/core/test/paths.test.ts +0 -339
  1329. package/packages/core/test/private-files-owner.test.ts +0 -77
  1330. package/packages/core/test/private-files-scratch-race.test.ts +0 -62
  1331. package/packages/core/test/private-files.test.ts +0 -251
  1332. package/packages/core/test/reader.test.ts +0 -271
  1333. package/packages/core/test/redaction.test.ts +0 -525
  1334. package/packages/core/test/writer.test.ts +0 -531
  1335. package/packages/core/tsconfig.json +0 -6
  1336. package/packages/fs-capture/package.json +0 -25
  1337. package/packages/fs-capture/src/capture.ts +0 -193
  1338. package/packages/fs-capture/src/git.ts +0 -131
  1339. package/packages/fs-capture/src/index.ts +0 -3
  1340. package/packages/fs-capture/src/shadow.ts +0 -751
  1341. package/packages/fs-capture/test/capture.test.ts +0 -241
  1342. package/packages/fs-capture/test/git.test.ts +0 -118
  1343. package/packages/fs-capture/test/helpers.ts +0 -28
  1344. package/packages/fs-capture/test/shadow.test.ts +0 -1058
  1345. package/packages/fs-capture/tsconfig.json +0 -6
  1346. package/packages/mcp-shim/package.json +0 -26
  1347. package/packages/mcp-shim/src/cli.ts +0 -372
  1348. package/packages/mcp-shim/src/framing.ts +0 -106
  1349. package/packages/mcp-shim/src/index.ts +0 -4
  1350. package/packages/mcp-shim/src/mock.ts +0 -194
  1351. package/packages/mcp-shim/src/shim.ts +0 -126
  1352. package/packages/mcp-shim/test/cli.test.ts +0 -489
  1353. package/packages/mcp-shim/test/framing.test.ts +0 -143
  1354. package/packages/mcp-shim/test/mock.test.ts +0 -200
  1355. package/packages/mcp-shim/test/shim.test.ts +0 -287
  1356. package/packages/mcp-shim/tsconfig.json +0 -5
  1357. package/packages/node-instrument/package.json +0 -23
  1358. package/packages/node-instrument/src/capture.ts +0 -505
  1359. package/packages/node-instrument/src/index.ts +0 -3
  1360. package/packages/node-instrument/src/install.ts +0 -186
  1361. package/packages/node-instrument/src/rewrite.ts +0 -66
  1362. package/packages/node-instrument/test/capture.test.ts +0 -423
  1363. package/packages/node-instrument/test/install.test.ts +0 -427
  1364. package/packages/node-instrument/test/rewrite.test.ts +0 -85
  1365. package/packages/node-instrument/tsconfig.json +0 -9
  1366. package/packages/plugin-api/package.json +0 -22
  1367. package/packages/plugin-api/src/canonical.ts +0 -73
  1368. package/packages/plugin-api/src/index.ts +0 -2
  1369. package/packages/plugin-api/src/plugins.ts +0 -265
  1370. package/packages/plugin-api/test/canonical.test.ts +0 -58
  1371. package/packages/plugin-api/tsconfig.json +0 -5
  1372. package/packages/providers/package.json +0 -26
  1373. package/packages/providers/src/index.ts +0 -34
  1374. package/packages/providers/src/pricing.ts +0 -140
  1375. package/packages/providers/src/translate/anthropic.ts +0 -620
  1376. package/packages/providers/src/translate/openai-responses.ts +0 -638
  1377. package/packages/providers/src/translate/openai.ts +0 -630
  1378. package/packages/providers/src/translate/sse.ts +0 -99
  1379. package/packages/providers/src/translate/util.ts +0 -111
  1380. package/packages/providers/test/anthropic-translate.test.ts +0 -687
  1381. package/packages/providers/test/openai-responses-translate.test.ts +0 -377
  1382. package/packages/providers/test/openai-translate.test.ts +0 -884
  1383. package/packages/providers/test/pricing.test.ts +0 -171
  1384. package/packages/providers/tsconfig.json +0 -6
  1385. package/packages/proxy/package.json +0 -28
  1386. package/packages/proxy/src/ca.ts +0 -376
  1387. package/packages/proxy/src/der.ts +0 -152
  1388. package/packages/proxy/src/dialects.ts +0 -413
  1389. package/packages/proxy/src/forward.ts +0 -64
  1390. package/packages/proxy/src/index.ts +0 -8
  1391. package/packages/proxy/src/intercept.ts +0 -1554
  1392. package/packages/proxy/src/matching.ts +0 -1056
  1393. package/packages/proxy/src/retrieval.ts +0 -290
  1394. package/packages/proxy/src/server.ts +0 -2875
  1395. package/packages/proxy/src/tls-hosts.ts +0 -205
  1396. package/packages/proxy/test/beta-headers.test.ts +0 -39
  1397. package/packages/proxy/test/ca.test.ts +0 -146
  1398. package/packages/proxy/test/forward.test.ts +0 -306
  1399. package/packages/proxy/test/hop-by-hop.test.ts +0 -118
  1400. package/packages/proxy/test/image-matching.test.ts +0 -129
  1401. package/packages/proxy/test/indexing-concurrency.test.ts +0 -224
  1402. package/packages/proxy/test/lookahead.test.ts +0 -160
  1403. package/packages/proxy/test/malformed-body.test.ts +0 -73
  1404. package/packages/proxy/test/matching.test.ts +0 -822
  1405. package/packages/proxy/test/passthrough.test.ts +0 -599
  1406. package/packages/proxy/test/recorded-upstream.test.ts +0 -253
  1407. package/packages/proxy/test/responses-dialect.test.ts +0 -239
  1408. package/packages/proxy/test/retrieval.test.ts +0 -589
  1409. package/packages/proxy/test/server.test.ts +0 -1281
  1410. package/packages/proxy/test/tls-hosts.test.ts +0 -190
  1411. package/packages/proxy/test/tls-intercept.test.ts +0 -1769
  1412. package/packages/proxy/tsconfig.json +0 -22
  1413. package/packages/schema/package.json +0 -28
  1414. package/packages/schema/src/constants.ts +0 -73
  1415. package/packages/schema/src/index.ts +0 -3
  1416. package/packages/schema/src/types.ts +0 -103
  1417. package/packages/schema/src/validate.ts +0 -60
  1418. package/packages/schema/test/schema-parity.test.ts +0 -116
  1419. package/packages/schema/tsconfig.json +0 -5
  1420. package/packages/shell-shim/package.json +0 -26
  1421. package/packages/shell-shim/src/index.ts +0 -3
  1422. package/packages/shell-shim/src/install.ts +0 -406
  1423. package/packages/shell-shim/src/resolve.ts +0 -98
  1424. package/packages/shell-shim/src/runner-bin.ts +0 -4
  1425. package/packages/shell-shim/src/runner.ts +0 -149
  1426. package/packages/shell-shim/test/resolve.test.ts +0 -125
  1427. package/packages/shell-shim/test/shim.test.ts +0 -548
  1428. package/packages/shell-shim/test/transport-race.test.ts +0 -109
  1429. package/packages/shell-shim/tsconfig.json +0 -13
  1430. package/packages/viewer/package.json +0 -25
  1431. package/packages/viewer/src/bundle.ts +0 -36
  1432. package/packages/viewer/src/client/main.ts +0 -248
  1433. package/packages/viewer/src/credit.ts +0 -24
  1434. package/packages/viewer/src/css.ts +0 -409
  1435. package/packages/viewer/src/export.ts +0 -38
  1436. package/packages/viewer/src/html.ts +0 -356
  1437. package/packages/viewer/src/index.ts +0 -16
  1438. package/packages/viewer/src/render.ts +0 -791
  1439. package/packages/viewer/src/serve.ts +0 -150
  1440. package/packages/viewer/src/trace-dir.ts +0 -140
  1441. package/packages/viewer/test/bundle.test.ts +0 -47
  1442. package/packages/viewer/test/client.test.ts +0 -378
  1443. package/packages/viewer/test/export.test.ts +0 -131
  1444. package/packages/viewer/test/fixtures.ts +0 -69
  1445. package/packages/viewer/test/html.test.ts +0 -453
  1446. package/packages/viewer/test/playback.test.ts +0 -54
  1447. package/packages/viewer/test/render.test.ts +0 -714
  1448. package/packages/viewer/test/serve.test.ts +0 -125
  1449. package/packages/viewer/tsconfig.json +0 -6
  1450. package/prompt/AIDER/deepseek-v4-1-flash-system-prompt.md +0 -29
  1451. package/prompt/CLAUDECODE/claude-fable-5-1-print-system-prompt.md +0 -127
  1452. package/prompt/CLAUDECODE/claude-fable-5-1-system-prompt.md +0 -169
  1453. package/prompt/CLAUDECODE/claude-opus-4-8-system-prompt.md +0 -131
  1454. package/prompt/CLAUDECODE/claude-opus-5-system-prompt.md +0 -149
  1455. package/prompt/CLINE/openai-gpt-4o-mini-system-prompt.md +0 -37
  1456. package/prompt/CODEX/gpt-5-6-luna-system-prompt.md +0 -183
  1457. package/prompt/CODEX/gpt-5-6-sol-system-prompt.md +0 -218
  1458. package/prompt/CODEX/gpt-6-1-sol-system-prompt.md +0 -242
  1459. package/prompt/CODEX/gpt-6-astra-system-prompt.md +0 -170
  1460. package/prompt/CODEX/gpt-6-luna-system-prompt.md +0 -223
  1461. package/prompt/CODEX/gpt-6-sol-system-prompt.md +0 -226
  1462. package/prompt/CRUSH/deepseek-v4-1-flash-system-prompt.md +0 -472
  1463. package/prompt/CURSOR/grok-4-5-high-system-prompt.md +0 -40
  1464. package/prompt/DSH/deepseek-flash-system-prompt.md +0 -31
  1465. package/prompt/GEMINICLI/gemini-3-5-flash-system-prompt.md +0 -168
  1466. package/prompt/GOOSE/deepseek-v4-1-flash-system-prompt.md +0 -180
  1467. package/prompt/HACKERAI/openai-gpt-4o-mini-system-prompt.md +0 -70
  1468. package/prompt/HERMES/nemotron-3-5-lightning-free-system-prompt.md +0 -111
  1469. package/prompt/KILOCODE/kilo-auto-free-system-prompt.md +0 -129
  1470. package/prompt/MCODE/deepseek-deepseek-v4-flash-free-coding-system-prompt.md +0 -128
  1471. package/prompt/MCODE/deepseek-deepseek-v4-flash-free-tui-system-prompt.md +0 -119
  1472. package/prompt/MCODE/deepseek-deepseek-v4-flash-free-work-system-prompt.md +0 -140
  1473. package/prompt/MIMOCODE/mimo-v2-5-pro-system-prompt.md +0 -411
  1474. package/prompt/MIMOCODE/mimo-v2-5-system-prompt.md +0 -411
  1475. package/prompt/MUSECODE/muse-spark-1-3-system-prompt.md +0 -78
  1476. package/prompt/OPENCLAW/gpt-5-6-sol-system-prompt.md +0 -333
  1477. package/prompt/OPENCODE/big-pickle-system-prompt.md +0 -114
  1478. package/prompt/OPENCODE/gpt-5-6-sol-system-prompt.md +0 -126
  1479. package/prompt/OPENCODE/ling-3-0-flash-fin-free-system-prompt.md +0 -114
  1480. package/prompt/OPENCODE/mimo-v2-5-free-system-prompt.md +0 -114
  1481. package/prompt/OPENCODE/muse-spark-1-2-contributor-free-system-prompt.md +0 -84
  1482. package/prompt/OPENCODE/nemotron-3-5-lightning-free-system-prompt.md +0 -114
  1483. package/prompt/OPENCODE/nemotron-3-ultra-free-system-prompt.md +0 -114
  1484. package/prompt/PI/openai-gpt-4o-mini-system-prompt.md +0 -31
  1485. package/prompt/QWENCODE/gpt-5-6-sol-system-prompt.md +0 -290
  1486. package/prompt/ZCODE/glm-4-6-system-prompt.md +0 -91
  1487. package/python/README.md +0 -132
  1488. package/python/agenticreplay_trace/__init__.py +0 -58
  1489. package/python/agenticreplay_trace/graph.py +0 -137
  1490. package/python/agenticreplay_trace/models.py +0 -491
  1491. package/python/agenticreplay_trace/py.typed +0 -0
  1492. package/python/agenticreplay_trace/reader.py +0 -295
  1493. package/python/conftest.py +0 -12
  1494. package/python/examples/analyze.py +0 -114
  1495. package/python/pyproject.toml +0 -45
  1496. package/python/tests/conftest.py +0 -102
  1497. package/python/tests/test_capture_contract.py +0 -24
  1498. package/python/tests/test_conformance.py +0 -235
  1499. package/python/tests/test_examples.py +0 -60
  1500. package/python/tests/test_graph.py +0 -247
  1501. package/python/tests/test_models.py +0 -342
  1502. package/python/tests/test_reader.py +0 -423
  1503. package/python-langgraph/README.md +0 -159
  1504. package/python-langgraph/agenticreplay_langgraph/__init__.py +0 -21
  1505. package/python-langgraph/agenticreplay_langgraph/handler.py +0 -317
  1506. package/python-langgraph/agenticreplay_langgraph/hook.py +0 -168
  1507. package/python-langgraph/pyproject.toml +0 -35
  1508. package/python-langgraph/tests/test_handler.py +0 -370
  1509. package/python-langgraph/tests/test_integration.py +0 -484
  1510. package/python-openai-agents/README.md +0 -145
  1511. package/python-openai-agents/agenticreplay_openai_agents/__init__.py +0 -11
  1512. package/python-openai-agents/agenticreplay_openai_agents/processor.py +0 -331
  1513. package/python-openai-agents/pyproject.toml +0 -34
  1514. package/python-openai-agents/tests/test_processor.py +0 -457
  1515. package/scripts/check-neutrality.mjs +0 -62
  1516. package/scripts/codex-client-acceptance.mjs +0 -133
  1517. package/scripts/conformance.mjs +0 -245
  1518. package/scripts/fidelity.mjs +0 -170
  1519. package/scripts/hermes-client-acceptance.mjs +0 -158
  1520. package/scripts/host-client-acceptance.mjs +0 -732
  1521. package/scripts/installed-smoke.mjs +0 -316
  1522. package/scripts/publish-order.mjs +0 -96
  1523. package/scripts/regenerate-quickstart.mjs +0 -79
  1524. package/scripts/render-cards.mjs +0 -178
  1525. package/scripts/render-demo.mjs +0 -139
  1526. package/scripts/render-sync-card.mjs +0 -96
  1527. package/scripts/set-version.mjs +0 -152
  1528. package/scripts/set-version.test.ts +0 -220
  1529. package/scripts/sync-server-json.mjs +0 -13
  1530. package/scripts/update-opencode-api-bases.mjs +0 -29
  1531. package/server.json +0 -28
  1532. package/skills/agenticreplay-replay/SKILL.md +0 -211
  1533. package/spec/agenticreplay-trace-v0.md +0 -223
  1534. package/test/integrations/README.md +0 -133
  1535. package/test/integrations/agents/ai_sdk_openai.mjs +0 -24
  1536. package/test/integrations/agents/anthropic_sdk.py +0 -10
  1537. package/test/integrations/agents/browser_use_agent.py +0 -24
  1538. package/test/integrations/agents/crewai_agent.py +0 -44
  1539. package/test/integrations/agents/crewai_model_names.py +0 -72
  1540. package/test/integrations/agents/hardcoded_origin.mjs +0 -13
  1541. package/test/integrations/agents/haystack_pipeline.py +0 -28
  1542. package/test/integrations/agents/haystack_rag.py +0 -35
  1543. package/test/integrations/agents/langgraph_agent.py +0 -54
  1544. package/test/integrations/agents/langgraph_nodes.py +0 -62
  1545. package/test/integrations/agents/litellm_agent.py +0 -11
  1546. package/test/integrations/agents/llama_index_agent.py +0 -27
  1547. package/test/integrations/agents/llama_index_model_names.py +0 -67
  1548. package/test/integrations/agents/mastra_agent.mjs +0 -20
  1549. package/test/integrations/agents/mcp_agent.py +0 -44
  1550. package/test/integrations/agents/mcp_server.py +0 -20
  1551. package/test/integrations/agents/openai_agents_handoff.py +0 -52
  1552. package/test/integrations/agents/openai_agents_sdk.py +0 -29
  1553. package/test/integrations/agents/openai_async.py +0 -17
  1554. package/test/integrations/agents/openai_sdk.py +0 -10
  1555. package/test/integrations/agents/openhands_agent.py +0 -34
  1556. package/test/integrations/agents/rag_pipeline.py +0 -79
  1557. package/test/integrations/agents/vision_agent.py +0 -63
  1558. package/test/integrations/run.mjs +0 -719
  1559. package/test/integrations/stub-origin.mjs +0 -229
  1560. package/tsconfig.base.json +0 -20
  1561. package/tsconfig.json +0 -41
  1562. package/vitest.config.ts +0 -39
  1563. package/vitest.setup.ts +0 -25
  1564. /package/{packages → node_modules/@agenticreplay}/schema/schema/event.schema.json +0 -0
  1565. /package/{packages → node_modules/@agenticreplay}/schema/schema/manifest.schema.json +0 -0
@@ -1,1883 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * One command to capture an agent harness's system prompt.
4
- *
5
- * node capture/capture.mjs claude # interactive, model from settings
6
- * node capture/capture.mjs claude --model claude-fable-5-1
7
- * node capture/capture.mjs claude --print # the cheaper -p variant
8
- * node capture/capture.mjs codex --model gpt-5.6-sol
9
- * node capture/capture.mjs --index # rebuild capture/index.json only
10
- *
11
- * The prompt lands in `prompt/<model>-system-prompt.md`; the request body, tool definitions,
12
- * metadata and raw run land in `capture/<model>/`.
13
- *
14
- * Why this is not just `agenticreplay record`: the interactive prompt is a different, larger prompt than
15
- * the non-interactive one, and a harness only assembles it when stdin is a real console. A pipe is
16
- * not, so `agenticreplay record claude` always captures the -p variant. Interactive mode here holds a proxy
17
- * open with `agenticreplay attach`, then has PowerShell launch the agent in a console of its own.
18
- *
19
- * Everything written except capture/<model>/trace/ is scrubbed: paths, usernames, emails,
20
- * uuids, long hex runs and the configured gateway host become {{PLACEHOLDERS}}, and the run aborts
21
- * if anything identifying survives the pass.
22
- */
23
- import { spawn, spawnSync } from 'node:child_process';
24
- import {
25
- cpSync,
26
- existsSync,
27
- mkdirSync,
28
- readFileSync,
29
- readdirSync,
30
- renameSync,
31
- rmSync,
32
- writeFileSync,
33
- } from 'node:fs';
34
- import { gunzipSync } from 'node:zlib';
35
- import { homedir, tmpdir, userInfo } from 'node:os';
36
- import { basename, dirname, join, resolve } from 'node:path';
37
- import { fileURLToPath } from 'node:url';
38
-
39
- // Two roots on purpose. `prompt/` is the browsable collection and holds exactly one file per
40
- // capture, the prompt itself; `capture/` holds the machinery and the evidence. The prompt text is
41
- // written once, in `prompt/`, so the two directories cannot drift apart.
42
- const CAPTURE_DIR = dirname(fileURLToPath(import.meta.url));
43
- const PROMPT_DIR = join(dirname(CAPTURE_DIR), 'prompt');
44
- const BS = String.fromCharCode(92); // one literal backslash, spelled out so it survives editing
45
- const SEP_CLASS = `[${BS}${BS}/]`; // regex source matching either path separator
46
- const WIN = process.platform === 'win32';
47
-
48
- // ---------------------------------------------------------------------------- process plumbing
49
-
50
- /** Escape a regex metacharacter run. */
51
- const reEscape = (s) => s.replace(/[.*+?^${}()|[\]\\/]/g, (m) => BS + m);
52
-
53
- /**
54
- * A regex matching one filesystem path with either separator, case-insensitively, because Windows
55
- * paths are case-insensitive and some harnesses lowercase them before printing.
56
- */
57
- function pathRe(p, flags = 'gi') {
58
- // Split on separators first, then escape each segment. Escaping the whole path and swapping the
59
- // separators afterwards does not work: the character class inserted for the first separator
60
- // itself contains a backslash-slash pair, so the next pass splits the class it just wrote.
61
- return new RegExp(p.split(/[\\/]/).map(reEscape).join(SEP_CLASS), flags);
62
- }
63
-
64
- /** cmd.exe quoting. Node does not quote for you when `shell` is set, which splits any argument
65
- * containing a space — the throwaway prompt, every time. */
66
- const cmdQuote = (a) => (/[\s"^&|<>()%!]/.test(a) ? `"${a.replace(/"/g, `${BS}"`)}"` : a);
67
-
68
- /** Run a real executable. `powershell.exe` is one, so no shell is involved and no quoting applies. */
69
- function runExe(exe, args, opts = {}) {
70
- const r = spawnSync(exe, args, { encoding: 'utf8', ...opts });
71
- return { code: r.status, out: `${r.stdout ?? ''}${r.stderr ?? ''}`.replace(/\r/g, '') };
72
- }
73
-
74
- /**
75
- * How to invoke agenticreplay.
76
- *
77
- * `AGENTICREPLAY_BIN` pointing at a built `cli.js` runs a local checkout instead of whatever is on PATH,
78
- * which is what a capture needs while a fix is still in the working tree: the h2 interception the
79
- * Cursor profile depends on does not exist in a published build.
80
- */
81
- /**
82
- * Which agenticreplay this script drives.
83
- *
84
- * The build in this checkout comes first, and that ordering is the whole point: a globally
85
- * installed `agenticreplay` is a *release*, and a release does not know about an adapter that was added to
86
- * the tree after it shipped. Running `node capture/capture.mjs kilo` against one produced
87
- * "unknown adapter 'kilo'" listing the published registry -- an error about a binary the operator
88
- * never meant to use, from a script sitting three directories from the source that does support
89
- * it. `AGENTICREPLAY_BIN` still wins for anyone pointing this at a build elsewhere, and PATH is the
90
- * fallback for a machine with no checkout built.
91
- */
92
- function agenticreplayCommand(args) {
93
- const bin = process.env.AGENTICREPLAY_BIN ?? localAgenticReplayBuild();
94
- if (bin === undefined) return { name: 'agenticreplay', args };
95
- return { name: process.execPath, args: [bin, ...args] };
96
- }
97
-
98
- /** The CLI entry point built from this checkout, or undefined when it has not been built. */
99
- function localAgenticReplayBuild() {
100
- const built = join(dirname(CAPTURE_DIR), 'packages', 'cli', 'dist', 'cli.js');
101
- return existsSync(built) ? built : undefined;
102
- }
103
-
104
- /** Run a shim such as `agenticreplay.cmd`, which node cannot spawn without a shell. */
105
- function runShim(name, args, opts = {}) {
106
- if (!WIN) return runExe(name, args, opts);
107
- const line = [name, ...args.map(cmdQuote)].join(' ');
108
- const r = spawnSync(process.env.COMSPEC ?? 'cmd.exe', ['/d', '/s', '/c', line], {
109
- encoding: 'utf8',
110
- windowsVerbatimArguments: true,
111
- ...opts,
112
- });
113
- return { code: r.status, out: `${r.stdout ?? ''}${r.stderr ?? ''}`.replace(/\r/g, '') };
114
- }
115
-
116
- function spawnShim(name, args, opts = {}) {
117
- if (!WIN) return spawn(name, args, opts);
118
- const line = [name, ...args.map(cmdQuote)].join(' ');
119
- return spawn(process.env.COMSPEC ?? 'cmd.exe', ['/d', '/s', '/c', line], {
120
- windowsVerbatimArguments: true,
121
- ...opts,
122
- });
123
- }
124
-
125
- const powershell = (script) =>
126
- runExe('powershell.exe', ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-Command', script]);
127
-
128
- // ---------------------------------------------------------------------------- args
129
-
130
- function parseArgs(argv) {
131
- const flags = {};
132
- let harness;
133
- const valued = new Set([
134
- 'model',
135
- 'upstream',
136
- 'port',
137
- 'cwd',
138
- 'prompt',
139
- 'timeout',
140
- 'from-run',
141
- 'dir',
142
- 'retries',
143
- 'prompt-mode',
144
- ]);
145
- for (let i = 0; i < argv.length; i += 1) {
146
- const a = argv[i];
147
- if (!a.startsWith('--')) {
148
- harness ??= a;
149
- continue;
150
- }
151
- const key = a.slice(2);
152
- flags[key] = valued.has(key) ? argv[++i] : true;
153
- }
154
- return { harness, flags };
155
- }
156
-
157
- const { harness, flags } = parseArgs(process.argv.slice(2));
158
-
159
- const USAGE = `usage: node capture/capture.mjs <claude|codex|opencode|qwen|mimo|mcode|zcode|muse|kilo|cursor|hermes> [options]
160
-
161
- --model <id> model to capture. default: the harness's own default
162
- --prompt-mode <m> mcode only: tui, coding or work. default: coding
163
- --print claude only: capture the -p prompt instead of the interactive one
164
- --interactive codex only: capture the TUI prompt instead of the exec one
165
- --upstream <url> override where the proxy forwards. default: api.anthropic.com for
166
- claude when an agenticreplay gateway is configured, otherwise untouched
167
- --port <n> proxy port for interactive capture. default 46011
168
- --cwd <path> directory to run the agent in. default: the current directory.
169
- interactive claude needs a directory it already trusts
170
- --prompt <text> the throwaway user turn. default: a one-word reply
171
- --timeout <sec> how long to wait for the request. default 180
172
- --no-trace delete the raw agenticreplay run instead of keeping it under
173
- capture/<model>/trace/
174
- --retries <n> how many extra attempts after a transient failure. default 2
175
- --allow-failed file the capture even when the turn came back an error. the prompt
176
- is still genuine; refused by default so a wrong --model cannot
177
- quietly create a folder for a model that does not exist
178
- --index rebuild capture/index.json and exit
179
- --from-run <dir> file an agenticreplay run that already exists instead of capturing a new
180
- one. the run directory is read in place and left where it is
181
- --dir <name> folder name under capture/, when two harnesses serve the same
182
- model and would otherwise land in the same one`;
183
-
184
- // ---------------------------------------------------------------------------- harness profiles
185
-
186
- const npmPrefix = () => join(process.env.APPDATA ?? join(homedir(), 'AppData', 'Roaming'), 'npm');
187
- const npmRoot = () => join(npmPrefix(), 'node_modules');
188
-
189
- /**
190
- * Each profile knows how to pull the prompt out of one wire dialect. `blocks` is what lands in
191
- * system-prompt.md; `context` is harness-injected material that is not system-role, kept in the
192
- * annotated file only so the shareable prompt file stays what its name says.
193
- */
194
- /**
195
- * Pull the prompt out of an OpenAI-shaped request, either dialect.
196
- *
197
- * A harness picks one per model: a chat-completions body with the prompt in `messages`, or a
198
- * responses body with it in `input`. OpenCode uses both — `mimo-v2.5-free` the first,
199
- * `muse-spark-1.2-contributor-free` the second — and reading only `messages` finds nothing at all
200
- * in the second, so the capture fails while the prompt sits in the trace.
201
- */
202
- function extractOpenAiShaped(body) {
203
- const blocks = [];
204
- const context = [];
205
- for (const m of [...(body.messages ?? []), ...(body.input ?? [])]) {
206
- if (m.type !== undefined && m.type !== 'message') continue;
207
- const text =
208
- typeof m.content === 'string'
209
- ? m.content
210
- : (Array.isArray(m.content) ? m.content : []).map((c) => c.text ?? '').join('');
211
- if (text === '') continue;
212
- if (m.role === 'system' || m.role === 'developer') {
213
- blocks.push({ label: `${m.role}[${blocks.length}]`, text });
214
- } else if (/^\s*<[a-z_]+[\s>]/.test(text)) {
215
- context.push({ label: 'context', text });
216
- }
217
- }
218
- const tools = body.tools ?? [];
219
- return {
220
- blocks,
221
- context,
222
- tools,
223
- toolNames: tools.map((x) => x.function?.name ?? x.name).filter(Boolean),
224
- meta: {
225
- dialect: body.input ? 'openai-responses' : 'openai-chat',
226
- temperature: body.temperature,
227
- max_tokens: body.max_tokens ?? body.max_completion_tokens,
228
- },
229
- };
230
- }
231
-
232
- /**
233
- * Muse Code's turn, which is OpenAI-responses-shaped and still needs its own reader.
234
- *
235
- * Two departures from `extractOpenAiShaped`, both of which would otherwise file the wrong text
236
- * under the wrong heading:
237
- *
238
- * The prompt is in `instructions`, a field that extractor never looks at. Codex uses the same
239
- * dialect and puts its prompt in a `developer` message, so reading only `messages`/`input` has
240
- * been right up to now. Here it would have filed Muse's 22k-character workspace context as the
241
- * system prompt and dropped the 24k-character prompt entirely.
242
- *
243
- * The tools arrive as one entry of `type: "namespace"` with the real tools nested inside it.
244
- * Counting the outer array gives `1`, which is the number that would have gone into the table in
245
- * this file's README; the harness offers twenty-five.
246
- */
247
- function extractMuse(body) {
248
- const blocks = [];
249
- if (typeof body.instructions === 'string' && body.instructions !== '') {
250
- blocks.push({ label: 'instructions', text: body.instructions });
251
- }
252
- const context = [];
253
- for (const m of body.input ?? []) {
254
- if (m.type !== undefined && m.type !== 'message') continue;
255
- const text =
256
- typeof m.content === 'string'
257
- ? m.content
258
- : (Array.isArray(m.content) ? m.content : []).map((c) => c.text ?? '').join('');
259
- // Everything the harness injected but did not put in `instructions`: the workspace identity,
260
- // the skills list, the memory snapshot. Kept out of the prompt file, which is what its name
261
- // says it is, and into the annotated one.
262
- if (text !== '' && (m.role === 'developer' || m.role === 'system')) {
263
- context.push({ label: `${m.role}[${context.length}]`, text });
264
- }
265
- }
266
- const flat = (body.tools ?? []).flatMap((t) => (t?.type === 'namespace' ? (t.tools ?? []) : [t]));
267
- return {
268
- blocks,
269
- context,
270
- tools: flat,
271
- toolNames: flat.map((x) => x.function?.name ?? x.name).filter(Boolean),
272
- meta: {
273
- dialect: 'openai-responses',
274
- max_tokens: body.max_output_tokens,
275
- reasoning_effort: body.reasoning?.effort,
276
- },
277
- };
278
- }
279
-
280
- /** A recorded body, whichever of the two forms agenticreplay stored it in. */
281
- const BINARY_BODY_PREFIX = 'agenticreplay-base64:';
282
- const recordedBytes = (body) =>
283
- typeof body === 'string' && body.startsWith(BINARY_BODY_PREFIX)
284
- ? Buffer.from(body.slice(BINARY_BODY_PREFIX.length), 'base64')
285
- : Buffer.from(String(body ?? ''), 'utf8');
286
-
287
- /**
288
- * Split a Connect-protocol body into its messages.
289
- *
290
- * Five bytes of framing per message: one flag byte where bit 0 means the payload is compressed,
291
- * then a big-endian length. Cursor gzips the frames that carry the conversation.
292
- */
293
- function connectFrames(buf) {
294
- const out = [];
295
- for (let off = 0; off + 5 <= buf.length;) {
296
- const flags = buf[off];
297
- const len = buf.readUInt32BE(off + 1);
298
- let body = buf.subarray(off + 5, Math.min(off + 5 + len, buf.length));
299
- if (flags & 1) {
300
- try {
301
- body = gunzipSync(body);
302
- } catch {
303
- /* keep it compressed and move on */
304
- }
305
- }
306
- out.push(body);
307
- off += 5 + len;
308
- }
309
- return out;
310
- }
311
-
312
- /**
313
- * Every `{"role": ...}` object in a string, matched by brace counting.
314
- *
315
- * The protobuf carries the conversation as JSON strings, and reading them out needs no schema --
316
- * which is the only reason this is tractable without Cursor's `.proto` files.
317
- */
318
- function roleObjects(text) {
319
- const found = [];
320
- for (let i = text.indexOf('{"role"'); i !== -1; i = text.indexOf('{"role"', i)) {
321
- let depth = 0;
322
- let inString = false;
323
- let escaped = false;
324
- let j = i;
325
- for (; j < text.length; j += 1) {
326
- const c = text[j];
327
- if (escaped) {
328
- escaped = false;
329
- continue;
330
- }
331
- if (c === '\\') {
332
- escaped = true;
333
- continue;
334
- }
335
- if (c === '"') {
336
- inString = !inString;
337
- continue;
338
- }
339
- if (inString) continue;
340
- if (c === '{') depth += 1;
341
- else if (c === '}' && --depth === 0) {
342
- j += 1;
343
- break;
344
- }
345
- }
346
- try {
347
- found.push(JSON.parse(text.slice(i, j)));
348
- } catch {
349
- /* a frame cut mid-object */
350
- }
351
- i = j;
352
- }
353
- return found;
354
- }
355
-
356
- /** The gateway credential from `agenticreplay setup`, for a harness that has no store of its own. */
357
- function agenticreplayGatewayKey() {
358
- const path = join(
359
- process.env.XDG_CONFIG_HOME ?? join(homedir(), '.config'),
360
- 'agenticreplay',
361
- 'config.json',
362
- );
363
- try {
364
- const g = JSON.parse(readFileSync(path, 'utf8')).gateway ?? {};
365
- return g.api_key ?? (g.api_key_env ? process.env[g.api_key_env] : undefined);
366
- } catch {
367
- return undefined;
368
- }
369
- }
370
-
371
- /**
372
- * Which of MCode's three prompts to capture.
373
- *
374
- * `tui`, `coding` and `work` are three different system prompts from one binary, so the mode is
375
- * part of what a capture identifies and `prompt/MCODE/` holds all three. `coding` is the default
376
- * here because it is the one a non-interactive `exec` run would otherwise pick anyway.
377
- */
378
- const MCODE_PROMPT_MODES = ['tui', 'coding', 'work'];
379
- function promptMode() {
380
- const mode = typeof flags['prompt-mode'] === 'string' ? flags['prompt-mode'] : 'coding';
381
- if (!MCODE_PROMPT_MODES.includes(mode)) {
382
- throw new Error(`--prompt-mode must be one of ${MCODE_PROMPT_MODES.join(', ')}, got '${mode}'`);
383
- }
384
- return mode;
385
- }
386
-
387
- const PROFILES = {
388
- claude: {
389
- id: 'claude',
390
- adapter: 'claude',
391
- promptDir: 'CLAUDECODE',
392
- exe: () => join(npmRoot(), '@anthropic-ai', 'claude-code', 'bin', 'claude.exe'),
393
- defaultInteractive: true,
394
- trustKeyed: true,
395
- recordArgs: (model, prompt) => ['--', '-p', prompt, ...(model ? ['--model', model] : [])],
396
- consoleArgs: (model, prompt) => [...(model ? ['--model', model] : []), `"${prompt}"`],
397
- forceAnthropicUpstream: true,
398
- extract(body) {
399
- const blocks = [];
400
- const context = [];
401
- for (const s of body.system ?? []) {
402
- if (typeof s.text === 'string') {
403
- blocks.push({
404
- label: `system[${blocks.length}]`,
405
- text: s.text,
406
- cache: s.cache_control?.ttl ?? 'none',
407
- });
408
- }
409
- }
410
- for (const m of body.messages ?? []) {
411
- const parts = Array.isArray(m.content) ? m.content : [{ text: m.content }];
412
- for (const p of parts) {
413
- if (typeof p.text !== 'string') continue;
414
- if (m.role === 'system') blocks.push({ label: 'role:system', text: p.text });
415
- else if (p.text.includes('<system-reminder>'))
416
- context.push({ label: 'system-reminder', text: p.text });
417
- }
418
- }
419
- const tools = body.tools ?? [];
420
- const header = body.system?.[0]?.text ?? '';
421
- return {
422
- blocks,
423
- context,
424
- tools,
425
- toolNames: tools.map((t) => t.name),
426
- meta: {
427
- entrypoint: /cc_entrypoint=([\w-]+)/.exec(header)?.[1],
428
- harness_version: /cc_version=([\w.]+)/.exec(header)?.[1],
429
- thinking: body.thinking,
430
- output_config: body.output_config,
431
- max_tokens: body.max_tokens,
432
- },
433
- };
434
- },
435
- },
436
-
437
- codex: {
438
- id: 'codex',
439
- adapter: 'codex',
440
- promptDir: 'CODEX',
441
- // Codex ships a JS entry point rather than a binary, so the console is opened on the npm
442
- // shim; Start-Process gives `codex.cmd` a console just as readily as an executable.
443
- exe: () => join(npmPrefix(), 'codex.cmd'),
444
- defaultInteractive: false,
445
- recordArgs: (model, prompt) => [
446
- '--',
447
- 'exec',
448
- '--skip-git-repo-check',
449
- ...(model ? ['--model', model] : []),
450
- prompt,
451
- ],
452
- consoleArgs: (model, prompt) => [...(model ? ['--model', model] : []), `"${prompt}"`],
453
- forceAnthropicUpstream: false,
454
- extract(body) {
455
- const blocks = [];
456
- const context = [];
457
- let tools = [];
458
- for (const item of body.input ?? []) {
459
- if (item.type === 'additional_tools') {
460
- tools = item.tools ?? [];
461
- continue;
462
- }
463
- if (item.type !== 'message') continue;
464
- const parts = Array.isArray(item.content) ? item.content : [{ text: item.content }];
465
- for (const p of parts) {
466
- if (typeof p.text !== 'string') continue;
467
- if (item.role === 'developer')
468
- blocks.push({ label: `developer[${blocks.length}]`, text: p.text });
469
- else if (/^\s*<[a-z_]+[\s>]/.test(p.text))
470
- context.push({ label: 'context', text: p.text });
471
- }
472
- }
473
- // Codex nests tools in namespaces, so the leaves are the tools and the branches are not.
474
- const names = [];
475
- const walk = (t) => {
476
- if (t.name && t.type !== 'namespace') names.push(t.name);
477
- (t.tools ?? []).forEach(walk);
478
- };
479
- tools.forEach(walk);
480
- return {
481
- blocks,
482
- context,
483
- tools,
484
- toolNames: names,
485
- meta: { reasoning: body.reasoning, text: body.text, store: body.store },
486
- };
487
- },
488
- },
489
- opencode: {
490
- id: 'opencode',
491
- adapter: 'opencode',
492
- promptDir: 'OPENCODE',
493
- defaultInteractive: false,
494
-
495
- /**
496
- * OpenCode is captured by decrypting its own origin rather than by moving it.
497
- *
498
- * Redirecting it does not work: the provider origin lives in `opencode.json`, not in an
499
- * environment variable, so `OPENAI_BASE_URL` leaves the run talking straight past the proxy.
500
- * Writing a project-level config with the proxy origin in it does redirect OpenCode when the
501
- * command is typed in a shell, and did not when the same file and command were launched from
502
- * here — the proxy recorded nothing at all. Rather than keep chasing that, this takes the route
503
- * agenticreplay built for an agent whose origin cannot be moved: `--tls-intercept` terminates the TLS
504
- * OpenCode established itself, at the socket, and the config is left alone.
505
- *
506
- * The models under the built-in `opencode` provider are the ones this reaches, several of them
507
- * free, which is also what makes iterating on the capture cost nothing. A provider pointed at a
508
- * plain-HTTP gateway of your own is neither redirected nor decrypted, and needs its own answer.
509
- */
510
- recordFlags: ['--tls-intercept', '--tls-hosts', '+opencode.ai,+*.opencode.ai'],
511
- defaultModel: 'opencode/mimo-v2.5-free',
512
- recordArgs: (model, prompt) => ['--', 'run', ...(model ? ['--model', model] : []), prompt],
513
- consoleArgs: (model, prompt) => ['run', ...(model ? ['--model', model] : []), `"${prompt}"`],
514
- forceAnthropicUpstream: false,
515
-
516
- extract: extractOpenAiShaped,
517
- },
518
-
519
- /**
520
- * MiMo Code, Xiaomi's OpenCode fork. Captured by decrypting its own origin, exactly as OpenCode
521
- * is and for the same reason: the provider lives in `~/.config/mimocode/mimocode.jsonc` rather
522
- * than in a variable. `api.xiaomimimo.com` is in the default host list, so no `--tls-hosts`.
523
- *
524
- * No credential needed. MiMo sends the request and lets the server reject an invalid key, and
525
- * the prompt is in the request -- an `Invalid API Key` run still yields a complete capture.
526
- *
527
- * One prompt for the whole `xiaomi/*` family, and it is worth knowing that is *not* a
528
- * per-variant question. Captured from the same directory, `mimo-v2.5`, `mimo-v2.5-pro` and
529
- * `mimo-v2.5-pro-ultraspeed` send byte-identical prompts and tool sets -- same sha256 -- so the
530
- * tier changes the model behind the request and nothing about the request itself.
531
- *
532
- * "From the same directory" is load-bearing, and not only here: the OpenCode family embeds the
533
- * working directory's facts in the prompt. MiMo derives a project id from it, so the memory path
534
- * reads `projects/global/MEMORY.md` outside a recognised project and `projects/<id>/MEMORY.md`
535
- * inside one; Kilo and OpenCode carry `Is directory a git repo` and today's date, which is why
536
- * the OPENCODE captures already on disk disagree with each other about the former. Two captures
537
- * are comparable when they were made from the same place, and otherwise the diff is about the
538
- * cwd rather than about the model.
539
- *
540
- * It does change with the *provider*, though, because being an OpenCode fork it inherits
541
- * per-model templates. Pointed at a GPT-family model it sends the Codex template with its own
542
- * name substituted into it -- `$MiMoCode_HOME` where Codex says `$CODEX_HOME` -- and exposes a
543
- * single `exec` tool carrying the TypeScript declaration of every other one, instead of the 16
544
- * ordinary tools the `xiaomi/*` prompt declares. Only the `xiaomi/*` capture is filed here:
545
- * that is MiMo's own prompt for MiMo's own models, and the other is mostly Codex's.
546
- */
547
- mimo: {
548
- id: 'mimo',
549
- adapter: 'mimo',
550
- promptDir: 'MIMOCODE',
551
- defaultInteractive: false,
552
- recordFlags: ['--tls-intercept'],
553
- defaultModel: 'xiaomi/mimo-v2.5',
554
- recordArgs: (model, prompt) => ['--', 'run', ...(model ? ['--model', model] : []), prompt],
555
- consoleArgs: (model, prompt) => ['run', ...(model ? ['--model', model] : []), `"${prompt}"`],
556
- forceAnthropicUpstream: false,
557
-
558
- extract: extractOpenAiShaped,
559
- },
560
-
561
- /**
562
- * MiniMax Code, the one harness here captured by moving its data directory.
563
- *
564
- * No `--tls-intercept`, and that is the finding rather than an omission: MCode's HTTP client is
565
- * Node's `fetch`, which consults neither `HTTP_PROXY` nor `HTTPS_PROXY`, so interception sees no
566
- * traffic and the run ends `capture.empty`. There is no base-URL variable either -- the origin
567
- * lives in `~/.minimax/config.yaml`. The `mcode` adapter points `MINIMAX_DATA_DIR` at a
568
- * directory inside the run and writes a redirected copy of that config there, so the operator's
569
- * own file is never touched, which matters because MCode writes to its config on startup.
570
- *
571
- * It follows that a provider has to be configured for there to be anything to capture: the
572
- * built-in managed login cannot be redirected by a file, and MCode restores its origin over
573
- * whatever the config says. Run `mcode provider add` once first.
574
- *
575
- * No model is defaulted. MCode resolves `provider/model` against the operator's own config, so
576
- * naming one here would be naming a provider that may not exist on their machine; without
577
- * `--model` it uses the `defaultModel` they already chose. `--permission off` and `--max-steps
578
- * 1` keep the run to the single call the prompt travels in.
579
- *
580
- * The prompt does not vary by model. Measured across seven models on six families and two
581
- * gateways: 119 identical lines, with only the `- Model:` line differing. It does vary by
582
- * `--prompt-mode`, which is why all three are in `prompt/MCODE/`.
583
- */
584
- mcode: {
585
- id: 'mcode',
586
- adapter: 'mcode',
587
- promptDir: 'MCODE',
588
- defaultInteractive: false,
589
- recordFlags: [],
590
- defaultModel: '',
591
- recordArgs: (model, prompt) => [
592
- '--',
593
- 'exec',
594
- '--prompt-mode',
595
- promptMode(),
596
- '--permission',
597
- 'off',
598
- '--max-steps',
599
- '1',
600
- ...(model ? ['--model', model] : []),
601
- prompt,
602
- ],
603
- consoleArgs: (model, prompt) => [
604
- 'exec',
605
- '--prompt-mode',
606
- promptMode(),
607
- '--permission',
608
- 'off',
609
- '--max-steps',
610
- '1',
611
- ...(model ? ['--model', model] : []),
612
- `"${prompt}"`,
613
- ],
614
- forceAnthropicUpstream: false,
615
-
616
- // Three prompts from one binary, so the mode is part of what the file is named for.
617
- promptVariant: () => `-${promptMode()}`,
618
-
619
- extract: extractOpenAiShaped,
620
- },
621
-
622
- /**
623
- * ZCode, Z.ai's coding agent, captured through the provider file it is handed.
624
- *
625
- * The `zcode` adapter writes a redirected copy of the operator's provider config into the run
626
- * and names it with `ZCODE_PERSONAL_PROVIDER_CONFIG_FILE`, so nothing here has to move an
627
- * origin: by the time the harness starts, its own configuration already points at the proxy.
628
- *
629
- * `--model` is not a flag this harness has: `zcode --prompt … --model glm-4.6` answers
630
- * `Unknown option '--model'` and prints its help, measured. The model is chosen in the provider
631
- * config, under `defaultModelSelection`, so the adapter's config is what names it — `glm-4.6`,
632
- * a real catalogue id, because ZCode builds a model from its catalogue before it builds a
633
- * request and an id it does not know ends the run at `Model creation failed` with nothing
634
- * captured. `modelFromConfig` is what keeps `--model` off the command line and out of the
635
- * `regenerate` string, and makes passing it an error rather than a failed run.
636
- *
637
- * Capture this one with `--cwd` pointing somewhere disposable. ZCode's prompt embeds the
638
- * working directory's git branch and `git status` output, so a capture taken inside a checkout
639
- * records whichever branch was out and every file that happened to be dirty. The committed
640
- * artifact was taken in an empty directory and reads `Current branch: master` and `(clean)`.
641
- *
642
- * `--mode yolo` is ZCode's own default for `--prompt` and is passed explicitly so the capture
643
- * does not stop on a permission question. The prompt travels in the request, so a turn the
644
- * upstream refuses costs the capture nothing — the ordinary case here, since the key in the
645
- * generated config is the placeholder. A refusal need not arrive as a status: measured once as
646
- * `200` carrying an `upstream 400` frame inside the stream, `stop_reason=error` and no usage
647
- * block, with the request and its 27 tool schemas already on disk.
648
- */
649
- zcode: {
650
- id: 'zcode',
651
- adapter: 'zcode',
652
- promptDir: 'ZCODE',
653
- defaultInteractive: false,
654
- recordFlags: [],
655
- defaultModel: '',
656
- modelFromConfig: true,
657
- recordArgs: (_model, prompt) => ['--', '--prompt', prompt, '--mode', 'yolo'],
658
- consoleArgs: (_model, prompt) => ['--prompt', `"${prompt}"`, '--mode', 'yolo'],
659
- forceAnthropicUpstream: false,
660
-
661
- extract: extractOpenAiShaped,
662
- },
663
-
664
- /**
665
- * Kilo Code's CLI, a third OpenCode fork, captured the same way. `api.kilo.ai` is in the
666
- * default host list.
667
- *
668
- * Unlike MiMo, Kilo checks entitlement *locally* before opening a connection: a model the
669
- * account cannot use fails with "You need to sign in to use this model" and sends nothing, so
670
- * there is nothing to capture. `kilo/kilo-auto/free` is reachable without a paid plan, which is
671
- * why it is the default here.
672
- */
673
- kilo: {
674
- id: 'kilo',
675
- adapter: 'kilo',
676
- promptDir: 'KILOCODE',
677
- defaultInteractive: false,
678
- recordFlags: ['--tls-intercept'],
679
- defaultModel: 'kilo/kilo-auto/free',
680
- recordArgs: (model, prompt) => ['--', 'run', ...(model ? ['--model', model] : []), prompt],
681
- consoleArgs: (model, prompt) => ['run', ...(model ? ['--model', model] : []), `"${prompt}"`],
682
- forceAnthropicUpstream: false,
683
-
684
- extract: extractOpenAiShaped,
685
- },
686
-
687
- /**
688
- * Hermes is the only Python harness here, and the only one whose origin cannot be moved at all.
689
- *
690
- * `OPENAI_BASE_URL` is not a route into it -- verified against a listener, not assumed -- so the
691
- * origin stays where Hermes put it and `--tls-intercept` reads the traffic in place. The prompt
692
- * travels in the request, so it is read the ordinary way.
693
- *
694
- * `--provider opencode-free` is the tier served anonymously, which is what makes this runnable
695
- * with no key and no credential in the capture. Its origin is `opencode.ai`, a website as much
696
- * as a gateway, so it is named explicitly rather than defaulted into the allowlist. `-z` is the
697
- * non-interactive flag; without it Hermes opens a session and waits.
698
- */
699
- hermes: {
700
- id: 'hermes',
701
- adapter: 'hermes',
702
- promptDir: 'HERMES',
703
- defaultInteractive: false,
704
- recordFlags: ['--tls-intercept', '--tls-hosts', '+opencode.ai'],
705
- defaultModel: 'nemotron-3.5-lightning-free',
706
- recordArgs: (model, prompt) => [
707
- '--',
708
- '--provider',
709
- 'opencode-free',
710
- ...(model ? ['-m', model] : []),
711
- '-z',
712
- prompt,
713
- ],
714
- consoleArgs: (model, prompt) => [
715
- '--provider',
716
- 'opencode-free',
717
- ...(model ? ['-m', model] : []),
718
- '-z',
719
- `"${prompt}"`,
720
- ],
721
- forceAnthropicUpstream: false,
722
-
723
- extract: extractOpenAiShaped,
724
- },
725
-
726
- cursor: {
727
- id: 'cursor',
728
- adapter: 'exec',
729
- netOnly: true,
730
- promptDir: 'CURSOR',
731
- defaultInteractive: false,
732
- exe: () => join(process.env.LOCALAPPDATA ?? '', 'cursor-agent', 'cursor-agent.cmd'),
733
- forceAnthropicUpstream: false,
734
-
735
- /**
736
- * Cursor is the awkward one, and every part of that is a protocol fact rather than a choice.
737
- *
738
- * Its agent stream speaks HTTP/2 exclusively to a host of its own, so there is no base URL to
739
- * move and interception has to terminate h2 -- which agenticreplay could not do until the interceptor
740
- * learned to. The wire format is Connect over protobuf, so the body is bytes rather than JSON
741
- * and only survives a trace because a non-text body is now recorded as base64. And the prompt
742
- * is not in the request at all: the request carries the user's turn and the model settings,
743
- * and the server sends the composed conversation *back* in the response stream, gzipped inside
744
- * the protobuf. That is where this reads it from.
745
- *
746
- * `--trust` because the agent will not run non-interactively in a directory it has not been
747
- * trusted in, and unlike `--yolo` it grants nothing else.
748
- */
749
- recordFlags: ['--tls-intercept', '--tls-hosts', '+api2.cursor.sh,+*.cursor.sh'],
750
- defaultModel: 'auto',
751
- recordArgs: (model, prompt) => [
752
- '--',
753
- join(process.env.LOCALAPPDATA ?? '', 'cursor-agent', 'cursor-agent.cmd'),
754
- '-p',
755
- '--trust',
756
- ...(model ? ['--model', model] : []),
757
- prompt,
758
- ],
759
- consoleArgs: (model, prompt) => [
760
- '-p',
761
- '--trust',
762
- ...(model ? ['--model', model] : []),
763
- `"${prompt}"`,
764
- ],
765
-
766
- /** Not used: the prompt is read from the trace as a whole, by `extractFromRun` below. */
767
- extract: () => ({ blocks: [], context: [], tools: [], toolNames: [], meta: {} }),
768
-
769
- /**
770
- * Reads the run rather than one request, because the halves live in different messages: the
771
- * model id is in the request and the conversation is in the response.
772
- */
773
- extractFromRun(dir) {
774
- const events = readEvents(dir);
775
- const blobText = (payload) => {
776
- if (payload === undefined) return undefined;
777
- if (typeof payload === 'string') return payload;
778
- if (!payload.$blob) return undefined;
779
- const sha = payload.$blob.replace('sha256:', '');
780
- return JSON.parse(readFileSync(join(dir, 'blobs', sha.slice(0, 2), sha), 'utf8'));
781
- };
782
-
783
- const agentEvents = events.filter((e) => String(e.attrs?.host ?? '').includes('agentn'));
784
- if (agentEvents.length === 0) {
785
- throw new Error(
786
- 'no Cursor agent stream in the run.\n' +
787
- ' the conversation host is reached over HTTP/2, so the interceptor has to speak h2;\n' +
788
- ' check that --tls-hosts covers *.cursor.sh and that this agenticreplay build has the h2 path.',
789
- );
790
- }
791
-
792
- const messages = [];
793
- let model;
794
- let serverError;
795
- for (const e of agentEvents) {
796
- const body = blobText(e.payload);
797
- if (body === undefined) continue;
798
- for (const frame of connectFrames(recordedBytes(body))) {
799
- const text = frame.toString('utf8');
800
- messages.push(...roleObjects(text));
801
- // Which model actually answered, from the response.
802
- //
803
- // Not from the request: with `auto` the request carries the router's whole candidate
804
- // set -- nine of them on one run, grok-4.6 first -- so reading a name out of it reports
805
- // a candidate and files the capture under the wrong model. The response states the
806
- // choice once, in `providerOptions`.
807
- model ??= /"modelName":"(?:cursor-)?([a-zA-Z0-9.\-]+)"/.exec(text)?.[1];
808
- // The stream carries its own errors as JSON, and they explain an empty capture far
809
- // better than the absence of a system message does. `resource_exhausted` is what a
810
- // model the account has no quota for looks like.
811
- serverError ??= /"error":\{"code":"([a-z_]+)"/.exec(text)?.[1];
812
- }
813
- }
814
-
815
- const system = messages.filter((m) => m.role === 'system');
816
- if (system.length === 0) {
817
- throw new Error(
818
- serverError
819
- ? `Cursor answered ${serverError} rather than running the turn, so there is no prompt` +
820
- ' to read.\n resource_exhausted means the account has no quota left for this' +
821
- ' model; try another, or `auto`.'
822
- : 'the Cursor agent stream carried no system message',
823
- );
824
- }
825
- const blocks = system.map((m, i) => ({ label: `system[${i}]`, text: String(m.content) }));
826
- const context = messages
827
- .filter((m) => m.role !== 'system')
828
- .map((m, i) => ({
829
- label: `${m.role}[${i}]`,
830
- text: typeof m.content === 'string' ? m.content : JSON.stringify(m.content),
831
- }));
832
-
833
- // Cursor declares no tool schemas at all. The prompt describes two meta-tools --
834
- // `GetDynamicTools` and `CallDynamicTool` -- and names the rest as an attribute on a
835
- // namespace element, leaving the schemas server-side. So the names come from there, and a
836
- // count of zero would have been the wrong answer rather than a missing one.
837
- const contextText = context.map((c) => c.text).join('\n');
838
- const named = [...contextText.matchAll(/<namespace\s[^>]*tools="([^"]+)"/g)]
839
- .flatMap((m) => m[1].split(',').map((s) => s.trim()))
840
- .filter(Boolean);
841
- const meta = [...contextText.matchAll(/`(GetDynamicTools|CallDynamicTool)`/g)].map(
842
- (m) => m[1],
843
- );
844
- const toolNames = [...new Set([...meta, ...named])];
845
-
846
- // The router's candidates, from the request. Worth keeping: it is the only place that says
847
- // what `auto` was choosing between.
848
- const requestText = agentEvents
849
- .filter((e) => e.type === 'net.request' || e.type === 'model.request')
850
- .map((e) => blobText(e.payload))
851
- .filter((b) => b !== undefined)
852
- .flatMap((b) => connectFrames(recordedBytes(b)).map((f) => f.toString('utf8')))
853
- .join('\n');
854
- const candidates = [
855
- ...new Set(
856
- [
857
- ...requestText.matchAll(
858
- /(?:claude|gpt|gemini|grok|composer)-[a-z0-9]+(?:[.-][a-z0-9]+)*/gi,
859
- ),
860
- ]
861
- .map((m) => m[0])
862
- // The working directory reaches the request as a path, and a slug beginning `claude-`
863
- // matches the same shape. Real ids are short.
864
- .filter((id) => id.length <= 24),
865
- ),
866
- ].sort();
867
-
868
- return {
869
- model,
870
- blocks,
871
- context,
872
- tools: [],
873
- toolNames,
874
- meta: { wire: 'connect+proto', router_candidates: candidates },
875
- };
876
- },
877
- },
878
-
879
- /**
880
- * Muse Code, Meta's terminal coding agent, captured in front of the proxy rather than through
881
- * it.
882
- *
883
- * Every other profile here hands the harness an origin and gets out of the way. Muse needs a
884
- * process in between, for a reason neither side is wrong about: it fetches a model catalogue
885
- * with `GET /muse-code/models` and will not build a turn until that answers, and agenticreplay's proxy
886
- * answers 404 to every non-POST because only a POST is ever a model call. `muse-shim.mjs`
887
- * serves that one GET and forwards the rest untouched, so the turn carrying the prompt is still
888
- * recorded by agenticreplay as a `/responses` exchange.
889
- *
890
- * The origin reaches the shim through `AGENTICREPLAY_BASE_URL_VARS`, bare. `/forward/` is not available:
891
- * Muse discards any path on `--base-url`, measured — given `…:47001/deep/path` it still asks
892
- * for `/muse-code/models` at the root — and a forward is nothing but path.
893
- *
894
- * No account is needed. The key is a placeholder, the turn comes back refused, and the prompt
895
- * travels in the request either way. Verified against the signed binary: Muse stores the prompt
896
- * as a template with `{{tool:…}}` placeholders, and rendering those to `muse.<name>` reproduces
897
- * the captured text exactly.
898
- *
899
- * `MUSE_BIN` points at the executable when it is not on PATH, which on Windows it will not be:
900
- * `dev.meta.ai/install.sh` only handles macOS and Linux, though the release manifest does carry
901
- * a Windows build.
902
- */
903
- muse: {
904
- id: 'muse',
905
- // Muse reads no origin variable at all, so there is nothing for an adapter to set. `exec`
906
- // launches the shim and redirects nothing, which is exactly what is wanted here.
907
- adapter: 'exec',
908
- promptDir: 'MUSECODE',
909
- defaultInteractive: false,
910
- recordFlags: [],
911
- defaultModel: 'muse-spark-1.3',
912
- recordArgs: (model, prompt) => [
913
- '--',
914
- process.execPath,
915
- join(CAPTURE_DIR, 'muse-shim.mjs'),
916
- prompt,
917
- model,
918
- ],
919
- consoleArgs: (model, prompt) => [join(CAPTURE_DIR, 'muse-shim.mjs'), `"${prompt}"`, model],
920
- forceAnthropicUpstream: false,
921
-
922
- prepare() {
923
- // `=/` is the bare origin. Without the explicit path `applyNamedBaseUrls` would append
924
- // `v1`, which Muse would then discard along with the rest of the path — harmless but
925
- // misleading to read in a trace.
926
- return { env: { AGENTICREPLAY_BASE_URL_VARS: 'MUSE_PROXY=/' }, restore() {} };
927
- },
928
-
929
- extract: extractMuse,
930
- },
931
-
932
- qwen: {
933
- id: 'qwen',
934
- adapter: 'generic-openai',
935
- promptDir: 'QWENCODE',
936
- defaultInteractive: false,
937
- recordArgs: (_model, prompt) => ['--', 'qwen', '-p', prompt],
938
- consoleArgs: (_model, prompt) => ['-p', `"${prompt}"`],
939
- forceAnthropicUpstream: false,
940
-
941
- /**
942
- * Qwen Code reads its OpenAI-compatible endpoint straight from the environment, which is the
943
- * one thing `generic-openai` redirects, so nothing clever is needed — no config to rewrite and
944
- * no TLS to terminate. What it does need is the key and the model name, since it has no
945
- * credential store of its own: `OPENAI_API_KEY` if the environment already carries one,
946
- * otherwise the gateway key `agenticreplay setup` stored, which is where the traffic is going anyway.
947
- */
948
- prepare(_cwd, model) {
949
- const key = process.env.OPENAI_API_KEY ?? agenticreplayGatewayKey();
950
- if (!key)
951
- throw new Error('qwen needs OPENAI_API_KEY set, or an agenticreplay gateway with a key');
952
- if (!model) throw new Error('qwen needs --model: the id its endpoint serves');
953
- return { env: { OPENAI_API_KEY: key, OPENAI_MODEL: model }, restore() {} };
954
- },
955
-
956
- extract: extractOpenAiShaped,
957
- },
958
- };
959
-
960
- // ---------------------------------------------------------------------------- scrubbing
961
-
962
- /** A model id or folder name reduced to a single path segment. */
963
- function flattenModelId(name) {
964
- return name.replace(/[\\/]+/g, '-');
965
- }
966
-
967
- function gitValue(cwd, key) {
968
- const r = spawnSync('git', ['config', '--get', key], { cwd, encoding: 'utf8' });
969
- return r.status === 0 ? r.stdout.trim() : '';
970
- }
971
-
972
- function agenticreplayGatewayHost() {
973
- const p = join(
974
- process.env.XDG_CONFIG_HOME ?? join(homedir(), '.config'),
975
- 'agenticreplay',
976
- 'config.json',
977
- );
978
- try {
979
- const url = JSON.parse(readFileSync(p, 'utf8')).gateway?.url;
980
- return url ? new URL(url).hostname : '';
981
- } catch {
982
- return '';
983
- }
984
- }
985
-
986
- /** How Claude Code slugs a working directory for its per-project state folders. */
987
- const projectSlug = (cwd) => cwd.replace(/[:\\/]/g, '-').replace(/_/g, '-');
988
-
989
- /**
990
- * Ordered, because the rules overlap: the memory directory sits inside the home directory, so a
991
- * bare home rule applied first would leave a half-scrubbed path behind.
992
- */
993
- function buildScrubber(cwd) {
994
- const home = homedir();
995
- const user = userInfo().username;
996
- const gitName = gitValue(cwd, 'user.name');
997
- const gitEmail = gitValue(cwd, 'user.email');
998
- const gateway = agenticreplayGatewayHost();
999
-
1000
- const rules = [
1001
- [/Recent commits:\n(?:[0-9a-f]{7,40} [^\n]*\n?)+/g, 'Recent commits:\n{{RECENT_COMMITS}}\n'],
1002
- // The branch that happened to be checked out and the files that happened to be dirty. ZCode
1003
- // puts both in its system prompt, so a capture taken inside a checkout records them: measured,
1004
- // the same capture is 9,084 characters from an empty repository and 9,530 from this one, the
1005
- // difference being a branch name and a list of the files being worked on. Neither is a fact
1006
- // about the harness, and leaving them in made `regenerate` overwrite the committed artifact
1007
- // with whatever the operator's tree looked like — the failure `{{RUN_ID}}` below exists to
1008
- // prevent, arriving by a different door.
1009
- [/^Current branch: [^\n]*/gm, 'Current branch: {{GIT_BRANCH}}'],
1010
- // The status block ends where porcelain output stops, not at a blank line. Claude Code's
1011
- // prompt puts `Recent commits:` directly after it with nothing in between, and a rule that
1012
- // consumed every non-empty line swallowed that heading and the commits under it — caught
1013
- // against the committed Crush capture, which has exactly that shape. So each line has to look
1014
- // like an entry: `(clean)`, or one or two status letters and a space. `Recent commits:` does
1015
- // not, because `R` is a status letter but `e` is not a space.
1016
- //
1017
- // One or more, not zero or more, and that quantifier is the whole difference between a rule
1018
- // and a bug. With `*` the group matches nothing at all after any `Status:` line, so the rule
1019
- // fired where there was nothing to scrub — a `Status:` followed by a blank line or by prose
1020
- // had `{{GIT_STATUS}}` inserted above it and its own content pushed down, and running the
1021
- // scrubber over an already-scrubbed file added a second placeholder every time. With `+` the
1022
- // rule only rewrites a block it actually recognised, which also makes it idempotent:
1023
- // `{{GIT_STATUS}}` is not an entry, so a second pass matches nothing.
1024
- [/^Status:\n(?:(?:\(clean\)|[ MADRCU?!]{1,2} [^\n]*)\n)+/gm, 'Status:\n{{GIT_STATUS}}\n'],
1025
- [pathRe(join(home, '.claude', 'projects')), '{{CLAUDE_PROJECTS}}'],
1026
- // ZCode names its per-project memory directory `<basename>-<16 hex of the absolute path>`,
1027
- // which `{{PROJECT_SLUG}}` below does not match — that rule knows Claude Code's shape, the
1028
- // whole path with its separators replaced. Sixteen hex is also below the `{{HEX}}` floor of
1029
- // thirty-two, so without this the slug went into the artifact verbatim and the capture became
1030
- // a fact about the directory it was taken in: measured, `tmp-zcode-cap-4d499eaeb9ee4ee2` from
1031
- // one directory and `tmp-zc-fixed-013df1bece516efe` from another, three characters apart and
1032
- // a different file. Same reason as `{{RUN_ID}}` below.
1033
- [/([\\/]\.zcode[\\/]cli[\\/]memories[\\/]projects[\\/])[^\\/\s"']+/g, '$1{{PROJECT_SLUG}}'],
1034
- [pathRe(join(home, '.codex')), '{{CODEX_HOME}}'],
1035
- [pathRe(join(home, '.claude')), '{{CLAUDE_HOME}}'],
1036
- [pathRe(cwd), '{{CWD}}'],
1037
- [new RegExp(reEscape(projectSlug(cwd)), 'gi'), '{{PROJECT_SLUG}}'],
1038
- [pathRe(tmpdir()), '{{TMP}}'],
1039
- [pathRe(home), '{{HOME}}'],
1040
- ];
1041
- if (gitName)
1042
- rules.push([new RegExp(`Git user: ${reEscape(gitName)}`, 'g'), 'Git user: {{GIT_USER}}']);
1043
- if (gitEmail) rules.push([new RegExp(reEscape(gitEmail), 'gi'), '{{EMAIL}}']);
1044
- if (gateway) rules.push([new RegExp(reEscape(gateway), 'g'), '{{GATEWAY}}']);
1045
- rules.push(
1046
- [/(OS Version: [^\n]*?)\d+\.\d+\.\d{4,}/g, '$1{{OS_BUILD}}'],
1047
- // A run id makes the artifact different on every capture, which would make `regenerate`
1048
- // produce a diff every time and mean nothing when it did not. MCode prints one: agenticreplay moves
1049
- // its data directory into the run, and the prompt reports that directory back as
1050
- // `activeDataDir`. Twelve hex characters is below the `{{HEX}}` rule's floor of 32.
1051
- [/\brun_[0-9a-f]{8,}\b/g, '{{RUN_ID}}'],
1052
- // The interpreter's own path, which carries a version that changes under the user on every
1053
- // PowerShell update. Windows installs it under `WindowsApps` with the version in the folder
1054
- // name, so the path is machine state rather than anything about the harness.
1055
- [/[A-Za-z]:\\[^\n"'()]*?\\pwsh\.exe/g, '{{PWSH}}'],
1056
- [/[\w.+-]+@[\w-]+\.[\w.]{2,}/g, '{{EMAIL}}'],
1057
- // Lookarounds rather than \b: an id is often prefixed, as in `msg_01a06161-...`, and `_` is a
1058
- // word character, so \b never matches between the two and the whole rule silently misses.
1059
- [
1060
- /(?<![0-9a-f])[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?![0-9a-f])/gi,
1061
- '{{UUID}}',
1062
- ],
1063
- [/(?<![0-9a-f])[0-9a-f]{32,}(?![0-9a-f])/gi, '{{HEX}}'],
1064
- [new RegExp(`\\b${reEscape(user)}\\b`, 'gi'), '{{USER}}'],
1065
- );
1066
-
1067
- const scrub = (s) => rules.reduce((acc, [re, to]) => acc.replace(re, to), s);
1068
-
1069
- /** Anything surviving the pass means a rule is wrong, and silence would be the real bug. */
1070
- const audit = (s) => {
1071
- const checks = {
1072
- home: pathRe(home),
1073
- username: new RegExp(`\\b${reEscape(user)}\\b`, 'gi'),
1074
- email: /[\w.+-]+@[\w-]+\.[\w.]{2,}/g,
1075
- uuid: /(?<![0-9a-f])[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?![0-9a-f])/gi,
1076
- long_hex: /(?<![0-9a-f])[0-9a-f]{32,}(?![0-9a-f])/gi,
1077
- ipv4: /\b(?!127\.0\.0\.1|0\.0\.0\.0)\d{1,3}(?:\.\d{1,3}){3}\b/g,
1078
- };
1079
- if (gitName) checks.git_user = new RegExp(reEscape(gitName), 'g');
1080
- const found = [];
1081
- for (const [k, re] of Object.entries(checks)) {
1082
- const m = s.match(re);
1083
- if (m) found.push(`${k} x${m.length} (${m[0]})`);
1084
- }
1085
- return found;
1086
- };
1087
-
1088
- const scrubJson = (v) =>
1089
- typeof v === 'string'
1090
- ? scrub(v)
1091
- : Array.isArray(v)
1092
- ? v.map(scrubJson)
1093
- : v && typeof v === 'object'
1094
- ? Object.fromEntries(Object.entries(v).map(([k, x]) => [k, scrubJson(x)]))
1095
- : v;
1096
-
1097
- return {
1098
- scrub,
1099
- scrubJson,
1100
- audit,
1101
- inputs: {
1102
- home: true,
1103
- user: true,
1104
- git_user: Boolean(gitName),
1105
- git_email: Boolean(gitEmail),
1106
- gateway: Boolean(gateway),
1107
- },
1108
- };
1109
- }
1110
-
1111
- // ---------------------------------------------------------------------------- workspace trust
1112
-
1113
- /**
1114
- * Claude Code will not start interactively in a directory it has not been trusted in, and the
1115
- * dialog it shows instead has nobody to answer it here — the console it opens in is unattended, so
1116
- * the capture just waits out its timeout.
1117
- *
1118
- * Trust is one boolean in `~/.claude.json`, keyed by the working directory with forward slashes.
1119
- * `-p` never asks, which is why non-interactive captures work in a scratch directory.
1120
- *
1121
- * Checked but never written. Setting the flag from here would work, and it was a mistake to offer:
1122
- * it makes capturing in a throwaway directory the path of least resistance, and the working
1123
- * directory is part of the prompt. A capture in a non-repository loses the whole `gitStatus` block
1124
- * and describes an environment the user never works in. Refusing early instead pushes the capture
1125
- * into a directory that is actually representative.
1126
- *
1127
- * `--dangerously-skip-permissions` is not a way around this either: it adds a paragraph about the
1128
- * active permission mode to the injected system turn, so it changes the prompt being captured.
1129
- */
1130
- const claudeConfigPath = () => join(homedir(), '.claude.json');
1131
- const trustKey = (cwd) => resolve(cwd).split(BS).join('/');
1132
-
1133
- function trustState(cwd) {
1134
- let cfg;
1135
- try {
1136
- cfg = JSON.parse(readFileSync(claudeConfigPath(), 'utf8'));
1137
- } catch {
1138
- return {};
1139
- }
1140
- const want = trustKey(cwd).toLowerCase();
1141
- const key = Object.keys(cfg.projects ?? {}).find(
1142
- (k) => k.split(BS).join('/').toLowerCase() === want,
1143
- );
1144
- return { key, trusted: key !== undefined && cfg.projects[key].hasTrustDialogAccepted === true };
1145
- }
1146
-
1147
- // ---------------------------------------------------------------------------- trace reading
1148
-
1149
- const runDir = (cwd, runId) => join(cwd, '.agenticreplay', 'runs', runId);
1150
-
1151
- const readEvents = (dir) =>
1152
- readFileSync(join(dir, 'events.jsonl'), 'utf8')
1153
- .split('\n')
1154
- .filter(Boolean)
1155
- .map((l) => JSON.parse(l));
1156
-
1157
- function readBlob(dir, ref) {
1158
- const sha = ref.replace('sha256:', '');
1159
- let v = JSON.parse(readFileSync(join(dir, 'blobs', sha.slice(0, 2), sha), 'utf8'));
1160
- if (typeof v === 'string') v = JSON.parse(v); // agenticreplay stores request bodies double-encoded
1161
- return v;
1162
- }
1163
-
1164
- /**
1165
- * The recorded request that carries the agent's own prompt.
1166
- *
1167
- * Not the largest: later turns of a Claude Code run load deferred tools, so the biggest request in
1168
- * a trace describes a state the first turn was never in. Not the first with a prompt in it either
1169
- * — a harness opens with side calls that carry a full `system[]` of their own. Claude Code's title
1170
- * generator is the trap here: four system blocks, a naming spec, and no tools. The agent turn is
1171
- * the one that ships the tool definitions, so that is what identifies it, with the looser test
1172
- * kept only for a trace where nothing declares tools at all.
1173
- */
1174
- function pickPromptRequest(dir, profile) {
1175
- let fallback;
1176
- let best;
1177
- for (const e of readEvents(dir)) {
1178
- if (e.type !== 'model.request' || !e.payload?.$blob) continue;
1179
- let body;
1180
- try {
1181
- body = readBlob(dir, e.payload.$blob);
1182
- } catch {
1183
- continue;
1184
- }
1185
- const got = profile.extract(body);
1186
- if (got.blocks.length === 0) continue;
1187
- // The most tools, not the first with any. Muse Code is why: it sends two turns, the agent's
1188
- // with twenty-five tools and a skill-relevance judge with one, and they do not arrive in a
1189
- // fixed order — so "first with tools" filed whichever won the race and the tool count in the
1190
- // README table came out 1 or 25 depending on the run. For every other harness here the side
1191
- // calls declare no tools at all, so this picks what the old rule picked.
1192
- if (got.toolNames.length > 0) {
1193
- if (!best || got.toolNames.length > best.got.toolNames.length) best = { event: e, body, got };
1194
- continue;
1195
- }
1196
- fallback ??= { event: e, body, got };
1197
- }
1198
- return best ?? fallback;
1199
- }
1200
-
1201
- /** True once the trace holds the request we want, so the poll loop knows to stop. */
1202
- const hasPromptRequest = (dir, profile) => {
1203
- const got = pickPromptRequest(dir, profile);
1204
- return got && got.got.toolNames.length > 0 ? got : undefined;
1205
- };
1206
-
1207
- /**
1208
- * What came back for one specific request: the prefix the server charged for, or the error instead.
1209
- *
1210
- * Read off the response to that request rather than the first plausible number in the trace, since
1211
- * the side calls carry usage blocks of their own. The error case matters as much as the token
1212
- * count: a turn can come back `overloaded_error` inside a 200 stream, and the capture is still
1213
- * good — the prompt travels in the request — but reporting nothing would let a failed turn look
1214
- * like a clean one.
1215
- */
1216
- const isTransientFailure = ({ response_error: kind, response_status: status }) =>
1217
- (status !== undefined && status >= 500) ||
1218
- /overload|rate_?limit|server_error|unavailable|timeout|internal/i.test(kind ?? '');
1219
-
1220
- function responseFacts(dir, seq) {
1221
- for (const e of readEvents(dir)) {
1222
- if (e.type !== 'model.response' || e.seq < seq) continue;
1223
- let text = typeof e.payload === 'string' ? e.payload : undefined;
1224
- if (!text && e.payload?.$blob) {
1225
- const sha = e.payload.$blob.replace('sha256:', '');
1226
- try {
1227
- text = readFileSync(join(dir, 'blobs', sha.slice(0, 2), sha), 'utf8');
1228
- } catch {
1229
- continue;
1230
- }
1231
- }
1232
- const m = /"usage":\{[^{}]*(?:\{[^{}]*\}[^{}]*)*\}/.exec(text ?? '');
1233
- if (m) {
1234
- try {
1235
- const u = JSON.parse(m[0].slice('"usage":'.length));
1236
- const prefix =
1237
- (u.cache_read_input_tokens ?? 0) +
1238
- (u.cache_creation_input_tokens ?? 0) +
1239
- (u.input_tokens ?? 0) +
1240
- (u.prompt_tokens ?? 0);
1241
- if (prefix > 0) return { prefix_tokens: prefix, usage: u };
1242
- } catch {
1243
- /* fall through to the error check */
1244
- }
1245
- }
1246
- const err =
1247
- /"error":\s*\{[^{}]*"type":\s*"([\w-]+)"/.exec(text ?? '') ??
1248
- /"type":\s*"([\w]*error[\w]*)"/.exec(text ?? '');
1249
- if (err) return { response_error: err[1], response_status: e.attrs.status };
1250
- return {};
1251
- }
1252
- return {};
1253
- }
1254
-
1255
- // ---------------------------------------------------------------------------- capture modes
1256
-
1257
- function upstreamArgs(profile) {
1258
- if (typeof flags.upstream === 'string') {
1259
- return ['--upstream-anthropic', flags.upstream, '--upstream-openai', flags.upstream];
1260
- }
1261
- // A configured gateway captures every anthropic call, and a third-party router usually does not
1262
- // serve the model, which surfaces as `400 unknown provider`. Codex is the opposite case: its own
1263
- // config points at that gateway, so leaving it alone is what makes the model resolve.
1264
- if (profile.forceAnthropicUpstream && agenticreplayGatewayHost()) {
1265
- return ['--upstream-anthropic', 'https://api.anthropic.com'];
1266
- }
1267
- return [];
1268
- }
1269
-
1270
- /** Non-interactive: one `agenticreplay record`, which exits on its own when the agent does. */
1271
- function captureRecorded(profile, cwd, model, prompt) {
1272
- // No port here: this path lets agenticreplay stand the proxy up and pick one. Only the held-open proxy
1273
- // path knows a port in advance, and only a harness whose config has to name it cares.
1274
- const prepared = profile.prepare?.(cwd, model);
1275
- try {
1276
- const args = [
1277
- 'record',
1278
- profile.adapter,
1279
- '--no-fs',
1280
- '--no-shell',
1281
- ...(profile.recordFlags ?? []),
1282
- ...upstreamArgs(profile),
1283
- ...profile.recordArgs(model, prompt),
1284
- ];
1285
- console.log(` agenticreplay ${args.join(' ')}`);
1286
- const cmd = agenticreplayCommand(args);
1287
- const { out } = runShim(cmd.name, cmd.args, {
1288
- cwd,
1289
- timeout: Number(flags.timeout ?? 300) * 1000,
1290
- env: { ...process.env, ...(prepared?.env ?? {}) },
1291
- });
1292
- const runId = /run=(run_[0-9a-f]+)/.exec(out)?.[1];
1293
- if (!runId) throw new Error(`agenticreplay record produced no run id.\n${out.trim()}`);
1294
- // `capture.empty` counts *model* exchanges, and a harness captured by decrypting its own
1295
- // protocol has none -- Cursor's traffic is recorded as net exchanges instead. Treating the
1296
- // warning as fatal there rejected a run that had the prompt in it.
1297
- if (!profile.netOnly && /capture\.empty/.test(out)) {
1298
- throw new Error(`the agent never called the proxy.\n${out.trim()}`);
1299
- }
1300
- return runId;
1301
- } finally {
1302
- prepared?.restore();
1303
- }
1304
- }
1305
-
1306
- const killPort = (port) =>
1307
- powershell(
1308
- `$c = Get-NetTCPConnection -LocalPort ${port} -State Listen -ErrorAction SilentlyContinue; ` +
1309
- `if ($c) { $c | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force -ErrorAction SilentlyContinue } }`,
1310
- );
1311
-
1312
- const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
1313
-
1314
- /**
1315
- * Interactive: hold the proxy open, then let PowerShell start the agent in a console of its own.
1316
- *
1317
- * `Start-Process` without `-NoNewWindow` is the whole trick — Windows hands a console application
1318
- * a real console, so `process.stdin.isTTY` is true and the harness assembles its interactive
1319
- * prompt. A pty shim is the obvious alternative and does not work: winpty asserts on
1320
- * `cols > 0 && rows > 0`, which it cannot learn from a pipe. Node's own `detached` is no help
1321
- * either, since on Windows it means DETACHED_PROCESS — no console at all.
1322
- */
1323
- /**
1324
- * Start the agent in a console of its own. `Start-Process` without `-NoNewWindow` is the whole
1325
- * trick: Windows hands a console application a real console, so `process.stdin.isTTY` is true and
1326
- * the harness assembles its interactive prompt. A pty shim does not work here — winpty asserts on
1327
- * `cols > 0 && rows > 0`, which it cannot learn from a pipe — and node's `detached` means
1328
- * DETACHED_PROCESS on Windows, so no console at all.
1329
- */
1330
- function consoleLauncher(profile, cwd, model, prompt) {
1331
- return (port, prepared) => {
1332
- const exe = profile.exe();
1333
- if (!existsSync(exe)) throw new Error(`agent executable not found: ${exe}`);
1334
- // A nested session inherits these and registers as a child, which changes the prompt.
1335
- const strip = [
1336
- 'CLAUDECODE',
1337
- 'CLAUDE_CODE_ENTRYPOINT',
1338
- 'CLAUDE_CODE_CHILD_SESSION',
1339
- 'CLAUDE_CODE_SESSION_ID',
1340
- 'CLAUDE_CODE_MESSAGING_SOCKET',
1341
- 'CLAUDE_CODE_MESSAGING_TOKEN',
1342
- 'CLAUDE_PID',
1343
- 'CLAUDE_EFFORT',
1344
- 'CLAUDE_CODE_EXECPATH',
1345
- 'AI_AGENT',
1346
- ];
1347
- const psQuote = (s) => `'${String(s).replace(/'/g, "''")}'`;
1348
- const argList = profile.consoleArgs(model, prompt).map(psQuote).join(',');
1349
- const script = [
1350
- `foreach ($n in @(${strip.map(psQuote).join(',')})) { if (Test-Path "Env:\$n") { Remove-Item "Env:\$n" } }`,
1351
- ...Object.entries(prepared?.env ?? {}).map(([k, v]) => `$env:${k} = ${psQuote(v)}`),
1352
- `$env:ANTHROPIC_BASE_URL = 'http://127.0.0.1:${port}'`,
1353
- `$env:OPENAI_BASE_URL = 'http://127.0.0.1:${port}/v1'`,
1354
- `$p = Start-Process -FilePath ${psQuote(exe)} -WindowStyle Minimized -PassThru -WorkingDirectory ${psQuote(cwd)} -ArgumentList @(${argList})`,
1355
- `Write-Output "PID=$($p.Id)"`,
1356
- ].join('; ');
1357
- const launched = powershell(script);
1358
- const pid = /PID=(\d+)/.exec(launched.out)?.[1];
1359
- if (!pid) throw new Error(`could not launch the agent in a console.\n${launched.out.trim()}`);
1360
- console.log(` launched pid=${pid} in its own console`);
1361
- return {
1362
- stop: () => powershell(`Stop-Process -Id ${pid} -Force -ErrorAction SilentlyContinue`),
1363
- };
1364
- };
1365
- }
1366
-
1367
- /**
1368
- * Start the agent as an ordinary child, for a harness that needs no terminal.
1369
- *
1370
- * Used instead of `agenticreplay record` where the adapter's environment does not reach the agent: OpenCode
1371
- * answered from the gateway with the proxy set and left an empty trace, and the same launch under
1372
- * a held-open proxy records fine. Holding the proxy ourselves also fixes the port before the
1373
- * agent's config is written, which is what makes the `{env:...}` indirection in that config work.
1374
- */
1375
- function shimLauncher(profile, cwd, model, prompt) {
1376
- return (port, prepared) => {
1377
- const args = profile.recordArgs(model, prompt).filter((a) => a !== '--');
1378
- console.log(` ${profile.adapter} ${args.join(' ')}`);
1379
- const r = runShim(profile.adapter, args, {
1380
- cwd,
1381
- timeout: Number(flags.timeout ?? 180) * 1000,
1382
- // No base-URL variables when the harness was redirected through its own config: OpenCode
1383
- // lets an environment variable win over the config value, and setting both left it talking
1384
- // to the gateway while the proxy recorded nothing. Whoever redirected the agent owns the
1385
- // origin, and only one of them may.
1386
- env: prepared
1387
- ? { ...process.env, ...prepared.env }
1388
- : {
1389
- ...process.env,
1390
- OPENAI_BASE_URL: `http://127.0.0.1:${port}/v1`,
1391
- ANTHROPIC_BASE_URL: `http://127.0.0.1:${port}`,
1392
- },
1393
- });
1394
- // Kept whole: when the trace comes back empty the agent's own output is the only evidence of
1395
- // why, and a tail line is usually just an ANSI reset.
1396
- const lines = r.out
1397
- .replace(/\u001b\[[0-9;]*m/g, '')
1398
- .split('\n')
1399
- .map((l) => l.trim())
1400
- .filter(Boolean);
1401
- for (const l of lines.slice(-3)) console.log(` ${l.slice(0, 100)}`);
1402
- return { stop: () => undefined, output: lines };
1403
- };
1404
- }
1405
-
1406
- async function captureWithProxy(profile, cwd, model, prompt, launch) {
1407
- if (profile.trustKeyed && !trustState(cwd).trusted) {
1408
- throw new Error(
1409
- `${profile.id} has not been trusted in ${cwd}, so it would stop on the trust dialog.\n` +
1410
- ' start it there once by hand and accept, then run this again.\n' +
1411
- ' capture in a directory you actually work in: the working directory is part of the\n' +
1412
- ' prompt, and a non-repository loses the gitStatus block entirely.',
1413
- );
1414
- }
1415
- const port = Number(flags.port ?? 46011);
1416
- const deadline = Date.now() + Number(flags.timeout ?? 180) * 1000;
1417
- killPort(port);
1418
-
1419
- const attachArgs = [
1420
- 'attach',
1421
- '--for',
1422
- profile.adapter,
1423
- '--port',
1424
- String(port),
1425
- ...upstreamArgs(profile),
1426
- ];
1427
- console.log(` agenticreplay ${attachArgs.join(' ')}`);
1428
- const attachCmd = agenticreplayCommand(attachArgs);
1429
- const attach = spawnShim(attachCmd.name, attachCmd.args, { cwd });
1430
- let attachOut = '';
1431
- attach.stdout?.on('data', (d) => {
1432
- attachOut += d;
1433
- });
1434
- attach.stderr?.on('data', (d) => {
1435
- attachOut += d;
1436
- });
1437
-
1438
- try {
1439
- let runId;
1440
- while (!runId && Date.now() < deadline) {
1441
- runId = /attached run=(run_[0-9a-f]+)/.exec(attachOut)?.[1];
1442
- if (!runId) await sleep(300);
1443
- }
1444
- if (!runId)
1445
- throw new Error(`agenticreplay attach never reported a run id.\n${attachOut.trim()}`);
1446
-
1447
- const prepared = profile.prepare?.(cwd, model, port);
1448
- let running;
1449
- try {
1450
- running = launch(port, prepared);
1451
- } catch (err) {
1452
- prepared?.restore();
1453
- throw err;
1454
- }
1455
-
1456
- try {
1457
- const dir = runDir(cwd, runId);
1458
- let found;
1459
- while (!found && Date.now() < deadline) {
1460
- if (existsSync(join(dir, 'events.jsonl'))) {
1461
- try {
1462
- found = hasPromptRequest(dir, profile);
1463
- } catch {
1464
- /* mid-write, retry */
1465
- }
1466
- }
1467
- if (!found) await sleep(1000);
1468
- }
1469
- if (!found) {
1470
- const said = running.output?.length
1471
- ? `\n the agent said:\n${running.output.map((l) => ` ${l.slice(0, 120)}`).join('\n')}`
1472
- : '';
1473
- const hint =
1474
- profile.failureHint ??
1475
- ` if the agent stopped on a trust dialog, start it once in ${cwd} by hand,\n` +
1476
- ' or pass --cwd with a directory it already trusts.';
1477
- throw new Error(`no prompt-carrying request arrived within the timeout.\n${hint}${said}`);
1478
- }
1479
- console.log(
1480
- ` captured seq=${found.event.seq} tools=${found.got.toolNames.length} bytes=${found.event.payload.bytes}`,
1481
- );
1482
- return runId;
1483
- } finally {
1484
- running.stop();
1485
- prepared?.restore();
1486
- }
1487
- } finally {
1488
- attach.kill();
1489
- await sleep(600);
1490
- killPort(port); // killing the shim does not reach the node process behind it
1491
- }
1492
- }
1493
-
1494
- // ---------------------------------------------------------------------------- writing
1495
-
1496
- function writeCapture(profile, cwd, runId, interactive, dirOverride) {
1497
- const dir = dirOverride ?? runDir(cwd, runId);
1498
- // A harness whose prompt is spread across a stream reads the run, not one request.
1499
- const found = profile.extractFromRun
1500
- ? { body: {}, got: profile.extractFromRun(dir), event: { seq: 0, payload: { bytes: 0 } } }
1501
- : pickPromptRequest(dir, profile);
1502
- if (!found) throw new Error(`run ${runId} holds no prompt-carrying request`);
1503
- const { body, got, event } = found;
1504
-
1505
- // A request whose turn came back an error still holds a real prompt, and for a transient
1506
- // overload that is worth keeping. But a mistyped model id fails the same way, and filing it
1507
- // would put a folder and an index row under a model that does not exist. Refusing by default
1508
- // and naming the error is the honest split; a genuinely wanted failed capture says so.
1509
- const facts = responseFacts(dir, event.seq);
1510
- if (facts.response_error && !flags['allow-failed']) {
1511
- const err = new Error(
1512
- `the captured turn came back ${facts.response_error}` +
1513
- `${facts.response_status ? ` (status ${facts.response_status})` : ''}, so nothing was filed.\n` +
1514
- ' pass --allow-failed to keep the capture regardless; the prompt itself is genuine.',
1515
- );
1516
- // Worth separating, because the two failures want opposite handling. A 4xx means the request
1517
- // was wrong -- a mistyped model, a missing credential -- and filing it would create a folder
1518
- // for a model that does not exist. A 5xx or an overload is the free tier being busy, and the
1519
- // prompt in that request is as good as any other, so the answer is to run it again.
1520
- err.transient = isTransientFailure(facts);
1521
- throw err;
1522
- }
1523
-
1524
- const model = got.model ?? body.model ?? 'unknown-model';
1525
- // One folder per model, as asked — but print and interactive are two different prompts for the
1526
- // same model, so the non-default mode gets a suffix rather than overwriting the canonical one.
1527
- // Flattened, because a provider-qualified model id is not a path. `kilo/kilo-auto/free` left
1528
- // alone makes `join` read its slashes as directories, and the capture dies on
1529
- // `capture/kilo-auto/free/kilo-auto/free-system-prompt.md` -- a folder nobody created, reported
1530
- // as an ENOENT that says nothing about the cause. `prompt_slug` below has always flattened; this
1531
- // is the same treatment for the folder, so the two agree.
1532
- const dirName = flattenModelId(
1533
- typeof flags.dir === 'string'
1534
- ? flags.dir
1535
- : profile.promptVariant
1536
- ? `${model}${profile.promptVariant()}`
1537
- : interactive === profile.defaultInteractive
1538
- ? model
1539
- : `${model}.${interactive ? 'interactive' : 'print'}`,
1540
- );
1541
- const dest = join(CAPTURE_DIR, dirName);
1542
-
1543
- // A model id does not identify a capture on its own: two harnesses can serve the same model, and
1544
- // filing the second one over the first destroys it silently. Learned the hard way — opencode and
1545
- // codex both run gpt-5.6-sol.
1546
- const existingMeta = join(dest, `${dirName.replace(/\./g, '-')}-meta.json`);
1547
- if (existsSync(existingMeta)) {
1548
- try {
1549
- const prev = JSON.parse(readFileSync(existingMeta, 'utf8'));
1550
- if (prev.harness && prev.harness !== profile.id) {
1551
- throw new Error(
1552
- `capture/${dirName} already holds a ${prev.harness} capture of ${prev.model}.\n` +
1553
- ` pass --dir ${profile.id}-${model} to file this one beside it.`,
1554
- );
1555
- }
1556
- } catch (err) {
1557
- if (err instanceof SyntaxError === false) throw err;
1558
- }
1559
- }
1560
-
1561
- mkdirSync(dest, { recursive: true });
1562
-
1563
- // Every file carries the folder's name, so a file pulled out on its own still says which model
1564
- // and which mode it came from. `.` would read as a second extension, hence the dash.
1565
- const slug = dirName.replace(/\./g, '-');
1566
- const file = (suffix) => join(dest, `${slug}-${suffix}`);
1567
-
1568
- const { scrub, scrubJson, audit, inputs } = buildScrubber(cwd);
1569
-
1570
- const promptText = `${got.blocks.map((b) => scrub(b.text.replace(/^\n+|\n+$/g, ''))).join('\n\n')}\n`;
1571
- const leaks = audit(promptText);
1572
- if (leaks.length > 0)
1573
- throw new Error(`scrubbing left identifying data behind: ${leaks.join('; ')}`);
1574
-
1575
- const annotated = `${[...got.blocks, ...got.context]
1576
- .map(
1577
- (b) =>
1578
- `===== ${b.label} · ${b.text.length} chars${b.cache ? ` · cache=${b.cache}` : ''} =====\n${scrub(b.text)}`,
1579
- )
1580
- .join('\n\n')}\n`;
1581
-
1582
- const meta = {
1583
- model,
1584
- harness: profile.id,
1585
- mode: interactive ? 'interactive' : 'non-interactive',
1586
- captured_at: new Date().toISOString(),
1587
- agenticreplay_run: runId,
1588
- agenticreplay_version: JSON.parse(readFileSync(join(dir, 'manifest.json'), 'utf8'))
1589
- .agenticreplay_version,
1590
- ...got.meta,
1591
- // Every figure here describes the prompt as sent. Scrubbing shortens the text a little, so
1592
- // the file on disk is a few hundred characters smaller; mixing the two made the block sizes
1593
- // fail to add up to the total.
1594
- sizes: {
1595
- prompt_chars: got.blocks.reduce((a, b) => a + b.text.length, 0),
1596
- prompt_file_chars: promptText.length,
1597
- blocks: got.blocks.map((b) => ({ label: b.label, chars: b.text.length })),
1598
- context_chars: got.context.reduce((a, c) => a + c.text.length, 0),
1599
- tools: got.toolNames.length,
1600
- tools_bytes: JSON.stringify(got.tools).length,
1601
- request_bytes: event.payload?.bytes ?? 0,
1602
- },
1603
- ...facts,
1604
- tool_names: got.toolNames,
1605
- scrubbed_with: inputs,
1606
- };
1607
-
1608
- meta.dir_slug = slug;
1609
- // The capture folder may be disambiguated by hand (--dir) when two harnesses serve one model.
1610
- // Under prompt/ the harness folder already does that, so the file is named for the model alone
1611
- // — plus whatever makes one capture of that model a different prompt from another.
1612
- //
1613
- // Two things do. Claude Code's `-p` prompt is not its interactive one. And MCode has three,
1614
- // chosen by `--prompt-mode`, which is why `promptVariant` exists: without it all three modes
1615
- // mirrored to one filename and each run quietly overwrote the last, leaving `prompt/MCODE/`
1616
- // holding whichever was captured most recently under the name of all three.
1617
- const variant =
1618
- profile.promptVariant?.() ??
1619
- (interactive === profile.defaultInteractive ? '' : interactive ? '-interactive' : '-print');
1620
- meta.prompt_slug = `${model}${variant}`.replace(/[^A-Za-z0-9._-]+/g, '-').replace(/\./g, '-');
1621
- meta.prompt_dir = profile.promptDir ?? profile.id.toUpperCase();
1622
- meta.prompt_file = `prompt/${meta.prompt_dir}/${meta.prompt_slug}-system-prompt.md`;
1623
- // Runnable as printed, or it is not a regenerate command. The variant has to be on it for the
1624
- // same reason it is in the filename — `--prompt-mode work` and `--prompt-mode tui` are
1625
- // different prompts — and so does `--allow-failed` when this capture only exists because the
1626
- // turn was kept after an error, which is the ordinary case for a harness captured without a
1627
- // credential.
1628
- meta.regenerate =
1629
- `node capture/capture.mjs ${profile.id}` +
1630
- // A harness that takes its model from its own config has no `--model` to print. Leaving it on
1631
- // made this string fail with `Unknown option '--model'` for the one profile in that shape,
1632
- // which is the opposite of the contract above.
1633
- (profile.modelFromConfig ? '' : ` --model ${model}`) +
1634
- (profile.promptVariant
1635
- ? ` --prompt-mode ${variant.slice(1)}`
1636
- : interactive === profile.defaultInteractive
1637
- ? ''
1638
- : interactive
1639
- ? ' --interactive'
1640
- : ' --print') +
1641
- (facts.response_error ? ' --allow-failed' : '');
1642
-
1643
- // Two copies on purpose: the capture folder stays self-contained, and `prompt/` stays a flat
1644
- // collection you can read without walking into subdirectories. The capture-side file is the
1645
- // source and `mirrorPrompts()` repairs the other from it, so a hand edit to one cannot survive
1646
- // unnoticed.
1647
- writeFileSync(file('system-prompt.md'), promptText, 'utf8');
1648
- const mirrorPath = join(PROMPT_DIR, meta.prompt_dir, `${meta.prompt_slug}-system-prompt.md`);
1649
- mkdirSync(dirname(mirrorPath), { recursive: true });
1650
- writeFileSync(mirrorPath, promptText, 'utf8');
1651
- writeFileSync(file('prompt-annotated.txt'), annotated, 'utf8');
1652
- writeFileSync(file('request.json'), JSON.stringify(scrubJson(body), null, 2), 'utf8');
1653
- writeFileSync(file('tools.json'), JSON.stringify(scrubJson(got.tools), null, 2), 'utf8');
1654
- writeFileSync(file('meta.json'), JSON.stringify(meta, null, 2), 'utf8');
1655
- writeFileSync(join(dest, 'README.md'), folderReadme(meta), 'utf8');
1656
-
1657
- // An existing run belongs to whoever made it: read in place, never moved or deleted.
1658
- if (dirOverride) return { dest, meta };
1659
-
1660
- // The stale-trace case is why this runs either way: a folder that keeps last run's trace while
1661
- // meta.json names this one describes two different runs at once.
1662
- const traceDest = join(dest, 'trace');
1663
- rmSync(traceDest, { recursive: true, force: true });
1664
- if (flags['no-trace']) {
1665
- rmSync(dir, { recursive: true, force: true });
1666
- } else {
1667
- // The capture directory and prompt/ are routinely on different drives, and rename cannot
1668
- // cross one. Copy-then-delete is the only move that works in both cases.
1669
- try {
1670
- renameSync(dir, traceDest);
1671
- } catch (err) {
1672
- if (err.code !== 'EXDEV') throw err;
1673
- cpSync(dir, traceDest, { recursive: true });
1674
- rmSync(dir, { recursive: true, force: true });
1675
- }
1676
- }
1677
- // Either way the run has left the capture directory, so agenticreplay's scaffolding there is dead.
1678
- try {
1679
- if (readdirSync(join(cwd, '.agenticreplay', 'runs')).length === 0) {
1680
- rmSync(join(cwd, '.agenticreplay'), { recursive: true, force: true });
1681
- }
1682
- } catch {
1683
- /* someone else's .agenticreplay, leave it */
1684
- }
1685
-
1686
- return { dest, meta };
1687
- }
1688
-
1689
- /**
1690
- * A folder's README, derived from its own meta.json so `--index` can refresh it in place after a
1691
- * rename rather than letting the file table drift out of date.
1692
- */
1693
- function folderReadme(meta) {
1694
- const slug = meta.dir_slug;
1695
- return [
1696
- `# ${meta.model}`,
1697
- '',
1698
- `${meta.harness}, ${meta.mode}${meta.entrypoint ? ` (\`cc_entrypoint=${meta.entrypoint}\`)` : ''}, captured ${meta.captured_at.slice(0, 10)}.`,
1699
- '',
1700
- '| file | scrubbed | what |',
1701
- '|---|---|---|',
1702
- `| \`${slug}-system-prompt.md\` | yes | the prompt on its own, nothing else |`,
1703
- `| \`${slug}-prompt-annotated.txt\` | yes | same text with block boundaries and char counts |`,
1704
- `| \`${slug}-request.json\` | yes | the whole request body as sent |`,
1705
- `| \`${slug}-tools.json\` | yes | tool definitions |`,
1706
- `| \`${slug}-meta.json\` | n/a | run id, sizes, token counts, tool names |`,
1707
- '| `trace/` | **no** | the raw agenticreplay run. holds account and session ids |',
1708
- '',
1709
- `Mirrored to \`../${meta.prompt_file}\`. This copy is the source; \`--index\` repairs the other from it.`,
1710
- '',
1711
- `Regenerate with \`${meta.regenerate}\`.`,
1712
- '',
1713
- ].join('\n');
1714
- }
1715
-
1716
- /**
1717
- * Keep `prompt/` in step with the capture folders.
1718
- *
1719
- * Two copies of one text is a drift risk, so it gets checked rather than trusted: the capture-side
1720
- * file is the source, and a mirror that is missing or different is rewritten from it. Reported, not
1721
- * silent, because a difference means someone edited a generated file.
1722
- */
1723
- function mirrorPrompts(metas) {
1724
- const repaired = [];
1725
- for (const m of metas) {
1726
- const src = join(CAPTURE_DIR, m.dir_name, `${m.dir_slug}-system-prompt.md`);
1727
- if (!existsSync(src)) continue;
1728
- if (!m.prompt_dir || !m.prompt_slug) continue;
1729
- const dst = join(PROMPT_DIR, m.prompt_dir, `${m.prompt_slug}-system-prompt.md`);
1730
- const want = readFileSync(src, 'utf8');
1731
- const have = existsSync(dst) ? readFileSync(dst, 'utf8') : undefined;
1732
- if (have === want) continue;
1733
- mkdirSync(dirname(dst), { recursive: true });
1734
- writeFileSync(dst, want, 'utf8');
1735
- repaired.push(
1736
- `${m.dir_slug}: ${have === undefined ? 'mirror was missing' : 'mirror differed'}`,
1737
- );
1738
- }
1739
- return repaired;
1740
- }
1741
-
1742
- function writeIndex() {
1743
- const rows = readdirSync(CAPTURE_DIR, { withFileTypes: true })
1744
- .map((d) => {
1745
- if (!d.isDirectory()) return undefined;
1746
- const metaFile = join(CAPTURE_DIR, d.name, `${d.name.replace(/\./g, '-')}-meta.json`);
1747
- return existsSync(metaFile) ? { name: d.name, metaFile } : undefined;
1748
- })
1749
- .filter(Boolean)
1750
- .map((d) => {
1751
- const m = JSON.parse(readFileSync(d.metaFile, 'utf8'));
1752
- if (m.dir_slug && m.regenerate) {
1753
- writeFileSync(join(CAPTURE_DIR, d.name, 'README.md'), folderReadme(m), 'utf8');
1754
- }
1755
- return {
1756
- model: m.model,
1757
- harness: m.harness,
1758
- mode: m.mode,
1759
- captured_at: m.captured_at,
1760
- prompt_chars: m.sizes?.prompt_chars,
1761
- tools: m.sizes?.tools,
1762
- request_bytes: m.sizes?.request_bytes,
1763
- prefix_tokens: m.prefix_tokens,
1764
- dir: `capture/${d.name}`,
1765
- prompt_file: m.prompt_file,
1766
- dir_name: d.name,
1767
- dir_slug: m.dir_slug,
1768
- prompt_dir: m.prompt_dir,
1769
- prompt_slug: m.prompt_slug,
1770
- };
1771
- })
1772
- .sort((a, b) => a.model.localeCompare(b.model));
1773
- const repaired = mirrorPrompts(rows);
1774
- // dir_name and dir_slug are plumbing for the mirror, not part of the published index.
1775
- const published = rows.map(({ dir_name, dir_slug, prompt_dir, prompt_slug, ...rest }) => rest);
1776
- writeFileSync(join(CAPTURE_DIR, 'index.json'), JSON.stringify(published, null, 2), 'utf8');
1777
- return { rows: published, repaired };
1778
- }
1779
-
1780
- // ---------------------------------------------------------------------------- main
1781
-
1782
- if (flags.index) {
1783
- const { rows, repaired } = writeIndex();
1784
- console.log(`index.json: ${rows.length} model${rows.length === 1 ? '' : 's'}`);
1785
- for (const r of repaired) console.log(` mirrored ${r}`);
1786
- process.exit(0);
1787
- }
1788
-
1789
- const profile = PROFILES[harness ?? ''];
1790
- if (!profile) {
1791
- console.error(USAGE);
1792
- process.exit(1);
1793
- }
1794
-
1795
- const interactive = flags.print ? false : flags.interactive ? true : profile.defaultInteractive;
1796
- if (!WIN && interactive) {
1797
- console.error('interactive capture is Windows-only for now; pass --print for the other variant');
1798
- process.exit(1);
1799
- }
1800
-
1801
- const cwd = resolve(typeof flags.cwd === 'string' ? flags.cwd : process.cwd());
1802
- // Refused rather than ignored. The harness would answer `Unknown option '--model'` and print its
1803
- // help, which costs a run and reads like a bug in agenticreplay; and silently dropping the flag would file
1804
- // the capture under a model nobody asked for.
1805
- if (profile.modelFromConfig && typeof flags.model === 'string') {
1806
- console.error(
1807
- `${profile.id} takes its model from its provider config, not the command line, so --model ` +
1808
- 'has nothing to set. Point the adapter at the model you want and capture without it.',
1809
- );
1810
- process.exit(1);
1811
- }
1812
- const model = typeof flags.model === 'string' ? flags.model : profile.defaultModel;
1813
- const userPrompt =
1814
- typeof flags.prompt === 'string' ? flags.prompt : 'Reply with exactly: ok. Do not use any tools.';
1815
-
1816
- console.log(
1817
- `capturing ${profile.id}${model ? ` · ${model}` : ''} · ${interactive ? 'interactive' : 'non-interactive'}`,
1818
- );
1819
- console.log(` cwd ${cwd}`);
1820
-
1821
- const fromRun = typeof flags['from-run'] === 'string' ? resolve(flags['from-run']) : undefined;
1822
- const attempts = fromRun ? 1 : 1 + Number(flags.retries ?? 2);
1823
-
1824
- async function attempt() {
1825
- let runId;
1826
- if (fromRun) {
1827
- if (!existsSync(join(fromRun, 'events.jsonl'))) {
1828
- throw new Error(`${fromRun} is not an agenticreplay run directory`);
1829
- }
1830
- runId = basename(fromRun);
1831
- console.log(` filing existing run ${runId}`);
1832
- } else {
1833
- const launcher = profile.recordVia === 'attach' ? shimLauncher : consoleLauncher;
1834
- runId =
1835
- interactive || profile.recordVia === 'attach'
1836
- ? await captureWithProxy(
1837
- profile,
1838
- cwd,
1839
- model,
1840
- userPrompt,
1841
- launcher(profile, cwd, model, userPrompt),
1842
- )
1843
- : captureRecorded(profile, cwd, model, userPrompt);
1844
- }
1845
- return writeCapture(profile, cwd, runId, interactive, fromRun);
1846
- }
1847
-
1848
- let result;
1849
- for (let i = 1; i <= attempts; i += 1) {
1850
- try {
1851
- result = await attempt();
1852
- break;
1853
- } catch (err) {
1854
- const last = i === attempts;
1855
- if (!err.transient || last) {
1856
- console.error(`\ncapture failed: ${err.message}`);
1857
- if (err.transient) console.error(` gave up after ${attempts} attempts.`);
1858
- process.exit(1);
1859
- }
1860
- console.log(` ${err.message.split('\n')[0]}`);
1861
- console.log(` transient, retrying (${i + 1}/${attempts})`);
1862
- }
1863
- }
1864
-
1865
- const { dest, meta } = result;
1866
- writeIndex();
1867
- console.log('');
1868
- console.log(` ${basename(dest)}/`);
1869
- console.log(
1870
- ` prompt ${meta.sizes.prompt_chars.toLocaleString()} chars in ${meta.sizes.blocks.length} blocks`,
1871
- );
1872
- console.log(` tools ${meta.sizes.tools}`);
1873
- console.log(` request ${meta.sizes.request_bytes.toLocaleString()} bytes`);
1874
- if (meta.prefix_tokens) console.log(` prefix ${meta.prefix_tokens.toLocaleString()} tokens`);
1875
- console.log(' scrubbed clean');
1876
- if (meta.response_error) {
1877
- console.log('');
1878
- console.log(` note: the agent's turn came back ${meta.response_error}, so there is no token`);
1879
- console.log(' count for it. the prompt is unaffected - it travels in the request.');
1880
- }
1881
- console.log('');
1882
- console.log(`written to ${dest}`);
1883
- console.log(` mirrored ${meta.prompt_file}`);