@trusty-squire/mcp 0.1.17 → 0.1.18
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/dist/server.d.ts.map +1 -1
- package/dist/server.js +3 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +3 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/provision-any.d.ts +35 -46
- package/dist/tools/provision-any.d.ts.map +1 -1
- package/dist/tools/provision-any.js +202 -107
- package/dist/tools/provision-any.js.map +1 -1
- package/package.json +1 -1
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAMnE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAS5C,wBAAsB,WAAW,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAMnE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAS5C,wBAAsB,WAAW,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAwDxE;AAWD,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CA2B/C"}
|
package/dist/server.js
CHANGED
|
@@ -33,8 +33,9 @@ export async function buildServer(api) {
|
|
|
33
33
|
return errorContent(`invalid arguments: ${parsed.error.issues.map((i) => i.message).join("; ")}`);
|
|
34
34
|
}
|
|
35
35
|
try {
|
|
36
|
-
// provision_any_service
|
|
37
|
-
|
|
36
|
+
// provision_any_service + check_provision_status are the Tier 0
|
|
37
|
+
// escape hatch — they run on a machine token, no API client needed.
|
|
38
|
+
if (tool.name === "provision_any_service" || tool.name === "check_provision_status") {
|
|
38
39
|
const result = await tool.handler(parsed.data, null);
|
|
39
40
|
return {
|
|
40
41
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,wEAAwE;AACxE,cAAc;AACd,EAAE;AACF,uEAAuE;AACvE,wEAAwE;AACxE,sEAAsE;AAEtE,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,WAAW,GAAG,eAAe,CAAC;AAEpC,MAAM,qBAAqB,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,kCAAkC,CAAC;AAErG,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAqB;IACrD,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,EACvC,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAChC,CAAC;IAEF,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QAC5D,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CHANGED
|
@@ -8,6 +8,7 @@ import { listSubscriptionsTool } from "./list-subscriptions.js";
|
|
|
8
8
|
import { cancelTool } from "./cancel.js";
|
|
9
9
|
import { getUsageTool } from "./get-usage.js";
|
|
10
10
|
import { rotateCredentialTool } from "./rotate-credential.js";
|
|
11
|
+
import { provisionAnyTool, checkProvisionStatusTool } from "./provision-any.js";
|
|
11
12
|
export interface Tool<TArgs extends Record<string, unknown> = Record<string, unknown>> {
|
|
12
13
|
name: string;
|
|
13
14
|
description: string;
|
|
@@ -19,5 +20,5 @@ export declare function assertPaired(api: ApiClient | null): asserts api is ApiC
|
|
|
19
20
|
export declare const TOOLS: Tool[];
|
|
20
21
|
export declare function findTool(name: string): Tool | null;
|
|
21
22
|
export { z };
|
|
22
|
-
export { provisionTool, waitForApprovalTool, getCredentialTool, listServicesTool, listSubscriptionsTool, cancelTool, getUsageTool, rotateCredentialTool, };
|
|
23
|
+
export { provisionAnyTool, checkProvisionStatusTool, provisionTool, waitForApprovalTool, getCredentialTool, listServicesTool, listSubscriptionsTool, cancelTool, getUsageTool, rotateCredentialTool, };
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,KAAK,UAAU,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE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G,EAAE,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,GAAG,IAAI,SAAS,CAI5E;AAED,eAAO,MAAM,KAAK,EAAE,IAAI,EAWb,CAAC;AAEZ,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAElD;AAGD,OAAO,EAAE,CAAC,EAAE,CAAC;AAIb,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,UAAU,EACV,YAAY,EACZ,oBAAoB,GACrB,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { listSubscriptionsTool } from "./list-subscriptions.js";
|
|
|
16
16
|
import { cancelTool } from "./cancel.js";
|
|
17
17
|
import { getUsageTool } from "./get-usage.js";
|
|
18
18
|
import { rotateCredentialTool } from "./rotate-credential.js";
|
|
19
|
-
import { provisionAnyTool } from "./provision-any.js";
|
|
19
|
+
import { provisionAnyTool, checkProvisionStatusTool } from "./provision-any.js";
|
|
20
20
|
// Auth-requiring tools receive `api: ApiClient | null` per the registry
|
|
21
21
|
// contract; server.ts only invokes them after confirming a paired session.
|
|
22
22
|
// This assertion makes that invariant explicit so each handler narrows to a
|
|
@@ -28,6 +28,7 @@ export function assertPaired(api) {
|
|
|
28
28
|
}
|
|
29
29
|
export const TOOLS = [
|
|
30
30
|
provisionAnyTool,
|
|
31
|
+
checkProvisionStatusTool,
|
|
31
32
|
provisionTool,
|
|
32
33
|
waitForApprovalTool,
|
|
33
34
|
getCredentialTool,
|
|
@@ -44,5 +45,5 @@ export function findTool(name) {
|
|
|
44
45
|
export { z };
|
|
45
46
|
// Per-tool re-exports so callers (tests, custom integrations) can
|
|
46
47
|
// import a single tool without going through the TOOLS array.
|
|
47
|
-
export { provisionTool, waitForApprovalTool, getCredentialTool, listServicesTool, listSubscriptionsTool, cancelTool, getUsageTool, rotateCredentialTool, };
|
|
48
|
+
export { provisionAnyTool, checkProvisionStatusTool, provisionTool, waitForApprovalTool, getCredentialTool, listServicesTool, listSubscriptionsTool, cancelTool, getUsageTool, rotateCredentialTool, };
|
|
48
49
|
//# sourceMappingURL=index.js.map
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,oEAAoE;AACpE,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,8DAA8D;AAC9D,sEAAsE;AACtE,mCAAmC;AAEnC,OAAO,EAAE,CAAC,EAAmB,MAAM,KAAK,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,oEAAoE;AACpE,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,8DAA8D;AAC9D,sEAAsE;AACtE,mCAAmC;AAEnC,OAAO,EAAE,CAAC,EAAmB,MAAM,KAAK,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OA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
|
|
@@ -11,6 +11,14 @@ export declare const provisionAnyInputSchema: z.ZodObject<{
|
|
|
11
11
|
signup_url?: string | undefined;
|
|
12
12
|
}>;
|
|
13
13
|
export type ProvisionAnyInput = z.infer<typeof provisionAnyInputSchema>;
|
|
14
|
+
export declare const checkProvisionStatusInputSchema: z.ZodObject<{
|
|
15
|
+
run_id: z.ZodString;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
run_id: string;
|
|
18
|
+
}, {
|
|
19
|
+
run_id: string;
|
|
20
|
+
}>;
|
|
21
|
+
export type CheckProvisionStatusInput = z.infer<typeof checkProvisionStatusInputSchema>;
|
|
14
22
|
export declare const provisionAnyTool: {
|
|
15
23
|
name: string;
|
|
16
24
|
description: string;
|
|
@@ -20,7 +28,7 @@ export declare const provisionAnyTool: {
|
|
|
20
28
|
readonly properties: {
|
|
21
29
|
readonly service: {
|
|
22
30
|
readonly type: "string";
|
|
23
|
-
readonly description: "Name of the service to sign up for (e.g., 'Postmark', 'Mailgun', 'IPInfo')";
|
|
31
|
+
readonly description: "Name of the service to sign up for (e.g., 'Postmark', 'Mailgun', 'IPInfo').";
|
|
24
32
|
};
|
|
25
33
|
readonly signup_url: {
|
|
26
34
|
readonly type: "string";
|
|
@@ -46,10 +54,7 @@ export declare const provisionAnyTool: {
|
|
|
46
54
|
quota_used?: never;
|
|
47
55
|
cta_pair_url?: never;
|
|
48
56
|
error?: never;
|
|
49
|
-
|
|
50
|
-
steps?: never;
|
|
51
|
-
captcha_kind?: never;
|
|
52
|
-
browser_channel?: never;
|
|
57
|
+
run_id?: never;
|
|
53
58
|
} | {
|
|
54
59
|
status: string;
|
|
55
60
|
service: string;
|
|
@@ -58,10 +63,7 @@ export declare const provisionAnyTool: {
|
|
|
58
63
|
cta_pair_url: unknown;
|
|
59
64
|
message: string;
|
|
60
65
|
error?: never;
|
|
61
|
-
|
|
62
|
-
steps?: never;
|
|
63
|
-
captcha_kind?: never;
|
|
64
|
-
browser_channel?: never;
|
|
66
|
+
run_id?: never;
|
|
65
67
|
} | {
|
|
66
68
|
status: string;
|
|
67
69
|
service: string;
|
|
@@ -70,51 +72,38 @@ export declare const provisionAnyTool: {
|
|
|
70
72
|
quota_limit?: never;
|
|
71
73
|
quota_used?: never;
|
|
72
74
|
cta_pair_url?: never;
|
|
73
|
-
|
|
74
|
-
steps?: never;
|
|
75
|
-
captcha_kind?: never;
|
|
76
|
-
browser_channel?: never;
|
|
75
|
+
run_id?: never;
|
|
77
76
|
} | {
|
|
78
77
|
status: string;
|
|
78
|
+
run_id: string;
|
|
79
79
|
service: string;
|
|
80
|
-
credentials: {
|
|
81
|
-
[key: string]: string | undefined;
|
|
82
|
-
api_key?: string;
|
|
83
|
-
username?: string;
|
|
84
|
-
password?: string;
|
|
85
|
-
};
|
|
86
|
-
steps: string[];
|
|
87
80
|
message: string;
|
|
88
81
|
quota_limit?: never;
|
|
89
82
|
quota_used?: never;
|
|
90
83
|
cta_pair_url?: never;
|
|
91
84
|
error?: never;
|
|
92
|
-
captcha_kind?: never;
|
|
93
|
-
browser_channel?: never;
|
|
94
|
-
} | {
|
|
95
|
-
status: string;
|
|
96
|
-
service: string;
|
|
97
|
-
error: string;
|
|
98
|
-
steps: string[];
|
|
99
|
-
captcha_kind: "turnstile" | "recaptcha";
|
|
100
|
-
browser_channel: string | null;
|
|
101
|
-
message: string;
|
|
102
|
-
quota_limit?: never;
|
|
103
|
-
quota_used?: never;
|
|
104
|
-
cta_pair_url?: never;
|
|
105
|
-
credentials?: never;
|
|
106
|
-
} | {
|
|
107
|
-
status: string;
|
|
108
|
-
service: string;
|
|
109
|
-
error: string;
|
|
110
|
-
steps: string[];
|
|
111
|
-
browser_channel: string | null;
|
|
112
|
-
message: string;
|
|
113
|
-
quota_limit?: never;
|
|
114
|
-
quota_used?: never;
|
|
115
|
-
cta_pair_url?: never;
|
|
116
|
-
credentials?: never;
|
|
117
|
-
captcha_kind?: never;
|
|
118
85
|
}>;
|
|
119
86
|
};
|
|
87
|
+
export declare const checkProvisionStatusTool: {
|
|
88
|
+
name: string;
|
|
89
|
+
description: string;
|
|
90
|
+
jsonInputSchema: {
|
|
91
|
+
readonly type: "object";
|
|
92
|
+
readonly required: readonly ["run_id"];
|
|
93
|
+
readonly properties: {
|
|
94
|
+
readonly run_id: {
|
|
95
|
+
readonly type: "string";
|
|
96
|
+
readonly description: "The run_id returned by provision_any_service.";
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
inputSchema: z.ZodObject<{
|
|
101
|
+
run_id: z.ZodString;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
run_id: string;
|
|
104
|
+
}, {
|
|
105
|
+
run_id: string;
|
|
106
|
+
}>;
|
|
107
|
+
handler: (input: CheckProvisionStatusInput, _api: ApiClient | null) => Promise<Record<string, unknown>>;
|
|
108
|
+
};
|
|
120
109
|
//# sourceMappingURL=provision-any.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provision-any.d.ts","sourceRoot":"","sources":["../../src/tools/provision-any.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"provision-any.d.ts","sourceRoot":"","sources":["../../src/tools/provision-any.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAIlD,eAAO,MAAM,uBAAuB;;;;;;;;;EAGlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,+BAA+B;;;;;;EAE1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAgFxF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAKJ,iBAAiB,QAAQ,SAAS,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuFjE,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;qBAKZ,yBAAyB,QAAQ,SAAS,GAAG,IAAI;CAsBzE,CAAC"}
|
|
@@ -5,10 +5,15 @@
|
|
|
5
5
|
// pipeline (see apps/api/src/routes/ses-webhook.ts) can deliver
|
|
6
6
|
// verification emails.
|
|
7
7
|
//
|
|
8
|
+
// ASYNC MODEL: a real signup takes 3-8 minutes — well past the ~60s hard
|
|
9
|
+
// timeout Claude Code (and most MCP hosts) put on a single tool call. So
|
|
10
|
+
// `provision_any_service` does NOT block: it starts the run in the
|
|
11
|
+
// background inside this server process, returns a run_id immediately,
|
|
12
|
+
// and the caller polls `check_provision_status` until the run leaves the
|
|
13
|
+
// "running" state.
|
|
14
|
+
//
|
|
8
15
|
// Auth model: Tier 0 machine token from the session file. No account or
|
|
9
|
-
// mandate required for free-tier signups.
|
|
10
|
-
// the API returns a structured quota_exceeded response and we tell Claude
|
|
11
|
-
// to surface a pairing CTA.
|
|
16
|
+
// mandate required for free-tier signups.
|
|
12
17
|
import { randomBytes } from "crypto";
|
|
13
18
|
import { z } from "zod";
|
|
14
19
|
import { UniversalSignupBot, InboxClient, ProxyLLMClient, detectAsn, } from "../bot/index.js";
|
|
@@ -17,17 +22,19 @@ export const provisionAnyInputSchema = z.object({
|
|
|
17
22
|
service: z.string().describe("Name of the service to sign up for (e.g., 'Postmark', 'Mailgun')"),
|
|
18
23
|
signup_url: z.string().optional().describe("Direct URL to signup page (optional, will search if not provided)"),
|
|
19
24
|
});
|
|
25
|
+
export const checkProvisionStatusInputSchema = z.object({
|
|
26
|
+
run_id: z.string().describe("The run_id returned by provision_any_service."),
|
|
27
|
+
});
|
|
20
28
|
// JSON Schema for MCP `tools/list`. The SDK forwards `inputSchema` verbatim
|
|
21
|
-
// to the host agent
|
|
22
|
-
//
|
|
23
|
-
// must mirror `provisionAnyInputSchema` above.
|
|
29
|
+
// to the host agent; a zod object stringifies to `{}` and leaves the LLM
|
|
30
|
+
// blind to required parameters, so these mirror the zod schemas above.
|
|
24
31
|
const PROVISION_ANY_JSON_SCHEMA = {
|
|
25
32
|
type: "object",
|
|
26
33
|
required: ["service"],
|
|
27
34
|
properties: {
|
|
28
35
|
service: {
|
|
29
36
|
type: "string",
|
|
30
|
-
description: "Name of the service to sign up for (e.g., 'Postmark', 'Mailgun', 'IPInfo')",
|
|
37
|
+
description: "Name of the service to sign up for (e.g., 'Postmark', 'Mailgun', 'IPInfo').",
|
|
31
38
|
},
|
|
32
39
|
signup_url: {
|
|
33
40
|
type: "string",
|
|
@@ -35,30 +42,54 @@ const PROVISION_ANY_JSON_SCHEMA = {
|
|
|
35
42
|
},
|
|
36
43
|
},
|
|
37
44
|
};
|
|
38
|
-
const
|
|
45
|
+
const CHECK_STATUS_JSON_SCHEMA = {
|
|
46
|
+
type: "object",
|
|
47
|
+
required: ["run_id"],
|
|
48
|
+
properties: {
|
|
49
|
+
run_id: {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: "The run_id returned by provision_any_service.",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
const runStore = new Map();
|
|
56
|
+
// Cap so a long session cannot leak memory; oldest run evicted first.
|
|
57
|
+
const MAX_RUNS = 50;
|
|
58
|
+
const PROVISION_DESCRIPTION = `Start signing up for any free API service using browser automation.
|
|
59
|
+
|
|
60
|
+
ASYNC — IMPORTANT: a signup takes several minutes, longer than a single
|
|
61
|
+
tool call may stay open. This tool does NOT wait for the signup. It
|
|
62
|
+
starts the run and returns immediately with a run_id and status="started".
|
|
63
|
+
You MUST then poll check_provision_status with that run_id (about once a
|
|
64
|
+
minute) until its status is no longer "running".
|
|
39
65
|
|
|
40
66
|
WHEN TO CALL THIS TOOL:
|
|
41
|
-
- The user wants an account for a service Trusty Squire
|
|
42
|
-
-
|
|
43
|
-
- Best for free-tier developer services with traditional email/password signup
|
|
67
|
+
- The user wants an account for a service Trusty Squire has no native adapter for.
|
|
68
|
+
- Best for free-tier developer services with email/password signup.
|
|
44
69
|
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
|
|
70
|
+
IMMEDIATE RESPONSES (no run started):
|
|
71
|
+
- status="started" + run_id → poll check_provision_status next.
|
|
72
|
+
- status="quota_exceeded" + cta_pair_url → tell the user to run \`npx @trusty-squire/mcp pair\`.
|
|
73
|
+
- status="not_installed" → Trusty Squire isn't installed; tell the user to run the installer.
|
|
74
|
+
- status="error" → could not reach the API to set up the signup.`;
|
|
75
|
+
const CHECK_DESCRIPTION = `Check the status of a signup started by provision_any_service.
|
|
51
76
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- status="
|
|
57
|
-
|
|
58
|
-
- status="
|
|
77
|
+
Pass the run_id from provision_any_service. Poll about once a minute
|
|
78
|
+
until status is no longer "running".
|
|
79
|
+
|
|
80
|
+
RESPONSES:
|
|
81
|
+
- status="running" → still working; poll again in ~60s.
|
|
82
|
+
- status="success" + credentials → signup done; show the credentials to the user.
|
|
83
|
+
- status="verification_not_sent" → submitted, but the service sent no verification
|
|
84
|
+
email (anti-abuse withholding, or it needs manual signup).
|
|
85
|
+
- status="captcha_blocked" → the site uses a captcha the bot can't pass; manual signup.
|
|
86
|
+
- status="oauth_required" → the service only offers OAuth signup; manual signup.
|
|
87
|
+
- status="failed" → the form filled but yielded no credentials; show steps[].
|
|
88
|
+
- status="error" → the run crashed; show error.
|
|
89
|
+
- status="unknown_run" → no such run (it expired, or the MCP server restarted).`;
|
|
59
90
|
export const provisionAnyTool = {
|
|
60
91
|
name: "provision_any_service",
|
|
61
|
-
description:
|
|
92
|
+
description: PROVISION_DESCRIPTION,
|
|
62
93
|
jsonInputSchema: PROVISION_ANY_JSON_SCHEMA,
|
|
63
94
|
inputSchema: provisionAnyInputSchema,
|
|
64
95
|
handler: async (input, _api) => {
|
|
@@ -66,10 +97,6 @@ export const provisionAnyTool = {
|
|
|
66
97
|
const storage = await openSessionStorage();
|
|
67
98
|
const session = await storage.read();
|
|
68
99
|
if (session === null || session.machine_token === undefined) {
|
|
69
|
-
// Production users hit this when they've never run the install CLI.
|
|
70
|
-
// Local-dev users hit this if their session.json only has an
|
|
71
|
-
// agent_session_token (Tier 1 pair without a machine_token issued).
|
|
72
|
-
// Surface both paths so the agent can route the user correctly.
|
|
73
100
|
const hasPartialSession = session !== null && session.agent_session_token !== undefined;
|
|
74
101
|
return {
|
|
75
102
|
status: "not_installed",
|
|
@@ -79,15 +106,10 @@ export const provisionAnyTool = {
|
|
|
79
106
|
};
|
|
80
107
|
}
|
|
81
108
|
const apiBase = session.api_base_url;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
});
|
|
87
|
-
// Random suffix, not just a ms timestamp: two concurrent signups
|
|
88
|
-
// in the same millisecond would otherwise share a run_id — and,
|
|
89
|
-
// for the same service, the same inbox alias — and cross-read
|
|
90
|
-
// each other's verification email.
|
|
109
|
+
const inboxClient = new InboxClient({ baseUrl: apiBase, apiKey: session.machine_token });
|
|
110
|
+
// Random suffix, not just a ms timestamp: two concurrent signups in
|
|
111
|
+
// the same millisecond would otherwise share a run_id — and, for the
|
|
112
|
+
// same service, the same inbox alias.
|
|
91
113
|
const runId = `mcp-${Date.now().toString(36)}-${randomBytes(4).toString("hex")}`;
|
|
92
114
|
let alias;
|
|
93
115
|
try {
|
|
@@ -101,7 +123,7 @@ export const provisionAnyTool = {
|
|
|
101
123
|
}
|
|
102
124
|
catch (err) {
|
|
103
125
|
const message = err instanceof Error ? err.message : String(err);
|
|
104
|
-
// The createAlias error body
|
|
126
|
+
// The createAlias error body carries the structured payload; parse it back.
|
|
105
127
|
if (/quota_exceeded/.test(message)) {
|
|
106
128
|
const match = message.match(/\{.*\}/s);
|
|
107
129
|
if (match !== null) {
|
|
@@ -129,52 +151,98 @@ export const provisionAnyTool = {
|
|
|
129
151
|
message: `Couldn't reach Trusty Squire's API to set up an alias.`,
|
|
130
152
|
};
|
|
131
153
|
}
|
|
132
|
-
//
|
|
154
|
+
// Register the run, evicting the oldest if the store is full.
|
|
155
|
+
if (runStore.size >= MAX_RUNS) {
|
|
156
|
+
const oldest = runStore.keys().next().value;
|
|
157
|
+
if (oldest !== undefined)
|
|
158
|
+
runStore.delete(oldest);
|
|
159
|
+
}
|
|
160
|
+
runStore.set(runId, { service: input.service, startedAt: Date.now(), result: undefined });
|
|
161
|
+
// Start the signup in the background — do NOT await it. runSignupTask
|
|
162
|
+
// never rejects; it writes the final response into runStore, which
|
|
163
|
+
// check_provision_status then reads.
|
|
164
|
+
void runSignupTask(runId, input, {
|
|
165
|
+
apiBase,
|
|
166
|
+
machineToken: session.machine_token,
|
|
167
|
+
alias,
|
|
168
|
+
inboxClient,
|
|
169
|
+
});
|
|
170
|
+
return {
|
|
171
|
+
status: "started",
|
|
172
|
+
run_id: runId,
|
|
173
|
+
service: input.service,
|
|
174
|
+
message: `Signup for ${input.service} started in the background. ` +
|
|
175
|
+
`Poll check_provision_status with run_id="${runId}" about once a minute ` +
|
|
176
|
+
`until its status is no longer "running" (typically 3-6 minutes).`,
|
|
177
|
+
};
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
export const checkProvisionStatusTool = {
|
|
181
|
+
name: "check_provision_status",
|
|
182
|
+
description: CHECK_DESCRIPTION,
|
|
183
|
+
jsonInputSchema: CHECK_STATUS_JSON_SCHEMA,
|
|
184
|
+
inputSchema: checkProvisionStatusInputSchema,
|
|
185
|
+
handler: async (input, _api) => {
|
|
186
|
+
const record = runStore.get(input.run_id);
|
|
187
|
+
if (record === undefined) {
|
|
188
|
+
return {
|
|
189
|
+
status: "unknown_run",
|
|
190
|
+
run_id: input.run_id,
|
|
191
|
+
message: "No signup run with that run_id. It may have finished and been evicted, " +
|
|
192
|
+
"or the MCP server restarted since it started. Start a new provision_any_service run.",
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
if (record.result === undefined) {
|
|
196
|
+
return {
|
|
197
|
+
status: "running",
|
|
198
|
+
run_id: input.run_id,
|
|
199
|
+
service: record.service,
|
|
200
|
+
elapsed_seconds: Math.round((Date.now() - record.startedAt) / 1000),
|
|
201
|
+
message: "Signup still in progress. Poll again in about 60 seconds.",
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
return record.result;
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
// Runs the signup to completion and stores the final tool response in
|
|
208
|
+
// runStore. Never rejects — any throw is captured as an error result.
|
|
209
|
+
async function runSignupTask(runId, input, ctx) {
|
|
210
|
+
let response;
|
|
211
|
+
try {
|
|
133
212
|
// The user pays nothing for LLM calls — the operator's OpenRouter
|
|
134
|
-
// key handles them server-side, gated by the machine token's
|
|
135
|
-
//
|
|
136
|
-
// Sonnet is the parse-failure fallback.
|
|
213
|
+
// key handles them server-side, gated by the machine token's rolling
|
|
214
|
+
// rate limit. Cheap tier is primary; premium is the fallback.
|
|
137
215
|
const llmPair = {
|
|
138
216
|
primary: new ProxyLLMClient({
|
|
139
|
-
apiBaseUrl: apiBase,
|
|
140
|
-
machineToken:
|
|
217
|
+
apiBaseUrl: ctx.apiBase,
|
|
218
|
+
machineToken: ctx.machineToken,
|
|
141
219
|
tier: "cheap",
|
|
142
220
|
}),
|
|
143
221
|
premium: new ProxyLLMClient({
|
|
144
|
-
apiBaseUrl: apiBase,
|
|
145
|
-
machineToken:
|
|
222
|
+
apiBaseUrl: ctx.apiBase,
|
|
223
|
+
machineToken: ctx.machineToken,
|
|
146
224
|
tier: "premium",
|
|
147
225
|
}),
|
|
148
226
|
};
|
|
149
|
-
// Run the bot locally with this alias. Bot uses the inboxClient to long-
|
|
150
|
-
// poll the API for any verification emails that arrive via SES.
|
|
151
227
|
const bot = new UniversalSignupBot();
|
|
152
228
|
const result = await bot.signup({
|
|
153
229
|
service: input.service,
|
|
154
230
|
...(input.signup_url !== undefined ? { signupUrl: input.signup_url } : {}),
|
|
155
|
-
email: alias,
|
|
156
|
-
inbox: inboxClient,
|
|
231
|
+
email: ctx.alias,
|
|
232
|
+
inbox: ctx.inboxClient,
|
|
157
233
|
llm: llmPair,
|
|
158
234
|
});
|
|
159
|
-
// Best-effort
|
|
160
|
-
//
|
|
235
|
+
// Best-effort alias cleanup. Failure is non-fatal — the alias
|
|
236
|
+
// TTL-expires anyway.
|
|
161
237
|
try {
|
|
162
|
-
await inboxClient.revokeAlias(alias);
|
|
238
|
+
await ctx.inboxClient.revokeAlias(ctx.alias);
|
|
163
239
|
}
|
|
164
240
|
catch {
|
|
165
241
|
// noop
|
|
166
242
|
}
|
|
167
|
-
//
|
|
168
|
-
// report it to the API for the analytics ledger. The result.captcha
|
|
169
|
-
// field is set by the agent's pre/post-submit/re-plan gates. We do
|
|
170
|
-
// a fresh asn lookup at event time rather than relying on the
|
|
171
|
-
// install-time one — users move networks, and "where was the
|
|
172
|
-
// machine when this happened" is the analytically interesting bit.
|
|
243
|
+
// Report any captcha encounter to the analytics ledger. Fire-and-forget.
|
|
173
244
|
if (result.captcha !== undefined) {
|
|
174
|
-
|
|
175
|
-
// affect what the user sees. Failures here are logged to stderr
|
|
176
|
-
// and otherwise ignored.
|
|
177
|
-
void postCaptchaEvent(apiBase, session.machine_token, {
|
|
245
|
+
void postCaptchaEvent(ctx.apiBase, ctx.machineToken, {
|
|
178
246
|
service: input.service,
|
|
179
247
|
captcha_kind: result.captcha.kind,
|
|
180
248
|
blocked: result.captcha.blocked,
|
|
@@ -184,54 +252,81 @@ export const provisionAnyTool = {
|
|
|
184
252
|
signup_succeeded: result.success,
|
|
185
253
|
});
|
|
186
254
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
status: "oauth_required",
|
|
217
|
-
service: input.service,
|
|
218
|
-
error: result.error,
|
|
219
|
-
steps: result.steps,
|
|
220
|
-
browser_channel: result.browser_channel ?? null,
|
|
221
|
-
message: `${input.service} only offers Google/GitHub (OAuth) signup — there is no email form the bot can fill. ` +
|
|
222
|
-
`Tell the user to sign up manually at ${input.signup_url ?? `https://${input.service.toLowerCase()}.com`}.`,
|
|
223
|
-
};
|
|
224
|
-
}
|
|
255
|
+
response = buildSignupResponse(input, result);
|
|
256
|
+
}
|
|
257
|
+
catch (err) {
|
|
258
|
+
response = {
|
|
259
|
+
status: "error",
|
|
260
|
+
service: input.service,
|
|
261
|
+
error: err instanceof Error ? err.message : String(err),
|
|
262
|
+
message: `The signup run for ${input.service} crashed before completing.`,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
const record = runStore.get(runId);
|
|
266
|
+
if (record !== undefined)
|
|
267
|
+
record.result = response;
|
|
268
|
+
}
|
|
269
|
+
// Maps a finished SignupResult to the response the caller sees via
|
|
270
|
+
// check_provision_status. Mirrors the status set documented on the tools.
|
|
271
|
+
function buildSignupResponse(input, result) {
|
|
272
|
+
if (result.success && result.credentials !== undefined) {
|
|
273
|
+
return {
|
|
274
|
+
status: "success",
|
|
275
|
+
service: input.service,
|
|
276
|
+
credentials: result.credentials,
|
|
277
|
+
steps: result.steps,
|
|
278
|
+
message: `Successfully signed up for ${input.service}. Credentials are in this response — show them to the user (or save to their .env).`,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
// Authoritative: the agent recorded a captcha encounter and marked it
|
|
282
|
+
// blocked → captcha_blocked.
|
|
283
|
+
if (result.captcha !== undefined && result.captcha.blocked) {
|
|
225
284
|
return {
|
|
226
|
-
status: "
|
|
285
|
+
status: "captcha_blocked",
|
|
227
286
|
service: input.service,
|
|
228
|
-
error: result.error ?? "
|
|
287
|
+
error: result.error ?? "Captcha challenge blocked automated signup.",
|
|
229
288
|
steps: result.steps,
|
|
289
|
+
captcha_kind: result.captcha.kind,
|
|
230
290
|
browser_channel: result.browser_channel ?? null,
|
|
231
|
-
message:
|
|
291
|
+
message: `${input.service} blocked automated signup with a ${result.captcha.kind} captcha. ` +
|
|
292
|
+
`Tell the user to sign up manually at ${input.signup_url ?? `https://${input.service.toLowerCase()}.com`}.`,
|
|
232
293
|
};
|
|
233
|
-
}
|
|
234
|
-
|
|
294
|
+
}
|
|
295
|
+
// OAuth-only service: no email/password form to automate.
|
|
296
|
+
if (result.error !== undefined && result.error.startsWith("oauth_required")) {
|
|
297
|
+
return {
|
|
298
|
+
status: "oauth_required",
|
|
299
|
+
service: input.service,
|
|
300
|
+
error: result.error,
|
|
301
|
+
steps: result.steps,
|
|
302
|
+
browser_channel: result.browser_channel ?? null,
|
|
303
|
+
message: `${input.service} only offers Google/GitHub (OAuth) signup — there is no email form the bot can fill. ` +
|
|
304
|
+
`Tell the user to sign up manually at ${input.signup_url ?? `https://${input.service.toLowerCase()}.com`}.`,
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
// S3: the bot tags "form submitted but no verification email" with a
|
|
308
|
+
// verification_not_sent: error prefix. Surface it as its own status.
|
|
309
|
+
if (result.error !== undefined && result.error.startsWith("verification_not_sent")) {
|
|
310
|
+
return {
|
|
311
|
+
status: "verification_not_sent",
|
|
312
|
+
service: input.service,
|
|
313
|
+
error: result.error,
|
|
314
|
+
steps: result.steps,
|
|
315
|
+
browser_channel: result.browser_channel ?? null,
|
|
316
|
+
message: `${input.service}'s form submitted, but no verification email arrived — the service most likely ` +
|
|
317
|
+
`withheld it (anti-abuse) or needs manual signup. Tell the user to finish at ` +
|
|
318
|
+
`${input.signup_url ?? `https://${input.service.toLowerCase()}.com`}.`,
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
return {
|
|
322
|
+
status: "failed",
|
|
323
|
+
service: input.service,
|
|
324
|
+
error: result.error ?? "Unknown error",
|
|
325
|
+
steps: result.steps,
|
|
326
|
+
browser_channel: result.browser_channel ?? null,
|
|
327
|
+
message: `Couldn't finish signing up for ${input.service}. Show the user the steps[] for debugging.`,
|
|
328
|
+
};
|
|
329
|
+
}
|
|
235
330
|
// Best-effort POST to /v1/captcha-events. We don't care about the
|
|
236
331
|
// response — at worst the event is lost, which is no worse than the
|
|
237
332
|
// pre-instrumentation state. Captures fresh asn at event time when
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provision-any.js","sourceRoot":"","sources":["../../src/tools/provision-any.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,wEAAwE;AACxE,oEAAoE;AACpE,gEAAgE;AAChE,uBAAuB;AACvB,EAAE;AACF,
|
|
1
|
+
{"version":3,"file":"provision-any.js","sourceRoot":"","sources":["../../src/tools/provision-any.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,wEAAwE;AACxE,oEAAoE;AACpE,gEAAgE;AAChE,uBAAuB;AACvB,EAAE;AACF,yEAAyE;AACzE,yEAAyE;AACzE,mEAAmE;AACnE,uEAAuE;AACvE,yEAAyE;AACzE,mBAAmB;AACnB,EAAE;AACF,wEAAwE;AACxE,0CAA0C;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,SAAS,GAGV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAKnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,E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,KAAK,CAAC,gBAAgB;YACxC,GAAG,CAAC,GAAG,KAAK,IAAI;gBACd,CAAC,CAAC;oBACE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE;iBAC/E;gBACH,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;QACF,MAAM,KAAK,CAAC,GAAG,OAAO,oBAAoB,EAAE;YAC1C,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,iBAAiB,EAAE,YAAY;aAChC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC3B,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CACX,4DACE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CACjD,EAAE,CACH,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trusty-squire/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local MCP server vibe coding agents install. Thin relay to the Trusty Squire API, with the bundled universal signup bot.",
|
|
6
6
|
"main": "./dist/server.js",
|