@corbits/mcp 0.3.1 → 0.4.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 +120 -26
- package/dist/auth/callback.d.ts +14 -0
- package/dist/auth/callback.js +79 -0
- package/dist/auth/challenge.d.ts +9 -0
- package/dist/auth/challenge.js +52 -0
- package/dist/auth/contracts.d.ts +18 -0
- package/dist/auth/contracts.js +19 -0
- package/dist/auth/http.d.ts +2 -0
- package/dist/auth/http.js +2 -0
- package/dist/auth/index.d.ts +6 -0
- package/dist/auth/index.js +6 -0
- package/dist/auth/login.d.ts +62 -0
- package/dist/auth/login.js +175 -0
- package/dist/auth/oauth-http.d.ts +6 -0
- package/dist/auth/oauth-http.js +32 -0
- package/dist/auth/resource-server.d.ts +25 -0
- package/dist/auth/resource-server.js +94 -0
- package/dist/auth/url-policy.d.ts +10 -0
- package/dist/auth/url-policy.js +35 -0
- package/dist/client/resource-budget.d.ts +1 -0
- package/dist/client/resource-budget.js +1 -0
- package/dist/client/transport.d.ts +10 -0
- package/dist/client/transport.js +1 -0
- package/dist/client.d.ts +208 -26
- package/dist/client.js +1128 -90
- package/dist/extensions/apps.d.ts +58 -0
- package/dist/extensions/apps.js +55 -0
- package/dist/extensions/elicitation.d.ts +18 -0
- package/dist/extensions/elicitation.js +55 -0
- package/dist/extensions/index.d.ts +5 -0
- package/dist/extensions/index.js +5 -0
- package/dist/extensions/maturity.d.ts +44 -0
- package/dist/extensions/maturity.js +24 -0
- package/dist/extensions/skills/contracts.d.ts +53 -0
- package/dist/extensions/skills/contracts.js +1 -0
- package/dist/extensions/skills/index.d.ts +52 -0
- package/dist/extensions/skills/index.js +402 -0
- package/dist/extensions/tasks/contracts.d.ts +39 -0
- package/dist/extensions/tasks/contracts.js +1 -0
- package/dist/extensions/tasks/file-store.d.ts +12 -0
- package/dist/extensions/tasks/file-store.js +152 -0
- package/dist/extensions/tasks/index.d.ts +82 -0
- package/dist/extensions/tasks/index.js +221 -0
- package/dist/extensions/tasks/record.d.ts +3 -0
- package/dist/extensions/tasks/record.js +37 -0
- package/dist/hub/discover.d.ts +5 -1
- package/dist/hub/discover.js +36 -13
- package/dist/index.d.ts +3 -2
- package/dist/index.js +4 -2
- package/dist/interchange/client/capabilities.d.ts +4 -0
- package/dist/interchange/client/capabilities.js +53 -0
- package/dist/interchange/client/catalog.d.ts +14 -0
- package/dist/interchange/client/catalog.js +52 -0
- package/dist/interchange/client/contracts.d.ts +47 -0
- package/dist/interchange/client/contracts.js +1 -0
- package/dist/interchange/client/projection.d.ts +6 -0
- package/dist/interchange/client/projection.js +92 -0
- package/dist/interchange/client/skills.d.ts +16 -0
- package/dist/interchange/client/skills.js +87 -0
- package/dist/interchange/client.d.ts +8 -0
- package/dist/interchange/client.js +6 -0
- package/dist/interchange/server/contracts.d.ts +65 -0
- package/dist/interchange/server/contracts.js +1 -0
- package/dist/interchange/server.d.ts +5 -0
- package/dist/interchange/server.js +172 -0
- package/dist/naming.d.ts +2 -0
- package/dist/naming.js +7 -0
- package/dist/oauth-discovery.d.ts +107 -1
- package/dist/oauth-discovery.js +292 -56
- package/dist/protocol/content.d.ts +35 -0
- package/dist/protocol/content.js +64 -0
- package/dist/protocol/envelopes.d.ts +14 -0
- package/dist/protocol/envelopes.js +22 -0
- package/dist/protocol/errors.d.ts +26 -0
- package/dist/protocol/errors.js +31 -0
- package/dist/protocol/extensions.d.ts +34 -0
- package/dist/protocol/extensions.js +86 -0
- package/dist/protocol/headers.d.ts +12 -0
- package/dist/protocol/headers.js +128 -0
- package/dist/protocol/index.d.ts +11 -0
- package/dist/protocol/index.js +11 -0
- package/dist/protocol/json-schema.d.ts +8 -0
- package/dist/protocol/json-schema.js +152 -0
- package/dist/protocol/legacy.d.ts +12 -0
- package/dist/protocol/legacy.js +18 -0
- package/dist/protocol/methods.d.ts +116 -0
- package/dist/protocol/methods.js +78 -0
- package/dist/protocol/resource-budget.d.ts +9 -0
- package/dist/protocol/resource-budget.js +206 -0
- package/dist/protocol/schemas.d.ts +115 -0
- package/dist/protocol/schemas.js +553 -0
- package/dist/protocol/types.d.ts +295 -0
- package/dist/protocol/types.js +3 -0
- package/dist/protocol/ui.d.ts +3 -0
- package/dist/protocol/ui.js +18 -0
- package/dist/server/contracts.d.ts +67 -0
- package/dist/server/contracts.js +1 -0
- package/dist/server/errors.d.ts +6 -0
- package/dist/server/errors.js +21 -0
- package/dist/server/extensions.d.ts +7 -0
- package/dist/server/extensions.js +61 -0
- package/dist/server/fixtures.d.ts +2 -0
- package/dist/server/fixtures.js +34 -0
- package/dist/server/legacy.d.ts +9 -0
- package/dist/server/legacy.js +435 -0
- package/dist/server/tools.d.ts +17 -0
- package/dist/server/tools.js +93 -0
- package/dist/server.d.ts +14 -0
- package/dist/server.js +406 -0
- package/dist/sidecar-bundle.d.ts +7 -7
- package/dist/sidecar-bundle.js +36 -29
- package/dist/test-server.js +12 -3
- package/dist/tool.d.ts +8 -0
- package/dist/tool.js +35 -19
- package/dist/url.js +8 -3
- package/docs/conformance.md +135 -0
- package/docs/integration-status.md +98 -0
- package/docs/legacy-server.md +58 -0
- package/docs/migration.md +143 -0
- package/docs/public-api.md +106 -0
- package/examples/README.md +28 -0
- package/examples/standalone-client.ts +14 -0
- package/examples/standalone-server.ts +37 -0
- package/package.json +40 -5
package/dist/tool.js
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
// each is grantable individually. Discovery runs up front because
|
|
3
3
|
// `createAgent` calls a tool factory synchronously.
|
|
4
4
|
import { defineTool, } from "@intx/agent";
|
|
5
|
-
import { DEFAULT_TIMEOUT_MS, mcpCallTool,
|
|
6
|
-
import { assertCatalogNames, assertServers, isAskExempt, qualifiedName, toolDescription, } from "./naming.js";
|
|
5
|
+
import { DEFAULT_TIMEOUT_MS, mcpCallTool, mcpConnect, mcpListTools, } from "./client.js";
|
|
6
|
+
import { assertCatalogNames, assertServers, isAskExempt, isModelVisible, qualifiedName, toolDescription, } from "./naming.js";
|
|
7
|
+
import { assertHostExtensions, hostClientOptions, } from "./interchange/client/capabilities.js";
|
|
8
|
+
import { projectToolResult } from "./interchange/client/projection.js";
|
|
7
9
|
async function resolveFetch(server, credentials) {
|
|
8
10
|
if (server.credentialHandle === undefined)
|
|
9
11
|
return undefined;
|
|
@@ -24,6 +26,7 @@ async function resolveFetch(server, credentials) {
|
|
|
24
26
|
export async function mcpTools(options, discoveryEnv = {}) {
|
|
25
27
|
const allowWithoutAsk = options.allowWithoutAsk ?? [];
|
|
26
28
|
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
29
|
+
assertHostExtensions(options.extensions, options.host);
|
|
27
30
|
assertServers(options.servers, "MCP server name");
|
|
28
31
|
const discovered = [];
|
|
29
32
|
for (const server of options.servers) {
|
|
@@ -31,14 +34,18 @@ export async function mcpTools(options, discoveryEnv = {}) {
|
|
|
31
34
|
const clientOpts = {
|
|
32
35
|
...(clientFetch !== undefined ? { fetch: clientFetch } : {}),
|
|
33
36
|
timeoutMs,
|
|
37
|
+
...hostClientOptions(options.host, options.extensions),
|
|
38
|
+
...(options.extensions !== undefined
|
|
39
|
+
? { extensions: options.extensions }
|
|
40
|
+
: {}),
|
|
34
41
|
};
|
|
35
|
-
const session = await
|
|
42
|
+
const session = await mcpConnect(server.url, clientOpts);
|
|
36
43
|
const tools = await mcpListTools(server.url, { ...clientOpts, session });
|
|
37
44
|
assertCatalogNames(server.name, tools);
|
|
38
|
-
for (const tool of tools) {
|
|
45
|
+
for (const tool of tools.filter(isModelVisible)) {
|
|
39
46
|
discovered.push({
|
|
40
|
-
server,
|
|
41
|
-
tool,
|
|
47
|
+
server: { ...server },
|
|
48
|
+
tool: structuredClone(tool),
|
|
42
49
|
qualified: qualifiedName(server.name, tool.name),
|
|
43
50
|
});
|
|
44
51
|
}
|
|
@@ -77,8 +84,12 @@ export async function mcpTools(options, discoveryEnv = {}) {
|
|
|
77
84
|
const opts = {
|
|
78
85
|
...(clientFetch !== undefined ? { fetch: clientFetch } : {}),
|
|
79
86
|
timeoutMs,
|
|
87
|
+
...hostClientOptions(options.host, options.extensions),
|
|
88
|
+
...(options.extensions !== undefined
|
|
89
|
+
? { extensions: options.extensions }
|
|
90
|
+
: {}),
|
|
80
91
|
};
|
|
81
|
-
const session = await
|
|
92
|
+
const session = await mcpConnect(server.url, opts);
|
|
82
93
|
return { ...opts, session };
|
|
83
94
|
})();
|
|
84
95
|
clientByServer.set(server.name, client);
|
|
@@ -97,22 +108,27 @@ export async function mcpTools(options, discoveryEnv = {}) {
|
|
|
97
108
|
};
|
|
98
109
|
}
|
|
99
110
|
try {
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
111
|
+
const context = {
|
|
112
|
+
server: found.server.name,
|
|
113
|
+
url: found.server.url,
|
|
114
|
+
tool: found.qualified,
|
|
115
|
+
callId: call.id,
|
|
116
|
+
signal,
|
|
117
|
+
};
|
|
118
|
+
await options.host?.validateCatalog?.(context, found.tool);
|
|
119
|
+
const client = {
|
|
120
|
+
...(await connect(found.server)),
|
|
103
121
|
signal,
|
|
104
|
-
|
|
105
|
-
.
|
|
122
|
+
inputSchema: found.tool.inputSchema,
|
|
123
|
+
...(found.tool.outputSchema === undefined
|
|
124
|
+
? {}
|
|
125
|
+
: { outputSchema: found.tool.outputSchema }),
|
|
126
|
+
};
|
|
127
|
+
const result = await mcpCallTool(found.server.url, found.tool.name, call.arguments, client).catch((cause) => {
|
|
106
128
|
clientByServer.delete(found.server.name);
|
|
107
129
|
throw cause;
|
|
108
130
|
});
|
|
109
|
-
return
|
|
110
|
-
callId: call.id,
|
|
111
|
-
isError: result.isError === true,
|
|
112
|
-
content: typeof result.content === "string"
|
|
113
|
-
? result.content
|
|
114
|
-
: JSON.stringify(result.content),
|
|
115
|
-
};
|
|
131
|
+
return await projectToolResult(context, result, client, options.host);
|
|
116
132
|
}
|
|
117
133
|
catch (err) {
|
|
118
134
|
return {
|
package/dist/url.js
CHANGED
|
@@ -11,12 +11,17 @@ export function parseMcpEndpoint(raw) {
|
|
|
11
11
|
try {
|
|
12
12
|
url = new URL(raw);
|
|
13
13
|
}
|
|
14
|
-
catch
|
|
15
|
-
throw new Error(
|
|
14
|
+
catch {
|
|
15
|
+
throw new Error("MCP endpoint is not an absolute URL");
|
|
16
16
|
}
|
|
17
|
+
if (url.username || url.password || raw.includes("#") || /[\\\s]/.test(raw)) {
|
|
18
|
+
throw new Error("MCP endpoint must not contain userinfo, fragments, whitespace or backslashes");
|
|
19
|
+
}
|
|
20
|
+
if (url.searchParams.has("access_token"))
|
|
21
|
+
throw new Error("MCP bearer tokens must not appear in URL query parameters");
|
|
17
22
|
if (url.protocol === "https:")
|
|
18
23
|
return url;
|
|
19
24
|
if (url.protocol === "http:" && LOOPBACK_HOSTS.has(url.hostname))
|
|
20
25
|
return url;
|
|
21
|
-
throw new Error(
|
|
26
|
+
throw new Error("MCP endpoint must be https (http is allowed only on loopback)");
|
|
22
27
|
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Conformance evidence and release gates
|
|
2
|
+
|
|
3
|
+
Snapshot: 2026-10-25. This matrix records implemented scope, assertion locators
|
|
4
|
+
and qualified evidence, not a blanket MCP compliance verdict. The integration
|
|
5
|
+
gate passed final QA with 423 tests and 2,116 assertions; qualified build, e2e
|
|
6
|
+
and package evidence is recorded separately in integration-status.md. Counts do not prove every
|
|
7
|
+
normative clause or deployment. No stale missing-export or mandatory-OAuth
|
|
8
|
+
blocker applies to the current package.
|
|
9
|
+
|
|
10
|
+
## Revision and maturity matrix
|
|
11
|
+
|
|
12
|
+
| Surface | Revision/source | Maturity | Applicability |
|
|
13
|
+
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | --------------------------------------------------------------------------------------- |
|
|
14
|
+
| MCP core | [2026-07-28](https://modelcontextprotocol.io/specification/2026-07-28) | Released | Stateless Streamable HTTP client/server |
|
|
15
|
+
| Legacy MCP client | 2025-11-25, 2025-06-18, 2025-03-26, historical 2024-11-05 negotiation | Compatibility | Initialize/session path; no claim of removed HTTP+SSE transport support |
|
|
16
|
+
| Legacy MCP server | 2025-11-25, 2025-06-18, 2025-03-26 | Gated compatibility | Opt-in implemented; session affinity required; final scoped independent legacy approval |
|
|
17
|
+
| Tasks | [2026-07-28, b3d28aceaa6d49f5f92258e3d06b61ad6f111e84](https://github.com/modelcontextprotocol/ext-tasks/blob/b3d28aceaa6d49f5f92258e3d06b61ad6f111e84/specification/2026-07-28/tasks.md) | Stable upstream | Opt-in; tools/call only; durable host services required |
|
|
18
|
+
| Skills | [stable, c1aa87e4c381c82b99aa37471d0eae4ab50f9985](https://github.com/modelcontextprotocol/ext-skills/blob/c1aa87e4c381c82b99aa37471d0eae4ab50f9985/specification/stable/skills.mdx) | Stable upstream | Core 2026-07-28+; verification is not activation |
|
|
19
|
+
| Apps | [2026-01-26, 266a9e3b70dbd4a4f0546dda95da2a2c1a8be4b7](https://github.com/modelcontextprotocol/ext-apps/blob/266a9e3b70dbd4a4f0546dda95da2a2c1a8be4b7/specification/2026-01-26/apps.mdx) | Stable upstream | Explicit host bridge/support/presentation gate; renderer remains host-owned |
|
|
20
|
+
| Interchange | Installed @intx packages 0.5.0 | Executable integration baseline | Actual ToolBundle, credential and Agent contracts, not fabricated upstream APIs |
|
|
21
|
+
| MCP SDK | 1.30.1, development only | Legacy interoperability oracle | Does not certify 2026 behavior |
|
|
22
|
+
|
|
23
|
+
All three extensions are disabled by default. Stable upstream does not mean every
|
|
24
|
+
host supports them. No `/v2` MCP methods, extension identifiers or protocol names
|
|
25
|
+
are introduced. Actual experimental additions require an `unstable_` local API,
|
|
26
|
+
source pin and migration policy. The Apps UI protocol revision is independent of
|
|
27
|
+
the core MCP revision.
|
|
28
|
+
|
|
29
|
+
[Claude Code documentation](https://code.claude.com/docs/en/mcp) describes a
|
|
30
|
+
2026 runtime and task public beta on CLI 2.1.304+ with runtime, provider and surface
|
|
31
|
+
restrictions. This is not evidence for universal Claude Desktop/web/CLI support.
|
|
32
|
+
Blank community-matrix cells are not positive support evidence.
|
|
33
|
+
|
|
34
|
+
## Requirement matrix
|
|
35
|
+
|
|
36
|
+
C = standalone client; S = server; IC/IS = Interchange consumption/exposure.
|
|
37
|
+
The listed suites provide scoped evidence. Core F1–F11, auth neutral isolation,
|
|
38
|
+
Apps gating and large Skills bounds have reported independent approvals.
|
|
39
|
+
Legacy has final scoped independent approval; final reconciled QA passed.
|
|
40
|
+
Clauses without a dedicated exhaustive
|
|
41
|
+
mapping remain **unverified for full clause coverage**, not “missing tests” or
|
|
42
|
+
“missing implementation.”
|
|
43
|
+
|
|
44
|
+
| ID | Normative clause / requirement | Role / applicability | Current evidence locator | Qualification |
|
|
45
|
+
| --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
|
46
|
+
| C01 | [Basic](https://modelcontextprotocol.io/specification/2026-07-28/basic): JSON-RPC envelopes, required per-request _meta | C/S, modern | src/protocol/protocol.test.ts; src/client/contracts.test.ts; src/server/server.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
47
|
+
| C02 | [Versioning](https://modelcontextprotocol.io/specification/2026-07-28/basic/versioning): supported revision and no invented version | C/S | src/protocol-2026.test.ts; src/server/server.test.ts; src/server/legacy.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
48
|
+
| C03 | [HTTP sending](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http#sending-messages): POST per message, Accept JSON + SSE, one request/notification | C/S | src/client.test.ts; src/server/server.test.ts; src/server/review-regressions.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
49
|
+
| C04 | [HTTP security](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http#security--endpoint): invalid Origin rejected with 403 | S | src/server/server.test.ts (Origin/auth/header/malformed requests) | Scoped suite evidence; full clause coverage not certified |
|
|
50
|
+
| C05 | [HTTP metadata](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http#request-metadata): method/name/version headers match body, encoding and custom primitive headers | C/S | src/protocol/headers-codec.test.ts; src/client/review-regressions.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
51
|
+
| C06 | [HTTP receiving](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http#receiving-messages): JSON/SSE, notifications scoped to request, no independent server request | C/S | src/client/contracts.test.ts; src/client/review-regressions.test.ts; src/server/review-regressions.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
52
|
+
| C07 | [HTTP backward compatibility](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http#backward-compatibility): discovery fallback but not auth/rate-limit/server failures | C, legacy | src/protocol-2026.test.ts; src/client/review-regressions.test.ts F8; e2e/sdk-transport.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
53
|
+
| C08 | [Discovery](https://modelcontextprotocol.io/specification/2026-07-28/server/discover): truthful version/capability advertisement, no modern sessions | C/S | src/server/server.test.ts (real client and loopback); e2e/protocol-2026.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
54
|
+
| C09 | [Tools](https://modelcontextprotocol.io/specification/2026-07-28/server/tools): schema-valid input/output, content, errors, unique catalog names | C/S/IC/IS | src/protocol/protocol.test.ts; src/server/providers.test.ts; src/client.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
55
|
+
| C10 | [Prompts](https://modelcontextprotocol.io/specification/2026-07-28/server/prompts), [resources](https://modelcontextprotocol.io/specification/2026-07-28/server/resources), [completion](https://modelcontextprotocol.io/specification/2026-07-28/server/utilities/completion): feature-specific shapes, cursors and capabilities | C/S | src/protocol-2026.test.ts; src/protocol/protocol.test.ts; src/server/providers.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
56
|
+
| C11 | [Caching](https://modelcontextprotocol.io/specification/2026-07-28/server/utilities/caching): cache fields; authenticated cache isolation | C/S/IC/IS when caching | e2e/protocol-2026.test.ts; src/interchange/client/catalog.test.ts (host cache policy remains deployment-specific) | Scoped suite evidence; full clause coverage not certified |
|
|
57
|
+
| C12 | [MRTR supported requests](https://modelcontextprotocol.io/specification/2026-07-28/basic/patterns/mrtr#supported-requests): only tools/call, prompts/get, resources/read permit input_required | C/S | src/protocol/protocol.test.ts; src/client/review-regressions.test.ts F2/F3 | Scoped suite evidence; full clause coverage not certified |
|
|
58
|
+
| C13 | [MRTR client workflow](https://modelcontextprotocol.io/specification/2026-07-28/basic/patterns/mrtr#client-requirements-basic-workflow): opaque latest requestState, original params, fresh ID | C/IC | src/protocol-2026.test.ts; src/interchange/client/continuation.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
59
|
+
| C14 | [Elicitation](https://modelcontextprotocol.io/specification/2026-07-28/client/elicitation): explicit form/URL support, validated responses, no implicit consent | C/S/IC/IS when opted in | src/client/review-regressions.test.ts F9; src/extensions/host.test.ts; src/interchange/client/projection.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
60
|
+
| C15 | [Progress](https://modelcontextprotocol.io/specification/2026-07-28/basic/patterns/progress): request-local progress only | C/S | src/client/review-regressions.test.ts F11; src/server/server.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
61
|
+
| C16 | [Cancellation](https://modelcontextprotocol.io/specification/2026-07-28/basic/patterns/cancellation): modern HTTP stream closure signals cancellation, no cancelled notification | C/S | src/client/review-regressions.test.ts F5; src/server/server.test.ts; src/server/legacy.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
62
|
+
| C17 | [Subscriptions](https://modelcontextprotocol.io/specification/2026-07-28/basic/patterns/subscriptions): negotiated filters, only allowed change notifications, terminal complete result | C/S when provided | src/client/review-regressions.test.ts F7/F11; src/server/review-regressions.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
63
|
+
| C18 | [Authorization](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization): protected-resource auth, challenge and operation authority | S/IS protected endpoints | src/auth/security.test.ts; src/auth/flows.test.ts; src/server/server.test.ts; e2e/interchange.test.ts | Guarded/neutral auth approved; stock dependency limits remain |
|
|
64
|
+
| C19 | [AS discovery](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/authorization-server-discovery): issuer exactness, resource binding, PKCE, registration policy | C/hub OAuth | src/oauth-discovery.test.ts; src/auth/security.test.ts; src/auth/review-regressions.test.ts | Guarded/neutral auth approved; stock dependency limits remain |
|
|
65
|
+
| C20 | [Deprecated features](https://modelcontextprotocol.io/specification/2026-07-28/deprecated) | All | Explicit modern non-goals; legacy ping/cancellation are revision-scoped | Scoped exclusions; see legacy-server.md |
|
|
66
|
+
| T01 | Tasks Capability Negotiation / Supported Methods: opt-in each request, tools/call only, missing capability error | C/S/IC/IS tasks | src/server/extensions.test.ts; src/protocol/protocol.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
67
|
+
| T02 | Tasks Task Status: working/input_required/completed/failed/cancelled; completed tool error differs from JSON-RPC failed | C/S tasks | src/extensions/tasks/tasks.test.ts; src/client/review-regressions.test.ts F3 | Scoped suite evidence; full clause coverage not certified |
|
|
68
|
+
| T03 | Tasks get/update/cancel: taskId header and outstanding input keys | C/S tasks | src/extensions/tasks/tasks.test.ts; src/protocol/headers-codec.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
69
|
+
| T04 | Tasks durability + scope §§4,7: persist before handle; tenant/principal isolation, TTL, CAS and recoverable executor | S/IS tasks | src/extensions/tasks/tasks.test.ts; e2e/fixtures/packed-standalone.mjs | Scoped suite evidence; full clause coverage not certified |
|
|
70
|
+
| T05 | Scope §5: workflow correlation and truthful cooperative cancellation | IS tasks/workflows | src/interchange/server/accepted.test.ts; src/interchange/server/server.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
71
|
+
| K01 | Skills Capability Negotiation: resources capability, list/get; directoryRead only if declared | C/S skills | src/server/extensions.test.ts; src/interchange/client/skills.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
72
|
+
| K02 | Skills Skill Format / Resource Mapping: root SKILL.md, YAML name/description, name/path match, no scheme-only identity | S/IC skills | src/extensions/skills/skills.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
73
|
+
| K03 | Skills manifest integrity/security + scope §4: all file hashes, byte limits, origin and held-manifest binding | C/S/IC skills | src/extensions/skills/skills.test.ts; src/interchange/client/skills-large.test.ts; src/protocol/resource-bounds.test.ts | Independent authenticated-loopback/bounds approval, including 16 MiB |
|
|
74
|
+
| K04 | Scope §4 host activation: approval/provenance bound to context admission and all execution tools for acting window | IC skills | src/extensions/skills/verification-race.test.ts; src/extensions/skills/skills.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
75
|
+
| A01 | Apps Capability Negotiation / Tool-UI Linkage: opt-in, metadata preserved, app-only tools not model-visible | C/S/IC/IS UI metadata | src/interchange/client/apps.test.ts; src/extensions/host.test.ts | Scoped independent approval (74 tests + 6 probes); host renderer not certified |
|
|
76
|
+
| A02 | Apps UI Resource Format: ui:// and text/html;profile=mcp-app; host sandbox/CSP | S metadata; browser host excluded | src/extensions/host.test.ts; src/interchange/client/apps.test.ts (actual renderer is host-owned) | Scoped independent approval (74 tests + 6 probes); host renderer not certified |
|
|
77
|
+
| I01 | Scope §§2,5: real ToolBundle dispatch, explicit selected exposure, execution rechecks grants | IC/IS | e2e/interchange.test.ts; src/interchange/server/server.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
78
|
+
| I02 | Scope §§2,5: synchronous stored catalogs, credential consumer identity and origin pinning, destructive ask floor | IC | src/sidecar-bundle.test.ts; src/tool.test.ts; src/hub/discover.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
79
|
+
| I03 | Scope §5: preserve structured/binary/private detail and truthful lifecycle projection | IC | src/interchange/client/projection.test.ts; src/interchange/client/integration.test.ts | Scoped suite evidence; full clause coverage not certified |
|
|
80
|
+
| P01 | Scope §2: four entries, historical facades, declarations and runtime dependency isolation | Package | e2e/package.test.ts; installed tarballs on Bun 1.4.2 / Node 24.22.1 | Installed boundary passes; latest counts in integration-status.md |
|
|
81
|
+
|
|
82
|
+
## Implemented compatibility and review scope
|
|
83
|
+
|
|
84
|
+
The server implements opt-in 2025-11-25/06-18/03-26 Streamable HTTP sessions;
|
|
85
|
+
modern remains stateless. See [legacy deployment and limits](legacy-server.md).
|
|
86
|
+
Legacy now has final scoped approval: 50 tests / 319 assertions plus 5
|
|
87
|
+
independent tests / 63 assertions, as reported by the director. Both header and
|
|
88
|
+
shutdown repairs are closed. This is separate from the approved core F1–F11
|
|
89
|
+
repairs and does not substitute for final reconciled QA. No removed HTTP+SSE or resumption support is claimed.
|
|
90
|
+
|
|
91
|
+
Apps advertisement requires explicit host bridge support, sandbox renderer,
|
|
92
|
+
CSP enforcement, authenticated bridge and presentation. Metadata-only handling
|
|
93
|
+
never advertises Apps. The host still supplies the actual renderer and enforces
|
|
94
|
+
its security properties; the library's gate is not a deployed-browser audit.
|
|
95
|
+
Skills verification supports bounded 16 MiB decoded resources; independent
|
|
96
|
+
review exercised actual authenticated loopback and all bounds. Verification is
|
|
97
|
+
not approval to admit context or execute code.
|
|
98
|
+
|
|
99
|
+
The verified Skills adapter declines dynamic manifests, as permitted by the
|
|
100
|
+
pinned specification. It requires complete resource reads with exactly one
|
|
101
|
+
matching text/blob item; resource-read MRTR is unsupported by that adapter.
|
|
102
|
+
These are explicit supported-shape limits, not a reopening of the approved
|
|
103
|
+
resource bounds or a claim that dynamic consumption is mandatory.
|
|
104
|
+
|
|
105
|
+
## Remaining actual requirements
|
|
106
|
+
|
|
107
|
+
- **CL11479 — external OAuth-core defects:** stock 0.3.0 token/profile/storage
|
|
108
|
+
requires refresh tokens; stock token POST follows redirects and exposes raw
|
|
109
|
+
response errors; authorize extras can overwrite state/PKCE. Guarded MCP
|
|
110
|
+
sessions avoid those paths but do not fix stock OAuth-core. Stock hub DCR-only
|
|
111
|
+
selection and present-but-unadvertised issuer handling are additional documented
|
|
112
|
+
integration limits, not silently added issue acceptance criteria. Resource
|
|
113
|
+
exchange/refresh propagation already exists upstream; the local config omission
|
|
114
|
+
was fixed. See [guarded auth and companion limits](public-api.md).
|
|
115
|
+
- **CL11480 — external credential-http defects:** old harness/types peer ranges
|
|
116
|
+
block the pinned full hub install; Request+init semantics and insecure configured
|
|
117
|
+
destination schemes also need upstream correction. Neutral installs pass and
|
|
118
|
+
must not be conflated with this optional host failure.
|
|
119
|
+
- **Host obligations:** trusted identity/grants, cryptographic verification or
|
|
120
|
+
introspection, credential storage, callback/registration setup, explicit selected
|
|
121
|
+
bindings, durable recoverable executors, session affinity, skill approval and
|
|
122
|
+
context lifecycle, and Apps renderer/bridge security. These are injected
|
|
123
|
+
application responsibilities, not invented missing library features.
|
|
124
|
+
- **Unverified deployments/clauses:** production DB transactions, live OAuth
|
|
125
|
+
services and callback deployment, distributed lifecycle durability, browser
|
|
126
|
+
sandbox enforcement, and exhaustive revision-by-clause coverage require their
|
|
127
|
+
own evidence. No 100% conformance or production certification is asserted.
|
|
128
|
+
|
|
129
|
+
## Gates and provenance
|
|
130
|
+
|
|
131
|
+
`bun run check`, `bun run test:e2e`, and the serial installed-package gate provide
|
|
132
|
+
complementary evidence; exact commands, versions, counts and exit codes are in
|
|
133
|
+
[integration-status.md](integration-status.md). Independent Apps (74 tests plus
|
|
134
|
+
6 probes), authenticated large-Skills, core and auth approvals are reported by
|
|
135
|
+
the director; they are not relabeled as fresh executions by this docs lane.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# CL-11478 final documentation and package snapshot
|
|
2
|
+
|
|
3
|
+
Snapshot: 2026-10-25, PR28 commit preparation. All implementation reviews,
|
|
4
|
+
including final scoped legacy review, are approved; final QA and commit-preparation verification report 423 passing
|
|
5
|
+
unit tests and 2,116 assertions. This is not a 100% conformance claim.
|
|
6
|
+
|
|
7
|
+
## Current package and compatibility
|
|
8
|
+
|
|
9
|
+
- Public role factories/contracts are exported and exercised through installed
|
|
10
|
+
tarballs. File-store is explicit `@corbits/mcp/server/task-store` only.
|
|
11
|
+
- OAuth-core is an optional peer `^0.3.0` and pinned development dependency 0.3.0.
|
|
12
|
+
Root/login consumers install it explicitly. Neutral client/server installations
|
|
13
|
+
and module graphs exclude optional host stacks. Host/auth fixtures explicitly
|
|
14
|
+
install OAuth-core 0.3.0 and agent/harness 0.5.0.
|
|
15
|
+
- Opt-in server legacy compatibility is implemented for 2025-11-25/06-18/03-26.
|
|
16
|
+
[Legacy deployment](legacy-server.md) documents defaults (1,024 sessions,
|
|
17
|
+
absolute 30-minute TTL), in-memory affinity/restart loss, 10,000 request IDs,
|
|
18
|
+
private initialization authority, March batches and GET405/no resumption.
|
|
19
|
+
Modern remains stateless by default.
|
|
20
|
+
- Apps advertisement requires explicit host bridge/support, sandbox/CSP and
|
|
21
|
+
authenticated-bridge commitments, plus presentation. Metadata-only handling
|
|
22
|
+
does not advertise Apps. Actual renderer enforcement remains host-owned.
|
|
23
|
+
- Large Skills resources support bounded 16 MiB decoded reads with finite wire
|
|
24
|
+
allowance and independent metadata bounds; authenticated loopback and bounds
|
|
25
|
+
were independently approved, not inferred from artifact smoke counts.
|
|
26
|
+
|
|
27
|
+
## Exact executable evidence
|
|
28
|
+
|
|
29
|
+
| Command | Exit | Result |
|
|
30
|
+
| ---------------------------------------------------------------------------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
31
|
+
| `npm exec --yes --package=node@24 -- sh -c 'node --version; bun run test:package'` | 0 | **Node 24.22.1**, Bun 1.4.2; **13 pass / 0 fail**, 39 top-level assertions; one serial build/pack/install gate after legacy fixture addition |
|
|
32
|
+
| `npm exec --yes --package=node@24 -- sh -c 'node --version; bun run test:e2e'` | 0 | **Node 24.22.1**, Bun 1.4.2; **22 pass / 0 fail**, 80 assertions |
|
|
33
|
+
| `bun run build` | 0 | Commit-preparation declaration/package build |
|
|
34
|
+
| `bun run check` | 0 | Final QA and commit preparation: typecheck/lint/format and **423 pass / 0 fail**, **2,116 assertions** |
|
|
35
|
+
|
|
36
|
+
Ordinary npm installation is used without `--omit=peer`, `--force` or
|
|
37
|
+
`--legacy-peer-deps`. The 13 current tests cover public export/declarations,
|
|
38
|
+
peer-free imports, publisher/loader/task recovery/resource-auth/guarded OAuth
|
|
39
|
+
behavior, legacy initialization/capacity/GET405 for three revisions, and both
|
|
40
|
+
neutral graphs. They do not substitute for full revision review. Final migration
|
|
41
|
+
and legacy artifact evidence is **Bun + Node24**; no final Node26 claim is made.
|
|
42
|
+
|
|
43
|
+
Final QA supersedes the earlier reconciliation formatting failure. Commit
|
|
44
|
+
preparation reran all four gates above serially, including fresh artifact gates
|
|
45
|
+
after the test-only cancellation correction. All exited 0; source checks ran
|
|
46
|
+
with Bun 1.4.2 (shell Node 26.10.0), and artifact execution used Node 24.22.1.
|
|
47
|
+
No product behavior changed during commit preparation.
|
|
48
|
+
|
|
49
|
+
Director-reported independent approvals cover core F1–F11, authorization,
|
|
50
|
+
extensions, Interchange adapters, 16 MiB Skills bounds, and modern/legacy server
|
|
51
|
+
behavior. Final scoped legacy evidence includes 50 tests / 319 assertions plus
|
|
52
|
+
5 independent tests / 63 assertions, with header and shutdown repairs closed.
|
|
53
|
+
These approvals remain scoped, not exhaustive revision certification.
|
|
54
|
+
|
|
55
|
+
## External follow-ups versus host obligations
|
|
56
|
+
|
|
57
|
+
**CL11479 (OAuth-core):** stock token-only grant conversion/storage requires a
|
|
58
|
+
refresh token; token POST redirect/error handling and extra state/PKCE override
|
|
59
|
+
behavior need correction. Guarded MCP login avoids relevant unsafe paths but
|
|
60
|
+
stock helpers remain unchanged. Stock hub DCR-only selection and present-but-
|
|
61
|
+
unadvertised issuer handling are additional integration limits, distinct from
|
|
62
|
+
exact issue acceptance. Resource exchange/refresh propagation exists upstream;
|
|
63
|
+
this package's local config omission was fixed.
|
|
64
|
+
|
|
65
|
+
**CL11480 (credential-http):** full pinned hub installation fails npm ERESOLVE:
|
|
66
|
+
0.1.0 requires harness/types ^0.4.0 against the 0.5.0 baseline. A companion
|
|
67
|
+
release validated with and declaring support for both 0.5.0 peers is needed;
|
|
68
|
+
no fixed release number is established. Request+init overrides and insecure
|
|
69
|
+
configured schemes also require upstream correction. These optional-host
|
|
70
|
+
failures do not block the passing neutral installation.
|
|
71
|
+
|
|
72
|
+
Previously reproduced external install (exit 1):
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
npm install --prefix "$peer_dir" --ignore-scripts --no-audit --no-fund @corbits/credential-http@0.1.0 @intx/agent@0.5.0 @intx/harness@0.5.0 @intx/db@0.5.0 @intx/hub-api@0.5.0 @intx/types@0.5.0 drizzle-orm@0.45.3 hono@4.13.9
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Host obligations:** trusted identity/grants, real token verifier/introspection,
|
|
79
|
+
encrypted persistence, callback/registration/consent setup, egress/DNS policy,
|
|
80
|
+
selected bindings, recoverable executors/storage ownership, legacy affinity,
|
|
81
|
+
skill approval/context lifecycle, and actual Apps renderer/bridge security.
|
|
82
|
+
These are injected deployment contracts, not missing library implementations.
|
|
83
|
+
|
|
84
|
+
**Unverified scope:** live production OAuth/DB/listener deployments, distributed
|
|
85
|
+
lifecycle durability, actual browser sandbox enforcement and exhaustive
|
|
86
|
+
revision-by-clause certification. The [requirement matrix](conformance.md)
|
|
87
|
+
retains these qualifications rather than labeling resolved code/tests missing.
|
|
88
|
+
|
|
89
|
+
## Final narrow documentation corrections
|
|
90
|
+
|
|
91
|
+
Stored-catalog synchronous construction is correctly attributed to `mcpServers`;
|
|
92
|
+
`mcpTools` performs asynchronous live discovery. The stale README OAuth URL
|
|
93
|
+
scope disclaimer was removed. Packaged public API/conformance docs explicitly
|
|
94
|
+
state verified Skills supported shapes: dynamic manifests declined (permitted
|
|
95
|
+
by the pinned specification), exactly one matching text/blob item in a complete
|
|
96
|
+
resource read, and no resource MRTR in that adapter. No implementation scope was
|
|
97
|
+
expanded. Commit preparation preserves the reviewed product behavior and runs
|
|
98
|
+
the repository gates serially.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Opt-in legacy Streamable HTTP server
|
|
2
|
+
|
|
3
|
+
`createMcpServer` is modern/stateless by default. To enable identity-bound 2025
|
|
4
|
+
sessions, configure the public `legacy` option:
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { createMcpServer } from "@corbits/mcp/server";
|
|
8
|
+
|
|
9
|
+
const server = createMcpServer({
|
|
10
|
+
serverInfo: { name: "example", version: "1" },
|
|
11
|
+
auth: "public", // For private servers, supply an authenticating/authorizing policy.
|
|
12
|
+
legacy: {
|
|
13
|
+
versions: ["2025-11-25", "2025-06-18", "2025-03-26"],
|
|
14
|
+
maxSessions: 1024,
|
|
15
|
+
sessionTtlMs: 30 * 60_000,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Omitting individual legacy settings uses those defaults. Omitting `legacy`
|
|
21
|
+
entirely does not create legacy sessions. Modern requests stay stateless even
|
|
22
|
+
when legacy support is enabled. Public types `McpLegacyOptions` and
|
|
23
|
+
`McpLegacyRevision` are available through the server entry.
|
|
24
|
+
|
|
25
|
+
## Deployment and compatibility limits
|
|
26
|
+
|
|
27
|
+
- Sessions live in memory in one server instance. Route all requests for a
|
|
28
|
+
session to that instance (affinity); restart loses sessions and clients must
|
|
29
|
+
initialize again. This is not a distributed session store.
|
|
30
|
+
- The default absolute lifetime is 30 minutes, not extended by traffic. Capacity
|
|
31
|
+
defaults to 1,024 sessions; exhaustion refuses a new initialization.
|
|
32
|
+
- A session permits at most 10,000 unique request IDs (including initialization).
|
|
33
|
+
IDs cannot be reused; initialize a new session when the limit is reached.
|
|
34
|
+
- Private initialization requires authorization for resource `mcp:server`, action
|
|
35
|
+
`initialize`. Sessions bind tenant/principal/authorization context, and calls
|
|
36
|
+
recheck authorization. Session possession is not a grant.
|
|
37
|
+
- Only 2025-03-26 accepts supported JSON-RPC request/notification batches.
|
|
38
|
+
Initialization cannot be batched; later revisions reject batches.
|
|
39
|
+
- GET returns 405. Removed HTTP+SSE, independent GET streams and resumption are
|
|
40
|
+
not implemented. Legacy cancellation uses the session-scoped explicit
|
|
41
|
+
notification, not modern stream-close cancellation semantics.
|
|
42
|
+
- No translation of modern tasks/skills/MRTR into older extension generations is
|
|
43
|
+
implied. The legacy shim exposes only supported legacy methods/results.
|
|
44
|
+
|
|
45
|
+
## Evidence scope
|
|
46
|
+
|
|
47
|
+
`src/server/legacy.test.ts` covers actual SDK clients over loopback HTTP for all
|
|
48
|
+
three revisions, session lifecycle/bounds, identity/authorization, March batches,
|
|
49
|
+
malformed envelopes, result projection and cancellation. Legacy review now has
|
|
50
|
+
final scoped approval, reported by the director: 50 tests / 319 assertions plus
|
|
51
|
+
5 independent tests / 63 assertions. Both header and shutdown repairs are closed.
|
|
52
|
+
Final reconciled QA remains pending; this approval is not universal revision
|
|
53
|
+
certification.
|
|
54
|
+
|
|
55
|
+
`e2e/fixtures/packed-legacy.mjs` checks installed public factory options for all
|
|
56
|
+
three revisions, initialization/session headers, configured capacity and GET405
|
|
57
|
+
under Bun and Node24. It is a public-artifact smoke, not a substitute for the
|
|
58
|
+
full server or independent revision review.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Bidirectional API migration
|
|
2
|
+
|
|
3
|
+
## Choose the narrow entry
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
// Before: the historical root also imports the Interchange tool facade.
|
|
7
|
+
import { mcpConnect } from "@corbits/mcp";
|
|
8
|
+
// After, for standalone usage:
|
|
9
|
+
import { mcpConnect } from "@corbits/mcp/client";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The root, `@corbits/mcp/sidecar-bundle`, and `@corbits/mcp/hub` remain supported.
|
|
13
|
+
Do not change stored tool names, credential consumers or bundle IDs to migrate.
|
|
14
|
+
`@corbits/mcp/interchange/client` owns remote-MCP consumption;
|
|
15
|
+
`@corbits/mcp/interchange/server` owns explicit host exposure.
|
|
16
|
+
The standalone server entry exports `createMcpServer` and `createToolProviders`.
|
|
17
|
+
|
|
18
|
+
Agent/harness peers are optional at package-install time, not optional when
|
|
19
|
+
executing their adapters. Install `@intx/agent` and `@intx/harness` for the
|
|
20
|
+
historical root/Interchange consumption. Hub deployments additionally install
|
|
21
|
+
the hub's documented credential, DB, Hono and authorization dependencies.
|
|
22
|
+
The smoke test installs the packed package without peers to check standalone
|
|
23
|
+
imports; this is runtime import isolation, not a promise of zero dependencies.
|
|
24
|
+
AJV 8.20.0 and YAML 2.8.1 are lockfile-selected runtime dependencies. JSON Schema
|
|
25
|
+
validation must not resolve network references implicitly.
|
|
26
|
+
|
|
27
|
+
## Preserve execution and authorization semantics
|
|
28
|
+
|
|
29
|
+
- Stored-catalog `mcpServers(...)` construction stays synchronous and performs no
|
|
30
|
+
network discovery at factory construction. Live `mcpTools(...)` stays async.
|
|
31
|
+
- Qualified names remain `<server>.<tool>`. The `mcp-server` credential and
|
|
32
|
+
`@corbits/mcp/servers` consumer identity are unchanged. Do not widen grants.
|
|
33
|
+
- All tools start ask-marked; explicit safe-tool allowlists cannot lower a
|
|
34
|
+
destructive tool's ask floor. Calling a bare ToolBundle dispatcher does not
|
|
35
|
+
itself perform host authorization.
|
|
36
|
+
- Expose a finite list with `createInterchangeProviders`. The only tool
|
|
37
|
+
authorization pair is that exposure's `resource` and `action` — the same
|
|
38
|
+
pair for catalog visibility and for invocation. Do not grant a separate
|
|
39
|
+
`mcp:tools` `list` or `call` action. The server gate authorizes the selected
|
|
40
|
+
exposure pair, and `auth: "public"` on `createToolProviders` does not skip a
|
|
41
|
+
private `createMcpServer` policy. Bind tenant and approval in the host as
|
|
42
|
+
well. Catalog visibility is not execution approval; the exposure pair is
|
|
43
|
+
checked again on every invocation, and `approve` runs only after it is allowed.
|
|
44
|
+
A `tools/call` whose name is not in the catalog gets the same denial as a
|
|
45
|
+
binding `authorize` rejects, before schema or header checks, so the call
|
|
46
|
+
cannot probe membership. `tools/list`
|
|
47
|
+
stays a filtered catalog — empty when nothing is visible — and is not a 403
|
|
48
|
+
merely because the caller can see no tools.
|
|
49
|
+
- Private `server/discover` returns capabilities and server info only when
|
|
50
|
+
`authorize` allows at least one registered pair (each exposure's resource and
|
|
51
|
+
action, or any other provider's resource and action). A principal allowed for
|
|
52
|
+
none receives 403 and no discover body. A private server with no providers
|
|
53
|
+
authorizes resource `mcp:server`, action `discover`. Public servers
|
|
54
|
+
(`auth: "public"`) do not perform that check.
|
|
55
|
+
- Credential handles are mediated, origin-pinned fetches. Raw bearer values must
|
|
56
|
+
never enter agent tool arguments/results, skills, task records or model context.
|
|
57
|
+
- Private Interchange `detail` is not automatically exported over MCP. An explicit
|
|
58
|
+
result projection is required when a host deliberately exposes richer data.
|
|
59
|
+
|
|
60
|
+
## Lifecycle results are not ordinary tool output
|
|
61
|
+
|
|
62
|
+
Narrow `resultType` before reading complete-result fields. `input_required` may
|
|
63
|
+
repeat: fulfill only supported requests through the host UI/policy, then call
|
|
64
|
+
`mcpContinue` with the latest pending result. Its opaque state may be empty or
|
|
65
|
+
absent; do not reuse an older state's value. Decline/cancel is not approval.
|
|
66
|
+
Tasks are negotiated per request and only augment `tools/call` in the pinned
|
|
67
|
+
revision. Missing lifecycle services mean unavailable/unsupported, not success,
|
|
68
|
+
a fabricated pending marker, or a new grantable tool.
|
|
69
|
+
|
|
70
|
+
For durable tasks, supply atomic persistence and a recoverable executor. An
|
|
71
|
+
in-memory store or surviving Promise is not production durability. A reference
|
|
72
|
+
single-host file store does not imply distributed/multi-writer support. Persist
|
|
73
|
+
dispatch intent before non-idempotent workflow mail and reconcile ambiguous
|
|
74
|
+
crashes rather than automatically replaying them. Bind result selection to the
|
|
75
|
+
specific run/message/correlation, not all events of a shared workflow.
|
|
76
|
+
|
|
77
|
+
`Agent.send` cancellation in Interchange 0.5.0 cancels the waiter, not the active
|
|
78
|
+
reactor cycle. Never close a shared agent for a single MCP call. Dedicated
|
|
79
|
+
workflow runs can request durable cooperative cancellation, which still is not
|
|
80
|
+
an immediate termination guarantee.
|
|
81
|
+
|
|
82
|
+
## Security tightening
|
|
83
|
+
|
|
84
|
+
Malformed wire envelopes, unsupported polymorphic result types, wrong header
|
|
85
|
+
mirrors, invalid schema/data, unauthorized selections and unnegotiated extension
|
|
86
|
+
operations are errors rather than permissive passthrough. Modern HTTP cancellation
|
|
87
|
+
closes the response stream; it must not send the stdio cancellation notification.
|
|
88
|
+
OAuth issuer equality is exact (trailing-slash aliases are not equivalent);
|
|
89
|
+
resource indicators apply to authorization, code exchange and refresh. Reject
|
|
90
|
+
credential-bearing/fragment endpoints and traversal before URL normalization.
|
|
91
|
+
These corrections intentionally reject unsafe inputs previously accepted.
|
|
92
|
+
|
|
93
|
+
## Extension deployment checklist
|
|
94
|
+
|
|
95
|
+
- Tasks: opt-in capability, durable store, recoverable backend, identity isolation,
|
|
96
|
+
TTL cleanup, explicit outstanding-input and cancellation authority.
|
|
97
|
+
- Skills: verified origin-scoped manifest and bytes, bounded YAML/parser/filesystem
|
|
98
|
+
access, explicit approval and provenance. Verification/read is not activation:
|
|
99
|
+
the host must gate context admission and all code-execution tools during the
|
|
100
|
+
approved acting window, including revocation/expiry.
|
|
101
|
+
- Apps: advertisement requires explicit host support and bridge, sandbox/CSP/
|
|
102
|
+
authenticated-bridge commitments, and presentation. Metadata-only handling
|
|
103
|
+
never advertises Apps. The host supplies and enforces the actual renderer,
|
|
104
|
+
origins and UI lifecycle; the package gate does not implement that renderer.
|
|
105
|
+
- HTTP operations: authored finite method/path bindings, host-authenticated app
|
|
106
|
+
dispatch, fixed tenant/path/origin and explicit result mapping. No automatic
|
|
107
|
+
exposure of every OpenAPI operation or hub administration route.
|
|
108
|
+
|
|
109
|
+
See [conformance evidence](conformance.md) for revision pins and pending coverage.
|
|
110
|
+
No release should claim full conformance while those requirements lack test evidence.
|
|
111
|
+
|
|
112
|
+
## Public extension factories and guarded authorization
|
|
113
|
+
|
|
114
|
+
The explicit server-only `@corbits/mcp/server/task-store` subpath exposes
|
|
115
|
+
`createFileTaskStore`; it is not imported by the neutral client. Guarded OAuth
|
|
116
|
+
host APIs are now exported at the historical root (`createMcpAuthorizationSession`,
|
|
117
|
+
`prepareMcpClient`, `refreshMcpOAuthTokens`, callback and auth helpers).
|
|
118
|
+
Root import consumers still need their historical Interchange dependencies.
|
|
119
|
+
|
|
120
|
+
Publisher/task-runtime/server-auth and host skill-loader factories are now exported
|
|
121
|
+
through their role entries and exercised from installed tarballs. OAuth-core is now an optional peer: historical root and guarded login consumers
|
|
122
|
+
must explicitly install `@corbits/oauth-core@^0.3.0` alongside their agent/harness
|
|
123
|
+
peers. Neutral client/server consumers need none of those optional host packages.
|
|
124
|
+
Packed auth fixtures explicitly install OAuth-core 0.3.0. See
|
|
125
|
+
[public API](public-api.md) for the neutral URL-error class distinction and the
|
|
126
|
+
companion credential-http harness/types 0.5.0 support requirement.
|
|
127
|
+
|
|
128
|
+
## Legacy server rollout
|
|
129
|
+
|
|
130
|
+
Legacy compatibility is implemented behind `createMcpServer({ legacy: ... })`,
|
|
131
|
+
not enabled by default. See [legacy-server.md](legacy-server.md) for the exact
|
|
132
|
+
three revisions, session affinity/restart loss, default 1,024-session/30-minute
|
|
133
|
+
bounds, 10,000 request IDs, initialization authorization, March-only batches and
|
|
134
|
+
GET405/no-resumption limits. Modern requests remain stateless.
|
|
135
|
+
|
|
136
|
+
## External companion follow-ups
|
|
137
|
+
|
|
138
|
+
CL11479 tracks stock OAuth-core token-only/redirect/error/protected-parameter
|
|
139
|
+
defects, not a generic deployment task. CL11480 tracks credential-http peer
|
|
140
|
+
compatibility plus Request+init and configured-scheme policy defects. Guarded
|
|
141
|
+
local login and neutral package isolation do not repair those external stock
|
|
142
|
+
paths. See [public API limits](public-api.md); do not force dependency resolution
|
|
143
|
+
or infer production-host approval from installed fixture results.
|