@frontmcp/sdk 1.10.15 → 1.10.16
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/agent/flows/call-agent.flow.d.ts +1 -2
- package/agent/flows/call-agent.flow.d.ts.map +1 -1
- package/agent/hooks/agent.hooks.d.ts +4 -4
- package/agent/hooks/agent.hooks.d.ts.map +1 -1
- package/browser/agent/flows/call-agent.flow.mjs +2 -1
- package/browser/common/decorators/front-mcp.decorator.mjs +7 -0
- package/browser/common/decorators/hook.decorator.mjs +9 -1
- package/browser/common/decorators/index.mjs +1 -1
- package/browser/common/decorators/provider.decorator.mjs +1 -1
- package/browser/common/entries/tool.entry.mjs +52 -24
- package/browser/common/index.mjs +2 -2
- package/browser/common/interfaces/flow.interface.mjs +36 -0
- package/browser/common/interfaces/internal/flow.utils.mjs +3 -0
- package/browser/common/metadata/index.mjs +1 -1
- package/browser/common/metadata/output-policy.mjs +57 -11
- package/browser/common/metadata/provider.metadata.mjs +1 -1
- package/browser/common/schemas/annotated-class.schema.mjs +1 -1
- package/browser/common/types/options/skills-http/schema.mjs +2 -1
- package/browser/elicitation/helpers/extend-output-schema.mjs +3 -1
- package/browser/errors/index.mjs +9 -1
- package/browser/errors/transport.errors.mjs +31 -0
- package/browser/flows/flow.instance.mjs +103 -14
- package/browser/flows/flow.stages.mjs +23 -1
- package/browser/front-mcp/front-mcp.mjs +29 -30
- package/browser/front-mcp/shutdown-signals.mjs +2 -0
- package/browser/hooks/entry-class-hooks.mjs +10 -0
- package/browser/hooks/hook.registry.mjs +8 -8
- package/browser/index.cjs +1484 -1060
- package/browser/index.mjs +2 -2
- package/browser/job/flows/execute-job.flow.mjs +2 -1
- package/browser/prompt/flows/get-prompt.flow.mjs +6 -1
- package/browser/provider/provider.utils.mjs +5 -2
- package/browser/resource/flows/read-resource.flow.mjs +6 -1
- package/browser/scope/scope.instance.mjs +2 -0
- package/browser/server/security/resolve-allowed-hosts.mjs +32 -0
- package/browser/server/security/security-audit.mjs +3 -3
- package/browser/skill/sep-2640/sep-2640.per-skill.mjs +13 -11
- package/browser/skill/skill-instructions.helper.mjs +23 -8
- package/browser/skill/skill-scope.helper.mjs +2 -1
- package/browser/tool/flows/call-tool.flow.mjs +33 -2
- package/browser/tool/flows/tools-list.flow.mjs +9 -10
- package/browser/tool/tool-output-policy.mjs +24 -0
- package/browser/tool/tool.instance.mjs +4 -4
- package/browser/tool/tool.utils.mjs +49 -8
- package/common/decorators/front-mcp.decorator.d.ts.map +1 -1
- package/common/decorators/hook.decorator.d.ts +21 -10
- package/common/decorators/hook.decorator.d.ts.map +1 -1
- package/common/decorators/provider.decorator.d.ts +1 -1
- package/common/decorators/provider.decorator.d.ts.map +1 -1
- package/common/decorators/tool.decorator.d.ts +1 -1
- package/common/decorators/tool.decorator.d.ts.map +1 -1
- package/common/entries/tool.entry.d.ts +24 -11
- package/common/entries/tool.entry.d.ts.map +1 -1
- package/common/interfaces/flow.interface.d.ts +30 -1
- package/common/interfaces/flow.interface.d.ts.map +1 -1
- package/common/interfaces/internal/flow.utils.d.ts.map +1 -1
- package/common/metadata/agent.metadata.d.ts +3 -3
- package/common/metadata/app.metadata.d.ts +12 -6
- package/common/metadata/app.metadata.d.ts.map +1 -1
- package/common/metadata/front-mcp.metadata.d.ts +141 -70
- package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
- package/common/metadata/hook.metadata.d.ts +3 -1
- package/common/metadata/hook.metadata.d.ts.map +1 -1
- package/common/metadata/output-policy.d.ts +32 -0
- package/common/metadata/output-policy.d.ts.map +1 -1
- package/common/metadata/plugin.metadata.d.ts +4 -4
- package/common/metadata/provider.metadata.d.ts +1 -1
- package/common/metadata/tool.metadata.d.ts +10 -3
- package/common/metadata/tool.metadata.d.ts.map +1 -1
- package/common/metadata/ui-serving-mode.d.ts +1 -1
- package/common/schemas/annotated-class.schema.d.ts +5 -5
- package/common/types/options/http/interfaces.d.ts +6 -2
- package/common/types/options/http/interfaces.d.ts.map +1 -1
- package/common/types/options/skills-http/index.d.ts +1 -1
- package/common/types/options/skills-http/index.d.ts.map +1 -1
- package/common/types/options/skills-http/interfaces.d.ts +27 -5
- package/common/types/options/skills-http/interfaces.d.ts.map +1 -1
- package/common/types/options/skills-http/schema.d.ts +8 -2
- package/common/types/options/skills-http/schema.d.ts.map +1 -1
- package/elicitation/helpers/extend-output-schema.d.ts.map +1 -1
- package/elicitation/hooks/elicitation.hooks.d.ts +10 -8
- package/elicitation/hooks/elicitation.hooks.d.ts.map +1 -1
- package/errors/index.d.ts +1 -1
- package/errors/index.d.ts.map +1 -1
- package/errors/transport.errors.d.ts +19 -0
- package/errors/transport.errors.d.ts.map +1 -1
- package/esm/index.mjs +31 -24
- package/flows/flow.instance.d.ts +10 -0
- package/flows/flow.instance.d.ts.map +1 -1
- package/flows/flow.stages.d.ts +4 -0
- package/flows/flow.stages.d.ts.map +1 -1
- package/front-mcp/front-mcp.d.ts +4 -0
- package/front-mcp/front-mcp.d.ts.map +1 -1
- package/front-mcp/shutdown-signals.d.ts +2 -0
- package/front-mcp/shutdown-signals.d.ts.map +1 -1
- package/hooks/entry-class-hooks.d.ts +4 -0
- package/hooks/entry-class-hooks.d.ts.map +1 -1
- package/hooks/hook.registry.d.ts +7 -7
- package/hooks/hook.registry.d.ts.map +1 -1
- package/index.d.ts +85 -68
- package/index.d.ts.map +1 -1
- package/index.js +37 -30
- package/job/flows/execute-job.flow.d.ts +1 -2
- package/job/flows/execute-job.flow.d.ts.map +1 -1
- package/package.json +10 -10
- package/prompt/flows/get-prompt.flow.d.ts +3 -2
- package/prompt/flows/get-prompt.flow.d.ts.map +1 -1
- package/provider/provider.utils.d.ts.map +1 -1
- package/resource/flows/read-resource.flow.d.ts +3 -2
- package/resource/flows/read-resource.flow.d.ts.map +1 -1
- package/scope/scope.instance.d.ts.map +1 -1
- package/server/adapters/express.host.adapter.d.ts +2 -2
- package/server/adapters/express.host.adapter.d.ts.map +1 -1
- package/server/security/resolve-allowed-hosts.d.ts +16 -0
- package/server/security/resolve-allowed-hosts.d.ts.map +1 -1
- package/server/security/security-audit.d.ts.map +1 -1
- package/server/security/unix-socket-guard.d.ts +12 -0
- package/server/security/unix-socket-guard.d.ts.map +1 -0
- package/skill/sep-2640/sep-2640.per-skill.d.ts +7 -5
- package/skill/sep-2640/sep-2640.per-skill.d.ts.map +1 -1
- package/skill/skill-instructions.helper.d.ts +15 -11
- package/skill/skill-instructions.helper.d.ts.map +1 -1
- package/skill/skill-scope.helper.d.ts.map +1 -1
- package/tool/flows/call-tool.flow.d.ts +7 -2
- package/tool/flows/call-tool.flow.d.ts.map +1 -1
- package/tool/flows/tools-list.flow.d.ts.map +1 -1
- package/tool/tool-output-policy.d.ts +33 -0
- package/tool/tool-output-policy.d.ts.map +1 -0
- package/tool/tool.instance.d.ts +3 -3
- package/tool/tool.instance.d.ts.map +1 -1
- package/tool/tool.utils.d.ts +2 -2
- package/tool/tool.utils.d.ts.map +1 -1
- package/transport/mcp-handlers/index.d.ts +549 -549
- package/transport/mcp-handlers/index.d.ts.map +1 -1
|
@@ -3,7 +3,6 @@ import { z } from '@frontmcp/lazy-zod';
|
|
|
3
3
|
import { FlowBase, type FlowOutputOf, type FlowRunOptions, type ScopeEntry, type Token } from '../../common';
|
|
4
4
|
import { JobEntry } from '../../common/entries/job.entry';
|
|
5
5
|
import { JobContext } from '../../common/interfaces/job.interface';
|
|
6
|
-
import { type EntryClassHooksJoin } from '../../hooks/entry-class-hooks';
|
|
7
6
|
import { type JobAttemptWorkflowStep, type JobRunRecorder } from '../job-attempt';
|
|
8
7
|
declare const inputSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
9
8
|
job: import("zod").ZodCustom<JobEntry<Readonly<{
|
|
@@ -72,7 +71,7 @@ declare global {
|
|
|
72
71
|
}
|
|
73
72
|
declare const name: "jobs:execute-job";
|
|
74
73
|
/** Where the hooks a job class declares join a run: instance methods run on the instance 'createJobContext' builds. */
|
|
75
|
-
export declare const jobClassHooksJoin: EntryClassHooksJoin;
|
|
74
|
+
export declare const jobClassHooksJoin: import("../../hooks/entry-class-hooks").EntryClassHooksJoin;
|
|
76
75
|
/**
|
|
77
76
|
* Runs one attempt of a job (#700). Every way a job runs goes through it: `execute_job`, inline or in
|
|
78
77
|
* the background, each retry, each workflow step, and any in-process caller of the job execution
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-job.flow.d.ts","sourceRoot":"","sources":["../../../src/job/flows/execute-job.flow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAEvC,OAAO,EAEL,QAAQ,EAGR,KAAK,YAAY,EAEjB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,KAAK,EACX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"execute-job.flow.d.ts","sourceRoot":"","sources":["../../../src/job/flows/execute-job.flow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAEvC,OAAO,EAEL,QAAQ,EAGR,KAAK,YAAY,EAEjB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,KAAK,EACX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAKnE,OAAO,EAKL,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAkBxB,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;gCAef,CAAC;AAEH,QAAA,MAAM,YAAY;;;gCAKhB,CAAC;AAEH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAmBf,CAAC;AAEH,QAAA,MAAM,IAAI;;;;CAI2B,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,kBAAkB,EAAE,cAAc,CAChC,cAAc,EACd,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,YAAY,EACnB,OAAO,WAAW,CACnB,CAAC;KACH;CACF;AAED,QAAA,MAAM,IAAI,oBAAmB,CAAC;AAE9B,uHAAuH;AACvH,eAAO,MAAM,iBAAiB,6DAA8E,CAAC;AAS7G;;;;;GAKG;AAQH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IAC/D;;;OAGG;WACa,kBAAkB,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS;IAM5F,kFAAkF;WAClE,qBAAqB,CAAC,QAAQ,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS;IAI3E,MAAM,wCAA4C;IAG5C,UAAU;IAOhB;;;;OAIG;IAEG,qBAAqB;IAerB,aAAa;IAKnB;;;;OAIG;IAEG,gBAAgB;IAsBtB;;;OAGG;IAEG,OAAO;IAeb,0GAA0G;IAEpG,cAAc;IAOpB;;;;;;;OAOG;IAEG,cAAc;IAsBd,QAAQ;IAMd;;;OAGG;IACM,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,OAAO,IAAI,CAAC;IAMlD,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,cAAc;CAKvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/sdk",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.16",
|
|
4
4
|
"description": "The TypeScript framework for MCP servers: typed tools with Zod, dependency injection, auth, testing, agents and jobs, and builds for Node, Vercel, AWS Lambda and Cloudflare Workers.",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"homepage": "https://frontmcp.dev",
|
|
@@ -117,8 +117,8 @@
|
|
|
117
117
|
"peerDependencies": {
|
|
118
118
|
"@anthropic-ai/sdk": "^0.30.0 || ^0.78.0",
|
|
119
119
|
"@enclave-vm/core": "^2.16.0",
|
|
120
|
-
"@frontmcp/observability": "1.10.
|
|
121
|
-
"@frontmcp/storage-sqlite": "1.10.
|
|
120
|
+
"@frontmcp/observability": "1.10.16",
|
|
121
|
+
"@frontmcp/storage-sqlite": "1.10.16",
|
|
122
122
|
"@opentelemetry/api": "^1.9.0",
|
|
123
123
|
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
124
124
|
"content-type": "^1.0.5",
|
|
@@ -151,13 +151,13 @@
|
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
"dependencies": {
|
|
154
|
-
"@frontmcp/auth": "1.10.
|
|
155
|
-
"@frontmcp/di": "1.10.
|
|
156
|
-
"@frontmcp/guard": "1.10.
|
|
157
|
-
"@frontmcp/lazy-zod": "1.10.
|
|
158
|
-
"@frontmcp/protocol": "1.10.
|
|
159
|
-
"@frontmcp/uipack": "1.10.
|
|
160
|
-
"@frontmcp/utils": "1.10.
|
|
154
|
+
"@frontmcp/auth": "1.10.16",
|
|
155
|
+
"@frontmcp/di": "1.10.16",
|
|
156
|
+
"@frontmcp/guard": "1.10.16",
|
|
157
|
+
"@frontmcp/lazy-zod": "1.10.16",
|
|
158
|
+
"@frontmcp/protocol": "1.10.16",
|
|
159
|
+
"@frontmcp/uipack": "1.10.16",
|
|
160
|
+
"@frontmcp/utils": "1.10.16",
|
|
161
161
|
"@types/cors": "^2.8.17",
|
|
162
162
|
"ioredis": "^5.8.0",
|
|
163
163
|
"jose": "^6.1.3",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from '@frontmcp/lazy-zod';
|
|
2
2
|
import { type AuthInfo } from '@frontmcp/protocol';
|
|
3
3
|
import { FlowBase, type FlowRunOptions, type PromptContext, type PromptEntry, type ScopeEntry, type Token } from '../../common';
|
|
4
|
-
import { type EntryClassHooksJoin } from '../../hooks/entry-class-hooks';
|
|
5
4
|
declare const inputSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
6
5
|
request: import("@frontmcp/lazy-zod").ZodObject<{
|
|
7
6
|
method: import("@frontmcp/lazy-zod").ZodLiteral<"prompts/get">;
|
|
@@ -247,12 +246,14 @@ declare global {
|
|
|
247
246
|
}
|
|
248
247
|
declare const name: "prompts:get-prompt";
|
|
249
248
|
/** Where the hooks a prompt class declares join a run: they run on the instance 'createPromptContext' builds. */
|
|
250
|
-
export declare const promptClassHooksJoin: EntryClassHooksJoin;
|
|
249
|
+
export declare const promptClassHooksJoin: import("../../hooks/entry-class-hooks").EntryClassHooksJoin;
|
|
251
250
|
export default class GetPromptFlow extends FlowBase<typeof name> {
|
|
252
251
|
static resolveHookOwnerId(rawInput: unknown, scope: ScopeEntry): Promise<string | undefined>;
|
|
253
252
|
/** The class of the prompt the request names, whose `static` hooks run from `parseInput` on (#701). */
|
|
254
253
|
static resolveHookEntryClass(rawInput: unknown, scope: ScopeEntry): Token | undefined;
|
|
255
254
|
logger: import("../../common").FrontMcpLogger;
|
|
255
|
+
/** The prompt's name: the one `findPrompt` resolved, else the name the request asks for. */
|
|
256
|
+
get promptName(): string;
|
|
256
257
|
parseInput(): Promise<void>;
|
|
257
258
|
/**
|
|
258
259
|
* Ensure remote app capabilities are loaded before looking up prompts.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-prompt.flow.d.ts","sourceRoot":"","sources":["../../../src/prompt/flows/get-prompt.flow.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAiD,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAIlG,OAAO,EAGL,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AW,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,YAAY,GAAG,WAAW,KAAK,KAAK,EAAE,GACtE,KAAK,EAAE,CAaT"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from '@frontmcp/lazy-zod';
|
|
2
2
|
import { type AuthInfo } from '@frontmcp/protocol';
|
|
3
3
|
import { FlowBase, type FlowRunOptions, type ResourceContext, type ResourceEntry, type ScopeEntry, type Token } from '../../common';
|
|
4
|
-
import { type EntryClassHooksJoin } from '../../hooks/entry-class-hooks';
|
|
5
4
|
declare const inputSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
6
5
|
request: import("@frontmcp/lazy-zod").ZodObject<{
|
|
7
6
|
method: import("@frontmcp/lazy-zod").ZodLiteral<"resources/read">;
|
|
@@ -100,12 +99,14 @@ declare global {
|
|
|
100
99
|
}
|
|
101
100
|
declare const name: "resources:read-resource";
|
|
102
101
|
/** Where the hooks a resource class declares join a run: they run on the instance 'createResourceContext' builds. */
|
|
103
|
-
export declare const resourceClassHooksJoin: EntryClassHooksJoin;
|
|
102
|
+
export declare const resourceClassHooksJoin: import("../../hooks/entry-class-hooks").EntryClassHooksJoin;
|
|
104
103
|
export default class ReadResourceFlow extends FlowBase<typeof name> {
|
|
105
104
|
static resolveHookOwnerId(rawInput: unknown, scope: ScopeEntry): Promise<string | undefined>;
|
|
106
105
|
/** The class of the resource the URI matches, whose `static` hooks run from `parseInput` on (#701). */
|
|
107
106
|
static resolveHookEntryClass(rawInput: unknown, scope: ScopeEntry): Token | undefined;
|
|
108
107
|
logger: import("../../common").FrontMcpLogger;
|
|
108
|
+
/** The URI the read asks for. */
|
|
109
|
+
get uri(): string;
|
|
109
110
|
parseInput(): Promise<void>;
|
|
110
111
|
/**
|
|
111
112
|
* Ensure remote app capabilities are loaded before looking up resources.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-resource.flow.d.ts","sourceRoot":"","sources":["../../../src/resource/flows/read-resource.flow.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAuD,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAIxG,OAAO,EAEL,QAAQ,EAIR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,KAAK,EACX,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"read-resource.flow.d.ts","sourceRoot":"","sources":["../../../src/resource/flows/read-resource.flow.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAuD,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAIxG,OAAO,EAEL,QAAQ,EAIR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,KAAK,EACX,MAAM,cAAc,CAAC;AAkBtB,QAAA,MAAM,WAAW;;;;;;;;;;;;;;gCAIf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;gCAA2B,CAAC;AAE9C,QAAA,MAAM,WAAW;;;;cAKiB,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;;cAG9B,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;qBAEjB,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCActD,CAAC;AAEH,QAAA,MAAM,IAAI;;;;CAI2B,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,yBAAyB,EAAE,cAAc,CACvC,gBAAgB,EAChB,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,YAAY,EACnB,OAAO,WAAW,CACnB,CAAC;KACH;CACF;AAED,QAAA,MAAM,IAAI,EAAG,yBAAkC,CAAC;AAE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I,CAAC,GACtB,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;IAI1C;;;;;;OAMG;IACG,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;IAIvE,gBAAgB,CAAC,IAAI,SAAS,QAAQ,EAC1C,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,EACxB,IAAI,CAAC,EAAE,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,GACtB,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAQ9B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;YAeb,kBAAkB;IAchC;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAoB/B,2FAA2F;YAC7E,gBAAgB;IAW9B;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAO/B"}
|
|
@@ -67,7 +67,8 @@ export declare class ExpressHostAdapter extends HostServerAdapter {
|
|
|
67
67
|
*
|
|
68
68
|
* ON by default since v1.7.2 (BC-035). `allowedHosts` falls back to the names
|
|
69
69
|
* this process actually answers to — the loopback aliases with and without
|
|
70
|
-
* the bound port, the bound NIC address, and the configured issuer host.
|
|
70
|
+
* the bound port, the bound NIC address, and the configured issuer host. On a
|
|
71
|
+
* loopback bind `allowedOrigins` falls back to its own origins and the CORS list.
|
|
71
72
|
*
|
|
72
73
|
* Escape hatches, in precedence order: explicit
|
|
73
74
|
* `security.dnsRebindingProtection.allowedHosts`, the
|
|
@@ -99,6 +100,5 @@ export declare class ExpressHostAdapter extends HostServerAdapter {
|
|
|
99
100
|
* flight `drainMs` to finish before closing what is left (SSE streams never finish) (#712).
|
|
100
101
|
*/
|
|
101
102
|
stop(drainMs?: number): Promise<void>;
|
|
102
|
-
private cleanupStaleSocket;
|
|
103
103
|
}
|
|
104
104
|
//# sourceMappingURL=express.host.adapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"express.host.adapter.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/express.host.adapter.ts"],"names":[],"mappings":"AAIA,OAAO,OAAO,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"express.host.adapter.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/express.host.adapter.ts"],"names":[],"mappings":"AAIA,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,UAAU,EAEf,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAoB1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,QAAQ,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,4GAA4G;IAC5G,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAE3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAE3B;;;OAGG;IACH,eAAe,CAAC,EAAE,sBAAsB,CAAC;IAEzC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAElC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,qBAAa,kBAAmB,SAAQ,iBAAiB;IACvD,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,UAAU,CAAC,CAAc;IACjC,iFAAiF;IACjF,OAAO,CAAC,cAAc,CAAC,CAAoD;IAC3E,6EAA6E;IAC7E,OAAO,CAAC,oBAAoB,CAAC,CAGsC;gBAEvD,OAAO,CAAC,EAAE,yBAAyB;IAgG/C;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,qBAAqB;IA+E7B;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IAMnC,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB;IAI7E,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB;IAInE,OAAO,CAAC,eAAe;IASvB;;;;OAIG;IACH,OAAO,IAAI,IAAI;IAMf;;;OAGG;IACH,UAAU,IAAI,OAAO,CAAC,WAAW;IAK3B,KAAK,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;IAkDnE;;;OAGG;IACY,IAAI,CAAC,OAAO,SAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;CAa9D"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* is right without configuration. It is derived from what the server actually
|
|
7
7
|
* binds: the names a client can legitimately use to reach *this* process.
|
|
8
8
|
*/
|
|
9
|
+
import type { CorsOptions } from '../../common/types/options/http/interfaces';
|
|
9
10
|
export interface DeriveAllowedHostsInput {
|
|
10
11
|
/** Resolved bind address (e.g. '127.0.0.1', '0.0.0.0', '::'). */
|
|
11
12
|
bindAddress?: string;
|
|
@@ -47,6 +48,21 @@ export declare function isRoutableBind(address: string | undefined): boolean;
|
|
|
47
48
|
* enforce — see {@link shouldEnforceDerivedHosts}.
|
|
48
49
|
*/
|
|
49
50
|
export declare function deriveAllowedHosts(input: DeriveAllowedHostsInput): string[];
|
|
51
|
+
/** The origins an explicit CORS config admits, or `undefined` when it admits any origin. */
|
|
52
|
+
export declare function corsAllowedOrigins(cors: CorsOptions | false | undefined): string[] | undefined;
|
|
53
|
+
export interface DeriveAllowedOriginsInput {
|
|
54
|
+
/** Listening TCP port. */
|
|
55
|
+
port?: number;
|
|
56
|
+
/** Configured issuer / public URL; its origin is the server's own. */
|
|
57
|
+
issuer?: string;
|
|
58
|
+
/** Origins the CORS config admits. */
|
|
59
|
+
extraOrigins?: string[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Derive the `Origin` values a loopback-bound server accepts: its own pages under every loopback
|
|
63
|
+
* spelling, its issuer, and the origins CORS admits. A request with no `Origin` is never checked.
|
|
64
|
+
*/
|
|
65
|
+
export declare function deriveAllowedOrigins(input: DeriveAllowedOriginsInput): string[];
|
|
50
66
|
/**
|
|
51
67
|
* Whether a DERIVED (not operator-supplied) host list may be enforced.
|
|
52
68
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-allowed-hosts.d.ts","sourceRoot":"","sources":["../../../src/server/security/resolve-allowed-hosts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"resolve-allowed-hosts.d.ts","sourceRoot":"","sources":["../../../src/server/security/resolve-allowed-hosts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAK9E,MAAM,WAAW,uBAAuB;IACtC,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAsBD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAWtE;AAiBD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,SA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AM,EAAE,CAAC;YACxB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;SAC3B,CAAC;KACH,CAAC;IACF,gEAAgE;IAChE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,GAAG,eAAe,EAAE,CAgG3G;
|
|
1
|
+
{"version":3,"file":"security-audit.d.ts","sourceRoot":"","sources":["../../../src/server/security/security-audit.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIhD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,sFAAsF;IACtF,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC;IAC3B,iDAAiD;IACjD,QAAQ,CAAC,EAAE;QACT,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,WAAW,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,MAAM,CAAC;QAC1C,sBAAsB,CAAC,EAAE;YACvB,OAAO,CAAC,EAAE,OAAO,CAAC;YAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;YACxB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;SAC3B,CAAC;KACH,CAAC;IACF,gEAAgE;IAChE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,GAAG,eAAe,EAAE,CAgG3G;AAmED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EAAE,EAC3B,MAAM,EAAE;IACN,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B,GACA,IAAI,CAeN;AAYD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,mBAAmB,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAkC9G"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as http from 'node:http';
|
|
2
|
+
/** A win32 socket path names a named pipe, which has no file mode. */
|
|
3
|
+
export declare function hasSocketFileMode(): boolean;
|
|
4
|
+
/** Refuse a socket another user could replace through its directory or any above it, or reach before it is 0600. */
|
|
5
|
+
export declare function assertSafeSocketDirectory(socketPath: string): Promise<void>;
|
|
6
|
+
/** Remove a socket a crashed server left behind, and refuse anything else at the path. */
|
|
7
|
+
export declare function clearStaleSocket(socketPath: string): Promise<void>;
|
|
8
|
+
/** Listen with an owner-only umask, so the socket is never reachable by others, even briefly. */
|
|
9
|
+
export declare function listenOwnerOnly(server: http.Server, socketPath: string, onListening: () => void): void;
|
|
10
|
+
/** Set the socket to 0600 and check that it took. */
|
|
11
|
+
export declare function enforceOwnerOnly(socketPath: string): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=unix-socket-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unix-socket-guard.d.ts","sourceRoot":"","sources":["../../../src/server/security/unix-socket-guard.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,IAAI,MAAM,WAAW,CAAC;AAqBvC,sEAAsE;AACtE,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAMD,oHAAoH;AACpH,wBAAsB,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAcjF;AAqCD,0FAA0F;AAC1F,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAexE;AAED,iGAAiG;AACjG,wBAAgB,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,IAAI,GAAG,IAAI,CAOtG;AAUD,qDAAqD;AACrD,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQxE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type FrontMcpLogger, type ResourceFunctionRecord, type ScopeEntry, type SkillEntry } from '../../common';
|
|
1
|
+
import { type FrontMcpLogger, type ResourceFunctionRecord, type ScopeEntry, type SkillEntry, type SkillResourceAnnotations } from '../../common';
|
|
2
2
|
import type ResourceRegistry from '../../resource/resource.registry';
|
|
3
3
|
import type { SkillRegistryInterface } from '../skill.registry';
|
|
4
4
|
/**
|
|
@@ -9,9 +9,9 @@ import type { SkillRegistryInterface } from '../skill.registry';
|
|
|
9
9
|
* - `name` = skill's frontmatter name
|
|
10
10
|
* - `description` = skill's frontmatter description (what a `build()` override returns, once loaded)
|
|
11
11
|
* - `mimeType` = `text/markdown`
|
|
12
|
-
* - `annotations.audience` = `["assistant"]`
|
|
13
|
-
* - `annotations.priority` = 0.8 (the SEP-recommended SKILL.md priority)
|
|
14
|
-
* - `annotations.lastModified` (when supplied — populated for file-backed skills)
|
|
12
|
+
* - `annotations.audience` = `["assistant"]`, unless `resourceAnnotations` is `'off'`
|
|
13
|
+
* - `annotations.priority` = 0.8 (the SEP-recommended SKILL.md priority), only when `resourceAnnotations` is `'full'`
|
|
14
|
+
* - `annotations.lastModified` (when supplied — populated for file-backed skills), unless `resourceAnnotations` is `'off'`
|
|
15
15
|
* - `_meta.io.modelcontextprotocol.skills/path` = the skill's `<skill-path>`
|
|
16
16
|
*
|
|
17
17
|
* The function is bound to the scope so `resources/read` invocation
|
|
@@ -19,11 +19,12 @@ import type { SkillRegistryInterface } from '../skill.registry';
|
|
|
19
19
|
*/
|
|
20
20
|
export declare function buildPerSkillResourceRecord(scope: ScopeEntry, skill: SkillEntry, opts?: {
|
|
21
21
|
lastModified?: string;
|
|
22
|
+
resourceAnnotations?: SkillResourceAnnotations;
|
|
22
23
|
}): ResourceFunctionRecord;
|
|
23
24
|
/**
|
|
24
25
|
* Register one concrete `Resource` per MCP-visible skill so
|
|
25
26
|
* `resources/list` returns SEP-conformant entries (frontmatter-derived
|
|
26
|
-
* `name`/`description`,
|
|
27
|
+
* `name`/`description`, and the annotations `resourceAnnotations` selects).
|
|
27
28
|
*
|
|
28
29
|
* This is in addition to — not a replacement for — the SKILL.md template
|
|
29
30
|
* (`Sep2640SkillMdResource`). Hosts may discover skills either via
|
|
@@ -38,5 +39,6 @@ export declare function registerPerSkillResources(options: {
|
|
|
38
39
|
resourceRegistry: ResourceRegistry;
|
|
39
40
|
logger: FrontMcpLogger;
|
|
40
41
|
resolveLastModified?: (skill: SkillEntry) => Promise<string | undefined>;
|
|
42
|
+
resourceAnnotations?: SkillResourceAnnotations;
|
|
41
43
|
}): Promise<void>;
|
|
42
44
|
//# sourceMappingURL=sep-2640.per-skill.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sep-2640.per-skill.d.ts","sourceRoot":"","sources":["../../../src/skill/sep-2640/sep-2640.per-skill.ts"],"names":[],"mappings":"AAwBA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAE3B,KAAK,UAAU,EACf,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"sep-2640.per-skill.d.ts","sourceRoot":"","sources":["../../../src/skill/sep-2640/sep-2640.per-skill.ts"],"names":[],"mappings":"AAwBA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAE3B,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,wBAAwB,EAC9B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,gBAAgB,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAsBhE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,UAAU,EACjB,IAAI,GAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,mBAAmB,CAAC,EAAE,wBAAwB,CAAA;CAAO,GACnF,sBAAsB,CA6CxB;AAcD;;;;;;;;;;;GAWG;AACH,wBAAsB,yBAAyB,CAAC,OAAO,EAAE;IACvD,KAAK,EAAE,UAAU,CAAC;IAClB,aAAa,EAAE,IAAI,CAAC,sBAAsB,EAAE,WAAW,GAAG,WAAW,CAAC,CAAC;IACvE,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,MAAM,EAAE,cAAc,CAAC;IACvB,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACzE,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;CAChD,GAAG,OAAO,CAAC,IAAI,CAAC,CAmDhB"}
|
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
* - The `initialize` response's `instructions` field is server-side prompt
|
|
7
7
|
* text that clients usually inject verbatim into the model context. Pushing
|
|
8
8
|
* every skill's full SKILL.md body would balloon every initialize response
|
|
9
|
-
* and burn token budget on tool calls. Instead,
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* `
|
|
9
|
+
* and burn token budget on tool calls. Instead, the default `'compact'`
|
|
10
|
+
* policy ships one line with the skill count, and `'append'`, `'prepend'`
|
|
11
|
+
* and `'replace'` a bounded catalog summary (`**name**: description`). Both
|
|
12
|
+
* point to where the full content is served: the SEP-2640
|
|
13
|
+
* `skill://index.json` resource, or the `skills/search` and `skills/load`
|
|
14
|
+
* MCP extension methods when `skillsConfig.mcpResources` is false and no
|
|
15
|
+
* `skill://` resource exists.
|
|
14
16
|
* - Resolution is sync — the registry already holds metadata at boot. The
|
|
15
17
|
* per-skill `instructions` markdown body stays lazy.
|
|
16
18
|
* - Off / replace policies short-circuit before we touch the registry, so a
|
|
@@ -21,12 +23,13 @@
|
|
|
21
23
|
* after the server boots are reflected in subsequent reconnects without a
|
|
22
24
|
* restart.
|
|
23
25
|
* - Transports compose it per caller with {@link composeCallerInstructions}:
|
|
24
|
-
* the catalog and the SEP-2640 hints only
|
|
25
|
-
* and the `skills:filter` flow let that caller
|
|
26
|
+
* the compact line, the catalog and the SEP-2640 hints only count or name
|
|
27
|
+
* skills the skill authorities and the `skills:filter` flow let that caller
|
|
28
|
+
* see, like `skills/list`.
|
|
26
29
|
*/
|
|
27
30
|
import type { ScopeEntry, SkillEntry } from '../common';
|
|
28
31
|
import type { SkillRegistryInterface } from './skill.registry';
|
|
29
|
-
export type InjectInstructionsPolicy = 'off' | 'append' | 'prepend' | 'replace';
|
|
32
|
+
export type InjectInstructionsPolicy = 'off' | 'compact' | 'append' | 'prepend' | 'replace';
|
|
30
33
|
interface ComposeOptions {
|
|
31
34
|
/** User-provided server instructions from `@FrontMcp({ instructions })`. */
|
|
32
35
|
userInstructions?: string;
|
|
@@ -110,7 +113,8 @@ export declare function buildSkillsCatalogSummary(skillRegistry: SkillRegistryIn
|
|
|
110
113
|
*
|
|
111
114
|
* Policy semantics:
|
|
112
115
|
* - `'off'`: skips the skill catalog; user + channel hints are still emitted.
|
|
113
|
-
* - `'
|
|
116
|
+
* - `'compact'` (default): user + channel + one line counting the skills, no line without skills.
|
|
117
|
+
* - `'append'`: user + channel + catalog, in that order.
|
|
114
118
|
* - `'prepend'`: catalog + channel + user.
|
|
115
119
|
* - `'replace'`: only the user-supplied instructions are emitted. **Falls
|
|
116
120
|
* back to `'append'` semantics when `userInstructions` is empty/undefined**
|
|
@@ -151,9 +155,9 @@ export interface CallerInstructionsOptions {
|
|
|
151
155
|
}
|
|
152
156
|
/**
|
|
153
157
|
* Compose the `initialize` instructions for one caller: server instructions, channel hints and the
|
|
154
|
-
* skill catalog (plus the SEP-2640 hints when asked), per `skillsConfig.injectInstructions`.
|
|
158
|
+
* compact skills line or skill catalog (plus the SEP-2640 hints when asked), per `skillsConfig.injectInstructions`.
|
|
155
159
|
*
|
|
156
|
-
* The catalog and hints only name the MCP-visible skills the skill authorities and the hookable
|
|
160
|
+
* The line, catalog and hints only count or name the MCP-visible skills the skill authorities and the hookable
|
|
157
161
|
* `skills:filter` flow let this caller see, the same skills `skills/list` returns. The filter only
|
|
158
162
|
* runs when the instructions would list a skill. If it fails, the skills are left out rather than
|
|
159
163
|
* failing the handshake. With nothing filtering, the result equals {@link composeInitializeInstructions}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-instructions.helper.d.ts","sourceRoot":"","sources":["../../src/skill/skill-instructions.helper.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"skill-instructions.helper.d.ts","sourceRoot":"","sources":["../../src/skill/skill-instructions.helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAMxD,OAAO,KAAK,EAAE,sBAAsB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;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAUD;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,OAAO,CAKnF;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC,CAkErG"}
|
|
@@ -2,7 +2,6 @@ import { z } from '@frontmcp/lazy-zod';
|
|
|
2
2
|
import { type AuthInfo } from '@frontmcp/protocol';
|
|
3
3
|
import type { ToolResponseContent } from '@frontmcp/uipack/adapters';
|
|
4
4
|
import { FlowBase, ToolContext, ToolEntry, type FlowRunOptions, type ScopeEntry, type Token } from '../../common';
|
|
5
|
-
import { type EntryClassHooksJoin } from '../../hooks/entry-class-hooks';
|
|
6
5
|
declare const inputSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
7
6
|
request: import("@frontmcp/lazy-zod").ZodObject<{
|
|
8
7
|
method: import("@frontmcp/lazy-zod").ZodLiteral<"tools/call">;
|
|
@@ -229,6 +228,7 @@ declare const stateSchema: import("@frontmcp/lazy-zod").ZodObject<{
|
|
|
229
228
|
structuredContent: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodRecord<import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodUnknown>>;
|
|
230
229
|
isError: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodBoolean>;
|
|
231
230
|
}, import("zod/v4/core").$loose>;
|
|
231
|
+
flowError: import("@frontmcp/lazy-zod").ZodOptional<import("zod").ZodInstanceOf<Error>>;
|
|
232
232
|
uiResult: z.ZodType<ToolResponseContent | undefined>;
|
|
233
233
|
uiMeta: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodRecord<import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodUnknown>>;
|
|
234
234
|
resultMeta: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodRecord<import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodUnknown>>;
|
|
@@ -253,12 +253,16 @@ declare global {
|
|
|
253
253
|
}
|
|
254
254
|
declare const name: "tools:call-tool";
|
|
255
255
|
/** Where the hooks a tool class declares join a run: they run on the instance 'createToolCallContext' builds. */
|
|
256
|
-
export declare const toolClassHooksJoin: EntryClassHooksJoin;
|
|
256
|
+
export declare const toolClassHooksJoin: import("../../hooks/entry-class-hooks").EntryClassHooksJoin;
|
|
257
257
|
export default class CallToolFlow extends FlowBase<typeof name> {
|
|
258
258
|
static resolveHookOwnerId(rawInput: unknown, scope: ScopeEntry): Promise<string | undefined>;
|
|
259
259
|
/** The class of the tool the call names, whose `static` hooks run from `parseInput` on (#701). */
|
|
260
260
|
static resolveHookEntryClass(rawInput: unknown, scope: ScopeEntry): Token | undefined;
|
|
261
261
|
logger: import("../../common").FrontMcpLogger;
|
|
262
|
+
/** The tool's name (its `id`, else its `name`) once `findTool` resolved it, else the name the call asks for. */
|
|
263
|
+
get toolName(): string;
|
|
264
|
+
/** The arguments the call passes to the tool, as `Will` hooks left them. */
|
|
265
|
+
get toolInput(): Record<string, unknown> | undefined;
|
|
262
266
|
parseInput(): Promise<void>;
|
|
263
267
|
/**
|
|
264
268
|
* A skills-only request (`?mode=skills_only`, or a session opened with it) lists no tools, so a call a
|
|
@@ -366,6 +370,7 @@ export default class CallToolFlow extends FlowBase<typeof name> {
|
|
|
366
370
|
* throw a new error here.
|
|
367
371
|
*/
|
|
368
372
|
finalize(): Promise<void>;
|
|
373
|
+
private warnUndeclaredKeysOnce;
|
|
369
374
|
}
|
|
370
375
|
export {};
|
|
371
376
|
//# sourceMappingURL=call-tool.flow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call-tool.flow.d.ts","sourceRoot":"","sources":["../../../src/t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C,sBAAsB;CAY/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools-list.flow.d.ts","sourceRoot":"","sources":["../../../src/tool/flows/tools-list.flow.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,QAAQ,
|
|
1
|
+
{"version":3,"file":"tools-list.flow.d.ts","sourceRoot":"","sources":["../../../src/tool/flows/tools-list.flow.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,QAAQ,EAOR,SAAS,EAGT,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAiD,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAClG,OAAO,KAAK,EAAE,mBAAmB,IAAI,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAavF,QAAA,MAAM,WAAW;;;;;;;;;;;;;;gCAGf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAwB,CAAC;AAE3C,QAAA,MAAM,WAAW;;cAIM,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;kBACD,CAAC,CAAC,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;gCAuB5E,CAAC;AAkBH,QAAA,MAAM,IAAI;;;;CAI2B,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,kBAAkB,EAAE,cAAc,CAChC,aAAa,EACb,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,YAAY,EACnB,OAAO,WAAW,CACnB,CAAC;KACH;CACF;AAED,QAAA,MAAM,IAAI,EAAG,kBAA2B,CAAC;AAUzC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IAC9D,MAAM,wCAA2C;IAEjD,OAAO,CAAC,MAAM;IAId;;OAEG;IACH,OAAO,CAAC,cAAc;IAoBtB;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IAwBnB;;OAEG;IACH,6FAA6F;YAC/E,kBAAkB;IAKhC,OAAO,CAAC,YAAY;IAKd,UAAU;IA+ChB;;;;OAIG;IAEG,wBAAwB;IA2CxB,SAAS;IAyDf;;;;OAIG;IAEG,mBAAmB;IA8BzB,oEAAoE;IAE9D,oBAAoB;IAYpB,gBAAgB;IAqChB,UAAU;CAuRjB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type EntryLineage, type OutputPolicy, type ScopeEntry, type ToolEntry } from '../common';
|
|
2
|
+
/** A tool's `output` policies, most specific first, for the `resolve*` cascades in `output-policy.ts`. */
|
|
3
|
+
export type ToolOutputPolicies = [tool?: OutputPolicy, app?: OutputPolicy, server?: OutputPolicy];
|
|
4
|
+
/** The parts of a tool the output-policy lookup reads. */
|
|
5
|
+
type OutputPolicyTool = Pick<ToolEntry, 'metadata' | 'owner'>;
|
|
6
|
+
/** What the output-policy lookup reads from a scope: its metadata, its apps and its tools' lineage. */
|
|
7
|
+
export interface OutputPolicyScope<Tool extends OutputPolicyTool = ToolEntry> {
|
|
8
|
+
readonly metadata: {
|
|
9
|
+
readonly output?: OutputPolicy;
|
|
10
|
+
};
|
|
11
|
+
readonly apps: Pick<ScopeEntry['apps'], 'getApps'>;
|
|
12
|
+
readonly tools: {
|
|
13
|
+
lineageOf(entry: Tool): EntryLineage | undefined;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The `output` policies that apply to `tool`: its own, its app's and the server's. The app is the
|
|
18
|
+
* one the tool is in, so a tool a plugin or an adapter of that app contributes follows it too.
|
|
19
|
+
* `tools/list` and `tools/call` both read it, so a tool is listed and answered under one policy.
|
|
20
|
+
*/
|
|
21
|
+
export declare function toolOutputPolicies<Tool extends OutputPolicyTool>(tool: Tool, scope: OutputPolicyScope<Tool>): ToolOutputPolicies;
|
|
22
|
+
/**
|
|
23
|
+
* One startup warning for each listed tool whose declared `outputSchema` tools/list has to leave
|
|
24
|
+
* out, naming the tool and the reason. A tool whose `output.schemaMode` resolves to `'none'` asked
|
|
25
|
+
* for no schema, so it stays quiet.
|
|
26
|
+
*/
|
|
27
|
+
export declare function describeUnlistedOutputSchemas(scope: OutputPolicyScope & {
|
|
28
|
+
readonly tools: {
|
|
29
|
+
getTools(): ToolEntry[];
|
|
30
|
+
};
|
|
31
|
+
}): string[];
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=tool-output-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-output-policy.d.ts","sourceRoot":"","sources":["../../src/tool/tool-output-policy.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,WAAW,CAAC;AAGnB,0GAA0G;AAC1G,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,GAAG,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC;AAElG,0DAA0D;AAC1D,KAAK,gBAAgB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC;AAE9D,uGAAuG;AACvG,MAAM,WAAW,iBAAiB,CAAC,IAAI,SAAS,gBAAgB,GAAG,SAAS;IAC1E,QAAQ,CAAC,QAAQ,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAA;KAAE,CAAC;IACtD,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC;IACnD,QAAQ,CAAC,KAAK,EAAE;QAAE,SAAS,CAAC,KAAK,EAAE,IAAI,GAAG,YAAY,GAAG,SAAS,CAAA;KAAE,CAAC;CACtE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,SAAS,gBAAgB,EAC9D,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,iBAAiB,CAAC,IAAI,CAAC,GAC7B,kBAAkB,CAMpB;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,iBAAiB,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,IAAI,SAAS,EAAE,CAAA;KAAE,CAAA;CAAE,GACzE,MAAM,EAAE,CASV"}
|
package/tool/tool.instance.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CallToolRequest } from '@frontmcp/protocol';
|
|
2
|
-
import { ToolContext, ToolEntry, type EntryOwnerRef, type ParsedToolResult, type SafeTransformResult, type ScopeEntry, type ToolCallArgs, type ToolCallExtra, type ToolInputOf, type ToolInputType, type ToolOutputOf, type ToolOutputType, type ToolRecord } from '../common';
|
|
2
|
+
import { ToolContext, ToolEntry, type EntryOwnerRef, type OutputParseOptions, type ParsedToolResult, type SafeTransformResult, type ScopeEntry, type ToolCallArgs, type ToolCallExtra, type ToolInputOf, type ToolInputType, type ToolOutputOf, type ToolOutputType, type ToolRecord } from '../common';
|
|
3
3
|
import type HookRegistry from '../hooks/hook.registry';
|
|
4
4
|
import type ProviderRegistry from '../provider/provider.registry';
|
|
5
5
|
/**
|
|
@@ -56,7 +56,7 @@ export declare class ToolInstance<InSchema extends ToolInputType = ToolInputType
|
|
|
56
56
|
* - image/audio/resource/resource_link → passed through as-is.
|
|
57
57
|
* - JSON / structured → JSON.stringify for text, and full sanitized JSON in structuredContent.
|
|
58
58
|
*/
|
|
59
|
-
parseOutput(raw: Out | Partial<Out> | any): ParsedToolResult;
|
|
60
|
-
safeParseOutput(raw: Out | Partial<Out> | any): SafeTransformResult<ParsedToolResult>;
|
|
59
|
+
parseOutput(raw: Out | Partial<Out> | any, options?: OutputParseOptions): ParsedToolResult;
|
|
60
|
+
safeParseOutput(raw: Out | Partial<Out> | any, options?: OutputParseOptions): SafeTransformResult<ParsedToolResult>;
|
|
61
61
|
}
|
|
62
62
|
//# sourceMappingURL=tool.instance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.instance.d.ts","sourceRoot":"","sources":["../../src/tool/tool.instance.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EACL,WAAW,EACX,SAAS,EAET,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,aAAa,EAGlB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,UAAU,EAChB,MAAM,WAAW,CAAC;AAKnB,OAAO,KAAK,YAAY,MAAM,wBAAwB,CAAC;AAEvD,OAAO,KAAK,gBAAgB,MAAM,+BAA+B,CAAC;AAMlE;;;;;;;GAOG;AACH,qBAAa,YAAY,CACvB,QAAQ,SAAS,aAAa,GAAG,aAAa,EAC9C,SAAS,SAAS,cAAc,GAAG,cAAc,EACjD,EAAE,GAAG,WAAW,CAAC;IAAE,WAAW,EAAE,QAAQ,CAAA;CAAE,CAAC,EAC3C,GAAG,GAAG,YAAY,CAAC;IAAE,YAAY,EAAE,SAAS,CAAA;CAAE,CAAC,CAC/C,SAAQ,SAAS,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,CAAC;IAC/C,6EAA6E;IAC7E,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAC9C,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,OAAO,CAAC,kBAAkB,CAAC,CAA+D;gBAE9E,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE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tool.utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Token } from '@frontmcp/di';
|
|
2
|
-
import { type AgentToolDefinition, type ParsedToolResult, type ToolEntry, type ToolExternalRecord, type ToolMetadata, type ToolRecord, type ToolType } from '../common';
|
|
2
|
+
import { type AgentToolDefinition, type OutputParseOptions, type ParsedToolResult, type ToolEntry, type ToolExternalRecord, type ToolMetadata, type ToolRecord, type ToolType } from '../common';
|
|
3
3
|
export declare function collectToolMetadata(cls: ToolType): ToolMetadata;
|
|
4
4
|
export declare function normalizeTool(item: any): ToolRecord;
|
|
5
5
|
/** True for a record whose tools are loaded from a package or a remote server when its registry starts. */
|
|
@@ -10,7 +10,7 @@ export declare function isExternalToolRecord(record: ToolRecord): record is Tool
|
|
|
10
10
|
* - CLASS_TOKEN: deps come from the class constructor
|
|
11
11
|
*/
|
|
12
12
|
export declare function toolDiscoveryDeps(rec: ToolRecord): Token[];
|
|
13
|
-
export declare function buildParsedToolResult(descriptor: any, raw: unknown): ParsedToolResult;
|
|
13
|
+
export declare function buildParsedToolResult(descriptor: any, raw: unknown, options?: OutputParseOptions): ParsedToolResult;
|
|
14
14
|
/**
|
|
15
15
|
* Build agent tool definitions from tool entries.
|
|
16
16
|
*
|
package/tool/tool.utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.utils.d.ts","sourceRoot":"","sources":["../../src/tool/tool.utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAiD,KAAK,KAAK,EAAa,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"tool.utils.d.ts","sourceRoot":"","sources":["../../src/tool/tool.utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAiD,KAAK,KAAK,EAAa,MAAM,cAAc,CAAC;AAYpG,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EAErB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,QAAQ,EACd,MAAM,WAAW,CAAC;AAWnB,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,QAAQ,GAAG,YAAY,CAa/D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,GAAG,UAAU,CA4CnD;AAED,2GAA2G;AAC3G,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,IAAI,kBAAkB,CAErF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,UAAU,GAAG,KAAK,EAAE,CAW1D;AA4BD,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,GAAG,EACf,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE,kBAAuB,GAC/B,gBAAgB,CAwFlB;AAwTD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,mBAAmB,EAAE,CAEnF;AAED,gGAAgG;AAChG,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,SAAS,GAAG,mBAAmB,CAQ7E"}
|