ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

Perform no connection negotiation and retain no request or identity.

Async Static Method _catalogResult Discard intermediate notifications without accumulating their bytes.
Static Method _cursor Decode a cursor without retaining any server-side pagination state.
Method __init__ Share immutable definitions and bounded worker services.
Async Method _access Resolve fresh handlers and enforce both independent access hooks.
Method _cache Never share retry results or default request-dependent content publicly.
Async Method _catalog Bound lexical search and reuse the ordinary execution pipeline.
Async Method _complete Run completion through the referenced primitive's access policy.
Method _encode Attach precompiled identity and encode the response exactly once.
Async Method _execute Route known core methods without reflection or dynamic imports.
Async Method _executeCatalog Execute a bounded batch through the same policy and validation path.
Async Method _extension Run an explicitly negotiated extension without implicit capabilities.
Async Method _invoke Share one execution path between direct and catalog calls.
Async Method _list Build a bounded deterministic page after request-specific access checks.
Async Method _listen Accept only supported changes and resource URIs authorized right now.
Method _normalize Convert developer responses into the method's exact result type.
Async Method _report Use the native reporting hook without invoking HTML/CLI presentation.
Method _request Create context from typed parameters, never from connection history.
Method _resource Prefer exact URI lookup before compiled RFC 6570 template matchers.
Async Method _searchCatalog Rank precompiled text deterministically after request-specific checks.
Async Method _stream Pull notifications with transport backpressure and close on cancellation.
Async Method _subscriptionResource Give all admission dependencies the same resource-specific context.
Async Method _subscriptionStream Acknowledge before events; use SSE comments for idle keepalive.
Method _supports Read one static compiled capability hint.
Method decode Validate core metadata before an extension's precompiled decoder.
Async Method dispatch Execute the same availability, authorization and DI on every transport.
Async Method handle Decode one message; transports supply their own framing and scope.
Class Variable __slots__ Undocumented
Instance Variable _extensions Undocumented
Instance Variable _list_sources Undocumented
Instance Variable _server_id Undocumented
Instance Variable app Undocumented
Instance Variable bus Undocumented
Instance Variable config Undocumented
Instance Variable server Undocumented
async def _catalogResult(result: object) -> dict[str, object]: (source)

Discard intermediate notifications without accumulating their bytes.

Parameters
result:objectValue supplied for result.
Returns
dict[str, object]Result of the operation described above.
def _cursor(method: str, cursor: str | msgspec.UnsetType) -> str: (source)

Decode a cursor without retaining any server-side pagination state.

Parameters
method:strValue supplied for method.
cursor:str | msgspec.UnsetTypeValue supplied for cursor.
Returns
strResult of the operation described above.
def __init__(self, app: IContainer, compiled: CompiledMcpServer, config: McpConfig, event_bus: IMcpEventBus): (source)

Share immutable definitions and bounded worker services.

Parameters
app:IContainerApplication container supplying configuration and dependencies.
compiled:CompiledMcpServerPrecompiled metadata shared by request executions.
config:McpConfigValidated configuration controlling this component.
event_bus:IMcpEventBusSubscription service delivering server changes.
Returns
NoneComplete the documented operation without returning a value.
async def _access(self, primitive: CompiledPrimitive, request: McpRequest, *, listing: bool = False) -> object | None: (source)

Resolve fresh handlers and enforce both independent access hooks.

Parameters
primitive:CompiledPrimitiveCompiled tool, resource or prompt declaration.
request:McpRequestCurrent request and its trusted execution context.
listing:boolValue supplied for listing.
Returns
object | NoneResult of the operation described above.
def _cache(self, primitive: CompiledPrimitive | None = None, request: McpRequest | None = None) -> CacheOptions: (source)

Never share retry results or default request-dependent content publicly.

