@reclaimprotocol/agent 0.1.23 → 0.1.25

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 (149) hide show
  1. package/README.md +56 -20
  2. package/lib/authoring/backend.d.ts +5 -4
  3. package/lib/authoring/tools.js +30 -30
  4. package/lib/cdp/capture-engine.js +8 -7
  5. package/lib/cdp/claims.d.ts +21 -0
  6. package/lib/cdp/claims.js +129 -0
  7. package/lib/cdp/container.d.ts +85 -0
  8. package/lib/cdp/container.js +481 -0
  9. package/lib/cdp/geo.d.ts +10 -0
  10. package/lib/cdp/geo.js +36 -0
  11. package/lib/cdp/index.d.ts +1 -0
  12. package/lib/cdp/index.js +1 -0
  13. package/lib/live/cloudflared.d.ts +15 -0
  14. package/lib/live/cloudflared.js +268 -0
  15. package/lib/live/tunnel.d.ts +26 -0
  16. package/lib/live/tunnel.js +160 -0
  17. package/lib/mcp/api/operations.gen.js +34 -26
  18. package/lib/mcp/api/to-zod.d.ts +1 -1
  19. package/lib/mcp/api/to-zod.js +1 -1
  20. package/lib/mcp/api/tools.js +1 -1
  21. package/lib/mcp/instructions.d.ts +15 -2
  22. package/lib/mcp/instructions.js +102 -38
  23. package/lib/mcp/start.js +62 -6
  24. package/lib/mcp/tools/agent/analyze.js +5 -1
  25. package/lib/mcp/tools/agent/attach.d.ts +29 -2
  26. package/lib/mcp/tools/agent/attach.js +310 -24
  27. package/lib/mcp/tools/agent/build.d.ts +18 -8
  28. package/lib/mcp/tools/agent/build.js +30 -12
  29. package/lib/mcp/tools/agent/capture.js +5 -1
  30. package/lib/mcp/tools/agent/eval.js +3 -1
  31. package/lib/mcp/tools/agent/find.js +6 -5
  32. package/lib/mcp/tools/agent/how-it-works.d.ts +15 -7
  33. package/lib/mcp/tools/agent/how-it-works.js +57 -17
  34. package/lib/mcp/tools/agent/index.d.ts +1 -2
  35. package/lib/mcp/tools/agent/index.js +1 -1
  36. package/lib/mcp/tools/agent/live-view.d.ts +17 -0
  37. package/lib/mcp/tools/agent/live-view.js +146 -0
  38. package/lib/mcp/tools/agent/pod-proof.d.ts +8 -0
  39. package/lib/mcp/tools/agent/pod-proof.js +64 -0
  40. package/lib/mcp/tools/agent/propose.js +4 -2
  41. package/lib/mcp/tools/agent/publish.js +47 -77
  42. package/lib/mcp/tools/agent/session.d.ts +16 -1
  43. package/lib/mcp/tools/agent/session.js +32 -7
  44. package/lib/mcp/tools/authenticate/authenticate.js +26 -13
  45. package/lib/mcp/tools/mode/mode.d.ts +1 -1
  46. package/lib/mcp/tools/mode/mode.js +10 -22
  47. package/lib/old/client.d.ts +1 -1
  48. package/lib/old/client.js +1 -1
  49. package/lib/old/instructions.d.ts +9 -1
  50. package/lib/old/instructions.js +4 -6
  51. package/lib/old/login-cdp.d.ts +2 -2
  52. package/lib/old/login-cdp.js +46 -6
  53. package/lib/old/to-register.d.ts +3 -2
  54. package/lib/old/to-register.js +1 -1
  55. package/lib/old/tools/authenticate.js +9 -1
  56. package/lib/old/tools/get-provider-info.js +6 -5
  57. package/lib/old/tools/issue-app-credentials.js +3 -2
  58. package/lib/old/tools/publish.d.ts +1 -1
  59. package/lib/old/tools/publish.js +90 -131
  60. package/lib/old/tools/update-provider-metadata.d.ts +1 -1
  61. package/lib/old/tools/update-provider-metadata.js +1 -1
  62. package/lib/old/tools/verify-sdk-setup.js +1 -1
  63. package/lib/proof/attestor.d.ts +3 -3
  64. package/lib/proof/debug-response-dump.js +4 -4
  65. package/lib/proof/index.d.ts +1 -0
  66. package/lib/proof/index.js +1 -0
  67. package/lib/proof/page-replay.d.ts +1 -1
  68. package/lib/proof/page-replay.js +1 -1
  69. package/lib/proof/pod-prover.d.ts +47 -0
  70. package/lib/proof/pod-prover.js +155 -0
  71. package/lib/provider/dom-xpath.js +11 -9
  72. package/lib/provider/draft.d.ts +10 -7
  73. package/lib/provider/draft.js +11 -9
  74. package/lib/provider/injection-doc.d.ts +23 -1
  75. package/lib/provider/injection-doc.js +34 -21
  76. package/lib/provider/match-redaction-warning.d.ts +2 -2
  77. package/lib/provider/match-redaction-warning.js +3 -3
  78. package/lib/provider/matcher.js +13 -12
  79. package/lib/provider/secrets.d.ts +3 -3
  80. package/lib/provider/secrets.js +3 -3
  81. package/lib/provider/to-version.d.ts +7 -6
  82. package/lib/provider/to-version.js +3 -3
  83. package/lib/tools/registry.d.ts +5 -5
  84. package/lib/tools/registry.js +5 -5
  85. package/package.json +3 -3
  86. package/samples/demo-server/README.md +7 -6
  87. package/skill/SKILL.builder.md +356 -189
  88. package/skill/SKILL.common.md +400 -97
  89. package/skill/SKILL.old.md +340 -155
  90. package/skill/builder-mode.md +60 -17
  91. package/skill/hash-validation.md +170 -0
  92. package/skill/interception.md +236 -0
  93. package/skill/js-sdk-integration.md +13 -7
  94. package/skill/old-mode.md +62 -21
  95. package/skill/user-script.md +61 -0
  96. package/src/authoring/backend.ts +5 -4
  97. package/src/authoring/tools.ts +31 -30
  98. package/src/cdp/capture-engine.ts +8 -7
  99. package/src/cdp/claims.ts +153 -0
  100. package/src/cdp/container.ts +593 -0
  101. package/src/cdp/geo.ts +52 -0
  102. package/src/cdp/index.ts +1 -0
  103. package/src/consts.ts +1 -0
  104. package/src/live/cloudflared.ts +348 -0
  105. package/src/live/tunnel.ts +208 -0
  106. package/src/mcp/api/operations.gen.ts +34 -26
  107. package/src/mcp/api/to-zod.ts +1 -1
  108. package/src/mcp/api/tools.ts +1 -1
  109. package/src/mcp/instructions.ts +122 -48
  110. package/src/mcp/start.ts +69 -5
  111. package/src/mcp/tools/agent/analyze.ts +5 -1
  112. package/src/mcp/tools/agent/attach.ts +367 -26
  113. package/src/mcp/tools/agent/build.ts +35 -16
  114. package/src/mcp/tools/agent/capture.ts +5 -1
  115. package/src/mcp/tools/agent/eval.ts +4 -1
  116. package/src/mcp/tools/agent/find.ts +6 -5
  117. package/src/mcp/tools/agent/how-it-works.ts +62 -21
  118. package/src/mcp/tools/agent/index.ts +6 -2
  119. package/src/mcp/tools/agent/live-view.ts +182 -0
  120. package/src/mcp/tools/agent/pod-proof.ts +90 -0
  121. package/src/mcp/tools/agent/propose.ts +4 -2
  122. package/src/mcp/tools/agent/publish.ts +52 -77
  123. package/src/mcp/tools/agent/session.ts +33 -6
  124. package/src/mcp/tools/authenticate/authenticate.ts +28 -13
  125. package/src/mcp/tools/mode/mode.ts +10 -22
  126. package/src/old/client.ts +2 -2
  127. package/src/old/instructions.ts +4 -10
  128. package/src/old/login-cdp.ts +50 -6
  129. package/src/old/to-register.ts +3 -2
  130. package/src/old/tools/authenticate.ts +9 -1
  131. package/src/old/tools/get-provider-info.ts +6 -5
  132. package/src/old/tools/issue-app-credentials.ts +3 -2
  133. package/src/old/tools/publish.ts +95 -131
  134. package/src/old/tools/update-provider-metadata.ts +1 -1
  135. package/src/old/tools/verify-sdk-setup.ts +1 -1
  136. package/src/proof/attestor.ts +3 -3
  137. package/src/proof/debug-response-dump.ts +4 -4
  138. package/src/proof/index.ts +8 -0
  139. package/src/proof/page-replay.ts +1 -1
  140. package/src/proof/pod-prover.ts +231 -0
  141. package/src/provider/dom-xpath.ts +11 -9
  142. package/src/provider/draft.ts +13 -10
  143. package/src/provider/injection-doc.ts +37 -24
  144. package/src/provider/match-redaction-warning.ts +3 -3
  145. package/src/provider/matcher.ts +13 -12
  146. package/src/provider/secrets.ts +3 -3
  147. package/src/provider/to-version.ts +11 -9
  148. package/src/tools/registry.ts +5 -5
  149. package/skill/injection-api.md +0 -364
