Expand description
ORCS Application Layer.
This crate provides:
OrcsApp: High-level application wrapper with HIL integration- Re-exports: Convenient access to all ORCS crates
AppError: Unified application-level error type
§Quick Start
ⓘ
use orcs_app::{OrcsApp, NoOpResolver};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let mut app = OrcsApp::builder(NoOpResolver).build().await?;
app.run_interactive().await?;
Ok(())
}§Crate Architecture
┌─────────────────────────────────────────────────────────────┐
│ Plugin SDK Layer │
├─────────────────────────────────────────────────────────────┤
│ orcs-types, orcs-event, orcs-component │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ Runtime Layer │
├─────────────────────────────────────────────────────────────┤
│ orcs-runtime (auth, channel, engine, components, io) │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ Application Layer ◄── HERE │
├─────────────────────────────────────────────────────────────┤
│ orcs-app (OrcsApp + re-exports + AppError) │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ Frontend Layer │
├─────────────────────────────────────────────────────────────┤
│ orcs-cli (uses OrcsApp → interactive mode) │
└─────────────────────────────────────────────────────────────┘§Error Handling Strategy
Internal Errors (ChannelError, EngineError, etc.)
↓ From impl
AppError (this crate)
↓ anyhow::Error / eprintln
CLI outputModules§
- builtins
- Builtin components shipped with the binary.
- priority
- Priority constants for common channel types.
Structs§
- Channel
Config - Configuration for a
Channel. - Channel
Handle - Handle for injecting events into a
ChannelRunner. - Channel
Id - Identifier for a Channel in the ORCS architecture.
- Channel
Runner - Execution context for a single Channel.
- Client
Runner - Runner with IO bridging for Human-interactive channels.
- Component
Handle - Handle for component to receive messages
- Component
Id - Identifier for a Component in the ORCS architecture.
- Components
Config - Component loading configuration.
- Config
Loader - Configuration loader with builder pattern.
- Decorator
Config - Decorator package configuration.
- Default
Policy - Default permission policy.
- Echo
With HilComponent - Echo component with HIL integration.
- EnvOverrides
- Environment variable overrides.
- Event
- An event that can be injected into a channel.
- Event
Bus - EventBus - routes messages between components and channels.
- EventId
- Identifier for an Event in the ORCS EventBus.
- HilConfig
- Human-in-the-loop configuration.
- Model
Config - Model configuration.
- NoOp
Resolver - No-op resolver that returns default configuration.
- OrcsApp
- ORCS Application.
- Orcs
AppBuilder - Builder for
OrcsApp. - Orcs
Config - Main configuration structure.
- Orcs
Engine - OrcsEngine - Main runtime for ORCS CLI.
- Output
Receiver - Receiver end of an
OutputSenderchannel. - Output
Sender - Opaque handle for sending events into a channel as
InboundEvent::Direct. - Paths
Config - Path configuration.
- Principal
Id - Identifier for a Principal (actor) in the ORCS system.
- Progress
- Progress information for long-running operations.
- Project
Sandbox - Default sandbox rooted at the project directory.
- Request
- A synchronous request message between Components.
- Request
Id - Identifier for a Request in the ORCS EventBus.
- Session
- An active security context combining identity and privilege.
- Shared
Printer Slot - Shared slot holding an optional [
NonBlockingPrinter]. - Signal
- A control signal message.
- Status
Detail - Detailed status information.
- UiConfig
- UI configuration.
- World
- Central manager for all
Channels. - World
Manager - Manages World state with concurrent access support.
Enums§
- AppError
- Unified application error.
- Channel
Error - Channel layer error.
- Channel
State - State of a channel.
- Component
Error - Component layer error.
- Config
Error - Configuration error type.
- Engine
Error - Engine layer error.
- Event
Error - Event layer error.
- Principal
- The actor performing an action.
- Print
Result - Result of attempting to print through the shared slot.
- Privilege
Level - The current privilege level of a session.
- Sandbox
Error - Errors from sandbox path validation.
- Signal
Kind - The type of signal being sent.
- Signal
Response - Response from a component after receiving a signal.
- Signal
Scope - The scope affected by a signal or permission check.
- State
Transition - State transition operations.
- Status
- Component execution status.
- WorkDir
- A directory whose existence is guaranteed while this value is alive.
- World
Command - Commands for modifying
Worldstate.
Constants§
- DEFAULT_
TIMEOUT_ MS - Default request timeout in milliseconds (30 seconds).
Traits§
- Child
- A child entity managed by a Component.
- Component
- Component trait for EventBus participants.
- Config
Resolver - Trait for resolving configuration from all sources.
- Error
Code - Unified error code interface for ORCS errors.
- Identifiable
- Identifiable component or child.
- Permission
Checker - Runtime-level permission checker with HIL integration.
- Sandbox
Policy - Resource boundary policy for file operations.
- Signal
Receiver - Signal receiver for human control.
- Statusable
- Status reporting for monitoring.
- TryNew
- Trait for fallible construction with validation.
Type Aliases§
- Channel
- Type alias for backward compatibility.
- World
Command Sender - Handle for sending commands to
WorldManager.