@aexhq/sdk 0.46.5-canary → 0.51.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 (346) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +38 -0
  3. package/README.md +54 -29
  4. package/dist/client/aex.d.ts +33 -0
  5. package/dist/client/aex.js +108 -0
  6. package/dist/client/aex.js.map +1 -0
  7. package/dist/client/credentials.d.ts +25 -0
  8. package/dist/client/credentials.js +97 -0
  9. package/dist/client/credentials.js.map +1 -0
  10. package/dist/client/routing.d.ts +7 -0
  11. package/dist/client/routing.js +29 -0
  12. package/dist/client/routing.js.map +1 -0
  13. package/dist/downloads/download.d.ts +18 -0
  14. package/dist/downloads/download.js +67 -0
  15. package/dist/downloads/download.js.map +1 -0
  16. package/dist/generated/errors.d.ts +12 -0
  17. package/dist/generated/errors.js +82 -0
  18. package/dist/generated/errors.js.map +1 -0
  19. package/dist/generated/models.d.ts +1392 -0
  20. package/dist/generated/models.js +62 -0
  21. package/dist/generated/models.js.map +1 -0
  22. package/dist/generated/resources.d.ts +710 -0
  23. package/dist/generated/resources.js +582 -0
  24. package/dist/generated/resources.js.map +1 -0
  25. package/dist/generated/routes.d.ts +44 -0
  26. package/dist/generated/routes.js +1905 -0
  27. package/dist/generated/routes.js.map +1 -0
  28. package/dist/index.d.ts +21 -50
  29. package/dist/index.js +14 -62
  30. package/dist/index.js.map +1 -1
  31. package/dist/node/session-file-limits.d.ts +4 -0
  32. package/dist/node/session-file-limits.js +7 -0
  33. package/dist/node/session-file-limits.js.map +1 -0
  34. package/dist/node/session-files.d.ts +80 -0
  35. package/dist/node/session-files.js +254 -0
  36. package/dist/node/session-files.js.map +1 -0
  37. package/dist/observations/stream.d.ts +1 -0
  38. package/dist/observations/stream.js +18 -0
  39. package/dist/observations/stream.js.map +1 -0
  40. package/dist/transport/errors.d.ts +60 -0
  41. package/dist/transport/errors.js +107 -0
  42. package/dist/transport/errors.js.map +1 -0
  43. package/dist/transport/pagination.d.ts +8 -0
  44. package/dist/transport/pagination.js +34 -0
  45. package/dist/transport/pagination.js.map +1 -0
  46. package/dist/transport/retry.d.ts +21 -0
  47. package/dist/transport/retry.js +37 -0
  48. package/dist/transport/retry.js.map +1 -0
  49. package/dist/transport/transport.d.ts +25 -0
  50. package/dist/transport/transport.js +33 -0
  51. package/dist/transport/transport.js.map +1 -0
  52. package/package.json +67 -30
  53. package/dist/_contracts/account-operations.d.ts +0 -101
  54. package/dist/_contracts/account-operations.js +0 -242
  55. package/dist/_contracts/account-types.d.ts +0 -461
  56. package/dist/_contracts/account-types.js +0 -1
  57. package/dist/_contracts/api-key.d.ts +0 -61
  58. package/dist/_contracts/api-key.js +0 -101
  59. package/dist/_contracts/api-routes.d.ts +0 -20
  60. package/dist/_contracts/api-routes.js +0 -109
  61. package/dist/_contracts/archive-limits.d.ts +0 -3
  62. package/dist/_contracts/archive-limits.js +0 -23
  63. package/dist/_contracts/asset-authoring.d.ts +0 -22
  64. package/dist/_contracts/asset-authoring.js +0 -106
  65. package/dist/_contracts/asset-bundle.d.ts +0 -64
  66. package/dist/_contracts/asset-bundle.js +0 -263
  67. package/dist/_contracts/asset-upload-helper.d.ts +0 -31
  68. package/dist/_contracts/asset-upload-helper.js +0 -84
  69. package/dist/_contracts/billing-admission.d.ts +0 -29
  70. package/dist/_contracts/billing-admission.js +0 -28
  71. package/dist/_contracts/bundle-manifest.d.ts +0 -89
  72. package/dist/_contracts/bundle-manifest.js +0 -158
  73. package/dist/_contracts/canonical-sha256.d.ts +0 -8
  74. package/dist/_contracts/canonical-sha256.js +0 -8
  75. package/dist/_contracts/connection-ticket.d.ts +0 -22
  76. package/dist/_contracts/connection-ticket.js +0 -54
  77. package/dist/_contracts/continuation-event.d.ts +0 -31
  78. package/dist/_contracts/continuation-event.js +0 -6
  79. package/dist/_contracts/contract-parse-error.d.ts +0 -12
  80. package/dist/_contracts/contract-parse-error.js +0 -51
  81. package/dist/_contracts/error-codes.d.ts +0 -26
  82. package/dist/_contracts/error-codes.js +0 -116
  83. package/dist/_contracts/error-factory.d.ts +0 -32
  84. package/dist/_contracts/error-factory.js +0 -174
  85. package/dist/_contracts/event-envelope.d.ts +0 -471
  86. package/dist/_contracts/event-envelope.js +0 -501
  87. package/dist/_contracts/event-stream-client.d.ts +0 -122
  88. package/dist/_contracts/event-stream-client.js +0 -445
  89. package/dist/_contracts/event-view.d.ts +0 -44
  90. package/dist/_contracts/event-view.js +0 -69
  91. package/dist/_contracts/failure-class.d.ts +0 -29
  92. package/dist/_contracts/failure-class.js +0 -73
  93. package/dist/_contracts/http.d.ts +0 -135
  94. package/dist/_contracts/http.js +0 -434
  95. package/dist/_contracts/ids.d.ts +0 -66
  96. package/dist/_contracts/ids.js +0 -119
  97. package/dist/_contracts/index.d.ts +0 -42
  98. package/dist/_contracts/index.js +0 -52
  99. package/dist/_contracts/internal.d.ts +0 -55
  100. package/dist/_contracts/internal.js +0 -113
  101. package/dist/_contracts/models.d.ts +0 -30
  102. package/dist/_contracts/models.js +0 -28
  103. package/dist/_contracts/operation-core.d.ts +0 -36
  104. package/dist/_contracts/operation-core.js +0 -70
  105. package/dist/_contracts/operations.d.ts +0 -218
  106. package/dist/_contracts/operations.js +0 -1496
  107. package/dist/_contracts/otlp-projection.d.ts +0 -78
  108. package/dist/_contracts/otlp-projection.js +0 -171
  109. package/dist/_contracts/post-hook.d.ts +0 -31
  110. package/dist/_contracts/post-hook.js +0 -61
  111. package/dist/_contracts/provider-fault.d.ts +0 -34
  112. package/dist/_contracts/provider-fault.js +0 -68
  113. package/dist/_contracts/retry-core.d.ts +0 -29
  114. package/dist/_contracts/retry-core.js +0 -79
  115. package/dist/_contracts/runner-event.d.ts +0 -117
  116. package/dist/_contracts/runner-event.js +0 -172
  117. package/dist/_contracts/runtime-kind.d.ts +0 -60
  118. package/dist/_contracts/runtime-kind.js +0 -70
  119. package/dist/_contracts/runtime-manifest.d.ts +0 -121
  120. package/dist/_contracts/runtime-manifest.js +0 -83
  121. package/dist/_contracts/runtime-security-profile.d.ts +0 -26
  122. package/dist/_contracts/runtime-security-profile.js +0 -73
  123. package/dist/_contracts/runtime-sizes.d.ts +0 -104
  124. package/dist/_contracts/runtime-sizes.js +0 -111
  125. package/dist/_contracts/runtime-types.d.ts +0 -618
  126. package/dist/_contracts/runtime-types.js +0 -58
  127. package/dist/_contracts/schemas/asset-bundle.d.ts +0 -70
  128. package/dist/_contracts/schemas/asset-bundle.js +0 -107
  129. package/dist/_contracts/schemas/asset-ref.d.ts +0 -61
  130. package/dist/_contracts/schemas/asset-ref.js +0 -118
  131. package/dist/_contracts/schemas/bundle-manifest.d.ts +0 -66
  132. package/dist/_contracts/schemas/bundle-manifest.js +0 -77
  133. package/dist/_contracts/schemas/index.d.ts +0 -32
  134. package/dist/_contracts/schemas/index.js +0 -30
  135. package/dist/_contracts/schemas/mcp-server.d.ts +0 -99
  136. package/dist/_contracts/schemas/mcp-server.js +0 -209
  137. package/dist/_contracts/schemas/models.d.ts +0 -29
  138. package/dist/_contracts/schemas/models.js +0 -51
  139. package/dist/_contracts/schemas/numeric.d.ts +0 -18
  140. package/dist/_contracts/schemas/numeric.js +0 -28
  141. package/dist/_contracts/schemas/post-hook.d.ts +0 -45
  142. package/dist/_contracts/schemas/post-hook.js +0 -68
  143. package/dist/_contracts/schemas/response-assets.d.ts +0 -75
  144. package/dist/_contracts/schemas/response-assets.js +0 -81
  145. package/dist/_contracts/schemas/response-billing.d.ts +0 -208
  146. package/dist/_contracts/schemas/response-billing.js +0 -139
  147. package/dist/_contracts/schemas/response-common.d.ts +0 -132
  148. package/dist/_contracts/schemas/response-common.js +0 -162
  149. package/dist/_contracts/schemas/response-identity.d.ts +0 -648
  150. package/dist/_contracts/schemas/response-identity.js +0 -131
  151. package/dist/_contracts/schemas/response-mcp-servers.d.ts +0 -51
  152. package/dist/_contracts/schemas/response-mcp-servers.js +0 -32
  153. package/dist/_contracts/schemas/response-secrets.d.ts +0 -50
  154. package/dist/_contracts/schemas/response-secrets.js +0 -32
  155. package/dist/_contracts/schemas/response-sessions-internal.d.ts +0 -200
  156. package/dist/_contracts/schemas/response-sessions-internal.js +0 -142
  157. package/dist/_contracts/schemas/response-sessions.d.ts +0 -1598
  158. package/dist/_contracts/schemas/response-sessions.js +0 -377
  159. package/dist/_contracts/schemas/response-webhooks.d.ts +0 -76
  160. package/dist/_contracts/schemas/response-webhooks.js +0 -42
  161. package/dist/_contracts/schemas/response-workspace.d.ts +0 -225
  162. package/dist/_contracts/schemas/response-workspace.js +0 -99
  163. package/dist/_contracts/schemas/runtime-kind.d.ts +0 -31
  164. package/dist/_contracts/schemas/runtime-kind.js +0 -29
  165. package/dist/_contracts/schemas/runtime-security-profile.d.ts +0 -28
  166. package/dist/_contracts/schemas/runtime-security-profile.js +0 -26
  167. package/dist/_contracts/schemas/runtime-sizes.d.ts +0 -70
  168. package/dist/_contracts/schemas/runtime-sizes.js +0 -127
  169. package/dist/_contracts/schemas/session-limits.d.ts +0 -34
  170. package/dist/_contracts/schemas/session-limits.js +0 -39
  171. package/dist/_contracts/schemas/session-machine.d.ts +0 -23
  172. package/dist/_contracts/schemas/session-machine.js +0 -24
  173. package/dist/_contracts/schemas/session-request-config.d.ts +0 -58
  174. package/dist/_contracts/schemas/session-request-config.js +0 -134
  175. package/dist/_contracts/schemas/session-webhook.d.ts +0 -11
  176. package/dist/_contracts/schemas/session-webhook.js +0 -38
  177. package/dist/_contracts/schemas/side-effect-audit.d.ts +0 -98
  178. package/dist/_contracts/schemas/side-effect-audit.js +0 -102
  179. package/dist/_contracts/schemas/submission-assets.d.ts +0 -117
  180. package/dist/_contracts/schemas/submission-assets.js +0 -147
  181. package/dist/_contracts/schemas/submission-body.d.ts +0 -251
  182. package/dist/_contracts/schemas/submission-body.js +0 -378
  183. package/dist/_contracts/schemas/submission-environment.d.ts +0 -79
  184. package/dist/_contracts/schemas/submission-environment.js +0 -179
  185. package/dist/_contracts/schemas/submission-request.d.ts +0 -158
  186. package/dist/_contracts/schemas/submission-request.js +0 -49
  187. package/dist/_contracts/schemas/submission-secrets.d.ts +0 -47
  188. package/dist/_contracts/schemas/submission-secrets.js +0 -108
  189. package/dist/_contracts/schemas/wire.d.ts +0 -118
  190. package/dist/_contracts/schemas/wire.js +0 -171
  191. package/dist/_contracts/schemas/workspace-resources.d.ts +0 -50
  192. package/dist/_contracts/schemas/workspace-resources.js +0 -87
  193. package/dist/_contracts/sdk-errors.d.ts +0 -212
  194. package/dist/_contracts/sdk-errors.js +0 -313
  195. package/dist/_contracts/sdk-secrets.d.ts +0 -67
  196. package/dist/_contracts/sdk-secrets.js +0 -427
  197. package/dist/_contracts/session-archive.d.ts +0 -16
  198. package/dist/_contracts/session-archive.js +0 -92
  199. package/dist/_contracts/session-artifacts.d.ts +0 -189
  200. package/dist/_contracts/session-artifacts.js +0 -264
  201. package/dist/_contracts/session-config.d.ts +0 -373
  202. package/dist/_contracts/session-config.js +0 -562
  203. package/dist/_contracts/session-cost-types.d.ts +0 -211
  204. package/dist/_contracts/session-cost-types.js +0 -69
  205. package/dist/_contracts/session-cost.d.ts +0 -8
  206. package/dist/_contracts/session-cost.js +0 -582
  207. package/dist/_contracts/session-custody.d.ts +0 -165
  208. package/dist/_contracts/session-custody.js +0 -345
  209. package/dist/_contracts/session-file-query.d.ts +0 -14
  210. package/dist/_contracts/session-file-query.js +0 -178
  211. package/dist/_contracts/session-record.d.ts +0 -112
  212. package/dist/_contracts/session-record.js +0 -165
  213. package/dist/_contracts/session-retention.d.ts +0 -201
  214. package/dist/_contracts/session-retention.js +0 -450
  215. package/dist/_contracts/side-effect-audit.d.ts +0 -126
  216. package/dist/_contracts/side-effect-audit.js +0 -520
  217. package/dist/_contracts/sse.d.ts +0 -74
  218. package/dist/_contracts/sse.js +0 -227
  219. package/dist/_contracts/stable.d.ts +0 -45
  220. package/dist/_contracts/stable.js +0 -62
  221. package/dist/_contracts/status.d.ts +0 -25
  222. package/dist/_contracts/status.js +0 -57
  223. package/dist/_contracts/submission-limits.d.ts +0 -61
  224. package/dist/_contracts/submission-limits.js +0 -60
  225. package/dist/_contracts/submission.d.ts +0 -547
  226. package/dist/_contracts/submission.js +0 -812
  227. package/dist/_contracts/suggest.d.ts +0 -15
  228. package/dist/_contracts/suggest.js +0 -53
  229. package/dist/_contracts/testing/response-bindings.d.ts +0 -45
  230. package/dist/_contracts/testing/response-bindings.js +0 -256
  231. package/dist/_contracts/testing/wire-conformance-entry.d.ts +0 -10
  232. package/dist/_contracts/testing/wire-conformance-entry.js +0 -8
  233. package/dist/_contracts/testing/wire-conformance.d.ts +0 -169
  234. package/dist/_contracts/testing/wire-conformance.js +0 -276
  235. package/dist/_contracts/turn-trace.d.ts +0 -28
  236. package/dist/_contracts/turn-trace.js +0 -1
  237. package/dist/_contracts/unknown-field-error.d.ts +0 -13
  238. package/dist/_contracts/unknown-field-error.js +0 -21
  239. package/dist/_contracts/value-guards.d.ts +0 -20
  240. package/dist/_contracts/value-guards.js +0 -34
  241. package/dist/_contracts/webhook-verify.d.ts +0 -34
  242. package/dist/_contracts/webhook-verify.js +0 -93
  243. package/dist/_contracts/wire-observer.d.ts +0 -49
  244. package/dist/_contracts/wire-observer.js +0 -34
  245. package/dist/_contracts/workflow-status.d.ts +0 -7
  246. package/dist/_contracts/workflow-status.js +0 -43
  247. package/dist/_contracts/workspace-resources.d.ts +0 -98
  248. package/dist/_contracts/workspace-resources.js +0 -39
  249. package/dist/archive-limits.d.ts +0 -1
  250. package/dist/archive-limits.js +0 -2
  251. package/dist/archive-limits.js.map +0 -1
  252. package/dist/asset-upload.d.ts +0 -47
  253. package/dist/asset-upload.js +0 -269
  254. package/dist/asset-upload.js.map +0 -1
  255. package/dist/bundle.d.ts +0 -9
  256. package/dist/bundle.js +0 -20
  257. package/dist/bundle.js.map +0 -1
  258. package/dist/canonical-zip.d.ts +0 -68
  259. package/dist/canonical-zip.js +0 -355
  260. package/dist/canonical-zip.js.map +0 -1
  261. package/dist/cli.mjs +0 -12048
  262. package/dist/cli.mjs.sha256 +0 -1
  263. package/dist/client-types.d.ts +0 -192
  264. package/dist/client-types.js +0 -2
  265. package/dist/client-types.js.map +0 -1
  266. package/dist/client.d.ts +0 -464
  267. package/dist/client.js +0 -1207
  268. package/dist/client.js.map +0 -1
  269. package/dist/event-projection.d.ts +0 -22
  270. package/dist/event-projection.js +0 -380
  271. package/dist/event-projection.js.map +0 -1
  272. package/dist/fetch-archive.d.ts +0 -16
  273. package/dist/fetch-archive.js +0 -252
  274. package/dist/fetch-archive.js.map +0 -1
  275. package/dist/file.d.ts +0 -96
  276. package/dist/file.js +0 -272
  277. package/dist/file.js.map +0 -1
  278. package/dist/instructions.d.ts +0 -20
  279. package/dist/instructions.js +0 -40
  280. package/dist/instructions.js.map +0 -1
  281. package/dist/legacy-session-provider-fault.d.ts +0 -7
  282. package/dist/legacy-session-provider-fault.js +0 -38
  283. package/dist/legacy-session-provider-fault.js.map +0 -1
  284. package/dist/mcp-server.d.ts +0 -84
  285. package/dist/mcp-server.js +0 -117
  286. package/dist/mcp-server.js.map +0 -1
  287. package/dist/node-fs.d.ts +0 -29
  288. package/dist/node-fs.js +0 -19
  289. package/dist/node-fs.js.map +0 -1
  290. package/dist/node-walk.d.ts +0 -69
  291. package/dist/node-walk.js +0 -151
  292. package/dist/node-walk.js.map +0 -1
  293. package/dist/path-basename.d.ts +0 -5
  294. package/dist/path-basename.js +0 -9
  295. package/dist/path-basename.js.map +0 -1
  296. package/dist/retry.d.ts +0 -70
  297. package/dist/retry.js +0 -155
  298. package/dist/retry.js.map +0 -1
  299. package/dist/secret.d.ts +0 -65
  300. package/dist/secret.js +0 -110
  301. package/dist/secret.js.map +0 -1
  302. package/dist/session-validate.d.ts +0 -100
  303. package/dist/session-validate.js +0 -303
  304. package/dist/session-validate.js.map +0 -1
  305. package/dist/skill.d.ts +0 -99
  306. package/dist/skill.js +0 -169
  307. package/dist/skill.js.map +0 -1
  308. package/dist/submission-wire.d.ts +0 -13
  309. package/dist/submission-wire.js +0 -69
  310. package/dist/submission-wire.js.map +0 -1
  311. package/dist/tool.d.ts +0 -41
  312. package/dist/tool.js +0 -76
  313. package/dist/tool.js.map +0 -1
  314. package/dist/version.d.ts +0 -9
  315. package/dist/version.js +0 -10
  316. package/dist/version.js.map +0 -1
  317. package/docs/authentication.md +0 -125
  318. package/docs/billing.md +0 -164
  319. package/docs/cleanup.md +0 -27
  320. package/docs/concepts/agent-tools.md +0 -47
  321. package/docs/concepts/composition.md +0 -60
  322. package/docs/concepts/providers-and-runtimes.md +0 -121
  323. package/docs/concepts/sessions.md +0 -51
  324. package/docs/concepts/subagents.md +0 -35
  325. package/docs/credentials.md +0 -116
  326. package/docs/defaults.md +0 -51
  327. package/docs/errors.md +0 -258
  328. package/docs/events.md +0 -143
  329. package/docs/files.md +0 -130
  330. package/docs/limits-and-quotas.md +0 -114
  331. package/docs/limits.md +0 -51
  332. package/docs/mcp.md +0 -47
  333. package/docs/networking.md +0 -114
  334. package/docs/provider-runtime-capabilities.md +0 -32
  335. package/docs/public-surface.json +0 -73
  336. package/docs/quickstart.md +0 -135
  337. package/docs/release.md +0 -44
  338. package/docs/retries.md +0 -108
  339. package/docs/secrets.md +0 -141
  340. package/docs/session-config.md +0 -51
  341. package/docs/session-record.md +0 -58
  342. package/docs/skills.md +0 -65
  343. package/docs/telemetry.md +0 -66
  344. package/docs/testing.md +0 -35
  345. package/docs/vision-skills.md +0 -94
  346. package/docs/webhooks.md +0 -143
