@lushly-dev/afd-client 2.3.0 → 2.5.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/README.md +20 -8
- package/dist/client-errors.d.ts +22 -1
- package/dist/client-errors.d.ts.map +1 -1
- package/dist/client-errors.js +76 -2
- package/dist/client-errors.js.map +1 -1
- package/dist/client.d.ts +34 -6
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +216 -11
- package/dist/client.js.map +1 -1
- package/dist/direct-transport.d.ts.map +1 -1
- package/dist/direct-transport.js +9 -2
- package/dist/direct-transport.js.map +1 -1
- package/dist/direct-types.d.ts +10 -0
- package/dist/direct-types.d.ts.map +1 -1
- package/dist/direct.d.ts +4 -3
- package/dist/direct.d.ts.map +1 -1
- package/dist/direct.js +51 -9
- package/dist/direct.js.map +1 -1
- package/dist/handoff.d.ts.map +1 -1
- package/dist/handoff.js +1 -0
- package/dist/handoff.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/result-parsing.d.ts +4 -3
- package/dist/result-parsing.d.ts.map +1 -1
- package/dist/result-parsing.js +13 -3
- package/dist/result-parsing.js.map +1 -1
- package/dist/streamable-http-transport.d.ts +3 -0
- package/dist/streamable-http-transport.d.ts.map +1 -1
- package/dist/streamable-http-transport.js +69 -2
- package/dist/streamable-http-transport.js.map +1 -1
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +9 -3
- package/dist/transport.js.map +1 -1
- package/dist/types.d.ts +28 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +10 -6
package/README.md
CHANGED
|
@@ -183,6 +183,14 @@ for that request. They throw `NotConnectedError`, `RequestTimeoutError`, `JsonRp
|
|
|
183
183
|
(with the JSON-RPC `code` and `data`) or `HttpStatusError`; `call()`, `batch()`, `pipe()` and
|
|
184
184
|
`stream()` never throw and return these as failures instead.
|
|
185
185
|
|
|
186
|
+
When a `call()` times out, drops the connection, gets an HTTP 5xx, receives a JSON-RPC
|
|
187
|
+
`-32603`, or loses the result of a started MCP task while polling, the server may already have
|
|
188
|
+
run the command. Unless the tool was positively declared `_meta.mutation: false` in the cached
|
|
189
|
+
tool listing before dispatch (without contradicting destructive or non-read-only markers),
|
|
190
|
+
`call()` returns `OUTCOME_UNKNOWN` with `retryable: false` and records the underlying error code
|
|
191
|
+
in `details.cause`. Tools declared `_meta.mutation: false` return the underlying cause
|
|
192
|
+
(`TIMEOUT`, `CONNECTION_ERROR`, `HTTP_5xx`, `INTERNAL_ERROR`).
|
|
193
|
+
|
|
186
194
|
### Batches and Pipelines
|
|
187
195
|
|
|
188
196
|
```typescript
|
|
@@ -330,7 +338,7 @@ It exports `StreamableHttpTransport`, `MODERN_PROTOCOL_VERSION`, and the types
|
|
|
330
338
|
- A page on another origin needs the server to allow it through CORS: MCP's headers trigger a
|
|
331
339
|
preflight, and the response must expose `Mcp-Session-Id`. AFD's server does both for an allowed
|
|
332
340
|
origin.
|
|
333
|
-
-
|
|
341
|
+
- For in-process calls in a browser, use `@lushly-dev/afd-client/direct` (see DirectClient below).
|
|
334
342
|
|
|
335
343
|
### SSE Transport (Deprecated)
|
|
336
344
|
|
|
@@ -364,7 +372,7 @@ server). No URL is needed.
|
|
|
364
372
|
|
|
365
373
|
```typescript
|
|
366
374
|
import { createClient } from '@lushly-dev/afd-client';
|
|
367
|
-
import { createDirectRegistry } from '@lushly-dev/afd-server';
|
|
375
|
+
import { createDirectRegistry } from '@lushly-dev/afd-server/direct';
|
|
368
376
|
|
|
369
377
|
const client = createClient({ transport: 'direct', registry: createDirectRegistry(commands) });
|
|
370
378
|
await client.connect();
|
|
@@ -379,12 +387,14 @@ the meta-tools and grouped tools that `call()` routes, and one tool per command
|
|
|
379
387
|
|
|
380
388
|
### DirectClient (Zero Overhead)
|
|
381
389
|
|
|
390
|
+
Use `@lushly-dev/afd-client/direct` for the browser-safe in-process client and its types. It loads no MCP SDK, `eventsource` or Node built-in. Pair it with `@lushly-dev/afd-server/direct` in browsers, workers and webviews; root imports remain supported.
|
|
391
|
+
|
|
382
392
|
For co-located agents (same runtime as the application), use `createDirectClient` to bypass all transport overhead. Build the registry with `createDirectRegistry` from `@lushly-dev/afd-server`: it runs each call through the same engine as the MCP server (Zod input validation, middleware, error sanitization) and only offers commands exposed to agents (`expose.agent`, on by default).
|
|
383
393
|
|
|
384
394
|
```typescript
|
|
385
395
|
import { isSuccess } from '@lushly-dev/afd-core';
|
|
386
|
-
import { createDirectClient, isUnknownToolError } from '@lushly-dev/afd-client';
|
|
387
|
-
import { createDirectRegistry } from '@lushly-dev/afd-server';
|
|
396
|
+
import { createDirectClient, isUnknownToolError } from '@lushly-dev/afd-client/direct';
|
|
397
|
+
import { createDirectRegistry } from '@lushly-dev/afd-server/direct';
|
|
388
398
|
import { commands } from '@my-app/commands';
|
|
389
399
|
|
|
390
400
|
// Direct execution - ~0.03-0.1ms latency vs 2-10ms for MCP
|
|
@@ -607,13 +617,15 @@ server's own `error.data.suggestion` is used when it sends one.
|
|
|
607
617
|
| JSON-RPC -32600 | `INVALID_REQUEST` | no |
|
|
608
618
|
| JSON-RPC -32601 | `METHOD_NOT_FOUND` | no |
|
|
609
619
|
| JSON-RPC -32602 | `INVALID_INPUT` | no |
|
|
610
|
-
| JSON-RPC -32603 | `INTERNAL_ERROR` | yes |
|
|
620
|
+
| JSON-RPC -32603 | `INTERNAL_ERROR` | yes (read-only `call()` only; otherwise `OUTCOME_UNKNOWN`, no) |
|
|
611
621
|
| JSON-RPC -32000 (AFD: Host, Origin, Content-Type or size rejected) | `REQUEST_REJECTED` | no |
|
|
612
622
|
| JSON-RPC -32001 (AFD: unknown or expired `Mcp-Session-Id`) | `SESSION_NOT_FOUND` | yes |
|
|
623
|
+
| HTTP 503 with JSON-RPC -32000 and `data.code: "SESSION_LIMIT_REACHED"` (AFD: session store full on `initialize`; `connect()` rejects with a `SessionLimitError`) | `SESSION_LIMIT_REACHED` | yes, after `Retry-After` (`details.retryAfterSeconds`) |
|
|
613
624
|
| Other JSON-RPC codes | `JSON_RPC_ERROR` | no |
|
|
614
|
-
| Other HTTP status | `HTTP_<status>` | 5xx
|
|
615
|
-
| No response within `timeout` | `TIMEOUT` | yes |
|
|
616
|
-
| Network failure | `CONNECTION_ERROR` | yes |
|
|
625
|
+
| Other HTTP status | `HTTP_<status>` | 429; 5xx on read-only `call()` only (otherwise `OUTCOME_UNKNOWN`, no) |
|
|
626
|
+
| No response within `timeout` | `TIMEOUT` | yes (read-only `call()` only; otherwise `OUTCOME_UNKNOWN`, no) |
|
|
627
|
+
| Network failure | `CONNECTION_ERROR` | yes (read-only `call()` only; otherwise `OUTCOME_UNKNOWN`, no) |
|
|
628
|
+
| Timeout, network failure, HTTP 5xx, JSON-RPC -32603, or lost task poll on `batch()`, `pipe()`, or a `call()` not declared `_meta.mutation: false` | `OUTCOME_UNKNOWN` | no (`details.cause` holds the underlying code) |
|
|
617
629
|
| Called before `connect()` | `NOT_CONNECTED` | no |
|
|
618
630
|
|
|
619
631
|
The details carry `jsonRpcCode` for JSON-RPC errors.
|
package/dist/client-errors.d.ts
CHANGED
|
@@ -20,8 +20,29 @@ export declare class RequestTimeoutError extends Error {
|
|
|
20
20
|
export declare class HttpStatusError extends Error {
|
|
21
21
|
readonly status: number;
|
|
22
22
|
readonly statusText: string;
|
|
23
|
-
constructor(status: number, statusText: string);
|
|
23
|
+
constructor(status: number, statusText: string, options?: ErrorOptions);
|
|
24
24
|
}
|
|
25
|
+
/** The `data.code` an AFD server gives a refused `initialize` when its session store is full. */
|
|
26
|
+
export declare const SESSION_LIMIT_REACHED = "SESSION_LIMIT_REACHED";
|
|
27
|
+
/**
|
|
28
|
+
* The server refused `initialize` because its session store is full (HTTP 503 with a JSON-RPC
|
|
29
|
+
* error whose `data.code` is `SESSION_LIMIT_REACHED`). Nothing ran; retry after `retryAfterSeconds`.
|
|
30
|
+
*/
|
|
31
|
+
export declare class SessionLimitError extends Error {
|
|
32
|
+
readonly suggestion: string;
|
|
33
|
+
/** The delay the server gave, from `Retry-After` or `data.retryAfter`, in seconds. */
|
|
34
|
+
readonly retryAfterSeconds: number | undefined;
|
|
35
|
+
readonly code = "SESSION_LIMIT_REACHED";
|
|
36
|
+
readonly retryable = true;
|
|
37
|
+
constructor(message: string, suggestion: string,
|
|
38
|
+
/** The delay the server gave, from `Retry-After` or `data.retryAfter`, in seconds. */
|
|
39
|
+
retryAfterSeconds: number | undefined);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The `SessionLimitError` an HTTP response stands for: only a 503 whose JSON-RPC error carries
|
|
43
|
+
* `data.code: 'SESSION_LIMIT_REACHED'`. A bare JSON-RPC code, or that code on another status, is not one.
|
|
44
|
+
*/
|
|
45
|
+
export declare function sessionLimitError(status: number, retryAfter: string | null | undefined, error: McpError): SessionLimitError | undefined;
|
|
25
46
|
/** The server answered with a JSON-RPC error object. */
|
|
26
47
|
export declare class JsonRpcResponseError extends Error {
|
|
27
48
|
readonly code: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-errors.d.ts","sourceRoot":"","sources":["../src/client-errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGnE,wDAAwD;AACxD,qBAAa,iBAAkB,SAAQ,KAAK;IAC3C,cAGC;CACD;AAED,sDAAsD;AACtD,qBAAa,mBAAoB,SAAQ,KAAK;IAE5C,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM;IAF3B,YACU,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EAI1B;CACD;AAED,iFAAiF;AACjF,qBAAa,eAAgB,SAAQ,KAAK;IAExC,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM;IAF5B,YACU,MAAM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CAW/B;AAED,wDAAwD;AACxD,qBAAa,oBAAqB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAEvB,YAAY,KAAK,EAAE,QAAQ,EAK1B;CACD;AAkED,6FAA6F;AAC7F,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CAYpF;AASD,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAiBxD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAmD3D"}
|
package/dist/client-errors.js
CHANGED
|
@@ -28,13 +28,53 @@ export class RequestTimeoutError extends Error {
|
|
|
28
28
|
export class HttpStatusError extends Error {
|
|
29
29
|
status;
|
|
30
30
|
statusText;
|
|
31
|
-
constructor(status, statusText) {
|
|
32
|
-
super(`HTTP error: ${status} ${statusText}
|
|
31
|
+
constructor(status, statusText, options) {
|
|
32
|
+
super(`HTTP error: ${status} ${statusText}`, options);
|
|
33
33
|
this.status = status;
|
|
34
34
|
this.statusText = statusText;
|
|
35
35
|
this.name = 'HttpStatusError';
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
/** The `data.code` an AFD server gives a refused `initialize` when its session store is full. */
|
|
39
|
+
export const SESSION_LIMIT_REACHED = 'SESSION_LIMIT_REACHED';
|
|
40
|
+
/**
|
|
41
|
+
* The server refused `initialize` because its session store is full (HTTP 503 with a JSON-RPC
|
|
42
|
+
* error whose `data.code` is `SESSION_LIMIT_REACHED`). Nothing ran; retry after `retryAfterSeconds`.
|
|
43
|
+
*/
|
|
44
|
+
export class SessionLimitError extends Error {
|
|
45
|
+
suggestion;
|
|
46
|
+
retryAfterSeconds;
|
|
47
|
+
code = SESSION_LIMIT_REACHED;
|
|
48
|
+
retryable = true;
|
|
49
|
+
constructor(message, suggestion,
|
|
50
|
+
/** The delay the server gave, from `Retry-After` or `data.retryAfter`, in seconds. */
|
|
51
|
+
retryAfterSeconds) {
|
|
52
|
+
super(message);
|
|
53
|
+
this.suggestion = suggestion;
|
|
54
|
+
this.retryAfterSeconds = retryAfterSeconds;
|
|
55
|
+
this.name = 'SessionLimitError';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function seconds(value) {
|
|
59
|
+
const parsed = typeof value === 'string' ? Number(value.trim()) : value;
|
|
60
|
+
return typeof parsed === 'number' && Number.isSafeInteger(parsed) && parsed >= 0
|
|
61
|
+
? parsed
|
|
62
|
+
: undefined;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The `SessionLimitError` an HTTP response stands for: only a 503 whose JSON-RPC error carries
|
|
66
|
+
* `data.code: 'SESSION_LIMIT_REACHED'`. A bare JSON-RPC code, or that code on another status, is not one.
|
|
67
|
+
*/
|
|
68
|
+
export function sessionLimitError(status, retryAfter, error) {
|
|
69
|
+
const data = error.data;
|
|
70
|
+
if (status !== 503 || typeof data !== 'object' || data === null)
|
|
71
|
+
return undefined;
|
|
72
|
+
if (!('code' in data) || data.code !== SESSION_LIMIT_REACHED)
|
|
73
|
+
return undefined;
|
|
74
|
+
const delay = seconds(retryAfter) ?? seconds('retryAfter' in data ? data.retryAfter : undefined);
|
|
75
|
+
return new SessionLimitError(error.message || 'The server has too many live MCP sessions', serverSuggestion(data) ??
|
|
76
|
+
`Retry after ${delay ?? 'the'} seconds the server gave in Retry-After, or reuse a session you hold`, delay);
|
|
77
|
+
}
|
|
38
78
|
/** The server answered with a JSON-RPC error object. */
|
|
39
79
|
export class JsonRpcResponseError extends Error {
|
|
40
80
|
code;
|
|
@@ -84,6 +124,11 @@ const JSON_RPC_CODES = {
|
|
|
84
124
|
retryable: true,
|
|
85
125
|
suggestion: 'The MCP session is unknown or expired; reconnect to start a new session',
|
|
86
126
|
},
|
|
127
|
+
[-32021]: {
|
|
128
|
+
code: 'MISSING_CLIENT_CAPABILITY',
|
|
129
|
+
retryable: false,
|
|
130
|
+
suggestion: 'Reconnect with the required client capability enabled (for MCP Tasks, set tasks: true on McpClient)',
|
|
131
|
+
},
|
|
87
132
|
};
|
|
88
133
|
function serverSuggestion(data) {
|
|
89
134
|
if (typeof data !== 'object' || data === null || !('suggestion' in data))
|
|
@@ -105,6 +150,12 @@ export function jsonRpcErrorToCommandError(error) {
|
|
|
105
150
|
details: { jsonRpcCode: error.code },
|
|
106
151
|
};
|
|
107
152
|
}
|
|
153
|
+
const UNKNOWN_OUTCOME_ERROR_CODES = new Set([
|
|
154
|
+
ErrorCodes.TIMEOUT,
|
|
155
|
+
ErrorCodes.CONNECTION_ERROR,
|
|
156
|
+
ErrorCodes.INTERNAL_ERROR,
|
|
157
|
+
'OUTCOME_UNKNOWN',
|
|
158
|
+
]);
|
|
108
159
|
/** Whether the server can have run the request that failed with `error`. */
|
|
109
160
|
export function isOutcomeUnknown(error) {
|
|
110
161
|
if (error instanceof NotConnectedError)
|
|
@@ -112,8 +163,20 @@ export function isOutcomeUnknown(error) {
|
|
|
112
163
|
if (error instanceof JsonRpcResponseError) {
|
|
113
164
|
return JSON_RPC_CODES[error.code]?.outcomeUnknown === true;
|
|
114
165
|
}
|
|
166
|
+
if (error instanceof SessionLimitError)
|
|
167
|
+
return false;
|
|
115
168
|
if (error instanceof HttpStatusError)
|
|
116
169
|
return error.status < 400 || error.status >= 500;
|
|
170
|
+
if (isCommandError(error)) {
|
|
171
|
+
if (UNKNOWN_OUTCOME_ERROR_CODES.has(error.code))
|
|
172
|
+
return true;
|
|
173
|
+
const httpMatch = /^HTTP_(\d{3})$/.exec(error.code);
|
|
174
|
+
if (httpMatch) {
|
|
175
|
+
const status = Number(httpMatch[1]);
|
|
176
|
+
return status < 400 || status >= 500;
|
|
177
|
+
}
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
117
180
|
return true;
|
|
118
181
|
}
|
|
119
182
|
/**
|
|
@@ -122,6 +185,17 @@ export function isOutcomeUnknown(error) {
|
|
|
122
185
|
export function toCommandError(error) {
|
|
123
186
|
if (error instanceof JsonRpcResponseError)
|
|
124
187
|
return jsonRpcErrorToCommandError(error);
|
|
188
|
+
if (error instanceof SessionLimitError) {
|
|
189
|
+
return {
|
|
190
|
+
code: error.code,
|
|
191
|
+
message: error.message,
|
|
192
|
+
suggestion: error.suggestion,
|
|
193
|
+
retryable: true,
|
|
194
|
+
...(error.retryAfterSeconds === undefined
|
|
195
|
+
? {}
|
|
196
|
+
: { details: { retryAfterSeconds: error.retryAfterSeconds } }),
|
|
197
|
+
};
|
|
198
|
+
}
|
|
125
199
|
if (error instanceof NotConnectedError) {
|
|
126
200
|
return {
|
|
127
201
|
code: 'NOT_CONNECTED',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-errors.js","sourceRoot":"","sources":["../src/client-errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAElE,wDAAwD;AACxD,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC3C;QACC,KAAK,CAAC,eAAe,CAAC,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IACjC,CAAC;CACD;AAED,sDAAsD;AACtD,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAEnC,MAAM;IACN,SAAS;IAFnB,YACU,MAAc,EACd,SAAiB;QAE1B,KAAK,CAAC,YAAY,MAAM,qBAAqB,SAAS,IAAI,CAAC,CAAC;sBAHnD,MAAM;yBACN,SAAS;QAGlB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACnC,CAAC;CACD;AAED,iFAAiF;AACjF,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAE/B,MAAM;IACN,UAAU;IAFpB,YACU,MAAc,EACd,UAAkB;
|
|
1
|
+
{"version":3,"file":"client-errors.js","sourceRoot":"","sources":["../src/client-errors.ts"],"names":[],"mappings":"AAAA;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EAAE,KAAK,CAAC,OAAO;YACtB,UAAU,EACT,yHAAyH;YAC1H,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE;SAC7D,CAAC;IACH,CAAC;IACD,IAAI,KAAK,YAAY,eAAe,EAAE,CAAC;QACtC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,CAAC;QAC/D,OAAO;YACN,IAAI,EAAE,QAAQ,KAAK,CAAC,MAAM,EAAE;YAC5B,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,UAAU,EAAE,UAAU;gBACrB,CAAC,CAAC,sDAAsD;gBACxD,CAAC,CAAC,yFAAyF;YAC5F,SAAS,EAAE,UAAU;SACrB,CAAC;IACH,CAAC;IACD,IAAI,cAAc,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC;IAC/C,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO;QACN,IAAI,EAAE,UAAU,CAAC,gBAAgB;QACjC,OAAO,EAAE,OAAO,IAAI,oBAAoB;QACxC,UAAU,EACT,wIAAwI;QACzI,SAAS,EAAE,IAAI;KACf,CAAC;AACH,CAAC"}
|
package/dist/client.d.ts
CHANGED
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { BatchCommand, BatchOptions, BatchResult, CommandResult, McpInitializeResult, McpTool, McpToolCallResult, PipelineOptions, PipelineRequest, PipelineResult, PipelineStep, StreamCallbacks, StreamChunk, StreamOptions } from '@lushly-dev/afd-core';
|
|
5
5
|
import { McpClientEventEmitter } from './client-events.js';
|
|
6
|
-
import type { ClientStatus, McpClientConfig } from './types.js';
|
|
6
|
+
import type { ClientStatus, DetailedTask, McpClientConfig, TaskInfo } from './types.js';
|
|
7
7
|
/** Options for a single `request()` or `callTool()`. */
|
|
8
8
|
export interface RequestOptions {
|
|
9
9
|
/** Request timeout in milliseconds. Default: the client's `timeout`. */
|
|
10
10
|
timeout?: number;
|
|
11
11
|
/** Cancel this request and signal in-process execution to stop. */
|
|
12
12
|
signal?: AbortSignal;
|
|
13
|
+
/** Called when a task started by `callTool()` / `call()` changes status or `statusMessage`. */
|
|
14
|
+
onTaskProgress?: (task: TaskInfo) => void;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* Extra time `batch()` and `pipe()` wait beyond the server-side deadline in their options, so
|
|
@@ -53,6 +55,8 @@ export declare class McpClient extends McpClientEventEmitter {
|
|
|
53
55
|
private reconnectAttempts;
|
|
54
56
|
private pendingRequests;
|
|
55
57
|
private activeStreams;
|
|
58
|
+
private activeTaskPolls;
|
|
59
|
+
private failedTaskPollErrors;
|
|
56
60
|
private intentionalDisconnect;
|
|
57
61
|
private connectionGeneration;
|
|
58
62
|
private connectionController;
|
|
@@ -92,20 +96,36 @@ export declare class McpClient extends McpClientEventEmitter {
|
|
|
92
96
|
*/
|
|
93
97
|
refreshTools(): Promise<McpTool[]>;
|
|
94
98
|
/**
|
|
95
|
-
*
|
|
99
|
+
* Fetch the current state of an MCP task (`tasks/get`).
|
|
100
|
+
*/
|
|
101
|
+
getTask(taskId: string, options?: RequestOptions): Promise<DetailedTask>;
|
|
102
|
+
/**
|
|
103
|
+
* Request cooperative cancellation of an MCP task (`tasks/cancel`).
|
|
104
|
+
*/
|
|
105
|
+
cancelTask(taskId: string, options?: RequestOptions): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Call a tool and return raw MCP result. If the server responds with an MCP task
|
|
108
|
+
* (`resultType: 'task'`), polls `tasks/get` until the task completes.
|
|
96
109
|
*
|
|
97
110
|
* @param name - Tool name
|
|
98
111
|
* @param args - Tool arguments
|
|
99
|
-
* @param options - Request options such as `timeout`
|
|
112
|
+
* @param options - Request options such as `timeout`, `signal`, `onTaskProgress`
|
|
100
113
|
*/
|
|
101
114
|
callTool(name: string, args?: Record<string, unknown>, options?: RequestOptions): Promise<McpToolCallResult>;
|
|
115
|
+
private markTaskPollFailure;
|
|
116
|
+
private isTaskPollFailure;
|
|
117
|
+
private pollTask;
|
|
102
118
|
/**
|
|
103
119
|
* Call a command and return a CommandResult.
|
|
104
120
|
*
|
|
105
121
|
* This is the preferred method for AFD - it wraps the MCP response
|
|
106
|
-
* in a standardized CommandResult. It never rejects: a
|
|
107
|
-
* a matching AFD code (`INVALID_INPUT` for -32602, `SESSION_NOT_FOUND` for -32001,
|
|
108
|
-
*
|
|
122
|
+
* in a standardized CommandResult. It never rejects: a definite refusal becomes a failure with
|
|
123
|
+
* a matching AFD code (`INVALID_INPUT` for -32602, `SESSION_NOT_FOUND` for -32001, `HTTP_4xx`,
|
|
124
|
+
* `NOT_CONNECTED`, ...). When a timeout, connection loss, HTTP 5xx, JSON-RPC `-32603`, or a
|
|
125
|
+
* lost task poll leaves the outcome unknown, tools not positively declared `_meta.mutation === false`
|
|
126
|
+
* (without contradicting mutation/destructive/non-read-only markers) return `OUTCOME_UNKNOWN` with
|
|
127
|
+
* `retryable: false` and the underlying cause in `details.cause`; read-only tools return the
|
|
128
|
+
* underlying error (`TIMEOUT`, `CONNECTION_ERROR`, `HTTP_5xx`, `INTERNAL_ERROR`, ...).
|
|
109
129
|
*
|
|
110
130
|
* @param name - Command/tool name
|
|
111
131
|
* @param args - Command arguments
|
|
@@ -245,6 +265,14 @@ export declare class McpClient extends McpClientEventEmitter {
|
|
|
245
265
|
* HttpStatusError for another non-2xx HTTP status
|
|
246
266
|
*/
|
|
247
267
|
request<T = unknown>(method: string, params?: Record<string, unknown>, options?: RequestOptions): Promise<T>;
|
|
268
|
+
/**
|
|
269
|
+
* Whether the cached tool listing positively declares `_meta.mutation === false` for `name`.
|
|
270
|
+
*
|
|
271
|
+
* Unknown tools, tools without `_meta.mutation: false`, and tools with any contradicting
|
|
272
|
+
* mutation, destructive, or non-read-only flag return `false` so ambiguous transport failures
|
|
273
|
+
* fail closed as `OUTCOME_UNKNOWN`.
|
|
274
|
+
*/
|
|
275
|
+
private isReadOnlyTool;
|
|
248
276
|
/** A request timeout that outlasts a server-side deadline by the margin. */
|
|
249
277
|
private timeoutWithMargin;
|
|
250
278
|
private initialize;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,EACb,mBAAmB,EAEnB,OAAO,EACP,iBAAiB,EAEjB,eAAe,EACf,eAAe,EACf,cAAc,EACd,YAAY,EACZ,eAAe,EACf,WAAW,EACX,aAAa,EACb,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,EACb,mBAAmB,EAEnB,OAAO,EACP,iBAAiB,EAEjB,eAAe,EACf,eAAe,EACf,cAAc,EACd,YAAY,EACZ,eAAe,EACf,WAAW,EACX,aAAa,EACb,MAAM,sBAAsB,CAAC;AAoB9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AA0B3D,OAAO,KAAK,EACX,YAAY,EAEZ,YAAY,EACZ,eAAe,EAGf,QAAQ,EACR,MAAM,YAAY,CAAC;AAWpB,wDAAwD;AACxD,MAAM,WAAW,cAAc;IAC9B,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,+FAA+F;IAC/F,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE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