@reclaimprotocol/agent 0.1.38 → 0.1.40
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.
- package/lib/mcp/api/operations.gen.d.ts +7 -0
- package/lib/mcp/api/operations.gen.js +49 -3
- package/lib/mcp/instructions.js +10 -8
- package/lib/mcp/tools/agent/example-app.d.ts +5 -1
- package/lib/mcp/tools/agent/example-app.js +138 -31
- package/lib/mcp/tools/authenticate/eth-key.d.ts +15 -0
- package/lib/mcp/tools/authenticate/eth-key.js +72 -6
- package/lib/mcp/tools/authenticate/issue-org-keypair.d.ts +3 -2
- package/lib/mcp/tools/authenticate/issue-org-keypair.js +83 -18
- package/lib/mcp/tools/authenticate/issue-org-token.js +9 -2
- package/lib/provider/draft.js +4 -3
- package/lib/provider/matcher.js +1 -1
- package/package.json +2 -2
- package/samples/demo-server/package.json +2 -1
- package/samples/demo-server/server.js +6 -1
- package/skill/SKILL.builder.md +30 -11
- package/skill/SKILL.old.md +23 -5
- package/skill/builder-mode.md +29 -164
- package/skill/old-mode.md +40 -95
- package/skill/start-integration.md +12 -9
- package/skill/verification-client-integration.md +39 -9
- package/src/mcp/api/operations.gen.ts +51 -3
- package/src/mcp/instructions.ts +10 -8
- package/src/mcp/tools/agent/example-app.ts +156 -37
- package/src/mcp/tools/authenticate/eth-key.ts +114 -6
- package/src/mcp/tools/authenticate/issue-org-keypair.ts +97 -19
- package/src/mcp/tools/authenticate/issue-org-token.ts +13 -2
- package/src/provider/draft.ts +4 -3
- package/src/provider/matcher.ts +1 -1
package/skill/old-mode.md
CHANGED
|
@@ -1,100 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
intentionally reduced: no generated API tools, no organizations, no public
|
|
3
|
-
review flow. Only GET/POST requests can be captured into providers.
|
|
1
|
+
# Legacy devtools mode
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
`verification` is an end-user session that proves a data point using one. Never
|
|
7
|
-
call a provider a "verification."**
|
|
3
|
+
Provider-authoring tools for the old devtools backend. The tool surface is reduced: no generated API tools, no organizations, no public review. Only GET and POST requests can be captured.
|
|
8
4
|
|
|
9
|
-
**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
**A `provider` is a recipe for extracting a data point from a site. A `verification` is an end-user session that proves a data point with a provider. Never call a provider a "verification."**
|
|
6
|
+
|
|
7
|
+
## Routing
|
|
8
|
+
|
|
9
|
+
- A provider found with `get_me_providers` or `get_provider_info` is published and usable as-is. Don't capture, replay, or prove it unless the developer asks.
|
|
10
|
+
- Before using a provider, found or just created, ask once how they want to use it (try it, integrate it, or build a new app), unless they already said. Topic `publish` has the options.
|
|
11
|
+
- Call `attach_browser()` with no arguments. Don't ask which browser to use.
|
|
12
|
+
|
|
13
|
+
## Asking the developer
|
|
14
|
+
|
|
15
|
+
- When you need an answer or an action, end your turn with the question and every link they need. Don't use a background or asynchronous question tool: the developer may never see it.
|
|
16
|
+
- Ask each question once. Act on the answer; don't ask again.
|
|
17
|
+
|
|
18
|
+
## Permission blocks
|
|
19
|
+
|
|
20
|
+
When a permission check blocks a tool call or command:
|
|
21
|
+
|
|
22
|
+
1. Don't retry it or work around it.
|
|
23
|
+
2. In one message, name the blocked tool or command, what it does, and what approving it means.
|
|
24
|
+
3. Ask for approval in words that name that exact action, for example: "Approve running `npm run dev` to start the demo server?"
|
|
25
|
+
|
|
26
|
+
## Authoring rules
|
|
27
|
+
|
|
28
|
+
- Provider versions are immutable: every change creates a new version, default a patch bump. Never edit an existing version.
|
|
29
|
+
- Publishing without `providerId` registers a new provider. Check `get_me_providers` first to avoid duplicates.
|
|
30
|
+
- `reclaim_authenticate` authorizes this mode. On an auth error, run it again (topic `auth`).
|
|
13
31
|
|
|
14
32
|
## Evidence contract
|
|
15
33
|
|
|
16
|
-
Tool results are the source of truth. Never say
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
action from the developer before you can continue, end your turn with the
|
|
29
|
-
question and every link they need. Don't use a background or asynchronous
|
|
30
|
-
question tool for it: the developer may never see it.
|
|
31
|
-
|
|
32
|
-
**Use the guide as needed.** Call `how_it_works({})` for its topic index, then
|
|
33
|
-
fetch only the topic relevant to the next tool call.
|
|
34
|
-
|
|
35
|
-
**Open the browser without asking.** Call `attach_browser()` with no
|
|
36
|
-
arguments: it opens a visible browser on the developer's machine with the
|
|
37
|
-
persistent Reclaim profile, and falls back to Chrome for Testing itself when
|
|
38
|
-
no installed browser can be attached. Don't ask which browser or who signs in.
|
|
39
|
-
Use another `mode` only when that fails too, or when the developer explicitly
|
|
40
|
-
asks for it (topic `browser`). Tell the developer once, as a side note, that a
|
|
41
|
-
shareable link can be set up if a volunteer is helping them sign in; don't ask
|
|
42
|
-
about it or set it up unless they ask.
|
|
43
|
-
|
|
44
|
-
**The flow:** `reclaim_authenticate` once → `attach_browser()` (no arguments: a
|
|
45
|
-
visible local browser) → `start_capture` ⇒ **`captureId`** →
|
|
46
|
-
drive the page (`navigate`,
|
|
47
|
-
`wait_for_page`, `eval_in_page`) → inspect (`list_requests`, `get_request`,
|
|
48
|
-
`find_requests_containing`) → `propose_provider` ⇒ **`draftId`** →
|
|
49
|
-
`replay_request(captureId, draftId)` → `run_proof(captureId,
|
|
50
|
-
draftId)` → `create_provider_version_from_capture`.
|
|
51
|
-
|
|
52
|
-
`reclaim_authenticate` itself always uses a local Chrome over loopback CDP. It
|
|
53
|
-
never uses the container, remote Builder, custom-CDP, or shared authoring
|
|
54
|
-
browser; those choices begin only at `attach_browser` after dashboard sign-in.
|
|
55
|
-
|
|
56
|
-
**Publishing and ownership:** with NO `providerId`, publish REGISTERS A NEW
|
|
57
|
-
provider — re-running creates a duplicate. Pass a `providerId` from
|
|
58
|
-
`get_me_providers` (the only provider-listing tool here) to add a version to an
|
|
59
|
-
existing provider instead; you can only version a provider you own. For a
|
|
60
|
-
multi-request provider pass `providers: [draftA, draftB, …]` so each becomes a
|
|
61
|
-
parallel `requestData` entry on the one version.
|
|
62
|
-
|
|
63
|
-
**Using a provider.** A provider found with `get_me_providers` or
|
|
64
|
-
`get_provider_info` is published and usable as-is. Don't capture,
|
|
65
|
-
`replay_request`, or `run_proof` against it unless the developer asks you to
|
|
66
|
-
check or test it. Before using a provider, found or just created, ask once how
|
|
67
|
-
they want to use it (skip this if they already said):
|
|
68
|
-
|
|
69
|
-
> Want to (1) try it right now here, (2) integrate it into an existing backend
|
|
70
|
-
> or frontend (this directory or another path), or (3) create a new app for it?
|
|
71
|
-
|
|
72
|
-
Try it now → `scaffold_reclaim_demo_server` with its `providerId`. Integrate,
|
|
73
|
-
or new app → `get_js_sdk_integration_guide`, then work in the path they named.
|
|
74
|
-
|
|
75
|
-
**Two independent auth systems — don't confuse them.** `reclaim_authenticate`
|
|
76
|
-
authorizes everything in this mode; its Firebase token is short-lived (~1h), so
|
|
77
|
-
an auth error on publish or `get_me_providers` means re-run it.
|
|
78
|
-
`authenticate_builder` covers only two Builder-exclusive features: allocating a
|
|
79
|
-
remote browser (`attach_browser mode="builder"`) and
|
|
80
|
-
`list_builder_organizations`. It authorizes nothing else. `get_devtools_mode`
|
|
81
|
-
reports both.
|
|
82
|
-
|
|
83
|
-
**Never prove a public endpoint.** After `replay_request` succeeds, re-run it
|
|
84
|
-
with `withoutSecrets: true`. If the value still extracts, the endpoint is public
|
|
85
|
-
and the proof binds to nobody — find an auth-bound request instead.
|
|
86
|
-
|
|
87
|
-
**Templating:** bare `{{name}}` placeholders are extracted from the response.
|
|
88
|
-
Values the CONSUMER supplies at verification time use `{{context_<name>}}` —
|
|
89
|
-
this backend does NOT support the builder's dotted `{{context.<name>}}` form.
|
|
90
|
-
|
|
91
|
-
**Diagnosing a session:** `session_analytics_logs` returns a session's
|
|
92
|
-
milestone events; `session_logs` returns the log entries the SDK emitted, each
|
|
93
|
-
with its event type — that is where a failed match, redaction, or claim shows
|
|
94
|
-
up. Both take a `sessionId`; see topic `troubleshooting` for how to read them.
|
|
95
|
-
|
|
96
|
-
**Backend mode:** the BUILDER backend (generated API tools, orgs, verification
|
|
97
|
-
sessions, public review) is one switch away. `get_devtools_mode` reports the
|
|
98
|
-
active mode and why; `set_devtools_mode` persists a switch to
|
|
99
|
-
`~/.reclaim/config.json`, effective on the NEXT server start. An explicit
|
|
100
|
-
`USE_OLD_DEVTOOLS` env var wins over the persisted choice.
|
|
34
|
+
Tool results are the source of truth. Never say a browser attached, a user logged in, a request was captured, a proof passed, or a version was created or published unless a tool result says so. A planned call is not a completed action.
|
|
35
|
+
|
|
36
|
+
Treat every ID, version, URL, request value, and error as opaque: copy it from the latest tool result. Never invent, reconstruct, or reuse one from memory. When state is unclear, call the relevant get/list/status tool or `how_it_works`. State uncertainty plainly.
|
|
37
|
+
|
|
38
|
+
## Guide
|
|
39
|
+
|
|
40
|
+
`how_it_works({})` lists topics. Fetch only the one for your next step:
|
|
41
|
+
|
|
42
|
+
- `overview`: the authoring checklist.
|
|
43
|
+
- `auth`: sign-in, and backend mode (switching to Builder).
|
|
44
|
+
- `publish`: ownership, multi-request providers, using a provider.
|
|
45
|
+
- `troubleshooting`: `session_analytics_logs` and `session_logs` for a failed session.
|
|
@@ -4,7 +4,7 @@ Follow this plan end to end. Mark each step done as you go. Do not ask the devel
|
|
|
4
4
|
|
|
5
5
|
**Order.** Do the steps that need the developer first: sign in to Builder, attach the browser, capture, and prove the provider (step 2). These need the developer at the browser, and they show early whether a proof is possible on this site. Write app code (step 3) after the proof works, or while you wait on the developer. Never spend a long stretch on app code before the developer has signed in and the browser is attached.
|
|
6
6
|
|
|
7
|
-
**Asking the developer.** When you need an answer or an action
|
|
7
|
+
**Asking the developer.** When you need an answer or an action, end your turn with the question. Don't use background or asynchronous question tools: the developer may never see them. Put every link they need in that same message. Ask each question once.
|
|
8
8
|
|
|
9
9
|
## 1. Sign in and pick the organization
|
|
10
10
|
|
|
@@ -15,6 +15,7 @@ Follow this plan end to end. Mark each step done as you go. Do not ask the devel
|
|
|
15
15
|
<!-- ifnot:orgId -->
|
|
16
16
|
- [ ] Call `list_orgs`. Use the only organization, or ask the developer which one when there are several.
|
|
17
17
|
<!-- endif -->
|
|
18
|
+
- [ ] Call `get_org_keypair`. If the org has a key pair (any `canEncryptResult`), the app's callback must pass `orgEthPrivateKey` to `results.receive`: it decrypts encrypted results and verifies TEE-bound proofs. In the same message as any other step 1 question, ask the developer to choose one: reuse the existing key (they put its private key in the app's server env file as `RECLAIM_ORG_ETH_PRIVATE_KEY` themselves, never in chat), or rotate it (`issue_org_keypair` with `replace: true`; other apps holding the old key stop working with new results). If `canEncryptResult` is true, they can also turn encryption off with `update_org_keypair({ orgId, canEncryptResult: false })`, which keeps the key. Name the exact action in your question. Act on the answer in step 3.
|
|
18
19
|
|
|
19
20
|
## 2. Get the provider and prove it
|
|
20
21
|
|
|
@@ -39,7 +40,7 @@ Build a new organization-private provider for exactly "{{goal}}". Do not search
|
|
|
39
40
|
- [ ] Call `replay_request`, then `replay_request` with `withoutSecrets: true` to confirm the request is auth-bound.
|
|
40
41
|
- [ ] Call `run_proof`. It creates a local test signing key if none exists; tell the developer once afterwards.
|
|
41
42
|
- [ ] Call `create_provider_version_from_capture`. It publishes the kept script as `jsUserScripts`. Follow its `_notes`, then publish the version.
|
|
42
|
-
- [ ] Call `dispose_browser`
|
|
43
|
+
- [ ] Don't ask whether to close the browser. Mention once in your final summary that it stays open for provider changes and you can close it on request. Call `dispose_browser` only when the developer says so.
|
|
43
44
|
<!-- endif -->
|
|
44
45
|
|
|
45
46
|
## 3. Set up the app
|
|
@@ -65,21 +66,23 @@ Do this yourself, not in a subagent.
|
|
|
65
66
|
|
|
66
67
|
- [ ] Call `create_example_app` with the workspace root you were started in as `projectDir`. It writes the example there and sets its backend to the latest `@reclaimprotocol/client`. Don't clone the repository or create a subdirectory: commands you run inside a clone count as running external code, and permission checks may block them.
|
|
67
68
|
- [ ] Call `issue_org_token` with the same `projectDir` and `envFile: "packages/backend/.env"`.
|
|
68
|
-
- [ ]
|
|
69
|
-
- [ ] From the workspace root, run `npm install
|
|
70
|
-
- [ ]
|
|
71
|
-
- [ ]
|
|
69
|
+
- [ ] Key pair, by the step 1 answer. No key pair on the org and the developer wants none: skip. Reuse: the developer has put the key in `packages/backend/.env`. Rotate, or no key pair and the developer asks for binding or encrypted results: call `issue_org_keypair` with the same `projectDir` and `envFile` (`encryptResults: true` for encrypted results, `replace: true` to rotate). It writes `RECLAIM_ORG_ETH_PRIVATE_KEY` and backs up a replaced key to `<envFile>.backup`; tell the developer that path (never the key). Turn encryption off with `update_org_keypair`. The example's callback (`packages/backend/src/routes/callback.ts`) passes `RECLAIM_ORG_ETH_PRIVATE_KEY` to `reclaim.results.receive`; if it doesn't, add `orgEthPrivateKey: process.env.RECLAIM_ORG_ETH_PRIVATE_KEY` there. For session binding, also pass it to `reclaim.sessions.create` in `packages/backend/src/routes/verifications.ts`.
|
|
70
|
+
- [ ] From the workspace root, run `npm install`. Then follow the `next` array that `create_example_app` returned for the dev command, ports, log location, notes, and the `proxy_callback_events` call. Don't assume default ports.
|
|
71
|
+
- [ ] Run the dev server in the background with its output redirected to a log file, and read that file for backend output. Don't depend on the shell's own output.
|
|
72
|
+
- [ ] After you restart the backend, its in-memory store is empty. Ask the developer for a new verification; don't retry the old session.
|
|
73
|
+
- [ ] If a permission check blocks a command, follow "Permission blocks" in the server instructions.
|
|
74
|
+
- [ ] Skip the rest of this step. In step 4, the provider goes in `packages/backend/config.json`: replace the example entry with `{ "id": "<provider ID>", "name": "<what it proves>" }`, then restart the backend, because it reads the file at startup. Then ask for a new verification.
|
|
72
75
|
|
|
73
76
|
**Existing app.** Add verification to it:
|
|
74
77
|
|
|
75
78
|
- [ ] Detect the app's framework and package manager from the repository, and use them. Read `how_it_works({ topic: "integration" })`.
|
|
76
|
-
- [ ] Call `issue_org_token` with the organization, this project's absolute path, and the server env file. It writes the key to that file and never returns it. Never print or commit the key. Confirm the env file is in `.gitignore`.
|
|
79
|
+
- [ ] Call `issue_org_token` with the organization, this project's absolute path, and the server env file. It writes the key to that file and never returns it; it backs up a replaced value to `<envFile>.backup`, so tell the developer that path. Never print or commit the key. Confirm the env file is in `.gitignore`.
|
|
77
80
|
- [ ] Add a backend route that creates a verification session (`POST /verifications/sessions`) and returns `verificationUrl`. Read the provider ID from server config (an env variable such as `RECLAIM_PROVIDER_ID`), so the route works before the provider exists.
|
|
78
|
-
- [ ]
|
|
81
|
+
- [ ] Key pair, by the step 1 answer. Reuse: the developer has put the key in the server env file. Rotate, or no key pair and the developer asks for binding or encrypted results: call `issue_org_keypair` with the server env file (`encryptResults: true` for encrypted results, `replace: true` to rotate). It backs up a replaced key to `<envFile>.backup`; tell the developer that path (never the key). Turn encryption off with `update_org_keypair`. Whenever the org has a key pair, pass `orgEthPrivateKey` from `RECLAIM_ORG_ETH_PRIVATE_KEY` to `sessions.create` and `results.receive`.
|
|
79
82
|
- [ ] Add a callback route that verifies each result with `results.receive` from `@reclaimprotocol/client`, then stores only the requested data points. Store every failure on the verification session record and log it server-side: a failure event (`verification_rejected`, `verification_error`, `verification_cancelled`, `session_expired`), or a thrown `ResultVerificationError` (`error.reason` plus each failing proof's `reason`). Respond `error.retryable ? 503 : 200`. A result that failed verification gets 2xx, because retrying can't fix it. Read the exact pattern in `how_it_works({ topic: "integration" })`.
|
|
80
83
|
- [ ] Add a status route the frontend polls. It returns the stored status, data points, and failure reason. While the app has no result, it also reads `GET /verifications/sessions/{sessionId}`, so a session that ended in Builder never stays pending.
|
|
81
84
|
- [ ] Add a frontend Verify button that opens `verificationUrl`, and render every state in "UI states" in `how_it_works({ topic: "integration" })`: idle, waiting in the other tab, verifying, verified (with the data points), failed (plain-language reason and **Try again**), and expired or cancelled (**Try again**). Never leave a spinner as the only feedback.
|
|
82
|
-
- [ ] Start the app. Call `proxy_callback_events({ port, path })` with the callback route's port and path. It forwards the org's verification events to that route on localhost, with no public URL.
|
|
85
|
+
- [ ] Start the app in the background with output redirected to a log file. Call `proxy_callback_events({ port, path })` with the callback route's port and path. It forwards the org's verification events to that route on localhost, with no public URL.
|
|
83
86
|
|
|
84
87
|
## 4. Wire the provider and test end to end
|
|
85
88
|
|
|
@@ -22,26 +22,44 @@ configuration, and callback conventions. Complete the integration in its codebas
|
|
|
22
22
|
relevant checks. The MCP tools configure Builder resources; your file tools
|
|
23
23
|
edit the app.
|
|
24
24
|
|
|
25
|
-
If
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
`
|
|
25
|
+
If `package.json` depends on `@reclaimprotocol/js-sdk`, ask first: "This
|
|
26
|
+
project uses `@reclaimprotocol/js-sdk`. Keep it (I switch this MCP server to
|
|
27
|
+
legacy devtools mode), or migrate to the Builder HTTP API?"
|
|
28
|
+
|
|
29
|
+
- **Keep:** `set_devtools_mode({ mode: "old" })`, then tell them to restart or
|
|
30
|
+
reconnect the MCP server. An explicit `USE_OLD_DEVTOOLS` env var overrides
|
|
31
|
+
it. After the restart, read `get_js_sdk_integration_guide`.
|
|
32
|
+
- **Migrate:** stay in Builder mode, remove `@reclaimprotocol/js-sdk`, and
|
|
33
|
+
replace its `ReclaimProofRequest` and `verifyProof` calls with the session
|
|
34
|
+
flow below.
|
|
30
35
|
|
|
31
36
|
1. `get_devtools_mode` confirms Builder mode. `get_me` or `authenticate` signs
|
|
32
37
|
in the developer. Find the organization with `list_orgs`; call `create_org`
|
|
33
38
|
only when they want a new one.
|
|
34
39
|
2. Receive callbacks. Local development: call
|
|
35
40
|
`proxy_callback_events({ port, path })` to forward the org's events to the
|
|
36
|
-
app's callback route on localhost; no public URL.
|
|
37
|
-
|
|
41
|
+
app's callback route on localhost; no public URL. The local listener works
|
|
42
|
+
only while this MCP server runs. It keeps events in order per session and
|
|
43
|
+
retries a session the app rejects with backoff, so other sessions keep
|
|
44
|
+
flowing. When its status lists `blocked` sessions, read that session's
|
|
45
|
+
callback route response and logs, and fix the app. Deployed app (required
|
|
46
|
+
for production): register a
|
|
38
47
|
public callback URL with `create_org_callback_subscription`, including
|
|
39
48
|
all five session-ending events. If the
|
|
40
49
|
app needs encrypted results or session binding, call `issue_org_keypair`
|
|
41
50
|
(`encryptResults: true` for encrypted results). It writes the private key to
|
|
42
51
|
the backend's env file and registers only the public key. It returns 409
|
|
43
|
-
when the org already has a different key
|
|
44
|
-
|
|
52
|
+
when the org already has a different key. Check `get_org_keypair` first;
|
|
53
|
+
when the org has a key pair, the app must pass `orgEthPrivateKey` to
|
|
54
|
+
`results.receive`, with or without encryption: it decrypts results and
|
|
55
|
+
verifies TEE-bound proofs. Ask the developer to choose: reuse the key (they
|
|
56
|
+
put its private key in the backend's server env file as
|
|
57
|
+
`RECLAIM_ORG_ETH_PRIVATE_KEY` themselves, never in chat), rotate it with
|
|
58
|
+
`issue_org_keypair` and `replace: true` (apps holding the old key stop
|
|
59
|
+
working with new results; the old key is saved to `<envFile>.backup`, so
|
|
60
|
+
tell the developer that path), or turn encryption off with
|
|
61
|
+
`update_org_keypair({ orgId, canEncryptResult: false })`, which keeps the
|
|
62
|
+
key. Name the exact action when you ask.
|
|
45
63
|
3. Org key: reuse the `RECLAIM_ORG_SECRET` the app already has. Otherwise an
|
|
46
64
|
organization owner calls `issue_org_token`. It writes the key to the
|
|
47
65
|
project's env file (default `.env`, variable `RECLAIM_ORG_SECRET`) and
|
|
@@ -254,6 +272,18 @@ Builder snapshots the organization's most recently updated active theme. A
|
|
|
254
272
|
localized consent block tells supported clients to show consent before the
|
|
255
273
|
first provider. Branding and theme data don't affect proof trust.
|
|
256
274
|
|
|
275
|
+
## Try a provider without an app
|
|
276
|
+
|
|
277
|
+
Session creation returns 409 while the org has no callback subscription.
|
|
278
|
+
`read_callback_events` creates the org's pull listener, which satisfies that
|
|
279
|
+
check and holds results for you to read. No tunnel or public URL is needed.
|
|
280
|
+
|
|
281
|
+
1. Call `read_callback_events`.
|
|
282
|
+
2. `create_verification_session`, then give the developer `verificationUrl`.
|
|
283
|
+
3. Poll `get_verification_session` until it is terminal.
|
|
284
|
+
`list_verification_events` shows progress.
|
|
285
|
+
4. Call `read_callback_events({ sessionId })` for the verified result.
|
|
286
|
+
|
|
257
287
|
## Call the direct Builder API
|
|
258
288
|
|
|
259
289
|
In `api=2` mode, send the registered client UUID in `x-reclaim-vc-id` on every
|
|
@@ -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:
|
|
2
|
+
// from packages/app/openapi.yaml (spec v0.1.0, source sha256:ecdb0ee6d82e).
|
|
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.
|
|
@@ -5116,7 +5116,7 @@ export const MCP_TOOLS = {
|
|
|
5116
5116
|
annotations: {"destructiveHint":true,"idempotentHint":true,"openWorldHint":false},
|
|
5117
5117
|
},
|
|
5118
5118
|
"DeleteOrgKeypair": {
|
|
5119
|
-
description: "Clear the organization's encryption keypair\n\nRemoves the organization's result encryption public key. Results are then delivered unencrypted until you set a new key. Run it only when the developer asks.",
|
|
5119
|
+
description: "Clear the organization's encryption keypair\n\nRemoves the organization's result encryption public key. Results are then delivered unencrypted until you set a new key. Run it only when the developer asks. To rotate the key, use `issue_org_keypair` with `replace: true` instead of deleting first.",
|
|
5120
5120
|
inputSchema: toZod({
|
|
5121
5121
|
"type": "object",
|
|
5122
5122
|
"properties": {
|
|
@@ -6700,7 +6700,7 @@ export const MCP_TOOLS = {
|
|
|
6700
6700
|
annotations: {"destructiveHint":true,"idempotentHint":true,"openWorldHint":false},
|
|
6701
6701
|
},
|
|
6702
6702
|
"SetOrgKeypair": {
|
|
6703
|
-
description: "Set (or rotate) the organization's encryption keypair\n\nRegisters the organization's result encryption public key and turns on encrypted result delivery. Send only the public key; the private key stays with the developer. If the organization already has a different key, the call returns 409 unless you pass replace: true. Pass it only when the developer asked to rotate the key, because results encrypted to the old key can no longer be decrypted. Setting the same key again succeeds.",
|
|
6703
|
+
description: "Set (or rotate) the organization's encryption keypair\n\nRegisters the organization's result encryption public key and turns on encrypted result delivery. Send only the public key; the private key stays with the developer. If the organization already has a different key, the call returns 409 unless you pass replace: true. Pass it only when the developer asked to rotate the key, because results encrypted to the old key can no longer be decrypted. Setting the same key again succeeds. To generate and store the private key in the project, use `issue_org_keypair` instead.",
|
|
6704
6704
|
inputSchema: toZod({
|
|
6705
6705
|
"type": "object",
|
|
6706
6706
|
"properties": {
|
|
@@ -6985,6 +6985,54 @@ export const MCP_TOOLS = {
|
|
|
6985
6985
|
}),
|
|
6986
6986
|
annotations: {"openWorldHint":false},
|
|
6987
6987
|
},
|
|
6988
|
+
"UpdateOrgKeypair": {
|
|
6989
|
+
description: "Turn result encryption on or off\n\nTurns result encryption on or off for the organization's existing key pair without changing the key. Use it when the developer asks to turn encryption on or off. When on, the app's callback needs `orgEthPrivateKey` to decrypt results. Returns 404 when the organization has no key pair; create one with `issue_org_keypair`.",
|
|
6990
|
+
inputSchema: toZod({
|
|
6991
|
+
"type": "object",
|
|
6992
|
+
"properties": {
|
|
6993
|
+
"params": {
|
|
6994
|
+
"type": "object",
|
|
6995
|
+
"properties": {
|
|
6996
|
+
"orgId": {
|
|
6997
|
+
"type": "string",
|
|
6998
|
+
"format": "uuid"
|
|
6999
|
+
}
|
|
7000
|
+
},
|
|
7001
|
+
"required": [
|
|
7002
|
+
"orgId"
|
|
7003
|
+
],
|
|
7004
|
+
"additionalProperties": false
|
|
7005
|
+
},
|
|
7006
|
+
"query": {
|
|
7007
|
+
"type": "object",
|
|
7008
|
+
"properties": {
|
|
7009
|
+
|
|
7010
|
+
}
|
|
7011
|
+
},
|
|
7012
|
+
"body": {
|
|
7013
|
+
"type": "object",
|
|
7014
|
+
"additionalProperties": false,
|
|
7015
|
+
"description": "Body for `PATCH /orgs/{orgId}/keypair`.",
|
|
7016
|
+
"required": [
|
|
7017
|
+
"canEncryptResult"
|
|
7018
|
+
],
|
|
7019
|
+
"properties": {
|
|
7020
|
+
"canEncryptResult": {
|
|
7021
|
+
"type": "boolean",
|
|
7022
|
+
"description": "Set to true to encrypt results to the organization's public key. Set to false to deliver results as plaintext."
|
|
7023
|
+
}
|
|
7024
|
+
}
|
|
7025
|
+
}
|
|
7026
|
+
},
|
|
7027
|
+
"required": [
|
|
7028
|
+
"params",
|
|
7029
|
+
"query",
|
|
7030
|
+
"body"
|
|
7031
|
+
],
|
|
7032
|
+
"additionalProperties": false
|
|
7033
|
+
}),
|
|
7034
|
+
annotations: {"openWorldHint":false},
|
|
7035
|
+
},
|
|
6988
7036
|
"UpdateProvider": {
|
|
6989
7037
|
description: "Update a provider\n\nUpdates a provider's metadata, such as title, description, or tags. Partial update — pass only the fields to change. Requires active membership. To change the recipe (initialUrl or requests), cut a new version with create_provider_version instead.",
|
|
6990
7038
|
inputSchema: toZod({
|
package/src/mcp/instructions.ts
CHANGED
|
@@ -59,7 +59,8 @@ const TOPIC_SUMMARIES: Record<string, string> = {
|
|
|
59
59
|
'overview': 'Terminology, your stance, and the authoring checklist.',
|
|
60
60
|
'contributions': 'Contributing a public provider as a volunteer: the '
|
|
61
61
|
+ 'candidate-and-review workflow and the extra rules it adds.',
|
|
62
|
-
'auth': 'Signing in to the backend,
|
|
62
|
+
'auth': 'Signing in to the backend, which token authorizes what, and '
|
|
63
|
+
+ 'the backend mode (Builder or legacy devtools).',
|
|
63
64
|
'devtools-migration': 'Importing a public legacy provider with the same '
|
|
64
65
|
+ 'UUID.',
|
|
65
66
|
'browser': 'The default local browser, the opt-in modes (attach, the '
|
|
@@ -71,15 +72,16 @@ const TOPIC_SUMMARIES: Record<string, string> = {
|
|
|
71
72
|
+ 'drafted shape.',
|
|
72
73
|
'params': 'Extracted vs consumer-supplied vs secret params, the URL '
|
|
73
74
|
+ 'character budget, and runtime resolution.',
|
|
74
|
-
'prove': 'replay_request, the mandatory auth-bound check, run_proof
|
|
75
|
-
+ 'diagnosing failures.',
|
|
75
|
+
'prove': 'replay_request, the mandatory auth-bound check, run_proof '
|
|
76
|
+
+ '(including the egress country), and diagnosing failures.',
|
|
76
77
|
'publish': 'Creating a provider, provider versions, multi-request '
|
|
77
78
|
+ 'providers, and going live.',
|
|
78
|
-
'discover': 'Reusing existing providers: finding, resolving,
|
|
79
|
-
+ 'creating a verification session.',
|
|
80
|
-
'integration': 'After start_integration: org key, callback
|
|
81
|
-
+ 'proxy_callback_events or deployed webhook), frontend and
|
|
82
|
-
+ 'over the HTTP session API
|
|
79
|
+
'discover': 'Reusing existing providers: finding, resolving, copying one '
|
|
80
|
+
+ 'that needs changes, and creating a verification session.',
|
|
81
|
+
'integration': 'After start_integration: org key and keypair, callback '
|
|
82
|
+
+ '(local proxy_callback_events or deployed webhook), frontend and '
|
|
83
|
+
+ 'backend over the HTTP session API, js-sdk projects, trying a '
|
|
84
|
+
+ 'session without an app; `api=2` and result verification.',
|
|
83
85
|
'user-script': 'The navigation script (jsUserScripts): sign-in redirect, '
|
|
84
86
|
+ 'multi-page walk, test_user_script with keep.',
|
|
85
87
|
'interception': 'injectionType / interceptorType, live interception, the '
|