Expand description
Core types for ORCS CLI.
This crate provides foundational identifier types for the ORCS (Orchestrated Runtime for Collaborative Systems) architecture.
§Crate Architecture
┌─────────────────────────────────────────────────────────────┐
│ Plugin SDK Layer │
│ (External, SemVer stable, safe to depend on) │
├─────────────────────────────────────────────────────────────┤
│ orcs-types : ID types, Principal, ErrorCode ◄── HERE │
│ orcs-event : Signal, Request, Event │
│ orcs-component : Component trait (WIT target) │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ Runtime Layer │
│ (Internal implementation, NOT for plugins) │
├─────────────────────────────────────────────────────────────┤
│ orcs-runtime : auth, channel, engine │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ Frontend Layer │
│ (CLI, GUI, Network interfaces) │
├─────────────────────────────────────────────────────────────┤
│ orcs-cli : Command-line interface │
└─────────────────────────────────────────────────────────────┘§Why Plugin SDK?
This crate is part of the Plugin SDK layer because:
- SemVer stable: API changes follow semantic versioning
- Minimal dependencies: Only what plugins truly need
- WIT compatible: Types can be exported to WASM components
- Implementation freedom: Runtime can change without breaking plugins
§Event Architecture
ORCS uses an EventBus-based architecture where all communication between Components flows through unified message types:
- Request/Response: Synchronous queries between Components
- Event: Asynchronous broadcasts (no response expected)
- Signal: Human control interrupts (highest priority)
§Identifier Design
All identifiers are UUID-based for:
- Network compatibility: Safe to transmit across processes/machines
- Cloud readiness: Globally unique without coordination
- Serialization: First-class serde support
§Example
use orcs_types::{ComponentId, ChannelId, RequestId, EventId};
// Builtin components have deterministic UUIDs
let llm = ComponentId::builtin("llm");
let llm2 = ComponentId::builtin("llm");
assert_eq!(llm, llm2); // Same UUID
// Custom components get random UUIDs
let plugin = ComponentId::new("plugin", "my-tool");
// Channel for parallel execution context
let channel = ChannelId::new();
// Request/Response tracking
let req_id = RequestId::new();
// Event broadcast tracking
let evt_id = EventId::new();Re-exports§
pub use intent::ActionIntent;pub use intent::Confidence;pub use intent::ContentBlock;pub use intent::IntentDef;pub use intent::IntentMeta;pub use intent::IntentResolver;pub use intent::IntentResult;pub use intent::IntentSource;pub use intent::MessageContent;pub use intent::Priority;pub use intent::Role;pub use intent::StopReason;
Modules§
- intent
- ActionIntent domain types.
Structs§
- Channel
Id - Identifier for a Channel in the ORCS architecture.
- Component
Id - Identifier for a Component in the ORCS architecture.
- EventId
- Identifier for an Event in the ORCS EventBus.
- Principal
Id - Identifier for a Principal (actor) in the ORCS system.
- Request
Id - Identifier for a Request in the ORCS EventBus.
Enums§
- Principal
- The actor performing an action.
- Signal
Scope - The scope affected by a signal or permission check.
Traits§
- Error
Code - Unified error code interface for ORCS errors.
- TryNew
- Trait for fallible construction with validation.
Functions§
- assert_
error_ code - Validates that an error code follows ORCS conventions.
- assert_
error_ codes - Validates multiple error codes at once.