@reclaimprotocol/agent 0.1.31 → 0.1.32

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.
@@ -1,5 +1,5 @@
1
1
  // AUTO-GENERATED by packages/app/scripts/mcp-tools-gen.ts
2
- // from packages/app/openapi.yaml (spec v0.1.0, source sha256:9ba46b5cbd7c).
2
+ // from packages/app/openapi.yaml (spec v0.1.0, source sha256:099a5bcf4fba).
3
3
  // The hash catches drift the version misses (a spec can change without a
4
4
  // version bump) — do not remove it as "redundant" with the version.
5
5
  // Run `npm run openapi:gen --workspace=packages/app` to regenerate. Do not edit by hand.
@@ -2098,6 +2098,21 @@ export const MCP_TOOLS = {
2098
2098
  "others"
2099
2099
  ]
2100
2100
  },
2101
+ "providerId": {
2102
+ "type": "string",
2103
+ "format": "uuid"
2104
+ },
2105
+ "client": {
2106
+ "type": "string",
2107
+ "enum": [
2108
+ "auto",
2109
+ "portals",
2110
+ "verifier-app",
2111
+ "reclaim-browser-extension",
2112
+ "builder",
2113
+ "inapp-sdk"
2114
+ ]
2115
+ },
2101
2116
  "from": {
2102
2117
  "type": "string",
2103
2118
  "maxLength": 40,
@@ -2110,10 +2125,6 @@ export const MCP_TOOLS = {
2110
2125
  "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:\\d{2})?)?$",
2111
2126
  "description": "One end of a date window: either a calendar date (`2026-09-01`, read as UTC midnight) or a full ISO date-time. The date-only form is what a native `<input type=\"date\">` submits, so `format: date-time` alone would reject every filter the dashboard's own form sends."
2112
2127
  },
2113
- "providerId": {
2114
- "type": "string",
2115
- "format": "uuid"
2116
- },
2117
2128
  "verificationClientId": {
2118
2129
  "type": "string",
2119
2130
  "minLength": 1,
@@ -67,7 +67,7 @@ const TOPIC_SUMMARIES = {
67
67
  'discover': 'Finding providers, resolving them, and creating a verification '
68
68
  + 'session.',
69
69
  'integration': 'Set up a Builder token, callback, frontend and backend '
70
- + 'with @reclaimprotocol/client; direct `api=2` API and result '
70
+ + 'over the HTTP session API; direct `api=2` API and result '
71
71
  + 'verification.',
72
72
  'user-script': 'Authoring jsUserScripts / customInjection to drive '
73
73
  + 'login-gated pages.',
@@ -34,7 +34,9 @@ export function getProviderInfoTool(client) {
34
34
  description: 'Read a PUBLISHED provider from the public production SDK backend ' +
35
35
  '(api.reclaimprotocol.org — what the verification SDK/attestor ' +
36
36
  'itself fetches at runtime), for ANY provider, no auth required. ' +
37
- 'This is the provider-read tool for old-devtools mode. \n\n' +
37
+ 'This is the provider-read tool for old-devtools mode. A ' +
38
+ 'published provider is usable as-is: don\'t re-verify it ' +
39
+ '(capture/replay/proof) unless the user asks to test it.\n\n' +
38
40
  'Returns two complementary reads for the given version (latest ' +
39
41
  'when `versionNumber` is omitted): `provider` (the FULL provider ' +
40
42
  '+ providerConfig — `customInjection`, `userAgent`, ' +
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@reclaimprotocol/agent",
3
3
  "title": "Reclaim Agent",
4
- "version": "0.1.31",
4
+ "version": "0.1.32",
5
5
  "description": "Reclaim Protocol tools for AI coding agents. Reclaim lets your app verify data points about its users, such as a follower count, an account balance, or an order history. This package is the Reclaim MCP server: it gives your agent the tools to find, build, test, and fix data verification providers by capturing and replaying browser requests, drafting provider recipes, running zkTLS proofs, and publishing provider versions.",
6
6
  "type": "module",
7
7
  "main": "./lib/index.js",
@@ -83,7 +83,7 @@
83
83
  "@modelcontextprotocol/sdk": "^1.29.0",
84
84
  "@noble/hashes": "^2.2.0",
85
85
  "@reclaimprotocol/attestor-core": "^5.1.5",
86
- "@reclaimprotocol/client": "0.1.31",
86
+ "@reclaimprotocol/client": "0.1.32",
87
87
  "@reclaimprotocol/tls": "^0.1.3",
88
88
  "chrome-remote-interface": "^0.33.0",
89
89
  "domhandler": "^6.0.0",
@@ -367,7 +367,10 @@ developer it's awaiting admin review.
367
367
  context params — for example, `context: { "username": "…" }` in
368
368
  `create_verification_session`. Quote the `requiredContext` from the created
369
369
  version verbatim — a session missing those fields gets a 400, and verification
370
- matches the supplied values exactly.
370
+ matches the supplied values exactly. Then ask once how they want to use it —
371
+ try it now here, integrate it into an existing backend or frontend, or create a
372
+ new app — unless they already said (see "Using a provider" in the server
373
+ instructions).
371
374
 
372
375
  **6. If the response includes `_notes` for an attached browser, follow them for
373
376
  an optional authenticated-state retest.** Only when its profile is still signed
@@ -391,9 +394,17 @@ use, run the same flow the Discover UI does:
391
394
  3. `discover_resolve({ domain, dataPoints })` → the smallest provider set
392
395
  (`providers`, greedy combine), the `requiredContext` inputs to collect, and
393
396
  any `uncovered` points (author those with the flow above, then re-resolve).
394
- 4. `create_verification_session({ providers: [{ providerId }, …], context,
397
+ 4. Resolved providers are published and usable as-is: don't capture, replay,
398
+ or prove them unless the developer asks you to check or test one. Ask once
399
+ whether they just want to try them or want them in an app — just try it
400
+ now, integrate into an existing backend or frontend (this directory or
401
+ another path), or create a new app — unless they already said.
402
+ 5. Just try it (no app, callback, or client package) →
403
+ `create_verification_session({ providers: [{ providerId }, …], context,
395
404
  verificationClientUrl })` with EVERY resolved provider id and the collected
396
- context.
405
+ context, give them `verificationUrl`, poll `get_verification_session` until
406
+ it is terminal, and report the outcome with `get_verification_result`.
407
+ Integrate or new app → topic `integration`.
397
408
 
398
409
  `merge.mergeable` only signals the set *could* collapse into one provider — you
399
410
  still pass them all; the Builder runs them in one session.
@@ -318,8 +318,10 @@ applies them.
318
318
  would fetch. Reads the public production SDK backend directly, no auth.
319
319
 
320
320
  There's no create-then-version step and no org / public-review workflow here.
321
- When done, tell the developer the version is live and that they can integrate
322
- using the `providerId`.
321
+ When done, tell the developer the version is live, then ask once how they want
322
+ to use it — try it now, integrate it into an existing backend or frontend, or
323
+ create a new app — unless they already said (see "Using a provider" in the
324
+ server instructions).
323
325
 
324
326
  **If the response includes `_notes` for an attached browser, follow them for an
325
327
  optional authenticated-state retest.** Only when its profile is still signed in,
@@ -6,12 +6,37 @@ authoring tools.
6
6
 
7
7
  ## Claimant-facing Builder sessions
8
8
 
9
- This integration is separate from provider authoring. When asked to set up an
10
- app, read `how_it_works({ topic: "integration" })`, then configure the
11
- organization with generated tools (`list_orgs`, `create_org`,
12
- `create_org_callback_subscription`, and owner-only `issue_org_token`) and edit
13
- the app's frontend and backend with the coding agent's file tools. The guide
14
- covers the `@reclaimprotocol/client` workflow, exact `api=2` boundary, result
9
+ This integration is separate from provider authoring.
10
+
11
+ **Using a provider.** A provider found with `providers`, `discover_resolve`, or
12
+ another lookup is published and usable as-is. Don't capture, `replay_request`,
13
+ or `run_proof` against it unless the developer asks you to check or test it.
14
+ Before using a provider, found or just created, ask once whether they just want
15
+ to try it or want it in an app (skip this if they already said):
16
+
17
+ > Want to (1) just try it right now, (2) integrate it into an existing backend
18
+ > or frontend (this directory or another path), or (3) create a new app for it?
19
+
20
+ - **Just try it:** no app, callback, or client package. Create the session the
21
+ HTTP way (`create_verification_session`, i.e. `POST /verifications/sessions`
22
+ with the org secret as `Authorization: Bearer`; `issue_org_token` if there is
23
+ none), give the developer `verificationUrl` to open, then check the session
24
+ yourself (`get_verification_session`) until it is terminal and report the
25
+ outcome with `get_verification_result`.
26
+ - **Integrate, or new app:** follow the setup below in the path they named.
27
+
28
+ **Prefer the HTTP API over `@reclaimprotocol/client`** for every option:
29
+ create sessions with `POST /verifications/sessions`, open `verificationUrl`,
30
+ poll `GET /verifications/sessions/{sessionId}`, and take the result on the
31
+ callback. Use the client package only when the developer asks for it — the one
32
+ exception is `results.receive`, to verify the result on your callback.
33
+
34
+ When integrating into an app, read `how_it_works({ topic: "integration" })`,
35
+ then configure the organization with generated tools (`list_orgs`,
36
+ `create_org`, `create_org_callback_subscription`, and owner-only
37
+ `issue_org_token`) and edit the app's frontend and backend with the coding
38
+ agent's file tools. The guide
39
+ covers the HTTP session workflow, exact `api=2` boundary, result
15
40
  verification, request-proof contract, and optional TEE binding. A URL without
16
41
  `api=2` stays on its existing legacy path.
17
42
 
@@ -21,15 +46,15 @@ else:
21
46
 
22
47
  > This project uses `@reclaimprotocol/js-sdk`. Keep it (I switch this MCP
23
48
  > server to legacy devtools mode), or migrate to the Builder integration
24
- > (`@reclaimprotocol/client`)?
49
+ > (Builder HTTP API)?
25
50
 
26
51
  - **Keep js-sdk:** call `set_devtools_mode({ mode: "old" })`, then tell them to
27
52
  restart or reconnect the MCP server; the switch applies on the next start. An
28
53
  explicit `USE_OLD_DEVTOOLS` env var overrides it. After the restart, read
29
54
  `get_js_sdk_integration_guide`.
30
55
  - **Migrate:** stay in Builder mode. Follow `how_it_works({ topic:
31
- "integration" })` to replace `@reclaimprotocol/js-sdk` with
32
- `@reclaimprotocol/client` and update the app's code.
56
+ "integration" })` to replace `@reclaimprotocol/js-sdk` with the Builder
57
+ HTTP session flow and update the app's code.
33
58
 
34
59
  **A `provider` is a recipe for extracting a data point from a site. A
35
60
  `verification` is an end-user session that proves a data point using one. Never
package/skill/old-mode.md CHANGED
@@ -55,6 +55,18 @@ existing provider instead; you can only version a provider you own. For a
55
55
  multi-request provider pass `providers: [draftA, draftB, …]` so each becomes a
56
56
  parallel `requestData` entry on the one version.
57
57
 
58
+ **Using a provider.** A provider found with `get_me_providers` or
59
+ `get_provider_info` is published and usable as-is. Don't capture,
60
+ `replay_request`, or `run_proof` against it unless the developer asks you to
61
+ check or test it. Before using a provider, found or just created, ask once how
62
+ they want to use it (skip this if they already said):
63
+
64
+ > Want to (1) try it right now here, (2) integrate it into an existing backend
65
+ > or frontend (this directory or another path), or (3) create a new app for it?
66
+
67
+ Try it now → `scaffold_reclaim_demo_server` with its `providerId`. Integrate,
68
+ or new app → `get_js_sdk_integration_guide`, then work in the path they named.
69
+
58
70
  **Two independent auth systems — don't confuse them.** `reclaim_authenticate`
59
71
  authorizes everything in this mode; its Firebase token is short-lived (~1h), so
60
72
  an auth error on publish or `get_me_providers` means re-run it.
@@ -9,7 +9,7 @@ configure Builder resources; the coding agent's file tools edit the app.
9
9
 
10
10
  If the app depends on `@reclaimprotocol/js-sdk`, ask the developer first:
11
11
  keep it (call `set_devtools_mode({ mode: "old" })` and have them restart the MCP
12
- server), or migrate to `@reclaimprotocol/client` with the steps below. When
12
+ server), or migrate to the Builder session flow below. When
13
13
  migrating, remove `@reclaimprotocol/js-sdk` and replace its
14
14
  `ReclaimProofRequest` and `verifyProof` calls with the session flow below.
15
15
 
@@ -26,14 +26,17 @@ migrating, remove `@reclaimprotocol/js-sdk` and replace its
26
26
  `RECLAIM_ORG_SECRET`; keep it out of frontend bundles, logs, source control,
27
27
  and the final response. Reuse an already configured secret when available;
28
28
  issue a new token when setup needs one.
29
- 4. Install `@reclaimprotocol/client` in the backend. Use
30
- `ReclaimVerification.create({ orgSecret })` to create sessions, save each
31
- returned session ID alongside the app's own user or order, and return only
32
- `verificationUrl` to the frontend. The frontend opens that URL and asks its
33
- backend for the final status; a browser redirect alone is not proof of
34
- success.
35
- 5. Add a backend callback endpoint. Persist each delivery idempotently, load
36
- the expected session ID and org ID from app storage, and call
29
+ 4. Prefer plain HTTP from the backend. Create sessions with
30
+ `POST /verifications/sessions` (`Authorization: Bearer <orgSecret>`), save
31
+ each returned session ID alongside the app's own user or order, and return
32
+ only `verificationUrl` to the frontend. The frontend opens that URL and asks
33
+ its backend for the final status (`GET /verifications/sessions/{sessionId}`);
34
+ a browser redirect alone is not proof of success. Use
35
+ `@reclaimprotocol/client` (`ReclaimVerification.create({ orgSecret })`,
36
+ `sessions.create`) only when the developer asks for it.
37
+ 5. Add a backend callback endpoint. Persist each delivery idempotently and load
38
+ the expected session ID and org ID from app storage. To verify the result on
39
+ your callback, install `@reclaimprotocol/client` in the backend and call
37
40
  `reclaim.results.receive(body, { reclaimSessionId, expectedAud,
38
41
  orgEthPrivateKey })`. Use the verified proof data to update app state.
39
42
  Handle callback retries and terminal failure outcomes.
@@ -1,5 +1,5 @@
1
1
  // AUTO-GENERATED by packages/app/scripts/mcp-tools-gen.ts
2
- // from packages/app/openapi.yaml (spec v0.1.0, source sha256:9ba46b5cbd7c).
2
+ // from packages/app/openapi.yaml (spec v0.1.0, source sha256:099a5bcf4fba).
3
3
  // The hash catches drift the version misses (a spec can change without a
4
4
  // version bump) — do not remove it as "redundant" with the version.
5
5
  // Run `npm run openapi:gen --workspace=packages/app` to regenerate. Do not edit by hand.
@@ -2162,6 +2162,21 @@ export const MCP_TOOLS = {
2162
2162
  "others"
2163
2163
  ]
2164
2164
  },
2165
+ "providerId": {
2166
+ "type": "string",
2167
+ "format": "uuid"
2168
+ },
2169
+ "client": {
2170
+ "type": "string",
2171
+ "enum": [
2172
+ "auto",
2173
+ "portals",
2174
+ "verifier-app",
2175
+ "reclaim-browser-extension",
2176
+ "builder",
2177
+ "inapp-sdk"
2178
+ ]
2179
+ },
2165
2180
  "from": {
2166
2181
  "type": "string",
2167
2182
  "maxLength": 40,
@@ -2174,10 +2189,6 @@ export const MCP_TOOLS = {
2174
2189
  "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:\\d{2})?)?$",
2175
2190
  "description": "One end of a date window: either a calendar date (`2026-09-01`, read as UTC midnight) or a full ISO date-time. The date-only form is what a native `<input type=\"date\">` submits, so `format: date-time` alone would reject every filter the dashboard's own form sends."
2176
2191
  },
2177
- "providerId": {
2178
- "type": "string",
2179
- "format": "uuid"
2180
- },
2181
2192
  "verificationClientId": {
2182
2193
  "type": "string",
2183
2194
  "minLength": 1,
@@ -78,7 +78,7 @@ const TOPIC_SUMMARIES: Record<string, string> = {
78
78
  'discover': 'Finding providers, resolving them, and creating a verification '
79
79
  + 'session.',
80
80
  'integration': 'Set up a Builder token, callback, frontend and backend '
81
- + 'with @reclaimprotocol/client; direct `api=2` API and result '
81
+ + 'over the HTTP session API; direct `api=2` API and result '
82
82
  + 'verification.',
83
83
  'user-script': 'Authoring jsUserScripts / customInjection to drive '
84
84
  + 'login-gated pages.',
@@ -41,7 +41,9 @@ export function getProviderInfoTool(client: ReclaimSdkClient): RegisteredTool {
41
41
  'Read a PUBLISHED provider from the public production SDK backend ' +
42
42
  '(api.reclaimprotocol.org — what the verification SDK/attestor ' +
43
43
  'itself fetches at runtime), for ANY provider, no auth required. ' +
44
- 'This is the provider-read tool for old-devtools mode. \n\n' +
44
+ 'This is the provider-read tool for old-devtools mode. A ' +
45
+ 'published provider is usable as-is: don\'t re-verify it ' +
46
+ '(capture/replay/proof) unless the user asks to test it.\n\n' +
45
47
  'Returns two complementary reads for the given version (latest ' +
46
48
  'when `versionNumber` is omitted): `provider` (the FULL provider ' +
47
49
  '+ providerConfig — `customInjection`, `userAgent`, ' +