Parameters
primitive:CompiledPrimitive | NoneCompiled tool, resource or prompt declaration.
request:McpRequest | NoneCurrent request and its trusted execution context.
Returns
CacheOptionsResult of the operation described above.
async def _catalog(self, primitive: CompiledPrimitive, request: McpRequest) -> CallToolResult | InputRequiredResult: (source)

Bound lexical search and reuse the ordinary execution pipeline.

Parameters
primitive:CompiledPrimitiveCompiled tool, resource or prompt declaration.
request:McpRequestCurrent request and its trusted execution context.
Returns
CallToolResult | InputRequiredResultResult of the operation described above.
async def _complete(self, request: McpRequest, params: CompleteParams) -> CompleteCompletionResult: (source)

Run completion through the referenced primitive's access policy.

Parameters
request:McpRequestCurrent request and its trusted execution context.
params:CompleteParamsParameters decoded for the requested operation.
Returns
CompleteCompletionResultResult of the operation described above.
def _encode(self, request: McpRequest, result: object, *, internal_meta: dict[str, object] | None = None) -> bytes: (source)

Attach precompiled identity and encode the response exactly once.

Parameters
request:McpRequestCurrent request and its trusted execution context.
result:objectValue supplied for result.
internal_meta:dict[str, object] | NoneValue supplied for internal_meta.
Returns
bytesResult of the operation described above.
async def _execute(self, request: McpRequest, params: RequestParams) -> object: (source)

Route known core methods without reflection or dynamic imports.

Parameters
request:McpRequestCurrent request and its trusted execution context.
params:RequestParamsParameters decoded for the requested operation.
Returns
objectResult of the operation described above.
async def _executeCatalog(self, catalog: CompiledCatalog, request: McpRequest) -> McpResponse | InputRequiredResult: (source)

Execute a bounded batch through the same policy and validation path.

Parameters
catalog:CompiledCatalogValue supplied for catalog.
request:McpRequestCurrent request and its trusted execution context.
Returns
McpResponse | InputRequiredResultResult of the operation described above.
async def _extension(self, request: McpRequest, params: RequestParams) -> object: (source)

Run an explicitly negotiated extension without implicit capabilities.

Parameters
request:McpRequestCurrent request and its trusted execution context.
params:RequestParamsParameters decoded for the requested operation.
Returns
objectResult of the operation described above.
async def _invoke(self, primitive: CompiledPrimitive, request: McpRequest) -> object: (source)

Share one execution path between direct and catalog calls.

Parameters
primitive:CompiledPrimitiveCompiled tool, resource or prompt declaration.
request:McpRequestCurrent request and its trusted execution context.
Returns
objectResult of the operation described above.
async def _list(self, request: McpRequest, params: PaginatedParams) -> object: (source)

Build a bounded deterministic page after request-specific access checks.

Parameters
request:McpRequestCurrent request and its trusted execution context.
params:PaginatedParamsParameters decoded for the requested operation.
Returns
objectResult of the operation described above.
async def _listen(self, request: McpRequest, params: ListenParams) -> AsyncIterator[bytes]: (source)

Accept only supported changes and resource URIs authorized right now.

Parameters
request:McpRequestCurrent request and its trusted execution context.
params:ListenParamsParameters decoded for the requested operation.
Returns
AsyncIterator[bytes]Result of the operation described above.
def _normalize(self, primitive: CompiledPrimitive, request: McpRequest, result: object) -> object: (source)

Convert developer responses into the method's exact result type.

Parameters
primitive:CompiledPrimitiveCompiled tool, resource or prompt declaration.
request:McpRequestCurrent request and its trusted execution context.
result:objectValue supplied for result.
Returns
objectResult of the operation described above.
async def _report(self, exception: Exception): (source)

Use the native reporting hook without invoking HTML/CLI presentation.

Parameters
exception:ExceptionException being inspected or reported.
Returns
NoneComplete the documented operation without returning a value.
def _request(self, envelope: JsonRpcRequest, params: RequestParams, transport: TransportName, native: Request | None) -> McpRequest: (source)

Create context from typed parameters, never from connection history.

