@toa.io/extensions.exposition 1.0.0-alpha.283 → 1.0.0-alpha.285
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/CHANGELOG.md +40 -0
- package/components/exposition.octets/types/index.d.ts +1 -1
- package/components/identity.bans/operations/transit.js +1 -1
- package/components/identity.bans/tsconfig.json +1 -1
- package/components/identity.bans/tsconfig.tsbuildinfo +1 -1
- package/components/identity.bans/types/index.d.ts +1 -1
- package/components/identity.basic/operations/add.js +1 -1
- package/components/identity.basic/operations/authenticate.js +1 -1
- package/components/identity.basic/operations/check.js +1 -1
- package/components/identity.basic/operations/delete.js +1 -1
- package/components/identity.basic/operations/incept.js +18 -2
- package/components/identity.basic/operations/info.js +1 -1
- package/components/identity.basic/operations/lib/credentials.js +1 -1
- package/components/identity.basic/operations/transit.js +1 -1
- package/components/identity.basic/source/incept.ts +29 -1
- package/components/identity.basic/tsconfig.json +1 -1
- package/components/identity.basic/tsconfig.tsbuildinfo +1 -1
- package/components/identity.basic/types/index.d.ts +3 -2
- package/components/identity.clients/operations/describe.js +1 -1
- package/components/identity.clients/operations/lib/Context.js +1 -1
- package/components/identity.clients/operations/lib/Entity.js +1 -1
- package/components/identity.clients/operations/lib/canonical.js +1 -1
- package/components/identity.clients/operations/lib/cimd.js +1 -1
- package/components/identity.clients/operations/lib/errors.js +1 -1
- package/components/identity.clients/operations/lib/index.js +1 -1
- package/components/identity.clients/operations/lib/redirect.js +1 -1
- package/components/identity.clients/operations/register.js +1 -1
- package/components/identity.clients/tsconfig.json +1 -1
- package/components/identity.clients/tsconfig.tsbuildinfo +1 -1
- package/components/identity.clients/types/index.d.ts +1 -1
- package/components/identity.credentials/operations/list.js +1 -1
- package/components/identity.credentials/tsconfig.json +4 -2
- package/components/identity.credentials/tsconfig.tsbuildinfo +1 -1
- package/components/identity.credentials/types/index.d.ts +1 -1
- package/components/identity.federation/operations/authenticate.js +7 -3
- package/components/identity.federation/operations/create.js +1 -1
- package/components/identity.federation/operations/decode.js +1 -1
- package/components/identity.federation/operations/delete.js +1 -1
- package/components/identity.federation/operations/incept.js +6 -2
- package/components/identity.federation/operations/lib/Configuration.js +1 -1
- package/components/identity.federation/operations/lib/Ctx.js +1 -1
- package/components/identity.federation/operations/lib/Payload.js +1 -1
- package/components/identity.federation/operations/lib/decode.js +1 -1
- package/components/identity.federation/operations/lib/discovery.js +1 -1
- package/components/identity.federation/operations/lib/errors.js +1 -1
- package/components/identity.federation/operations/lib/exchange.js +1 -1
- package/components/identity.federation/operations/lib/index.js +2 -1
- package/components/identity.federation/operations/lib/jose.js +1 -1
- package/components/identity.federation/operations/lib/principal.js +14 -0
- package/components/identity.federation/operations/lib/resolve.js +1 -1
- package/components/identity.federation/operations/list.js +1 -1
- package/components/identity.federation/operations/types/Scheme.js +1 -1
- package/components/identity.federation/operations/types/configuration.js +1 -1
- package/components/identity.federation/operations/types/context.js +1 -1
- package/components/identity.federation/operations/types/entity.js +1 -1
- package/components/identity.federation/operations/types/index.js +1 -1
- package/components/identity.federation/source/authenticate.ts +8 -2
- package/components/identity.federation/source/incept.ts +7 -1
- package/components/identity.federation/source/lib/index.ts +1 -0
- package/components/identity.federation/source/lib/principal.ts +17 -0
- package/components/identity.federation/source/types/context.ts +3 -0
- package/components/identity.federation/tsconfig.json +4 -2
- package/components/identity.federation/tsconfig.tsbuildinfo +1 -1
- package/components/identity.federation/types/index.d.ts +1 -1
- package/components/identity.grants/operations/authorize.js +1 -1
- package/components/identity.grants/operations/exchange.js +1 -1
- package/components/identity.grants/operations/lib/code.js +1 -1
- package/components/identity.grants/operations/lib/identify.js +1 -1
- package/components/identity.grants/operations/lib/index.js +1 -1
- package/components/identity.grants/operations/list.js +1 -1
- package/components/identity.grants/operations/revoke.js +1 -1
- package/components/identity.grants/tsconfig.json +1 -1
- package/components/identity.grants/tsconfig.tsbuildinfo +1 -1
- package/components/identity.grants/types/index.d.ts +1 -1
- package/components/identity.keys/operations/create.js +1 -1
- package/components/identity.keys/operations/disable.js +1 -1
- package/components/identity.keys/operations/revoke.js +1 -1
- package/components/identity.keys/tsconfig.json +1 -1
- package/components/identity.keys/tsconfig.tsbuildinfo +1 -1
- package/components/identity.keys/types/index.d.ts +1 -1
- package/components/identity.otp/operations/authenticate.js +1 -1
- package/components/identity.otp/operations/issue.js +1 -1
- package/components/identity.otp/operations/lib/Context.js +1 -1
- package/components/identity.otp/operations/lib/Entity.js +1 -1
- package/components/identity.otp/operations/lib/index.js +1 -1
- package/components/identity.otp/tsconfig.json +1 -1
- package/components/identity.otp/tsconfig.tsbuildinfo +1 -1
- package/components/identity.otp/types/index.d.ts +1 -1
- package/components/identity.passkeys/operations/authenticate.js +1 -1
- package/components/identity.passkeys/operations/challenge.js +1 -1
- package/components/identity.passkeys/operations/create.js +1 -1
- package/components/identity.passkeys/operations/delete.js +1 -1
- package/components/identity.passkeys/operations/lib/const.js +1 -1
- package/components/identity.passkeys/operations/list.js +1 -1
- package/components/identity.passkeys/operations/types/Configuration.js +1 -1
- package/components/identity.passkeys/operations/types/Context.js +1 -1
- package/components/identity.passkeys/operations/types/Passkey.js +1 -1
- package/components/identity.passkeys/operations/types/index.js +1 -1
- package/components/identity.passkeys/operations/use.js +1 -1
- package/components/identity.passkeys/tsconfig.json +1 -1
- package/components/identity.passkeys/tsconfig.tsbuildinfo +1 -1
- package/components/identity.passkeys/types/index.d.ts +1 -1
- package/components/identity.roles/operations/grant.js +1 -1
- package/components/identity.roles/operations/lib/Entity.js +1 -1
- package/components/identity.roles/operations/list.js +1 -1
- package/components/identity.roles/operations/principal.js +29 -5
- package/components/identity.roles/source/principal.ts +33 -5
- package/components/identity.roles/tsconfig.json +1 -1
- package/components/identity.roles/tsconfig.tsbuildinfo +1 -1
- package/components/identity.roles/types/index.d.ts +1 -1
- package/components/identity.tokens/operations/authenticate.js +1 -1
- package/components/identity.tokens/operations/decrypt.js +1 -1
- package/components/identity.tokens/operations/encrypt.js +1 -1
- package/components/identity.tokens/operations/issue.js +1 -1
- package/components/identity.tokens/operations/lib/form.js +1 -1
- package/components/identity.tokens/operations/lib/index.js +1 -1
- package/components/identity.tokens/operations/lib/jose.js +1 -1
- package/components/identity.tokens/operations/lib/key.js +1 -1
- package/components/identity.tokens/operations/lib/pad.js +1 -1
- package/components/identity.tokens/operations/revoke.js +1 -1
- package/components/identity.tokens/tsconfig.json +1 -1
- package/components/identity.tokens/tsconfig.tsbuildinfo +1 -1
- package/components/identity.tokens/types/index.d.ts +1 -1
- package/documentation/access.md +13 -0
- package/documentation/components.md +3 -0
- package/documentation/introspection.md +13 -5
- package/documentation/io.md +6 -0
- package/documentation/map.md +8 -0
- package/documentation/mcp.md +186 -0
- package/documentation/oauth.md +8 -7
- package/documentation/rpc.md +144 -0
- package/documentation/tree.md +3 -0
- package/features/identity.basic.feature +44 -0
- package/features/identity.federation.feature +2 -5
- package/features/introspection.feature +333 -0
- package/features/mcp.feature +691 -0
- package/features/oauth.discovery.feature +10 -11
- package/features/oauth.grants.feature +22 -9
- package/features/octets.cloudinary.feature +1 -0
- package/features/rpc.feature +429 -0
- package/features/steps/Cloudinary.ts +13 -0
- package/features/steps/Components.ts +0 -4
- package/features/steps/Gateway.ts +19 -2
- package/features/steps/Parameters.ts +18 -7
- package/features/steps/Realtime.ts +3 -0
- package/features/steps/components/echo/manifest.toa.yaml +1 -0
- package/features/steps/components/pots/manifest.toa.yaml +2 -0
- package/package.json +3 -3
- package/readme.md +3 -0
- package/schemas/annotation.cos.yaml +33 -0
- package/schemas/call.cos.yaml +18 -0
- package/source/Annotation.ts +31 -0
- package/source/Directive.test.ts +15 -15
- package/source/Directive.ts +77 -9
- package/source/Endpoint.test.ts +67 -0
- package/source/Endpoint.ts +31 -11
- package/source/Factory.ts +5 -1
- package/source/Gateway.ts +73 -11
- package/source/HTTP/Context.ts +7 -0
- package/source/HTTP/Server.ts +7 -1
- package/source/HTTP/exceptions.ts +2 -2
- package/source/HTTP/messages.ts +10 -1
- package/source/Introspection.ts +105 -0
- package/source/MCP/Server.ts +275 -0
- package/source/MCP/discover.ts +52 -0
- package/source/MCP/errors.ts +81 -0
- package/source/MCP/index.ts +1 -0
- package/source/MCP/schema.test.ts +85 -0
- package/source/MCP/schema.ts +87 -0
- package/source/MCP/tools.ts +157 -0
- package/source/MCP/types.ts +84 -0
- package/source/Query.ts +48 -8
- package/source/RPC/Context.ts +78 -0
- package/source/RPC/Dispatcher.ts +130 -0
- package/source/RPC/errors.test.ts +52 -0
- package/source/RPC/errors.ts +83 -0
- package/source/RPC/index.ts +1 -0
- package/source/RPC/names.test.ts +122 -0
- package/source/RPC/names.ts +183 -0
- package/source/RPC/types.ts +34 -0
- package/source/RTD/Directives.ts +52 -2
- package/source/RTD/Endpoint.ts +2 -1
- package/source/RTD/Method.ts +14 -11
- package/source/RTD/Node.ts +38 -7
- package/source/RTD/Route.ts +30 -3
- package/source/RTD/Tree.ts +37 -1
- package/source/RTD/expiration.test.ts +1 -1
- package/source/RTD/walk.test.ts +110 -0
- package/source/const.ts +15 -0
- package/source/deployment.ts +8 -1
- package/source/directives/auth/Anonymous.test.ts +38 -0
- package/source/directives/auth/Anonymous.ts +12 -0
- package/source/directives/auth/Anyone.ts +4 -0
- package/source/directives/auth/Authorization.ts +62 -3
- package/source/directives/auth/Delegate.test.ts +36 -0
- package/source/directives/auth/Delegate.ts +14 -0
- package/source/directives/auth/Echo.ts +5 -0
- package/source/directives/auth/Incept.ts +2 -1
- package/source/directives/auth/Role.ts +13 -0
- package/source/directives/auth/Rule.ts +29 -0
- package/source/directives/auth/Scheme.ts +5 -0
- package/source/directives/auth/types.ts +21 -0
- package/source/directives/cache/Cache.ts +1 -1
- package/source/directives/dev/Development.ts +1 -1
- package/source/directives/flow/Flow.ts +1 -1
- package/source/directives/index.ts +3 -1
- package/source/directives/io/Directive.ts +1 -1
- package/source/directives/io/IO.ts +32 -3
- package/source/directives/io/Input.ts +3 -2
- package/source/directives/io/Output.ts +6 -3
- package/source/directives/io/Status.test.ts +2 -2
- package/source/directives/io/Status.ts +1 -1
- package/source/directives/io/Throttle.ts +1 -1
- package/source/directives/io/lib/throttle/Quotas.ts +2 -2
- package/source/directives/map/Headers.ts +11 -0
- package/source/directives/map/Map.ts +10 -1
- package/source/directives/map/Mapping.ts +23 -0
- package/source/directives/map/Segments.ts +12 -0
- package/source/directives/mcp/MCP.ts +40 -0
- package/source/directives/mcp/Tool.test.ts +90 -0
- package/source/directives/mcp/Tool.ts +47 -0
- package/source/directives/mcp/index.ts +6 -0
- package/source/directives/oauth/Discovery.ts +10 -16
- package/source/directives/octets/Octets.ts +1 -1
- package/source/directives/require/Directive.ts +1 -1
- package/source/directives/require/Headers.ts +1 -1
- package/source/directives/require/Require.ts +2 -2
- package/source/schemas.ts +2 -0
- package/transpiled/Annotation.d.ts +24 -0
- package/transpiled/Directive.d.ts +18 -1
- package/transpiled/Directive.js +50 -6
- package/transpiled/Directive.js.map +1 -1
- package/transpiled/Endpoint.d.ts +9 -0
- package/transpiled/Endpoint.js +27 -11
- package/transpiled/Endpoint.js.map +1 -1
- package/transpiled/Factory.js +5 -1
- package/transpiled/Factory.js.map +1 -1
- package/transpiled/Gateway.d.ts +19 -2
- package/transpiled/Gateway.js +51 -9
- package/transpiled/Gateway.js.map +1 -1
- package/transpiled/HTTP/Context.d.ts +6 -0
- package/transpiled/HTTP/Context.js +6 -0
- package/transpiled/HTTP/Context.js.map +1 -1
- package/transpiled/HTTP/Server.d.ts +5 -1
- package/transpiled/HTTP/exceptions.d.ts +1 -1
- package/transpiled/HTTP/exceptions.js +2 -2
- package/transpiled/HTTP/exceptions.js.map +1 -1
- package/transpiled/HTTP/messages.d.ts +6 -0
- package/transpiled/HTTP/messages.js +9 -1
- package/transpiled/HTTP/messages.js.map +1 -1
- package/transpiled/Introspection.d.ts +42 -0
- package/transpiled/Introspection.js +50 -1
- package/transpiled/Introspection.js.map +1 -1
- package/transpiled/MCP/Server.d.ts +41 -0
- package/transpiled/MCP/Server.js +180 -0
- package/transpiled/MCP/Server.js.map +1 -0
- package/transpiled/MCP/discover.d.ts +13 -0
- package/transpiled/MCP/discover.js +29 -0
- package/transpiled/MCP/discover.js.map +1 -0
- package/transpiled/MCP/errors.d.ts +24 -0
- package/transpiled/MCP/errors.js +67 -0
- package/transpiled/MCP/errors.js.map +1 -0
- package/transpiled/MCP/index.d.ts +1 -0
- package/transpiled/MCP/index.js +2 -0
- package/transpiled/MCP/index.js.map +1 -0
- package/transpiled/MCP/schema.d.ts +18 -0
- package/transpiled/MCP/schema.js +64 -0
- package/transpiled/MCP/schema.js.map +1 -0
- package/transpiled/MCP/tools.d.ts +31 -0
- package/transpiled/MCP/tools.js +122 -0
- package/transpiled/MCP/tools.js.map +1 -0
- package/transpiled/MCP/types.d.ts +66 -0
- package/transpiled/MCP/types.js +13 -0
- package/transpiled/MCP/types.js.map +1 -0
- package/transpiled/Query.d.ts +7 -0
- package/transpiled/Query.js +38 -7
- package/transpiled/Query.js.map +1 -1
- package/transpiled/RPC/Context.d.ts +11 -0
- package/transpiled/RPC/Context.js +63 -0
- package/transpiled/RPC/Context.js.map +1 -0
- package/transpiled/RPC/Dispatcher.d.ts +19 -0
- package/transpiled/RPC/Dispatcher.js +100 -0
- package/transpiled/RPC/Dispatcher.js.map +1 -0
- package/transpiled/RPC/errors.d.ts +18 -0
- package/transpiled/RPC/errors.js +67 -0
- package/transpiled/RPC/errors.js.map +1 -0
- package/transpiled/RPC/index.d.ts +1 -0
- package/transpiled/RPC/index.js +2 -0
- package/transpiled/RPC/index.js.map +1 -0
- package/transpiled/RPC/names.d.ts +31 -0
- package/transpiled/RPC/names.js +121 -0
- package/transpiled/RPC/names.js.map +1 -0
- package/transpiled/RPC/types.d.ts +27 -0
- package/transpiled/RPC/types.js +8 -0
- package/transpiled/RPC/types.js.map +1 -0
- package/transpiled/RTD/Directives.d.ts +41 -2
- package/transpiled/RTD/Endpoint.d.ts +2 -1
- package/transpiled/RTD/Method.d.ts +8 -3
- package/transpiled/RTD/Method.js +12 -10
- package/transpiled/RTD/Method.js.map +1 -1
- package/transpiled/RTD/Node.d.ts +20 -2
- package/transpiled/RTD/Node.js +22 -4
- package/transpiled/RTD/Node.js.map +1 -1
- package/transpiled/RTD/Route.d.ts +2 -1
- package/transpiled/RTD/Route.js +27 -2
- package/transpiled/RTD/Route.js.map +1 -1
- package/transpiled/RTD/Tree.d.ts +3 -1
- package/transpiled/RTD/Tree.js +26 -0
- package/transpiled/RTD/Tree.js.map +1 -1
- package/transpiled/const.d.ts +12 -0
- package/transpiled/const.js +12 -0
- package/transpiled/const.js.map +1 -1
- package/transpiled/deployment.js +4 -0
- package/transpiled/deployment.js.map +1 -1
- package/transpiled/directives/auth/Anonymous.d.ts +6 -0
- package/transpiled/directives/auth/Anonymous.js +10 -0
- package/transpiled/directives/auth/Anonymous.js.map +1 -1
- package/transpiled/directives/auth/Anyone.d.ts +1 -0
- package/transpiled/directives/auth/Anyone.js +3 -0
- package/transpiled/directives/auth/Anyone.js.map +1 -1
- package/transpiled/directives/auth/Authorization.d.ts +27 -1
- package/transpiled/directives/auth/Authorization.js +49 -1
- package/transpiled/directives/auth/Authorization.js.map +1 -1
- package/transpiled/directives/auth/Delegate.d.ts +5 -0
- package/transpiled/directives/auth/Delegate.js +10 -0
- package/transpiled/directives/auth/Delegate.js.map +1 -1
- package/transpiled/directives/auth/Echo.d.ts +2 -0
- package/transpiled/directives/auth/Echo.js +4 -0
- package/transpiled/directives/auth/Echo.js.map +1 -1
- package/transpiled/directives/auth/Incept.js +2 -1
- package/transpiled/directives/auth/Incept.js.map +1 -1
- package/transpiled/directives/auth/Role.d.ts +2 -0
- package/transpiled/directives/auth/Role.js +9 -0
- package/transpiled/directives/auth/Role.js.map +1 -1
- package/transpiled/directives/auth/Rule.d.ts +5 -0
- package/transpiled/directives/auth/Rule.js +20 -0
- package/transpiled/directives/auth/Rule.js.map +1 -1
- package/transpiled/directives/auth/Scheme.d.ts +2 -0
- package/transpiled/directives/auth/Scheme.js +4 -0
- package/transpiled/directives/auth/Scheme.js.map +1 -1
- package/transpiled/directives/auth/types.d.ts +16 -0
- package/transpiled/directives/cache/Cache.d.ts +1 -1
- package/transpiled/directives/cache/Cache.js +1 -1
- package/transpiled/directives/cache/Cache.js.map +1 -1
- package/transpiled/directives/dev/Development.d.ts +1 -1
- package/transpiled/directives/dev/Development.js +1 -1
- package/transpiled/directives/dev/Development.js.map +1 -1
- package/transpiled/directives/flow/Flow.d.ts +1 -1
- package/transpiled/directives/flow/Flow.js +1 -1
- package/transpiled/directives/flow/Flow.js.map +1 -1
- package/transpiled/directives/index.js +2 -1
- package/transpiled/directives/index.js.map +1 -1
- package/transpiled/directives/io/Directive.d.ts +1 -1
- package/transpiled/directives/io/IO.d.ts +7 -1
- package/transpiled/directives/io/IO.js +23 -3
- package/transpiled/directives/io/IO.js.map +1 -1
- package/transpiled/directives/io/Input.d.ts +3 -2
- package/transpiled/directives/io/Input.js +2 -1
- package/transpiled/directives/io/Input.js.map +1 -1
- package/transpiled/directives/io/Output.d.ts +5 -3
- package/transpiled/directives/io/Output.js +4 -2
- package/transpiled/directives/io/Output.js.map +1 -1
- package/transpiled/directives/io/Status.d.ts +1 -1
- package/transpiled/directives/io/Status.js +1 -1
- package/transpiled/directives/io/Status.js.map +1 -1
- package/transpiled/directives/io/Throttle.d.ts +1 -1
- package/transpiled/directives/io/Throttle.js +1 -1
- package/transpiled/directives/io/Throttle.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/Quotas.d.ts +1 -1
- package/transpiled/directives/io/lib/throttle/Quotas.js +2 -2
- package/transpiled/directives/io/lib/throttle/Quotas.js.map +1 -1
- package/transpiled/directives/map/Headers.d.ts +2 -0
- package/transpiled/directives/map/Headers.js +8 -0
- package/transpiled/directives/map/Headers.js.map +1 -1
- package/transpiled/directives/map/Map.d.ts +3 -1
- package/transpiled/directives/map/Map.js +7 -1
- package/transpiled/directives/map/Map.js.map +1 -1
- package/transpiled/directives/map/Mapping.d.ts +13 -0
- package/transpiled/directives/map/Mapping.js +20 -0
- package/transpiled/directives/map/Mapping.js.map +1 -1
- package/transpiled/directives/map/Segments.d.ts +3 -0
- package/transpiled/directives/map/Segments.js +9 -0
- package/transpiled/directives/map/Segments.js.map +1 -1
- package/transpiled/directives/mcp/MCP.d.ts +15 -0
- package/transpiled/directives/mcp/MCP.js +29 -0
- package/transpiled/directives/mcp/MCP.js.map +1 -0
- package/transpiled/directives/mcp/Tool.d.ts +18 -0
- package/transpiled/directives/mcp/Tool.js +34 -0
- package/transpiled/directives/mcp/Tool.js.map +1 -0
- package/transpiled/directives/mcp/index.d.ts +4 -0
- package/transpiled/directives/mcp/index.js +4 -0
- package/transpiled/directives/mcp/index.js.map +1 -0
- package/transpiled/directives/oauth/Discovery.js +10 -13
- package/transpiled/directives/oauth/Discovery.js.map +1 -1
- package/transpiled/directives/octets/Octets.d.ts +1 -1
- package/transpiled/directives/octets/Octets.js +1 -1
- package/transpiled/directives/octets/Octets.js.map +1 -1
- package/transpiled/directives/require/Directive.d.ts +1 -1
- package/transpiled/directives/require/Headers.d.ts +1 -1
- package/transpiled/directives/require/Headers.js +1 -1
- package/transpiled/directives/require/Headers.js.map +1 -1
- package/transpiled/directives/require/Require.d.ts +1 -1
- package/transpiled/directives/require/Require.js +2 -2
- package/transpiled/directives/require/Require.js.map +1 -1
- package/transpiled/schemas.d.ts +2 -0
- package/transpiled/schemas.js +1 -0
- package/transpiled/schemas.js.map +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/components/identity.bans/operations/transit.d.ts +0 -14
- package/components/identity.bans/operations/transit.js.map +0 -1
- package/components/identity.basic/operations/add.d.ts +0 -3
- package/components/identity.basic/operations/add.js.map +0 -1
- package/components/identity.basic/operations/authenticate.d.ts +0 -13
- package/components/identity.basic/operations/authenticate.js.map +0 -1
- package/components/identity.basic/operations/check.d.ts +0 -7
- package/components/identity.basic/operations/check.js.map +0 -1
- package/components/identity.basic/operations/delete.d.ts +0 -7
- package/components/identity.basic/operations/delete.js.map +0 -1
- package/components/identity.basic/operations/incept.d.ts +0 -12
- package/components/identity.basic/operations/incept.js.map +0 -1
- package/components/identity.basic/operations/info.d.ts +0 -10
- package/components/identity.basic/operations/info.js.map +0 -1
- package/components/identity.basic/operations/lib/credentials.d.ts +0 -5
- package/components/identity.basic/operations/lib/credentials.js.map +0 -1
- package/components/identity.basic/operations/transit.d.ts +0 -15
- package/components/identity.basic/operations/transit.js.map +0 -1
- package/components/identity.clients/operations/describe.d.ts +0 -27
- package/components/identity.clients/operations/describe.js.map +0 -1
- package/components/identity.clients/operations/lib/Context.d.ts +0 -29
- package/components/identity.clients/operations/lib/Context.js.map +0 -1
- package/components/identity.clients/operations/lib/Entity.d.ts +0 -29
- package/components/identity.clients/operations/lib/Entity.js.map +0 -1
- package/components/identity.clients/operations/lib/canonical.d.ts +0 -11
- package/components/identity.clients/operations/lib/canonical.js.map +0 -1
- package/components/identity.clients/operations/lib/cimd.d.ts +0 -8
- package/components/identity.clients/operations/lib/cimd.js.map +0 -1
- package/components/identity.clients/operations/lib/errors.d.ts +0 -7
- package/components/identity.clients/operations/lib/errors.js.map +0 -1
- package/components/identity.clients/operations/lib/index.d.ts +0 -6
- package/components/identity.clients/operations/lib/index.js.map +0 -1
- package/components/identity.clients/operations/lib/redirect.d.ts +0 -10
- package/components/identity.clients/operations/lib/redirect.js.map +0 -1
- package/components/identity.clients/operations/register.d.ts +0 -37
- package/components/identity.clients/operations/register.js.map +0 -1
- package/components/identity.credentials/operations/list.d.ts +0 -52
- package/components/identity.credentials/operations/list.js.map +0 -1
- package/components/identity.federation/operations/authenticate.d.ts +0 -16
- package/components/identity.federation/operations/authenticate.js.map +0 -1
- package/components/identity.federation/operations/create.d.ts +0 -8
- package/components/identity.federation/operations/create.js.map +0 -1
- package/components/identity.federation/operations/decode.d.ts +0 -3
- package/components/identity.federation/operations/decode.js.map +0 -1
- package/components/identity.federation/operations/delete.d.ts +0 -8
- package/components/identity.federation/operations/delete.js.map +0 -1
- package/components/identity.federation/operations/incept.d.ts +0 -11
- package/components/identity.federation/operations/incept.js.map +0 -1
- package/components/identity.federation/operations/lib/Configuration.d.ts +0 -39
- package/components/identity.federation/operations/lib/Configuration.js.map +0 -1
- package/components/identity.federation/operations/lib/Ctx.d.ts +0 -8
- package/components/identity.federation/operations/lib/Ctx.js.map +0 -1
- package/components/identity.federation/operations/lib/Payload.d.ts +0 -5
- package/components/identity.federation/operations/lib/Payload.js.map +0 -1
- package/components/identity.federation/operations/lib/decode.d.ts +0 -3
- package/components/identity.federation/operations/lib/decode.js.map +0 -1
- package/components/identity.federation/operations/lib/discovery.d.ts +0 -5
- package/components/identity.federation/operations/lib/discovery.js.map +0 -1
- package/components/identity.federation/operations/lib/errors.d.ts +0 -77
- package/components/identity.federation/operations/lib/errors.js.map +0 -1
- package/components/identity.federation/operations/lib/exchange.d.ts +0 -3
- package/components/identity.federation/operations/lib/exchange.js.map +0 -1
- package/components/identity.federation/operations/lib/index.d.ts +0 -4
- package/components/identity.federation/operations/lib/index.js.map +0 -1
- package/components/identity.federation/operations/lib/jose.d.ts +0 -1
- package/components/identity.federation/operations/lib/jose.js.map +0 -1
- package/components/identity.federation/operations/lib/resolve.d.ts +0 -3
- package/components/identity.federation/operations/lib/resolve.js.map +0 -1
- package/components/identity.federation/operations/list.d.ts +0 -7
- package/components/identity.federation/operations/list.js.map +0 -1
- package/components/identity.federation/operations/types/Scheme.d.ts +0 -1
- package/components/identity.federation/operations/types/Scheme.js.map +0 -1
- package/components/identity.federation/operations/types/configuration.d.ts +0 -22
- package/components/identity.federation/operations/types/configuration.js.map +0 -1
- package/components/identity.federation/operations/types/context.d.ts +0 -36
- package/components/identity.federation/operations/types/context.js.map +0 -1
- package/components/identity.federation/operations/types/entity.d.ts +0 -9
- package/components/identity.federation/operations/types/entity.js.map +0 -1
- package/components/identity.federation/operations/types/index.d.ts +0 -4
- package/components/identity.federation/operations/types/index.js.map +0 -1
- package/components/identity.grants/operations/authorize.d.ts +0 -35
- package/components/identity.grants/operations/authorize.js.map +0 -1
- package/components/identity.grants/operations/exchange.d.ts +0 -37
- package/components/identity.grants/operations/exchange.js.map +0 -1
- package/components/identity.grants/operations/lib/code.d.ts +0 -15
- package/components/identity.grants/operations/lib/code.js.map +0 -1
- package/components/identity.grants/operations/lib/identify.d.ts +0 -6
- package/components/identity.grants/operations/lib/identify.js.map +0 -1
- package/components/identity.grants/operations/lib/index.d.ts +0 -3
- package/components/identity.grants/operations/lib/index.js.map +0 -1
- package/components/identity.grants/operations/list.d.ts +0 -13
- package/components/identity.grants/operations/list.js.map +0 -1
- package/components/identity.grants/operations/revoke.d.ts +0 -18
- package/components/identity.grants/operations/revoke.js.map +0 -1
- package/components/identity.keys/operations/create.d.ts +0 -22
- package/components/identity.keys/operations/create.js.map +0 -1
- package/components/identity.keys/operations/disable.d.ts +0 -5
- package/components/identity.keys/operations/disable.js.map +0 -1
- package/components/identity.keys/operations/revoke.d.ts +0 -15
- package/components/identity.keys/operations/revoke.js.map +0 -1
- package/components/identity.otp/operations/authenticate.d.ts +0 -12
- package/components/identity.otp/operations/authenticate.js.map +0 -1
- package/components/identity.otp/operations/issue.d.ts +0 -12
- package/components/identity.otp/operations/issue.js.map +0 -1
- package/components/identity.otp/operations/lib/Context.d.ts +0 -16
- package/components/identity.otp/operations/lib/Context.js.map +0 -1
- package/components/identity.otp/operations/lib/Entity.d.ts +0 -6
- package/components/identity.otp/operations/lib/Entity.js.map +0 -1
- package/components/identity.otp/operations/lib/index.d.ts +0 -1
- package/components/identity.otp/operations/lib/index.js.map +0 -1
- package/components/identity.passkeys/operations/authenticate.d.ts +0 -16
- package/components/identity.passkeys/operations/authenticate.js.map +0 -1
- package/components/identity.passkeys/operations/challenge.d.ts +0 -35
- package/components/identity.passkeys/operations/challenge.js.map +0 -1
- package/components/identity.passkeys/operations/create.d.ts +0 -19
- package/components/identity.passkeys/operations/create.js.map +0 -1
- package/components/identity.passkeys/operations/delete.d.ts +0 -8
- package/components/identity.passkeys/operations/delete.js.map +0 -1
- package/components/identity.passkeys/operations/lib/const.d.ts +0 -1
- package/components/identity.passkeys/operations/lib/const.js.map +0 -1
- package/components/identity.passkeys/operations/list.d.ts +0 -7
- package/components/identity.passkeys/operations/list.js.map +0 -1
- package/components/identity.passkeys/operations/types/Configuration.d.ts +0 -6
- package/components/identity.passkeys/operations/types/Configuration.js.map +0 -1
- package/components/identity.passkeys/operations/types/Context.d.ts +0 -16
- package/components/identity.passkeys/operations/types/Context.js.map +0 -1
- package/components/identity.passkeys/operations/types/Passkey.d.ts +0 -12
- package/components/identity.passkeys/operations/types/Passkey.js.map +0 -1
- package/components/identity.passkeys/operations/types/index.d.ts +0 -2
- package/components/identity.passkeys/operations/types/index.js.map +0 -1
- package/components/identity.passkeys/operations/use.d.ts +0 -16
- package/components/identity.passkeys/operations/use.js.map +0 -1
- package/components/identity.roles/operations/grant.d.ts +0 -10
- package/components/identity.roles/operations/grant.js.map +0 -1
- package/components/identity.roles/operations/lib/Entity.d.ts +0 -5
- package/components/identity.roles/operations/lib/Entity.js.map +0 -1
- package/components/identity.roles/operations/list.d.ts +0 -2
- package/components/identity.roles/operations/list.js.map +0 -1
- package/components/identity.roles/operations/principal.d.ts +0 -13
- package/components/identity.roles/operations/principal.js.map +0 -1
- package/components/identity.tokens/operations/authenticate.d.ts +0 -10
- package/components/identity.tokens/operations/authenticate.js.map +0 -1
- package/components/identity.tokens/operations/decrypt.d.ts +0 -16
- package/components/identity.tokens/operations/decrypt.js.map +0 -1
- package/components/identity.tokens/operations/encrypt.d.ts +0 -9
- package/components/identity.tokens/operations/encrypt.js.map +0 -1
- package/components/identity.tokens/operations/issue.d.ts +0 -25
- package/components/identity.tokens/operations/issue.js.map +0 -1
- package/components/identity.tokens/operations/lib/form.d.ts +0 -8
- package/components/identity.tokens/operations/lib/form.js.map +0 -1
- package/components/identity.tokens/operations/lib/index.d.ts +0 -4
- package/components/identity.tokens/operations/lib/index.js.map +0 -1
- package/components/identity.tokens/operations/lib/jose.d.ts +0 -1
- package/components/identity.tokens/operations/lib/jose.js.map +0 -1
- package/components/identity.tokens/operations/lib/key.d.ts +0 -1
- package/components/identity.tokens/operations/lib/key.js.map +0 -1
- package/components/identity.tokens/operations/lib/pad.d.ts +0 -1
- package/components/identity.tokens/operations/lib/pad.js.map +0 -1
- package/components/identity.tokens/operations/revoke.d.ts +0 -2
- package/components/identity.tokens/operations/revoke.js.map +0 -1
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Model Context Protocol
|
|
2
|
+
|
|
3
|
+
An application annotates it, and the methods it names as tools are what a model may call.
|
|
4
|
+
|
|
5
|
+
```yaml
|
|
6
|
+
exposition:
|
|
7
|
+
mcp:
|
|
8
|
+
name: Teapots
|
|
9
|
+
instructions: A pot is read by its id. A pot that is brewing cannot be emptied.
|
|
10
|
+
origins: [https://claude.ai]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
<dl>
|
|
14
|
+
<dt><code>name</code></dt>
|
|
15
|
+
<dd>Required. What the server calls itself, which a client shows a user.</dd>
|
|
16
|
+
<dt><code>instructions</code></dt>
|
|
17
|
+
<dd>What a model is told before it calls anything here.</dd>
|
|
18
|
+
<dt><code>origins</code></dt>
|
|
19
|
+
<dd>Browser origins the endpoint answers. A request carrying an <code>Origin</code> that is not
|
|
20
|
+
listed is <code>403</code>, and an empty list admits none; a request carrying none is unaffected.</dd>
|
|
21
|
+
<dt><code>anonymous</code></dt>
|
|
22
|
+
<dd>Whether the endpoint answers without a credential. It does not unless it says so.</dd>
|
|
23
|
+
</dl>
|
|
24
|
+
|
|
25
|
+
Without the annotation `/.mcp` is a path like any other, and nothing answers there. The path is
|
|
26
|
+
fixed: one an application could choose is one it could collide with a route of its own.
|
|
27
|
+
|
|
28
|
+
## What a tool is
|
|
29
|
+
|
|
30
|
+
A tool is an RTD method that says it is one, named as the [procedure](rpc.md#the-name) it is:
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
/pots:
|
|
34
|
+
GET:
|
|
35
|
+
mcp:tool: Every pot there is, newest first.
|
|
36
|
+
endpoint: enumerate
|
|
37
|
+
/hot:
|
|
38
|
+
GET:
|
|
39
|
+
query: { criteria: temperature=gt=80 }
|
|
40
|
+
mcp:tool:
|
|
41
|
+
title: Hot pots
|
|
42
|
+
description: The pots that are too hot to pour.
|
|
43
|
+
endpoint: enumerate
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
A default denies, and a tree holds everything an application serves — its identity endpoints, its
|
|
47
|
+
uploads, the machinery of the authorization flow the model already came through. Publishing all of
|
|
48
|
+
it would spend a model's context on what it has no business calling.
|
|
49
|
+
|
|
50
|
+
The value is what the tool is, and stating it is what publishes it — there is no way to publish one
|
|
51
|
+
that says nothing, because a tool a model cannot read the purpose of is one it cannot choose.
|
|
52
|
+
|
|
53
|
+
A `title` is what a person is shown where a client lists what it may call. Without one a client has
|
|
54
|
+
only the name, which is an address — `apps._identity._id.repos.POST` — and reads as one. A
|
|
55
|
+
description alone is written as the value; a title beside it is written as a mapping.
|
|
56
|
+
|
|
57
|
+
An operation [states what it is](/documentation/component/declaration.md) as well, and that is not
|
|
58
|
+
this: it is written without knowledge of any route, and a tool is an operation and a route together.
|
|
59
|
+
The two routes above are one operation and two tools, and one sentence is not true of both. The
|
|
60
|
+
operation's own is the Introspection's to read, and the gateway does not use it.
|
|
61
|
+
|
|
62
|
+
A declaration is inherited by everything below it, as every directive is, and the nearer one wins.
|
|
63
|
+
Since what it carries is what one method is, it belongs on a method: a node stating one would say
|
|
64
|
+
the same thing of everything under it.
|
|
65
|
+
|
|
66
|
+
A route whose name a client [cannot spell](rpc.md#what-has-a-name) is refused where the directive
|
|
67
|
+
is built, rather than served as a tool that is quietly never listed.
|
|
68
|
+
|
|
69
|
+
`tools/list` answers every published method this caller may reach — a method whose directives refuse
|
|
70
|
+
them is not listed, and a route with [no name](rpc.md#what-has-a-name) is not either. `tools/call`
|
|
71
|
+
answers `404` to a name that is not published, whether or not a route would have taken it: what an
|
|
72
|
+
application did not publish is not reachable by guessing what it would have been called.
|
|
73
|
+
|
|
74
|
+
`annotations` are read from the verb: `GET` and `HEAD` are `readOnlyHint`, `DELETE` is
|
|
75
|
+
`destructiveHint`, `PUT` and `DELETE` are `idempotentHint`.
|
|
76
|
+
|
|
77
|
+
## What a tool takes
|
|
78
|
+
|
|
79
|
+
`inputSchema` is the procedure's `params`, which is what the method
|
|
80
|
+
[says of itself](introspection.md): a route variable by the name the template gives it, the
|
|
81
|
+
querystring under `query`, and what is left is the body. `io:input` restricts it, and a property
|
|
82
|
+
`map` fills is not there — a call carries no headers of its own.
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
type: object
|
|
86
|
+
properties:
|
|
87
|
+
id: { type: string, pattern: ^[a-fA-F0-9]{32}$ }
|
|
88
|
+
query:
|
|
89
|
+
type: object
|
|
90
|
+
properties:
|
|
91
|
+
criteria: { type: string }
|
|
92
|
+
sort: { type: string }
|
|
93
|
+
limit: { type: integer, minimum: 1, maximum: 100, default: 10 }
|
|
94
|
+
omit: { type: integer, minimum: 0, maximum: 1000, default: 0 }
|
|
95
|
+
required: [id]
|
|
96
|
+
additionalProperties: false
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## What a tool answers
|
|
100
|
+
|
|
101
|
+
`content` carries one `text` block holding the reply's JSON, and `structuredContent` the reply
|
|
102
|
+
itself. A reply of nothing is an empty `content`.
|
|
103
|
+
|
|
104
|
+
`outputSchema` is what the operation declares, restricted by `io:output`. An operation's `output` is
|
|
105
|
+
optional and normalizes to `{}`, which describes nothing, and none is stated for it — an
|
|
106
|
+
application that wants the schema declares the operation's `output`.
|
|
107
|
+
|
|
108
|
+
An operation that refuses answers a result with `isError: true` carrying its message, not an error
|
|
109
|
+
of the protocol: it is something a model reads and may correct itself by.
|
|
110
|
+
|
|
111
|
+
## Two revisions
|
|
112
|
+
|
|
113
|
+
Both are answered from one endpoint that remembers nothing between requests.
|
|
114
|
+
[`2026-07-28`](https://modelcontextprotocol.io/specification/2026-07-28) carries the version and
|
|
115
|
+
the client's capabilities in every request; `2025-11-25` opens with `initialize`. Which one a
|
|
116
|
+
request is, is read from `MCP-Protocol-Version`, or from
|
|
117
|
+
`_meta['io.modelcontextprotocol/protocolVersion']` where the header is absent; `initialize` is one
|
|
118
|
+
by itself, and a request naming no version is of a revision that sent none.
|
|
119
|
+
|
|
120
|
+
| method | |
|
|
121
|
+
| --- | --- |
|
|
122
|
+
| `server/discover` | what is served, and who serves it |
|
|
123
|
+
| `tools/list` | every tool this caller may reach, in a stable order |
|
|
124
|
+
| `tools/call` | the call the tool is |
|
|
125
|
+
| `initialize` | the same as `server/discover`, in the shape a client of `2025-11-25` reads |
|
|
126
|
+
| `notifications/initialized` | `202`, and nothing done |
|
|
127
|
+
| `ping` | `{}` |
|
|
128
|
+
|
|
129
|
+
`POST` only, one message per request; `GET` and `DELETE` are `405`. An `Mcp-Session-Id` is ignored
|
|
130
|
+
and none is minted, a `Last-Event-ID` is ignored, and `accept` is negotiated as everywhere else.
|
|
131
|
+
|
|
132
|
+
Of the modern revision, `MCP-Protocol-Version` and `Mcp-Method` are required, and `Mcp-Name` for a
|
|
133
|
+
`tools/call`; each must say what the body says. `_meta` states the protocol version and the client's
|
|
134
|
+
capabilities. Every result carries `resultType` and names the server in its own `_meta`, and a
|
|
135
|
+
`server/discover` or a `tools/list` carries how long it may be held: half an hour, `public` for the
|
|
136
|
+
first and `private` for the second, which is filtered by the identity that asked.
|
|
137
|
+
|
|
138
|
+
Neither `listChanged` nor a subscription is declared: both are a stream held open, and this endpoint
|
|
139
|
+
holds none.
|
|
140
|
+
|
|
141
|
+
## Authorization
|
|
142
|
+
|
|
143
|
+
The endpoint is a protected resource, and an application advertises it as one:
|
|
144
|
+
|
|
145
|
+
```yaml
|
|
146
|
+
exposition:
|
|
147
|
+
oauth:
|
|
148
|
+
authorize: https://app.example.com/oauth/authorize
|
|
149
|
+
resources: ['/.mcp']
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Its RFC 9728 document is then read at `/.well-known/oauth-protected-resource/.mcp`, and the
|
|
153
|
+
canonical URI of the resource is `https://api.example.com/.mcp`. See [OAuth](oauth.md).
|
|
154
|
+
|
|
155
|
+
A request without a credential is `401`, carrying the challenge that names that document — which is
|
|
156
|
+
where the flow starts. A call the identity is not authorized to make is `403` with
|
|
157
|
+
`error="insufficient_scope"`. Each tool is authorized as the resource it is, against the path and
|
|
158
|
+
the verb its name states.
|
|
159
|
+
|
|
160
|
+
A route that is [`anonymous`](access.md#anonymous) is reached here whatever the client presented:
|
|
161
|
+
the rule that refuses a credentialed request is about a cacheable reply, and what a tool answers is
|
|
162
|
+
not one. So a resource that is public over HTTP is a public tool, and nothing in a manifest has to
|
|
163
|
+
say it twice.
|
|
164
|
+
|
|
165
|
+
## What refuses
|
|
166
|
+
|
|
167
|
+
| | |
|
|
168
|
+
| --- | --- |
|
|
169
|
+
| `-32700` | the body is not readable |
|
|
170
|
+
| `-32600` | the body is not one JSON-RPC message |
|
|
171
|
+
| `-32601` | no method of that name, at `404` |
|
|
172
|
+
| `-32602` | the arguments do not fit, or `_meta` states too little |
|
|
173
|
+
| `-32603` | anything the gateway did not mean to answer |
|
|
174
|
+
| `-32020` | a header says one thing and the body another |
|
|
175
|
+
| `-32022` | a revision neither served, naming both |
|
|
176
|
+
|
|
177
|
+
The codes MCP reserves for itself are `-32020` to `-32099`, and it has an implementation use none of
|
|
178
|
+
`-32000` to `-32019` — which is where [JSON-RPC](rpc.md#what-refuses) has this gateway's own, so none
|
|
179
|
+
of those is answered here.
|
|
180
|
+
|
|
181
|
+
## References
|
|
182
|
+
|
|
183
|
+
- [The specification](https://modelcontextprotocol.io/specification/2026-07-28)
|
|
184
|
+
- [JSON-RPC](rpc.md), where a procedure gets its name
|
|
185
|
+
- [Introspection](introspection.md), which is what a tool's schemas are
|
|
186
|
+
- [Features](../features/mcp.feature)
|
package/documentation/oauth.md
CHANGED
|
@@ -11,7 +11,7 @@ exposition:
|
|
|
11
11
|
local: api.example.com
|
|
12
12
|
oauth:
|
|
13
13
|
authorize: https://app.example.com/oauth/authorize
|
|
14
|
-
resources: ['
|
|
14
|
+
resources: ['/.mcp']
|
|
15
15
|
scopes: [app:notes, app:notes:read]
|
|
16
16
|
registration: closed
|
|
17
17
|
```
|
|
@@ -22,7 +22,8 @@ exposition:
|
|
|
22
22
|
<a href="consent.md">Consent</a>.</dd>
|
|
23
23
|
<dt><code>resources</code></dt>
|
|
24
24
|
<dd>Paths advertised as protected resources, each with a document of its own and named by the
|
|
25
|
-
challenge a request to it is refused with.
|
|
25
|
+
challenge a request to it is refused with. <code>/.mcp</code> is where
|
|
26
|
+
<a href="mcp.md">MCP</a> is served. A token is not yet bound to one, see
|
|
26
27
|
<a href="#audience">Audience</a>.</dd>
|
|
27
28
|
<dt><code>scopes</code></dt>
|
|
28
29
|
<dd>Advertised as what a client may ask for. Each is a <a href="access.md#roles">role</a>, or a
|
|
@@ -56,11 +57,11 @@ authorization_response_iss_parameter_supported: true
|
|
|
56
57
|
|
|
57
58
|
`/.well-known/oauth-protected-resource` is
|
|
58
59
|
[RFC 9728](https://www.rfc-editor.org/rfc/rfc9728) metadata. Each configured resource has one of
|
|
59
|
-
its own, at the path the well-known segment is followed by:
|
|
60
|
-
`/.well-known/oauth-protected-resource
|
|
60
|
+
its own, at the path the well-known segment is followed by: `/.mcp` is read at
|
|
61
|
+
`/.well-known/oauth-protected-resource/.mcp`.
|
|
61
62
|
|
|
62
63
|
```yaml
|
|
63
|
-
resource: https://api.example.com
|
|
64
|
+
resource: https://api.example.com/.mcp
|
|
64
65
|
authorization_servers: [https://api.example.com]
|
|
65
66
|
bearer_methods_supported: [header]
|
|
66
67
|
```
|
|
@@ -72,7 +73,7 @@ A reply of `401` carries the challenge that names the document:
|
|
|
72
73
|
|
|
73
74
|
```http
|
|
74
75
|
401 Unauthorized
|
|
75
|
-
www-authenticate: Bearer resource_metadata="https://api.example.com/.well-known/oauth-protected-resource
|
|
76
|
+
www-authenticate: Bearer resource_metadata="https://api.example.com/.well-known/oauth-protected-resource/.mcp", scope="app:notes"
|
|
76
77
|
```
|
|
77
78
|
|
|
78
79
|
## Clients
|
|
@@ -168,7 +169,7 @@ of the identity that consented, over every path that identity may reach, whichev
|
|
|
168
169
|
asked for.
|
|
169
170
|
|
|
170
171
|
Restricting it is a `permissions` argument at the `identity.tokens.issue` call in
|
|
171
|
-
`identity.grants.exchange` — `{'
|
|
172
|
+
`identity.grants.exchange` — `{'/.mcp': ['*']}` for a resource at `/.mcp` — enforced by
|
|
172
173
|
`permits()`, which is already what reads a token's permissions on every request. It waits on the
|
|
173
174
|
resource that will check the audience itself.
|
|
174
175
|
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# JSON-RPC
|
|
2
|
+
|
|
3
|
+
An application annotates it, and every resource it exposes answers as a procedure as well.
|
|
4
|
+
|
|
5
|
+
```yaml
|
|
6
|
+
exposition:
|
|
7
|
+
rpc:
|
|
8
|
+
batch: 32
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Without it `/.rpc` is a path like any other, and nothing answers there. The path is fixed:
|
|
12
|
+
one an application could choose is one it could collide with a route of its own.
|
|
13
|
+
|
|
14
|
+
## The name
|
|
15
|
+
|
|
16
|
+
A procedure is an RTD method — a node and a verb — and its name is the route template with a
|
|
17
|
+
variable marked by a leading `_` and the verb as the last segment, joined by `.`.
|
|
18
|
+
|
|
19
|
+
The separator is `.` and not `/` because a name is a tool's name too, and
|
|
20
|
+
[MCP](mcp.md) names the characters one may hold: letters, digits, `_`, `-` and `.`. A client that
|
|
21
|
+
receives one outside that set may refuse the tool, and one that accepts it rewrites what it shows
|
|
22
|
+
a model — so what is published has to be spellable as it stands.
|
|
23
|
+
|
|
24
|
+
| route | verb | method |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| `/pots` | `GET` | `pots.GET` |
|
|
27
|
+
| `/pots` | `POST` | `pots.POST` |
|
|
28
|
+
| `/pots/:id` | `GET` | `pots._id.GET` |
|
|
29
|
+
| `/identity/tokens/:identity` | `POST` | `identity.tokens._identity.POST` |
|
|
30
|
+
| `/files/**` | `GET` | `files.__.GET` |
|
|
31
|
+
| `/` | `GET` | `GET` |
|
|
32
|
+
|
|
33
|
+
The verb is always the last segment, so `/pots/GET` answering `POST` is `pots.GET.POST` and
|
|
34
|
+
`/pots` answering `GET` is `pots.GET`. Nothing is declared to make a name: a re-mounted route is
|
|
35
|
+
a renamed procedure, because the name is the address.
|
|
36
|
+
|
|
37
|
+
## What has a name
|
|
38
|
+
|
|
39
|
+
A segment is addressed where it holds only `A-Z`, `a-z`, `0-9` and `-`. `_` is the name's own,
|
|
40
|
+
marking a variable, and `__` the rest of a path; `.` is what divides one segment from the next.
|
|
41
|
+
|
|
42
|
+
A route with a segment holding anything else — a `.`, a `_`, a `*`, a variable that is not one
|
|
43
|
+
word — has no name. It is served over HTTP as it always was; what it loses is the address, so
|
|
44
|
+
`/.rpc` cannot call it. Each is said once at startup, naming the route and the segment.
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Route cannot be addressed as a procedure route=/pots/v1.0 segment=v1.0
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## The parameters
|
|
51
|
+
|
|
52
|
+
`params` is by name, and carries what a request carries.
|
|
53
|
+
|
|
54
|
+
A key the template names is a route variable, and is taken by the path. `query` is the
|
|
55
|
+
querystring. Whatever is left is the body.
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{"jsonrpc": "2.0", "id": 1, "method": "pots._id.GET", "params": {"id": "a1b2"}}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{"jsonrpc": "2.0", "id": 2, "method": "pots.POST",
|
|
63
|
+
"params": {"title": "Kettle", "volume": 1.7}}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{"jsonrpc": "2.0", "id": 3, "method": "pots.GET",
|
|
68
|
+
"params": {"query": {"criteria": "volume=gt=1", "limit": 10}}}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The querystring has a name of its own because an operation's input is free to have an `id` or
|
|
72
|
+
a `limit`, and the two would otherwise be one object. An operation whose input has a property
|
|
73
|
+
named `query` cannot be called with one.
|
|
74
|
+
|
|
75
|
+
A variable stands for a single segment, so its value may not contain `/`, `?` or `#`. `__`
|
|
76
|
+
stands for the rest of the path and may contain `/`; its value is read under the name `**`,
|
|
77
|
+
which is what the RTD calls it wherever else it is read.
|
|
78
|
+
|
|
79
|
+
## What answers
|
|
80
|
+
|
|
81
|
+
The reply is the operation's, restricted by the same [`io:output`](io.md) as the resource's,
|
|
82
|
+
and encoded as the request's `accept` asks. A call that returned nothing answers `result: null`
|
|
83
|
+
— JSON-RPC has no 404, and nothing went wrong.
|
|
84
|
+
|
|
85
|
+
A call with no `id` is a notification: it runs and answers nothing, and a request carrying only
|
|
86
|
+
notifications answers `204`.
|
|
87
|
+
|
|
88
|
+
## Several at once
|
|
89
|
+
|
|
90
|
+
A request may carry an array of calls instead of one, and answers an array of what they
|
|
91
|
+
answered — shorter than what it was given, where some were notifications.
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
[{"jsonrpc": "2.0", "id": 1, "method": "pots._id.GET", "params": {"id": "a1b2"}},
|
|
95
|
+
{"jsonrpc": "2.0", "method": "pots._id.DELETE", "params": {"id": "c3d4"}}]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
They run one after another, in the order given. `batch` is how many one request may carry, 32
|
|
99
|
+
where the annotation does not say: a request is one authentication and one reply however many
|
|
100
|
+
calls it makes, so what a caller may ask for at once is bounded.
|
|
101
|
+
|
|
102
|
+
## What refuses
|
|
103
|
+
|
|
104
|
+
The whole request is refused, with a status, when it is not a request this endpoint serves: a
|
|
105
|
+
verb other than `POST` is `405`, an unreadable body is `400`, and an array that is empty or
|
|
106
|
+
longer than `batch` is `400`.
|
|
107
|
+
|
|
108
|
+
A call that is not one — a version it does not state, a method it does not name — is answered
|
|
109
|
+
to nobody: `id` is `null`, because nothing about it is trustworthy enough to answer to.
|
|
110
|
+
|
|
111
|
+
A credential is the request's, so a call cannot be refused for one: a request that presents
|
|
112
|
+
none where the procedure requires one is `401`, and carries the challenge that says where to
|
|
113
|
+
authenticate.
|
|
114
|
+
|
|
115
|
+
Everything else a call runs into is a value, at `200`, because the request itself succeeded.
|
|
116
|
+
|
|
117
|
+
| | |
|
|
118
|
+
| --- | --- |
|
|
119
|
+
| `-32601` | no route of that name, or no such verb on it |
|
|
120
|
+
| `-32602` | a variable is missing, or a query is not one |
|
|
121
|
+
| `-32000` | the identity is not authorized to make this call |
|
|
122
|
+
| `-32001` | the operation refused, its own code in `data.code` |
|
|
123
|
+
| `-32603` | anything the gateway did not mean to answer |
|
|
124
|
+
| `-32002` | the request carries more calls than `batch` |
|
|
125
|
+
|
|
126
|
+
The first five codes JSON-RPC states mean the same to every client. `-32000` and `-32001` are
|
|
127
|
+
this gateway's, from the block the specification reserves and leaves empty, so
|
|
128
|
+
`-32001` says only that an operation refused — `data.code` is the code that operation declares
|
|
129
|
+
in its manifest, and is what a caller reads.
|
|
130
|
+
|
|
131
|
+
## Authorization
|
|
132
|
+
|
|
133
|
+
A procedure is authorized as the resource is, against the path and the verb its name states.
|
|
134
|
+
A token restricted to `/pots/:id/` for `GET` authorizes `pots._id.GET` and nothing else,
|
|
135
|
+
whichever way the call arrives.
|
|
136
|
+
|
|
137
|
+
[`anonymous`](access.md#anonymous) is the one directive that reads a call differently from a
|
|
138
|
+
request: it admits one whatever the request presented, because what refuses a credentialed request
|
|
139
|
+
is that the reply would not be cacheable, and what a call answers is not a reply.
|
|
140
|
+
|
|
141
|
+
## What has no procedure
|
|
142
|
+
|
|
143
|
+
`map:buffer` reads the request, and a call is not the request. A resource that declares it
|
|
144
|
+
answers over HTTP alone.
|
package/documentation/tree.md
CHANGED
|
@@ -71,6 +71,9 @@ Forwarding Route variables are mapped to the forwarded Route variables if they h
|
|
|
71
71
|
|
|
72
72
|
## Methods
|
|
73
73
|
|
|
74
|
+
Every Method is also addressable as a procedure, where the context annotates
|
|
75
|
+
[JSON-RPC](rpc.md).
|
|
76
|
+
|
|
74
77
|
Methods are mappings of the HTTP methods to the corresponding operations.
|
|
75
78
|
|
|
76
79
|
A Method is a key named after the corresponding HTTP method, with a value following the schema
|
|
@@ -323,6 +323,50 @@ Feature: Basic authentication
|
|
|
323
323
|
message: Principal username cannot be changed
|
|
324
324
|
"""
|
|
325
325
|
|
|
326
|
+
Scenario: A Principal incepted by its own credentials holds the role at once
|
|
327
|
+
Given the `identity.basic` database is empty
|
|
328
|
+
And the `identity.basic` configuration:
|
|
329
|
+
"""yaml
|
|
330
|
+
principal:
|
|
331
|
+
authority: nex
|
|
332
|
+
username: root
|
|
333
|
+
"""
|
|
334
|
+
And the annotation:
|
|
335
|
+
"""yaml
|
|
336
|
+
/:
|
|
337
|
+
io:output: true
|
|
338
|
+
GET:
|
|
339
|
+
auth:role: system:stub
|
|
340
|
+
dev:stub:
|
|
341
|
+
access: granted!
|
|
342
|
+
"""
|
|
343
|
+
# the token the inception replies with carries the roles the Identity has by then
|
|
344
|
+
When the following request is received:
|
|
345
|
+
"""
|
|
346
|
+
POST /identity/ HTTP/1.1
|
|
347
|
+
host: nex.toa.io
|
|
348
|
+
authorization: Basic cm9vdDpzZWNyZXQjMTIzNA==
|
|
349
|
+
accept: application/yaml
|
|
350
|
+
"""
|
|
351
|
+
Then the following reply is sent:
|
|
352
|
+
"""
|
|
353
|
+
201 Created
|
|
354
|
+
authorization: Token ${{ token }}
|
|
355
|
+
"""
|
|
356
|
+
When the following request is received:
|
|
357
|
+
"""
|
|
358
|
+
GET / HTTP/1.1
|
|
359
|
+
host: nex.toa.io
|
|
360
|
+
authorization: Token ${{ token }}
|
|
361
|
+
accept: application/yaml
|
|
362
|
+
"""
|
|
363
|
+
Then the following reply is sent:
|
|
364
|
+
"""
|
|
365
|
+
200 OK
|
|
366
|
+
|
|
367
|
+
access: granted!
|
|
368
|
+
"""
|
|
369
|
+
|
|
326
370
|
Scenario: Principal username in another authority is ordinary credentials
|
|
327
371
|
Given the `identity.basic` configuration:
|
|
328
372
|
"""yaml
|
|
@@ -197,16 +197,13 @@ Feature: Identity Federation
|
|
|
197
197
|
id: ${{ root.id }}
|
|
198
198
|
"""
|
|
199
199
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
# the role is checked over the id token: a Token carries the roles held when it
|
|
203
|
-
# was issued, and this one was issued before the grant
|
|
200
|
+
# the Role is granted before the reply, so the Token that reply carries holds it
|
|
204
201
|
When the following request is received:
|
|
205
202
|
"""
|
|
206
203
|
GET /identity/ HTTP/1.1
|
|
207
204
|
host: nex.toa.io
|
|
208
205
|
accept: application/yaml
|
|
209
|
-
authorization:
|
|
206
|
+
authorization: Token ${{ root.token }}
|
|
210
207
|
"""
|
|
211
208
|
Then the following reply is sent:
|
|
212
209
|
"""
|