@reclaimprotocol/agent 0.1.18 → 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.
- package/README.md +6 -2
- package/lib/authoring/backend.d.ts +4 -0
- package/lib/authoring/tools.js +4 -1
- package/lib/cdp/capture.d.ts +2 -2
- package/lib/cdp/capture.js +25 -21
- package/lib/cdp/client.d.ts +39 -1
- package/lib/cdp/client.js +125 -1
- package/lib/mcp/api/operations.gen.js +33 -9
- package/lib/mcp/instructions.js +27 -3
- package/lib/mcp/start.js +12 -8
- package/lib/mcp/tools/agent/attach.d.ts +18 -4
- package/lib/mcp/tools/agent/attach.js +142 -52
- package/lib/mcp/tools/agent/build.d.ts +1 -1
- package/lib/mcp/tools/agent/build.js +5 -3
- package/lib/mcp/tools/agent/capture.d.ts +1 -0
- package/lib/mcp/tools/agent/capture.js +8 -1
- package/lib/mcp/tools/agent/eval.js +2 -3
- package/lib/mcp/tools/agent/how-it-works.d.ts +1 -1
- package/lib/mcp/tools/agent/how-it-works.js +1 -1
- package/lib/mcp/tools/agent/publish.js +22 -1
- package/lib/mcp/tools/agent/session.d.ts +2 -2
- package/lib/mcp/tools/agent/session.js +21 -5
- package/lib/mcp/tools/agent/shared.js +4 -6
- package/lib/mcp/tools/authenticate/authenticate.d.ts +1 -1
- package/lib/mcp/tools/authenticate/authenticate.js +10 -4
- package/lib/mcp/tools/authenticate/builder-access.d.ts +8 -0
- package/lib/mcp/tools/authenticate/builder-access.js +31 -0
- package/lib/mcp/tools/authenticate/index.d.ts +1 -0
- package/lib/mcp/tools/authenticate/index.js +1 -0
- package/lib/old/login-cdp.js +11 -3
- package/lib/old/tools/publish.js +23 -1
- package/lib/provider/draft.d.ts +20 -0
- package/lib/provider/draft.js +75 -51
- package/lib/provider/index.d.ts +1 -1
- package/lib/provider/index.js +1 -1
- package/lib/provider/secrets.d.ts +37 -0
- package/lib/provider/secrets.js +147 -6
- package/lib/provider/to-version.d.ts +7 -0
- package/lib/provider/to-version.js +11 -1
- package/package.json +2 -2
- package/skill/SKILL.builder.md +43 -95
- package/skill/SKILL.common.md +102 -0
- package/skill/SKILL.old.md +20 -74
- package/skill/builder-mode.md +2 -2
- package/skill/injection-api.md +95 -10
- package/skill/old-mode.md +2 -2
- package/src/authoring/backend.ts +4 -0
- package/src/authoring/tools.ts +4 -1
- package/src/cdp/capture.ts +24 -24
- package/src/cdp/client.ts +197 -2
- package/src/mcp/api/operations.gen.ts +33 -9
- package/src/mcp/instructions.ts +36 -3
- package/src/mcp/start.ts +13 -8
- package/src/mcp/tools/agent/attach.ts +198 -57
- package/src/mcp/tools/agent/build.ts +9 -2
- package/src/mcp/tools/agent/capture.ts +10 -1
- package/src/mcp/tools/agent/eval.ts +2 -3
- package/src/mcp/tools/agent/how-it-works.ts +1 -1
- package/src/mcp/tools/agent/publish.ts +22 -1
- package/src/mcp/tools/agent/session.ts +29 -8
- package/src/mcp/tools/agent/shared.ts +5 -10
- package/src/mcp/tools/authenticate/authenticate.ts +14 -4
- package/src/mcp/tools/authenticate/builder-access.ts +42 -0
- package/src/mcp/tools/authenticate/index.ts +4 -0
- package/src/old/login-cdp.ts +13 -3
- package/src/old/tools/publish.ts +25 -3
- package/src/provider/draft.ts +98 -56
- package/src/provider/index.ts +9 -1
- package/src/provider/secrets.ts +171 -6
- package/src/provider/to-version.ts +12 -1
- package/lib/authoring/find.d.ts +0 -3
- package/lib/authoring/find.js +0 -54
- package/lib/authoring/propose.d.ts +0 -3
- package/lib/authoring/propose.js +0 -109
- package/lib/authoring/replay.d.ts +0 -10
- package/lib/authoring/replay.js +0 -34
- package/lib/cli/args.d.ts +0 -14
- package/lib/cli/args.js +0 -19
- package/lib/cli/commands.d.ts +0 -1
- package/lib/cli/commands.js +0 -19
- package/lib/cli.d.ts +0 -1
- package/lib/cli.js +0 -7
- package/lib/mcp/credentials/authenticate.d.ts +0 -3
- package/lib/mcp/credentials/authenticate.js +0 -108
- package/lib/mcp/credentials/build.d.ts +0 -5
- package/lib/mcp/credentials/build.js +0 -18
- package/lib/mcp/credentials/cache.d.ts +0 -70
- package/lib/mcp/credentials/cache.js +0 -131
- package/lib/mcp/credentials/env-file.d.ts +0 -25
- package/lib/mcp/credentials/env-file.js +0 -71
- package/lib/mcp/credentials/import.d.ts +0 -2
- package/lib/mcp/credentials/import.js +0 -52
- package/lib/mcp/credentials/issue.d.ts +0 -2
- package/lib/mcp/credentials/issue.js +0 -84
- package/lib/mcp/credentials/keypair.d.ts +0 -17
- package/lib/mcp/credentials/keypair.js +0 -48
- package/lib/mcp/credentials/link.d.ts +0 -3
- package/lib/mcp/credentials/link.js +0 -107
- package/lib/mcp/credentials/list-cached.d.ts +0 -2
- package/lib/mcp/credentials/list-cached.js +0 -55
- package/lib/mcp/credentials/owner-key.d.ts +0 -23
- package/lib/mcp/credentials/owner-key.js +0 -58
- package/lib/mcp/credentials/paths.d.ts +0 -12
- package/lib/mcp/credentials/paths.js +0 -35
- package/lib/mcp/credentials/poll.d.ts +0 -27
- package/lib/mcp/credentials/poll.js +0 -61
- package/lib/mcp/credentials/register.d.ts +0 -18
- package/lib/mcp/credentials/register.js +0 -30
- package/lib/mcp/credentials/resolve-owner-key.d.ts +0 -12
- package/lib/mcp/credentials/resolve-owner-key.js +0 -68
- package/lib/mcp/credentials/session-cache.d.ts +0 -14
- package/lib/mcp/credentials/session-cache.js +0 -42
- package/lib/mcp/credentials/status.d.ts +0 -3
- package/lib/mcp/credentials/status.js +0 -76
- package/lib/mcp/register.d.ts +0 -38
- package/lib/mcp/register.js +0 -80
- package/lib/mcp/tools/analyze.d.ts +0 -3
- package/lib/mcp/tools/analyze.js +0 -26
- package/lib/mcp/tools/attach.d.ts +0 -11
- package/lib/mcp/tools/attach.js +0 -72
- package/lib/mcp/tools/capture.d.ts +0 -10
- package/lib/mcp/tools/capture.js +0 -142
- package/lib/mcp/tools/eval.d.ts +0 -5
- package/lib/mcp/tools/eval.js +0 -127
- package/lib/mcp/tools/find.d.ts +0 -3
- package/lib/mcp/tools/find.js +0 -60
- package/lib/mcp/tools/owner-key.d.ts +0 -2
- package/lib/mcp/tools/owner-key.js +0 -63
- package/lib/mcp/tools/proof.d.ts +0 -3
- package/lib/mcp/tools/proof.js +0 -214
- package/lib/mcp/tools/propose.d.ts +0 -9
- package/lib/mcp/tools/propose.js +0 -75
- package/lib/mcp/tools/publish.d.ts +0 -3
- package/lib/mcp/tools/publish.js +0 -59
- package/lib/mcp/tools/replay.d.ts +0 -3
- package/lib/mcp/tools/replay.js +0 -46
- package/lib/mcp/tools/session.d.ts +0 -10
- package/lib/mcp/tools/session.js +0 -29
- package/lib/mcp/tools/verification/diagnose.d.ts +0 -11
- package/lib/mcp/tools/verification/diagnose.js +0 -132
- package/lib/mcp/verifications/build.d.ts +0 -5
- package/lib/mcp/verifications/build.js +0 -14
- package/lib/mcp/verifications/create.d.ts +0 -3
- package/lib/mcp/verifications/create.js +0 -57
- package/lib/mcp/verifications/find.d.ts +0 -3
- package/lib/mcp/verifications/find.js +0 -37
- package/lib/mcp/verifications/get.d.ts +0 -3
- package/lib/mcp/verifications/get.js +0 -26
- package/lib/mcp/verifications/update.d.ts +0 -3
- package/lib/mcp/verifications/update.js +0 -78
- package/lib/old/tools/get-version-config.d.ts +0 -17
- package/lib/old/tools/get-version-config.js +0 -47
- package/lib/routes.gen.d.ts +0 -271
- package/lib/routes.gen.js +0 -73
- package/lib/types/openapi.d.ts +0 -4
- package/lib/types/openapi.gen.d.ts +0 -3967
- package/lib/types/openapi.gen.js +0 -5
- package/lib/types/openapi.js +0 -1
|
@@ -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,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,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,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,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
|
-
}
|