@reclaimprotocol/agent 0.1.17 → 0.1.20

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 (171) hide show
  1. package/README.md +6 -2
  2. package/lib/authoring/backend.d.ts +4 -0
  3. package/lib/authoring/tools.js +4 -1
  4. package/lib/cdp/capture.d.ts +2 -2
  5. package/lib/cdp/capture.js +25 -21
  6. package/lib/cdp/client.d.ts +39 -1
  7. package/lib/cdp/client.js +125 -1
  8. package/lib/consts.d.ts +7 -0
  9. package/lib/consts.js +15 -0
  10. package/lib/mcp/api/operations.gen.js +33 -9
  11. package/lib/mcp/instructions.js +27 -3
  12. package/lib/mcp/start.js +12 -8
  13. package/lib/mcp/tools/agent/attach.d.ts +18 -4
  14. package/lib/mcp/tools/agent/attach.js +142 -52
  15. package/lib/mcp/tools/agent/build.d.ts +1 -1
  16. package/lib/mcp/tools/agent/build.js +5 -3
  17. package/lib/mcp/tools/agent/capture.d.ts +1 -0
  18. package/lib/mcp/tools/agent/capture.js +8 -1
  19. package/lib/mcp/tools/agent/eval.js +2 -3
  20. package/lib/mcp/tools/agent/how-it-works.d.ts +1 -1
  21. package/lib/mcp/tools/agent/how-it-works.js +1 -1
  22. package/lib/mcp/tools/agent/publish.js +55 -1
  23. package/lib/mcp/tools/agent/session.d.ts +2 -2
  24. package/lib/mcp/tools/agent/session.js +21 -5
  25. package/lib/mcp/tools/agent/shared.js +4 -6
  26. package/lib/mcp/tools/authenticate/authenticate.d.ts +1 -1
  27. package/lib/mcp/tools/authenticate/authenticate.js +10 -4
  28. package/lib/mcp/tools/authenticate/builder-access.d.ts +8 -0
  29. package/lib/mcp/tools/authenticate/builder-access.js +31 -0
  30. package/lib/mcp/tools/authenticate/index.d.ts +1 -0
  31. package/lib/mcp/tools/authenticate/index.js +1 -0
  32. package/lib/mcp/tools/mode/mode.d.ts +3 -2
  33. package/lib/mcp/tools/mode/mode.js +24 -4
  34. package/lib/old/login-cdp.js +11 -3
  35. package/lib/old/to-register.d.ts +16 -8
  36. package/lib/old/to-register.js +29 -21
  37. package/lib/old/tools/publish.js +109 -9
  38. package/lib/provider/draft.d.ts +20 -0
  39. package/lib/provider/draft.js +75 -51
  40. package/lib/provider/index.d.ts +1 -1
  41. package/lib/provider/index.js +1 -1
  42. package/lib/provider/injection-doc.js +4 -3
  43. package/lib/provider/schema.d.ts +26 -1
  44. package/lib/provider/secrets.d.ts +37 -0
  45. package/lib/provider/secrets.js +147 -6
  46. package/lib/provider/to-version.d.ts +26 -2
  47. package/lib/provider/to-version.js +29 -5
  48. package/package.json +2 -2
  49. package/skill/SKILL.builder.md +43 -95
  50. package/skill/SKILL.common.md +102 -0
  51. package/skill/SKILL.old.md +20 -74
  52. package/skill/builder-mode.md +4 -2
  53. package/skill/injection-api.md +95 -10
  54. package/skill/old-mode.md +5 -3
  55. package/src/authoring/backend.ts +4 -0
  56. package/src/authoring/tools.ts +4 -1
  57. package/src/cdp/capture.ts +24 -24
  58. package/src/cdp/client.ts +197 -2
  59. package/src/consts.ts +20 -0
  60. package/src/mcp/api/operations.gen.ts +33 -9
  61. package/src/mcp/instructions.ts +36 -3
  62. package/src/mcp/start.ts +13 -8
  63. package/src/mcp/tools/agent/attach.ts +198 -57
  64. package/src/mcp/tools/agent/build.ts +9 -2
  65. package/src/mcp/tools/agent/capture.ts +10 -1
  66. package/src/mcp/tools/agent/eval.ts +2 -3
  67. package/src/mcp/tools/agent/how-it-works.ts +1 -1
  68. package/src/mcp/tools/agent/publish.ts +64 -1
  69. package/src/mcp/tools/agent/session.ts +29 -8
  70. package/src/mcp/tools/agent/shared.ts +5 -10
  71. package/src/mcp/tools/authenticate/authenticate.ts +14 -4
  72. package/src/mcp/tools/authenticate/builder-access.ts +42 -0
  73. package/src/mcp/tools/authenticate/index.ts +4 -0
  74. package/src/mcp/tools/mode/mode.ts +28 -4
  75. package/src/old/login-cdp.ts +13 -3
  76. package/src/old/to-register.ts +50 -27
  77. package/src/old/tools/publish.ts +131 -9
  78. package/src/provider/draft.ts +98 -56
  79. package/src/provider/index.ts +9 -1
  80. package/src/provider/injection-doc.ts +4 -3
  81. package/src/provider/schema.ts +27 -1
  82. package/src/provider/secrets.ts +171 -6
  83. package/src/provider/to-version.ts +53 -7
  84. package/lib/authoring/find.d.ts +0 -3
  85. package/lib/authoring/find.js +0 -54
  86. package/lib/authoring/propose.d.ts +0 -3
  87. package/lib/authoring/propose.js +0 -109
  88. package/lib/authoring/replay.d.ts +0 -10
  89. package/lib/authoring/replay.js +0 -34
  90. package/lib/cli/args.d.ts +0 -14
  91. package/lib/cli/args.js +0 -19
  92. package/lib/cli/commands.d.ts +0 -1
  93. package/lib/cli/commands.js +0 -19
  94. package/lib/cli.d.ts +0 -1
  95. package/lib/cli.js +0 -7
  96. package/lib/mcp/credentials/authenticate.d.ts +0 -3
  97. package/lib/mcp/credentials/authenticate.js +0 -108
  98. package/lib/mcp/credentials/build.d.ts +0 -5
  99. package/lib/mcp/credentials/build.js +0 -18
  100. package/lib/mcp/credentials/cache.d.ts +0 -70
  101. package/lib/mcp/credentials/cache.js +0 -131
  102. package/lib/mcp/credentials/env-file.d.ts +0 -25
  103. package/lib/mcp/credentials/env-file.js +0 -71
  104. package/lib/mcp/credentials/import.d.ts +0 -2
  105. package/lib/mcp/credentials/import.js +0 -52
  106. package/lib/mcp/credentials/issue.d.ts +0 -2
  107. package/lib/mcp/credentials/issue.js +0 -84
  108. package/lib/mcp/credentials/keypair.d.ts +0 -17
  109. package/lib/mcp/credentials/keypair.js +0 -48
  110. package/lib/mcp/credentials/link.d.ts +0 -3
  111. package/lib/mcp/credentials/link.js +0 -107
  112. package/lib/mcp/credentials/list-cached.d.ts +0 -2
  113. package/lib/mcp/credentials/list-cached.js +0 -55
  114. package/lib/mcp/credentials/owner-key.d.ts +0 -23
  115. package/lib/mcp/credentials/owner-key.js +0 -58
  116. package/lib/mcp/credentials/paths.d.ts +0 -12
  117. package/lib/mcp/credentials/paths.js +0 -35
  118. package/lib/mcp/credentials/poll.d.ts +0 -27
  119. package/lib/mcp/credentials/poll.js +0 -61
  120. package/lib/mcp/credentials/register.d.ts +0 -18
  121. package/lib/mcp/credentials/register.js +0 -30
  122. package/lib/mcp/credentials/resolve-owner-key.d.ts +0 -12
  123. package/lib/mcp/credentials/resolve-owner-key.js +0 -68
  124. package/lib/mcp/credentials/session-cache.d.ts +0 -14
  125. package/lib/mcp/credentials/session-cache.js +0 -42
  126. package/lib/mcp/credentials/status.d.ts +0 -3
  127. package/lib/mcp/credentials/status.js +0 -76
  128. package/lib/mcp/register.d.ts +0 -38
  129. package/lib/mcp/register.js +0 -80
  130. package/lib/mcp/tools/analyze.d.ts +0 -3
  131. package/lib/mcp/tools/analyze.js +0 -26
  132. package/lib/mcp/tools/attach.d.ts +0 -11
  133. package/lib/mcp/tools/attach.js +0 -72
  134. package/lib/mcp/tools/capture.d.ts +0 -10
  135. package/lib/mcp/tools/capture.js +0 -142
  136. package/lib/mcp/tools/eval.d.ts +0 -5
  137. package/lib/mcp/tools/eval.js +0 -127
  138. package/lib/mcp/tools/find.d.ts +0 -3
  139. package/lib/mcp/tools/find.js +0 -60
  140. package/lib/mcp/tools/owner-key.d.ts +0 -2
  141. package/lib/mcp/tools/owner-key.js +0 -63
  142. package/lib/mcp/tools/proof.d.ts +0 -3
  143. package/lib/mcp/tools/proof.js +0 -214
  144. package/lib/mcp/tools/propose.d.ts +0 -9
  145. package/lib/mcp/tools/propose.js +0 -75
  146. package/lib/mcp/tools/publish.d.ts +0 -3
  147. package/lib/mcp/tools/publish.js +0 -59
  148. package/lib/mcp/tools/replay.d.ts +0 -3
  149. package/lib/mcp/tools/replay.js +0 -46
  150. package/lib/mcp/tools/session.d.ts +0 -10
  151. package/lib/mcp/tools/session.js +0 -29
  152. package/lib/mcp/tools/verification/diagnose.d.ts +0 -11
  153. package/lib/mcp/tools/verification/diagnose.js +0 -132
  154. package/lib/mcp/verifications/build.d.ts +0 -5
  155. package/lib/mcp/verifications/build.js +0 -14
  156. package/lib/mcp/verifications/create.d.ts +0 -3
  157. package/lib/mcp/verifications/create.js +0 -57
  158. package/lib/mcp/verifications/find.d.ts +0 -3
  159. package/lib/mcp/verifications/find.js +0 -37
  160. package/lib/mcp/verifications/get.d.ts +0 -3
  161. package/lib/mcp/verifications/get.js +0 -26
  162. package/lib/mcp/verifications/update.d.ts +0 -3
  163. package/lib/mcp/verifications/update.js +0 -78
  164. package/lib/old/tools/get-version-config.d.ts +0 -17
  165. package/lib/old/tools/get-version-config.js +0 -47
  166. package/lib/routes.gen.d.ts +0 -271
  167. package/lib/routes.gen.js +0 -73
  168. package/lib/types/openapi.d.ts +0 -4
  169. package/lib/types/openapi.gen.d.ts +0 -3967
  170. package/lib/types/openapi.gen.js +0 -5
  171. package/lib/types/openapi.js +0 -1
