@zackbart/connecta 0.6.1 → 0.7.0
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/CHANGELOG.md +256 -0
- package/README.md +24 -20
- package/dist/auth/bearer.d.ts +4 -3
- package/dist/auth/bearer.d.ts.map +1 -1
- package/dist/auth/bearer.js +10 -8
- package/dist/auth/bearer.js.map +1 -1
- package/dist/auth/clerk.d.ts +8 -7
- package/dist/auth/clerk.d.ts.map +1 -1
- package/dist/auth/clerk.js +27 -8
- package/dist/auth/clerk.js.map +1 -1
- package/dist/connector-scope.d.ts +13 -0
- package/dist/connector-scope.d.ts.map +1 -0
- package/dist/connector-scope.js +35 -0
- package/dist/connector-scope.js.map +1 -0
- package/dist/connectors/api.d.ts +5 -5
- package/dist/connectors/api.d.ts.map +1 -1
- package/dist/connectors/remote-mcp.d.ts +3 -3
- package/dist/connectors/remote-mcp.d.ts.map +1 -1
- package/dist/connectors/remote-mcp.js +309 -10
- package/dist/connectors/remote-mcp.js.map +1 -1
- package/dist/credential-health.d.ts +8 -5
- package/dist/credential-health.d.ts.map +1 -1
- package/dist/credential-health.js +99 -51
- package/dist/credential-health.js.map +1 -1
- package/dist/credentials.d.ts +51 -2
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +68 -3
- package/dist/credentials.js.map +1 -1
- package/dist/index.d.ts +83 -82
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +74 -24
- package/dist/index.js.map +1 -1
- package/dist/meta-tools.d.ts +3 -3
- package/dist/meta-tools.d.ts.map +1 -1
- package/dist/meta-tools.js +16 -7
- package/dist/meta-tools.js.map +1 -1
- package/dist/registry.d.ts +3 -2
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +4 -3
- package/dist/registry.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +144 -52
- package/dist/server.js.map +1 -1
- package/dist/toolkits.js +1 -1
- package/dist/types.d.ts +41 -27
- package/dist/types.d.ts.map +1 -1
- package/dist/ui.d.ts +24 -10
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +594 -172
- package/dist/ui.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/src/auth/bearer.ts +10 -8
- package/src/auth/clerk.ts +28 -9
- package/src/connector-scope.ts +41 -0
- package/src/connectors/api.ts +5 -5
- package/src/connectors/remote-mcp.ts +348 -25
- package/src/credential-health.ts +120 -57
- package/src/credentials.ts +96 -3
- package/src/index.ts +169 -106
- package/src/meta-tools.ts +22 -7
- package/src/registry.ts +4 -3
- package/src/server.ts +183 -70
- package/src/toolkits.ts +1 -1
- package/src/types.ts +41 -27
- package/src/ui.ts +631 -170
- package/src/version.ts +1 -1
package/dist/connectors/api.d.ts
CHANGED
|
@@ -20,9 +20,9 @@ export interface ApiOptions {
|
|
|
20
20
|
/**
|
|
21
21
|
* Max inline result size (bytes) for this connector's tools before
|
|
22
22
|
* call_tool/batch_call truncate and stash the full text for get_result
|
|
23
|
-
* paging. Overrides the deployment's `maxResultBytes`; omit to inherit
|
|
24
|
-
* Must be a whole number of bytes >= 1; anything else warns at startup
|
|
25
|
-
* is ignored.
|
|
23
|
+
* paging. Overrides the deployment's `calls.maxResultBytes`; omit to inherit
|
|
24
|
+
* it. Must be a whole number of bytes >= 1; anything else warns at startup
|
|
25
|
+
* and is ignored.
|
|
26
26
|
*/
|
|
27
27
|
maxResultBytes?: number;
|
|
28
28
|
/**
|
|
@@ -30,9 +30,9 @@ export interface ApiOptions {
|
|
|
30
30
|
* meta-tool as `connector:<id>`. See `Connector.usageGuide`.
|
|
31
31
|
*/
|
|
32
32
|
usageGuide?: string;
|
|
33
|
-
/** Optional operator-managed credential exposed through ctx.credential and /
|
|
33
|
+
/** Optional operator-managed credential exposed through ctx.credential and /credentials. */
|
|
34
34
|
credential?: ConnectorCredentialConfig;
|
|
35
|
-
/** Optional validation behind /
|
|
35
|
+
/** Optional validation behind /credentials' Test action. */
|
|
36
36
|
testCredential?: (value: string, ctx: ConnectorContext) => Promise<CredentialTestResult>;
|
|
37
37
|
/** Optional validation for named multi-field credentials. */
|
|
38
38
|
testCredentials?: (values: ConnectorCredentialValues, ctx: ConnectorContext) => Promise<CredentialTestResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/connectors/api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,yBAAyB,EACzB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,EACV,eAAe,EAEhB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,gBAAgB,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;CAC3E;AAED,MAAM,WAAW,UAAU;IACzB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/connectors/api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,yBAAyB,EACzB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,EACV,eAAe,EAEhB,MAAM,aAAa,CAAC;AAErB,M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ytes) for this connector's tools before
|
|
16
16
|
* call_tool/batch_call truncate and stash the full text for get_result
|
|
17
|
-
* paging. Overrides the deployment's `maxResultBytes`; omit to inherit
|
|
18
|
-
* Must be a whole number of bytes >= 1; anything else warns at startup
|
|
19
|
-
* is ignored.
|
|
17
|
+
* paging. Overrides the deployment's `calls.maxResultBytes`; omit to inherit
|
|
18
|
+
* it. Must be a whole number of bytes >= 1; anything else warns at startup
|
|
19
|
+
* and is ignored.
|
|
20
20
|
*/
|
|
21
21
|
maxResultBytes?: number;
|
|
22
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-mcp.d.ts","sourceRoot":"","sources":["../../src/connectors/remote-mcp.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAK/E,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAEhB,MAAM,EAEP,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtB,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,SAAS,CAAC;CAC1D;
|
|
1
|
+
{"version":3,"file":"remote-mcp.d.ts","sourceRoot":"","sources":["../../src/connectors/remote-mcp.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAK/E,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAEhB,MAAM,EAEP,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtB,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,SAAS,CAAC;CAC1D;AAuKD;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,SAAS,CA2fvE"}
|
|
@@ -5,9 +5,131 @@ import { CfWorkerJsonSchemaValidator } from "@modelcontextprotocol/sdk/validatio
|
|
|
5
5
|
import { KvOAuthProvider } from "../auth/downstream-oauth.js";
|
|
6
6
|
import { ConnectorCallError } from "../errors.js";
|
|
7
7
|
import { CONNECTA_VERSION } from "../version.js";
|
|
8
|
+
/**
|
|
9
|
+
* How long a downstream gets to answer the session-termination DELETE before
|
|
10
|
+
* teardown stops waiting. Deliberately a fraction of the core's scope-close
|
|
11
|
+
* budget (`closeConnectorScope`), so the whole teardown still lands inside the
|
|
12
|
+
* window that budget makes safe on an edge runtime: whatever is still in flight
|
|
13
|
+
* when this expires is aborted by the close that immediately follows. What that
|
|
14
|
+
* costs is only the acknowledgement — the DELETE is headers-only and has long
|
|
15
|
+
* since gone out — so a slow provider still usually ends the session; it just
|
|
16
|
+
* does not get to tell us so.
|
|
17
|
+
*/
|
|
18
|
+
const TERMINATE_SESSION_BUDGET_MS = 50;
|
|
19
|
+
/**
|
|
20
|
+
* Ceiling on the tools one catalog refresh will accumulate while walking
|
|
21
|
+
* `tools/list`.
|
|
22
|
+
*
|
|
23
|
+
* This is the bound that matters, and pages are the wrong dimension to put it
|
|
24
|
+
* in: the *server* picks the page size, so a page ceiling is a tool ceiling
|
|
25
|
+
* multiplied by a number connecta can neither observe in advance nor control.
|
|
26
|
+
* At ten tools a page, 100 pages is 1,000 tools; at a hundred, 10,000 — and
|
|
27
|
+
* connecta's own large-catalog envelope is benchmarked to 100,000 (issue #82).
|
|
28
|
+
* A page ceiling low enough to be a real defense therefore sits *inside* the
|
|
29
|
+
* catalog sizes this product exists to serve. Worse, the common conformant
|
|
30
|
+
* idiom is to advertise a `nextCursor` whenever a page came back full and then
|
|
31
|
+
* serve one empty page to terminate, so a perfectly well-behaved 10,000-tool
|
|
32
|
+
* server paging at 100 spends 101 requests: bound the pages and its entire
|
|
33
|
+
* catalog fails, for doing nothing wrong.
|
|
34
|
+
*
|
|
35
|
+
* So the ceiling goes on accumulated tools — the thing actually held in memory
|
|
36
|
+
* — and it sits at the top of the benchmarked envelope rather than below it.
|
|
37
|
+
* Deliberately the same philosophy as issue #82's discovery-response bounds:
|
|
38
|
+
* cap the bytes a caller can be made to hold, not the number of round trips it
|
|
39
|
+
* took to get them.
|
|
40
|
+
*/
|
|
41
|
+
const MAX_TOOLS = 100_000;
|
|
42
|
+
/**
|
|
43
|
+
* Absolute backstop on `tools/list` pages in one refresh — a runaway guard, not
|
|
44
|
+
* the primary defense.
|
|
45
|
+
*
|
|
46
|
+
* The walk terminates on its own well before this: a cursor handed back twice
|
|
47
|
+
* is a definite loop, two consecutive pages that add no new tools are a server
|
|
48
|
+
* going nowhere, and MAX_TOOLS caps what any of it can accumulate. This exists
|
|
49
|
+
* only so the loop is finite even if a downstream somehow satisfies all three
|
|
50
|
+
* forever, because the caller's probe deadline abandons the *caller*, not the
|
|
51
|
+
* loop. Set high enough that no honest server reaches it.
|
|
52
|
+
*/
|
|
53
|
+
const MAX_TOOL_PAGES = 10_000;
|
|
54
|
+
/**
|
|
55
|
+
* Re-prime an SDK client's tool-metadata cache from the *full* walked catalog.
|
|
56
|
+
*
|
|
57
|
+
* `Client.listTools()` ends by calling its private `cacheToolMetadata`, which
|
|
58
|
+
* **clears** the output-schema validators and the task-support sets before
|
|
59
|
+
* repopulating them from the page it just received. Call it once per page —
|
|
60
|
+
* which walking the chain necessarily does — and the request-scoped client is
|
|
61
|
+
* left holding metadata for the *last* page alone. `callTool` then finds no
|
|
62
|
+
* validator for every earlier-page tool and silently skips both the "declared
|
|
63
|
+
* an outputSchema but returned no structuredContent" check and the
|
|
64
|
+
* structured-content validation, and finds no task requirement so a
|
|
65
|
+
* required-task tool is dispatched as a plain `tools/call`. Enforcement would
|
|
66
|
+
* depend on which page a tool happened to land on, which is not enforcement.
|
|
67
|
+
*
|
|
68
|
+
* So hand the whole aggregated list back deliberately, once, at the end. The
|
|
69
|
+
* SDK types the method `private`, hence the cast; the SDK version is pinned
|
|
70
|
+
* exactly and `test/remote-mcp-pagination.test.ts` asserts the method still
|
|
71
|
+
* exists, so a bump that renames it fails CI rather than quietly restoring the
|
|
72
|
+
* bug.
|
|
73
|
+
*/
|
|
74
|
+
function primeToolMetadata(client, tools) {
|
|
75
|
+
const prime = client.cacheToolMetadata;
|
|
76
|
+
if (typeof prime !== "function")
|
|
77
|
+
return;
|
|
78
|
+
prime.call(client, tools);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* True for a result-parse failure caused by the page's `nextCursor` itself —
|
|
82
|
+
* in practice `nextCursor: null`, a very common JSON idiom for "no more pages"
|
|
83
|
+
* that the MCP schema does not accept (the chain ends on an *absent* cursor).
|
|
84
|
+
* Duck-typed rather than `instanceof ZodError`: the SDK may parse with its own
|
|
85
|
+
* zod instance, and cross-instance `instanceof` is a coin flip.
|
|
86
|
+
*/
|
|
87
|
+
function isCursorShapeError(err) {
|
|
88
|
+
const issues = err?.issues;
|
|
89
|
+
return (Array.isArray(issues) &&
|
|
90
|
+
issues.some((issue) => {
|
|
91
|
+
const path = issue.path;
|
|
92
|
+
return Array.isArray(path) && path[0] === "nextCursor";
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
8
95
|
function msg(err) {
|
|
9
96
|
return err instanceof Error ? err.message : String(err);
|
|
10
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* End the downstream's session before the connection is torn down.
|
|
100
|
+
*
|
|
101
|
+
* `Client.close()` only unwinds our side — it aborts the transport's controller
|
|
102
|
+
* and fires `onclose`. Spec session termination is a separate DELETE carrying
|
|
103
|
+
* `Mcp-Session-Id`, and without it a stateful provider keeps the session alive
|
|
104
|
+
* until its own (often hour-long) timeout, which a periodic probe would then
|
|
105
|
+
* accumulate several of per connector.
|
|
106
|
+
*
|
|
107
|
+
* Ordering is load-bearing: the SDK sends that DELETE on the transport's
|
|
108
|
+
* AbortSignal, so calling this *after* close would abort the request on issue
|
|
109
|
+
* and silently do nothing. Everything else is best-effort — a transport with no
|
|
110
|
+
* `terminateSession` (a custom one, or an older SDK), a downstream that refuses
|
|
111
|
+
* (405 is a legal answer), errors, or never replies all fall through to the
|
|
112
|
+
* close with the session left to age out as it did before.
|
|
113
|
+
*/
|
|
114
|
+
async function terminateSession(transport) {
|
|
115
|
+
const terminate = transport.terminateSession;
|
|
116
|
+
if (typeof terminate !== "function")
|
|
117
|
+
return;
|
|
118
|
+
// The SDK issues no request at all when no `mcp-session-id` was captured, so
|
|
119
|
+
// a stateless downstream never sees a spurious DELETE.
|
|
120
|
+
const done = (async () => terminate.call(transport))().catch(() => {
|
|
121
|
+
// The session is being abandoned either way; a refusal changes nothing.
|
|
122
|
+
// Caught here rather than at the await below so a late rejection — one
|
|
123
|
+
// arriving after the budget expired — is still consumed.
|
|
124
|
+
});
|
|
125
|
+
await new Promise((resolve) => {
|
|
126
|
+
const timer = setTimeout(resolve, TERMINATE_SESSION_BUDGET_MS);
|
|
127
|
+
done.then(() => {
|
|
128
|
+
clearTimeout(timer);
|
|
129
|
+
resolve();
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
}
|
|
11
133
|
function isLoopbackHost(hostname) {
|
|
12
134
|
return (hostname === "localhost" ||
|
|
13
135
|
hostname === "127.0.0.1" ||
|
|
@@ -47,6 +169,25 @@ export function remoteMcp(id, opts) {
|
|
|
47
169
|
}
|
|
48
170
|
/** Typed per-call auth signal; the SDK's UnauthorizedError stays as cause. */
|
|
49
171
|
const authRequiredError = (cause) => new ConnectorCallError("auth_required", `Connector "${id}" requires authorization — call authorize_connector({ connector: "${id}" }) and open the returned URL.`, { cause });
|
|
172
|
+
const scopeEndedError = () => new Error(`Connector "${id}" scope ended during connection.`);
|
|
173
|
+
/**
|
|
174
|
+
* One `tools/list` request. The only thing wrapped here is the diagnosis of a
|
|
175
|
+
* `nextCursor` the MCP result schema refuses — overwhelmingly `null`, which
|
|
176
|
+
* plenty of servers use to mean "no more pages" but the spec spells as an
|
|
177
|
+
* *absent* cursor. The SDK surfaces that as a raw validation dump about a
|
|
178
|
+
* field the operator never sees; say which server broke which rule instead.
|
|
179
|
+
* Accepting `null` as end-of-chain outright is issue #99.
|
|
180
|
+
*/
|
|
181
|
+
const listPage = async (client, cursor) => {
|
|
182
|
+
try {
|
|
183
|
+
return await client.listTools(cursor === undefined ? undefined : { cursor });
|
|
184
|
+
}
|
|
185
|
+
catch (err) {
|
|
186
|
+
if (!isCursorShapeError(err))
|
|
187
|
+
throw err;
|
|
188
|
+
throw new Error(`Connector "${id}" returned a tools/list page whose nextCursor is neither a string nor absent (a null cursor is the usual culprit) — MCP ends pagination on an absent nextCursor, so this catalog cannot be walked.`, { cause: err });
|
|
189
|
+
}
|
|
190
|
+
};
|
|
50
191
|
const stateFor = (ctx) => {
|
|
51
192
|
const scope = ctx.requestScope ?? ctx;
|
|
52
193
|
let state = states.get(scope);
|
|
@@ -58,6 +199,7 @@ export function remoteMcp(id, opts) {
|
|
|
58
199
|
authRequired: false,
|
|
59
200
|
provider: null,
|
|
60
201
|
connectedGeneration: null,
|
|
202
|
+
closed: false,
|
|
61
203
|
};
|
|
62
204
|
states.set(scope, state);
|
|
63
205
|
}
|
|
@@ -93,22 +235,29 @@ export function remoteMcp(id, opts) {
|
|
|
93
235
|
state.connecting = null;
|
|
94
236
|
state.authRequired = false;
|
|
95
237
|
state.connectedGeneration = null;
|
|
238
|
+
// `closed` is deliberately not cleared — see ConnectionState.
|
|
96
239
|
};
|
|
97
240
|
const ensureConnected = async (ctx, state) => {
|
|
98
241
|
// Cross-isolate force re-auth: another isolate bumped the KV generation and
|
|
99
242
|
// wiped credentials. This request's cached client still speaks the old
|
|
100
243
|
// token — drop it so the next connect runs against current state.
|
|
101
244
|
if (state.client && isOauth && state.connectedGeneration !== null) {
|
|
102
|
-
|
|
103
|
-
|
|
245
|
+
const generation = await getProvider(ctx, state).generation();
|
|
246
|
+
if (state.closed)
|
|
247
|
+
throw scopeEndedError();
|
|
248
|
+
if (generation !== state.connectedGeneration) {
|
|
104
249
|
reset(state);
|
|
105
250
|
}
|
|
106
251
|
}
|
|
252
|
+
if (state.closed)
|
|
253
|
+
throw scopeEndedError();
|
|
107
254
|
if (state.client)
|
|
108
255
|
return;
|
|
109
256
|
state.connecting ??= (async () => {
|
|
110
257
|
const provider = isOauth ? getProvider(ctx, state) : null;
|
|
111
258
|
const genAtStart = provider ? await provider.generation() : 0;
|
|
259
|
+
if (state.closed)
|
|
260
|
+
throw scopeEndedError();
|
|
112
261
|
// Stamp the provider so any saveTokens/saveClientInformation the SDK fires
|
|
113
262
|
// during this connect (code exchange, DCR) — or during a later refresh on
|
|
114
263
|
// the resulting client — is dropped if a concurrent force bumps the
|
|
@@ -123,19 +272,47 @@ export function remoteMcp(id, opts) {
|
|
|
123
272
|
state.transport = t;
|
|
124
273
|
try {
|
|
125
274
|
await c.connect(t);
|
|
275
|
+
// A probe deadline can end its scope while connect is still in flight.
|
|
276
|
+
// The transport is closed immediately by closeScope; if connect wins
|
|
277
|
+
// that race anyway, close the resulting client rather than resurrecting
|
|
278
|
+
// a session in the detached state object.
|
|
279
|
+
if (state.closed) {
|
|
280
|
+
try {
|
|
281
|
+
await c.close();
|
|
282
|
+
}
|
|
283
|
+
catch {
|
|
284
|
+
// The scope has already been discarded either way.
|
|
285
|
+
}
|
|
286
|
+
throw scopeEndedError();
|
|
287
|
+
}
|
|
126
288
|
// A force re-auth that landed WHILE we were connecting wiped the creds
|
|
127
289
|
// this client just bound to. Discard it rather than cache a connection
|
|
128
290
|
// that resurrects the wiped-and-reauthorized connector from a stale
|
|
129
291
|
// isolate. Surfaces as auth_required — the connector genuinely needs
|
|
130
292
|
// re-consent now.
|
|
131
|
-
if (provider
|
|
132
|
-
|
|
133
|
-
|
|
293
|
+
if (provider) {
|
|
294
|
+
const generation = await provider.generation();
|
|
295
|
+
// closeScope can land while the generation read is pending, after
|
|
296
|
+
// connect succeeded but before this client is cached. Discard the
|
|
297
|
+
// client on that side of the await too.
|
|
298
|
+
if (state.closed) {
|
|
299
|
+
try {
|
|
300
|
+
await c.close();
|
|
301
|
+
}
|
|
302
|
+
catch {
|
|
303
|
+
// The scope has already been discarded either way.
|
|
304
|
+
}
|
|
305
|
+
throw scopeEndedError();
|
|
134
306
|
}
|
|
135
|
-
|
|
136
|
-
|
|
307
|
+
if (generation !== genAtStart) {
|
|
308
|
+
try {
|
|
309
|
+
await c.close();
|
|
310
|
+
}
|
|
311
|
+
catch {
|
|
312
|
+
// discarding either way
|
|
313
|
+
}
|
|
314
|
+
throw new UnauthorizedError("Connector was re-authorized during connect; reconnect required.");
|
|
137
315
|
}
|
|
138
|
-
throw new UnauthorizedError("Connector was re-authorized during connect; reconnect required.");
|
|
139
316
|
}
|
|
140
317
|
state.client = c;
|
|
141
318
|
state.connectedGeneration = genAtStart;
|
|
@@ -164,11 +341,102 @@ export function remoteMcp(id, opts) {
|
|
|
164
341
|
description: opts.description,
|
|
165
342
|
maxResultBytes: opts.maxResultBytes,
|
|
166
343
|
usageGuide: opts.usageGuide,
|
|
344
|
+
// `tools/list` is cursor-paginated: the server chooses the page size and
|
|
345
|
+
// signals "there is more" with a `nextCursor`, which the SDK's
|
|
346
|
+
// Client.listTools() returns without following. Collect the whole chain
|
|
347
|
+
// here, because a half-collected catalog is indistinguishable from a small
|
|
348
|
+
// one — later-page tools would simply appear not to exist, unsearchable and
|
|
349
|
+
// unaddressable, with nothing anywhere saying why.
|
|
350
|
+
//
|
|
351
|
+
// All pages ride the one request-scoped client already connected above, and
|
|
352
|
+
// the accumulator is returned rather than stored: a cursor is opaque and
|
|
353
|
+
// session-bound, so nothing here may outlive this call.
|
|
167
354
|
async listTools(ctx) {
|
|
168
355
|
const state = stateFor(ctx);
|
|
169
356
|
await ensureConnected(ctx, state);
|
|
170
|
-
|
|
171
|
-
|
|
357
|
+
// Bind the client once so the whole walk provably rides one session — a
|
|
358
|
+
// cursor is only meaningful to the connection that issued it, and a
|
|
359
|
+
// re-read could in principle pick up a different one. It is NOT guarding
|
|
360
|
+
// against closeScope nulling state.client mid-loop: closeScope sets
|
|
361
|
+
// `closed` and nulls `client` in one synchronous run, and the loop
|
|
362
|
+
// re-checks `closed` before every page, so the nulled client is
|
|
363
|
+
// unreachable from here.
|
|
364
|
+
const client = state.client;
|
|
365
|
+
// Raw SDK tools, not ToolDefs: the metadata re-prime below needs fields
|
|
366
|
+
// (task support) that a ToolDef deliberately does not carry.
|
|
367
|
+
const listed = [];
|
|
368
|
+
const names = new Set();
|
|
369
|
+
const spent = new Set();
|
|
370
|
+
let cursor;
|
|
371
|
+
/** Consecutive pages that advertised a successor but added nothing. */
|
|
372
|
+
let barren = 0;
|
|
373
|
+
let complete = false;
|
|
374
|
+
for (let page = 0; page < MAX_TOOL_PAGES; page++) {
|
|
375
|
+
// The scope can end between pages (probe timeout, teardown). Stop
|
|
376
|
+
// rather than keep paging into a transport that is being closed.
|
|
377
|
+
if (state.closed)
|
|
378
|
+
throw scopeEndedError();
|
|
379
|
+
// Page one sends no params at all, so a non-paginated server sees
|
|
380
|
+
// exactly the request it saw before pagination existed.
|
|
381
|
+
const res = await listPage(client, cursor);
|
|
382
|
+
let added = 0;
|
|
383
|
+
for (const t of res.tools) {
|
|
384
|
+
// First page wins. An unstable cursor can serve the same tool on two
|
|
385
|
+
// pages — a failure mode that did not exist while only page one was
|
|
386
|
+
// read — and a duplicate would inflate `toolCount`, double the tool's
|
|
387
|
+
// `search_tools` row, and churn the registry's catalog-changed
|
|
388
|
+
// comparison into a persistence write on every refresh.
|
|
389
|
+
if (names.has(t.name))
|
|
390
|
+
continue;
|
|
391
|
+
names.add(t.name);
|
|
392
|
+
listed.push(t);
|
|
393
|
+
added++;
|
|
394
|
+
}
|
|
395
|
+
// Pagination ends when `nextCursor` is ABSENT — not when it is falsy.
|
|
396
|
+
// An empty string is a legal cursor and means "keep going"; `if
|
|
397
|
+
// (!next)` here would silently truncate that server's catalog.
|
|
398
|
+
const next = res.nextCursor;
|
|
399
|
+
if (typeof next !== "string") {
|
|
400
|
+
complete = true;
|
|
401
|
+
break;
|
|
402
|
+
}
|
|
403
|
+
// A page that adds nothing and still claims a successor made no
|
|
404
|
+
// progress. Allow exactly one: the widespread idiom is to advertise a
|
|
405
|
+
// cursor whenever a page came back full and then serve one empty page
|
|
406
|
+
// to terminate, and that server is conformant. Two in a row is a
|
|
407
|
+
// downstream going nowhere, and this kills a "fresh cursor forever, no
|
|
408
|
+
// tools" adversary in a couple of round trips instead of thousands.
|
|
409
|
+
if (added === 0 && ++barren > 1) {
|
|
410
|
+
throw new Error(`Connector "${id}" returned two consecutive tools/list pages that added no tools and still advertised another — the catalog is not advancing.`);
|
|
411
|
+
}
|
|
412
|
+
if (added > 0)
|
|
413
|
+
barren = 0;
|
|
414
|
+
// A cursor handed back a second time is not a slow server, it is a
|
|
415
|
+
// loop. Fail now rather than walking it until a ceiling notices.
|
|
416
|
+
if (spent.has(next)) {
|
|
417
|
+
throw new Error(`Connector "${id}" handed back a tools/list cursor it had already issued — the pagination chain loops.`);
|
|
418
|
+
}
|
|
419
|
+
// Checked here rather than on arrival: this bounds what a *walk* may
|
|
420
|
+
// accumulate, and a server that answers in one page was always free to
|
|
421
|
+
// send whatever it sends.
|
|
422
|
+
if (listed.length > MAX_TOOLS) {
|
|
423
|
+
throw new Error(`Connector "${id}" advertised further tools/list pages past ${listed.length} tools, over the ${MAX_TOOLS}-tool ceiling one catalog refresh will collect.`);
|
|
424
|
+
}
|
|
425
|
+
// Opaque by contract: handed straight back, never parsed, rewritten,
|
|
426
|
+
// or persisted.
|
|
427
|
+
spent.add(next);
|
|
428
|
+
cursor = next;
|
|
429
|
+
}
|
|
430
|
+
// Fail the refresh outright. Returning what we have would publish a
|
|
431
|
+
// partial catalog that looks complete; throwing lets the registry keep
|
|
432
|
+
// serving the last complete one via its stale fallback.
|
|
433
|
+
if (!complete) {
|
|
434
|
+
throw new Error(`Connector "${id}" kept advertising more tools/list pages after ${MAX_TOOL_PAGES} — refusing to page further.`);
|
|
435
|
+
}
|
|
436
|
+
// Repair what the per-page listTools calls left behind before any of
|
|
437
|
+
// these tools can be called. See primeToolMetadata.
|
|
438
|
+
primeToolMetadata(client, listed);
|
|
439
|
+
return listed.map((t) => ({
|
|
172
440
|
name: t.name,
|
|
173
441
|
description: t.description,
|
|
174
442
|
inputSchema: t.inputSchema,
|
|
@@ -199,6 +467,37 @@ export function remoteMcp(id, opts) {
|
|
|
199
467
|
throw err;
|
|
200
468
|
}
|
|
201
469
|
},
|
|
470
|
+
async closeScope(ctx) {
|
|
471
|
+
const scope = ctx.requestScope ?? ctx;
|
|
472
|
+
const state = states.get(scope);
|
|
473
|
+
if (!state)
|
|
474
|
+
return;
|
|
475
|
+
// Delete before awaiting: a duplicate teardown is a no-op, and no later
|
|
476
|
+
// lookup can reuse the state while its client is closing.
|
|
477
|
+
states.delete(scope);
|
|
478
|
+
state.closed = true;
|
|
479
|
+
const client = state.client;
|
|
480
|
+
const transport = state.transport;
|
|
481
|
+
state.client = null;
|
|
482
|
+
state.transport = null;
|
|
483
|
+
state.connecting = null;
|
|
484
|
+
state.authRequired = false;
|
|
485
|
+
state.connectedGeneration = null;
|
|
486
|
+
// Ask the downstream to drop its session first — closing only aborts our
|
|
487
|
+
// side, and the DELETE that frees the server's rides on the very
|
|
488
|
+
// AbortSignal the close is about to trip.
|
|
489
|
+
if (transport)
|
|
490
|
+
await terminateSession(transport);
|
|
491
|
+
// Client.close() owns its connected transport. During an unfinished or
|
|
492
|
+
// failed connect there is no cached client yet, so close the transport
|
|
493
|
+
// directly to abort/release that half-open session.
|
|
494
|
+
if (client) {
|
|
495
|
+
await client.close();
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
await transport?.close();
|
|
499
|
+
}
|
|
500
|
+
},
|
|
202
501
|
async status(ctx) {
|
|
203
502
|
const state = stateFor(ctx);
|
|
204
503
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-mcp.js","sourceRoot":"","sources":["../../src/connectors/remote-mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAEnG,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,M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wEAAwE;gBACxE,uEAAuE;gBACvE,8CAA8C;gBAC9C,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,uBAAuB,EAAE,CAAC;gBAClD,IAAI,OAAO,EAAE,CAAC;oBACZ,OAAO;wBACL,KAAK,EAAE,eAAe;wBACtB,gBAAgB,EAAE,OAAO;wBACzB,OAAO,EAAE,mDAAmD;qBAC7D,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,IAAI,CAAC;gBACH,MAAM,eAAe,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;gBAClC,OAAO;oBACL,KAAK,EAAE,IAAI;oBACX,OAAO,EAAE,6CAA6C;iBACvD,CAAC;YACJ,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;oBACvB,OAAO;wBACL,KAAK,EAAE,eAAe;wBACtB,gBAAgB,EAAE,MAAM,CAAC,CAAC,uBAAuB,EAAE;wBACnD,OAAO,EAAE,mDAAmD;qBAC7D,CAAC;gBACJ,CAAC;gBACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/C,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -87,7 +87,10 @@ export interface CredentialCheckOptions {
|
|
|
87
87
|
force?: boolean;
|
|
88
88
|
/** Restrict the sweep to these connector ids. Default: every connector. */
|
|
89
89
|
ids?: string[];
|
|
90
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* Internal scope identity supplied by an existing owner. When omitted, the
|
|
92
|
+
* check creates and ends its own probe scope.
|
|
93
|
+
*/
|
|
91
94
|
requestScope?: object;
|
|
92
95
|
}
|
|
93
96
|
/**
|
|
@@ -97,14 +100,14 @@ export interface CredentialCheckOptions {
|
|
|
97
100
|
* Deliberately narrow. `listTools`/`callTool` are NOT liveness probes here: a
|
|
98
101
|
* tool call may mutate downstream state, and the catalog path is already covered
|
|
99
102
|
* by the existing probe. So a connector is checkable only through the two hooks
|
|
100
|
-
* that exist to answer exactly this question — `testCredential(s)` (what
|
|
103
|
+
* that exist to answer exactly this question — `testCredential(s)` (what the
|
|
101
104
|
* Test button runs) and `status()` — and only when it has a credential of ours
|
|
102
105
|
* to be asked about: an operator-managed `credential`, or a stored downstream
|
|
103
106
|
* grant it reports via `hasStoredCredential`. A static-token connector stores
|
|
104
107
|
* nothing here and is never probed on a timer.
|
|
105
108
|
*
|
|
106
109
|
* Whether a test hook counts is `credentialTestRule`'s call, not this function's
|
|
107
|
-
*
|
|
110
|
+
* Credentials Test button and the credential API read (issue #55), so
|
|
108
111
|
* a credential the operator cannot test by hand is not one a sweep tests behind
|
|
109
112
|
* their back. A connector whose only hook cannot test its declared shape is
|
|
110
113
|
* checkable only if it also implements `status()`.
|
|
@@ -125,8 +128,8 @@ export declare function isCheckableConnector(connector: Connector): boolean;
|
|
|
125
128
|
* triggered sweep per interval per isolate, and never two at once, so a burst
|
|
126
129
|
* of requests costs one sweep, not one per request.
|
|
127
130
|
* 4. **Deadline + fan-out bound** — each check is bounded by `timeoutMs` and at
|
|
128
|
-
* most `concurrency` run together (the same shape as the
|
|
129
|
-
* bound on the discovery fan-out, issue #19).
|
|
131
|
+
* most `concurrency` run together (the same shape as the
|
|
132
|
+
* `discovery.probeTimeoutMs` bound on the discovery fan-out, issue #19).
|
|
130
133
|
*/
|
|
131
134
|
export declare class CredentialHealthChecker {
|
|
132
135
|
private readonly deps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-health.d.ts","sourceRoot":"","sources":["../src/credential-health.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credential-health.d.ts","sourceRoot":"","sources":["../src/credential-health.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,KAAK,EACV,SAAS,EACT,gBAA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