@softprobe/softprobe-js 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +202 -0
  3. package/bin/softprobe +15 -0
  4. package/dist/api/baggage.d.ts +13 -0
  5. package/dist/api/baggage.d.ts.map +1 -0
  6. package/dist/api/baggage.js +32 -0
  7. package/dist/api/baggage.js.map +1 -0
  8. package/dist/api/compare.d.ts +16 -0
  9. package/dist/api/compare.d.ts.map +1 -0
  10. package/dist/api/compare.js +77 -0
  11. package/dist/api/compare.js.map +1 -0
  12. package/dist/api.d.ts +63 -0
  13. package/dist/api.d.ts.map +1 -0
  14. package/dist/api.js +104 -0
  15. package/dist/api.js.map +1 -0
  16. package/dist/bindings/http-span.d.ts +6 -0
  17. package/dist/bindings/http-span.d.ts.map +1 -0
  18. package/dist/bindings/http-span.js +11 -0
  19. package/dist/bindings/http-span.js.map +1 -0
  20. package/dist/bindings/postgres-span.d.ts +6 -0
  21. package/dist/bindings/postgres-span.d.ts.map +1 -0
  22. package/dist/bindings/postgres-span.js +11 -0
  23. package/dist/bindings/postgres-span.js.map +1 -0
  24. package/dist/bindings/redis-span.d.ts +6 -0
  25. package/dist/bindings/redis-span.d.ts.map +1 -0
  26. package/dist/bindings/redis-span.js +11 -0
  27. package/dist/bindings/redis-span.js.map +1 -0
  28. package/dist/bindings/test-span.d.ts +6 -0
  29. package/dist/bindings/test-span.d.ts.map +1 -0
  30. package/dist/bindings/test-span.js +9 -0
  31. package/dist/bindings/test-span.js.map +1 -0
  32. package/dist/bootstrap/otel/framework-mutator.d.ts +20 -0
  33. package/dist/bootstrap/otel/framework-mutator.d.ts.map +1 -0
  34. package/dist/bootstrap/otel/framework-mutator.js +144 -0
  35. package/dist/bootstrap/otel/framework-mutator.js.map +1 -0
  36. package/dist/bootstrap/otel/inject.d.ts +17 -0
  37. package/dist/bootstrap/otel/inject.d.ts.map +1 -0
  38. package/dist/bootstrap/otel/inject.js +28 -0
  39. package/dist/bootstrap/otel/inject.js.map +1 -0
  40. package/dist/bootstrap/otel/mutator.d.ts +17 -0
  41. package/dist/bootstrap/otel/mutator.d.ts.map +1 -0
  42. package/dist/bootstrap/otel/mutator.js +51 -0
  43. package/dist/bootstrap/otel/mutator.js.map +1 -0
  44. package/dist/capture/express.d.ts +6 -0
  45. package/dist/capture/express.d.ts.map +1 -0
  46. package/dist/capture/express.js +11 -0
  47. package/dist/capture/express.js.map +1 -0
  48. package/dist/capture/fastify.d.ts +5 -0
  49. package/dist/capture/fastify.d.ts.map +1 -0
  50. package/dist/capture/fastify.js +9 -0
  51. package/dist/capture/fastify.js.map +1 -0
  52. package/dist/capture/framework-mutator.d.ts +20 -0
  53. package/dist/capture/framework-mutator.d.ts.map +1 -0
  54. package/dist/capture/framework-mutator.js +144 -0
  55. package/dist/capture/framework-mutator.js.map +1 -0
  56. package/dist/capture/http-inbound.d.ts +28 -0
  57. package/dist/capture/http-inbound.d.ts.map +1 -0
  58. package/dist/capture/http-inbound.js +40 -0
  59. package/dist/capture/http-inbound.js.map +1 -0
  60. package/dist/capture/inject.d.ts +17 -0
  61. package/dist/capture/inject.d.ts.map +1 -0
  62. package/dist/capture/inject.js +28 -0
  63. package/dist/capture/inject.js.map +1 -0
  64. package/dist/capture/mutator.d.ts +17 -0
  65. package/dist/capture/mutator.d.ts.map +1 -0
  66. package/dist/capture/mutator.js +51 -0
  67. package/dist/capture/mutator.js.map +1 -0
  68. package/dist/capture/postgres.d.ts +6 -0
  69. package/dist/capture/postgres.d.ts.map +1 -0
  70. package/dist/capture/postgres.js +11 -0
  71. package/dist/capture/postgres.js.map +1 -0
  72. package/dist/capture/redis.d.ts +5 -0
  73. package/dist/capture/redis.d.ts.map +1 -0
  74. package/dist/capture/redis.js +10 -0
  75. package/dist/capture/redis.js.map +1 -0
  76. package/dist/capture/store-accessor.d.ts +11 -0
  77. package/dist/capture/store-accessor.d.ts.map +1 -0
  78. package/dist/capture/store-accessor.js +19 -0
  79. package/dist/capture/store-accessor.js.map +1 -0
  80. package/dist/capture/stream-tap.d.ts +5 -0
  81. package/dist/capture/stream-tap.d.ts.map +1 -0
  82. package/dist/capture/stream-tap.js +9 -0
  83. package/dist/capture/stream-tap.js.map +1 -0
  84. package/dist/cli/diff-reporter.d.ts +26 -0
  85. package/dist/cli/diff-reporter.d.ts.map +1 -0
  86. package/dist/cli/diff-reporter.js +163 -0
  87. package/dist/cli/diff-reporter.js.map +1 -0
  88. package/dist/cli/diff.d.ts +18 -0
  89. package/dist/cli/diff.d.ts.map +1 -0
  90. package/dist/cli/diff.js +105 -0
  91. package/dist/cli/diff.js.map +1 -0
  92. package/dist/cli.d.ts +7 -0
  93. package/dist/cli.d.ts.map +1 -0
  94. package/dist/cli.js +84 -0
  95. package/dist/cli.js.map +1 -0
  96. package/dist/config/config-manager.d.ts +20 -0
  97. package/dist/config/config-manager.d.ts.map +1 -0
  98. package/dist/config/config-manager.js +46 -0
  99. package/dist/config/config-manager.js.map +1 -0
  100. package/dist/context.d.ts +98 -0
  101. package/dist/context.d.ts.map +1 -0
  102. package/dist/context.js +198 -0
  103. package/dist/context.js.map +1 -0
  104. package/dist/core/bindings/http-span.d.ts +39 -0
  105. package/dist/core/bindings/http-span.d.ts.map +1 -0
  106. package/dist/core/bindings/http-span.js +55 -0
  107. package/dist/core/bindings/http-span.js.map +1 -0
  108. package/dist/core/bindings/index.d.ts +12 -0
  109. package/dist/core/bindings/index.d.ts.map +1 -0
  110. package/dist/core/bindings/index.js +21 -0
  111. package/dist/core/bindings/index.js.map +1 -0
  112. package/dist/core/bindings/postgres-span.d.ts +41 -0
  113. package/dist/core/bindings/postgres-span.d.ts.map +1 -0
  114. package/dist/core/bindings/postgres-span.js +57 -0
  115. package/dist/core/bindings/postgres-span.js.map +1 -0
  116. package/dist/core/bindings/redis-span.d.ts +40 -0
  117. package/dist/core/bindings/redis-span.d.ts.map +1 -0
  118. package/dist/core/bindings/redis-span.js +65 -0
  119. package/dist/core/bindings/redis-span.js.map +1 -0
  120. package/dist/core/bindings/test-span.d.ts +15 -0
  121. package/dist/core/bindings/test-span.d.ts.map +1 -0
  122. package/dist/core/bindings/test-span.js +24 -0
  123. package/dist/core/bindings/test-span.js.map +1 -0
  124. package/dist/core/cassette/capture-store-accessor.d.ts +11 -0
  125. package/dist/core/cassette/capture-store-accessor.d.ts.map +1 -0
  126. package/dist/core/cassette/capture-store-accessor.js +19 -0
  127. package/dist/core/cassette/capture-store-accessor.js.map +1 -0
  128. package/dist/core/cassette/context-request-storage.d.ts +14 -0
  129. package/dist/core/cassette/context-request-storage.d.ts.map +1 -0
  130. package/dist/core/cassette/context-request-storage.js +24 -0
  131. package/dist/core/cassette/context-request-storage.js.map +1 -0
  132. package/dist/core/cassette/index.d.ts +8 -0
  133. package/dist/core/cassette/index.d.ts.map +1 -0
  134. package/dist/core/cassette/index.js +16 -0
  135. package/dist/core/cassette/index.js.map +1 -0
  136. package/dist/core/cassette/ndjson-cassette.d.ts +22 -0
  137. package/dist/core/cassette/ndjson-cassette.d.ts.map +1 -0
  138. package/dist/core/cassette/ndjson-cassette.js +56 -0
  139. package/dist/core/cassette/ndjson-cassette.js.map +1 -0
  140. package/dist/core/cassette/request-storage.d.ts +16 -0
  141. package/dist/core/cassette/request-storage.d.ts.map +1 -0
  142. package/dist/core/cassette/request-storage.js +22 -0
  143. package/dist/core/cassette/request-storage.js.map +1 -0
  144. package/dist/core/context/index.d.ts +5 -0
  145. package/dist/core/context/index.d.ts.map +1 -0
  146. package/dist/core/context/index.js +9 -0
  147. package/dist/core/context/index.js.map +1 -0
  148. package/dist/core/contracts/index.d.ts +5 -0
  149. package/dist/core/contracts/index.d.ts.map +1 -0
  150. package/dist/core/contracts/index.js +3 -0
  151. package/dist/core/contracts/index.js.map +1 -0
  152. package/dist/core/identifier.d.ts +20 -0
  153. package/dist/core/identifier.d.ts.map +1 -0
  154. package/dist/core/identifier.js +31 -0
  155. package/dist/core/identifier.js.map +1 -0
  156. package/dist/core/index.d.ts +11 -0
  157. package/dist/core/index.d.ts.map +1 -0
  158. package/dist/core/index.js +27 -0
  159. package/dist/core/index.js.map +1 -0
  160. package/dist/core/matcher/extract-key.d.ts +41 -0
  161. package/dist/core/matcher/extract-key.d.ts.map +1 -0
  162. package/dist/core/matcher/extract-key.js +80 -0
  163. package/dist/core/matcher/extract-key.js.map +1 -0
  164. package/dist/core/matcher/index.d.ts +9 -0
  165. package/dist/core/matcher/index.d.ts.map +1 -0
  166. package/dist/core/matcher/index.js +24 -0
  167. package/dist/core/matcher/index.js.map +1 -0
  168. package/dist/core/matcher/matcher.d.ts +25 -0
  169. package/dist/core/matcher/matcher.d.ts.map +1 -0
  170. package/dist/core/matcher/matcher.js +83 -0
  171. package/dist/core/matcher/matcher.js.map +1 -0
  172. package/dist/core/matcher/softprobe-matcher.d.ts +41 -0
  173. package/dist/core/matcher/softprobe-matcher.d.ts.map +1 -0
  174. package/dist/core/matcher/softprobe-matcher.js +92 -0
  175. package/dist/core/matcher/softprobe-matcher.js.map +1 -0
  176. package/dist/core/matcher/store-accessor.d.ts +14 -0
  177. package/dist/core/matcher/store-accessor.d.ts.map +1 -0
  178. package/dist/core/matcher/store-accessor.js +25 -0
  179. package/dist/core/matcher/store-accessor.js.map +1 -0
  180. package/dist/core/matcher/topology.d.ts +37 -0
  181. package/dist/core/matcher/topology.d.ts.map +1 -0
  182. package/dist/core/matcher/topology.js +72 -0
  183. package/dist/core/matcher/topology.js.map +1 -0
  184. package/dist/core/runtime/architecture-guard.d.ts +9 -0
  185. package/dist/core/runtime/architecture-guard.d.ts.map +1 -0
  186. package/dist/core/runtime/architecture-guard.js +131 -0
  187. package/dist/core/runtime/architecture-guard.js.map +1 -0
  188. package/dist/core/runtime/index.d.ts +6 -0
  189. package/dist/core/runtime/index.d.ts.map +1 -0
  190. package/dist/core/runtime/index.js +11 -0
  191. package/dist/core/runtime/index.js.map +1 -0
  192. package/dist/identifier.d.ts +5 -0
  193. package/dist/identifier.d.ts.map +1 -0
  194. package/dist/identifier.js +11 -0
  195. package/dist/identifier.js.map +1 -0
  196. package/dist/index.d.ts +5 -0
  197. package/dist/index.d.ts.map +1 -0
  198. package/dist/index.js +21 -0
  199. package/dist/index.js.map +1 -0
  200. package/dist/init.d.ts +21 -0
  201. package/dist/init.d.ts.map +1 -0
  202. package/dist/init.js +51 -0
  203. package/dist/init.js.map +1 -0
  204. package/dist/instrumentations/common/http/context-headers.d.ts +9 -0
  205. package/dist/instrumentations/common/http/context-headers.d.ts.map +1 -0
  206. package/dist/instrumentations/common/http/context-headers.js +16 -0
  207. package/dist/instrumentations/common/http/context-headers.js.map +1 -0
  208. package/dist/instrumentations/common/http/inbound-capture.d.ts +17 -0
  209. package/dist/instrumentations/common/http/inbound-capture.d.ts.map +1 -0
  210. package/dist/instrumentations/common/http/inbound-capture.js +41 -0
  211. package/dist/instrumentations/common/http/inbound-capture.js.map +1 -0
  212. package/dist/instrumentations/common/http/inbound-record.d.ts +28 -0
  213. package/dist/instrumentations/common/http/inbound-record.d.ts.map +1 -0
  214. package/dist/instrumentations/common/http/inbound-record.js +40 -0
  215. package/dist/instrumentations/common/http/inbound-record.js.map +1 -0
  216. package/dist/instrumentations/common/http/span-adapter.d.ts +6 -0
  217. package/dist/instrumentations/common/http/span-adapter.d.ts.map +1 -0
  218. package/dist/instrumentations/common/http/span-adapter.js +12 -0
  219. package/dist/instrumentations/common/http/span-adapter.js.map +1 -0
  220. package/dist/instrumentations/common/http/stream-tap.d.ts +28 -0
  221. package/dist/instrumentations/common/http/stream-tap.d.ts.map +1 -0
  222. package/dist/instrumentations/common/http/stream-tap.js +61 -0
  223. package/dist/instrumentations/common/http/stream-tap.js.map +1 -0
  224. package/dist/instrumentations/express/capture.d.ts +26 -0
  225. package/dist/instrumentations/express/capture.d.ts.map +1 -0
  226. package/dist/instrumentations/express/capture.js +80 -0
  227. package/dist/instrumentations/express/capture.js.map +1 -0
  228. package/dist/instrumentations/express/index.d.ts +7 -0
  229. package/dist/instrumentations/express/index.d.ts.map +1 -0
  230. package/dist/instrumentations/express/index.js +15 -0
  231. package/dist/instrumentations/express/index.js.map +1 -0
  232. package/dist/instrumentations/express/replay.d.ts +10 -0
  233. package/dist/instrumentations/express/replay.d.ts.map +1 -0
  234. package/dist/instrumentations/express/replay.js +16 -0
  235. package/dist/instrumentations/express/replay.js.map +1 -0
  236. package/dist/instrumentations/fastify/capture.d.ts +13 -0
  237. package/dist/instrumentations/fastify/capture.d.ts.map +1 -0
  238. package/dist/instrumentations/fastify/capture.js +65 -0
  239. package/dist/instrumentations/fastify/capture.js.map +1 -0
  240. package/dist/instrumentations/fastify/index.d.ts +7 -0
  241. package/dist/instrumentations/fastify/index.d.ts.map +1 -0
  242. package/dist/instrumentations/fastify/index.js +13 -0
  243. package/dist/instrumentations/fastify/index.js.map +1 -0
  244. package/dist/instrumentations/fastify/replay.d.ts +13 -0
  245. package/dist/instrumentations/fastify/replay.d.ts.map +1 -0
  246. package/dist/instrumentations/fastify/replay.js +24 -0
  247. package/dist/instrumentations/fastify/replay.js.map +1 -0
  248. package/dist/instrumentations/fetch/index.d.ts +5 -0
  249. package/dist/instrumentations/fetch/index.d.ts.map +1 -0
  250. package/dist/instrumentations/fetch/index.js +10 -0
  251. package/dist/instrumentations/fetch/index.js.map +1 -0
  252. package/dist/instrumentations/fetch/replay.d.ts +19 -0
  253. package/dist/instrumentations/fetch/replay.d.ts.map +1 -0
  254. package/dist/instrumentations/fetch/replay.js +259 -0
  255. package/dist/instrumentations/fetch/replay.js.map +1 -0
  256. package/dist/instrumentations/postgres/capture.d.ts +46 -0
  257. package/dist/instrumentations/postgres/capture.d.ts.map +1 -0
  258. package/dist/instrumentations/postgres/capture.js +68 -0
  259. package/dist/instrumentations/postgres/capture.js.map +1 -0
  260. package/dist/instrumentations/postgres/index.d.ts +6 -0
  261. package/dist/instrumentations/postgres/index.d.ts.map +1 -0
  262. package/dist/instrumentations/postgres/index.js +14 -0
  263. package/dist/instrumentations/postgres/index.js.map +1 -0
  264. package/dist/instrumentations/postgres/replay.d.ts +20 -0
  265. package/dist/instrumentations/postgres/replay.d.ts.map +1 -0
  266. package/dist/instrumentations/postgres/replay.js +163 -0
  267. package/dist/instrumentations/postgres/replay.js.map +1 -0
  268. package/dist/instrumentations/redis/capture.d.ts +20 -0
  269. package/dist/instrumentations/redis/capture.d.ts.map +1 -0
  270. package/dist/instrumentations/redis/capture.js +61 -0
  271. package/dist/instrumentations/redis/capture.js.map +1 -0
  272. package/dist/instrumentations/redis/index.d.ts +6 -0
  273. package/dist/instrumentations/redis/index.d.ts.map +1 -0
  274. package/dist/instrumentations/redis/index.js +13 -0
  275. package/dist/instrumentations/redis/index.js.map +1 -0
  276. package/dist/instrumentations/redis/replay.d.ts +24 -0
  277. package/dist/instrumentations/redis/replay.d.ts.map +1 -0
  278. package/dist/instrumentations/redis/replay.js +173 -0
  279. package/dist/instrumentations/redis/replay.js.map +1 -0
  280. package/dist/replay/express.d.ts +5 -0
  281. package/dist/replay/express.d.ts.map +1 -0
  282. package/dist/replay/express.js +9 -0
  283. package/dist/replay/express.js.map +1 -0
  284. package/dist/replay/extract-key.d.ts +41 -0
  285. package/dist/replay/extract-key.d.ts.map +1 -0
  286. package/dist/replay/extract-key.js +80 -0
  287. package/dist/replay/extract-key.js.map +1 -0
  288. package/dist/replay/fastify.d.ts +5 -0
  289. package/dist/replay/fastify.d.ts.map +1 -0
  290. package/dist/replay/fastify.js +9 -0
  291. package/dist/replay/fastify.js.map +1 -0
  292. package/dist/replay/http.d.ts +5 -0
  293. package/dist/replay/http.d.ts.map +1 -0
  294. package/dist/replay/http.js +10 -0
  295. package/dist/replay/http.js.map +1 -0
  296. package/dist/replay/matcher.d.ts +25 -0
  297. package/dist/replay/matcher.d.ts.map +1 -0
  298. package/dist/replay/matcher.js +83 -0
  299. package/dist/replay/matcher.js.map +1 -0
  300. package/dist/replay/postgres.d.ts +5 -0
  301. package/dist/replay/postgres.d.ts.map +1 -0
  302. package/dist/replay/postgres.js +10 -0
  303. package/dist/replay/postgres.js.map +1 -0
  304. package/dist/replay/redis.d.ts +5 -0
  305. package/dist/replay/redis.d.ts.map +1 -0
  306. package/dist/replay/redis.js +10 -0
  307. package/dist/replay/redis.js.map +1 -0
  308. package/dist/replay/softprobe-matcher.d.ts +41 -0
  309. package/dist/replay/softprobe-matcher.d.ts.map +1 -0
  310. package/dist/replay/softprobe-matcher.js +92 -0
  311. package/dist/replay/softprobe-matcher.js.map +1 -0
  312. package/dist/replay/store-accessor.d.ts +14 -0
  313. package/dist/replay/store-accessor.d.ts.map +1 -0
  314. package/dist/replay/store-accessor.js +26 -0
  315. package/dist/replay/store-accessor.js.map +1 -0
  316. package/dist/replay/topology.d.ts +37 -0
  317. package/dist/replay/topology.d.ts.map +1 -0
  318. package/dist/replay/topology.js +72 -0
  319. package/dist/replay/topology.js.map +1 -0
  320. package/dist/store/cassette-store.d.ts +36 -0
  321. package/dist/store/cassette-store.d.ts.map +1 -0
  322. package/dist/store/cassette-store.js +66 -0
  323. package/dist/store/cassette-store.js.map +1 -0
  324. package/dist/types/schema.d.ts +114 -0
  325. package/dist/types/schema.d.ts.map +1 -0
  326. package/dist/types/schema.js +13 -0
  327. package/dist/types/schema.js.map +1 -0
  328. package/package.json +88 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matcher.js","sourceRoot":"","sources":["../../src/replay/matcher.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAI3C,MAAM,iBAAiB,GAAG,yBAAkC,CAAC;AAC7D,MAAM,YAAY,GAAG,oBAA6B,CAAC;AACnD,MAAM,cAAc,GAAG,sBAA+B,CAAC;AAEvD,0DAA0D;AAC1D,2CAA2C;AAC3C,MAAa,eAAe;IAO1B,YAAY,aAA6B;QALzC,kGAAkG;QACjF,oBAAe,GAAG,IAAI,GAAG,EAAkB,CAAC;QAC7D,qFAAqF;QACpE,mBAAc,GAAsB,EAAE,CAAC;QAGtD,IAAI,CAAC,aAAa,GAAG,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ACF;AArFD,0CAqFC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Legacy compatibility re-export for Postgres replay instrumentation.
