@frontmcp/sdk 1.10.8 → 1.10.9-rc.2
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/auth/flows/auth.verify.flow.d.ts +1 -1
- package/auth/flows/oauth.auth-ui.flow.d.ts +2 -2
- package/auth/flows/oauth.authorize.flow.d.ts +2 -2
- package/auth/flows/oauth.callback.flow.d.ts +2 -2
- package/auth/flows/oauth.connect.flow.d.ts +2 -2
- package/auth/flows/oauth.provider-callback.flow.d.ts +2 -2
- package/auth/flows/oauth.register.flow.d.ts +2 -2
- package/auth/flows/oauth.token.flow.d.ts +2 -2
- package/auth/flows/oauth.userinfo.flow.d.ts +2 -2
- package/auth/flows/session.verify.flow.d.ts +1 -1
- package/auth/flows/well-known.jwks.flow.d.ts +2 -2
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts +2 -2
- package/auth/flows/well-known.prm.flow.d.ts +2 -2
- package/auth/instances/instance.local-primary-auth.d.ts.map +1 -1
- package/browser/agent/agent.registry.mjs +1 -1
- package/browser/app/instances/app.esm.instance.mjs +4 -4
- package/browser/app/instances/app.remote.instance.mjs +6 -6
- package/browser/auth/auth-ui/auth-ui.registry.mjs +6 -6
- package/browser/auth/flows/oauth.authorize.flow.mjs +5 -5
- package/browser/auth/flows/oauth.callback.flow.mjs +11 -11
- package/browser/auth/flows/oauth.connect.flow.mjs +1 -1
- package/browser/auth/flows/oauth.register.flow.mjs +1 -1
- package/browser/auth/flows/oauth.token.flow.mjs +1 -1
- package/browser/auth/flows/well-known.oauth-authorization-server.flow.mjs +5 -5
- package/browser/auth/instances/instance.local-primary-auth.mjs +35 -11
- package/browser/auth/session/utils/session-id.utils.mjs +1 -1
- package/browser/common/entries/skill.entry.mjs +2 -2
- package/browser/common/entries/tool.entry.mjs +3 -3
- package/browser/common/interfaces/channel.interface.mjs +1 -1
- package/browser/common/interfaces/execution-context.interface.mjs +4 -4
- package/browser/common/interfaces/flow.interface.mjs +10 -0
- package/browser/common/interfaces/internal/primary-auth-provider.interface.mjs +2 -2
- package/browser/common/metadata/app.metadata.mjs +1 -1
- package/browser/common/metadata/front-mcp.metadata.mjs +5 -5
- package/browser/common/schemas/http-input.schema.mjs +9 -3
- package/browser/common/tokens/app.tokens.mjs +1 -1
- package/browser/common/tokens/front-mcp.tokens.mjs +1 -1
- package/browser/common/types/options/http/schema.mjs +4 -4
- package/browser/common/types/options/redis/schema.mjs +1 -1
- package/browser/common/types/options/sqlite/schema.mjs +3 -3
- package/browser/common/types/options/transport/schema.mjs +4 -4
- package/browser/common/utils/decide-request-intent.utils.mjs +13 -11
- package/browser/context/frontmcp-context.mjs +1 -1
- package/browser/direct/direct-client.mjs +29 -29
- package/browser/direct/direct-server.mjs +14 -14
- package/browser/errors/job.errors.mjs +1 -1
- package/browser/errors/mcp.error.mjs +4 -4
- package/browser/errors/plugin.errors.mjs +1 -1
- package/browser/errors/task.error.mjs +1 -1
- package/browser/errors/tool-credentials-required.error.mjs +2 -2
- package/browser/esm-loader/esm-module-loader.mjs +1 -7
- package/browser/esm-loader/import-computed.mjs +11 -0
- package/browser/esm-loader/semver.utils.mjs +17 -11
- package/browser/flows/flow.instance.mjs +55 -24
- package/browser/flows/flow.stages.mjs +3 -2
- package/browser/front-mcp/front-mcp.mjs +10 -14
- package/browser/ha/ha-manager.mjs +1 -1
- package/browser/ha/notification-relay.mjs +1 -1
- package/browser/index.cjs +1346 -1490
- package/browser/index.mjs +4 -4
- package/browser/job/store/job-definition-store.factory.mjs +1 -1
- package/browser/job/store/redis-job-definition.store.mjs +2 -2
- package/browser/job/tools/get-job-status.tool.mjs +1 -1
- package/browser/logger/logger.registry.mjs +1 -1
- package/browser/metrics/metrics.service.mjs +3 -3
- package/browser/prompt/prompt.registry.mjs +1 -1
- package/browser/provider/provider.registry.mjs +4 -4
- package/browser/remote-mcp/mcp-client.service.mjs +19 -19
- package/browser/remote-mcp/resilience/circuit-breaker.mjs +2 -2
- package/browser/resource/resource.registry.mjs +2 -2
- package/browser/scope/flows/http.request.flow.mjs +3 -3
- package/browser/scope/scope.instance.mjs +4 -4
- package/browser/scope/scope.utils.mjs +1 -1
- package/browser/skill/providers/memory-skill.provider.mjs +31 -9
- package/browser/skill/skill.registry.mjs +10 -10
- package/browser/task/flows/tasks-result.flow.mjs +2 -2
- package/browser/task/task.registry.mjs +5 -5
- package/browser/tool/flows/call-tool.flow.mjs +4 -4
- package/browser/tool/tool.instance.mjs +16 -7
- package/browser/tool/tool.registry.mjs +4 -4
- package/browser/tool/ui/ui-shared.mjs +1 -1
- package/browser/transport/adapters/transport.local.adapter.mjs +2 -2
- package/browser/transport/adapters/transport.streamable-http.adapter.mjs +13 -4
- package/browser/transport/event-stores/redis.event-store.mjs +1 -1
- package/browser/transport/mcp-20260728/client/mcp-stateless.client.mjs +1 -1
- package/browser/transport/mcp-20260728/request-notifications.mjs +1 -1
- package/browser/transport/transport.registry.mjs +15 -9
- package/browser/transport/web-response.renderer.mjs +2 -2
- package/browser/utils/lineage.utils.mjs +1 -1
- package/browser/workflow/tools/get-workflow-status.tool.mjs +1 -1
- package/common/interfaces/flow.interface.d.ts.map +1 -1
- package/common/schemas/http-input.schema.d.ts +3 -3
- package/common/schemas/http-input.schema.d.ts.map +1 -1
- package/common/utils/decide-request-intent.utils.d.ts.map +1 -1
- package/esm/esm-loader/import-computed.mjs +10 -0
- package/esm/index.mjs +136 -77029
- package/esm-loader/esm-module-loader.d.ts.map +1 -1
- package/esm-loader/import-computed.d.ts +21 -0
- package/esm-loader/import-computed.d.ts.map +1 -0
- package/esm-loader/import-computed.js +34 -0
- package/esm-loader/semver.utils.d.ts.map +1 -1
- package/flows/flow.instance.d.ts +1 -0
- package/flows/flow.instance.d.ts.map +1 -1
- package/flows/flow.stages.d.ts.map +1 -1
- package/front-mcp/front-mcp.d.ts.map +1 -1
- package/index.d.ts +9 -8
- package/index.d.ts.map +1 -1
- package/index.js +140 -77685
- package/mcp-registry/flows/server-card.flow.d.ts +2 -2
- package/mcp-registry/flows/well-known.ai-catalog.flow.d.ts +2 -2
- package/mcp-registry/flows/well-known.mcp-registry-auth.flow.d.ts +2 -2
- package/package.json +14 -10
- package/skill/flows/http/llm-full-txt.flow.d.ts +2 -2
- package/skill/flows/http/llm-txt.flow.d.ts +2 -2
- package/skill/flows/http/skills-api.flow.d.ts +2 -2
- package/skill/providers/memory-skill.provider.d.ts +1 -0
- package/skill/providers/memory-skill.provider.d.ts.map +1 -1
- package/tool/tool.instance.d.ts +3 -0
- package/tool/tool.instance.d.ts.map +1 -1
- package/transport/adapters/transport.streamable-http.adapter.d.ts +2 -1
- package/transport/adapters/transport.streamable-http.adapter.d.ts.map +1 -1
- package/transport/transport.registry.d.ts +1 -0
- package/transport/transport.registry.d.ts.map +1 -1
- package/browser/transport/index.mjs +0 -32
|
@@ -12,6 +12,7 @@ import { describeUnreachableEntryClassHooks, unreachableHooksMessage } from "../
|
|
|
12
12
|
import { normalizeHooksFromCls } from "../hooks/hooks.utils.mjs";
|
|
13
13
|
import { toolClassHooksJoin } from "./flows/call-tool.flow.mjs";
|
|
14
14
|
import { buildParsedToolResult } from "./tool.utils.mjs";
|
|
15
|
+
var looseArgumentsSchema = z.looseObject({});
|
|
15
16
|
var ToolInstance = class extends ToolEntry {
|
|
16
17
|
/** The provider registry this tool is bound to (captured at construction) */
|
|
17
18
|
_providers;
|
|
@@ -19,6 +20,7 @@ var ToolInstance = class extends ToolEntry {
|
|
|
19
20
|
scope;
|
|
20
21
|
/** The hook registry for this tool's scope (captured at construction) */
|
|
21
22
|
hooks;
|
|
23
|
+
_inputObjectSchema;
|
|
22
24
|
constructor(record, providers, owner) {
|
|
23
25
|
super(record);
|
|
24
26
|
this.owner = owner;
|
|
@@ -113,10 +115,17 @@ var ToolInstance = class extends ToolEntry {
|
|
|
113
115
|
const isRemoteTool = this.metadata.annotations?.["frontmcp:remote"] === true;
|
|
114
116
|
const hasRawJsonSchema = this.rawInputSchema !== void 0 && this.rawInputSchema !== null;
|
|
115
117
|
if (isRemoteTool || hasRawJsonSchema) {
|
|
116
|
-
return
|
|
118
|
+
return looseArgumentsSchema.parse(input.arguments ?? {});
|
|
117
119
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
return this.inputObjectSchema().parse(input.arguments);
|
|
121
|
+
}
|
|
122
|
+
/** `z.object(inputSchema)`, built once per shape: building one per call recompiles its parser every call. */
|
|
123
|
+
inputObjectSchema() {
|
|
124
|
+
const shape = this.inputSchema;
|
|
125
|
+
if (this._inputObjectSchema?.shape !== shape) {
|
|
126
|
+
this._inputObjectSchema = { shape, schema: z.object(shape) };
|
|
127
|
+
}
|
|
128
|
+
return this._inputObjectSchema.schema;
|
|
120
129
|
}
|
|
121
130
|
/**
|
|
122
131
|
* Turn the raw tool function result into an MCP-compliant CallToolResult:
|
|
@@ -124,10 +133,10 @@ var ToolInstance = class extends ToolEntry {
|
|
|
124
133
|
* - `structuredContent`: sanitized JSON when outputSchema is "json-like"
|
|
125
134
|
*
|
|
126
135
|
* Rules:
|
|
127
|
-
* - If outputSchema is a JS array
|
|
128
|
-
* - Primitive
|
|
129
|
-
* - image/audio/resource/resource_link
|
|
130
|
-
* - JSON / structured
|
|
136
|
+
* - If outputSchema is a JS array \u2192 multiple content items, each with its own type.
|
|
137
|
+
* - Primitive \u2192 stringifies into a TextContent block.
|
|
138
|
+
* - image/audio/resource/resource_link \u2192 passed through as-is.
|
|
139
|
+
* - JSON / structured \u2192 JSON.stringify for text, and full sanitized JSON in structuredContent.
|
|
131
140
|
*/
|
|
132
141
|
parseOutput(raw) {
|
|
133
142
|
const descriptor = this.outputSchema;
|
|
@@ -232,7 +232,7 @@ var ToolRegistry = class extends RegistryAbstract {
|
|
|
232
232
|
//
|
|
233
233
|
// AVAILABILITY FILTERING (registry-level, not HTTP/flow-level):
|
|
234
234
|
// `availableWhen` is evaluated against the process's RuntimeContext (OS, runtime, env).
|
|
235
|
-
// This is a hard constraint
|
|
235
|
+
// This is a hard constraint \u2014 unlike hideFromDiscovery (soft listing hide) or
|
|
236
236
|
// authorization (per-request in HTTP flows). Filtered entries cannot be listed or called.
|
|
237
237
|
getTools(includeHidden = false) {
|
|
238
238
|
const ctx = getRuntimeContext();
|
|
@@ -309,7 +309,7 @@ var ToolRegistry = class extends RegistryAbstract {
|
|
|
309
309
|
listAllInstances() {
|
|
310
310
|
return this.listAllIndexed().map((r) => r.instance);
|
|
311
311
|
}
|
|
312
|
-
/** Owner lineage (root
|
|
312
|
+
/** Owner lineage (root \u2192 leaf) of a tool this registry holds, or undefined when it holds none. */
|
|
313
313
|
lineageOf(entry) {
|
|
314
314
|
return this.lineages.lineageOf(entry);
|
|
315
315
|
}
|
|
@@ -322,7 +322,7 @@ var ToolRegistry = class extends RegistryAbstract {
|
|
|
322
322
|
* Produce unique, MCP-valid exported names.
|
|
323
323
|
* - Base (standardized) = metadata.name cased (snake/camel/kebab/dot)
|
|
324
324
|
* - If conflicting:
|
|
325
|
-
* - Locals keep bare base (unless >1 locals conflict
|
|
325
|
+
* - Locals keep bare base (unless >1 locals conflict \u2192 they get owner prefixes)
|
|
326
326
|
* - Children with same base get prefixed by providerId (or owner path)
|
|
327
327
|
*/
|
|
328
328
|
exportResolvedNames(opts) {
|
|
@@ -590,7 +590,7 @@ var ToolRegistry = class extends RegistryAbstract {
|
|
|
590
590
|
*
|
|
591
591
|
* Issue #407: we always advertise the `tools` capability so the MCP SDK
|
|
592
592
|
* accepts the always-registered `tools/list` handler (see
|
|
593
|
-
* `createMcpHandlers`
|
|
593
|
+
* `createMcpHandlers` \u2014 registering a handler without the matching
|
|
594
594
|
* capability throws `Server does not support tools (required for tools/list)`).
|
|
595
595
|
* `listChanged` still reflects whether anything is actually registered.
|
|
596
596
|
*/
|
|
@@ -76,7 +76,7 @@ var ToolUIRegistry = class {
|
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* Per-tool resource metadata for the `ui://widget/{tool}.html` content read.
|
|
79
|
-
* Returns `undefined` when nothing was configured
|
|
79
|
+
* Returns `undefined` when nothing was configured \u2014 the handler should
|
|
80
80
|
* omit `_meta` entirely in that case so MCP clients don't see an empty
|
|
81
81
|
* object.
|
|
82
82
|
*/
|
|
@@ -92,7 +92,7 @@ var LocalTransportAdapter = class {
|
|
|
92
92
|
/**
|
|
93
93
|
* Re-register the MCP server with the notification service.
|
|
94
94
|
* Called after resetForReinitialization() to restore the server mapping
|
|
95
|
-
* that was removed by terminateSession
|
|
95
|
+
* that was removed by terminateSession \u2192 unregisterServer.
|
|
96
96
|
*/
|
|
97
97
|
reregisterServer() {
|
|
98
98
|
if (this.server) {
|
|
@@ -232,7 +232,7 @@ var LocalTransportAdapter = class {
|
|
|
232
232
|
//
|
|
233
233
|
// Both are COPIED, not aliased. Tool code receives this object, and a
|
|
234
234
|
// nested mutation (`authInfo.claims.roles.push('admin')`) on a shared
|
|
235
|
-
// reference would rewrite the request's own verified authorization
|
|
235
|
+
// reference would rewrite the request's own verified authorization \u2014 which
|
|
236
236
|
// the job/workflow permission guard then reads.
|
|
237
237
|
scopes: Array.isArray(scopes) ? [...scopes] : [],
|
|
238
238
|
...claims ? { claims: structuredClone(claims) } : {},
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
// libs/sdk/src/transport/adapters/transport.streamable-http.adapter.ts
|
|
2
2
|
import { toJSONSchema } from "@frontmcp/lazy-zod";
|
|
3
|
-
import { ElicitationTimeoutError } from "../../errors/index.mjs";
|
|
3
|
+
import { ElicitationTimeoutError, InternalMcpError } from "../../errors/index.mjs";
|
|
4
4
|
import { createSessionScopedEventStore } from "../event-stores/session-scoped.event-store.mjs";
|
|
5
5
|
import { rpcRequest } from "../transport.error.mjs";
|
|
6
6
|
import { STATELESS_SESSION_ID } from "../transport.types.mjs";
|
|
7
|
-
import { RecreateableStreamableHTTPServerTransport } from "./streamable-http-transport.mjs";
|
|
8
7
|
import { LocalTransportAdapter } from "./transport.local.adapter.mjs";
|
|
8
|
+
var RecreateableTransport;
|
|
9
|
+
async function loadStreamableHttpTransport() {
|
|
10
|
+
RecreateableTransport ??= (await import("./streamable-http-transport.mjs")).RecreateableStreamableHTTPServerTransport;
|
|
11
|
+
}
|
|
9
12
|
var resolveSessionIdGenerator = (transportType, sessionId) => {
|
|
10
13
|
return transportType === "stateless-http" ? () => STATELESS_SESSION_ID : () => sessionId;
|
|
11
14
|
};
|
|
@@ -15,7 +18,12 @@ var TransportStreamableHttpAdapter = class extends LocalTransportAdapter {
|
|
|
15
18
|
const sharedEventStore = this.scope.eventStore;
|
|
16
19
|
const eventStore = sharedEventStore ? createSessionScopedEventStore(sharedEventStore, sessionId) : void 0;
|
|
17
20
|
const isStateless = this.key.type === "stateless-http";
|
|
18
|
-
|
|
21
|
+
if (!RecreateableTransport) {
|
|
22
|
+
throw new InternalMcpError(
|
|
23
|
+
"The Streamable HTTP transport was used before loadStreamableHttpTransport() loaded it"
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
return new RecreateableTransport({
|
|
19
27
|
sessionIdGenerator,
|
|
20
28
|
isStateless,
|
|
21
29
|
onsessionclosed: () => {
|
|
@@ -47,7 +55,7 @@ var TransportStreamableHttpAdapter = class extends LocalTransportAdapter {
|
|
|
47
55
|
});
|
|
48
56
|
await this.ready;
|
|
49
57
|
this.logger.verbose("[StreamableHttpAdapter] transport state before handleRequest", {
|
|
50
|
-
isRecreatable: this.transport instanceof
|
|
58
|
+
isRecreatable: RecreateableTransport !== void 0 && this.transport instanceof RecreateableTransport,
|
|
51
59
|
hasWebTransport: !!this.transport._webStandardTransport,
|
|
52
60
|
webTransportInitialized: this.transport._webStandardTransport?._initialized,
|
|
53
61
|
webTransportStarted: this.transport._webStandardTransport?._started,
|
|
@@ -224,5 +232,6 @@ var TransportStreamableHttpAdapter = class extends LocalTransportAdapter {
|
|
|
224
232
|
};
|
|
225
233
|
export {
|
|
226
234
|
TransportStreamableHttpAdapter,
|
|
235
|
+
loadStreamableHttpTransport,
|
|
227
236
|
resolveSessionIdGenerator
|
|
228
237
|
};
|
|
@@ -116,7 +116,7 @@ var RedisEventStore = class {
|
|
|
116
116
|
* rather than data.
|
|
117
117
|
*
|
|
118
118
|
* The stream-id half is NOT character-filtered. `xadd`/`xrange` take the key
|
|
119
|
-
* as an exact argument
|
|
119
|
+
* as an exact argument \u2014 Redis applies no glob matching there \u2014 and ioredis
|
|
120
120
|
* length-prefixes it, so no character is special. Filtering here would also
|
|
121
121
|
* make `storeEvent`, which accepts any `StreamId`, able to mint ids this
|
|
122
122
|
* function then refuses, silently breaking replay for that stream. Ownership
|
|
@@ -158,7 +158,7 @@ var McpStatelessClient = class {
|
|
|
158
158
|
* Poll a task handle to a terminal state, answering mid-flight input requests.
|
|
159
159
|
*
|
|
160
160
|
* Honours the server's `pollIntervalMs` hint rather than picking our own
|
|
161
|
-
* cadence
|
|
161
|
+
* cadence \u2014 the server knows how long its work takes.
|
|
162
162
|
*/
|
|
163
163
|
async awaitTask(task) {
|
|
164
164
|
const taskId = String(task["taskId"]);
|
|
@@ -23,7 +23,7 @@ var RequestNotificationSink = class {
|
|
|
23
23
|
/**
|
|
24
24
|
* Queue a log message.
|
|
25
25
|
*
|
|
26
|
-
* Dropped outright when the client did not set `logLevel`
|
|
26
|
+
* Dropped outright when the client did not set `logLevel` \u2014 the spec makes
|
|
27
27
|
* that a MUST NOT, not a preference.
|
|
28
28
|
*/
|
|
29
29
|
log(level, logger, data) {
|
|
@@ -4,6 +4,7 @@ import { createSessionStore } from "../auth/session/session-store.factory.mjs";
|
|
|
4
4
|
import { isDeploymentSessionId } from "../auth/session/utils/session-id.utils.mjs";
|
|
5
5
|
import { sessionIdPresentedBy } from "../common/utils/auth-info.utils.mjs";
|
|
6
6
|
import { InvalidTransportSessionError, SessionClaimConflictError } from "../errors/transport.errors.mjs";
|
|
7
|
+
import { loadStreamableHttpTransport } from "./adapters/transport.streamable-http.adapter.mjs";
|
|
7
8
|
import HandleMcp20260728Flow from "./flows/handle.mcp-20260728.flow.mjs";
|
|
8
9
|
import HandleSseFlow from "./flows/handle.sse.flow.mjs";
|
|
9
10
|
import HandleStatelessHttpFlow from "./flows/handle.stateless-http.flow.mjs";
|
|
@@ -50,7 +51,7 @@ var TransportService = class {
|
|
|
50
51
|
persistenceConfig;
|
|
51
52
|
/**
|
|
52
53
|
* Pending store configuration for async initialization. Either a Redis/Vercel KV
|
|
53
|
-
* shape or a `{ sqlite: ... }` shape
|
|
54
|
+
* shape or a `{ sqlite: ... }` shape \u2014 discriminated in `createSessionStore`.
|
|
54
55
|
*/
|
|
55
56
|
pendingStoreConfig;
|
|
56
57
|
/** Set when the configured backend is SQLite. Used for telemetry-only branching. */
|
|
@@ -71,6 +72,13 @@ var TransportService = class {
|
|
|
71
72
|
* Key: JSON-encoded {t: type, h: tokenHash, s: sessionId}, Value: Promise that resolves when creation completes
|
|
72
73
|
*/
|
|
73
74
|
creationMutex = /* @__PURE__ */ new Map();
|
|
75
|
+
// The Streamable HTTP transport class loads with the first session that uses it, so stdio and SSE servers never load it.
|
|
76
|
+
async newLocalTransporter(key, res, onDispose) {
|
|
77
|
+
if (key.type === "streamable-http" || key.type === "stateless-http") {
|
|
78
|
+
await loadStreamableHttpTransport();
|
|
79
|
+
}
|
|
80
|
+
return new LocalTransporter(this.scope, key, res, onDispose);
|
|
81
|
+
}
|
|
74
82
|
/**
|
|
75
83
|
* Get the default TTL for session persistence.
|
|
76
84
|
* Returns undefined if persistence is disabled or not configured.
|
|
@@ -278,7 +286,7 @@ var TransportService = class {
|
|
|
278
286
|
/** True when a backend (Redis / Vercel KV / SQLite) was wired at construction.
|
|
279
287
|
* Note: this reflects construction-time intent, not live connection state.
|
|
280
288
|
* A `false` here means no backend was configured at all; a `true` does NOT
|
|
281
|
-
* guarantee the store is currently reachable
|
|
289
|
+
* guarantee the store is currently reachable \u2014 use `pingSessionStore()` for
|
|
282
290
|
* that signal. */
|
|
283
291
|
isSessionStoreConfigured() {
|
|
284
292
|
return this.sessionStoreConfigured;
|
|
@@ -348,7 +356,7 @@ var TransportService = class {
|
|
|
348
356
|
* owns the session it presents. `undefined` means "serve it here": the session is local,
|
|
349
357
|
* unknown, owned by this node, or owned by a node that stopped (this node takes it over).
|
|
350
358
|
*
|
|
351
|
-
* Runs before authentication
|
|
359
|
+
* Runs before authentication \u2014 it only decides where the request is served; the owner
|
|
352
360
|
* authenticates it. Only session ids this deployment minted cost a Redis lookup.
|
|
353
361
|
*/
|
|
354
362
|
async findRemoteSessionOwner(request) {
|
|
@@ -659,8 +667,7 @@ var TransportService = class {
|
|
|
659
667
|
this.sessionHistory.set(historyKey, storedSession.createdAt);
|
|
660
668
|
const sessionStore = this.sessionStore;
|
|
661
669
|
const defaultTtlMs = this.getDefaultTtlMs();
|
|
662
|
-
const transporter =
|
|
663
|
-
this.scope,
|
|
670
|
+
const transporter = await this.newLocalTransporter(
|
|
664
671
|
key,
|
|
665
672
|
res,
|
|
666
673
|
() => this.onSessionTransportDisposed(key, sessionId, sessionStore)
|
|
@@ -720,8 +727,7 @@ var TransportService = class {
|
|
|
720
727
|
if (existing) return existing;
|
|
721
728
|
const sessionStore = this.sessionStore;
|
|
722
729
|
const defaultTtlMs = this.getDefaultTtlMs();
|
|
723
|
-
const transporter =
|
|
724
|
-
this.scope,
|
|
730
|
+
const transporter = await this.newLocalTransporter(
|
|
725
731
|
key,
|
|
726
732
|
res,
|
|
727
733
|
() => this.onSessionTransportDisposed(key, sessionId, sessionStore)
|
|
@@ -847,7 +853,7 @@ var TransportService = class {
|
|
|
847
853
|
const key = this.keyOf(type, "__anonymous__", STATELESS_SESSION_ID);
|
|
848
854
|
const existing = this.lookupLocal(key);
|
|
849
855
|
if (existing) return existing;
|
|
850
|
-
const transporter =
|
|
856
|
+
const transporter = await this.newLocalTransporter(key, res, () => {
|
|
851
857
|
this.evictLocal(key);
|
|
852
858
|
if (this.distributed && this.bus) {
|
|
853
859
|
this.bus.revoke(key).catch(() => void 0);
|
|
@@ -868,7 +874,7 @@ var TransportService = class {
|
|
|
868
874
|
const key = this.keyOf(type, token, STATELESS_SESSION_ID);
|
|
869
875
|
const existing = this.lookupLocal(key);
|
|
870
876
|
if (existing) return existing;
|
|
871
|
-
const transporter =
|
|
877
|
+
const transporter = await this.newLocalTransporter(key, res, () => {
|
|
872
878
|
this.evictLocal(key);
|
|
873
879
|
if (this.distributed && this.bus) {
|
|
874
880
|
this.bus.revoke(key).catch(() => void 0);
|
|
@@ -48,10 +48,10 @@ function buildHeaders(out, contentType) {
|
|
|
48
48
|
function renderHttpOutputToWebResponse(output) {
|
|
49
49
|
const out = output;
|
|
50
50
|
switch (out.kind) {
|
|
51
|
-
// Already a Web Response (the MCP execute stage on a worker)
|
|
51
|
+
// Already a Web Response (the MCP execute stage on a worker) \u2014 return verbatim.
|
|
52
52
|
case "web-response":
|
|
53
53
|
return out.response;
|
|
54
|
-
// "no response"
|
|
54
|
+
// "no response" \u2014 let the adapter fall through (404 / next middleware).
|
|
55
55
|
case "next":
|
|
56
56
|
case "consumed":
|
|
57
57
|
return void 0;
|
|
@@ -51,7 +51,7 @@ var EntryLineageIndex = class {
|
|
|
51
51
|
if (!this.lineages.has(row.instance)) this.lineages.set(row.instance, row.lineage);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
/** Owner lineage (root
|
|
54
|
+
/** Owner lineage (root \u2192 leaf) of an entry, or undefined when no row holds it. */
|
|
55
55
|
lineageOf(entry) {
|
|
56
56
|
return this.lineages.get(entry);
|
|
57
57
|
}
|
|
@@ -41,7 +41,7 @@ var GetWorkflowStatusTool = class extends ToolContext {
|
|
|
41
41
|
*
|
|
42
42
|
* A record carrying NEITHER identity is refused. Such a run cannot be
|
|
43
43
|
* attributed to anyone, and its inputs and results are exactly what this check
|
|
44
|
-
* exists to protect
|
|
44
|
+
* exists to protect \u2014 anyone holding the id would otherwise be able to read
|
|
45
45
|
* it. Internal callers that must read unattributed runs should go through the
|
|
46
46
|
* execution manager directly rather than this tool.
|
|
47
47
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow.inter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httpInputSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
2
|
-
request: import("
|
|
3
|
-
response: import("
|
|
2
|
+
request: import("zod").ZodCustom<Record<string, unknown>, Record<string, unknown>>;
|
|
3
|
+
response: import("zod").ZodCustom<Record<string, unknown>, Record<string, unknown>>;
|
|
4
4
|
next: import("@frontmcp/lazy-zod").ZodOptional<import("zod").ZodFunction<import("zod/v4/core").$ZodFunctionArgs, import("zod/v4/core").$ZodFunctionOut>>;
|
|
5
5
|
}, import("zod/v4/core").$strip>;
|
|
6
6
|
export declare const httpRequestInputSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
7
|
-
request: import("
|
|
7
|
+
request: import("zod").ZodCustom<Record<string, unknown>, Record<string, unknown>>;
|
|
8
8
|
}, import("zod/v4/core").$strip>;
|
|
9
9
|
//# sourceMappingURL=http-input.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-input.schema.d.ts","sourceRoot":"","sources":["../../../src/common/schemas/http-input.schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"http-input.schema.d.ts","sourceRoot":"","sources":["../../../src/common/schemas/http-input.schema.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,eAAe;;;;gCAI1B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;gCAEjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decide-request-intent.utils.d.ts","sourceRoot":"","sources":["../../../src/common/utils/decide-request-intent.utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAI7E,eAAO,MAAM,YAAY,kfAYvB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;gCAiBzB,CAAC;AAEH,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,KAAK,GACL,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,CAAC;AAEnB,MAAM,MAAM,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAAC;AAEnD,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAEzD,KAAK,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACzD,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,MAAO,SAAQ,mBAAmB;IACjD,qBAAqB,EAAE,OAAO,CAAC;CAChC;
|
|
1
|
+
{"version":3,"file":"decide-request-intent.utils.d.ts","sourceRoot":"","sources":["../../../src/common/utils/decide-request-intent.utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAI7E,eAAO,MAAM,YAAY,kfAYvB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;gCAiBzB,CAAC;AAEH,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,KAAK,GACL,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,CAAC;AAEnB,MAAM,MAAM,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAAC;AAEnD,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAEzD,KAAK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