@@ -1,7 +1,10 @@
1
1
  import { Boom, isBoom } from '@hapi/boom'
2
2
  import { defineTool, type RegisteredTool } from '../../mcp/server.ts'
3
3
  import type { AttachState } from '../../mcp/tools/agent/attach.ts'
4
- import { INJECTION_GUIDE } from '../../provider/injection-doc.ts'
4
+ import {
5
+ ALLOWED_REQUESTS_HINT,
6
+ USER_SCRIPT_HINT,
7
+ } from '../../provider/injection-doc.ts'
5
8
  import {
6
9
  countsFor,
7
10
  matchRedactionWarnings,
@@ -35,8 +38,8 @@ function extractProviderId(resp: unknown): string | undefined {
35
38
  * `providerId` for a public provider (or anyone else's) comes back as
36
39
  * 401/403/404 — the dev's likely intent is to publish their OWN version of that
37
40
  * site, which on this backend means registering a separate copy. Rethrow those
38
- * failures with that actionable suggestion; leave other errors (e.g. a 400
39
- * version collision) untouched so their real detail surfaces.
41
+ * failures with that actionable suggestion; leave other errors (for example, a
42
+ * 400 version collision) untouched so their real detail surfaces.
40
43
  */
41
44
  function rethrowOwnershipError(err: unknown, providerId: string): never {
42
45
  const status = isBoom(err) ? err.output.statusCode : undefined
@@ -62,7 +65,7 @@ function rethrowOwnershipError(err: unknown, providerId: string): never {
62
65
  /**
63
66
  * Publish a drafted provider to the OLD devtools backend. Keeps the builder
64
67
  * tool NAME (`create_provider_version_from_capture`) so the skill flow is
65
- * unchanged, but the behaviour differs:
68
+ * unchanged, but the behavior differs:
66
69
  *
67
70
  * - WITHOUT `providerId` → `POST /api/providers/register`: creates a
68
71
  * brand-new provider + version 1.0.0. Re-running creates a DUPLICATE.
@@ -100,67 +103,43 @@ export function createVersionFromCaptureTool(
100
103
  useIncognitoWebview?: boolean
101
104
  extensionConfig?: unknown
102
105
  injectionType?: 'NONE' | 'MSWJS' | 'XHOOK' | 'CDP' | 'HAWKEYE'
106
+ disableRequestReplay?: boolean
103
107
  }>(
104
108
  {
105
109
  name: 'create_provider_version_from_capture',
106
110
  description:
107
- 'Publish drafted ReclaimProvider(s) to the devtools backend. ' +
108
- 'Requires its OWN old-devtools login via reclaim_authenticate — ' +
109
- 'separate from authenticate_builder/Builder auth, which does not ' +
110
- 'authorize this call. Check status with get_devtools_mode. \n\n' +
111
- 'Pass the `provider` object from propose_provider VERBATIM and the ' +
112
- '`initialUrl` the user landed on (the login/landing page, NOT the ' +
113
- 'API url). \n\n' +
114
- 'For a MULTI-REQUEST provider, pass `providers: [...]` (each entry a ' +
115
- 'proven draft from propose_provider) — every entry becomes one ' +
116
- '`requestData` entry on the SAME version, and all are verified ' +
117
- 'together. Pass a single `provider` for the one-request case ' +
118
- '(provide exactly one of `provider` / `providers`). \n\n' +
119
- 'Omit `providerId` to REGISTER A NEW provider (creates it + version ' +
120
- '1.0.0; re-running creates a duplicate). Pass `providerId` (from ' +
121
- 'get_me_providers) to add a NEW VERSION to that existing provider ' +
122
- '(the patch is auto-bumped). \n\n' +
123
- 'You can only add versions to a provider YOU own — the `providerId` ' +
124
- 'must come from get_me_providers. To publish your own version of a ' +
125
- "PUBLIC provider you don't own, omit `providerId` to register your " +
126
- 'own copy (you cannot edit someone else\'s provider here). \n\n' +
127
- 'For data gated behind login/navigation, pass `customInjection` — a ' +
128
- 'USER SCRIPT (same concept as the builder\'s `jsUserScripts` — ' +
129
- 'devtools just calls the field `customInjection`) that drives the ' +
130
- 'page to where the request fires. \n\n' +
131
- 'BY DESIGN, this backend only ever CREATES A NEW VERSION (POST) — ' +
132
- 'there is no partial-patch/edit endpoint, and this tool does NOT ' +
133
- 'read or carry anything forward from the previous version. Every ' +
134
- 'new version replaces the WHOLE providerConfig with exactly what ' +
135
- 'you pass in THIS call. Therefore any field you want present in the ' +
136
- 'new version MUST be supplied here — `customInjection`, `userAgent`, ' +
137
- '`pageTitle`, `allowedInjectedRequestData`, `stepsToFollow`, ' +
138
- '`useIncognitoWebview`, `extensionConfig`, and `requestData` (via ' +
139
- '`provider`/`providers`). Anything you OMIT is published blank/' +
140
- 'default in the new version, NOT preserved. To change one field ' +
141
- 'while keeping the rest, first read the current version with ' +
142
- 'get_provider_info, then pass the full desired config (the existing ' +
143
- 'values plus your change) back into this call. ' +
144
- '`allowedInjectedRequestData`/`useIncognitoWebview`/' +
145
- '`extensionConfig` only take effect on add-version — the register ' +
146
- 'endpoint (no `providerId`) ignores them, so on a fresh register ' +
147
- 'this tool automatically follows up with an add-version call that ' +
148
- 'applies them (also where document replay gets force-disabled — ' +
149
- 'see below). Per-request fields you may set on ' +
150
- '`provider`/`providers`: `credentials` (omit/same-origin/include, ' +
151
- 'default include), `urlType` (REGEX/CONSTANT/TEMPLATE, default ' +
152
- 'derived from {{placeholders}}), and `isOptional` on each ' +
153
- 'responseMatch (default false). \n\n' +
154
- 'Captured requests must be GET/POST. OPRF redactions are supported. ' +
155
- 'Document replay — the HAWKEYE-level flag controlling whether the ' +
156
- 'page\'s own document/navigation request gets genuinely re-sent ' +
157
- 'through the interceptor at verification time — is ALWAYS ' +
158
- 'published disabled (`disableRequestReplay: true`); there is no ' +
159
- 'way to enable it here. ' +
160
- 'On success, if a browser is still attached, the response\'s ' +
161
- '`_notes` reminds you to confirm with the developer before ' +
162
- 'calling `dispose_browser` — never close it unprompted, they ' +
163
- 'may want it for further edits.',
111
+ 'Publish drafted ReclaimProvider(s) to the devtools backend. Needs '
112
+ + 'its OWN reclaim_authenticate login — authenticate_builder does NOT '
113
+ + 'authorize this call. Pass the `provider` object(s) from '
114
+ + 'propose_provider VERBATIM, plus the `initialUrl` the user landed '
115
+ + 'on (the login/landing page, NOT the API url). Exactly one of '
116
+ + '`provider` (one request) or `providers` (a multi-request '
117
+ + 'provider — every entry becomes a parallel requestData entry, all '
118
+ + 'verified together). Captured requests must be GET/POST; OPRF '
119
+ + 'redactions are supported.\n\n'
120
+ + 'Omit `providerId` to REGISTER A NEW provider (creates it + '
121
+ + 'version 1.0.0 — re-running creates a DUPLICATE). Pass '
122
+ + '`providerId` (from get_me_providers) to add a NEW VERSION to it; '
123
+ + 'the patch auto-bumps. You can only version a provider YOU own — '
124
+ + 'to publish your own take on one you don\'t own, omit '
125
+ + '`providerId` to register your own copy.\n\n'
126
+ + 'THIS BACKEND ONLY EVER CREATES A NEW VERSION — there is no '
127
+ + 'partial-patch endpoint, and this tool carries NOTHING forward '
128
+ + 'from the previous version: every version replaces the WHOLE '
129
+ + 'providerConfig with exactly what you pass in THIS call. Any '
130
+ + 'field you want to survive must be re-supplied here '
131
+ + '(`customInjection`, `userAgent`, `pageTitle`, '
132
+ + '`allowedInjectedRequestData`, `stepsToFollow`, '
133
+ + '`useIncognitoWebview`, `extensionConfig`, `requestData`); '
134
+ + 'anything omitted is published blank. To change one field, read '
135
+ + 'the current config with get_provider_info first and pass it back '
136
+ + 'with your edit. `allowedInjectedRequestData`/'
137
+ + '`useIncognitoWebview`/`extensionConfig` apply on add-version '
138
+ + 'only, so a fresh register auto-follows with an add-version call '
139
+ + 'that applies them (and disables document replay — see '
140
+ + '`disableRequestReplay`).\n\n'
141
+ + 'Always read the response\'s `_notes`. '
142
+ + 'Full walkthrough: how_it_works({ topic: "publish" }).',
164
143
  inputSchema: {
165
144
  type: 'object',
166
145
  properties: {
@@ -272,15 +251,11 @@ export function createVersionFromCaptureTool(
272
251
  customInjection: {
273
252
  type: 'string',
274
253
  description:
275
- 'Plain JavaScript injected into the provider page before every ' +
276
- 'page load — old-devtools\' name for what the builder calls ' +
277
- '`webSettings.jsUserScripts`. Use standard browser APIs ' +
278
- '(window.location, element.click(), forms) to drive login/' +
279
- 'navigation so the target request fires — window.Reclaim is ' +
280
- 'only for rare edge cases, not navigation. The backend rejects ' +
281
- 'a few deprecated injection APIs (e.g. window.payloadData, ' +
282
- 'window.ReclaimInjected) with a 400. Guide:\n\n' +
283
- INJECTION_GUIDE,
254
+ USER_SCRIPT_HINT
255
+ + ' Old-devtools\' name for what the builder calls '
256
+ + 'webSettings.jsUserScripts. The backend rejects a few '
257
+ + 'deprecated injection APIs (window.payloadData, '
258
+ + 'window.ReclaimInjected) with a 400.',
284
259
  },
285
260
  userAgent: {
286
261
  type: 'object',
@@ -299,39 +274,15 @@ export function createVersionFromCaptureTool(
299
274
  allowedInjectedRequestData: {
300
275
  type: 'array',
301
276
  description:
302
- 'Extra requests the customInjection script is allowed to ' +
303
- 'fire (e.g. pagination) — add-version ONLY, the register ' +
304
- 'endpoint ignores this. Each item has the same shape as ' +
305
- '`provider`, plus `multiple`/`required` (default true). ' +
306
- 'IMPORTANT whenever a claim\'s request HAS a body: set `body` ' +
307
- 'here (see its own description below) — if only a small part ' +
308
- 'of the real body varies per user/run (e.g. one id field, not ' +
309
- 'the whole payload), template just that part with ' +
310
- '`{{paramName}}` and keep the rest as fixed literal text; see ' +
311
- 'the "bodySniff" section of the customInjection field\'s guide ' +
312
- 'for the exact mechanics and a worked example. ' +
313
- '⚠️ BEFORE populating this to gate ' +
314
- '`verifyProof(proof, { providerId })`: this whole entry (url, ' +
315
- 'method, body, responseMatches, responseRedactions) feeds a ' +
316
- 'client-side hash-equality check, and `url` is hashed VERBATIM ' +
317
- '— no regex/template resolution, even with `urlType: REGEX` or ' +
318
- '`TEMPLATE`. If the real captured URL contains ANY per-session ' +
319
- 'part (a tracking nonce, CSRF token, cache-busting timestamp), ' +
320
- 'no declared spec can EVER hash-match a real proof, no matter ' +
321
- 'how correct the rest of this entry is — populating' +
322
- 'it for such ' +
323
- 'a provider makes verifyProof reject every real proof,' +
324
- 'which is ' +
325
- 'worse than leaving this field empty. Diff the same endpoint\'s' +
326
- ' captured URL across two separate sessions before wiring this ' +
327
- 'up. If provider-hash validation keeps causing problems ' +
328
- '(unstable url, or any other persistent mismatch), the ' +
329
- 'fallback on the verifying side is `verifyProof(proof, { ' +
330
- 'dangerouslyDisableContentValidation: true })` — trusts only ' +
331
- 'the attestor\'s signature, skips the hash-equality check ' +
332
- 'entirely; see the "Provider-hash validation" section of the ' +
333
- 'customInjection field\'s guide for the full mechanics and ' +
334
- 'when to reach for it.',
277
+ 'Extra requests the customInjection user script is allowed to '
278
+ + 'fire (for example, pagination) — add-version ONLY, the '
279
+ + 'register '
280
+ + 'endpoint ignores it. Each item has the same shape as '
281
+ + '`provider`, plus `multiple`/`required` (default true). Set '
282
+ + '`body` whenever the request has one (see its own description '
283
+ + 'below). The builder calls the same concept '
284
+ + '`allowedJsRequests`. '
285
+ + ALLOWED_REQUESTS_HINT,
335
286
  items: {
336
287
  type: 'object',
337
288
  properties: {
@@ -353,7 +304,8 @@ export function createVersionFromCaptureTool(
353
304
  'body at all (skip only for a genuinely bodyless ' +
354
305
  'request, typically GET). If the real body is FIXED ' +
355
306
  '(identical for every user/run), put that literal body ' +
356
- 'text here verbatim. If only PART of it varies (e.g. ' +
307
+ 'text here verbatim. If only PART of it varies (for ' +
308
+ 'example, ' +
357
309
  '`{"request":1,"type":"user_info","id":"12345"}` where ' +
358
310
  'only `id` differs per user), template ONLY that part: ' +
359
311
  '`{"request":1,"type":"user_info",' +
@@ -376,7 +328,7 @@ export function createVersionFromCaptureTool(
376
328
  'reproduces the real captured request body ' +
377
329
  'byte-for-byte. Fallback if per-field templating keeps ' +
378
330
  'mismatching (more fields vary than expected, unstable ' +
379
- 'key order, etc.) and you can\'t pin down every ' +
331
+ 'key order, and so on) and you can\'t pin down every ' +
380
332
  'variable field: template the WHOLE body as one ' +
381
333
  'placeholder instead, `{{REQ_BODY_GRD}}` — the `GRD` ' +
382
334
  'suffix makes it a greedy match (captures everything) ' +
@@ -394,7 +346,7 @@ export function createVersionFromCaptureTool(
394
346
  '`value` must literally appear (or match, if `regex`) ' +
395
347
  'somewhere in the response body for the claim to be ' +
396
348
  'accepted; it commonly embeds one or more ' +
397
- '`{{paramName}}` extraction placeholders (e.g. ' +
349
+ '`{{paramName}}` extraction placeholders (for example, ' +
398
350
  '`"name":"{{name_0}}"`) whose real value is redacted ' +
399
351
  'out and supplied separately as a witness/extracted ' +
400
352
  'param. Use `${var}` (not `{{var}}`) inside this string ' +
@@ -410,7 +362,8 @@ export function createVersionFromCaptureTool(
410
362
  'Each item: `{ jsonPath?: string, xPath?: string, ' +
411
363
  'regex?: string, hash?: string }`. Identifies WHICH ' +
412
364
  'part of the response the matching `{{paramName}}` in ' +
413
- '`responseMatches` actually redacts/extracts — e.g. ' +
365
+ '`responseMatches` actually redacts or extracts — for ' +
366
+ 'example, ' +
414
367
  '`jsonPath: "$.data.items[0].name"` for a JSON response. ' +
415
368
  'Order/count should line up with `responseMatches`\' ' +
416
369
  'placeholders one-to-one for a typical claim.',
@@ -475,17 +428,28 @@ export function createVersionFromCaptureTool(
475
428
  'unset — the devtools backend\'s own column default ' +
476
429
  '(`HAWKEYE`) applies, which is inert and harmless for the ' +
477
430
  'standard capture→replay flow with no interceptor script ' +
478
- 'installed. Only set this to `HAWKEYE`/`MSWJS`/`XHOOK` ' +
479
- 'when you are ALSO supplying a `customInjection` script ' +
480
- 'that calls ' +
431
+ 'installed. Only set `HAWKEYE`/`MSWJS`/`XHOOK` when you are ' +
432
+ 'ALSO supplying a `customInjection` script that calls ' +
481
433
  '`window.reclaimInterceptor.addResponseMiddleware(...)` for ' +
482
- 'genuine live interception, or set `NONE` explicitly if you ' +
483
- 'want to be certain no interception is configured — see ' +
484
- 'injection-api.md\'s "Recognizing this on a provider you ' +
485
- 'didn\'t author" section for what these values actually do. ' +
486
- 'Builder calls the equivalent concept `interceptorType` (no ' +
487
- '`NONE` there — omitting the whole `interceptorOptions` ' +
488
- 'object is its no-interception signal instead).',
434
+ 'genuine live interception, or set `NONE` explicitly to be ' +
435
+ 'certain none is configured. Builder calls the equivalent ' +
436
+ 'concept `interceptorType` (no `NONE` there — omitting the ' +
437
+ 'whole `interceptorOptions` object is its no-interception ' +
438
+ 'signal instead). What each value actually does: ' +
439
+ 'how_it_works({ topic: "interception" }).',
440
+ },
441
+ disableRequestReplay: {
442
+ type: 'boolean',
443
+ description:
444
+ 'Whether the page\'s own document/navigation request is ' +
445
+ 'skipped (constructed locally) instead of genuinely replayed ' +
446
+ 'through the interceptor. Defaults to `true` (disabled) when ' +
447
+ 'omitted. Only meaningful for `injectionType` ' +
448
+ 'HAWKEYE/MSWJS/XHOOK — pass `false` to enable real document ' +
449
+ 'replay for those (for example, the target value is embedded ' +
450
+ 'in the page\'s own HTML). Inert when `injectionType` is ' +
451
+ '`CDP` or ' +
452
+ 'unset.',
489
453
  },
490
454
  },
491
455
  required: ['initialUrl'],
@@ -529,9 +493,9 @@ export function createVersionFromCaptureTool(
529
493
  // column default applies when omitted, same as before this field
530
494
  // existed at all.
531
495
  injectionType: args.injectionType,
532
- // Always disabled — see the tool description above; there is no
533
- // author-facing way to enable document replay.
534
- disableRequestReplay: true,
496
+ // Author-settable; defaults to disabled (see tool description).
497
+ // Only meaningful for HAWKEYE/MSWJS/XHOOK — inert for CDP.
498
+ disableRequestReplay: args.disableRequestReplay ?? true,
535
499
  allowedInjectedRequestData: args.allowedInjectedRequestData
536
500
  ? injectedRequestDataFrom(
537
501
  args.allowedInjectedRequestData,
@@ -584,12 +548,12 @@ export function createVersionFromCaptureTool(
584
548
  )
585
549
  }
586
550
 
587
- // disableRequestReplay is honored ONLY on add-version, and it's now
588
- // always forced true — so every register is immediately followed by
589
- // an add-version call that actually applies it (which also lands
590
- // an explicit injectionType, when passed — unverified whether
591
- // register persists it — and any other register-ignored fields the
592
- // caller passed).
551
+ // disableRequestReplay is honored ONLY on add-version — so every
552
+ // register is immediately followed by an add-version call that
553
+ // actually applies it (whatever value — default or author-set;
554
+ // which also lands an explicit injectionType, when passed —
555
+ // unverified whether register persists it — and any other
556
+ // register-ignored fields the caller passed).
593
557
  const REGISTER_IGNORED_KEYS = [
594
558
  'allowedInjectedRequestData',
595
559
  'useIncognitoWebview',
@@ -603,8 +567,8 @@ export function createVersionFromCaptureTool(
603
567
  `${ignoredOnRegister.length > 1 ? 'are' : 'is'} ` +
604
568
  'ignored on register (no providerId) — the devtools backend only ' +
605
569
  'reads them when adding a version. They were applied by the ' +
606
- 'automatic follow-up version this tool always creates to ' +
607
- 'force-disable document replay.',
570
+ 'automatic follow-up version this tool always creates to apply ' +
571
+ 'disableRequestReplay.',
608
572
  )
609
573
  }
610
574
 
@@ -633,7 +597,7 @@ export function createVersionFromCaptureTool(
633
597
  await client.updateProviderConfig(newProviderId, configBody)
634
598
  notes.push(
635
599
  `Created an automatic follow-up version (${followVersion}) to ` +
636
- 'force-disable document replay (disableRequestReplay)' +
600
+ `apply disableRequestReplay (${opts.disableRequestReplay})` +
637
601
  (opts.injectionType !== undefined
638
602
  ? ` and set injectionType (${opts.injectionType})`
639
603
  : '') +
@@ -657,7 +621,7 @@ export function createVersionFromCaptureTool(
657
621
  }
658
622
  } else {
659
623
  notes.push(
660
- 'Could not force-disable document replay: the ' +
624
+ 'Could not apply disableRequestReplay: the ' +
661
625
  'register response did not include the new providerId. Call ' +
662
626
  'this tool again WITH `providerId` to create a version that ' +
663
627
  'applies them.',
@@ -668,7 +632,7 @@ export function createVersionFromCaptureTool(
668
632
  }
669
633
 
670
634
  // New version of an existing provider — pick the next patch above
671
- // the highest existing version. A provider you don't own (e.g. a
635
+ // the highest existing version. A provider you don't own (for example, a
672
636
  // public one) fails here with 401/403/404; surface the register-a-copy
673
637
  // workaround instead of a bare permission error.
674
638
  const providerId = args.providerId
@@ -8,7 +8,7 @@ import type { ReclaimOldClient, UpdateProviderMetadataBody } from '../client.ts'
8
8
  * `create_provider_version_from_capture` paths: it does NOT touch
9
9
  * `providerConfig`/versions at all, and only the fields you pass here
10
10
  * change — everything else on the provider is left untouched (no need to
11
- * re-supply `requestData`/`customInjection`/etc., and
11
+ * re-supply `requestData`/`customInjection`, and so on, and
12
12
  * no new version is created).
13
13
  *
14
14
  * The backend 403s if you don't own the provider (and aren't an admin) —
@@ -122,7 +122,7 @@ export function verifySdkSetupTool(client: ReclaimOldClient): RegisteredTool {
122
122
  : 'PUBLIC_URL not set — fine if you only read the proof from the ' +
123
123
  'frontend flow, but the async webhook callback needs a ' +
124
124
  'publicly-reachable URL or it will never fire. Get one via a ' +
125
- 'tunnel (e.g. `ngrok http <port>`) or by deploying to a ' +
125
+ 'tunnel (for example, `ngrok http <port>`) or by deploying to a ' +
126
126
  'dev/staging server you already have — ask the user which they ' +
127
127
  'prefer.',
128
128
  })
@@ -53,13 +53,13 @@ export interface RunAttestorProofOptions {
53
53
  /** When resolving the key from env/.env/file, the address the caller expects
54
54
  * to sign with (sanity check). Ignored when `ownerPrivateKey` is given. */
55
55
  ownerAddress?: string
56
- /** Sign with this key directly (e.g. the app/VC's ephemeral per-session key)
57
- * instead of resolving from env/.env/file. */
56
+ /** Sign with this key directly (for example, the app or VC's ephemeral
57
+ * per-session key) instead of resolving from env/.env/file. */
58
58
  ownerPrivateKey?: string
59
59
  /** ZK engine for `createClaimOnAttestor`. Defaults to `'stwo'` — a pure-WASM
60
60
  * prover that runs everywhere (no native shared library, so it works on
61
61
  * Windows where `'gnark'` fails to load its `.dll`). Server-side paths that
62
- * want gnark's speed pin it explicitly (e.g. the verify runner). */
62
+ * want gnark's speed pin it explicitly (for example, the verify runner). */
63
63
  zkEngine?: 'gnark' | 'snarkjs' | 'stwo'
64
64
  /** Extract the structured {@link AttestorClaim} (claim + attestor signature)
65
65
  * onto the result for nested-proof construction. */
@@ -1,10 +1,10 @@
1
1
  // Debug helper (gated by RECLAIM_AGENT_DUMP_RESPONSE): capture the EXACT
2
2
  // response bytes the attestor validates a claim against, plus a per-match
3
3
  // presence check. A "Response does not contain X" failure means the attestor's
4
- // server-side re-fetch differs from what the browser (replay) saw — e.g. GitHub
5
- // embeds nav/userMenu data for browser requests but not for the attestor's raw
6
- // fetch. Seeing the attestor's actual response is the only way to tell what it
7
- // really returned.
4
+ // server-side re-fetch differs from what the browser (replay) saw — for
5
+ // example, GitHub embeds nav/userMenu data for browser requests but not for the
6
+ // attestor's raw fetch. Seeing the attestor's actual response is the only way
7
+ // to tell what it really returned.
8
8
  //
9
9
  // On each getResponseRedactions call it writes the response to
10
10
  // `attestor-last-response.html` in the process CWD and logs the byte count +,
@@ -15,6 +15,14 @@ export {
15
15
  parseClaim,
16
16
  resolveAttestorUrl,
17
17
  } from './proof-core.ts'
18
+ export {
19
+ type HttpParams,
20
+ type HttpSecretParams,
21
+ type PopcornProveOptions,
22
+ popcornProve,
23
+ popcornValidateExtraction,
24
+ type ValidateExtractionResult,
25
+ } from './pod-prover.ts'
18
26
  export { ensureZkFiles } from './zk-files.ts'
19
27
  // Re-exported attestor-core claim primitive so the agent is the single
20
28
  // integration point with @reclaimprotocol/attestor-core across the builder.
@@ -102,7 +102,7 @@ function authenticatedPageFetch(
102
102
  * (`authenticatedPageFetch`) so cookies are the real browser's, which a
103
103
  * detached call could never reproduce without manually re-deriving them.
104
104
  * WITH `withoutSecrets` (the auth-bound check — "does this still work with
105
- * no credentials, i.e. is it actually public"), replay instead through the
105
+ * no credentials, that is, is it actually public"), replay instead through the
106
106
  * detached Node-side `replayProvider`: the whole point of that check is to
107
107
  * prove NO secret rides along, and the live page's own global `fetch` can't
108
108
  * give that guarantee — a site (or a script installed via test_user_script)