3
+ */
4
+ export { applyPostgresReplay, setupPostgresReplay } from '../instrumentations/postgres/replay';
5
+ //# sourceMappingURL=postgres.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../src/replay/postgres.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setupPostgresReplay = exports.applyPostgresReplay = void 0;
4
+ /**
5
+ * Legacy compatibility re-export for Postgres replay instrumentation.
6
+ */
7
+ var replay_1 = require("../instrumentations/postgres/replay");
8
+ Object.defineProperty(exports, "applyPostgresReplay", { enumerable: true, get: function () { return replay_1.applyPostgresReplay; } });
9
+ Object.defineProperty(exports, "setupPostgresReplay", { enumerable: true, get: function () { return replay_1.setupPostgresReplay; } });
10
+ //# sourceMappingURL=postgres.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../src/replay/postgres.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,8DAA+F;AAAtF,6GAAA,mBAAmB,OAAA;AAAE,6GAAA,mBAAmB,OAAA"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Legacy compatibility re-export for Redis replay instrumentation.
3
+ */
4
+ export { applyRedisReplay, setupRedisReplay } from '../instrumentations/redis/replay';
5
+ //# sourceMappingURL=redis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redis.d.ts","sourceRoot":"","sources":["../../src/replay/redis.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setupRedisReplay = exports.applyRedisReplay = void 0;
4
+ /**
5
+ * Legacy compatibility re-export for Redis replay instrumentation.
6
+ */
7
+ var replay_1 = require("../instrumentations/redis/replay");
8
+ Object.defineProperty(exports, "applyRedisReplay", { enumerable: true, get: function () { return replay_1.applyRedisReplay; } });
9
+ Object.defineProperty(exports, "setupRedisReplay", { enumerable: true, get: function () { return replay_1.setupRedisReplay; } });
10
+ //# sourceMappingURL=redis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redis.js","sourceRoot":"","sources":["../../src/replay/redis.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,2DAAsF;AAA7E,0GAAA,gBAAgB,OAAA;AAAE,0GAAA,gBAAgB,OAAA"}
@@ -0,0 +1,41 @@
1
+ import type { MatcherAction, MatcherFn, SoftprobeCassetteRecord } from '../types/schema';
2
+ export declare class SoftprobeMatcher {
3
+ /** Matcher functions run in registration order; first non-CONTINUE wins. */
4
+ private fns;
5
+ /** Cassette records for this replay context (one trace). Set by SoftprobeContext.run(REPLAY). */
6
+ private records;
7
+ /** Appends a matcher function. Fns are run in registration order. */
8
+ use(fn: MatcherFn): void;
9
+ /** Removes all registered matcher fns. */
10
+ clear(): void;
11
+ /**
12
+ * Sets the cassette records for this context. Called by SoftprobeContext.run(REPLAY)
13
+ * after loading from storage so each matcher fn receives them in match().
14
+ */
15
+ _setRecords(records: SoftprobeCassetteRecord[]): void;
16
+ /**
17
+ * Returns the records for this replay context (context-scoped).
18
+ * Used by getRecordsForTrace when the active context has a matcher, so HTTP replay
19
+ * (MSW interceptor) reads from context instead of a global cache.
20
+ */
21
+ _getRecords(): SoftprobeCassetteRecord[];
22
+ /**
23
+ * Returns the trace id for the current request (from first record).
24
+ * Used when context/span do not propagate to fetch so the interceptor can identify the trace.
25
+ */
26
+ _getTraceId(): string | undefined;
27
+ /**
28
+ * Returns the inbound record's responsePayload.body, with .http extracted when present.
29
+ * Used by HTTP replay (MSW interceptor) so the mock response body matches the recorded inbound and diff passes.
30
+ */
31
+ _getInboundHttpBody(): unknown;
32
+ /**
33
+ * Runs registered matcher fns in order against the current active span (or spanOverride).
34
+ * Returns the first non-CONTINUE action (MOCK or PASSTHROUGH), or CONTINUE if all fns continue.
35
+ * Each fn receives the span and this context's records (design §7.1).
36
+ */
37
+ match(spanOverride?: import('@opentelemetry/api').Span | {
38
+ attributes?: Record<string, unknown>;
39
+ }): MatcherAction;
40
+ }
41
+ //# sourceMappingURL=softprobe-matcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"softprobe-matcher.d.ts","sourceRoot":"","sources":["../../src/replay/softprobe-matcher.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAEzF,qBAAa,gBAAgB;IAC3B,4EAA4E;IAC5E,OAAO,CAAC,GAAG,CAAmB;IAC9B,iGAAiG;IACjG,OAAO,CAAC,OAAO,CAAiC;IAEhD,qEAAqE;IACrE,GAAG,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI;IAIxB,0CAA0C;IAC1C,KAAK,IAAI,IAAI;IAIb;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,uBAAuB,EAAE,GAAG,IAAI;IAIrD;;;;OAIG;IACH,WAAW,IAAI,uBAAuB,EAAE;IAIxC;;;OAGG;IACH,WAAW,IAAI,MAAM,GAAG,SAAS;IAIjC;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAoB9B;;;;OAIG;IACH,KAAK,CAAC,YAAY,CAAC,EAAE,OAAO,oBAAoB,EAAE,IAAI,GAAG;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GAAG,aAAa;CAQlH"}
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SoftprobeMatcher = void 0;
4
+ /**
5
+ * SoftprobeMatcher: per-context replay matcher for outbound calls.
6
+ *
7
+ * One instance is created per SoftprobeContext.run(REPLAY) and stored in the OTel context
8
+ * for that request. It holds the cassette records for that trace and runs a list of MatcherFn
9
+ * in order; match() returns the first non-CONTINUE action (MOCK or PASSTHROUGH).
10
+ *
11
+ * Design §7.1: use(fn) appends; matchers do not execute passthrough. Records are context-scoped
12
+ * (loaded from the cassette for this run's traceId).
13
+ */
14
+ const api_1 = require("@opentelemetry/api");
15
+ class SoftprobeMatcher {
16
+ constructor() {
17
+ /** Matcher functions run in registration order; first non-CONTINUE wins. */
18
+ this.fns = [];
19
+ /** Cassette records for this replay context (one trace). Set by SoftprobeContext.run(REPLAY). */
20
+ this.records = [];
21
+ }
22
+ /** Appends a matcher function. Fns are run in registration order. */
23
+ use(fn) {
24
+ this.fns.push(fn);
25
+ }
26
+ /** Removes all registered matcher fns. */
27
+ clear() {
28
+ this.fns = [];
29
+ }
30
+ /**
31
+ * Sets the cassette records for this context. Called by SoftprobeContext.run(REPLAY)
32
+ * after loading from storage so each matcher fn receives them in match().
33
+ */
34
+ _setRecords(records) {
35
+ this.records = records;
36
+ }
37
+ /**
38
+ * Returns the records for this replay context (context-scoped).
39
+ * Used by getRecordsForTrace when the active context has a matcher, so HTTP replay
40
+ * (MSW interceptor) reads from context instead of a global cache.
41
+ */
42
+ _getRecords() {
43
+ return this.records;
44
+ }
45
+ /**
46
+ * Returns the trace id for the current request (from first record).
47
+ * Used when context/span do not propagate to fetch so the interceptor can identify the trace.
48
+ */
49
+ _getTraceId() {
50
+ return this.records[0]?.traceId;
51
+ }
52
+ /**
53
+ * Returns the inbound record's responsePayload.body, with .http extracted when present.
54
+ * Used by HTTP replay (MSW interceptor) so the mock response body matches the recorded inbound and diff passes.
55
+ */
56
+ _getInboundHttpBody() {
57
+ const inbound = this.records.find((r) => r.type === 'inbound');
58
+ const payload = inbound?.responsePayload;
59
+ const body = payload?.body;
60
+ if (body == null)
61
+ return undefined;
62
+ const parsed = typeof body === 'string'
63
+ ? (() => {
64
+ try {
65
+ return JSON.parse(body);
66
+ }
67
+ catch {
68
+ return undefined;
69
+ }
70
+ })()
71
+ : body;
72
+ return parsed && typeof parsed === 'object' && 'http' in parsed
73
+ ? parsed.http
74
+ : undefined;
75
+ }
76
+ /**
77
+ * Runs registered matcher fns in order against the current active span (or spanOverride).
78
+ * Returns the first non-CONTINUE action (MOCK or PASSTHROUGH), or CONTINUE if all fns continue.
79
+ * Each fn receives the span and this context's records (design §7.1).
80
+ */
81
+ match(spanOverride) {
82
+ const span = (api_1.trace.getActiveSpan() ?? spanOverride);
83
+ for (const fn of this.fns) {
84
+ const r = fn(span, this.records);
85
+ if (r.action !== 'CONTINUE')
86
+ return r;
87
+ }
88
+ return { action: 'CONTINUE' };
89
+ }
90
+ }
91
+ exports.SoftprobeMatcher = SoftprobeMatcher;
92
+ //# sourceMappingURL=softprobe-matcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"softprobe-matcher.js","sourceRoot":"","sources":["../../src/replay/softprobe-matcher.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACH,4CAA2C;AAG3C,MAAa,gBAAgB;IAA7B;QACE,4EAA4E;QACpE,QAAG,GAAgB,EAAE,CAAC;QAC9B,iGAAiG;QACzF,YAAO,GAA8B,EAAE,CAAC;IA0ElD,CAAC;IAxEC,qEAAqE;IACrE,GAAG,CAAC,EAAa;QACf,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;IAED,0CAA0C;IAC1C,KAAK;QACH,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;IAChB,CAAC;IAED;;;OAGG;IACH,WAAW,CAAC,OAAkC;QAC5C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;;OAGG;IACH,WAAW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ED,4CA8EC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Replay-mode record store accessor. Records are context-scoped only: the matcher
3
+ * in the active OTel context holds the loaded records for that request (created by
4
+ * SoftprobeContext.run(REPLAY)). No global cache. Task 15.3.1.
5
+ * Task 13.10: Load via Cassette (getOrCreateCassette) only; no loadNdjson.
6
+ */
7
+ import type { SoftprobeCassetteRecord } from '../types/schema';
8
+ /**
9
+ * Returns recorded cassette records for the given traceId from the active context only.
10
+ * The matcher is created and seeded by SoftprobeContext.run(REPLAY); only the framework creates matchers.
11
+ * Returns [] when there is no active matcher with records. Compares traceIds in lowercase (W3C traceparent).
12
+ */
13
+ export declare function getRecordsForTrace(traceId: string): SoftprobeCassetteRecord[];
14
+ //# sourceMappingURL=store-accessor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-accessor.d.ts","sourceRoot":"","sources":["../../src/replay/store-accessor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAK/D;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,uBAAuB,EAAE,CAS7E"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * Replay-mode record store accessor. Records are context-scoped only: the matcher
4
+ * in the active OTel context holds the loaded records for that request (created by
5
+ * SoftprobeContext.run(REPLAY)). No global cache. Task 15.3.1.
6
+ * Task 13.10: Load via Cassette (getOrCreateCassette) only; no loadNdjson.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.getRecordsForTrace = getRecordsForTrace;
10
+ const context_1 = require("../context");
11
+ /**
12
+ * Returns recorded cassette records for the given traceId from the active context only.
13
+ * The matcher is created and seeded by SoftprobeContext.run(REPLAY); only the framework creates matchers.
14
+ * Returns [] when there is no active matcher with records. Compares traceIds in lowercase (W3C traceparent).
15
+ */
16
+ function getRecordsForTrace(traceId) {
17
+ const normalized = traceId.toLowerCase();
18
+ const matcher = context_1.SoftprobeContext.getMatcher();
19
+ const replayMatcher = matcher;
20
+ if (replayMatcher && typeof replayMatcher._getRecords === 'function') {
21
+ const contextRecords = replayMatcher._getRecords();
22
+ return contextRecords.filter((r) => (r.traceId ?? '').toLowerCase() === normalized);
23
+ }
24
+ return [];
25
+ }
26
+ //# sourceMappingURL=store-accessor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-accessor.js","sourceRoot":"","sources":["../../src/replay/store-accessor.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAaH,gDASC;AAlBD,wCAA8C;AAI9C;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,OAAe;IAChD,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IACzC,MAAM,OAAO,GAAG,0BAAgB,CAAC,UAAU,EAAE,CAAC;IAC9C,MAAM,aAAa,GAAG,OAAyC,CAAC;IAChE,IAAI,aAAa,IAAI,OAAO,aAAa,CAAC,WAAW,KAAK,UAAU,EAAE,CAAC;QACrE,MAAM,cAAc,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC;QACnD,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,UAAU,CAAC,CAAC;IACtF,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Topology-aware matching helpers (design §7.4).
3
+ * Read live parent name; build bySpanId index; filter candidates; createTopologyMatcher.
4
+ */
5
+ import type { MatcherFn, SoftprobeCassetteRecord } from '../types/schema';
6
+ import { type SpanKey } from './extract-key';
7
+ /** Span-like with optional internal _parentSpanName (test or OTel plumbing). */
8
+ type SpanWithParent = {
9
+ _parentSpanName?: string;
10
+ } | undefined;
11
+ /**
12
+ * Returns the live parent span name for topology matching.
13
+ * If the span has _parentSpanName (set by instrumentation or tests), returns it; otherwise "root".
14
+ */
15
+ export declare function getLiveParentName(span: SpanWithParent): string;
16
+ /**
17
+ * Builds a map from spanId to record for lineage lookup (design §7.4).
18
+ * Enables looking up a record's parent via bySpanId.get(record.parentSpanId).
19
+ */
20
+ export declare function buildBySpanIdIndex(records: SoftprobeCassetteRecord[]): Map<string, SoftprobeCassetteRecord>;
21
+ /**
22
+ * Filters records to outbound candidates matching protocol+identifier (design §7.4).
23
+ * Same semantics as flat matcher's filterOutboundCandidates.
24
+ */
25
+ export declare function filterCandidatesByKey(records: SoftprobeCassetteRecord[], key: SpanKey): SoftprobeCassetteRecord[];
26
+ /**
27
+ * Prefers candidates whose recorded parent spanName matches live parent (design §7.4).
28
+ * Returns lineageMatches when non-empty, otherwise returns all candidates (fallback pool).
29
+ */
30
+ export declare function selectLineagePool(candidates: SoftprobeCassetteRecord[], bySpanId: Map<string, SoftprobeCassetteRecord>, liveParentName: string): SoftprobeCassetteRecord[];
31
+ /**
32
+ * Returns a MatcherFn that prefers candidates whose recorded parent spanName matches
33
+ * the live parent, with per-(protocol, identifier, liveParentName) call sequencing (design §7.4).
34
+ */
35
+ export declare function createTopologyMatcher(): MatcherFn;
36
+ export {};
37
+ //# sourceMappingURL=topology.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topology.d.ts","sourceRoot":"","sources":["../../src/replay/topology.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAiB,SAAS,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,eAAe,CAAC;AAEvB,gFAAgF;AAChF,KAAK,cAAc,GAAG;IAAE,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC;AAE/D;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAE9D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,uBAAuB,EAAE,GACjC,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAEtC;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,uBAAuB,EAAE,EAClC,GAAG,EAAE,OAAO,GACX,uBAAuB,EAAE,CAE3B;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,uBAAuB,EAAE,EACrC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,EAC9C,cAAc,EAAE,MAAM,GACrB,uBAAuB,EAAE,CAO3B;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,SAAS,CAsBjD"}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ /**
3
+ * Topology-aware matching helpers (design §7.4).
4
+ * Read live parent name; build bySpanId index; filter candidates; createTopologyMatcher.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.getLiveParentName = getLiveParentName;
8
+ exports.buildBySpanIdIndex = buildBySpanIdIndex;
9
+ exports.filterCandidatesByKey = filterCandidatesByKey;
10
+ exports.selectLineagePool = selectLineagePool;
11
+ exports.createTopologyMatcher = createTopologyMatcher;
12
+ const extract_key_1 = require("./extract-key");
13
+ /**
14
+ * Returns the live parent span name for topology matching.
15
+ * If the span has _parentSpanName (set by instrumentation or tests), returns it; otherwise "root".
16
+ */
17
+ function getLiveParentName(span) {
18
+ return span?._parentSpanName ?? 'root';
19
+ }
20
+ /**
21
+ * Builds a map from spanId to record for lineage lookup (design §7.4).
22
+ * Enables looking up a record's parent via bySpanId.get(record.parentSpanId).
23
+ */
24
+ function buildBySpanIdIndex(records) {
25
+ return new Map(records.map((r) => [r.spanId, r]));
26
+ }
27
+ /**
28
+ * Filters records to outbound candidates matching protocol+identifier (design §7.4).
29
+ * Same semantics as flat matcher's filterOutboundCandidates.
30
+ */
31
+ function filterCandidatesByKey(records, key) {
32
+ return (0, extract_key_1.filterOutboundCandidates)(records, key);
33
+ }
34
+ /**
35
+ * Prefers candidates whose recorded parent spanName matches live parent (design §7.4).
36
+ * Returns lineageMatches when non-empty, otherwise returns all candidates (fallback pool).
37
+ */
38
+ function selectLineagePool(candidates, bySpanId, liveParentName) {
39
+ const lineageMatches = candidates.filter((c) => {
40
+ if (!c.parentSpanId)
41
+ return liveParentName === 'root';
42
+ const parent = bySpanId.get(c.parentSpanId);
43
+ return (parent?.spanName ?? 'root') === liveParentName;
44
+ });
45
+ return lineageMatches.length > 0 ? lineageMatches : candidates;
46
+ }
47
+ /**
48
+ * Returns a MatcherFn that prefers candidates whose recorded parent spanName matches
49
+ * the live parent, with per-(protocol, identifier, liveParentName) call sequencing (design §7.4).
50
+ */
51
+ function createTopologyMatcher() {
52
+ const callSeq = new Map();
53
+ return (span, records) => {
54
+ const key = (0, extract_key_1.extractKeyFromSpan)(span);
55
+ if (!key)
56
+ return { action: 'CONTINUE' };
57
+ const liveParentName = getLiveParentName(span);
58
+ const candidates = filterCandidatesByKey(records, key);
59
+ if (candidates.length === 0)
60
+ return { action: 'CONTINUE' };
61
+ const bySpanId = buildBySpanIdIndex(records);
62
+ const pool = selectLineagePool(candidates, bySpanId, liveParentName);
63
+ const seqKey = `${key.protocol}::${key.identifier}::${liveParentName}`;
64
+ const n = callSeq.get(seqKey) ?? 0;
65
+ const picked = pool[n];
66
+ callSeq.set(seqKey, n + 1);
67
+ if (!picked)
68
+ return { action: 'CONTINUE' };
69
+ return { action: 'MOCK', payload: picked.responsePayload };
70
+ };
71
+ }
72
+ //# sourceMappingURL=topology.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topology.js","sourceRoot":"","sources":["../../src/replay/topology.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAgBH,8CAEC;AAMD,gDAIC;AAMD,sDAKC;AAMD,8CAWC;AAMD,sDAsBC;AAjFD,+CAIuB;AAKvB;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,IAAoB;IACpD,OAAQ,IAA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AU,GAAG,qBAAqB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACvD,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;QAE3D,MAAM,QAAQ,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC7C,MAAM,IAAI,GAAG,iBAAiB,CAAC,UAAU,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;QAErE,MAAM,MAAM,GAAG,GAAG,GAAG,CAAC,QAAQ,KAAK,GAAG,CAAC,UAAU,KAAK,cAAc,EAAE,CAAC;QACvE,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACnC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACvB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,MAAM;YAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;QAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,eAAe,EAAE,CAAC;IAC7D,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Single-threaded FIFO queue that appends NDJSON lines to a file.
3
+ * Used as the capture side-channel; payloads are not stored in span attributes.
4
+ */
5
+ import type { SoftprobeCassetteRecord } from '../types/schema';
6
+ export type CassetteStoreOptions = {
7
+ /** When set, enqueue drops lines once queue reaches this size and increments drop count. */
8
+ maxQueueSize?: number;
9
+ };
10
+ /**
11
+ * CassetteStore enqueues NDJSON lines and flushes them to a file in order.
12
+ */
13
+ export declare class CassetteStore {
14
+ private readonly path;
15
+ private readonly queue;
16
+ private readonly maxQueueSize;
17
+ private dropCount;
18
+ private readonly _boundFlushOnExit;
19
+ constructor(outputPath: string, options?: CassetteStoreOptions);
20
+ /** Appends a line (one JSON record) to the FIFO queue. Drops and counts if at maxQueueSize. */
21
+ enqueue(line: string): void;
22
+ /** Returns the number of lines dropped due to maxQueueSize. */
23
+ getDropCount(): number;
24
+ /**
25
+ * Serializes a cassette record as one JSON line. The line is queued for flush;
26
+ * flush joins with newline so the file has exactly one JSON per line.
27
+ */
28
+ saveRecord(record: SoftprobeCassetteRecord): void;
29
+ /** Writes all queued lines to the output file in order, then clears the queue. */
30
+ flush(): void;
31
+ /**
32
+ * Best-effort flush on exit. Registered for SIGINT/SIGTERM; safe to call directly (e.g. in tests).
33
+ */
34
+ flushOnExit(): void;
35
+ }
36
+ //# sourceMappingURL=cassette-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cassette-store.d.ts","sourceRoot":"","sources":["../../src/store/cassette-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D,MAAM,MAAM,oBAAoB,GAAG;IACjC,4FAA4F;IAC5F,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAa;gBAEnC,UAAU,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB;IAQlE,+FAA+F;IAC/F,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAW3B,+DAA+D;IAC/D,YAAY,IAAI,MAAM;IAItB;;;OAGG;IACH,UAAU,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI;IAIjD,kFAAkF;IAClF,KAAK,IAAI,IAAI;IAOb;;OAEG;IACH,WAAW,IAAI,IAAI;CAOpB"}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /**
3
+ * Single-threaded FIFO queue that appends NDJSON lines to a file.
4
+ * Used as the capture side-channel; payloads are not stored in span attributes.
5
+ */
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.CassetteStore = void 0;
11
+ const fs_1 = __importDefault(require("fs"));
12
+ /**
13
+ * CassetteStore enqueues NDJSON lines and flushes them to a file in order.
14
+ */
15
+ class CassetteStore {
16
+ constructor(outputPath, options = {}) {
17
+ this.queue = [];
18
+ this.dropCount = 0;
19
+ this.path = outputPath;
20
+ this.maxQueueSize = options.maxQueueSize;
21
+ this._boundFlushOnExit = this.flushOnExit.bind(this);
22
+ process.on('SIGINT', this._boundFlushOnExit);
23
+ process.on('SIGTERM', this._boundFlushOnExit);
24
+ }
25
+ /** Appends a line (one JSON record) to the FIFO queue. Drops and counts if at maxQueueSize. */
26
+ enqueue(line) {
27
+ if (this.maxQueueSize !== undefined &&
28
+ this.queue.length >= this.maxQueueSize) {
29
+ this.dropCount += 1;
30
+ return;
31
+ }
32
+ this.queue.push(line);
33
+ }
34
+ /** Returns the number of lines dropped due to maxQueueSize. */
35
+ getDropCount() {
36
+ return this.dropCount;
37
+ }
38
+ /**
39
+ * Serializes a cassette record as one JSON line. The line is queued for flush;
40
+ * flush joins with newline so the file has exactly one JSON per line.
41
+ */
42
+ saveRecord(record) {
43
+ this.enqueue(JSON.stringify(record));
44
+ }
45
+ /** Writes all queued lines to the output file in order, then clears the queue. */
46
+ flush() {
47
+ if (this.queue.length === 0)
48
+ return;
49
+ const content = this.queue.join('\n') + (this.queue.length ? '\n' : '');
50
+ fs_1.default.appendFileSync(this.path, content, 'utf8');
51
+ this.queue.length = 0;
52
+ }
53
+ /**
54
+ * Best-effort flush on exit. Registered for SIGINT/SIGTERM; safe to call directly (e.g. in tests).
55
+ */
56
+ flushOnExit() {
57
+ try {
58
+ this.flush();
59
+ }
60
+ catch {
61
+ // best-effort: avoid throwing on process exit
62
+ }
63
+ }
64
+ }
65
+ exports.CassetteStore = CassetteStore;
66
+ //# sourceMappingURL=cassette-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cassette-store.js","sourceRoot":"","sources":["../../src/store/cassette-store.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,4CAAoB;AASpB;;GAEG;AACH,MAAa,aAAa;IAOxB,YAAY,UAAkB,EAAE,UAAgC,EAAE;QALjD,UAAK,GAAa,EAAE,CAAC;QAE9B,cAAS,GAAG,CAAC,CAAC;QAIpB,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC7C,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;IAED,+FAA+F;IAC/F,OAAO,CAAC,IAAY;QAClB,IACE,IAAI,CAAC,YAAY,KAAK,SAAS;YAC/B,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,YAAY,EACtC,CAAC;YACD,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC;YACpB,OAAO;QACT,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,+DAA+D;IAC/D,YAAY;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;;OAGG;IACH,UAAU,CAAC,MAA+B;QACxC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACvC,CAAC;IAED,kFAAkF;IAClF,KAAK;QACH,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QACpC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACxE,YAAE,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAC9C,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,WAAW;QACT,IAAI,CAAC;YACH,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC;QAAC,MAAM,CAAC;YACP,8CAA8C;QAChD,CAAC;IACH,CAAC;CACF;AA1DD,sCA0DC"}
@@ -0,0 +1,114 @@
1
+ import type { Span } from '@opentelemetry/api';
2
+ import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
3
+ /**
4
+ * Result of a custom matcher:
5
+ * - MOCK: return the given payload; no tree matching, no network.
6
+ * - CONTINUE: fall through to default tree matching; the call is still replayed from the recording (no live network).
7
+ * - PASSTHROUGH: request that this call go to the live network; in strict mode the engine throws (not allowed).
8
+ */
9
+ export type MatcherResult = {
10
+ action: 'MOCK';
11
+ payload: unknown;
12
+ } | {
13
+ action: 'CONTINUE';
14
+ } | {
15
+ action: 'PASSTHROUGH';
16
+ };
17
+ /**
18
+ * V4 matcher result: discriminated union. Wrappers branch on action; only MOCK carries payload.
19
+ * Design §7.1: first non-CONTINUE wins; matchers do not execute passthrough.
20
+ */
21
+ export type MatcherAction = {
22
+ action: 'MOCK';
23
+ payload: unknown;
24
+ traceId?: string;
25
+ } | {
26
+ action: 'PASSTHROUGH';
27
+ } | {
28
+ action: 'CONTINUE';
29
+ };
30
+ /**
31
+ * V4 matcher function: (span, records) => MatcherAction. Used by SoftprobeMatcher list.
32
+ * Design §7.1: first non-CONTINUE return wins; matchers do not execute passthrough.
33
+ * Input contract: span attributes are the canonical source for matching keys
34
+ * (e.g. `softprobe.protocol`, `softprobe.identifier`). Raw dependency call args
35
+ * are expected to be transformed into span attributes by wrappers/instrumentation.
36
+ */
37
+ export type MatcherFn = (span: Span | undefined, records: SoftprobeCassetteRecord[]) => MatcherAction;
38
+ /** Custom matcher function. Evaluated before default tree matching. */
39
+ export type CustomMatcherFn = (liveRequest: MatchRequest, recordedSpans: ReadableSpan[]) => MatcherResult;
40
+ export interface SoftprobeAttributes {
41
+ 'softprobe.protocol': 'http' | 'postgres' | 'redis' | 'amqp';
42
+ 'softprobe.identifier': string;
43
+ 'softprobe.request.body'?: string;
44
+ 'softprobe.response.body'?: string;
45
+ }
46
+ /** Runtime execution mode for Softprobe context. */
47
+ export type SoftprobeMode = 'CAPTURE' | 'REPLAY' | 'PASSTHROUGH';
48
+ /**
49
+ * Cassette storage interface: pure read/write only (Task 13.7).
50
+ * loadTrace() reads all records for this trace; saveRecord(record) appends one;
51
+ * flush?() drains pending writes when present. Bound to one traceId at creation.
52
+ */
53
+ export interface Cassette {
54
+ loadTrace(): Promise<SoftprobeCassetteRecord[]>;
55
+ saveRecord(record: SoftprobeCassetteRecord): Promise<void>;
56
+ flush?(): Promise<void>;
57
+ }
58
+ /**
59
+ * Options for SoftprobeContext.run().
60
+ * When storage is omitted, cassetteDirectory (from options or global) and traceId are used to get-or-create a cassette (Task 13.5).
61
+ */
62
+ export interface SoftprobeRunOptions {
63
+ mode: SoftprobeMode;
64
+ /** Optional; when omitted and cassetteDirectory + traceId are set, context get-or-creates a cassette per traceId. */
65
+ storage?: Cassette;
66
+ traceId: string;
67
+ /** Optional directory for per-trace cassette files; when not set, global default from init is used. */
68
+ cassetteDirectory?: string;
69
+ strictReplay?: boolean;
70
+ strictComparison?: boolean;
71
+ matcher?: MatcherFn;
72
+ }
73
+ /** V4.1 protocol discriminator (cassette + bindings). */
74
+ export type Protocol = 'http' | 'postgres' | 'redis' | 'amqp' | 'grpc';
75
+ /** V4.1 cassette record direction. */
76
+ export type RecordType = 'inbound' | 'outbound' | 'metadata';
77
+ /**
78
+ * V4.1 NDJSON cassette record: identity, topology, direction, matching keys, optional payloads.
79
+ * Payloads are side-channel only (not in span attributes).
80
+ */
81
+ export type SoftprobeCassetteRecord = {
82
+ version: '4.1';
83
+ traceId: string;
84
+ spanId: string;
85
+ parentSpanId?: string;
86
+ spanName?: string;
87
+ timestamp: string;
88
+ type: RecordType;
89
+ protocol: Protocol;
90
+ identifier: string;
91
+ requestPayload?: unknown;
92
+ responsePayload?: unknown;
93
+ statusCode?: number;
94
+ error?: {
95
+ message: string;
96
+ stack?: string;
97
+ };
98
+ };
99
+ /**
100
+ * Minimal runtime guard for V4.1 cassette records. Returns true only when
101
+ * the object has version "4.1" (does not validate other required keys).
102
+ */
103
+ export declare function isCassetteRecord(obj: unknown): obj is SoftprobeCassetteRecord;
104
+ /** V3 side-channel cassette file format. */
105
+ export interface SoftprobeCassette {
106
+ version: '3.0';
107
+ records: SoftprobeCassetteRecord[];
108
+ }
109
+ export interface MatchRequest {
110
+ protocol: string;
111
+ identifier: string;
112
+ requestBody?: unknown;
113
+ }
114
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/types/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GACpC;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,GACtB;IAAE,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC;AAE9B;;;GAGG;AACH,MAAM,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
+ exports.isCassetteRecord = isCassetteRecord;
4
+ /**
5
+ * Minimal runtime guard for V4.1 cassette records. Returns true only when
6
+ * the object has version "4.1" (does not validate other required keys).
7
+ */
8
+ function isCassetteRecord(obj) {
9
+ return (typeof obj === 'object' &&
10
+ obj !== null &&
11
+ obj.version === '4.1');
12
+ }
13
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/types/schema.ts"],"names":[],"mappings":";;AA4GA,4CAMC;AAVD;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,GAAY;IAC3C,OAAO,CACL,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,KAAK,IAAI;QACX,GAA+B,CAAC,OAAO,KAAK,KAAK,CACnD,CAAC;AACJ,CAAC"}