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 McpStdioTransport: (source)
Constructor: McpStdioTransport(app, compiled, config, bus)
Keep the reader available while bounded request tasks execute independently.
| Method | __init__ |
Prepare request-local task ownership without touching process streams. |
| Async Method | _accept |
Stop queued output without joining a potentially blocked OS writer. |
| Method | _cancel |
Ignore malformed, unknown and already completed cancellation messages. |
| Method | _done |
Remove completed task ownership and notify the reader of I/O failures. |
| Async Method | _invoke |
Execute one call in its own DI scope, sanitizing only application errors. |
| Async Method | _read |
Race each cancellable read against a failed request's transport I/O. |
| Async Method | _stream |
Preserve backpressure and close an owned producer on all exits. |
| Async Method | _write |
Serialize frames and suppress output after EOF or owner shutdown. |
| Async Method | run |
Run until EOF, joining all owned request cleanup before returning. |
| Async Method | run |
Bind portable daemon-backed streams and keep application prints on stderr. |
| Class Variable | __slots__ |
Declare the instance attribute slots reserved by this class. |
| Instance Variable | _active |
Operations currently running for this connection or transport. |
| Instance Variable | _app |
Application container supplying configuration and dependencies. |
| Instance Variable | _closing |
Whether resource cleanup is currently in progress. |
| Instance Variable | _config |
Validated configuration controlling this component. |
| Instance Variable | _dispatcher |
Dispatcher produced by McpDispatcher. |
| Instance Variable | _failed |
Backend retaining failed-job records. |
| Instance Variable | _failure |
Failure retained for propagation or reporting. |
| Instance Variable | _lock |
Lock protecting concurrent access to shared state. |
| Instance Variable | _reports |
Failure delivery tasks owned until transport shutdown. |
| Instance Variable | _running |
Running flag used by McpStdioTransport. |
IApplication, compiled: CompiledMcpServer, config: McpConfig, bus: IMcpEventBus):
(source)
¶
Prepare request-local task ownership without touching process streams.
| Parameters | |
app:orionis.IApplication | Application container supplying configuration and dependencies. |
compiled:orionis.mcp.server.compiler.CompiledMcpServer | Precompiled metadata shared by request executions. |
config:orionis.mcp.config.McpConfig | Validated configuration controlling this component. |
bus:orionis.mcp.contracts.event_bus.IMcpEventBus | Value supplied for bus. |
| Returns | |
None | Complete the documented operation without returning a value. |
Stop queued output without joining a potentially blocked OS writer.
| Parameters | |
data:bytes | Value supplied for data. |
writer:orionis.mcp.transport.stdio.LineWriter | Output stream receiving complete messages with backpressure. |
| Returns | |
None | Complete the documented operation without returning a value. |
Ignore malformed, unknown and already completed cancellation messages.
| Parameters | |
request:orionis.mcp.protocol.requests.JsonRpcRequest | Current request and its trusted execution context. |
| Returns | |
None | Complete the documented operation without returning a value. |
Remove completed task ownership and notify the reader of I/O failures.
| Parameters | |
requeststr | int | Value supplied for request_id. |
task:asyncio.Task[None] | Value supplied for task. |
| Returns | |
None | Complete the documented operation without returning a value. |
Execute one call in its own DI scope, sanitizing only application errors.
| Parameters | |
request:orionis.mcp.protocol.requests.JsonRpcRequest | Current request and its trusted execution context. |
writer:orionis.mcp.transport.stdio.LineWriter | Output stream receiving complete messages with backpressure. |
| Returns | |
None | Complete the documented operation without returning a value. |
Race each cancellable read against a failed request's transport I/O.
| Parameters | |
reader:orionis.mcp.transport.stdio.LineReader | Input stream supplying bounded messages. |
writer:orionis.mcp.transport.stdio.LineWriter | Output stream receiving complete messages with backpressure. |
| Returns | |
None | Complete the documented operation without returning a value. |
Preserve backpressure and close an owned producer on all exits.
| Parameters | |
writer:orionis.mcp.transport.stdio.LineWriter | Output stream receiving complete messages with backpressure. |
source:collections.abc.AsyncIterator[bytes] | Source whose values or lifecycle are consumed by this operation. |
| Returns | |
None | Complete the documented operation without returning a value. |
Serialize frames and suppress output after EOF or owner shutdown.
| Parameters | |
writer:orionis.mcp.transport.stdio.LineWriter | Output stream receiving complete messages with backpressure. |
data:bytes | Value supplied for data. |
| Returns | |
None | Complete the documented operation without returning a value. |
Run until EOF, joining all owned request cleanup before returning.
| Parameters | |
reader:orionis.mcp.transport.stdio.LineReader | Input stream supplying bounded messages. |
writer:orionis.mcp.transport.stdio.LineWriter | Output stream receiving complete messages with backpressure. |
| Returns | |
None | Complete the documented operation without returning a value. |
Bind portable daemon-backed streams and keep application prints on stderr.
| Returns | |
None | Complete the documented operation without returning a value. |