@@ -1,46 +0,0 @@
1
- import { replayProvider } from "../../proof/replay.js";
2
- import { defineTool } from "../server.js";
3
- export function replayTool(secrets) {
4
- return defineTool({
5
- name: 'replay_request',
6
- description: 'Replay a drafted provider against the live endpoint ' +
7
- 'using Node fetch (no attestor). ' +
8
- 'Pre-flight gate before run_proof — ' +
9
- 'diagnoses CSRF / token-rotation / matcher-too-tight ' +
10
- 'issues with richer hints than the attestor would produce.',
11
- inputSchema: {
12
- type: 'object',
13
- properties: {
14
- // `type: 'object'` is required so MCP clients (the LLM)
15
- // serialize the value as an object, not a JSON-stringified
16
- // string. `properties: {}` is required so zod-from-json-schema
17
- // compiles to a passthrough instead of strict-strip — leaving
18
- // it off makes the server receive `{}`.
19
- provider: { type: 'object', properties: {} },
20
- secretParamsRef: { type: 'string' },
21
- },
22
- required: ['provider'],
23
- },
24
- }, async ({ provider, secretParamsRef }) => {
25
- let resolved = {};
26
- if (secretParamsRef !== undefined) {
27
- const r = secrets.resolve(secretParamsRef);
28
- if (!r) {
29
- throw new Error(`unknown secretParamsRef "${secretParamsRef}" — ` +
30
- 'the MCP server has restarted or reset_session was called. ' +
31
- 'Re-run propose_provider to mint a fresh ref.');
32
- }
33
- resolved = r;
34
- }
35
- const result = await replayProvider(provider, resolved);
36
- const out = {
37
- status: result.status,
38
- matchesOriginal: result.matchesOriginal,
39
- bodySnippet: result.body.slice(0, 256),
40
- };
41
- if (result.hints !== undefined) {
42
- out.hints = result.hints;
43
- }
44
- return out;
45
- });
46
- }
@@ -1,10 +0,0 @@
1
- import type { ConfigStore } from '../../config/store.ts';
2
- import { type RegisteredTool } from '../server.ts';
3
- import type { AttachState } from './attach.ts';
4
- import type { CaptureStore } from './capture.ts';
5
- export declare function sessionTools(attachRef: {
6
- current?: AttachState;
7
- config: ConfigStore;
8
- }, captures: CaptureStore, secrets: {
9
- clear: () => void;
10
- }): RegisteredTool[];
@@ -1,29 +0,0 @@
1
- import { defineTool } from "../server.js";
2
- export function sessionTools(attachRef, captures, secrets) {
3
- return [
4
- defineTool({
5
- name: 'get_session',
6
- description: 'Return current attach state, active captures, and persisted config.',
7
- inputSchema: { type: 'object', properties: {} },
8
- }, async () => ({
9
- config: attachRef.config.read(),
10
- attached: Boolean(attachRef.current),
11
- port: attachRef.current?.port,
12
- captures: [...captures.sessions.keys()],
13
- activeTab: captures.activeTab,
14
- })),
15
- defineTool({
16
- name: 'reset_session',
17
- description: 'Stop all captures, drop in-memory secrets, and clear capture state.',
18
- inputSchema: { type: 'object', properties: {} },
19
- }, async () => {
20
- for (const s of captures.sessions.values()) {
21
- await s.stop().catch(() => { });
22
- }
23
- captures.sessions.clear();
24
- delete captures.activeTab;
25
- secrets.clear();
26
- return { reset: true };
27
- }),
28
- ];
29
- }
@@ -1,11 +0,0 @@
1
- import { type ReclaimClient } from '@reclaimprotocol/client';
2
- import { type RegisteredTool } from '../../server.ts';
3
- /**
4
- * `diagnose_verification_session` — one call that answers "what's wrong
5
- * with this session?". Pulls the session, its full event log, and its
6
- * callback-delivery diagnostics, then derives findings (where the flow
7
- * stalled or failed) and concrete suggestions (what to check or do next).
8
- * Read-only; authenticates with the active eth credential like
9
- * `get_verification_result`.
10
- */
11
- export declare function verificationDiagnoseTool(client: ReclaimClient): RegisteredTool;
@@ -1,132 +0,0 @@
1
- import { buildAuthHeaders } from '@reclaimprotocol/client';
2
- import { defineTool } from "../../server.js";
3
- import { resolveActivePrivateKey } from "./result.js";
4
- const TERMINAL = new Set(['success', 'rejected', 'error']);
5
- /**
6
- * `diagnose_verification_session` — one call that answers "what's wrong
7
- * with this session?". Pulls the session, its full event log, and its
8
- * callback-delivery diagnostics, then derives findings (where the flow
9
- * stalled or failed) and concrete suggestions (what to check or do next).
10
- * Read-only; authenticates with the active eth credential like
11
- * `get_verification_result`.
12
- */
13
- export function verificationDiagnoseTool(client) {
14
- return defineTool({
15
- name: 'diagnose_verification_session',
16
- description: 'Diagnose a verification session: fetches its status, event ' +
17
- 'timeline, and callback-delivery state, then reports findings ' +
18
- '(where the flow stalled or failed — link never opened, proof ' +
19
- 'failed, callback endpoint erroring, dead-lettered delivery, ' +
20
- 'expiry) and suggested next steps. Read-only. Use ' +
21
- 'get_verification_result to fetch and decrypt the actual result.',
22
- inputSchema: {
23
- type: 'object',
24
- required: ['sessionId'],
25
- properties: {
26
- sessionId: {
27
- type: 'string',
28
- description: 'The verification session id to diagnose.',
29
- },
30
- },
31
- },
32
- }, async (args) => {
33
- const privateKey = resolveActivePrivateKey();
34
- const auth = () => buildAuthHeaders(privateKey, 'VerificationAuth');
35
- const params = { sessionId: args.sessionId };
36
- const [session, events, deliveries] = await Promise.all([
37
- client.call('GetVerificationSession', { params, headers: auth() })
38
- .then((r) => r.data),
39
- client.call('ListVerificationEvents', { params, headers: auth() })
40
- .then((r) => r.data.items),
41
- client.call('ListVerificationDeliveries', { params, headers: auth() })
42
- .then((r) => r.data.items),
43
- ]);
44
- const seen = new Set(events.map((e) => e.event));
45
- const last = events[events.length - 1];
46
- const findings = [];
47
- const suggestions = [];
48
- // Where did the flow get to?
49
- if (session.status === 'pending') {
50
- if (new Date(session.expiresAt).getTime() < Date.now()) {
51
- findings.push('Session is past expiresAt — it will flip to expired on the ' +
52
- 'next sweep; the end-user can no longer complete it.');
53
- suggestions.push('Create a new session and share a fresh link.');
54
- }
55
- else if (!seen.has('verification_client_opened')) {
56
- findings.push('The end-user has not opened the verification link yet.');
57
- suggestions.push(`Re-share the link (${session.verificationUrl}) before ` +
58
- `it expires at ${session.expiresAt}.`);
59
- }
60
- else if (!seen.has('request_matched')) {
61
- findings.push('The page was opened but the target request was never ' +
62
- 'captured — the end-user likely has not completed the ' +
63
- 'login/journey on the provider site.');
64
- }
65
- else {
66
- findings.push('Proof flow is in progress — the target request was ' +
67
- 'captured and the run has not reached a terminal event.');
68
- }
69
- }
70
- if (session.status === 'expired') {
71
- findings.push(seen.has('verification_client_opened')
72
- ? 'Session expired mid-flow — the end-user started but did ' +
73
- 'not finish before expiresAt.'
74
- : 'Session expired without the link ever being opened.');
75
- suggestions.push('Create a new session and share a fresh link.');
76
- }
77
- // Surface failure detail from the event log.
78
- for (const e of events) {
79
- if (e.event === 'request_claim_failed' ||
80
- e.event === 'request_claim_rejected' ||
81
- e.event === 'verification_error' ||
82
- e.event === 'verification_rejected') {
83
- findings.push(`${e.event} at ${e.createdAt}` +
84
- (e.eventData ? `: ${JSON.stringify(e.eventData)}` : ''));
85
- }
86
- }
87
- // Callback delivery health (only meaningful after a terminal event).
88
- for (const d of deliveries) {
89
- if (d.deliveryStatus === 'delivered') {
90
- continue;
91
- }
92
- findings.push(`Callback to ${d.callbackUrl} is ${d.deliveryStatus} after ` +
93
- `${d.attempts} attempt(s)` +
94
- (d.lastError ? ` — last error: ${d.lastError}` : '') +
95
- (d.deadLettered ? ' (dead-lettered; retries exhausted)' : ''));
96
- suggestions.push(`Check that ${d.callbackUrl} is reachable and answers 2xx.`);
97
- if (d.deadLettered) {
98
- suggestions.push('Once the endpoint is fixed, re-deliver via ' +
99
- 'POST /verifications/sessions/{sessionId}/retry-callback ' +
100
- '(or ask an admin to retry it from the Callback DLQ).');
101
- }
102
- }
103
- if (TERMINAL.has(session.status) &&
104
- deliveries.every((d) => d.deliveryStatus === 'delivered')) {
105
- suggestions.push('Result delivered. Use get_verification_result to fetch and ' +
106
- 'decrypt it locally.');
107
- }
108
- if (!findings.length) {
109
- findings.push('No problems detected.');
110
- }
111
- return {
112
- sessionId: session.id,
113
- status: session.status,
114
- callbackDeliveryStatus: session.callbackDeliveryStatus,
115
- mode: session.mode,
116
- createdAt: session.createdAt,
117
- expiresAt: session.expiresAt,
118
- completedAt: session.completedAt,
119
- lastEvent: last
120
- ? { event: last.event, at: last.createdAt }
121
- : undefined,
122
- events: events.map((e) => ({
123
- event: e.event,
124
- at: e.createdAt,
125
- ...(e.eventData ? { data: e.eventData } : {}),
126
- })),
127
- deliveries,
128
- findings,
129
- suggestions,
130
- };
131
- });
132
- }
@@ -1,5 +0,0 @@
1
- import type { ReclaimClient } from '@reclaimprotocol/client';
2
- import type { RegisteredTool } from '../server.ts';
3
- /** Verification CRUD tools — build the flat list of RegisteredTool
4
- * entries. Mirrors buildAgentTools() in mcp/register.ts. */
5
- export declare function buildVerificationTools(client: ReclaimClient): RegisteredTool[];
@@ -1,14 +0,0 @@
1
- import { createTool } from "./create.js";
2
- import { findTool } from "./find.js";
3
- import { getTool } from "./get.js";
4
- import { updateTool } from "./update.js";
5
- /** Verification CRUD tools — build the flat list of RegisteredTool
6
- * entries. Mirrors buildAgentTools() in mcp/register.ts. */
7
- export function buildVerificationTools(client) {
8
- return [
9
- findTool(client),
10
- getTool(client),
11
- createTool(client),
12
- updateTool(client),
13
- ];
14
- }
@@ -1,3 +0,0 @@
1
- import type { ReclaimClient } from '@reclaimprotocol/client';
2
- import { type RegisteredTool } from '../server.ts';
3
- export declare function createTool(client: ReclaimClient): RegisteredTool;
@@ -1,57 +0,0 @@
1
- import { defineTool } from "../server.js";
2
- export function createTool(client) {
3
- return defineTool({
4
- name: 'create_verification',
5
- description: 'Create a new Reclaim verification. Use this only ' +
6
- 'after `find_verification` returned nothing useful ' +
7
- 'for the domain. The caller must be an active ' +
8
- 'member of the target organization.',
9
- inputSchema: {
10
- type: 'object',
11
- properties: {
12
- orgId: {
13
- type: 'string',
14
- description: 'uuid identifier of the organization ' +
15
- 'that will own the verification.'
16
- },
17
- domain: {
18
- type: 'string',
19
- minLength: 1,
20
- maxLength: 200,
21
- description: 'Canonical root domain (e.g. `github.com`). ' +
22
- 'No scheme, no port, no path.',
23
- },
24
- slug: {
25
- type: 'string',
26
- pattern: '^[a-z0-9]+(?:-[a-z0-9]+)*$',
27
- minLength: 1,
28
- maxLength: 100,
29
- description: 'URL-safe identifier. Globally unique — pick ' +
30
- 'something domain-specific like `github-followers`.',
31
- },
32
- title: {
33
- type: 'string',
34
- minLength: 1,
35
- maxLength: 100,
36
- description: 'Short headline shown to end-users. Defaults ' +
37
- 'to a domain-derived brand name.',
38
- },
39
- description: { type: 'string', minLength: 1, maxLength: 2000 },
40
- iconUrl: { type: 'string', description: 'uri of the icon' },
41
- tags: { type: 'array', items: { type: 'string' }, maxItems: 50 },
42
- },
43
- required: ['orgId', 'domain', 'slug'],
44
- },
45
- }, async (args) => client.call('CreateProvider', {
46
- body: {
47
- orgId: args.orgId,
48
- domain: args.domain,
49
- slug: args.slug,
50
- title: args.title,
51
- description: args.description,
52
- iconUrl: args.iconUrl,
53
- tags: args.tags ?? [],
54
- visibility: 'PRIVATE'
55
- },
56
- }));
57
- }
@@ -1,3 +0,0 @@
1
- import type { ReclaimClient } from '@reclaimprotocol/client';
2
- import { type RegisteredTool } from '../server.ts';
3
- export declare function findTool(client: ReclaimClient): RegisteredTool;
@@ -1,37 +0,0 @@
1
- import { defineTool } from "../server.js";
2
- export function findTool(client) {
3
- return defineTool({
4
- name: 'find_verification',
5
- description: 'Search published Reclaim verifications by domain or ' +
6
- 'data point. A verification is the recipe an end-user ' +
7
- 'follows to prove something about themselves (e.g. ' +
8
- '"I have N followers on Twitter"). Returns a list of ' +
9
- 'matches. Call this BEFORE `create_verification` — ' +
10
- 'most popular domains already have a public ' +
11
- 'verification you can reuse.',
12
- inputSchema: {
13
- type: 'object',
14
- properties: {
15
- query: {
16
- type: 'string',
17
- minLength: 1,
18
- maxLength: 200,
19
- description: 'Free-text query. Matches domain (e.g. ' +
20
- '"github.com"), title, description, and the ' +
21
- 'data points a verification can prove.',
22
- },
23
- tags: {
24
- type: 'array',
25
- items: { type: 'string' },
26
- description: 'Restrict to verifications carrying every tag.',
27
- },
28
- limit: { type: 'number', minimum: 1, maximum: 100 },
29
- },
30
- },
31
- }, async (args) => client.call('Providers', {
32
- query: {
33
- q: args.query,
34
- tag: args.tags ?? [],
35
- },
36
- }));
37
- }
@@ -1,3 +0,0 @@
1
- import type { ReclaimClient } from '@reclaimprotocol/client';
2
- import { type RegisteredTool } from '../server.ts';
3
- export declare function getTool(client: ReclaimClient): RegisteredTool;
@@ -1,26 +0,0 @@
1
- import { defineTool } from "../server.js";
2
- export function getTool(client) {
3
- return defineTool({
4
- name: 'get_verification',
5
- description: 'Fetch a single Reclaim verification by id. Returns ' +
6
- 'every field needed to integrate it into a flow: ' +
7
- 'domain, the live version (initialUrl + requests), ' +
8
- 'and the data points it can prove. Use ' +
9
- '`find_verification` first if you only have a query ' +
10
- 'string.',
11
- inputSchema: {
12
- type: 'object',
13
- properties: {
14
- providerId: {
15
- type: 'string',
16
- description: 'UUID of the verification. (Internally stored ' +
17
- 'as `providerId` — the field name reflects ' +
18
- 'the openapi schema.)',
19
- },
20
- },
21
- required: ['providerId'],
22
- },
23
- }, async (args) => client.call('GetProvider', {
24
- params: { providerId: args.providerId },
25
- }));
26
- }
@@ -1,3 +0,0 @@
1
- import type { ReclaimClient } from '@reclaimprotocol/client';
2
- import { type RegisteredTool } from '../server.ts';
3
- export declare function updateTool(client: ReclaimClient): RegisteredTool;
@@ -1,78 +0,0 @@
1
- import { defineTool } from "../server.js";
2
- export function updateTool(client) {
3
- return defineTool({
4
- name: 'update_verification',
5
- description: "Update a Reclaim verification's metadata. Partial " +
6
- 'PATCH — pass only fields you want to change. The ' +
7
- 'caller must be an active member of the owning ' +
8
- "organization. To change the verification's " +
9
- 'recipe (initialUrl, requests, …) cut a new ' +
10
- 'version via the dashboard. Use `seo` to control how ' +
11
- 'the verification appears in search results and social ' +
12
- 'shares; omit a subfield to keep the server default.',
13
- inputSchema: {
14
- type: 'object',
15
- properties: {
16
- providerId: {
17
- type: 'string',
18
- description: 'UUID of the verification. (Internally stored ' +
19
- 'as `providerId` — the field name reflects ' +
20
- 'the openapi schema.)',
21
- },
22
- title: { type: 'string', minLength: 1, maxLength: 100 },
23
- description: { type: 'string', minLength: 1, maxLength: 2000 },
24
- iconUrl: { type: 'string', description: 'uri of icon' },
25
- clearIcon: {
26
- type: 'boolean',
27
- description: 'Set true to wipe the icon explicitly.',
28
- },
29
- visibility: { type: 'string', enum: ['PRIVATE', 'PUBLIC'] },
30
- status: { type: 'string', enum: ['ACTIVE', 'ARCHIVED'] },
31
- tags: { type: 'array', items: { type: 'string' }, maxItems: 50 },
32
- seo: {
33
- type: 'object',
34
- additionalProperties: false,
35
- description: 'Author SEO overrides. Each field falls back to a ' +
36
- 'server-derived suggestion when unset.',
37
- properties: {
38
- brandUrl: {
39
- type: 'string',
40
- maxLength: 2000,
41
- description: 'Canonical homepage url of the brand.',
42
- },
43
- primaryDataPoint: {
44
- type: 'string',
45
- maxLength: 200,
46
- description: 'Headline data point (e.g. "subscriber ' +
47
- 'count"); used in the SEO title.',
48
- },
49
- dataPoints: {
50
- type: 'array',
51
- items: { type: 'string', maxLength: 200 },
52
- maxItems: 50,
53
- description: 'Full list of verifiable data points.',
54
- },
55
- titleOverride: {
56
- type: 'string',
57
- maxLength: 200,
58
- description: 'Replaces the composed page title.',
59
- },
60
- descriptionOverride: {
61
- type: 'string',
62
- maxLength: 320,
63
- description: 'Replaces the composed meta description.',
64
- },
65
- },
66
- },
67
- },
68
- required: ['providerId'],
69
- },
70
- }, async (args) => {
71
- const { providerId, ...rest } = args;
72
- return client.call('UpdateProvider', {
73
- params: { providerId },
74
- headers: {},
75
- body: rest,
76
- });
77
- });
78
- }
@@ -1,17 +0,0 @@
1
- import { type RegisteredTool } from '../../mcp/server.ts';
2
- import type { ReclaimOldClient } from '../client.ts';
3
- /**
4
- * Read the full `providerConfig` (loginUrl, customInjection, requestData,
5
- * geoLocation, ...) of one provider version on the old devtools backend —
6
- * the latest version when `version` is omitted.
7
- *
8
- * Exists so a dev/agent can see what's CURRENTLY published before adding a
9
- * new version with `create_provider_version_from_capture`. That tool always
10
- * takes a FULL replacement `providerConfig` (no partial-patch endpoint on
11
- * this backend), so a version added without knowing the current
12
- * `customInjection` would silently publish it blank — wiping a working
13
- * login script instead of preserving it. Read it here first, then pass it
14
- * straight through (or omit `customInjection` on publish to have it carried
15
- * forward automatically).
16
- */
17
- export declare function getProviderVersionConfigTool(client: ReclaimOldClient): RegisteredTool;
@@ -1,47 +0,0 @@
1
- import { defineTool } from "../../mcp/server.js";
2
- /**
3
- * Read the full `providerConfig` (loginUrl, customInjection, requestData,
4
- * geoLocation, ...) of one provider version on the old devtools backend —
5
- * the latest version when `version` is omitted.
6
- *
7
- * Exists so a dev/agent can see what's CURRENTLY published before adding a
8
- * new version with `create_provider_version_from_capture`. That tool always
9
- * takes a FULL replacement `providerConfig` (no partial-patch endpoint on
10
- * this backend), so a version added without knowing the current
11
- * `customInjection` would silently publish it blank — wiping a working
12
- * login script instead of preserving it. Read it here first, then pass it
13
- * straight through (or omit `customInjection` on publish to have it carried
14
- * forward automatically).
15
- */
16
- export function getProviderVersionConfigTool(client) {
17
- return defineTool({
18
- name: 'get_provider_version_config',
19
- description: 'Fetch the full providerConfig (loginUrl, customInjection, ' +
20
- 'requestData, geoLocation, ...) of one version on the old devtools ' +
21
- 'backend — the latest version when `version` is omitted. Readable ' +
22
- 'for any non-archived provider, not just ones you own. Use this ' +
23
- 'BEFORE calling create_provider_version_from_capture with a ' +
24
- '`providerId` to see the currently-published customInjection/' +
25
- 'requestData so you know what you would be changing — that tool ' +
26
- 'replaces the whole providerConfig, so a field you never see and ' +
27
- "never pass comes out blank in the new version, even if it's set " +
28
- 'today.',
29
- inputSchema: {
30
- type: 'object',
31
- properties: {
32
- providerId: {
33
- type: 'string',
34
- description: 'UUID of the provider (from get_me_providers).',
35
- },
36
- version: {
37
- type: 'string',
38
- description: 'Specific version to fetch, e.g. "1.0.2". Omit for the ' +
39
- "provider's current latest version.",
40
- },
41
- },
42
- required: ['providerId'],
43
- },
44
- }, async ({ providerId, version }) => {
45
- return client.getProviderConfig(providerId, version);
46
- });
47
- }