@reclaimprotocol/agent 0.1.27 → 0.1.28
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/README.md +5 -5
- package/lib/authoring/tools.js +2 -1
- package/lib/consts.d.ts +1 -1
- package/lib/consts.js +1 -1
- package/lib/live/tunnel.d.ts +4 -0
- package/lib/live/tunnel.js +21 -12
- package/lib/mcp/api/operations.gen.d.ts +8 -8
- package/lib/mcp/api/operations.gen.js +339 -581
- package/lib/mcp/api/tools.d.ts +1 -1
- package/lib/mcp/instructions.js +5 -3
- package/lib/mcp/remap_errors.js +9 -5
- package/lib/mcp/start.js +1 -1
- package/lib/mcp/tools/agent/attach.d.ts +2 -2
- package/lib/mcp/tools/agent/attach.js +4 -0
- package/lib/mcp/tools/agent/build.d.ts +1 -1
- package/lib/mcp/tools/agent/live-view-url.d.ts +2 -0
- package/lib/mcp/tools/agent/live-view-url.js +11 -0
- package/lib/mcp/tools/agent/live-view.d.ts +4 -2
- package/lib/mcp/tools/agent/live-view.js +42 -39
- package/lib/mcp/tools/agent/propose.js +10 -4
- package/lib/mcp/tools/agent/publish.d.ts +1 -1
- package/lib/mcp/tools/agent/publish.js +49 -26
- package/lib/mcp/tools/agent/shared.js +0 -9
- package/lib/mcp/tools/authenticate/authenticate.d.ts +1 -1
- package/lib/mcp/tools/authenticate/build.d.ts +1 -1
- package/lib/mcp/tools/authenticate/builder-access.d.ts +1 -1
- package/lib/mcp/tools/verification/result.js +12 -13
- package/lib/old/login-cdp.d.ts +17 -6
- package/lib/old/login-cdp.js +28 -11
- package/lib/old/to-register.d.ts +6 -0
- package/lib/old/to-register.js +35 -5
- package/lib/old/tools/authenticate.d.ts +5 -4
- package/lib/old/tools/authenticate.js +9 -5
- package/lib/old/tools/publish.d.ts +2 -2
- package/lib/old/tools/publish.js +47 -21
- package/lib/proof/attestor-auth.d.ts +13 -0
- package/lib/proof/attestor-auth.js +16 -0
- package/lib/proof/attestor.d.ts +7 -4
- package/lib/proof/attestor.js +7 -4
- package/lib/proof/index.d.ts +1 -0
- package/lib/proof/index.js +1 -0
- package/lib/proof/pod-prover.d.ts +2 -0
- package/lib/proof/pod-prover.js +5 -5
- package/lib/provider/injection-doc.d.ts +2 -0
- package/lib/provider/injection-doc.js +7 -1
- package/lib/provider/post-publish-browser.d.ts +12 -0
- package/lib/provider/post-publish-browser.js +40 -0
- package/lib/provider/to-version.d.ts +19 -7
- package/lib/provider/to-version.js +67 -25
- package/lib/tools/registry.d.ts +1 -1
- package/lib/tools/registry.js +7 -4
- package/package.json +2 -2
- package/skill/SKILL.builder.md +118 -13
- package/skill/SKILL.common.md +30 -19
- package/skill/SKILL.old.md +22 -12
- package/skill/builder-mode.md +19 -9
- package/skill/community-contributions.md +108 -0
- package/skill/hash-validation.md +8 -5
- package/skill/interception.md +35 -22
- package/skill/old-mode.md +11 -5
- package/skill/user-script.md +41 -10
- package/src/authoring/tools.ts +2 -1
- package/src/consts.ts +1 -2
- package/src/live/tunnel.ts +28 -14
- package/src/mcp/api/operations.gen.ts +341 -585
- package/src/mcp/api/tools.ts +1 -1
- package/src/mcp/instructions.ts +5 -3
- package/src/mcp/remap_errors.ts +9 -7
- package/src/mcp/start.ts +1 -1
- package/src/mcp/tools/agent/attach.ts +6 -2
- package/src/mcp/tools/agent/build.ts +1 -1
- package/src/mcp/tools/agent/live-view-url.ts +13 -0
- package/src/mcp/tools/agent/live-view.ts +44 -39
- package/src/mcp/tools/agent/propose.ts +10 -4
- package/src/mcp/tools/agent/publish.ts +63 -28
- package/src/mcp/tools/agent/shared.ts +5 -0
- package/src/mcp/tools/authenticate/authenticate.ts +1 -1
- package/src/mcp/tools/authenticate/build.ts +1 -1
- package/src/mcp/tools/authenticate/builder-access.ts +1 -1
- package/src/mcp/tools/verification/result.ts +11 -13
- package/src/old/login-cdp.ts +38 -11
- package/src/old/to-register.ts +56 -7
- package/src/old/tools/authenticate.ts +9 -5
- package/src/old/tools/publish.ts +64 -22
- package/src/proof/attestor-auth.ts +33 -0
- package/src/proof/attestor.ts +14 -8
- package/src/proof/index.ts +4 -0
- package/src/proof/pod-prover.ts +7 -5
- package/src/provider/injection-doc.ts +9 -1
- package/src/provider/post-publish-browser.ts +56 -0
- package/src/provider/to-version.ts +104 -27
- package/src/tools/registry.ts +12 -9
package/README.md
CHANGED
|
@@ -69,12 +69,12 @@ Or more loosely:
|
|
|
69
69
|
|
|
70
70
|
The agent orchestrates the tools for you:
|
|
71
71
|
|
|
72
|
-
1. **`reclaim_authenticate`** — a Chrome window opens the Reclaim dashboard; you sign in. The token is captured automatically and the tab closes. (Or it reuses a still-valid cached identity.)
|
|
72
|
+
1. **`reclaim_authenticate`** — a local Chrome window opens the Reclaim dashboard; you sign in. The token is captured automatically and the tab closes. It never uses a Builder, container, custom-CDP, or shared browser. (Or it reuses a still-valid cached identity.)
|
|
73
73
|
2. **`attach_browser` + `navigate`** — uses local Chrome, a Builder-hosted remote browser, or a custom CDP websocket; **`wait_for_page`** waits while you log in.
|
|
74
74
|
3. **`start_capture` → `find_requests_containing` → `get_request`** — records network traffic and locates the request carrying your value.
|
|
75
75
|
4. **`propose_provider`** — drafts the provider (a `contains` match + `jsonPath`/`xPath`/`regex` redaction), keeping any secret headers server-side.
|
|
76
76
|
5. **`replay_request` → `run_proof`** — pre-flights the draft, then produces a verified zkTLS proof via the attestor.
|
|
77
|
-
6. **`create_provider_version_from_capture`** — publishes it. **`get_me_providers`** lists what you own; pass a returned `providerId` back to
|
|
77
|
+
6. **`create_provider_version_from_capture`** — publishes it as a new immutable semantic version. **`get_me_providers`** lists what you own; pass a returned `providerId` back to add a version. Patch is the default; request `major`, `minor`, `patch`, or an exact higher version.
|
|
78
78
|
|
|
79
79
|
Your only manual steps are signing in when the browser windows open and confirming the value you want to prove.
|
|
80
80
|
|
|
@@ -98,7 +98,7 @@ These capture/synthesis/proof tools are backend-independent and registered in bo
|
|
|
98
98
|
| `propose_provider` | Synthesize a provider — `contains` match + `jsonPath`/`xPath`/`regex` redaction |
|
|
99
99
|
| `replay_request` | Pre-flight replay via Node `fetch` (no attestor); also used for auth-bound check by omitting `secretParamsRef` |
|
|
100
100
|
| `run_proof` | End-to-end zkTLS proof through the attestor SDK |
|
|
101
|
-
| `create_provider_version_from_capture` | Publish a
|
|
101
|
+
| `create_provider_version_from_capture` | Publish a draft as a new immutable semantic version (patch by default) |
|
|
102
102
|
| `authenticate_builder` | In old-devtools mode only, sign in to Builder for remote-browser allocation |
|
|
103
103
|
| `list_builder_organizations` | In old-devtools mode only, list organization ids for a quota-accounted Builder browser |
|
|
104
104
|
| `share_browser_view`, `stop_browser_view` | Put the `container` browser's own live view behind a public HTTPS URL (cloudflared quick tunnel), so someone elsewhere can watch it and act in it — from a phone if they like. Container mode only: a `builder` browser already returns a hosted `liveViewUrl`, and a plain local browser has no view to share |
|
|
@@ -110,8 +110,8 @@ These capture/synthesis/proof tools are backend-independent and registered in bo
|
|
|
110
110
|
The MCP server targets one of two backends, selected by `USE_OLD_DEVTOOLS`:
|
|
111
111
|
|
|
112
112
|
- **Old devtools (default).** The legacy devtools backend is still in production while the new "builder" backend is built, so this is the default — opt into builder with `USE_OLD_DEVTOOLS=false`. In old mode all auto-generated HTTP-API tools are disabled and a small client (`src/old/`) serves:
|
|
113
|
-
- `reclaim_authenticate` — by default opens the dashboard in Chrome
|
|
114
|
-
- `create_provider_version_from_capture` — registers a new provider, or adds a
|
|
113
|
+
- `reclaim_authenticate` — by default opens the dashboard in local Chrome over loopback CDP, waits for sign-in, reads the Firebase token from page storage, and closes the tab. It never uses a remote or shared authoring browser. Pass a `token` / `ethAddress` to skip the browser.
|
|
114
|
+
- `create_provider_version_from_capture` — registers a new provider, or adds a new immutable semantic version when given a `providerId`. It never edits an existing version.
|
|
115
115
|
- `get_me_providers` — list the providers you own (the only provider-listing tool in this mode).
|
|
116
116
|
- `session_analytics_logs` — the milestone events for a verification session, which show how far it got.
|
|
117
117
|
- `session_logs` — the log entries the in-app SDK emitted during that session, each with its event type, log level, and logger name. Filter by event type, level, or substring, page with `limit` and `offset`, or set `saveTo` to write every matching entry to an NDJSON file. The backend searches only the last 3 days unless you pass `startTime` and `endTime`, and it deletes entries after 30 days.
|
package/lib/authoring/tools.js
CHANGED
|
@@ -129,7 +129,8 @@ export function authoringTools(resolveBackend) {
|
|
|
129
129
|
defineTool({
|
|
130
130
|
name: 'test_user_script',
|
|
131
131
|
description: 'Dry-run a USER SCRIPT (the `jsUserScripts` / `customInjection` '
|
|
132
|
-
+ 'field) in the LIVE attached tab
|
|
132
|
+
+ 'field) in the LIVE attached tab while authoring or after provider '
|
|
133
|
+
+ 'creation. Installs '
|
|
133
134
|
+ '`script` via CDP so it runs on the next navigation exactly as '
|
|
134
135
|
+ 'the real field would, then reports whether it ran and what it '
|
|
135
136
|
+ 'threw. With `navigateUrl`, it navigates there and removes the '
|
package/lib/consts.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* Each var's default/fallback literal is co-located with its getter.
|
|
17
17
|
*/
|
|
18
|
-
import { DEFAULT_BASE_URL } from '@reclaimprotocol/client';
|
|
18
|
+
import { DEFAULT_BASE_URL } from '@reclaimprotocol/client/api';
|
|
19
19
|
import { DEFAULT_OLD_API_URL, DEFAULT_OLD_LOGS_URL } from './old/client.ts';
|
|
20
20
|
import { DEFAULT_SDK_API_URL } from './old/sdk-client.ts';
|
|
21
21
|
/** Public attestor websocket URL — fallback for `RECLAIM_ATTESTOR_URL`. */
|
package/lib/consts.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* Each var's default/fallback literal is co-located with its getter.
|
|
17
17
|
*/
|
|
18
|
-
import { DEFAULT_BASE_URL } from '@reclaimprotocol/client';
|
|
18
|
+
import { DEFAULT_BASE_URL } from '@reclaimprotocol/client/api';
|
|
19
19
|
import { homedir } from 'node:os';
|
|
20
20
|
import { join } from 'node:path';
|
|
21
21
|
import { DEFAULT_OLD_API_URL, DEFAULT_OLD_LOGS_URL } from "./old/client.js";
|
package/lib/live/tunnel.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import { type CloudflaredBinary } from './cloudflared.ts';
|
|
|
2
2
|
export interface Tunnel {
|
|
3
3
|
/** The public HTTPS origin Cloudflare assigned. */
|
|
4
4
|
url: string;
|
|
5
|
+
/** Whether the public viewer answered during the initial readiness probe. */
|
|
6
|
+
ready: boolean;
|
|
7
|
+
/** Bounded cloudflared output when the edge is still propagating. */
|
|
8
|
+
cloudflaredLog?: string;
|
|
5
9
|
/** Terminate the tunnel. Safe to call more than once. */
|
|
6
10
|
stop: () => Promise<void>;
|
|
7
11
|
/** Which cloudflared ran, and whether we had to fetch it. */
|
package/lib/live/tunnel.js
CHANGED
|
@@ -23,9 +23,9 @@ import { LOGGER } from "../logger.js";
|
|
|
23
23
|
import { resolveCloudflared } from "./cloudflared.js";
|
|
24
24
|
/** How long to wait for cloudflared to report its hostname before giving up. */
|
|
25
25
|
const URL_TIMEOUT_MS = 30000;
|
|
26
|
-
/** After the hostname is printed, Cloudflare needs
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
/** After the hostname is printed, Cloudflare needs time before the edge routes
|
|
27
|
+
* to it. Probe briefly, then return the still-running tunnel as propagating so
|
|
28
|
+
* slow DNS or edge setup does not destroy an otherwise healthy share. */
|
|
29
29
|
const READY_TIMEOUT_MS = 20000;
|
|
30
30
|
const READY_POLL_MS = 1000;
|
|
31
31
|
const STOP_TIMEOUT_MS = 5000;
|
|
@@ -109,7 +109,9 @@ export async function startTunnel(port, { autoInstall = true, probePath = '/', r
|
|
|
109
109
|
// Keep watching after the hostname so a readiness failure can include
|
|
110
110
|
// cloudflared's account of what happened.
|
|
111
111
|
tail = (tail + text).slice(-LOG_TAIL_BYTES);
|
|
112
|
-
|
|
112
|
+
// Search the accumulated tail so a URL split across stream chunks is not
|
|
113
|
+
// missed. The tail is bounded and the URL appears near startup.
|
|
114
|
+
const match = QUICK_TUNNEL_URL.exec(tail);
|
|
113
115
|
if (match) {
|
|
114
116
|
const url = match[0];
|
|
115
117
|
finish(() => {
|
|
@@ -119,17 +121,24 @@ export async function startTunnel(port, { autoInstall = true, probePath = '/', r
|
|
|
119
121
|
&& child.signalCode === null,
|
|
120
122
|
pollMs: readyPollMs,
|
|
121
123
|
timeoutMs: readyTimeoutMs,
|
|
122
|
-
}).then(
|
|
124
|
+
}).then((ready) => {
|
|
123
125
|
if (ready) {
|
|
124
|
-
resolve({ url, stop, binary });
|
|
126
|
+
resolve({ url, ready, stop, binary });
|
|
125
127
|
return;
|
|
126
128
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
if (child.exitCode !== null || child.signalCode !== null) {
|
|
130
|
+
reject(new Error('cloudflared exited before the public viewer became reachable. '
|
|
131
|
+
+ 'cloudflared output:\n' + tail));
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
LOGGER.warn({ url, tail }, 'tunnel still propagating; returning the live hostname');
|
|
135
|
+
resolve({
|
|
136
|
+
url,
|
|
137
|
+
ready,
|
|
138
|
+
cloudflaredLog: tail,
|
|
139
|
+
stop,
|
|
140
|
+
binary,
|
|
141
|
+
});
|
|
133
142
|
});
|
|
134
143
|
});
|
|
135
144
|
}
|
|
@@ -19,6 +19,10 @@ export declare const MCP_TOOLS: {
|
|
|
19
19
|
description: string;
|
|
20
20
|
inputSchema: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
21
21
|
};
|
|
22
|
+
BindVerificationSessionTeeNonce: {
|
|
23
|
+
description: string;
|
|
24
|
+
inputSchema: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
25
|
+
};
|
|
22
26
|
CancelPublicListingRequest: {
|
|
23
27
|
description: string;
|
|
24
28
|
inputSchema: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
@@ -67,10 +71,6 @@ export declare const MCP_TOOLS: {
|
|
|
67
71
|
description: string;
|
|
68
72
|
inputSchema: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
69
73
|
};
|
|
70
|
-
DeleteProviderVersion: {
|
|
71
|
-
description: string;
|
|
72
|
-
inputSchema: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
73
|
-
};
|
|
74
74
|
DiscoverDataPoints: {
|
|
75
75
|
description: string;
|
|
76
76
|
inputSchema: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
@@ -107,6 +107,10 @@ export declare const MCP_TOOLS: {
|
|
|
107
107
|
description: string;
|
|
108
108
|
inputSchema: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
109
109
|
};
|
|
110
|
+
GetVerificationFunnel: {
|
|
111
|
+
description: string;
|
|
112
|
+
inputSchema: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
113
|
+
};
|
|
110
114
|
GetVerificationSession: {
|
|
111
115
|
description: string;
|
|
112
116
|
inputSchema: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
@@ -199,10 +203,6 @@ export declare const MCP_TOOLS: {
|
|
|
199
203
|
description: string;
|
|
200
204
|
inputSchema: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
201
205
|
};
|
|
202
|
-
UpdateProviderVersion: {
|
|
203
|
-
description: string;
|
|
204
|
-
inputSchema: import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
205
|
-
};
|
|
206
206
|
};
|
|
207
207
|
export type McpToolName = keyof typeof MCP_TOOLS;
|
|
208
208
|
export type McpToolShape = (typeof MCP_TOOLS)[McpToolName];
|