@frontmcp/sdk 1.2.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -60
- package/agent/agent.scope.d.ts +164 -0
- package/agent/agent.scope.d.ts.map +1 -1
- package/app/instances/app.esm.instance.d.ts.map +1 -1
- package/app/instances/app.remote.instance.d.ts.map +1 -1
- package/auth/auth-ui/auth-ui.contract.d.ts +149 -0
- package/auth/auth-ui/auth-ui.contract.d.ts.map +1 -0
- package/auth/auth-ui/auth-ui.registry.d.ts +151 -0
- package/auth/auth-ui/auth-ui.registry.d.ts.map +1 -0
- package/auth/auth-ui/auth-ui.render.d.ts +49 -0
- package/auth/auth-ui/auth-ui.render.d.ts.map +1 -0
- package/auth/auth-ui/auth-ui.state.d.ts +62 -0
- package/auth/auth-ui/auth-ui.state.d.ts.map +1 -0
- package/auth/auth-ui/index.d.ts +24 -0
- package/auth/auth-ui/index.d.ts.map +1 -0
- package/auth/auth.registry.d.ts.map +1 -1
- package/auth/authorized-apps.utils.d.ts +51 -0
- package/auth/authorized-apps.utils.d.ts.map +1 -0
- package/auth/consent-tools.helper.d.ts +26 -0
- package/auth/consent-tools.helper.d.ts.map +1 -0
- package/auth/consent.utils.d.ts +62 -0
- package/auth/consent.utils.d.ts.map +1 -0
- package/auth/credentials/credentials.context-extension.d.ts +63 -0
- package/auth/credentials/credentials.context-extension.d.ts.map +1 -0
- package/auth/credentials/credentials.providers.d.ts +40 -0
- package/auth/credentials/credentials.providers.d.ts.map +1 -0
- package/auth/credentials/index.d.ts +3 -0
- package/auth/credentials/index.d.ts.map +1 -0
- package/auth/flows/auth.verify.flow.d.ts.map +1 -1
- package/auth/flows/oauth.auth-ui.flow.d.ts +53 -0
- package/auth/flows/oauth.auth-ui.flow.d.ts.map +1 -0
- package/auth/flows/oauth.authorize.flow.d.ts +51 -9
- package/auth/flows/oauth.authorize.flow.d.ts.map +1 -1
- package/auth/flows/oauth.callback.flow.d.ts +118 -5
- package/auth/flows/oauth.callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.connect.flow.d.ts +89 -0
- package/auth/flows/oauth.connect.flow.d.ts.map +1 -0
- package/auth/flows/oauth.provider-callback.flow.d.ts +34 -4
- package/auth/flows/oauth.provider-callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.register.flow.d.ts +16 -20
- package/auth/flows/oauth.register.flow.d.ts.map +1 -1
- package/auth/flows/oauth.token.flow.d.ts +2 -2
- package/auth/flows/oauth.token.flow.d.ts.map +1 -1
- package/auth/flows/oauth.userinfo.flow.d.ts +67 -0
- package/auth/flows/oauth.userinfo.flow.d.ts.map +1 -0
- package/auth/flows/session.verify.flow.d.ts +2 -2
- package/auth/flows/session.verify.flow.d.ts.map +1 -1
- package/auth/flows/well-known.jwks.flow.d.ts +3 -3
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts +3 -2
- package/auth/flows/well-known.oauth-authorization-server.flow.d.ts.map +1 -1
- package/auth/flows/well-known.prm.flow.d.ts +1 -1
- package/auth/flows/well-known.prm.flow.d.ts.map +1 -1
- package/auth/instances/instance.local-primary-auth.d.ts +226 -12
- package/auth/instances/instance.local-primary-auth.d.ts.map +1 -1
- package/auth/secure-store/index.d.ts +3 -0
- package/auth/secure-store/index.d.ts.map +1 -0
- package/auth/secure-store/secure-store.context-extension.d.ts +61 -0
- package/auth/secure-store/secure-store.context-extension.d.ts.map +1 -0
- package/auth/secure-store/secure-store.providers.d.ts +36 -0
- package/auth/secure-store/secure-store.providers.d.ts.map +1 -0
- package/auth/session/session-store.factory.d.ts +25 -5
- package/auth/session/session-store.factory.d.ts.map +1 -1
- package/common/decorators/agent.decorator.d.ts +32 -0
- package/common/decorators/agent.decorator.d.ts.map +1 -1
- package/common/decorators/app.decorator.d.ts.map +1 -1
- package/common/decorators/front-mcp.decorator.d.ts.map +1 -1
- package/common/decorators/skill.decorator.d.ts +26 -9
- package/common/decorators/skill.decorator.d.ts.map +1 -1
- package/common/decorators/tool.decorator.d.ts +44 -0
- package/common/decorators/tool.decorator.d.ts.map +1 -1
- package/common/entries/scope.entry.d.ts +7 -0
- package/common/entries/scope.entry.d.ts.map +1 -1
- package/common/entries/skill.entry.d.ts +22 -1
- package/common/entries/skill.entry.d.ts.map +1 -1
- package/common/entries/tool.entry.d.ts +17 -0
- package/common/entries/tool.entry.d.ts.map +1 -1
- package/common/interfaces/internal/primary-auth-provider.interface.d.ts +18 -0
- package/common/interfaces/internal/primary-auth-provider.interface.d.ts.map +1 -1
- package/common/interfaces/skill.interface.d.ts +17 -4
- package/common/interfaces/skill.interface.d.ts.map +1 -1
- package/common/interfaces/tool.interface.d.ts +26 -0
- package/common/interfaces/tool.interface.d.ts.map +1 -1
- package/common/metadata/agent.metadata.d.ts +10 -0
- package/common/metadata/agent.metadata.d.ts.map +1 -1
- package/common/metadata/app.metadata.d.ts +472 -0
- package/common/metadata/app.metadata.d.ts.map +1 -1
- package/common/metadata/channel.metadata.d.ts +10 -0
- package/common/metadata/channel.metadata.d.ts.map +1 -1
- package/common/metadata/front-mcp.metadata.d.ts +2103 -49
- package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
- package/common/metadata/index.d.ts +1 -0
- package/common/metadata/index.d.ts.map +1 -1
- package/common/metadata/output-policy.d.ts +82 -0
- package/common/metadata/output-policy.d.ts.map +1 -0
- package/common/metadata/prompt.metadata.d.ts +10 -0
- package/common/metadata/prompt.metadata.d.ts.map +1 -1
- package/common/metadata/resource.metadata.d.ts +20 -0
- package/common/metadata/resource.metadata.d.ts.map +1 -1
- package/common/metadata/skill.metadata.d.ts +55 -1
- package/common/metadata/skill.metadata.d.ts.map +1 -1
- package/common/metadata/tool-ui.metadata.d.ts +1 -1
- package/common/metadata/tool-ui.metadata.d.ts.map +1 -1
- package/common/metadata/tool.metadata.d.ts +75 -0
- package/common/metadata/tool.metadata.d.ts.map +1 -1
- package/common/records/skill.record.d.ts +2 -0
- package/common/records/skill.record.d.ts.map +1 -1
- package/common/schemas/http-output.schema.d.ts +25 -25
- package/common/schemas/http-output.schema.d.ts.map +1 -1
- package/common/tokens/app.tokens.d.ts.map +1 -1
- package/common/tokens/front-mcp.tokens.d.ts.map +1 -1
- package/common/tokens/skill.tokens.d.ts +10 -0
- package/common/tokens/skill.tokens.d.ts.map +1 -1
- package/common/tokens/tool.tokens.d.ts +1 -0
- package/common/tokens/tool.tokens.d.ts.map +1 -1
- package/common/types/auth/session.types.d.ts +2 -2
- package/common/types/options/auth/index.d.ts +4 -4
- package/common/types/options/auth/index.d.ts.map +1 -1
- package/common/types/options/auth/interfaces.d.ts +1 -1
- package/common/types/options/auth/interfaces.d.ts.map +1 -1
- package/common/types/options/auth/orchestrated.schema.d.ts +1 -1
- package/common/types/options/auth/orchestrated.schema.d.ts.map +1 -1
- package/common/types/options/auth/shared.schemas.d.ts +2 -2
- package/common/types/options/auth/shared.schemas.d.ts.map +1 -1
- package/common/types/options/http/index.d.ts +1 -1
- package/common/types/options/http/index.d.ts.map +1 -1
- package/common/types/options/http/interfaces.d.ts +88 -1
- package/common/types/options/http/interfaces.d.ts.map +1 -1
- package/common/types/options/http/schema.d.ts +17 -0
- package/common/types/options/http/schema.d.ts.map +1 -1
- package/common/types/options/index.d.ts +1 -0
- package/common/types/options/index.d.ts.map +1 -1
- package/common/types/options/metrics/index.d.ts +3 -0
- package/common/types/options/metrics/index.d.ts.map +1 -0
- package/common/types/options/metrics/interfaces.d.ts +154 -0
- package/common/types/options/metrics/interfaces.d.ts.map +1 -0
- package/common/types/options/metrics/schema.d.ts +33 -0
- package/common/types/options/metrics/schema.d.ts.map +1 -0
- package/common/types/options/session/schema.d.ts +3 -3
- package/common/types/options/sqlite/index.d.ts +2 -0
- package/common/types/options/sqlite/index.d.ts.map +1 -1
- package/common/types/options/sqlite/interfaces.d.ts +7 -2
- package/common/types/options/sqlite/interfaces.d.ts.map +1 -1
- package/common/types/options/sqlite/resolve.d.ts +29 -0
- package/common/types/options/sqlite/resolve.d.ts.map +1 -0
- package/common/types/options/sqlite/schema.d.ts +1 -1
- package/common/types/options/sqlite/schema.d.ts.map +1 -1
- package/common/types/options/transport/interfaces.d.ts +23 -7
- package/common/types/options/transport/interfaces.d.ts.map +1 -1
- package/common/types/options/transport/schema.d.ts +24 -5
- package/common/types/options/transport/schema.d.ts.map +1 -1
- package/common/utils/caller-dir.utils.d.ts +15 -0
- package/common/utils/caller-dir.utils.d.ts.map +1 -0
- package/common/utils/index.d.ts +1 -0
- package/common/utils/index.d.ts.map +1 -1
- package/direct/client.types.d.ts +10 -0
- package/direct/client.types.d.ts.map +1 -1
- package/elicitation/store/elicitation-store.factory.d.ts +19 -5
- package/elicitation/store/elicitation-store.factory.d.ts.map +1 -1
- package/errors/index.d.ts +4 -2
- package/errors/index.d.ts.map +1 -1
- package/errors/mcp.error.d.ts +79 -4
- package/errors/mcp.error.d.ts.map +1 -1
- package/errors/sdk.errors.d.ts +13 -0
- package/errors/sdk.errors.d.ts.map +1 -1
- package/errors/tool-credentials-required.error.d.ts +70 -0
- package/errors/tool-credentials-required.error.d.ts.map +1 -0
- package/esm/index.mjs +7689 -3080
- package/flows/flow.instance.d.ts.map +1 -1
- package/front-mcp/front-mcp.d.ts +61 -32
- package/front-mcp/front-mcp.d.ts.map +1 -1
- package/front-mcp/front-mcp.providers.d.ts +804 -12
- package/front-mcp/front-mcp.providers.d.ts.map +1 -1
- package/index.d.ts +35 -8
- package/index.d.ts.map +1 -1
- package/index.js +8264 -3675
- package/job/index.d.ts +1 -0
- package/job/index.d.ts.map +1 -1
- package/metrics/index.d.ts +4 -0
- package/metrics/index.d.ts.map +1 -0
- package/metrics/metrics.errors.d.ts +18 -0
- package/metrics/metrics.errors.d.ts.map +1 -0
- package/metrics/metrics.routes.d.ts +30 -0
- package/metrics/metrics.routes.d.ts.map +1 -0
- package/metrics/metrics.service.d.ts +66 -0
- package/metrics/metrics.service.d.ts.map +1 -0
- package/package.json +30 -11
- package/prompt/prompt.registry.d.ts +5 -0
- package/prompt/prompt.registry.d.ts.map +1 -1
- package/resource/resource.registry.d.ts +5 -0
- package/resource/resource.registry.d.ts.map +1 -1
- package/scope/flows/http.request.flow.d.ts +18 -1
- package/scope/flows/http.request.flow.d.ts.map +1 -1
- package/scope/optional-dependency.util.d.ts +39 -0
- package/scope/optional-dependency.util.d.ts.map +1 -0
- package/scope/scope.instance.d.ts +30 -0
- package/scope/scope.instance.d.ts.map +1 -1
- package/scope/scope.utils.d.ts.map +1 -1
- package/server/adapters/express.host.adapter.d.ts +16 -0
- package/server/adapters/express.host.adapter.d.ts.map +1 -1
- package/server/adapters/polyfills/browser-express-host.d.ts +3 -0
- package/server/adapters/polyfills/browser-express-host.d.ts.map +1 -1
- package/server/adapters/polyfills/node-express-host.d.ts +1 -1
- package/server/adapters/polyfills/node-express-host.d.ts.map +1 -1
- package/server/custom-routes.helper.d.ts +81 -0
- package/server/custom-routes.helper.d.ts.map +1 -0
- package/server/server.instance.d.ts +16 -0
- package/server/server.instance.d.ts.map +1 -1
- package/skill/flows/http/llm-full-txt.flow.d.ts +1 -1
- package/skill/flows/http/llm-txt.flow.d.ts +1 -1
- package/skill/flows/http/skills-api.flow.d.ts +18 -1
- package/skill/flows/http/skills-api.flow.d.ts.map +1 -1
- package/skill/flows/load-skill.flow.d.ts +7 -0
- package/skill/flows/load-skill.flow.d.ts.map +1 -1
- package/skill/flows/search-skills.flow.d.ts +13 -0
- package/skill/flows/search-skills.flow.d.ts.map +1 -1
- package/skill/index.d.ts +1 -0
- package/skill/index.d.ts.map +1 -1
- package/skill/sep-2640/resources/skill-file.resource.d.ts.map +1 -1
- package/skill/sep-2640/resources/skill-index.resource.d.ts.map +1 -1
- package/skill/sep-2640/resources/skill-md.resource.d.ts.map +1 -1
- package/skill/sep-2640/sep-2640.per-skill.d.ts.map +1 -1
- package/skill/skill-authorities.helper.d.ts +100 -0
- package/skill/skill-authorities.helper.d.ts.map +1 -0
- package/skill/skill.instance.d.ts.map +1 -1
- package/skill/skill.registry.d.ts +34 -0
- package/skill/skill.registry.d.ts.map +1 -1
- package/skill/skill.utils.d.ts.map +1 -1
- package/task/helpers/cli-task-runner.d.ts.map +1 -1
- package/tool/flows/call-tool.flow.d.ts +26 -1
- package/tool/flows/call-tool.flow.d.ts.map +1 -1
- package/tool/flows/tool-credentials.gate.d.ts +31 -0
- package/tool/flows/tool-credentials.gate.d.ts.map +1 -0
- package/tool/flows/tools-list.flow.d.ts.map +1 -1
- package/tool/tool.instance.d.ts.map +1 -1
- package/tool/tool.registry.d.ts +6 -0
- package/tool/tool.registry.d.ts.map +1 -1
- package/tool/ui/index.d.ts +1 -1
- package/tool/ui/index.d.ts.map +1 -1
- package/tool/ui/ui-resource.handler.d.ts.map +1 -1
- package/tool/ui/ui-shared.d.ts +33 -1
- package/tool/ui/ui-shared.d.ts.map +1 -1
- package/transport/adapters/transport.local.adapter.d.ts.map +1 -1
- package/transport/event-stores/event-store.factory.d.ts.map +1 -1
- package/transport/flows/handle.sse.flow.d.ts +1 -1
- package/transport/flows/handle.streamable-http.flow.d.ts +58 -1
- package/transport/flows/handle.streamable-http.flow.d.ts.map +1 -1
- package/transport/mcp-handlers/call-tool-request.handler.d.ts.map +1 -1
- package/transport/mcp-handlers/index.d.ts.map +1 -1
- 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/transport.registry.d.ts +24 -3
- package/transport/transport.registry.d.ts.map +1 -1
- package/workflow/index.d.ts +1 -0
- package/workflow/index.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elicitation-store.factory.d.ts","sourceRoot":"","sources":["../../../src/elicitation/store/elicitation-store.factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"elicitation-store.factory.d.ts","sourceRoot":"","sources":["../../../src/elicitation/store/elicitation-store.factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAA8C,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEnH,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGpG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAI5D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;;OAIG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAE1B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAE5B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;;;;;;;;;OAeG;IACH,UAAU,CAAC,EAAE;QACX;;;;;;WAMG;QACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAE3B;;;WAGG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,EAAE,gBAAgB,CAAC;IAExB;;OAEG;IACH,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEzD;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,GAAE,uBAA4B,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAqLnH;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,UAAU,CAAC,EAAE;QACX,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACE,GACL,sBAAsB,CAwBxB;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,WAAW,EACpB,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE;QACX,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACE,GACL,sBAAsB,CAsCxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,kBAAkB,EAChC,YAAY,GAAE;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;CACpB,GACL,gBAAgB,CAgBlB"}
|
package/errors/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export { McpError, PublicMcpError, InternalMcpError, ToolNotFoundError, ToolExecutionError, EntryUnavailableError, ResourceNotFoundError, ResourceReadError, InvalidResourceUriError, InvalidInputError, InvalidOutputError, InvalidMethodError, RateLimitError, QuotaExceededError, UnauthorizedError, SessionMissingError, UnsupportedClientVersionError, GenericServerError, DependencyNotFoundError, InvalidHookFlowError, InvalidPluginScopeError, RequestContextNotAvailableError, AuthConfigurationError, GlobalConfigNotFoundError, PromptNotFoundError, PromptExecutionError, isPublicError, toMcpError, formatMcpErrorResponse, extractPublicMessage, MCP_ERROR_CODES, type McpErrorCode, } from './mcp.error';
|
|
1
|
+
export { McpError, PublicMcpError, InternalMcpError, ToolNotFoundError, ToolNotConsentedError, ToolExecutionError, EntryUnavailableError, ResourceNotFoundError, ResourceReadError, InvalidResourceUriError, InvalidInputError, InvalidOutputError, InvalidMethodError, PayloadTooLargeError, RateLimitError, QuotaExceededError, UnauthorizedError, SessionMissingError, UnsupportedClientVersionError, GenericServerError, DependencyNotFoundError, InvalidHookFlowError, InvalidPluginScopeError, RequestContextNotAvailableError, AuthConfigurationError, GlobalConfigNotFoundError, PromptNotFoundError, PromptExecutionError, isPublicError, toMcpError, formatMcpErrorResponse, extractPublicMessage, MCP_ERROR_CODES, type McpErrorCode, } from './mcp.error';
|
|
2
2
|
export { authorizationRequiredDataSchema, authorizationRequiredParamsSchema, authorizationRequiredMetaSchema, AuthorizationRequiredError, } from './authorization-required.error';
|
|
3
3
|
export type { AuthorizationRequiredData, AuthorizationRequiredParams, AuthorizationRequiredMeta, } from './authorization-required.error';
|
|
4
|
+
export { ToolCredentialsRequiredError } from './tool-credentials-required.error';
|
|
5
|
+
export type { ToolCredentialsRequiredData } from './tool-credentials-required.error';
|
|
4
6
|
export { ErrorHandler, createErrorHandler, shouldStopExecution } from './error-handler';
|
|
5
7
|
export type { ErrorHandlerOptions } from './error-handler';
|
|
6
8
|
export { AgentNotFoundError, AgentExecutionError, AgentLoopExceededError, AgentTimeoutError, AgentVisibilityError, AgentLlmError, AgentConfigurationError, AgentNotConfiguredError, AgentToolNotFoundError, } from './agent.errors';
|
|
@@ -15,5 +17,5 @@ export { MethodNotImplementedError, UnsupportedTransportTypeError, TransportBusR
|
|
|
15
17
|
export { EncryptionContextNotSetError, VaultLoadError, VaultNotFoundError, TokenNotAvailableError, TokenStoreRequiredError, NoProviderIdError, TokenLeakDetectedError, SessionSecretRequiredError, CredentialProviderAlreadyRegisteredError, AuthProvidersNotConfiguredError, OrchestratedAuthNotAvailableError, EncryptionKeyNotConfiguredError, SessionIdEmptyError, ElicitationSecretRequiredError, ScopeDeniedError, InMemoryStoreRequiredError, OrchestratorJwksNotAvailableError, } from './auth-internal.errors';
|
|
16
18
|
export { WorkflowStepNotFoundError, WorkflowTimeoutError, WorkflowDagValidationError, WorkflowJobTimeoutError, } from './workflow.errors';
|
|
17
19
|
export { EsmPackageLoadError, EsmVersionResolutionError, EsmManifestInvalidError, EsmCacheError, EsmRegistryAuthError, EsmInvalidSpecifierError, } from './esm.errors';
|
|
18
|
-
export { FlowExitedWithoutOutputError, ServerNotFoundError, ConfigNotFoundError, SessionVerificationFailedError, ContextExtensionNotAvailableError, ScopeConfigurationError, HaConfigurationError, InvokeStateMissingKeyError, SkillSessionError, InvalidSkillError, SkillInstructionFetchError, InvalidInstructionSourceError, ServerlessHandlerNotInitializedError, MissingPromptArgumentError, DynamicAdapterNameError, AgentConfigKeyNotFoundError, AgentToolExecutionError, AgentMethodNotAvailableError, VercelKvNotSupportedError, VercelKvAsyncInitRequiredError, RequiredConfigUndefinedError, RegistryNotInitializedError, EnclaveExecutionError, FlowInputMissingError, DynamicJobDirectExecutionError, } from './sdk.errors';
|
|
20
|
+
export { FlowExitedWithoutOutputError, ServerNotFoundError, ConfigNotFoundError, SessionVerificationFailedError, ContextExtensionNotAvailableError, ScopeConfigurationError, HaConfigurationError, InvokeStateMissingKeyError, SkillSessionError, InvalidSkillError, SkillInstructionFetchError, InvalidInstructionSourceError, SkillContextNotImplementedError, ServerlessHandlerNotInitializedError, MissingPromptArgumentError, DynamicAdapterNameError, AgentConfigKeyNotFoundError, AgentToolExecutionError, AgentMethodNotAvailableError, VercelKvNotSupportedError, VercelKvAsyncInitRequiredError, RequiredConfigUndefinedError, RegistryNotInitializedError, EnclaveExecutionError, FlowInputMissingError, DynamicJobDirectExecutionError, } from './sdk.errors';
|
|
19
21
|
//# sourceMappingURL=index.d.ts.map
|
package/errors/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,QAAQ,EACR,cAAc,EACd,gBAAgB,EAEhB,iBAAiB,EACjB,kBAAkB,EAElB,qBAAqB,EAErB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EAEvB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,QAAQ,EACR,cAAc,EACd,gBAAgB,EAEhB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAElB,qBAAqB,EAErB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EAEvB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EAEpB,cAAc,EACd,kBAAkB,EAElB,iBAAiB,EAEjB,mBAAmB,EACnB,6BAA6B,EAE7B,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,+BAA+B,EAE/B,sBAAsB,EACtB,yBAAyB,EAEzB,mBAAmB,EACnB,oBAAoB,EAEpB,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,oBAAoB,EAEpB,eAAe,EACf,KAAK,YAAY,GAClB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAEL,+BAA+B,EAC/B,iCAAiC,EACjC,+BAA+B,EAE/B,0BAA0B,GAC3B,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,YAAY,EAAE,2BAA2B,EAAE,MAAM,mCA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B,8BAA8B,GAC/B,MAAM,cAAc,CAAC"}
|
package/errors/mcp.error.d.ts
CHANGED
|
@@ -76,7 +76,14 @@ export declare class PublicMcpError extends McpError {
|
|
|
76
76
|
readonly isPublic = true;
|
|
77
77
|
readonly statusCode: number;
|
|
78
78
|
readonly code: string;
|
|
79
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Optional RFC 6750 `WWW-Authenticate` challenge to forward to the client
|
|
81
|
+
* when the error maps to a 401. Set by callers that attach an auth challenge
|
|
82
|
+
* (e.g. the local transport adapter when a verified token's session can't be
|
|
83
|
+
* reconstructed, #471); rendered by the flow runner into a response header.
|
|
84
|
+
*/
|
|
85
|
+
readonly wwwAuthenticate?: string;
|
|
86
|
+
constructor(message: string, code?: string, statusCode?: number, wwwAuthenticate?: string);
|
|
80
87
|
getPublicMessage(): string;
|
|
81
88
|
}
|
|
82
89
|
/**
|
|
@@ -96,20 +103,68 @@ export declare class InternalMcpError extends McpError {
|
|
|
96
103
|
export declare class ToolNotFoundError extends PublicMcpError {
|
|
97
104
|
constructor(toolName: string);
|
|
98
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Tool not consented error.
|
|
108
|
+
*
|
|
109
|
+
* Thrown at `tools/call` time when consent mode is enabled and the caller's
|
|
110
|
+
* verified token carries a `consent` claim whose selected-tool set does NOT
|
|
111
|
+
* include the requested tool. This is the runtime enforcement of the consent
|
|
112
|
+
* screen: a user who unchecked a tool during authorization cannot invoke it.
|
|
113
|
+
*
|
|
114
|
+
* Tokens with NO consent metadata (consent disabled) never reach this error —
|
|
115
|
+
* the call-tool flow skips the check entirely so the default (allow-all)
|
|
116
|
+
* behavior is preserved.
|
|
117
|
+
*
|
|
118
|
+
* Mapped to JSON-RPC -32003 (FORBIDDEN) so clients can distinguish a
|
|
119
|
+
* deliberately-withheld tool from a missing one (-32601 / 404).
|
|
120
|
+
*/
|
|
121
|
+
export declare class ToolNotConsentedError extends PublicMcpError {
|
|
122
|
+
readonly mcpErrorCode: -32003;
|
|
123
|
+
readonly toolName: string;
|
|
124
|
+
constructor(toolName: string);
|
|
125
|
+
toJsonRpcError(): {
|
|
126
|
+
code: number;
|
|
127
|
+
message: string;
|
|
128
|
+
data: {
|
|
129
|
+
tool: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
}
|
|
99
133
|
/**
|
|
100
134
|
* Entry unavailable in the current environment.
|
|
101
135
|
* Thrown when a tool/resource/prompt/skill/agent exists but is restricted
|
|
102
|
-
* by its `availableWhen` constraint (
|
|
136
|
+
* by its `availableWhen` constraint (os, runtime, deployment, provider,
|
|
137
|
+
* target, surface, or env).
|
|
138
|
+
*
|
|
139
|
+
* Issue #417 — the error data now carries `missingAxes` so clients can
|
|
140
|
+
* surface "this tool isn't reachable because surface=mcp / provider=vercel
|
|
141
|
+
* / target=cli / …" without parsing the prose message.
|
|
103
142
|
*/
|
|
104
143
|
export declare class EntryUnavailableError extends PublicMcpError {
|
|
105
144
|
readonly mcpErrorCode: -32003;
|
|
106
|
-
|
|
145
|
+
readonly entryType: string;
|
|
146
|
+
readonly entryName: string;
|
|
147
|
+
readonly availability?: unknown;
|
|
148
|
+
readonly runtimeContext?: unknown;
|
|
149
|
+
/** Issue #417 — axes that failed to match (e.g. ['surface', 'provider']). */
|
|
150
|
+
readonly missingAxes: string[];
|
|
151
|
+
constructor(entryType: string, entryName: string, availability?: unknown, runtimeContext?: unknown, missingAxes?: string[]);
|
|
107
152
|
/**
|
|
108
153
|
* Convert to JSON-RPC error format per MCP specification.
|
|
154
|
+
*
|
|
155
|
+
* Issue #417 — `data` now exposes `{tool, missingAxes, constraint, context}`
|
|
156
|
+
* so MCP clients can react structurally without parsing prose.
|
|
109
157
|
*/
|
|
110
158
|
toJsonRpcError(): {
|
|
111
159
|
code: number;
|
|
112
160
|
message: string;
|
|
161
|
+
data: {
|
|
162
|
+
entryType: string;
|
|
163
|
+
entry: string;
|
|
164
|
+
missingAxes: string[];
|
|
165
|
+
constraint?: unknown;
|
|
166
|
+
context?: unknown;
|
|
167
|
+
};
|
|
113
168
|
};
|
|
114
169
|
}
|
|
115
170
|
/**
|
|
@@ -184,6 +239,26 @@ export declare class InvalidOutputError extends InternalMcpError {
|
|
|
184
239
|
export declare class InvalidMethodError extends PublicMcpError {
|
|
185
240
|
constructor(method: string, expected: string);
|
|
186
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* Request body exceeded the configured size limit.
|
|
244
|
+
* Mapped to HTTP 413 by transport adapters and to JSON-RPC -32600
|
|
245
|
+
* (Invalid Request) by `toJsonRpcError()` — JSON-RPC has no dedicated
|
|
246
|
+
* "payload too large" code.
|
|
247
|
+
*/
|
|
248
|
+
export declare class PayloadTooLargeError extends PublicMcpError {
|
|
249
|
+
readonly limit?: number;
|
|
250
|
+
readonly length?: number;
|
|
251
|
+
readonly mcpErrorCode: -32600;
|
|
252
|
+
constructor(limit?: number, length?: number);
|
|
253
|
+
toJsonRpcError(): {
|
|
254
|
+
code: number;
|
|
255
|
+
message: string;
|
|
256
|
+
data: {
|
|
257
|
+
limit?: number;
|
|
258
|
+
length?: number;
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
}
|
|
187
262
|
/**
|
|
188
263
|
* Tool execution error (internal)
|
|
189
264
|
*/
|
|
@@ -208,7 +283,7 @@ export declare class QuotaExceededError extends PublicMcpError {
|
|
|
208
283
|
* Unauthorized error
|
|
209
284
|
*/
|
|
210
285
|
export declare class UnauthorizedError extends PublicMcpError {
|
|
211
|
-
constructor(message?: string);
|
|
286
|
+
constructor(message?: string, wwwAuthenticate?: string);
|
|
212
287
|
}
|
|
213
288
|
/**
|
|
214
289
|
* Generic server error wrapper
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.error.d.ts","sourceRoot":"","sources":["../../src/errors/mcp.error.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B,kDAAkD;;IAElD,kCAAkC;;IAElC,+DAA+D;;IAE/D,+BAA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BAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE3D"}
|
package/errors/sdk.errors.d.ts
CHANGED
|
@@ -72,6 +72,19 @@ export declare class SkillInstructionFetchError extends InternalMcpError {
|
|
|
72
72
|
export declare class InvalidInstructionSourceError extends InternalMcpError {
|
|
73
73
|
constructor();
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Thrown when a user calls `SkillContext.loadInstructions()` or
|
|
77
|
+
* `SkillContext.build()` directly on a skill that does not override them.
|
|
78
|
+
*
|
|
79
|
+
* Under the normal `@Skill`-decorator flow these methods are never invoked on
|
|
80
|
+
* the user's class — the runtime drives loading via `SkillInstance` against
|
|
81
|
+
* the decorator metadata. This error fires only when user code constructs a
|
|
82
|
+
* `SkillContext` subclass manually (outside the decorator pipeline) and
|
|
83
|
+
* forgets to provide an implementation.
|
|
84
|
+
*/
|
|
85
|
+
export declare class SkillContextNotImplementedError extends InternalMcpError {
|
|
86
|
+
constructor(skillName: string, method: 'loadInstructions' | 'build');
|
|
87
|
+
}
|
|
75
88
|
/**
|
|
76
89
|
* Thrown when a serverless handler is not initialized.
|
|
77
90
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.errors.d.ts","sourceRoot":"","sources":["../../src/errors/sdk.errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,gBAAgB;;CAIjE;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,gBAAgB;;CAIxD;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,gBAAgB;gBAC3C,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE;CAMhD;AAED;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,gBAAgB;;CAInE;AAED;;GAEG;AACH,qBAAa,iCAAkC,SAAQ,gBAAgB;IACrE,Q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AM;CAGzB;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,gBAAgB;gBAC/C,OAAO,EAAE,MAAM;CAG5B;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,gBAAgB;gBACpD,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAGzC;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,gBAAgB;gBACjD,OAAO,EAAE,MAAM;CAG5B;AAED;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,gBAAgB;gBACtD,OAAO,CAAC,EAAE,MAAM;CAM7B;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,gBAAgB;gBACpD,IAAI,EAAE,MAAM;CAGzB;AAED;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,gBAAgB;gBACnD,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAG5C;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,gBAAgB;IACzD,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC;gBAEnB,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAI3C;AAED;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,gBAAgB;gBACtD,OAAO,CAAC,EAAE,MAAM;CAM7B;AAED;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,gBAAgB;IACzD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAEf,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;CAQ7C"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Credentials Required Error
|
|
3
|
+
*
|
|
4
|
+
* Thrown by the `checkToolCredentials` stage of the call-tool flow when a tool
|
|
5
|
+
* declares one or more `authProviders` with `required: true` (the default) and
|
|
6
|
+
* the credential for at least one of them is NOT available for the current
|
|
7
|
+
* authenticated session.
|
|
8
|
+
*
|
|
9
|
+
* This is the TOOL-LEVEL credential gate — distinct from {@link AuthorizationRequiredError},
|
|
10
|
+
* which gates at the APP level (progressive app authorization). A tool can be
|
|
11
|
+
* reachable (its app authorized) yet still miss a per-provider credential; this
|
|
12
|
+
* error covers that case and aborts the call BEFORE `execute()` runs.
|
|
13
|
+
*
|
|
14
|
+
* Mapped to JSON-RPC `-32001` (MCP `UNAUTHORIZED`) so clients can distinguish a
|
|
15
|
+
* missing-credential gate from a missing tool (`-32601`) or a withheld/consent
|
|
16
|
+
* tool (`-32003`). The `data` payload carries the offending provider id(s) and
|
|
17
|
+
* an `authUrl` (a framework-signed connect/authorize URL) the client/agent can
|
|
18
|
+
* open to (re)authorize. Both `authUrl` (camelCase, primary) and `auth_url`
|
|
19
|
+
* (snake_case, matching {@link AuthorizationRequiredError}'s convention) are
|
|
20
|
+
* emitted so either naming convention resolves.
|
|
21
|
+
*/
|
|
22
|
+
import { PublicMcpError } from './mcp.error';
|
|
23
|
+
/** JSON-RPC `data` payload for {@link ToolCredentialsRequiredError}. */
|
|
24
|
+
export interface ToolCredentialsRequiredData {
|
|
25
|
+
/** The tool that required the missing credential(s). */
|
|
26
|
+
tool: string;
|
|
27
|
+
/** Provider id(s) whose credential is required but unavailable. */
|
|
28
|
+
providers: string[];
|
|
29
|
+
/** Framework-signed connect/authorize URL (camelCase, primary). */
|
|
30
|
+
authUrl?: string;
|
|
31
|
+
/** Same URL under the snake_case key used by AuthorizationRequiredError. */
|
|
32
|
+
auth_url?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare class ToolCredentialsRequiredError extends PublicMcpError {
|
|
35
|
+
/** JSON-RPC code: MCP UNAUTHORIZED (-32001). */
|
|
36
|
+
readonly mcpErrorCode: -32001;
|
|
37
|
+
/** Tool id that triggered the gate. */
|
|
38
|
+
readonly toolId: string;
|
|
39
|
+
/** Provider id(s) whose credential is required but missing. */
|
|
40
|
+
readonly providers: string[];
|
|
41
|
+
/** Connect/authorize URL to (re)authorize the provider(s), if resolvable. */
|
|
42
|
+
readonly authUrl?: string;
|
|
43
|
+
constructor(params: {
|
|
44
|
+
toolId: string;
|
|
45
|
+
providers: string[];
|
|
46
|
+
authUrl?: string;
|
|
47
|
+
message?: string;
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* Convert to JSON-RPC error format per MCP specification.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* {
|
|
54
|
+
* "code": -32001,
|
|
55
|
+
* "message": "Tool \"deploy_app\" requires credentials for github ...",
|
|
56
|
+
* "data": {
|
|
57
|
+
* "tool": "deploy_app",
|
|
58
|
+
* "providers": ["github"],
|
|
59
|
+
* "authUrl": "https://.../oauth/connect?token=…",
|
|
60
|
+
* "auth_url": "https://.../oauth/connect?token=…"
|
|
61
|
+
* }
|
|
62
|
+
* }
|
|
63
|
+
*/
|
|
64
|
+
toJsonRpcError(): {
|
|
65
|
+
code: number;
|
|
66
|
+
message: string;
|
|
67
|
+
data: ToolCredentialsRequiredData;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=tool-credentials-required.error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-credentials-required.error.d.ts","sourceRoot":"","sources":["../../src/errors/tool-credentials-required.error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAmB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE9D,wEAAwE;AACxE,MAAM,WAAW,2BAA2B;IAC1C,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,4BAA6B,SAAQ,cAAc;IAC9D,gDAAgD;IAChD,QAAQ,CAAC,YAAY,SAAgC;IAErD,uCAAuC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,+DAA+D;IAC/D,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAE7B,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;gBAEd,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAY/F;;;;;;;;;;;;;;OAcG;IACH,cAAc,IAAI;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,2BAA2B,CAAC;KACnC;CAWF"}
|