Parameters
envelope:JsonRpcRequestValue supplied for envelope.
params:RequestParamsParameters decoded for the requested operation.
transport:TransportNameValue supplied for transport.
native:Request | NoneValue supplied for native.
Returns
McpRequestResult of the operation described above.
def _resource(self, request: McpRequest, uri: str) -> tuple[CompiledPrimitive | None, McpRequest]: (source)

Prefer exact URI lookup before compiled RFC 6570 template matchers.

Parameters
request:McpRequestCurrent request and its trusted execution context.
uri:strValue supplied for uri.
Returns
tuple[CompiledPrimitive | None, McpRequest]Result of the operation described above.
async def _searchCatalog(self, catalog: CompiledCatalog, request: McpRequest) -> McpResponse: (source)

Rank precompiled text deterministically after request-specific checks.

Parameters
catalog:CompiledCatalogValue supplied for catalog.
request:McpRequestCurrent request and its trusted execution context.
Returns
McpResponseResult of the operation described above.
async def _stream(self, primitive: CompiledPrimitive, request: McpRequest, source: AsyncIterator[object]) -> AsyncIterator[bytes]: (source)

Pull notifications with transport backpressure and close on cancellation.

Parameters
primitive:CompiledPrimitiveCompiled tool, resource or prompt declaration.
request:McpRequestCurrent request and its trusted execution context.
source:AsyncIterator[object]Source whose values or lifecycle are consumed by this operation.
Returns
AsyncIterator[bytes]Undocumented
Yields
bytesEach item produced by the documented iteration.
async def _subscriptionResource(self, request: McpRequest, uri: str) -> bool: (source)

Give all admission dependencies the same resource-specific context.

Parameters
request:McpRequestCurrent request and its trusted execution context.
uri:strValue supplied for uri.
Returns
boolResult of the operation described above.
async def _subscriptionStream(self, request: McpRequest, filters: SubscriptionFilter, source: AsyncIterator[tuple[str, str | None]]) -> AsyncIterator[bytes]: (source)

Acknowledge before events; use SSE comments for idle keepalive.

Parameters
request:McpRequestCurrent request and its trusted execution context.
filters:SubscriptionFilterValue supplied for filters.
source:AsyncIterator[tuple[str, str | None]]Source whose values or lifecycle are consumed by this operation.
Returns
AsyncIterator[bytes]Undocumented
Yields
bytesEach item produced by the documented iteration.
def _supports(self, capability: str, feature: str) -> bool: (source)

Read one static compiled capability hint.

Parameters
capability:strValue supplied for capability.
feature:strValue supplied for feature.
Returns
boolResult of the operation described above.
def decode(self, envelope: JsonRpcRequest) -> RequestParams: (source)

Validate core metadata before an extension's precompiled decoder.

Parameters
envelope:JsonRpcRequestValue supplied for envelope.
Returns
RequestParamsResult of the operation described above.
async def dispatch(self, envelope: JsonRpcRequest, params: RequestParams, *, transport: TransportName = 'test', native_request: Request | None = None) -> DispatchResult: (source)

Execute the same availability, authorization and DI on every transport.

Parameters
envelope:JsonRpcRequestValue supplied for envelope.
params:RequestParamsParameters decoded for the requested operation.
transport:TransportNameValue supplied for transport.
native_request:Request | NoneValue supplied for native_request.
Returns
DispatchResultResult of the operation described above.
async def handle(self, data: bytes, *, transport: TransportName = 'test', native_request: Request | None = None) -> DispatchResult: (source)

Decode one message; transports supply their own framing and scope.

Parameters
data:bytesValue supplied for data.
transport:TransportNameValue supplied for transport.
native_request:Request | NoneValue supplied for native_request.
Returns
DispatchResultResult of the operation described above.
__slots__: tuple[str, ...] = (source)

Undocumented

_extensions = (source)

Undocumented

_list_sources = (source)

Undocumented

_server_id = (source)

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented