@frontmcp/sdk 1.8.2 → 1.8.4
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/agent-execution-loop.d.ts.map +1 -1
- package/agent/agent.instance.d.ts +20 -4
- package/agent/agent.instance.d.ts.map +1 -1
- package/agent/agent.scope.d.ts +6 -0
- package/agent/agent.scope.d.ts.map +1 -1
- package/agent/agent.utils.d.ts.map +1 -1
- package/auth/auth-ui/auth-ui.render.d.ts +31 -0
- package/auth/auth-ui/auth-ui.render.d.ts.map +1 -1
- package/auth/auth-ui/auth-ui.state.d.ts.map +1 -1
- package/auth/flows/auth.verify.flow.d.ts.map +1 -1
- package/auth/flows/form-body.utils.d.ts +9 -0
- package/auth/flows/form-body.utils.d.ts.map +1 -0
- package/auth/flows/oauth.authorize.flow.d.ts +41 -14
- package/auth/flows/oauth.authorize.flow.d.ts.map +1 -1
- package/auth/flows/oauth.callback.flow.d.ts +32 -10
- package/auth/flows/oauth.callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.connect.flow.d.ts +2 -0
- package/auth/flows/oauth.connect.flow.d.ts.map +1 -1
- package/auth/flows/oauth.provider-callback.flow.d.ts +30 -10
- package/auth/flows/oauth.provider-callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.register.flow.d.ts.map +1 -1
- package/auth/flows/oauth.token.flow.d.ts +5 -0
- package/auth/flows/oauth.token.flow.d.ts.map +1 -1
- package/auth/flows/oauth.userinfo.flow.d.ts.map +1 -1
- package/auth/flows/session.verify.flow.d.ts.map +1 -1
- package/auth/flows/signin-binding.utils.d.ts +44 -0
- package/auth/flows/signin-binding.utils.d.ts.map +1 -0
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts.map +1 -1
- package/auth/flows/well-known.prm.flow.d.ts.map +1 -1
- package/auth/instances/instance.local-primary-auth.d.ts +90 -16
- package/auth/instances/instance.local-primary-auth.d.ts.map +1 -1
- package/auth/secure-store/secure-store.providers.d.ts +8 -5
- package/auth/secure-store/secure-store.providers.d.ts.map +1 -1
- package/auth/session-scope-identity.d.ts +18 -0
- package/auth/session-scope-identity.d.ts.map +1 -0
- package/auth/vault/auth-providers.providers.d.ts +2 -4
- package/auth/vault/auth-providers.providers.d.ts.map +1 -1
- package/channel/sources/webhook.source.d.ts +1 -1
- package/channel/sources/webhook.source.d.ts.map +1 -1
- package/common/availability/availability.utils.d.ts +30 -0
- package/common/availability/availability.utils.d.ts.map +1 -1
- package/common/availability/index.d.ts +1 -1
- package/common/availability/index.d.ts.map +1 -1
- package/common/decorators/hook.decorator.d.ts +2 -0
- package/common/decorators/hook.decorator.d.ts.map +1 -1
- package/common/decorators/plugin.decorator.d.ts.map +1 -1
- package/common/interfaces/agent.interface.d.ts +8 -0
- package/common/interfaces/agent.interface.d.ts.map +1 -1
- package/common/interfaces/channel.interface.d.ts +6 -0
- package/common/interfaces/channel.interface.d.ts.map +1 -1
- package/common/interfaces/execution-context.interface.d.ts +12 -0
- package/common/interfaces/execution-context.interface.d.ts.map +1 -1
- package/common/interfaces/internal/primary-auth-provider.interface.d.ts +12 -6
- package/common/interfaces/internal/primary-auth-provider.interface.d.ts.map +1 -1
- package/common/interfaces/job.interface.d.ts +3 -0
- package/common/interfaces/job.interface.d.ts.map +1 -1
- package/common/interfaces/server.interface.d.ts +2 -0
- package/common/interfaces/server.interface.d.ts.map +1 -1
- package/common/metadata/app.metadata.d.ts +8 -0
- package/common/metadata/app.metadata.d.ts.map +1 -1
- package/common/metadata/front-mcp.metadata.d.ts +32 -0
- package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
- package/common/metadata/hook.metadata.d.ts +13 -0
- package/common/metadata/hook.metadata.d.ts.map +1 -1
- package/common/metadata/plugin.metadata.d.ts +20 -0
- package/common/metadata/plugin.metadata.d.ts.map +1 -1
- package/common/schemas/http-output.schema.d.ts +5 -0
- package/common/schemas/http-output.schema.d.ts.map +1 -1
- package/common/tokens/plugin.tokens.d.ts +2 -0
- package/common/tokens/plugin.tokens.d.ts.map +1 -1
- package/common/utils/auth-info.utils.d.ts +26 -1
- package/common/utils/auth-info.utils.d.ts.map +1 -1
- package/common/utils/enforced-metadata.utils.d.ts +17 -0
- package/common/utils/enforced-metadata.utils.d.ts.map +1 -0
- package/common/utils/guard.utils.d.ts +2 -0
- package/common/utils/guard.utils.d.ts.map +1 -1
- package/completion/flows/complete.flow.d.ts.map +1 -1
- package/context/call-surface.d.ts +11 -0
- package/context/call-surface.d.ts.map +1 -0
- package/context/frontmcp-context.d.ts +9 -1
- package/context/frontmcp-context.d.ts.map +1 -1
- package/context/index.d.ts +2 -0
- package/context/index.d.ts.map +1 -1
- package/context/running-tool.d.ts +14 -0
- package/context/running-tool.d.ts.map +1 -0
- package/direct/connect.d.ts.map +1 -1
- package/direct/direct-server.d.ts +2 -1
- package/direct/direct-server.d.ts.map +1 -1
- package/elicitation/elicitation.types.d.ts +6 -0
- package/elicitation/elicitation.types.d.ts.map +1 -1
- package/elicitation/helpers/elicit.helper.d.ts.map +1 -1
- package/elicitation/helpers/fallback.helper.d.ts +18 -0
- package/elicitation/helpers/fallback.helper.d.ts.map +1 -1
- package/elicitation/send-elicitation-result.tool.d.ts.map +1 -1
- package/errors/elicitation.error.d.ts +23 -1
- package/errors/elicitation.error.d.ts.map +1 -1
- package/errors/error-handler.d.ts.map +1 -1
- package/errors/index.d.ts +3 -1
- package/errors/index.d.ts.map +1 -1
- package/errors/mcp.error.d.ts.map +1 -1
- package/errors/plugin.errors.d.ts +14 -0
- package/errors/plugin.errors.d.ts.map +1 -0
- package/errors/session-identity-required.error.d.ts +20 -0
- package/errors/session-identity-required.error.d.ts.map +1 -0
- package/esm/index.mjs +3198 -1375
- package/flows/flow.http-path.d.ts +21 -0
- package/flows/flow.http-path.d.ts.map +1 -0
- package/flows/flow.instance.d.ts.map +1 -1
- package/front-mcp/front-mcp.d.ts +11 -0
- package/front-mcp/front-mcp.d.ts.map +1 -1
- package/front-mcp/static-startup.check.d.ts +12 -0
- package/front-mcp/static-startup.check.d.ts.map +1 -0
- package/hooks/hook-coverage.d.ts +29 -0
- package/hooks/hook-coverage.d.ts.map +1 -0
- package/hooks/hook.registry.d.ts +2 -0
- package/hooks/hook.registry.d.ts.map +1 -1
- package/index.d.ts +14 -9
- package/index.d.ts.map +1 -1
- package/index.js +3962 -2153
- package/job/execution/job-execution.manager.d.ts.map +1 -1
- package/notification/notification.service.d.ts.map +1 -1
- package/package.json +11 -11
- package/plugin/enforced-metadata.check.d.ts +29 -0
- package/plugin/enforced-metadata.check.d.ts.map +1 -0
- package/plugin/plugin.registry.d.ts.map +1 -1
- package/prompt/flows/get-prompt.flow.d.ts.map +1 -1
- package/prompt/flows/prompts-list.flow.d.ts.map +1 -1
- package/provider/provider.registry.d.ts +11 -0
- package/provider/provider.registry.d.ts.map +1 -1
- package/resource/flows/read-resource.flow.d.ts.map +1 -1
- package/resource/flows/resource-templates-list.flow.d.ts.map +1 -1
- package/resource/flows/resources-list.flow.d.ts.map +1 -1
- package/scope/flows/http.request.flow.d.ts +25 -1
- package/scope/flows/http.request.flow.d.ts.map +1 -1
- package/scope/flows/request-log.redaction.d.ts +13 -0
- package/scope/flows/request-log.redaction.d.ts.map +1 -0
- package/scope/scope.instance.d.ts.map +1 -1
- package/scope/scope.registry.d.ts +7 -0
- package/scope/scope.registry.d.ts.map +1 -1
- package/server/server.validation.d.ts.map +1 -1
- package/skill/auth/index.d.ts +2 -2
- package/skill/auth/index.d.ts.map +1 -1
- package/skill/auth/skill-http-auth.d.ts +44 -13
- package/skill/auth/skill-http-auth.d.ts.map +1 -1
- package/skill/flows/http/llm-full-txt.flow.d.ts +1 -0
- package/skill/flows/http/llm-full-txt.flow.d.ts.map +1 -1
- package/skill/flows/http/llm-txt.flow.d.ts +1 -0
- package/skill/flows/http/llm-txt.flow.d.ts.map +1 -1
- package/skill/flows/http/skills-api.flow.d.ts +5 -8
- package/skill/flows/http/skills-api.flow.d.ts.map +1 -1
- package/skill/index.d.ts +2 -2
- package/skill/index.d.ts.map +1 -1
- package/skill/sep-2640/sep-2640.per-skill.d.ts.map +1 -1
- package/skill/skill-filter.helper.d.ts +21 -4
- package/skill/skill-filter.helper.d.ts.map +1 -1
- package/skill/skill-instructions.helper.d.ts.map +1 -1
- package/skill/skill-scope.helper.d.ts +11 -1
- package/skill/skill-scope.helper.d.ts.map +1 -1
- package/skill/skill.registry.d.ts +33 -1
- package/skill/skill.registry.d.ts.map +1 -1
- package/task/helpers/task-runner.d.ts.map +1 -1
- package/task/runtime/execute-task.d.ts.map +1 -1
- package/task/task.types.d.ts +13 -0
- package/task/task.types.d.ts.map +1 -1
- package/tool/flows/call-tool.flow.d.ts.map +1 -1
- package/tool/flows/tools-list.flow.d.ts.map +1 -1
- package/transport/flows/handle.mcp-20260728.flow.d.ts.map +1 -1
- package/transport/flows/handle.streamable-http.flow.d.ts.map +1 -1
- package/transport/in-memory-server.d.ts.map +1 -1
- package/transport/index.d.ts +1 -0
- package/transport/index.d.ts.map +1 -1
- package/transport/mcp-20260728/result-decorator.d.ts +14 -4
- package/transport/mcp-20260728/result-decorator.d.ts.map +1 -1
- package/transport/mcp-handlers/call-tool-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/complete-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/get-prompt-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/index.d.ts.map +1 -1
- package/transport/mcp-handlers/list-prompts-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/list-resource-templates-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/list-resources-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/list-tools-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/mcp-surface.d.ts +22 -0
- package/transport/mcp-handlers/mcp-surface.d.ts.map +1 -0
- package/transport/mcp-handlers/read-resource-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/skills-list-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/skills-load-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/skills-search-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/subscribe-request.handler.d.ts.map +1 -1
- package/transport/persistent-session-owner.d.ts +41 -0
- package/transport/persistent-session-owner.d.ts.map +1 -0
- package/transport/web-fetch-handler.d.ts.map +1 -1
- package/transport/web-response.renderer.d.ts.map +1 -1
- package/transport/web-standard-mcp.d.ts +4 -0
- package/transport/web-standard-mcp.d.ts.map +1 -1
- package/workflow/engine/workflow-step.executor.d.ts.map +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The HTTP side of the sign-in binding (see `createSigninBinding` in
|
|
3
|
+
* `@frontmcp/auth`): the cookie `/oauth/authorize` sets, and the check the
|
|
4
|
+
* callbacks run before resuming a sign-in.
|
|
5
|
+
*/
|
|
6
|
+
import { type SigninBinding } from '@frontmcp/auth';
|
|
7
|
+
import { type HttpCookie, type ServerRequest } from '../../common';
|
|
8
|
+
/**
|
|
9
|
+
* Path of the binding cookie: `/oauth`, where the OAuth endpoints live, unless
|
|
10
|
+
* the server's issuer or scope carries a path prefix, which the provider
|
|
11
|
+
* callback URL (`<issuer>/oauth/provider/<id>/callback`) and the federated
|
|
12
|
+
* consent form include. Then `/`, so the cookie still reaches them.
|
|
13
|
+
*/
|
|
14
|
+
export declare function signinCookiePath(issuer: string, scopePath: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the browser reached this request over https. The binding cookie is then a `__Host-`
|
|
17
|
+
* cookie (`Secure`, `Path=/`, no `Domain`), which no other host can set in the browser.
|
|
18
|
+
*/
|
|
19
|
+
export declare function signinOverHttps(request: ServerRequest): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The binding for a new sign-in started by `request`: named `__Host-…` when the browser came over
|
|
22
|
+
* https (see {@link signinOverHttps}).
|
|
23
|
+
*/
|
|
24
|
+
export declare function createRequestSigninBinding(request: ServerRequest, pendingAuthId: string): SigninBinding;
|
|
25
|
+
/**
|
|
26
|
+
* The cookie that gives the browser its binding: HttpOnly and SameSite=Lax. Over https it is the
|
|
27
|
+
* `__Host-` cookie, so `Secure` with `Path=/` (the prefix requires both); otherwise it is scoped to `path`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function signinBindingCookie(request: ServerRequest, binding: SigninBinding, path: string): HttpCookie;
|
|
30
|
+
/** A `Set-Cookie` that removes the binding cookie of `pendingAuthId` once its sign-in is over. */
|
|
31
|
+
export declare function clearedSigninBindingCookie(request: ServerRequest, pendingAuthId: string, path: string): HttpCookie;
|
|
32
|
+
/**
|
|
33
|
+
* Whether `request` comes from the browser that started the sign-in `pendingAuthId` (its binding hash
|
|
34
|
+
* is `hash`). Over https only the `__Host-` cookie counts: a same-named cookie without the prefix may
|
|
35
|
+
* have been planted by a sibling host.
|
|
36
|
+
*/
|
|
37
|
+
export declare function requestHoldsSigninBinding(request: ServerRequest, pendingAuthId: string, hash: string | undefined): boolean;
|
|
38
|
+
/** `output` with `cookie` added to the cookies it sets. */
|
|
39
|
+
export declare function withCookie<T extends {
|
|
40
|
+
cookies?: HttpCookie[];
|
|
41
|
+
}>(output: T, cookie: HttpCookie): T;
|
|
42
|
+
/** The error text for a sign-in resumed without its binding cookie. */
|
|
43
|
+
export declare const SIGNIN_BINDING_REFUSED = "This sign-in was started in another browser, or at another address. Start it again from the app.";
|
|
44
|
+
//# sourceMappingURL=signin-binding.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signin-binding.utils.d.ts","sourceRoot":"","sources":["../../../src/auth/flows/signin-binding.utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAA0C,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAE3G;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAQ1E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAK/D;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,GAAG,aAAa,CAEvG;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAa5G;AAED,kGAAkG;AAClG,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAWlH;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,aAAa,EACtB,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,OAAO,CAIT;AAED,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,CAAC,SAAS;IAAE,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;CAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,GAAG,CAAC,CAEjG;AAED,uEAAuE;AACvE,eAAO,MAAM,sBAAsB,qGACiE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"well-known.oauth-authorization-server.flow.d.ts","sourceRoot":"","sources":["../../../src/auth/flows/well-known.oauth-authorization-server.flow.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"well-known.oauth-authorization-server.flow.d.ts","sourceRoot":"","sources":["../../../src/auth/flows/well-known.oauth-authorization-server.flow.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAGvC,OAAO,EAGL,QAAQ,EAWR,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AAoBtB,QAAA,MAAM,WAAW;;;;gCAAkB,CAAC;AAgCpC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAA0E,CAAC;AAEpG,eAAO,MAAM,sBAAsB;;;;;;;;;;;;gCAgBjC,CAAC;AAEH,QAAA,MAAM,eAAe;;;CAGgB,CAAC;AAEtC,KAAK,eAAe,GAAG,OAAO,eAAe,CAAC;AAC9C,KAAK,sBAAsB,GAAG,cAAc,CAC1C,eAAe,EACf,eAAe,EACf,OAAO,WAAW,EAClB,OAAO,YAAY,EACnB,OAAO,sBAAsB,CAC9B,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,uCAAuC,EAAE,sBAAsB,CAAC;KACjE;CACF;AAED,QAAA,MAAM,IAAI,EAAG,uCAAgD,CAAC;AAa9D,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IAChE,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU;IAKtD,aAAa;IAKb,UAAU;IAkCV,WAAW;CAoDlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"well-known.prm.flow.d.ts","sourceRoot":"","sources":["../../../src/auth/flows/well-known.prm.flow.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"well-known.prm.flow.d.ts","sourceRoot":"","sources":["../../../src/auth/flows/well-known.prm.flow.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;AAK1B,OAAO,EAIL,QAAQ,EAQR,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AAGtB,QAAA,MAAM,WAAW;;;;gCAAkB,CAAC;AAEpC,QAAA,MAAM,WAAW;;;;;gCAKf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;gCAShB,CAAC;AAEH,QAAA,MAAM,IAAI;;;;CAI2B,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,qCAAqC,EAAE,cAAc,CACnD,gBAAgB,EAChB,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,YAAY,EACnB,OAAO,WAAW,CACnB,CAAC;KACH;CACF;AAED,QAAA,MAAM,IAAI,EAAG,qCAA8C,CAAC;AAa5D,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IACjE,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU;IAKtD,aAAa;IAKb,UAAU;IAsBY,WAAW;CAwCxC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DcrClientRegistry, SessionCredentialVault, type AuthorizationStore, type ConsentStore, type DcrRegistryConfig, type FederatedAuthSessionStore, type SecureStoreBackend, type OrchestratedTokenStore as TokenStore, type VerifyResult } from '@frontmcp/auth';
|
|
1
|
+
import { DcrClientRegistry, SessionCredentialVault, type AuthorizationStore, type ConsentStore, type DcrRegistryConfig, type FederatedAuthSessionStore, type JSONWebKeySet, type SecureStoreBackend, type OrchestratedTokenStore as TokenStore, type VerifyResult } from '@frontmcp/auth';
|
|
2
2
|
import { FrontMcpAuth, type FrontMcpLogger, type JWK, type ScopeEntry, type ServerRequest } from '../../common';
|
|
3
3
|
import { type LocalAuthOptions, type PublicAuthOptions, type RemoteAuthOptions, type StaticAuthOptions } from '../../common/types/options/auth';
|
|
4
4
|
import type ProviderRegistry from '../../provider/provider.registry';
|
|
@@ -78,6 +78,8 @@ export interface UpstreamProviderConfig {
|
|
|
78
78
|
userInfoEndpoint?: string;
|
|
79
79
|
/** JWKS URI for ID token validation (optional) */
|
|
80
80
|
jwksUri?: string;
|
|
81
|
+
/** Inline JWKS for ID token validation (optional; wins over `jwksUri`). */
|
|
82
|
+
jwks?: JSONWebKeySet;
|
|
81
83
|
/** Client ID */
|
|
82
84
|
clientId: string;
|
|
83
85
|
/** Client secret (for confidential clients) */
|
|
@@ -96,9 +98,15 @@ export interface UpstreamProviderConfig {
|
|
|
96
98
|
* MUST NOT be reused with a different authorization server (SEP-2352).
|
|
97
99
|
*
|
|
98
100
|
* Optional because a provider may be configured by raw endpoints alone; when
|
|
99
|
-
* absent the `iss` check is skipped (the parameter is only SHOULD-sent)
|
|
101
|
+
* absent the `iss` check is skipped (the parameter is only SHOULD-sent), and
|
|
102
|
+
* the provider's `id_token` is not used for identity (its `iss` can't be
|
|
103
|
+
* checked), unless `verifyIssuer` is explicitly `false`.
|
|
100
104
|
*/
|
|
101
105
|
issuer?: string;
|
|
106
|
+
/** Other issuer values this provider legitimately uses (`providerConfig.additionalIssuers`). */
|
|
107
|
+
additionalIssuers?: string[];
|
|
108
|
+
/** `false` turns off the issuer checks for this provider (`providerConfig.verifyIssuer`). */
|
|
109
|
+
verifyIssuer?: boolean;
|
|
102
110
|
}
|
|
103
111
|
/**
|
|
104
112
|
* Validate an RFC 9207 `iss` authorization-response parameter.
|
|
@@ -111,7 +119,9 @@ export interface UpstreamProviderConfig {
|
|
|
111
119
|
* A missing `iss` is accepted — the AS is only SHOULD-required to send it, so
|
|
112
120
|
* rejecting would break every AS that has not adopted RFC 9207 yet.
|
|
113
121
|
*/
|
|
114
|
-
export declare function validateAuthorizationIssuer(received: string | undefined, expected: string | undefined
|
|
122
|
+
export declare function validateAuthorizationIssuer(received: string | undefined, expected: string | undefined,
|
|
123
|
+
/** Other issuer values the provider is configured to use. */
|
|
124
|
+
additional?: readonly string[]): {
|
|
115
125
|
ok: true;
|
|
116
126
|
} | {
|
|
117
127
|
ok: false;
|
|
@@ -122,7 +132,10 @@ export declare class LocalPrimaryAuth extends FrontMcpAuth<LocalPrimaryAuthOptio
|
|
|
122
132
|
private providers;
|
|
123
133
|
readonly host: string;
|
|
124
134
|
readonly port: number;
|
|
135
|
+
/** The boot-time issuer: the configured one, else this server's listener address (see {@link issuerFor}). */
|
|
125
136
|
readonly issuer: string;
|
|
137
|
+
/** Whether the operator named the issuer (`issuer` / `local.issuer`, or its host with `FRONTMCP_PUBLIC_HOST`). */
|
|
138
|
+
private readonly issuerIsConfigured;
|
|
126
139
|
readonly keys: JWK[];
|
|
127
140
|
readonly secret: Uint8Array;
|
|
128
141
|
readonly logger: FrontMcpLogger;
|
|
@@ -245,6 +258,24 @@ export declare class LocalPrimaryAuth extends FrontMcpAuth<LocalPrimaryAuthOptio
|
|
|
245
258
|
* supported knob for aligning the issuer with discovery.
|
|
246
259
|
*/
|
|
247
260
|
private deriveIssuer;
|
|
261
|
+
/** The issuer the options name: `issuer` in public mode, `local.issuer` in local and remote mode. */
|
|
262
|
+
private configuredIssuer;
|
|
263
|
+
/**
|
|
264
|
+
* The issuer (`iss`) this server names on the tokens it issues in answer to
|
|
265
|
+
* `request`, and requires on the tokens it accepts there (#269). Issuing and
|
|
266
|
+
* verifying both ask this, so they can't disagree:
|
|
267
|
+
*
|
|
268
|
+
* - a configured issuer (`issuer` / `local.issuer`) is the issuer;
|
|
269
|
+
* - with `FRONTMCP_PUBLIC_URL` pinned, the issuer is that URL plus this
|
|
270
|
+
* scope's path, the address discovery advertises;
|
|
271
|
+
* - with `FRONTMCP_PUBLIC_HOST` or `expectedAudience` set, the boot-time
|
|
272
|
+
* issuer, so a token serves at every address the server answers to;
|
|
273
|
+
* - a request that came through a Web fetch handler (a Worker, Deno, Bun, a
|
|
274
|
+
* Durable Object) has no listener the boot-time issuer could describe, so
|
|
275
|
+
* the issuer is the request's own origin plus this scope's path;
|
|
276
|
+
* - otherwise (the Node server) the boot-time issuer.
|
|
277
|
+
*/
|
|
278
|
+
issuerFor(request?: ServerRequest): string;
|
|
248
279
|
/**
|
|
249
280
|
* Read the `tokenStorage` selection off the auth options. Only
|
|
250
281
|
* local/remote/orchestrated modes declare it; public mode does not, in which
|
|
@@ -327,37 +358,68 @@ export declare class LocalPrimaryAuth extends FrontMcpAuth<LocalPrimaryAuthOptio
|
|
|
327
358
|
* the secure store gets its own adapter).
|
|
328
359
|
*/
|
|
329
360
|
private secureStoreSharesTokenStorage;
|
|
330
|
-
|
|
361
|
+
/**
|
|
362
|
+
* Sign a token for the anonymous grant (`grant_type=anonymous`).
|
|
363
|
+
*
|
|
364
|
+
* The holder is anonymous (#270): the subject is an `anon:` id, so
|
|
365
|
+
* `this.auth.isAnonymous` is true and authorities treat it as no signed-in
|
|
366
|
+
* user, and its scopes are the configured `anonymousScopes`, never a role.
|
|
367
|
+
*
|
|
368
|
+
* @param options.audience The protected resource the token is for (`aud`, #269).
|
|
369
|
+
* @param options.issuer The issuer to name (`iss`): {@link issuerFor} the request. Default: the boot-time issuer.
|
|
370
|
+
*/
|
|
371
|
+
signAnonymousJwt(options?: {
|
|
372
|
+
audience?: string;
|
|
373
|
+
issuer?: string;
|
|
374
|
+
}): Promise<string>;
|
|
375
|
+
/** The scopes an anonymous caller holds: `anonymousScopes`, default `['anonymous']`. */
|
|
376
|
+
private anonymousScopes;
|
|
331
377
|
/**
|
|
332
378
|
* Cryptographically verify a gateway-issued access token (public/local/remote
|
|
333
379
|
* "gateway" modes). Gateway tokens — both authenticated access tokens
|
|
334
380
|
* ({@link signAccessToken}) and anonymous tokens ({@link signAnonymousJwt}) —
|
|
335
|
-
* are HS256-signed with `this.secret
|
|
336
|
-
*
|
|
381
|
+
* are HS256-signed with `this.secret`.
|
|
382
|
+
*
|
|
383
|
+
* The secret alone doesn't make a token this server's: every server started
|
|
384
|
+
* with the same JWT_SECRET holds it. So a token must also (#269):
|
|
385
|
+
* - name THIS instance as its issuer (`iss`): `expectedIssuer`, which callers
|
|
386
|
+
* take from {@link issuerFor} the request, as the token endpoint does when
|
|
387
|
+
* it signs; the boot-time issuer when not given. Never the token's own
|
|
388
|
+
* claim; and
|
|
389
|
+
* - when `expectedAudience` is given, be issued for that protected resource,
|
|
390
|
+
* or one of those resources (`aud`, compared as RFC 8707 resource URIs).
|
|
391
|
+
* `session:verify` passes the request's resource URL, or the configured
|
|
392
|
+
* `auth.expectedAudience` when there is one.
|
|
337
393
|
*
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
* deployments legitimately present an `iss` that differs from the
|
|
341
|
-
* request-derived base URL (see {@link deriveIssuer}). Algorithm is pinned to
|
|
342
|
-
* HS256 to block `alg` confusion (e.g. a forged `alg: none` or asymmetric
|
|
343
|
-
* header). `expectedIssuer` is accepted for parity/logging only.
|
|
394
|
+
* Lifetime: `exp` is required (#272) and checked with `nbf` by `jose`. The
|
|
395
|
+
* algorithm is pinned to HS256 to block `alg` confusion.
|
|
344
396
|
*/
|
|
345
|
-
verifyGatewayToken(token: string,
|
|
397
|
+
verifyGatewayToken(token: string, requestBaseUrl: string, expectedAudience?: string | readonly string[], expectedIssuer?: string): Promise<VerifyResult>;
|
|
346
398
|
/**
|
|
347
399
|
* Sign an access token for an authenticated user
|
|
348
400
|
*/
|
|
349
|
-
signAccessToken(user: UserInfo, scopes: string[], audience?: string, consentMetadata?: ConsentMetadata
|
|
401
|
+
signAccessToken(user: UserInfo, scopes: string[], audience?: string, consentMetadata?: ConsentMetadata,
|
|
402
|
+
/** The issuer to name (`iss`): {@link issuerFor} the request. Default: the boot-time issuer. */
|
|
403
|
+
issuer?: string): Promise<string>;
|
|
350
404
|
/**
|
|
351
405
|
* Exchange an authorization code for tokens
|
|
352
406
|
*/
|
|
353
|
-
exchangeCode(code: string, clientId: string, redirectUri: string, codeVerifier: string, clientSecret?: string
|
|
407
|
+
exchangeCode(code: string, clientId: string, redirectUri: string, codeVerifier: string, clientSecret?: string,
|
|
408
|
+
/** The protected resource the token is for when the grant recorded none (#269). */
|
|
409
|
+
defaultAudience?: string,
|
|
410
|
+
/** The issuer the access token names: {@link issuerFor} the token request. */
|
|
411
|
+
issuer?: string): Promise<TokenResponse | {
|
|
354
412
|
error: string;
|
|
355
413
|
error_description: string;
|
|
356
414
|
}>;
|
|
357
415
|
/**
|
|
358
416
|
* Refresh an access token using a refresh token
|
|
359
417
|
*/
|
|
360
|
-
refreshAccessToken(refreshToken: string, clientId: string, clientSecret?: string
|
|
418
|
+
refreshAccessToken(refreshToken: string, clientId: string, clientSecret?: string,
|
|
419
|
+
/** The protected resource the token is for when the grant recorded none (#269). */
|
|
420
|
+
defaultAudience?: string,
|
|
421
|
+
/** The issuer the access token names: {@link issuerFor} the token request. */
|
|
422
|
+
issuer?: string): Promise<TokenResponse | {
|
|
361
423
|
error: string;
|
|
362
424
|
error_description: string;
|
|
363
425
|
}>;
|
|
@@ -468,6 +530,18 @@ export declare class LocalPrimaryAuth extends FrontMcpAuth<LocalPrimaryAuthOptio
|
|
|
468
530
|
picture?: string;
|
|
469
531
|
claims?: Record<string, unknown>;
|
|
470
532
|
}>;
|
|
533
|
+
/**
|
|
534
|
+
* Verify an upstream provider's `id_token` and return its claims, or
|
|
535
|
+
* `undefined` when it doesn't verify or no keys are configured to verify it.
|
|
536
|
+
*
|
|
537
|
+
* Checks the signature against the provider's published keys (inline
|
|
538
|
+
* `jwks`, else `jwksUri`, else the provider's discovery document), the
|
|
539
|
+
* issuer (the provider, plus `additionalIssuers`, unless `verifyIssuer` is
|
|
540
|
+
* false), `exp`, and that `aud` names this client. With no issuer configured
|
|
541
|
+
* (a local-mode provider without `issuer`) the token is not used: a key set
|
|
542
|
+
* an IdP shares between tenants would vouch for every tenant's tokens.
|
|
543
|
+
*/
|
|
544
|
+
private verifyProviderIdToken;
|
|
471
545
|
/**
|
|
472
546
|
* Refresh tokens from upstream provider
|
|
473
547
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance.local-primary-auth.d.ts","sourceRoot":"","sources":["../../../src/auth/instances/instance.local-primary-auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,iBAAiB,EASjB,sBAAsB,EAMtB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EAGvB,KAAK,sBAAsB,IAAI,UAAU,EACzC,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"instance.local-primary-auth.d.ts","sourceRoot":"","sources":["../../../src/auth/instances/instance.local-primary-auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,iBAAiB,EASjB,sBAAsB,EAMtB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAGvB,KAAK,sBAAsB,IAAI,UAAU,EACzC,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AAYxB,OAAO,EAEL,YAAY,EAKZ,KAAK,cAAc,EACnB,KAAK,GAAG,EACR,KAAK,UAAU,EACf,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAKL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACvB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,KAAK,gBAAgB,MAAM,kCAAkC,CAAC;AAmBrE;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;AAiBnH;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,QAAQ,C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AE,MAAM,CAAC;QAAC,iBAAiB,EAAE,MAAM,CAAA;KAAE,CAAC;IA4EhF;;OAEG;IACG,mBAAmB,CACvB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;IAiE9G;;;;;;;;;;OAUG;YACW,qBAAqB;IAgCnC;;OAEG;IACG,oBAAoB,CACxB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,qBAAqB,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,MAAM,CAAA;KAAE,CAAC;CA8CjF"}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Registers the per-request {@link SecureStoreAccessor} (`this.secureStore`).
|
|
5
5
|
* The backend is a GLOBAL singleton owned by LocalPrimaryAuth; the accessor is
|
|
6
6
|
* CONTEXT-scoped because it must resolve the CURRENT request's namespace (the
|
|
7
|
-
* authenticated `sub` for `user` scope, the
|
|
8
|
-
* scope) before calling the backend.
|
|
7
|
+
* authenticated `sub` for `user` scope, the verified session, else the signed-in
|
|
8
|
+
* caller, for `session` scope) before calling the backend.
|
|
9
9
|
*/
|
|
10
10
|
import { type SecureStoreBackend, type SecureStoreScope } from '@frontmcp/auth';
|
|
11
11
|
import { type Token } from '@frontmcp/di';
|
|
@@ -17,10 +17,13 @@ import { type FrontMcpContext } from '../../context/frontmcp-context';
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const SECURE_STORE_BACKEND: Token<SecureStoreBackend>;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* The identity `session`-scoped secrets of the current request belong to: the session the server
|
|
21
|
+
* verified, else the signed-in caller (see {@link sessionScopeIdentity}).
|
|
22
|
+
*
|
|
23
|
+
* @throws SessionIdentityRequiredError for an anonymous caller without a verified session, which no
|
|
24
|
+
* later request could be matched to
|
|
22
25
|
*/
|
|
23
|
-
export declare function resolveRequestSessionId(ctx: FrontMcpContext): string
|
|
26
|
+
export declare function resolveRequestSessionId(ctx: FrontMcpContext): string;
|
|
24
27
|
/**
|
|
25
28
|
* Build the DI providers that back `this.secureStore`.
|
|
26
29
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secure-store.providers.d.ts","sourceRoot":"","sources":["../../../src/auth/secure-store/secure-store.providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAiB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"secure-store.providers.d.ts","sourceRoot":"","sources":["../../../src/auth/secure-store/secure-store.providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAiB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAMtE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAkD,KAAK,CAAC,kBAAkB,CAAC,CAAC;AAE7G;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAIpE;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAC/C,OAAO,EAAE,kBAAkB,CAAC;IAC5B,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,YAAY,EAAE,CA6BjB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who session-scoped storage of a request belongs to.
|
|
3
|
+
*/
|
|
4
|
+
import { type FrontMcpContext } from '../context/frontmcp-context';
|
|
5
|
+
/**
|
|
6
|
+
* The identity that keys session-scoped storage (secure-store secrets, auth-provider credentials)
|
|
7
|
+
* for the current request: the session the server verified (`FrontMcpContext.verifiedSessionId`),
|
|
8
|
+
* else `principal:<sub>` for a signed-in caller, so its storage lasts across its requests.
|
|
9
|
+
*
|
|
10
|
+
* Never `FrontMcpContext.sessionId` itself: under MCP 2026-07-28 and on the stateless transports it
|
|
11
|
+
* is whatever `mcp-session-id` the client sent, so a caller who sent another caller's id reached
|
|
12
|
+
* that caller's storage. The `principal:` form never matches a session id the server mints
|
|
13
|
+
* (`iv.tag.data`, no `:`).
|
|
14
|
+
*
|
|
15
|
+
* @returns The identity, or undefined for an anonymous caller without a verified session
|
|
16
|
+
*/
|
|
17
|
+
export declare function sessionScopeIdentity(ctx: FrontMcpContext): string | undefined;
|
|
18
|
+
//# sourceMappingURL=session-scope-identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-scope-identity.d.ts","sourceRoot":"","sources":["../../src/auth/session-scope-identity.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEnE;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CAS7E"}
|
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
* Defines dependency injection providers for the AuthProviders vault system.
|
|
5
5
|
* These providers are registered at scope initialization when AuthProviders is enabled.
|
|
6
6
|
*/
|
|
7
|
-
import type
|
|
8
|
-
import { ProviderScope } from '@frontmcp/di';
|
|
9
|
-
import type { AuthorizationVault, AuthProvidersVaultOptions } from '@frontmcp/auth';
|
|
10
|
-
import { LazyCredentialLoader } from '@frontmcp/auth';
|
|
7
|
+
import { LazyCredentialLoader, type AuthorizationVault, type AuthProvidersVaultOptions } from '@frontmcp/auth';
|
|
8
|
+
import { ProviderScope, type Token } from '@frontmcp/di';
|
|
11
9
|
/**
|
|
12
10
|
* Token for lazy loader (internal use)
|
|
13
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-providers.providers.d.ts","sourceRoot":"","sources":["../../../src/auth/vault/auth-providers.providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"auth-providers.providers.d.ts","sourceRoot":"","sources":["../../../src/auth/vault/auth-providers.providers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAQL,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAE/B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AASzD;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAoD,KAAK,CAAC,oBAAoB,CAAC,CAAC;AAEnH;;;GAGG;AACH,UAAU,wBAAwB;IAChC,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,SAAS,KAAK,EAAE,CAAC;CACjC;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,yBAAyB,EAClC,SAAS,EAAE,kBAAkB,GAC5B,wBAAwB,EAAE,CA+E5B;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAWnF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FrontMcpLogger } from '../../common';
|
|
2
|
-
import type { ChannelInstance } from '../channel.instance';
|
|
3
2
|
import type { ChannelWebhookSource } from '../../common/metadata/channel.metadata';
|
|
3
|
+
import type { ChannelInstance } from '../channel.instance';
|
|
4
4
|
/**
|
|
5
5
|
* Webhook request context passed to channel handlers.
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.source.d.ts","sourceRoot":"","sources":["../../../src/channel/sources/webhook.source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"webhook.source.d.ts","sourceRoot":"","sources":["../../../src/channel/sources/webhook.source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;IACvD,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,eAAe,EACxB,YAAY,EAAE,oBAAoB,EAClC,MAAM,EAAE,cAAc,GACrB,CACD,GAAG,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,EAC5F,GAAG,EAAE;IAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK;QAAE,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;KAAE,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CAAE,KACjG,OAAO,CAAC,IAAI,CAAC,CA+BjB"}
|
|
@@ -16,7 +16,37 @@
|
|
|
16
16
|
* lifetime of the process — the OS, runtime, and deployment mode don't change.
|
|
17
17
|
*/
|
|
18
18
|
import { type EntryAvailability } from '@frontmcp/utils';
|
|
19
|
+
import { EntryUnavailableError } from '../../errors/mcp.error';
|
|
19
20
|
import type { FrontMcpLogger } from '../interfaces/logger.interface';
|
|
21
|
+
/** Who is calling (`availableWhen.surface`): the one axis that varies per call. */
|
|
22
|
+
export type CallSurface = NonNullable<EntryAvailability['surface']>[number];
|
|
23
|
+
/**
|
|
24
|
+
* The surface a flow was called from, when its caller tagged one. The MCP request handlers tag
|
|
25
|
+
* every call (`'mcp'`, or `'cli'` for the in-process client of a CLI build), an agent its model's
|
|
26
|
+
* tool calls (`'agent'`), and `this.callTool()` in a job, an agent or a channel handling a webhook
|
|
27
|
+
* tags `'job'`, `'agent'` or `'http-trigger'`. A tool's own `this.callTool()` is in-process dispatch
|
|
28
|
+
* and tags none.
|
|
29
|
+
*/
|
|
30
|
+
export declare function callSurfaceOf(ctx: unknown): CallSurface | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Whether `availableWhen.surface` offers an entry to a call from `surface`. A call without a surface
|
|
33
|
+
* is not restricted by this axis (an empty `surface` list is refused by the process-wide check).
|
|
34
|
+
*/
|
|
35
|
+
export declare function isOfferedOnSurface(availability: EntryAvailability | undefined, surface: CallSurface | undefined): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* How `availableWhen` answers a call that found an entry by name or URI.
|
|
38
|
+
*
|
|
39
|
+
* - `'not-offered'`: the call's surface is excluded. Answer as for an unknown entry, so a caller on
|
|
40
|
+
* that surface cannot tell the entry exists (an agent-only tool over MCP, say).
|
|
41
|
+
* - `'unavailable'`: a process-wide axis (os, runtime, deployment, provider, target, env) excludes
|
|
42
|
+
* it. Listings already leave such entries out; a call by name must not reach them either.
|
|
43
|
+
*/
|
|
44
|
+
export declare function availabilityForCall(availability: EntryAvailability | undefined, surface: CallSurface | undefined): 'available' | 'not-offered' | 'unavailable';
|
|
45
|
+
/**
|
|
46
|
+
* The structured error for an entry a process-wide `availableWhen` axis excludes (issue #417), as
|
|
47
|
+
* `tools/call` has answered since that issue.
|
|
48
|
+
*/
|
|
49
|
+
export declare function entryUnavailableError(entryType: string, entryName: string, availability: EntryAvailability | undefined, surface: CallSurface | undefined): EntryUnavailableError;
|
|
20
50
|
/**
|
|
21
51
|
* Log availability filtering results for a set of entries at registry boot time.
|
|
22
52
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"availability.utils.d.ts","sourceRoot":"","sources":["../../../src/common/availability/availability.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"availability.utils.d.ts","sourceRoot":"","sources":["../../../src/common/availability/availability.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAIL,KAAK,iBAAiB,EAEvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,mFAAmF;AACnF,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAI5E;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAGnE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,iBAAiB,GAAG,SAAS,EAC3C,OAAO,EAAE,WAAW,GAAG,SAAS,GAC/B,OAAO,CAGT;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,iBAAiB,GAAG,SAAS,EAC3C,OAAO,EAAE,WAAW,GAAG,SAAS,GAC/B,WAAW,GAAG,aAAa,GAAG,aAAa,CAG7C;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,iBAAiB,GAAG,SAAS,EAC3C,OAAO,EAAE,WAAW,GAAG,SAAS,GAC/B,qBAAqB,CAIvB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE;QAAE,aAAa,CAAC,EAAE,iBAAiB,CAAA;KAAE,CAAA;CAAE,EAClH,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,SAAS,CAAC,EAAE,EACrB,MAAM,EAAE,cAAc,GACrB,IAAI,CA2DN"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { logAvailabilityFiltering } from './availability.utils';
|
|
1
|
+
export { availabilityForCall, callSurfaceOf, entryUnavailableError, isOfferedOnSurface, logAvailabilityFiltering, type CallSurface, } from './availability.utils';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/availability/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/availability/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,KAAK,WAAW,GACjB,MAAM,sBAAsB,CAAC"}
|
|
@@ -10,6 +10,8 @@ import { type FlowName, type HookMetadata, type HookOptions } from '../metadata'
|
|
|
10
10
|
* This is called by collectFlowHookMap during flow registration
|
|
11
11
|
*/
|
|
12
12
|
export declare function resolvePendingTC39HooksForClass(ctor: Function): HookMetadata[];
|
|
13
|
+
/** The pending TC39 hooks of a class, left pending for the flow registration that resolves them. */
|
|
14
|
+
export declare function peekPendingTC39HooksForClass(ctor: Function): HookMetadata[];
|
|
13
15
|
/**
|
|
14
16
|
* Creates a typed Stage hook decorator for a specific flow
|
|
15
17
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.decorator.d.ts","sourceRoot":"","sources":["../../../src/common/decorators/hook.decorator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAsB,MAAM,aAAa,CAAC;AAmBrG;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,EAAE,CAE9E;AAkFD;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,IAAI,SAAS,QAAQ,EAAE,IAAI,EAAE,IAAI,IAI1C,iCAAQ,EAAE,OAAM,WAAW,0BAAU,qBAGvD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,SAAS,QAAQ,EAAE,IAA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wBAAgB,YAAY,CAAC,IAAI,SAAS,QAAQ,EAAE,IAAI,EAAE,IAAI,IAI3C,iCAAQ,EAAE,OAAM,WAAW,0BAAU,qBAGvD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,IAAI,SAAS,QAAQ,EAAE,IAAI,EAAE,IAAI;;;;;EAO5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.decorator.d.ts","sourceRoot":"","sources":["../../../src/common/decorators/plugin.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.decorator.d.ts","sourceRoot":"","sources":["../../../src/common/decorators/plugin.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAIhF;;GAEG;AACH,iBAAS,cAAc,CAAC,gBAAgB,EAAE,cAAc,GAAG,cAAc,CAiCxE;AAED,OAAO,EAAE,cAAc,EAAE,cAAc,IAAI,MAAM,EAAE,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { type ZodType } from '@frontmcp/lazy-zod';
|
|
|
2
2
|
import { type ToolExecutor } from '../../agent/agent-execution-loop';
|
|
3
3
|
import { type ElicitOptions, type ElicitResult } from '../../elicitation';
|
|
4
4
|
import type { AIPlatformType, ClientInfo, McpLoggingLevel } from '../../notification';
|
|
5
|
+
import { type CallSurface } from '../availability';
|
|
5
6
|
import { type AgentInputOf, type AgentOutputOf } from '../decorators';
|
|
6
7
|
import type { AgentMetadata, AgentType, ToolInputType, ToolOutputType } from '../metadata';
|
|
7
8
|
import { ExecutionContextBase, type ExecutionContextBaseArgs } from './execution-context.interface';
|
|
@@ -183,6 +184,8 @@ export declare class AgentContext<InSchema extends ToolInputType = ToolInputType
|
|
|
183
184
|
* is in `swarm.visibleAgents`.
|
|
184
185
|
*/
|
|
185
186
|
protected invokeAgent(agentId: string, input: unknown): Promise<unknown>;
|
|
187
|
+
/** An agent calls tools on the `'agent'` surface, as its model's tool calls do. */
|
|
188
|
+
protected callToolSurface(): CallSurface;
|
|
186
189
|
/**
|
|
187
190
|
* Send a notification message to the current session.
|
|
188
191
|
* Uses 'notifications/message' per MCP 2025-11-25 spec.
|
|
@@ -266,6 +269,11 @@ export declare class AgentContext<InSchema extends ToolInputType = ToolInputType
|
|
|
266
269
|
* ```
|
|
267
270
|
*/
|
|
268
271
|
protected elicit<S extends ZodType>(message: string, requestedSchema: S, options?: ElicitOptions): Promise<ElicitResult<S extends ZodType<infer O> ? O : unknown>>;
|
|
272
|
+
/**
|
|
273
|
+
* The context of the request this agent runs in. An agent is built with its own provider registry,
|
|
274
|
+
* which holds no request-scoped instances, so the context is read from the running request.
|
|
275
|
+
*/
|
|
276
|
+
private runningRequestContext;
|
|
269
277
|
/**
|
|
270
278
|
* Respond with the final output and end execution.
|
|
271
279
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/agent.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/agent.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAGzF,OAAO,EAAiB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEzF,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAA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;;;OAmBG;cACa,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,GAAE,eAAwB,GAAG,OAAO,CAAC,OAAO,CAAC;IAqBpH;;;;;;;;;;;;;;;;;;;;;;;OAuBG;cACa,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAe9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;cACa,MAAM,CAAC,CAAC,SAAS,OAAO,EACtC,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,CAAC,EAClB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,YAAY,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;IAkBlE;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAQ7B;;;;OAIG;IACH,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK;IAS1B;;OAEG;IACH,IAAI,QAAQ,IAAI,cAAc,CAc7B;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,UAAU,GAAG,SAAS,CAUvC;CACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type FuncType, type Type } from '@frontmcp/di';
|
|
2
|
+
import { type CallSurface } from '../availability';
|
|
2
3
|
import { type ChannelMetadata, type ChannelNotification } from '../metadata/channel.metadata';
|
|
3
4
|
import { ExecutionContextBase, type ExecutionContextBaseArgs } from './execution-context.interface';
|
|
4
5
|
/**
|
|
@@ -127,5 +128,10 @@ export declare abstract class ChannelContext extends ExecutionContextBase<Channe
|
|
|
127
128
|
* @param payload - The raw event payload to process through `onEvent()`
|
|
128
129
|
*/
|
|
129
130
|
protected pushIncoming(payload: unknown): void;
|
|
131
|
+
/**
|
|
132
|
+
* While it handles an HTTP trigger (a webhook source's request), a channel calls tools on the
|
|
133
|
+
* `'http-trigger'` surface. Handling any other event, it dispatches in-process.
|
|
134
|
+
*/
|
|
135
|
+
protected callToolSurface(): CallSurface | undefined;
|
|
130
136
|
}
|
|
131
137
|
//# sourceMappingURL=channel.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/channel.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"channel.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/channel.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAIxD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,KAAK,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEpG;;;GAGG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,wBAAwB,GAAG;IACvD,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,8BAAsB,cAAe,SAAQ,oBAAoB,CAAC,mBAAmB,CAAC;IACpF,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;gBASvB,IAAI,EAAE,eAAe;IAWjC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAEhE;;;;;;OAMG;IACG,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAS1E;;;;;;;;;;;;;;;;;OAiBG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAIhC;;;OAGG;IACG,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAInC;;;;;;;;OAQG;IACH,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAQ9C;;;OAGG;cACgB,eAAe,IAAI,WAAW,GAAG,SAAS;CAG9D"}
|
|
@@ -4,6 +4,7 @@ import { type AuthInfo, type CallToolResult } from '@frontmcp/protocol';
|
|
|
4
4
|
import { type RuntimeContext } from '@frontmcp/utils';
|
|
5
5
|
import { ConfigService } from '../../builtin/config/providers/config.service';
|
|
6
6
|
import { type FrontMcpContext } from '../../context';
|
|
7
|
+
import { type CallSurface } from '../availability';
|
|
7
8
|
import { type ScopeEntry } from '../entries';
|
|
8
9
|
import { type ProviderRegistryInterface } from './internal';
|
|
9
10
|
import { type FrontMcpLogger } from './logger.interface';
|
|
@@ -117,6 +118,11 @@ export declare abstract class ExecutionContextBase<Out = unknown> {
|
|
|
117
118
|
* Authority/authorization checks still run — an internal call carries the
|
|
118
119
|
* same `authInfo` as the surrounding request, so ABAC/RBAC guards apply.
|
|
119
120
|
*
|
|
121
|
+
* `availableWhen.surface`: the call carries {@link callToolSurface}. From a tool, resource or
|
|
122
|
+
* prompt that is none (in-process dispatch, which no surface restricts); a job's call carries
|
|
123
|
+
* `'job'`, an agent's `'agent'`, and an HTTP trigger's `'http-trigger'`, so a tool whose `surface`
|
|
124
|
+
* leaves that caller out answers as an unknown tool.
|
|
125
|
+
*
|
|
120
126
|
* @param name Tool name (or fully-qualified `owner.name`).
|
|
121
127
|
* @param args Tool arguments — validated by the tool's input schema.
|
|
122
128
|
* @param opts Optional progress token / abort signal forwarded into `_meta`.
|
|
@@ -126,6 +132,12 @@ export declare abstract class ExecutionContextBase<Out = unknown> {
|
|
|
126
132
|
progressToken?: string | number;
|
|
127
133
|
signal?: AbortSignal;
|
|
128
134
|
}): Promise<CallToolResult>;
|
|
135
|
+
/**
|
|
136
|
+
* The surface (`availableWhen.surface`) a {@link callTool} from this context calls on. None by
|
|
137
|
+
* default: a tool, resource or prompt composing with other tools is in-process dispatch. Contexts
|
|
138
|
+
* that are callers of their own (jobs, agents, HTTP triggers) name their surface.
|
|
139
|
+
*/
|
|
140
|
+
protected callToolSurface(): CallSurface | undefined;
|
|
129
141
|
/**
|
|
130
142
|
* Fail the execution and trigger error handling.
|
|
131
143
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-context.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/execution-context.interface.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAiC,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAErF,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAC9E,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;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UzC
|
|
1
|
+
{"version":3,"file":"execution-context.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/execution-context.interface.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAiC,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAErF,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAC9E,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,yBAAyB,CAAC;IACrC,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC7B,CAAC;AAEF;;;GAGG;AACH,8BAAsB,oBAAoB,CAAC,GAAG,GAAG,OAAO;IACtD,OAAO,CAAC,SAAS,CAA4B;IAE7C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoB;IAE9C,+CAA+C;IAC/C,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAE1C,gDAAgD;IAChD,SAAS,CAAC,WAAW,SAAU;IAE/B,gCAAgC;IAChC,OAAO,CAAC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