@@ -1,15 +0,0 @@
1
- /**
2
- * Shared "did you mean?" suggester — the SSoT for near-miss enum hints across
3
- * the SDK and the CLI. Previously this lived only in the CLI, so the SDK could
4
- * not emit a fuzzy model/provider hint even though the docs promised one.
5
- */
6
- /**
7
- * The closest candidate to `input` by a unique case-insensitive prefix match,
8
- * else by Levenshtein distance (≤ 2), else `undefined`. Ties break by
9
- * declaration order. Used on an invalid `--model` / `--provider` /
10
- * `--runtime-size` (and the SDK's unknown-model throw) to turn a flat rejection
11
- * into a fix hint.
12
- */
13
- export declare function suggest(input: string, candidates: readonly string[]): string | undefined;
14
- /** Levenshtein edit distance between two strings (rolling two-row DP). */
15
- export declare function levenshtein(a: string, b: string): number;
@@ -1,53 +0,0 @@
1
- /**
2
- * Shared "did you mean?" suggester — the SSoT for near-miss enum hints across
3
- * the SDK and the CLI. Previously this lived only in the CLI, so the SDK could
4
- * not emit a fuzzy model/provider hint even though the docs promised one.
5
- */
6
- /**
7
- * The closest candidate to `input` by a unique case-insensitive prefix match,
8
- * else by Levenshtein distance (≤ 2), else `undefined`. Ties break by
9
- * declaration order. Used on an invalid `--model` / `--provider` /
10
- * `--runtime-size` (and the SDK's unknown-model throw) to turn a flat rejection
11
- * into a fix hint.
12
- */
13
- export function suggest(input, candidates) {
14
- const needle = input.trim();
15
- if (!needle)
16
- return undefined;
17
- // Unique case-insensitive prefix match first (cheap + intuitive).
18
- const lower = needle.toLowerCase();
19
- const prefixHits = candidates.filter((c) => c.toLowerCase().startsWith(lower));
20
- if (prefixHits.length === 1)
21
- return prefixHits[0];
22
- // Else nearest by edit distance, ties broken by declaration order.
23
- let best;
24
- let bestDist = Number.POSITIVE_INFINITY;
25
- for (const candidate of candidates) {
26
- const dist = levenshtein(needle, candidate);
27
- if (dist < bestDist) {
28
- bestDist = dist;
29
- best = candidate;
30
- }
31
- }
32
- return bestDist <= 2 ? best : undefined;
33
- }
34
- /** Levenshtein edit distance between two strings (rolling two-row DP). */
35
- export function levenshtein(a, b) {
36
- const m = a.length;
37
- const n = b.length;
38
- if (m === 0)
39
- return n;
40
- if (n === 0)
41
- return m;
42
- let prev = Array.from({ length: n + 1 }, (_, j) => j);
43
- let curr = new Array(n + 1);
44
- for (let i = 1; i <= m; i++) {
45
- curr[0] = i;
46
- for (let j = 1; j <= n; j++) {
47
- const cost = a[i - 1] === b[j - 1] ? 0 : 1;
48
- curr[j] = Math.min(prev[j] + 1, curr[j - 1] + 1, prev[j - 1] + cost);
49
- }
50
- [prev, curr] = [curr, prev];
51
- }
52
- return prev[n];
53
- }
@@ -1,45 +0,0 @@
1
- import type { ResponseSchemaBinding } from "./wire-conformance.js";
2
- /**
3
- * Turn a dispatch RegExp into a MATCH pattern for
4
- * {@link import("./wire-conformance.js").pathMatches}.
5
- *
6
- * Deliberately not the OpenAPI path form: `pathMatches` only asks whether a
7
- * segment is a `{…}` placeholder, so naming the parameter would be decoration
8
- * that has to agree with a second implementation. Cross-reference to the
9
- * generated document goes through the operation NAME, which both sides carry.
10
- */
11
- export declare function routeMatchTemplate(pattern: RegExp): string;
12
- export interface UnschemadRoute {
13
- readonly name: string;
14
- readonly reason: string;
15
- }
16
- /**
17
- * Data-plane routes with NO response schema, and why not.
18
- *
19
- * Every entry is here because a JSON response schema cannot describe what the
20
- * route returns, or because the shape belongs to another package. None is here
21
- * because it was awkward: an empty schema that asserts nothing would be worse
22
- * than this list, since it would inflate the "validated" count with routes
23
- * nothing was checked on.
24
- */
25
- export declare const ROUTES_WITHOUT_RESPONSE_SCHEMA: readonly UnschemadRoute[];
26
- /**
27
- * Routes that HAVE a schema but that no client in this repository can produce.
28
- *
29
- * They will appear in `unexercised` on every run, forever, and that is not a
30
- * gap in test coverage — there is no call site to add a test to. Stated so a
31
- * reader of the report is not misled in the other direction from a false green.
32
- */
33
- export declare const ROUTES_OFF_THE_SDK_SEAM: readonly UnschemadRoute[];
34
- /** Every data-plane route that has a response schema, bound to it. */
35
- export declare const DATA_PLANE_RESPONSE_SCHEMAS: readonly ResponseSchemaBinding[];
36
- /**
37
- * Render the STATIC coverage picture — what could be checked, before a single
38
- * response arrives.
39
- *
40
- * Complements `formatWireConformanceReport`, which renders what actually was.
41
- * Both belong in a suite's output: the dynamic report alone cannot tell a reader
42
- * whether the 40 operations it validated are most of the surface or a third of
43
- * it.
44
- */
45
- export declare function formatResponseSchemaCoverage(): string;
@@ -1,256 +0,0 @@
1
- import { AUTHENTICATED_API_ROUTE_DESCRIPTORS } from "../api-routes.js";
2
- import { NoContentResponseSchema } from "../schemas/response-common.js";
3
- import { AssetFinalizeResponseSchema, AssetMpuAbortResponseSchema, AssetMpuPresignPartsResponseSchema, AssetPresignResponseSchema } from "../schemas/response-assets.js";
4
- import { AdminBillingAccountTypeResponseSchema, AdminBillingPaymentMethodResponseSchema, AdminBillingTopupResponseSchema, BillingAutoTopupResponseSchema, BillingHostedSessionResponseSchema, BillingLedgerResponseSchema, BillingStatementListResponseSchema, BillingSummaryResponseSchema } from "../schemas/response-billing.js";
5
- import { WhoAmIResponseSchema } from "../schemas/response-identity.js";
6
- import { McpServerListResponseSchema, McpServerResponseSchema } from "../schemas/response-mcp-servers.js";
7
- import { SecretListResponseSchema, SecretResponseSchema } from "../schemas/response-secrets.js";
8
- import { AcknowledgedResponseSchema, CoordinatorTicketResponseSchema, EventArchiveLinkResponseSchema, SessionChildrenResponseSchema, SessionDeleteResponseSchema, SessionEnvelopeResponseSchema, SessionEventsPageResponseSchema, SessionFileLinkResponseSchema, SessionFilesResponseSchema, SessionListResponseSchema, SessionMessageAcceptedResponseSchema, SessionMessagesPageResponseSchema, SessionWebhookDeliveriesResponseSchema } from "../schemas/response-sessions.js";
9
- import { ChildFinalizeResponseSchema, ChildResultResponseSchema, SessionOtlpResponseSchema } from "../schemas/response-sessions-internal.js";
10
- import { WebhookSigningSecretResponseSchema, WorkspaceWebhookDeliveriesResponseSchema } from "../schemas/response-webhooks.js";
11
- import { WorkspaceEraseResponseSchema, WorkspaceFilePageResponseSchema, WorkspaceFileResponseSchema, WorkspaceInstructionPageResponseSchema, WorkspaceInstructionResponseSchema, WorkspaceSkillPageResponseSchema, WorkspaceSkillResponseSchema, WorkspaceToolPageResponseSchema, WorkspaceToolResponseSchema } from "../schemas/response-workspace.js";
12
- /**
13
- * Turn a dispatch RegExp into a MATCH pattern for
14
- * {@link import("./wire-conformance.js").pathMatches}.
15
- *
16
- * Deliberately not the OpenAPI path form: `pathMatches` only asks whether a
17
- * segment is a `{…}` placeholder, so naming the parameter would be decoration
18
- * that has to agree with a second implementation. Cross-reference to the
19
- * generated document goes through the operation NAME, which both sides carry.
20
- */
21
- export function routeMatchTemplate(pattern) {
22
- const source = pattern.source
23
- .replace(/^\^/, "")
24
- .replace(/\$$/, "")
25
- // Collapse variable segments BEFORE unescaping: `[^/]+` contains a literal
26
- // `/`, so unescaping first tears the class in two.
27
- .replace(/\[\^\\?\/\]\+/g, "{param}")
28
- .replace(/\\\//g, "/");
29
- return source;
30
- }
31
- /**
32
- * The path the harness sees, which is NOT the path the route table declares.
33
- *
34
- * `api-routes.ts` describes the surface as the lambda dispatches it (`/sessions`);
35
- * every client reaches it under an `/api` prefix, and `HttpClient` reports
36
- * `url.pathname`. The generated OpenAPI document applies the same prefix.
37
- */
38
- const API_PREFIX = "/api";
39
- /**
40
- * Operation name -> the schema its 2xx JSON body must satisfy.
41
- *
42
- * Keyed by name so this table and the route table are joined by the identifier
43
- * both already carry, rather than by a re-stated method and path.
44
- */
45
- const RESPONSE_SCHEMA_BY_OPERATION = {
46
- whoami: WhoAmIResponseSchema,
47
- // Sessions — every state change answers a `{ session }` envelope.
48
- "sessions.create": SessionEnvelopeResponseSchema,
49
- "sessions.get": SessionEnvelopeResponseSchema,
50
- "sessions.suspend": SessionEnvelopeResponseSchema,
51
- "sessions.cancel": SessionEnvelopeResponseSchema,
52
- "sessions.resume": SessionEnvelopeResponseSchema,
53
- "sessions.requestApproval": SessionEnvelopeResponseSchema,
54
- "sessions.approve": SessionEnvelopeResponseSchema,
55
- "sessions.deny": SessionEnvelopeResponseSchema,
56
- "sessions.list": SessionListResponseSchema,
57
- "sessions.sendMessage": SessionMessageAcceptedResponseSchema,
58
- "sessions.delete": SessionDeleteResponseSchema,
59
- "sessions.listMessages": SessionMessagesPageResponseSchema,
60
- "sessions.listEvents": SessionEventsPageResponseSchema,
61
- "sessions.eventsTicket": CoordinatorTicketResponseSchema,
62
- "sessions.listChildren": SessionChildrenResponseSchema,
63
- "sessions.eventArchiveLink": EventArchiveLinkResponseSchema,
64
- "sessions.listFiles": SessionFilesResponseSchema,
65
- "sessions.fileLink": SessionFileLinkResponseSchema,
66
- "sessions.listWebhookDeliveries": SessionWebhookDeliveriesResponseSchema,
67
- "sessions.redeliverWebhook": AcknowledgedResponseSchema,
68
- "sessions.otel": SessionOtlpResponseSchema,
69
- "sessions.childResult": ChildResultResponseSchema,
70
- "sessions.finalize": ChildFinalizeResponseSchema,
71
- // Assets.
72
- "assets.presign": AssetPresignResponseSchema,
73
- "assets.finalize": AssetFinalizeResponseSchema,
74
- "assets.mpuPresignParts": AssetMpuPresignPartsResponseSchema,
75
- "assets.mpuAbort": AssetMpuAbortResponseSchema,
76
- "assets.delete": NoContentResponseSchema,
77
- // Versioned workspace resources.
78
- "workspace.files.publish": WorkspaceFileResponseSchema,
79
- "workspace.files.get": WorkspaceFileResponseSchema,
80
- "workspace.files.list": WorkspaceFilePageResponseSchema,
81
- "workspace.files.delete": NoContentResponseSchema,
82
- "workspace.skills.publish": WorkspaceSkillResponseSchema,
83
- "workspace.skills.get": WorkspaceSkillResponseSchema,
84
- "workspace.skills.list": WorkspaceSkillPageResponseSchema,
85
- "workspace.skills.delete": NoContentResponseSchema,
86
- "workspace.tools.publish": WorkspaceToolResponseSchema,
87
- "workspace.tools.get": WorkspaceToolResponseSchema,
88
- "workspace.tools.list": WorkspaceToolPageResponseSchema,
89
- "workspace.tools.delete": NoContentResponseSchema,
90
- "workspace.instructions.publish": WorkspaceInstructionResponseSchema,
91
- "workspace.instructions.get": WorkspaceInstructionResponseSchema,
92
- "workspace.instructions.list": WorkspaceInstructionPageResponseSchema,
93
- "workspace.instructions.delete": NoContentResponseSchema,
94
- // Workspace secret store.
95
- "secrets.create": SecretResponseSchema,
96
- "secrets.get": SecretResponseSchema,
97
- "secrets.rotate": SecretResponseSchema,
98
- "secrets.list": SecretListResponseSchema,
99
- "secrets.delete": NoContentResponseSchema,
100
- // Workspace MCP server config.
101
- "mcpServers.create": McpServerResponseSchema,
102
- "mcpServers.get": McpServerResponseSchema,
103
- "mcpServers.list": McpServerListResponseSchema,
104
- "mcpServers.delete": NoContentResponseSchema,
105
- // Billing.
106
- "billing.get": BillingSummaryResponseSchema,
107
- "billing.ledger": BillingLedgerResponseSchema,
108
- "billing.topupCheckout": BillingHostedSessionResponseSchema,
109
- "billing.autoTopup": BillingAutoTopupResponseSchema,
110
- "billing.statements": BillingStatementListResponseSchema,
111
- "billing.portal": BillingHostedSessionResponseSchema,
112
- "adminBilling.topup": AdminBillingTopupResponseSchema,
113
- "adminBilling.paymentMethod": AdminBillingPaymentMethodResponseSchema,
114
- "adminBilling.accountType": AdminBillingAccountTypeResponseSchema,
115
- // Workspace webhooks and GDPR erase.
116
- "webhook.signingSecret": WebhookSigningSecretResponseSchema,
117
- "webhook.listDeliveries": WorkspaceWebhookDeliveriesResponseSchema,
118
- "workspaces.erase": WorkspaceEraseResponseSchema
119
- };
120
- /**
121
- * Data-plane routes with NO response schema, and why not.
122
- *
123
- * Every entry is here because a JSON response schema cannot describe what the
124
- * route returns, or because the shape belongs to another package. None is here
125
- * because it was awkward: an empty schema that asserts nothing would be worse
126
- * than this list, since it would inflate the "validated" count with routes
127
- * nothing was checked on.
128
- */
129
- export const ROUTES_WITHOUT_RESPONSE_SCHEMA = [
130
- {
131
- name: "sessions.downloadFile",
132
- reason: "Not JSON on success: a small file is 200 raw bytes with the FILE's own content-type, " +
133
- "a large one is a 302 to presigned storage."
134
- },
135
- {
136
- name: "sessions.archiveInternal",
137
- reason: "Not JSON on success: 302 with an empty body and content-type application/zip."
138
- },
139
- {
140
- name: "runtime.writerAuthority",
141
- reason: "204 with no body and no headers at all, and writer-token only — it is a liveness probe " +
142
- "for the writer baton, not a bearer/SDK surface."
143
- },
144
- {
145
- name: "runtime.journalCommit",
146
- reason: "Writer-token only, and its 200 body is the platform's journal control-item shape " +
147
- "(lambda-runtime-contracts), not a shape this package declares. Three of its six ops " +
148
- "answer 204 with no body."
149
- },
150
- {
151
- name: "billing.statement",
152
- reason: "Not always JSON: the single statement is content-negotiated — `application/pdf` and " +
153
- "`text/plain` renders of the same document alongside the JSON default — and the JSON " +
154
- "body's `document` is the platform's stored render, not a shape this package declares. " +
155
- "The LIST at `billing.statements` is plain JSON and IS bound."
156
- }
157
- ];
158
- /**
159
- * Routes that HAVE a schema but that no client in this repository can produce.
160
- *
161
- * They will appear in `unexercised` on every run, forever, and that is not a
162
- * gap in test coverage — there is no call site to add a test to. Stated so a
163
- * reader of the report is not misled in the other direction from a false green.
164
- */
165
- export const ROUTES_OFF_THE_SDK_SEAM = [
166
- {
167
- name: "sessions.otel",
168
- reason: "`getSessionOtlpPage` reads the body through `HttpClient.download()`, which reports only " +
169
- "its FAILURES to the wire observer — its 2xx body is handed back as a `Response` for the " +
170
- "caller to read, and reporting it would mean cloning every download. Its error envelope " +
171
- "IS checked; its success body is what stays unobserved."
172
- },
173
- {
174
- name: "sessions.childResult",
175
- reason: "Writer-token only; called by the in-container subagent runtime, not by `HttpClient`."
176
- },
177
- {
178
- name: "sessions.finalize",
179
- reason: "Writer-token only; the child-settle hop, called from inside the runtime."
180
- },
181
- {
182
- name: "mcpServers.create",
183
- reason: "No client function exists in `operations.ts` — the dashboard BFF reaches it directly."
184
- },
185
- { name: "mcpServers.list", reason: "No client function exists in `operations.ts`." },
186
- { name: "mcpServers.get", reason: "No client function exists in `operations.ts`." },
187
- { name: "mcpServers.delete", reason: "No client function exists in `operations.ts`." },
188
- {
189
- name: "webhook.listDeliveries",
190
- reason: "No client function exists in `operations.ts`; only the session-scoped " +
191
- "`sessions.listWebhookDeliveries` has one."
192
- },
193
- {
194
- name: "billing.statements",
195
- reason: "No client function exists in `operations.ts`. The descriptor is what makes the route " +
196
- "reachable at all — the platform 404s an undeclared path before its handler ladder runs — " +
197
- "and the dashboard reaches it directly."
198
- },
199
- { name: "adminBilling.topup", reason: "Operator route; no client function in `operations.ts`." },
200
- {
201
- name: "adminBilling.paymentMethod",
202
- reason: "Operator route; no client function in `operations.ts`."
203
- },
204
- {
205
- name: "adminBilling.accountType",
206
- reason: "Operator route; no client function in `operations.ts`."
207
- },
208
- {
209
- name: "workspaces.erase",
210
- reason: "No DATA-plane client function. `deleteWorkspace()` in `operations.ts` calls the " +
211
- "identically-shaped CONTROL-plane path — see the plane-collision note above."
212
- }
213
- ];
214
- function bindingFor(descriptor) {
215
- const schema = RESPONSE_SCHEMA_BY_OPERATION[descriptor.name];
216
- if (schema === undefined) {
217
- return undefined;
218
- }
219
- return {
220
- method: descriptor.method.toUpperCase(),
221
- path: `${API_PREFIX}${routeMatchTemplate(descriptor.pattern)}`,
222
- name: descriptor.name,
223
- schema
224
- };
225
- }
226
- /** Every data-plane route that has a response schema, bound to it. */
227
- export const DATA_PLANE_RESPONSE_SCHEMAS = AUTHENTICATED_API_ROUTE_DESCRIPTORS.flatMap((descriptor) => {
228
- const binding = bindingFor(descriptor);
229
- return binding === undefined ? [] : [binding];
230
- });
231
- /**
232
- * Render the STATIC coverage picture — what could be checked, before a single
233
- * response arrives.
234
- *
235
- * Complements `formatWireConformanceReport`, which renders what actually was.
236
- * Both belong in a suite's output: the dynamic report alone cannot tell a reader
237
- * whether the 40 operations it validated are most of the surface or a third of
238
- * it.
239
- */
240
- export function formatResponseSchemaCoverage() {
241
- const total = AUTHENTICATED_API_ROUTE_DESCRIPTORS.length;
242
- const bound = DATA_PLANE_RESPONSE_SCHEMAS.length;
243
- const lines = [
244
- `response schemas: ${bound}/${total} data-plane route(s) have one`,
245
- ` NO SCHEMA (${ROUTES_WITHOUT_RESPONSE_SCHEMA.length}):`
246
- ];
247
- for (const route of ROUTES_WITHOUT_RESPONSE_SCHEMA) {
248
- lines.push(` - ${route.name}: ${route.reason}`);
249
- }
250
- lines.push(` SCHEMA BUT UNREACHABLE from any client in this repo — expect these in ` +
251
- `"NOT EXERCISED" forever (${ROUTES_OFF_THE_SDK_SEAM.length}):`);
252
- for (const route of ROUTES_OFF_THE_SDK_SEAM) {
253
- lines.push(` - ${route.name}: ${route.reason}`);
254
- }
255
- return lines.join("\n");
256
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * The minimal C4 entrypoint copied into the SDK's private inlined contracts.
3
- *
4
- * Keep the broader `@aexhq/contracts/testing` kit out of customer packages;
5
- * live user tests only need the response schemas and observer installer.
6
- */
7
- export { installWireConformance, formatWireConformanceReport, mergeWireConformanceReports, pathMatches, wireOrigin } from "./wire-conformance.js";
8
- export type { ResponseSchemaBinding, WireConformanceOptions, WireConformanceReport, WireConformanceViolation } from "./wire-conformance.js";
9
- export { DATA_PLANE_RESPONSE_SCHEMAS, ROUTES_WITHOUT_RESPONSE_SCHEMA, ROUTES_OFF_THE_SDK_SEAM, formatResponseSchemaCoverage } from "./response-bindings.js";
10
- export type { UnschemadRoute } from "./response-bindings.js";
@@ -1,8 +0,0 @@
1
- /**
2
- * The minimal C4 entrypoint copied into the SDK's private inlined contracts.
3
- *
4
- * Keep the broader `@aexhq/contracts/testing` kit out of customer packages;
5
- * live user tests only need the response schemas and observer installer.
6
- */
7
- export { installWireConformance, formatWireConformanceReport, mergeWireConformanceReports, pathMatches, wireOrigin } from "./wire-conformance.js";
8
- export { DATA_PLANE_RESPONSE_SCHEMAS, ROUTES_WITHOUT_RESPONSE_SCHEMA, ROUTES_OFF_THE_SDK_SEAM, formatResponseSchemaCoverage } from "./response-bindings.js";
@@ -1,169 +0,0 @@
1
- /**
2
- * C4 — the wire-conformance harness.
3
- *
4
- * Validates the bytes a real server actually returned against the response
5
- * schemas. This is the only gate in the contract pipeline that observes reality
6
- * rather than comparing two of our own artefacts to each other, and it is the
7
- * one the plan flags as easiest to skip and most costly to skip.
8
- *
9
- * It attaches to `HttpClient` through {@link observeWireResponses}, so every
10
- * response the live and user-test suites already receive is checked — no new
11
- * suite, no new requests, no server changes.
12
- *
13
- * **Coverage is reported, not assumed.** A green run over 12 of 120 routes is
14
- * not a verified surface, and calling it one is the specific failure this
15
- * harness exists to prevent. {@link WireConformanceReport} names the routes that
16
- * were checked, the routes that have a schema but were never exercised, the
17
- * responses that arrived with no schema to check them against, and the responses
18
- * that were deliberately skipped because they came from another plane.
19
- *
20
- * ## What it checks, and what it used to miss
21
- *
22
- * - **2xx bodies** against the operation's response schema.
23
- * - **non-2xx bodies** against {@link ApiErrorEnvelopeSchema}. Every generated
24
- * operation declares that envelope, and until `HttpClient` learned to report
25
- * before it throws, nothing had ever checked it.
26
- *
27
- * ## The plane collision, and how it is closed
28
- *
29
- * A PATH does not identify a route. The control plane serves different bodies at
30
- * two of the data plane's paths (`GET /api/whoami`,
31
- * `DELETE /api/workspaces/{id}`), so a process driving both planes — the CLI
32
- * does, `aex login` is control-plane — would validate a control-plane body
33
- * against a data-plane schema and report a violation that is not one.
34
- * {@link WireResponse} therefore carries the ORIGIN it came from, and
35
- * {@link WireConformanceOptions.origin} says which plane the bindings describe.
36
- * Responses from anywhere else are counted and named under
37
- * {@link WireConformanceReport.offPlane} rather than silently dropped.
38
- *
39
- * Installing WITHOUT an origin is still allowed, because a data-plane-only suite
40
- * has nothing to collide with — but the report says so in as many words, so a
41
- * reader can tell a filtered run from an unfiltered one.
42
- */
43
- import type { StandardSchemaV1 } from "@standard-schema/spec";
44
- /** A response schema bound to the route whose responses it describes. */
45
- export interface ResponseSchemaBinding {
46
- /** Uppercase HTTP method. */
47
- readonly method: string;
48
- /**
49
- * Path pattern with `{param}` placeholders, matched segment-wise:
50
- * `/api/sessions/{sessionId}/messages`.
51
- */
52
- readonly path: string;
53
- /** Operation id, used in the report. */
54
- readonly name: string;
55
- readonly schema: StandardSchemaV1;
56
- }
57
- export interface WireConformanceOptions {
58
- /**
59
- * The plane the bindings describe, as an origin or any URL on it —
60
- * `https://dev-api.aex.dev`, or the `AEX_API_URL` the suite already reads.
61
- *
62
- * Responses from any other origin are recorded in
63
- * {@link WireConformanceReport.offPlane} and NOT validated. Omit only when the
64
- * process provably drives one plane; the report states which case it was.
65
- */
66
- readonly origin?: string | undefined;
67
- /**
68
- * Schema for non-2xx bodies. Defaults to {@link ApiErrorEnvelopeSchema} — the
69
- * shape the generated document declares as every operation's `default`
70
- * response. Pass `null` to stop checking error bodies, which throws away the
71
- * only assertion that covers 68 declared-but-unchecked responses; there is no
72
- * good reason to.
73
- */
74
- readonly errorEnvelope?: StandardSchemaV1 | null;
75
- }
76
- export interface WireConformanceViolation {
77
- /**
78
- * Which contract was broken: the operation's own 2xx schema, or the error
79
- * envelope every operation declares.
80
- */
81
- readonly kind: "response" | "error-envelope";
82
- /** Operation id, or `METHOD /path` when no binding matched. */
83
- readonly name: string;
84
- readonly method: string;
85
- readonly origin: string;
86
- readonly path: string;
87
- readonly status: number;
88
- readonly issues: readonly string[];
89
- /**
90
- * The body that failed, verbatim.
91
- *
92
- * Carried because a complaint without the bytes that caused it cannot be
93
- * triaged — the reader has to be able to tell a server defect from a schema
94
- * defect, and only the actual body settles that.
95
- */
96
- readonly body: unknown;
97
- }
98
- export interface WireConformanceReport {
99
- /**
100
- * The origin responses were required to come from, or `undefined` when the
101
- * harness was installed without a plane filter.
102
- */
103
- readonly originFilter: string | undefined;
104
- /** Operation ids whose 2xx responses were seen and validated. */
105
- readonly validated: readonly string[];
106
- /** Operation ids with a response schema that no request exercised. */
107
- readonly unexercised: readonly string[];
108
- /** `METHOD /path` for responses that arrived with no schema bound. */
109
- readonly unschemad: readonly string[];
110
- /** `METHOD /path -> status` for non-2xx bodies checked against the envelope. */
111
- readonly errorsValidated: readonly string[];
112
- /** `origin METHOD /path` for responses from a plane these bindings do not describe. */
113
- readonly offPlane: readonly string[];
114
- readonly violations: readonly WireConformanceViolation[];
115
- /** Responses observed in total, including ones with no schema and off-plane ones. */
116
- readonly observed: number;
117
- }
118
- /**
119
- * Match a concrete path against a `{param}` pattern.
120
- *
121
- * Segment-wise rather than by regex so a placeholder cannot accidentally span a
122
- * `/` and make two different routes look like one.
123
- */
124
- export declare function pathMatches(pattern: string, actual: string): boolean;
125
- /**
126
- * Reduce whatever the caller had to hand — a base URL, a URL with a path, a bare
127
- * origin — to the origin `WireResponse` reports.
128
- *
129
- * Throws rather than falling back to "match everything": an unparseable
130
- * `AEX_API_URL` that silently disabled the filter would reintroduce exactly the
131
- * false violations the filter exists to prevent, and would do it quietly.
132
- */
133
- export declare function wireOrigin(baseUrl: string): string;
134
- /**
135
- * Start validating responses.
136
- *
137
- * Returns a handle carrying the report and a `stop()`. Validation is
138
- * synchronous: a schema whose `~standard.validate` returns a promise is treated
139
- * as unvalidatable and recorded as such rather than silently skipped, because
140
- * `HttpClient` cannot await an observer without changing request timing.
141
- */
142
- export declare function installWireConformance(bindings: readonly ResponseSchemaBinding[], options?: WireConformanceOptions): {
143
- readonly report: () => WireConformanceReport;
144
- readonly stop: () => void;
145
- };
146
- /**
147
- * Fold reports from several processes into one.
148
- *
149
- * The suites that matter drive the SDK out of process — one bun child per
150
- * scenario, one test process per file — so no single process sees the whole
151
- * surface, and a per-process report would understate coverage by construction.
152
- *
153
- * `unexercised` is INTERSECTED, not concatenated: a name is unexercised overall
154
- * only when every fragment failed to exercise it. Concatenating would report a
155
- * route as unexercised because some other process did not happen to call it,
156
- * which is the mirror image of the false-green this harness exists to prevent.
157
- * That identity only holds when every fragment was produced from the same
158
- * binding table; {@link installWireConformance} is the only producer.
159
- */
160
- export declare function mergeWireConformanceReports(reports: readonly WireConformanceReport[]): WireConformanceReport;
161
- /**
162
- * Render the report for a suite's output.
163
- *
164
- * Always prints the unexercised and unschemad lists, including when there are no
165
- * violations — a run that reports only "0 violations" invites the reader to
166
- * conclude the surface is verified. A violation always prints the BODY that
167
- * caused it as well as the schema's complaint, because triage needs both.
168
- */
169
- export declare function formatWireConformanceReport(report: WireConformanceReport): string;