@mcpmesh/sdk 1.4.1 → 2.0.0-beta.1
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/__tests__/a2a/a2a-bearer.spec.d.ts +2 -0
- package/dist/__tests__/a2a/a2a-bearer.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/a2a-bearer.spec.js +58 -0
- package/dist/__tests__/a2a/a2a-bearer.spec.js.map +1 -0
- package/dist/__tests__/a2a/a2a-client.spec.d.ts +2 -0
- package/dist/__tests__/a2a/a2a-client.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/a2a-client.spec.js +334 -0
- package/dist/__tests__/a2a/a2a-client.spec.js.map +1 -0
- package/dist/__tests__/a2a/a2a-job.spec.d.ts +2 -0
- package/dist/__tests__/a2a/a2a-job.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/a2a-job.spec.js +255 -0
- package/dist/__tests__/a2a/a2a-job.spec.js.map +1 -0
- package/dist/__tests__/a2a/a2a-stream.spec.d.ts +2 -0
- package/dist/__tests__/a2a/a2a-stream.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/a2a-stream.spec.js +278 -0
- package/dist/__tests__/a2a/a2a-stream.spec.js.map +1 -0
- package/dist/__tests__/a2a/agent-a2a-config.spec.d.ts +2 -0
- package/dist/__tests__/a2a/agent-a2a-config.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/agent-a2a-config.spec.js +262 -0
- package/dist/__tests__/a2a/agent-a2a-config.spec.js.map +1 -0
- package/dist/__tests__/a2a/producer/auth-filter.spec.d.ts +2 -0
- package/dist/__tests__/a2a/producer/auth-filter.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/producer/auth-filter.spec.js +127 -0
- package/dist/__tests__/a2a/producer/auth-filter.spec.js.map +1 -0
- package/dist/__tests__/a2a/producer/card-builder.spec.d.ts +2 -0
- package/dist/__tests__/a2a/producer/card-builder.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/producer/card-builder.spec.js +113 -0
- package/dist/__tests__/a2a/producer/card-builder.spec.js.map +1 -0
- package/dist/__tests__/a2a/producer/dispatcher.spec.d.ts +2 -0
- package/dist/__tests__/a2a/producer/dispatcher.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/producer/dispatcher.spec.js +850 -0
- package/dist/__tests__/a2a/producer/dispatcher.spec.js.map +1 -0
- package/dist/__tests__/a2a/producer/mount-surface-push.spec.d.ts +2 -0
- package/dist/__tests__/a2a/producer/mount-surface-push.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/producer/mount-surface-push.spec.js +164 -0
- package/dist/__tests__/a2a/producer/mount-surface-push.spec.js.map +1 -0
- package/dist/__tests__/a2a/producer/mount.spec.d.ts +2 -0
- package/dist/__tests__/a2a/producer/mount.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/producer/mount.spec.js +433 -0
- package/dist/__tests__/a2a/producer/mount.spec.js.map +1 -0
- package/dist/__tests__/a2a/producer/public-url-cache.spec.d.ts +2 -0
- package/dist/__tests__/a2a/producer/public-url-cache.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/producer/public-url-cache.spec.js +116 -0
- package/dist/__tests__/a2a/producer/public-url-cache.spec.js.map +1 -0
- package/dist/__tests__/a2a/producer/sse-emitter.spec.d.ts +2 -0
- package/dist/__tests__/a2a/producer/sse-emitter.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/producer/sse-emitter.spec.js +754 -0
- package/dist/__tests__/a2a/producer/sse-emitter.spec.js.map +1 -0
- package/dist/__tests__/a2a/producer/state-translator.spec.d.ts +2 -0
- package/dist/__tests__/a2a/producer/state-translator.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/producer/state-translator.spec.js +124 -0
- package/dist/__tests__/a2a/producer/state-translator.spec.js.map +1 -0
- package/dist/__tests__/a2a/producer/task-store.spec.d.ts +2 -0
- package/dist/__tests__/a2a/producer/task-store.spec.d.ts.map +1 -0
- package/dist/__tests__/a2a/producer/task-store.spec.js +180 -0
- package/dist/__tests__/a2a/producer/task-store.spec.js.map +1 -0
- package/dist/__tests__/agent-add-tool.spec.d.ts +2 -0
- package/dist/__tests__/agent-add-tool.spec.d.ts.map +1 -0
- package/dist/__tests__/agent-add-tool.spec.js +483 -0
- package/dist/__tests__/agent-add-tool.spec.js.map +1 -0
- package/dist/__tests__/api-runtime-race.spec.d.ts +2 -0
- package/dist/__tests__/api-runtime-race.spec.d.ts.map +1 -0
- package/dist/__tests__/api-runtime-race.spec.js +193 -0
- package/dist/__tests__/api-runtime-race.spec.js.map +1 -0
- package/dist/__tests__/claim-dispatcher.spec.d.ts +2 -0
- package/dist/__tests__/claim-dispatcher.spec.d.ts.map +1 -0
- package/dist/__tests__/claim-dispatcher.spec.js +408 -0
- package/dist/__tests__/claim-dispatcher.spec.js.map +1 -0
- package/dist/__tests__/inbound-job-dispatch.spec.d.ts +2 -0
- package/dist/__tests__/inbound-job-dispatch.spec.d.ts.map +1 -0
- package/dist/__tests__/inbound-job-dispatch.spec.js +185 -0
- package/dist/__tests__/inbound-job-dispatch.spec.js.map +1 -0
- package/dist/__tests__/job-controller-progress.spec.d.ts +2 -0
- package/dist/__tests__/job-controller-progress.spec.d.ts.map +1 -0
- package/dist/__tests__/job-controller-progress.spec.js +85 -0
- package/dist/__tests__/job-controller-progress.spec.js.map +1 -0
- package/dist/__tests__/jobs-cancel-route.spec.d.ts +2 -0
- package/dist/__tests__/jobs-cancel-route.spec.d.ts.map +1 -0
- package/dist/__tests__/jobs-cancel-route.spec.js +88 -0
- package/dist/__tests__/jobs-cancel-route.spec.js.map +1 -0
- package/dist/__tests__/llm-agent-stream.test.d.ts +14 -0
- package/dist/__tests__/llm-agent-stream.test.d.ts.map +1 -0
- package/dist/__tests__/llm-agent-stream.test.js +341 -0
- package/dist/__tests__/llm-agent-stream.test.js.map +1 -0
- package/dist/__tests__/mesh-job-submitter.spec.d.ts +2 -0
- package/dist/__tests__/mesh-job-submitter.spec.d.ts.map +1 -0
- package/dist/__tests__/mesh-job-submitter.spec.js +110 -0
- package/dist/__tests__/mesh-job-submitter.spec.js.map +1 -0
- package/dist/__tests__/proxy-stream.test.d.ts +9 -0
- package/dist/__tests__/proxy-stream.test.d.ts.map +1 -0
- package/dist/__tests__/proxy-stream.test.js +347 -0
- package/dist/__tests__/proxy-stream.test.js.map +1 -0
- package/dist/__tests__/resolver-meshjob.spec.d.ts +26 -0
- package/dist/__tests__/resolver-meshjob.spec.d.ts.map +1 -0
- package/dist/__tests__/resolver-meshjob.spec.js +201 -0
- package/dist/__tests__/resolver-meshjob.spec.js.map +1 -0
- package/dist/__tests__/schema-verdict-policy.test.d.ts +6 -0
- package/dist/__tests__/schema-verdict-policy.test.d.ts.map +1 -0
- package/dist/__tests__/schema-verdict-policy.test.js +126 -0
- package/dist/__tests__/schema-verdict-policy.test.js.map +1 -0
- package/dist/__tests__/sse-stream.test.d.ts +12 -0
- package/dist/__tests__/sse-stream.test.d.ts.map +1 -0
- package/dist/__tests__/sse-stream.test.js +170 -0
- package/dist/__tests__/sse-stream.test.js.map +1 -0
- package/dist/a2a/a2a-bearer.d.ts +27 -0
- package/dist/a2a/a2a-bearer.d.ts.map +1 -0
- package/dist/a2a/a2a-bearer.js +63 -0
- package/dist/a2a/a2a-bearer.js.map +1 -0
- package/dist/a2a/a2a-client.d.ts +114 -0
- package/dist/a2a/a2a-client.d.ts.map +1 -0
- package/dist/a2a/a2a-client.js +405 -0
- package/dist/a2a/a2a-client.js.map +1 -0
- package/dist/a2a/a2a-event.d.ts +25 -0
- package/dist/a2a/a2a-event.d.ts.map +1 -0
- package/dist/a2a/a2a-event.js +9 -0
- package/dist/a2a/a2a-event.js.map +1 -0
- package/dist/a2a/a2a-job.d.ts +58 -0
- package/dist/a2a/a2a-job.d.ts.map +1 -0
- package/dist/a2a/a2a-job.js +264 -0
- package/dist/a2a/a2a-job.js.map +1 -0
- package/dist/a2a/a2a-stream.d.ts +39 -0
- package/dist/a2a/a2a-stream.d.ts.map +1 -0
- package/dist/a2a/a2a-stream.js +290 -0
- package/dist/a2a/a2a-stream.js.map +1 -0
- package/dist/a2a/errors.d.ts +29 -0
- package/dist/a2a/errors.d.ts.map +1 -0
- package/dist/a2a/errors.js +48 -0
- package/dist/a2a/errors.js.map +1 -0
- package/dist/a2a/index.d.ts +12 -0
- package/dist/a2a/index.d.ts.map +1 -0
- package/dist/a2a/index.js +11 -0
- package/dist/a2a/index.js.map +1 -0
- package/dist/a2a/producer/auth-filter.d.ts +34 -0
- package/dist/a2a/producer/auth-filter.d.ts.map +1 -0
- package/dist/a2a/producer/auth-filter.js +39 -0
- package/dist/a2a/producer/auth-filter.js.map +1 -0
- package/dist/a2a/producer/card-builder.d.ts +59 -0
- package/dist/a2a/producer/card-builder.d.ts.map +1 -0
- package/dist/a2a/producer/card-builder.js +59 -0
- package/dist/a2a/producer/card-builder.js.map +1 -0
- package/dist/a2a/producer/dispatcher.d.ts +276 -0
- package/dist/a2a/producer/dispatcher.d.ts.map +1 -0
- package/dist/a2a/producer/dispatcher.js +896 -0
- package/dist/a2a/producer/dispatcher.js.map +1 -0
- package/dist/a2a/producer/index.d.ts +26 -0
- package/dist/a2a/producer/index.d.ts.map +1 -0
- package/dist/a2a/producer/index.js +23 -0
- package/dist/a2a/producer/index.js.map +1 -0
- package/dist/a2a/producer/mount.d.ts +75 -0
- package/dist/a2a/producer/mount.d.ts.map +1 -0
- package/dist/a2a/producer/mount.js +422 -0
- package/dist/a2a/producer/mount.js.map +1 -0
- package/dist/a2a/producer/public-url-cache.d.ts +73 -0
- package/dist/a2a/producer/public-url-cache.d.ts.map +1 -0
- package/dist/a2a/producer/public-url-cache.js +0 -0
- package/dist/a2a/producer/public-url-cache.js.map +1 -0
- package/dist/a2a/producer/registry.d.ts +138 -0
- package/dist/a2a/producer/registry.d.ts.map +1 -0
- package/dist/a2a/producer/registry.js +117 -0
- package/dist/a2a/producer/registry.js.map +1 -0
- package/dist/a2a/producer/sse-emitter.d.ts +85 -0
- package/dist/a2a/producer/sse-emitter.d.ts.map +1 -0
- package/dist/a2a/producer/sse-emitter.js +405 -0
- package/dist/a2a/producer/sse-emitter.js.map +1 -0
- package/dist/a2a/producer/state-translator.d.ts +63 -0
- package/dist/a2a/producer/state-translator.d.ts.map +1 -0
- package/dist/a2a/producer/state-translator.js +108 -0
- package/dist/a2a/producer/state-translator.js.map +1 -0
- package/dist/a2a/producer/task-store.d.ts +128 -0
- package/dist/a2a/producer/task-store.d.ts.map +1 -0
- package/dist/a2a/producer/task-store.js +128 -0
- package/dist/a2a/producer/task-store.js.map +1 -0
- package/dist/agent.d.ts +72 -0
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +618 -13
- package/dist/agent.js.map +1 -1
- package/dist/api-runtime.d.ts +25 -0
- package/dist/api-runtime.d.ts.map +1 -1
- package/dist/api-runtime.js +75 -2
- package/dist/api-runtime.js.map +1 -1
- package/dist/claim-dispatcher.d.ts +126 -0
- package/dist/claim-dispatcher.d.ts.map +1 -0
- package/dist/claim-dispatcher.js +478 -0
- package/dist/claim-dispatcher.js.map +1 -0
- package/dist/express.d.ts.map +1 -1
- package/dist/express.js +33 -6
- package/dist/express.js.map +1 -1
- package/dist/inbound-job-dispatch.d.ts +105 -0
- package/dist/inbound-job-dispatch.d.ts.map +1 -0
- package/dist/inbound-job-dispatch.js +335 -0
- package/dist/inbound-job-dispatch.js.map +1 -0
- package/dist/index.d.ts +37 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -3
- package/dist/index.js.map +1 -1
- package/dist/job-context.d.ts +107 -0
- package/dist/job-context.d.ts.map +1 -0
- package/dist/job-context.js +95 -0
- package/dist/job-context.js.map +1 -0
- package/dist/jobs-cancel-route.d.ts +36 -0
- package/dist/jobs-cancel-route.d.ts.map +1 -0
- package/dist/jobs-cancel-route.js +60 -0
- package/dist/jobs-cancel-route.js.map +1 -0
- package/dist/jobs-helper-tools.d.ts +48 -0
- package/dist/jobs-helper-tools.d.ts.map +1 -0
- package/dist/jobs-helper-tools.js +133 -0
- package/dist/jobs-helper-tools.js.map +1 -0
- package/dist/llm-agent.d.ts +62 -53
- package/dist/llm-agent.d.ts.map +1 -1
- package/dist/llm-agent.js +211 -292
- package/dist/llm-agent.js.map +1 -1
- package/dist/llm-provider.d.ts +4 -4
- package/dist/llm.d.ts +4 -1
- package/dist/llm.d.ts.map +1 -1
- package/dist/llm.js +7 -17
- package/dist/llm.js.map +1 -1
- package/dist/mesh-job-submitter.d.ts +83 -0
- package/dist/mesh-job-submitter.d.ts.map +1 -0
- package/dist/mesh-job-submitter.js +143 -0
- package/dist/mesh-job-submitter.js.map +1 -0
- package/dist/proxy.d.ts +30 -0
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +351 -1
- package/dist/proxy.js.map +1 -1
- package/dist/resolver-meshjob.d.ts +170 -0
- package/dist/resolver-meshjob.d.ts.map +1 -0
- package/dist/resolver-meshjob.js +159 -0
- package/dist/resolver-meshjob.js.map +1 -0
- package/dist/route.d.ts +4 -0
- package/dist/route.d.ts.map +1 -1
- package/dist/route.js.map +1 -1
- package/dist/schema-normalize.d.ts +62 -0
- package/dist/schema-normalize.d.ts.map +1 -0
- package/dist/schema-normalize.js +128 -0
- package/dist/schema-normalize.js.map +1 -0
- package/dist/sse-stream.d.ts +44 -0
- package/dist/sse-stream.d.ts.map +1 -0
- package/dist/sse-stream.js +173 -0
- package/dist/sse-stream.js.map +1 -0
- package/dist/types.d.ts +351 -9
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error hierarchy for the A2A consumer surface (issue #917).
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `_a2a_consumer.A2AJobFailed` / `A2AJobCanceled` (Python) and
|
|
5
|
+
* `A2AException` / `A2AJobFailedException` / `A2AJobCanceledException`
|
|
6
|
+
* (Java). Each subclass sets `name` explicitly so `instanceof` works
|
|
7
|
+
* across module boundaries (ES module dual-loading, multiple SDK
|
|
8
|
+
* copies under monorepo workspaces).
|
|
9
|
+
*/
|
|
10
|
+
export class A2AError extends Error {
|
|
11
|
+
cause;
|
|
12
|
+
constructor(message, cause) {
|
|
13
|
+
super(message);
|
|
14
|
+
this.cause = cause;
|
|
15
|
+
this.name = "A2AError";
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export class A2ATimeoutError extends A2AError {
|
|
19
|
+
constructor(message, cause) {
|
|
20
|
+
super(message, cause);
|
|
21
|
+
this.name = "A2ATimeoutError";
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export class A2AAuthError extends A2AError {
|
|
25
|
+
constructor(message, cause) {
|
|
26
|
+
super(message, cause);
|
|
27
|
+
this.name = "A2AAuthError";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export class A2AJobError extends A2AError {
|
|
31
|
+
constructor(message, cause) {
|
|
32
|
+
super(message, cause);
|
|
33
|
+
this.name = "A2AJobError";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export class A2AJobFailedError extends A2AJobError {
|
|
37
|
+
constructor(message, cause) {
|
|
38
|
+
super(message, cause);
|
|
39
|
+
this.name = "A2AJobFailedError";
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export class A2AJobCanceledError extends A2AJobError {
|
|
43
|
+
constructor(message, cause) {
|
|
44
|
+
super(message, cause);
|
|
45
|
+
this.name = "A2AJobCanceledError";
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/a2a/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAK;IACY;IAA7C,YAAY,OAAe,EAAkB,KAAe;QAC1D,KAAK,CAAC,OAAO,CAAC,CAAC;QAD4B,UAAK,GAAL,KAAK,CAAU;QAE1D,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF;AAED,MAAM,OAAO,eAAgB,SAAQ,QAAQ;IAC3C,YAAY,OAAe,EAAE,KAAe;QAC1C,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,QAAQ;IACxC,YAAY,OAAe,EAAE,KAAe;QAC1C,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAED,MAAM,OAAO,WAAY,SAAQ,QAAQ;IACvC,YAAY,OAAe,EAAE,KAAe;QAC1C,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AAED,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAChD,YAAY,OAAe,EAAE,KAAe;QAC1C,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED,MAAM,OAAO,mBAAoB,SAAQ,WAAW;IAClD,YAAY,OAAe,EAAE,KAAe;QAC1C,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A2A consumer surface barrel — re-exports the public types and
|
|
3
|
+
* runtime classes the SDK consumer reaches for via
|
|
4
|
+
* `import { A2AClient, A2ABearer } from "@mcpmesh/sdk"` (issue #917).
|
|
5
|
+
*/
|
|
6
|
+
export { A2AClient, type A2AClientConfig, type A2AMessage, type A2AResponse, type A2ATaskEnvelope, DEFAULT_TIMEOUT_MS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_POLL_INTERVAL_MAX_MS, POLL_BACKOFF_FACTOR, isTerminalState, isCanceledState, } from "./a2a-client.js";
|
|
7
|
+
export { A2AJob } from "./a2a-job.js";
|
|
8
|
+
export { A2AStream } from "./a2a-stream.js";
|
|
9
|
+
export type { A2AEvent, A2AEventKind } from "./a2a-event.js";
|
|
10
|
+
export { A2ABearer, type A2ABearerConfig } from "./a2a-bearer.js";
|
|
11
|
+
export { A2AError, A2ATimeoutError, A2AAuthError, A2AJobError, A2AJobFailedError, A2AJobCanceledError, } from "./errors.js";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/a2a/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,EAC5B,mBAAmB,EACnB,eAAe,EACf,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EACL,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A2A consumer surface barrel — re-exports the public types and
|
|
3
|
+
* runtime classes the SDK consumer reaches for via
|
|
4
|
+
* `import { A2AClient, A2ABearer } from "@mcpmesh/sdk"` (issue #917).
|
|
5
|
+
*/
|
|
6
|
+
export { A2AClient, DEFAULT_TIMEOUT_MS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_POLL_INTERVAL_MAX_MS, POLL_BACKOFF_FACTOR, isTerminalState, isCanceledState, } from "./a2a-client.js";
|
|
7
|
+
export { A2AJob } from "./a2a-job.js";
|
|
8
|
+
export { A2AStream } from "./a2a-stream.js";
|
|
9
|
+
export { A2ABearer } from "./a2a-bearer.js";
|
|
10
|
+
export { A2AError, A2ATimeoutError, A2AAuthError, A2AJobError, A2AJobFailedError, A2AJobCanceledError, } from "./errors.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/a2a/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,SAAS,EAKT,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,EAC5B,mBAAmB,EACnB,eAAe,EACf,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAwB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EACL,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bearer-token authentication gate for `mesh.a2a.mount(...)` surfaces (spec §6).
|
|
3
|
+
*
|
|
4
|
+
* Mounted as Express middleware on the `POST {path}` route only — the agent
|
|
5
|
+
* card endpoint (`GET {path}/.well-known/agent.json`) is always reachable
|
|
6
|
+
* without auth (spec §6.2 + conformance checklist) so clients can discover
|
|
7
|
+
* the authentication scheme before authenticating.
|
|
8
|
+
*
|
|
9
|
+
* Phase 1 semantics:
|
|
10
|
+
* 1. The producer MUST require an `Authorization: Bearer <token>` header.
|
|
11
|
+
* 2. The producer MUST reject headers that:
|
|
12
|
+
* - are missing entirely;
|
|
13
|
+
* - have a non-`Bearer` scheme (case-insensitive prefix check);
|
|
14
|
+
* - have an empty token after the `Bearer ` prefix (whitespace-only counts as empty).
|
|
15
|
+
* 3. The producer MUST NOT validate the token value. Value-level validation
|
|
16
|
+
* is Phase 2+ (spec §6.2 + Appendix B item 4).
|
|
17
|
+
*
|
|
18
|
+
* Error shape (spec §6.3): HTTP 401 with a JSON-RPC envelope carrying
|
|
19
|
+
* `error.code = -32001` and `id = null` (the request body is never parsed
|
|
20
|
+
* at this stage). The `-32001` code sits in the implementation-defined
|
|
21
|
+
* `-32000` … `-32099` server-error range and matches the Python / Java
|
|
22
|
+
* producers exactly for cross-runtime parity.
|
|
23
|
+
*/
|
|
24
|
+
import type { RequestHandler } from "express";
|
|
25
|
+
/** Implementation-defined server-error code for authentication failures. */
|
|
26
|
+
export declare const JSONRPC_AUTH_ERROR = -32001;
|
|
27
|
+
/**
|
|
28
|
+
* Build the Express middleware that enforces the bearer-token presence
|
|
29
|
+
* check. The middleware is only mounted when the surface declared
|
|
30
|
+
* `auth: "bearer"` — mounts without `auth` get no middleware so the dispatch
|
|
31
|
+
* route is reachable without authentication.
|
|
32
|
+
*/
|
|
33
|
+
export declare function buildBearerAuthMiddleware(): RequestHandler;
|
|
34
|
+
//# sourceMappingURL=auth-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-filter.d.ts","sourceRoot":"","sources":["../../../src/a2a/producer/auth-filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAyB,cAAc,EAAY,MAAM,SAAS,CAAC;AAE/E,4EAA4E;AAC5E,eAAO,MAAM,kBAAkB,SAAS,CAAC;AAIzC;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,cAAc,CAoC1D"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Implementation-defined server-error code for authentication failures. */
|
|
2
|
+
export const JSONRPC_AUTH_ERROR = -32001;
|
|
3
|
+
const BEARER_PREFIX = "Bearer ";
|
|
4
|
+
/**
|
|
5
|
+
* Build the Express middleware that enforces the bearer-token presence
|
|
6
|
+
* check. The middleware is only mounted when the surface declared
|
|
7
|
+
* `auth: "bearer"` — mounts without `auth` get no middleware so the dispatch
|
|
8
|
+
* route is reachable without authentication.
|
|
9
|
+
*/
|
|
10
|
+
export function buildBearerAuthMiddleware() {
|
|
11
|
+
return function bearerAuthMiddleware(req, res, next) {
|
|
12
|
+
const authz = req.headers["authorization"];
|
|
13
|
+
if (typeof authz !== "string" || authz.length === 0) {
|
|
14
|
+
writeAuthError(res, "Authentication required: missing Authorization: Bearer <token> header");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
// Case-insensitive prefix check on "Bearer ".
|
|
18
|
+
if (authz.length < BEARER_PREFIX.length ||
|
|
19
|
+
authz.substring(0, BEARER_PREFIX.length).toLowerCase() !== BEARER_PREFIX.toLowerCase()) {
|
|
20
|
+
writeAuthError(res, "Authentication required: missing Authorization: Bearer <token> header");
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const token = authz.substring(BEARER_PREFIX.length).trim();
|
|
24
|
+
if (token.length === 0) {
|
|
25
|
+
writeAuthError(res, "Authentication required: empty bearer token in Authorization header");
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
// Phase 1: presence check only — DO NOT validate token value.
|
|
29
|
+
next();
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function writeAuthError(res, message) {
|
|
33
|
+
res.status(401).type("application/json").send(JSON.stringify({
|
|
34
|
+
jsonrpc: "2.0",
|
|
35
|
+
error: { code: JSONRPC_AUTH_ERROR, message },
|
|
36
|
+
id: null,
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=auth-filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-filter.js","sourceRoot":"","sources":["../../../src/a2a/producer/auth-filter.ts"],"names":[],"mappings":"AAyBA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAK,CAAC;AAEzC,MAAM,aAAa,GAAG,SAAS,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,SAAS,oBAAoB,CAClC,GAAY,EACZ,GAAa,EACb,IAAkB;QAElB,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpD,cAAc,CACZ,GAAG,EACH,uEAAuE,CACxE,CAAC;YACF,OAAO;QACT,CAAC;QACD,8CAA8C;QAC9C,IACE,KAAK,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM;YACnC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,aAAa,CAAC,WAAW,EAAE,EACtF,CAAC;YACD,cAAc,CACZ,GAAG,EACH,uEAAuE,CACxE,CAAC;YACF,OAAO;QACT,CAAC;QACD,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;QAC3D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,cAAc,CACZ,GAAG,EACH,qEAAqE,CACtE,CAAC;YACF,OAAO;QACT,CAAC;QACD,8DAA8D;QAC9D,IAAI,EAAE,CAAC;IACT,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,GAAa,EAAE,OAAe;IACpD,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAC3C,IAAI,CAAC,SAAS,CAAC;QACb,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE;QAC5C,EAAE,EAAE,IAAI;KACT,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds A2A v1.0 AgentCard JSON for `GET {path}/.well-known/agent.json`
|
|
3
|
+
* (spec §3).
|
|
4
|
+
*
|
|
5
|
+
* One card per surface — multi-skill grouping under a single card is v2
|
|
6
|
+
* scope (spec Appendix B item 1). Mirrors the Python builder
|
|
7
|
+
* `_mcp_mesh.engine.a2a_card.build_agent_card` and Java's
|
|
8
|
+
* `MeshA2ACardBuilder.build`.
|
|
9
|
+
*
|
|
10
|
+
* Auto-populates from the surface's mount config (skill id, name,
|
|
11
|
+
* description, tags) and the resolved `auth` scheme. Cross-agent dependency
|
|
12
|
+
* input schemas are not surfaced today (mirrors Python — Chunk 1B may add
|
|
13
|
+
* `skills[0].metadata.input_schema` when a local `agent.addTool`
|
|
14
|
+
* registration is co-resident).
|
|
15
|
+
*/
|
|
16
|
+
import type { A2ASurfaceMetadata } from "./registry.js";
|
|
17
|
+
/**
|
|
18
|
+
* A2A v1.0 default input modes. Materialised at card-render time (not at
|
|
19
|
+
* heartbeat-emit time per spec §2.1).
|
|
20
|
+
*/
|
|
21
|
+
export declare const DEFAULT_INPUT_MODES: readonly string[];
|
|
22
|
+
/**
|
|
23
|
+
* A2A v1.0 default output modes. Materialised at card-render time.
|
|
24
|
+
*/
|
|
25
|
+
export declare const DEFAULT_OUTPUT_MODES: readonly string[];
|
|
26
|
+
/**
|
|
27
|
+
* Per-render context the SDK supplies to {@link buildAgentCard}. The agent
|
|
28
|
+
* name / version typically come from the API runtime's resolved config; the
|
|
29
|
+
* `publicUrl` is the registry-stamped FQDN cached per `(path, skillId)`,
|
|
30
|
+
* with a local-fallback (`http://{host}:{port}{path}`) when no stamped URL
|
|
31
|
+
* is available yet (spec §2.4).
|
|
32
|
+
*/
|
|
33
|
+
export interface CardRenderContext {
|
|
34
|
+
/** Agent display name (mirrors `mesh.agent(name=...)` value). */
|
|
35
|
+
readonly agentName: string;
|
|
36
|
+
/** Agent version (semver). Defaults to `"1.0.0"` on the card. */
|
|
37
|
+
readonly agentVersion?: string;
|
|
38
|
+
/** Free-form agent description; falls back to `agentName` on the card. */
|
|
39
|
+
readonly agentDescription?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The producer's public `POST {path}` URL. MUST be omitted (NOT emitted
|
|
42
|
+
* as `""`) when no URL is available — clients should fail loudly rather
|
|
43
|
+
* than chase a blank URL. Resolution order at mount time:
|
|
44
|
+
* 1. Registry-stamped FQDN from {@link A2APublicUrlCache} (populated
|
|
45
|
+
* from `surface_updated` heartbeat responses).
|
|
46
|
+
* 2. Local-fallback `http://{host}:{port}{path}` per spec §2.4.
|
|
47
|
+
* 3. Omitted (`undefined`) when neither host nor cached URL is known.
|
|
48
|
+
*/
|
|
49
|
+
readonly publicUrl?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Build the agent card JSON for a single surface.
|
|
53
|
+
*
|
|
54
|
+
* The returned plain object is JSON-serializable with deterministic key
|
|
55
|
+
* order (modern JS Maps + plain object literals preserve insertion order
|
|
56
|
+
* per ECMA-262).
|
|
57
|
+
*/
|
|
58
|
+
export declare function buildAgentCard(surface: A2ASurfaceMetadata, ctx: CardRenderContext): Record<string, unknown>;
|
|
59
|
+
//# sourceMappingURL=card-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-builder.d.ts","sourceRoot":"","sources":["../../../src/a2a/producer/card-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAyB,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAAyB,CAAC;AAE5E;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,iEAAiE;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,0EAA0E;IAC1E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;;;;;OAQG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,kBAAkB,EAC3B,GAAG,EAAE,iBAAiB,GACrB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmDzB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A2A v1.0 default input modes. Materialised at card-render time (not at
|
|
3
|
+
* heartbeat-emit time per spec §2.1).
|
|
4
|
+
*/
|
|
5
|
+
export const DEFAULT_INPUT_MODES = ["application/json"];
|
|
6
|
+
/**
|
|
7
|
+
* A2A v1.0 default output modes. Materialised at card-render time.
|
|
8
|
+
*/
|
|
9
|
+
export const DEFAULT_OUTPUT_MODES = ["application/json"];
|
|
10
|
+
/**
|
|
11
|
+
* Build the agent card JSON for a single surface.
|
|
12
|
+
*
|
|
13
|
+
* The returned plain object is JSON-serializable with deterministic key
|
|
14
|
+
* order (modern JS Maps + plain object literals preserve insertion order
|
|
15
|
+
* per ECMA-262).
|
|
16
|
+
*/
|
|
17
|
+
export function buildAgentCard(surface, ctx) {
|
|
18
|
+
const name = ctx.agentName && ctx.agentName.length > 0 ? ctx.agentName : "agent";
|
|
19
|
+
const version = ctx.agentVersion && ctx.agentVersion.length > 0 ? ctx.agentVersion : "1.0.0";
|
|
20
|
+
const description = ctx.agentDescription && ctx.agentDescription.length > 0
|
|
21
|
+
? ctx.agentDescription
|
|
22
|
+
: name;
|
|
23
|
+
const skill = {
|
|
24
|
+
id: surface.skillId,
|
|
25
|
+
name: surface.skillName,
|
|
26
|
+
description: surface.description.length > 0 ? surface.description : surface.skillName,
|
|
27
|
+
tags: [...surface.tags],
|
|
28
|
+
inputModes: [...DEFAULT_INPUT_MODES],
|
|
29
|
+
outputModes: [...DEFAULT_OUTPUT_MODES],
|
|
30
|
+
};
|
|
31
|
+
// Spec §3.2: capabilities.streaming MUST be true. Even in Chunk 1A (sync
|
|
32
|
+
// only) we advertise streaming=true so the wire shape matches Python /
|
|
33
|
+
// Java — Chunk 1B wires the real SSE handlers behind it.
|
|
34
|
+
const capabilities = {
|
|
35
|
+
streaming: true,
|
|
36
|
+
pushNotifications: false,
|
|
37
|
+
stateTransitionHistory: false,
|
|
38
|
+
};
|
|
39
|
+
const card = {
|
|
40
|
+
name,
|
|
41
|
+
description,
|
|
42
|
+
version,
|
|
43
|
+
capabilities,
|
|
44
|
+
defaultInputModes: [...DEFAULT_INPUT_MODES],
|
|
45
|
+
defaultOutputModes: [...DEFAULT_OUTPUT_MODES],
|
|
46
|
+
skills: [skill],
|
|
47
|
+
};
|
|
48
|
+
if (ctx.publicUrl && ctx.publicUrl.length > 0) {
|
|
49
|
+
card.url = ctx.publicUrl;
|
|
50
|
+
}
|
|
51
|
+
// Spec §3.2 / §6.1: authentication.schemes is a list. For bearer-token
|
|
52
|
+
// surfaces emit ["bearer"]; otherwise an empty list (NOT "none" — A2A
|
|
53
|
+
// v1.0 has no "none" scheme).
|
|
54
|
+
card.authentication = {
|
|
55
|
+
schemes: surface.auth === "bearer" ? ["bearer"] : [],
|
|
56
|
+
};
|
|
57
|
+
return card;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=card-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-builder.js","sourceRoot":"","sources":["../../../src/a2a/producer/card-builder.ts"],"names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AsB,EAAE,KAAK;KAC9B,CAAC;IAEF,MAAM,IAAI,GAA4B;QACpC,IAAI;QACJ,WAAW;QACX,OAAO;QACP,YAAY;QACZ,iBAAiB,EAAE,CAAC,GAAG,mBAAmB,CAAC;QAC3C,kBAAkB,EAAE,CAAC,GAAG,oBAAoB,CAAC;QAC7C,MAAM,EAAE,CAAC,KAAK,CAAC;KAChB,CAAC;IAEF,IAAI,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9C,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC;IAC3B,CAAC;IAED,uEAAuE;IACvE,sEAAsE;IACtE,8BAA8B;IAC9B,IAAI,CAAC,cAAc,GAAG;QACpB,OAAO,EAAE,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;KACrD,CAAC;IAEF,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON-RPC 2.0 dispatcher for `mesh.a2a.mount(...)` producer surfaces
|
|
3
|
+
* (spec §4).
|
|
4
|
+
*
|
|
5
|
+
* Chunk 1B coverage:
|
|
6
|
+
* - `tasks/send` — sync handler return → `state=completed`; `JobProxy`
|
|
7
|
+
* return → `state=working` envelope with the task parked in
|
|
8
|
+
* {@link A2ATaskStore} (spec §4.3 long-running branch); handler
|
|
9
|
+
* exception → `state=failed` (spec §4.3).
|
|
10
|
+
* - `tasks/get` — looks up the cached terminal envelope OR pulls live
|
|
11
|
+
* status from the parked `JobProxy` and translates the mesh state to
|
|
12
|
+
* A2A via {@link state-translator} (spec §4.4 / §7.2).
|
|
13
|
+
* - `tasks/cancel` — calls `proxy.cancel()` on the parked task, then
|
|
14
|
+
* re-reads status; idempotent ack for already-terminal tasks (spec
|
|
15
|
+
* §4.5). Cancel double-failure synthesizes `state=canceled` rather
|
|
16
|
+
* than propagating exceptions.
|
|
17
|
+
* - `tasks/sendSubscribe` / `tasks/resubscribe` — exposed indirectly
|
|
18
|
+
* through {@link buildSendSubscribeStream} / {@link buildResubscribeStream}
|
|
19
|
+
* which return a framework-agnostic {@link SseStreamPlan}. The Express
|
|
20
|
+
* SSE adapter ({@link sse-emitter}) materialises each plan as a
|
|
21
|
+
* `text/event-stream` response. The dispatcher itself never touches
|
|
22
|
+
* Express response streaming so it stays unit-testable without an
|
|
23
|
+
* HTTP server (spec §4.6 / §4.7 / §5).
|
|
24
|
+
*
|
|
25
|
+
* Error handling per spec §4.1:
|
|
26
|
+
* - Empty / non-JSON body → HTTP 400 + `-32700 Parse error`
|
|
27
|
+
* - Missing `method` field → `-32600 Invalid Request` (NOT `-32601`; the
|
|
28
|
+
* misleading `"Method not implemented: 'null'"` bug from issue #934
|
|
29
|
+
* must not recur)
|
|
30
|
+
* - Unknown method → `-32601 Method not implemented: '<method>'`
|
|
31
|
+
*
|
|
32
|
+
* Handler exceptions are surfaced per spec §4.3: they become `state=failed`
|
|
33
|
+
* Task envelopes, NOT JSON-RPC errors. JSON-RPC errors are reserved for
|
|
34
|
+
* protocol-level issues.
|
|
35
|
+
*/
|
|
36
|
+
import type { RequestHandler } from "express";
|
|
37
|
+
import { JobProxy } from "@mcpmesh/core";
|
|
38
|
+
import type { McpMeshTool } from "../../types.js";
|
|
39
|
+
import { RouteRegistry } from "../../route.js";
|
|
40
|
+
import { MeshJobSubmitter } from "../../mesh-job-submitter.js";
|
|
41
|
+
import type { A2ASurfaceMetadata } from "./registry.js";
|
|
42
|
+
import { A2ATaskStore, type TaskRecord } from "./task-store.js";
|
|
43
|
+
/** JSON-RPC: Parse error (request body is not valid JSON). Spec §4.1. */
|
|
44
|
+
export declare const JSONRPC_PARSE_ERROR = -32700;
|
|
45
|
+
/** JSON-RPC: Invalid Request (well-formed JSON but missing `method` field). Spec §4.1. */
|
|
46
|
+
export declare const JSONRPC_INVALID_REQUEST = -32600;
|
|
47
|
+
/** JSON-RPC: Method not found (unknown `tasks/*` verb). Spec §4.1. */
|
|
48
|
+
export declare const JSONRPC_METHOD_NOT_FOUND = -32601;
|
|
49
|
+
/** JSON-RPC: Invalid params (missing or unknown task id). Spec §4.4. */
|
|
50
|
+
export declare const JSONRPC_INVALID_PARAMS = -32602;
|
|
51
|
+
/**
|
|
52
|
+
* Dependencies object passed to A2A handlers — keyed by capability name,
|
|
53
|
+
* same shape as `mesh.route()`'s `deps` parameter. Values are `null` when
|
|
54
|
+
* the underlying dependency hasn't been resolved yet (registry has not
|
|
55
|
+
* reported a `dependency_available` event for it).
|
|
56
|
+
*/
|
|
57
|
+
export type A2ADependencies = Record<string, McpMeshTool | null>;
|
|
58
|
+
/**
|
|
59
|
+
* Handler signature for `mesh.a2a.mount(...)`. Receives:
|
|
60
|
+
*
|
|
61
|
+
* 1. Resolved dependencies (`deps`) — keyed by capability name, same shape
|
|
62
|
+
* as `mesh.route()`'s `deps` parameter. Destructure to access individual
|
|
63
|
+
* `McpMeshTool` proxies.
|
|
64
|
+
* 2. The raw A2A `tasks/send` `payload` (the `message` object the client
|
|
65
|
+
* sent).
|
|
66
|
+
* 3. A framework-managed {@link MeshJobSubmitter} (`jobSubmitter`) — issue
|
|
67
|
+
* #936. Bound to the producer's task capability so long-running handlers
|
|
68
|
+
* can `await jobSubmitter.submit(payload)` without hand-constructing the
|
|
69
|
+
* submitter from `getApiRuntime().getServiceId()` and the registry URL.
|
|
70
|
+
* The capability defaults to the first declared `dependencies[]` entry
|
|
71
|
+
* on the mount config; when no deps are declared, falls back to the
|
|
72
|
+
* `skillId` with `-` replaced by `_` (the canonical kebab-to-snake
|
|
73
|
+
* convention — so a `"generate-report"` skill submits to the
|
|
74
|
+
* `generate_report` task capability without further configuration).
|
|
75
|
+
*
|
|
76
|
+
* Return value: any JSON-serializable value or a `JobProxy`.
|
|
77
|
+
* - JSON-serializable value → framework wraps it into the A2A v1.0 `Task`
|
|
78
|
+
* envelope per spec §4.3 — `String` returns pass through verbatim;
|
|
79
|
+
* everything else is JSON-stringified.
|
|
80
|
+
* - `JobProxy` → framework parks the task (`state=working`) and pulls
|
|
81
|
+
* live status on subsequent `tasks/get` / `tasks/cancel` /
|
|
82
|
+
* `tasks/sendSubscribe` / `tasks/resubscribe` calls (spec §4.3
|
|
83
|
+
* long-running branch).
|
|
84
|
+
*
|
|
85
|
+
* Throw an exception to surface as `state=failed` (spec §4.3 "handler
|
|
86
|
+
* raised" branch).
|
|
87
|
+
*/
|
|
88
|
+
export type A2AHandler<D extends A2ADependencies = A2ADependencies> = (deps: D, payload: Record<string, unknown>, jobSubmitter: MeshJobSubmitter | null) => unknown | Promise<unknown>;
|
|
89
|
+
/**
|
|
90
|
+
* Construction inputs for {@link A2ADispatcher}. The dispatcher itself is
|
|
91
|
+
* surface-agnostic — the {@link buildDispatcherMiddleware} factory binds it
|
|
92
|
+
* to a specific surface so the per-route Express middleware can dispatch
|
|
93
|
+
* without consulting a path-keyed registry on every request.
|
|
94
|
+
*/
|
|
95
|
+
export interface DispatcherDeps {
|
|
96
|
+
/** The registered surface this dispatcher is bound to. */
|
|
97
|
+
readonly surface: A2ASurfaceMetadata;
|
|
98
|
+
/** The user-supplied handler. */
|
|
99
|
+
readonly handler: A2AHandler;
|
|
100
|
+
/** Shared task store. */
|
|
101
|
+
readonly taskStore: A2ATaskStore;
|
|
102
|
+
/** Shared `RouteRegistry` for dependency resolution (DDDI). */
|
|
103
|
+
readonly routeRegistry: RouteRegistry;
|
|
104
|
+
/**
|
|
105
|
+
* Lazy provider for the {@link MeshJobSubmitter} auto-injected on the
|
|
106
|
+
* third handler arg (issue #936). Called on every dispatch so the
|
|
107
|
+
* provider can return `null` until the api-runtime has finished
|
|
108
|
+
* initialising; the dispatcher caches the resolved value internally
|
|
109
|
+
* after the first non-null return.
|
|
110
|
+
*
|
|
111
|
+
* Optional for back-compat with existing callers; when omitted the
|
|
112
|
+
* handler receives `null` on the third arg.
|
|
113
|
+
*/
|
|
114
|
+
readonly jobSubmitterProvider?: () => MeshJobSubmitter | null;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Build an Express request handler that dispatches `POST {path}` requests
|
|
118
|
+
* for a single surface.
|
|
119
|
+
*
|
|
120
|
+
* Routes JSON-RPC envelopes that return a single response body
|
|
121
|
+
* (`tasks/send`, `tasks/get`, `tasks/cancel`). SSE verbs
|
|
122
|
+
* (`tasks/sendSubscribe`, `tasks/resubscribe`) are dispatched by a
|
|
123
|
+
* sibling middleware ({@link buildSseDispatcherMiddleware}) that the
|
|
124
|
+
* mount wires in front of this one — when the SSE middleware sees an
|
|
125
|
+
* SSE-eligible method it consumes the request; otherwise it calls
|
|
126
|
+
* `next()` and execution falls through here.
|
|
127
|
+
*/
|
|
128
|
+
export declare function buildDispatcherMiddleware(deps: DispatcherDeps): RequestHandler;
|
|
129
|
+
/**
|
|
130
|
+
* Build the SSE stream plan for a `tasks/sendSubscribe` request. The
|
|
131
|
+
* dispatcher invokes the user handler eagerly (before the stream opens)
|
|
132
|
+
* so handler exceptions become a single SSE failed frame, not an opaque
|
|
133
|
+
* HTTP error mid-stream (spec §4.6).
|
|
134
|
+
*/
|
|
135
|
+
export declare function buildSendSubscribeStream(reqId: unknown, params: Record<string, unknown>, deps: DispatcherDeps): Promise<SseStreamPlan>;
|
|
136
|
+
/**
|
|
137
|
+
* Build the SSE stream plan for a `tasks/resubscribe` request (spec §4.7).
|
|
138
|
+
* Looks up the parked task, emits an initial state=working event, then
|
|
139
|
+
* resumes polling from the registry's current view (no replay).
|
|
140
|
+
*/
|
|
141
|
+
export declare function buildResubscribeStream(reqId: unknown, params: Record<string, unknown>, taskStore: A2ATaskStore): SseStreamPlan;
|
|
142
|
+
/**
|
|
143
|
+
* Pull the latest status from a parked task's `JobProxy` and project it
|
|
144
|
+
* into an A2A v1.0 Task envelope. Handles the "transient unreachability"
|
|
145
|
+
* branch per spec §4.4 by returning `state=working` with the error text
|
|
146
|
+
* in `status.message` rather than throwing — matches Python's
|
|
147
|
+
* `a2a.py:718-735` behavior.
|
|
148
|
+
*
|
|
149
|
+
* Used by `tasks/get` (top-level dispatcher) and exposed via
|
|
150
|
+
* {@link projectLiveStatus} for the SSE emitter's terminal-frame
|
|
151
|
+
* synthesis.
|
|
152
|
+
*/
|
|
153
|
+
export declare function buildTaskFromLiveStatus(taskStore: A2ATaskStore, taskId: string, record: TaskRecord): Promise<Record<string, unknown>>;
|
|
154
|
+
/**
|
|
155
|
+
* Project the live status of a parked task into an A2A v1.0 Task
|
|
156
|
+
* envelope. Exposed for the SSE emitter so it can render terminal
|
|
157
|
+
* frames consistently with `tasks/get`.
|
|
158
|
+
*/
|
|
159
|
+
export declare function projectLiveStatus(taskStore: A2ATaskStore, taskId: string): Promise<Record<string, unknown> | null>;
|
|
160
|
+
/**
|
|
161
|
+
* Build a `state=completed` Task envelope (spec §4.3). The handler result
|
|
162
|
+
* is stringified per the spec — string returns pass through verbatim,
|
|
163
|
+
* everything else is JSON-stringified. `null` / `undefined` produce an
|
|
164
|
+
* empty-string artifact.
|
|
165
|
+
*
|
|
166
|
+
* Exported for testability + the symmetry with the SSE artifact frame
|
|
167
|
+
* builder.
|
|
168
|
+
*/
|
|
169
|
+
export declare function buildCompletedTask(taskId: string, sessionId: string, requestMessage: Record<string, unknown>, result: unknown): Record<string, unknown>;
|
|
170
|
+
/**
|
|
171
|
+
* Build a `state=failed` Task envelope (spec §4.3 "handler raised"
|
|
172
|
+
* branch). The error text is folded into `status.message.parts[0].text`.
|
|
173
|
+
*/
|
|
174
|
+
export declare function buildFailedTask(taskId: string, sessionId: string, requestMessage: Record<string, unknown>, errorText: string): Record<string, unknown>;
|
|
175
|
+
/**
|
|
176
|
+
* Build a `state=working` Task envelope (spec §4.3 long-running branch /
|
|
177
|
+
* spec §4.4 transient unreachability fallback).
|
|
178
|
+
*/
|
|
179
|
+
export declare function buildWorkingTask(taskId: string, sessionId: string, requestMessage?: Record<string, unknown>, progressMessage?: string | null, progress?: number | null): Record<string, unknown>;
|
|
180
|
+
/**
|
|
181
|
+
* Build a `state=canceled` Task envelope (spec §4.5 cancel fallback / spec
|
|
182
|
+
* §7.2). Used when:
|
|
183
|
+
* - `tasks/cancel` post-cancel status read didn't show terminal yet, OR
|
|
184
|
+
* - both `proxy.cancel()` AND `proxy.status()` threw, OR
|
|
185
|
+
* - the parked task lost its `JobProxy` reference.
|
|
186
|
+
*/
|
|
187
|
+
export declare function buildCanceledTask(taskId: string, sessionId: string, requestMessage: Record<string, unknown> | undefined, reason: string | undefined): Record<string, unknown>;
|
|
188
|
+
/**
|
|
189
|
+
* Build a Task envelope from a `JobProxy.status()` result dict (spec
|
|
190
|
+
* §4.4). Mirrors Python's `_build_task_from_status` and Java's
|
|
191
|
+
* `MeshA2ADispatcher.buildTaskFromStatus` — folds `error` /
|
|
192
|
+
* `progress_message` into A2A `status.message`, materialises an artifact
|
|
193
|
+
* for completed tasks when the final result is available, and lifts
|
|
194
|
+
* `progress` to `metadata.progress`.
|
|
195
|
+
*
|
|
196
|
+
* Per Appendix A, `progress` is emitted as a real JSON number (no
|
|
197
|
+
* stringification) and `parts[0].type` is always `"text"`.
|
|
198
|
+
*/
|
|
199
|
+
export declare function buildTaskFromStatus(taskId: string, sessionId: string, requestMessage: Record<string, unknown> | undefined, a2aState: string, meshStatus: Record<string, unknown>, finalResult: unknown, hasFinalResult: boolean): Record<string, unknown>;
|
|
200
|
+
/**
|
|
201
|
+
* Stringify a handler return value as the text body of the `result`
|
|
202
|
+
* artifact. `string` returns pass through verbatim; everything else is
|
|
203
|
+
* JSON-stringified. Non-serializable returns fall back to `String(value)`
|
|
204
|
+
* so the artifact is always well-formed (mirrors Python's `default=str`
|
|
205
|
+
* coercion in `a2a.py:403`).
|
|
206
|
+
*/
|
|
207
|
+
export declare function stringifyResult(value: unknown): string;
|
|
208
|
+
/**
|
|
209
|
+
* Build a JSON-RPC envelope carrying an A2A v1.0 `TaskStatusUpdateEvent`
|
|
210
|
+
* (spec §5.2).
|
|
211
|
+
*
|
|
212
|
+
* Per Appendix A:
|
|
213
|
+
* - `final` MUST be a real JSON boolean (no stringification).
|
|
214
|
+
* - `progress` (when non-null) MUST be a JSON number.
|
|
215
|
+
* - `parts[0].type` MUST be emitted as `"text"`.
|
|
216
|
+
*
|
|
217
|
+
* @param reqId JSON-RPC request id to echo
|
|
218
|
+
* @param taskId A2A task id
|
|
219
|
+
* @param a2aState one of the four enumerated A2A states
|
|
220
|
+
* @param messageText optional text for `status.message.parts[0].text`
|
|
221
|
+
* @param finalFlag `true` only on the terminal frame
|
|
222
|
+
* @param progress optional numeric progress; emitted as `metadata.progress`
|
|
223
|
+
*/
|
|
224
|
+
export declare function buildStatusUpdateFrame(reqId: unknown, taskId: string, a2aState: string, messageText: string | null | undefined, finalFlag: boolean, progress: number | null | undefined): Record<string, unknown>;
|
|
225
|
+
/**
|
|
226
|
+
* Build a JSON-RPC envelope carrying an A2A v1.0 `TaskArtifactUpdateEvent`
|
|
227
|
+
* (spec §5.2). The handler result is stringified per the
|
|
228
|
+
* {@link stringifyResult} contract.
|
|
229
|
+
*/
|
|
230
|
+
export declare function buildArtifactUpdateFrame(reqId: unknown, taskId: string, value: unknown): Record<string, unknown>;
|
|
231
|
+
/**
|
|
232
|
+
* `instanceof`-based detection with duck-type fallback. JobProxy is a
|
|
233
|
+
* napi-rs class that survives across module loaders; using `instanceof`
|
|
234
|
+
* first matches Java's branching. The duck-type fallback covers any
|
|
235
|
+
* future case where a JobProxy-shaped object is returned (subclass /
|
|
236
|
+
* test double).
|
|
237
|
+
*/
|
|
238
|
+
declare function isJobProxy(value: unknown): value is JobProxy;
|
|
239
|
+
/**
|
|
240
|
+
* Framework-agnostic description of an SSE stream for a single
|
|
241
|
+
* `tasks/sendSubscribe` / `tasks/resubscribe` call. The Express SSE
|
|
242
|
+
* adapter ({@link sse-emitter}) maps this into a `text/event-stream`
|
|
243
|
+
* response body.
|
|
244
|
+
*
|
|
245
|
+
* Four shapes:
|
|
246
|
+
* - `error` — preflight error before SSE is even started (parse error,
|
|
247
|
+
* unknown task id, missing path). Adapter emits a JSON-RPC error
|
|
248
|
+
* response, NOT an SSE stream.
|
|
249
|
+
* - `single-frame` — one terminal SSE frame then close (sync handler
|
|
250
|
+
* completed, handler raised, already-terminal resubscribe).
|
|
251
|
+
* - `sync-completed` — one artifact frame + one final status frame then
|
|
252
|
+
* close (sync handler called via `tasks/sendSubscribe`).
|
|
253
|
+
* - `long-running` — initial working frame, then poll loop with progress
|
|
254
|
+
* frames, keepalives, and a terminal frame.
|
|
255
|
+
*/
|
|
256
|
+
export type SseStreamPlan = {
|
|
257
|
+
readonly kind: "error";
|
|
258
|
+
readonly errorBody: Record<string, unknown>;
|
|
259
|
+
readonly httpStatus: number;
|
|
260
|
+
} | {
|
|
261
|
+
readonly kind: "single-frame";
|
|
262
|
+
readonly frame: Record<string, unknown>;
|
|
263
|
+
} | {
|
|
264
|
+
readonly kind: "sync-completed";
|
|
265
|
+
readonly reqId: unknown;
|
|
266
|
+
readonly taskId: string;
|
|
267
|
+
readonly artifactFrame: Record<string, unknown>;
|
|
268
|
+
readonly terminalFrame: Record<string, unknown>;
|
|
269
|
+
} | {
|
|
270
|
+
readonly kind: "long-running";
|
|
271
|
+
readonly reqId: unknown;
|
|
272
|
+
readonly taskId: string;
|
|
273
|
+
readonly proxy: JobProxy;
|
|
274
|
+
};
|
|
275
|
+
export { isJobProxy as __isJobProxyForTests, };
|
|
276
|
+
//# sourceMappingURL=dispatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../../../src/a2a/producer/dispatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,KAAK,EAAW,cAAc,EAAY,MAAM,SAAS,CAAC;AAGjE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,KAAK,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