colmugx/posoco/runtime does not have a README file

    CatalogSource

    pub(open) trait CatalogSource {
    fn revision(Self) -> Int
    fn tools(Self) -> Array[
    ToolDef
    ]
    }

    CatalogSource — a host-owned, versioned tool catalog (experimental runtime seam). Advanced hosts whose tool set changes over the Agent's lifetime (dynamic registration, trust/capability gates, remote tool protocols) supply one via Agent::with_runtime(catalog_source~); plain extension authors declare tools through ToolProvider and never need this.

    Read protocol — Posoco reads the source only at well-defined points:
    • once at Agent construction (the initial snapshot), and
    • at operation admission (turn, resume, wakeup or idle compact) when revision() differs from the last read. Follow-ups within the same operation keep the captured catalog and bindings.

    Each revision change triggers exactly one rebuild attempt. When the rebuilt definitions fail catalog validation (name collision, malformed schema), the previous snapshot stays in effect and the failure is surfaced as a secondary_failure observer event — the turn is never aborted. To retry, change revision() again.

    An in-flight run always keeps the snapshot (and catalog version) it started with; refreshes only affect subsequent runs. Posoco pins the catalog version monotonically — the source's revision is an opaque change signal and is never used as the catalog version itself.

    This legacy seam supplies definitions, not fixed implementations. Direct execution remains the host Runtime's responsibility. Bound dynamic groups are merged atomically and cannot be shadowed by a source update.

    Runtime

    The public effect-execution contract. Mirrors the internal boundary 1:1; Posoco adapts it mechanically (a thin shim packs/unpacks EffectContext), so this trait never grows semantics the internal loop does not have.

    Implementors usually wrap PortRuntime and override only the methods they need (typically execute_tool + cancel_effects); see docs/RUNTIME.md.

    EffectContext

    pub struct EffectContext {
    effect_id :
    EffectId

    owner :
    OwnerId

    call_id :
    CallId

    tool_name :
    ToolName

    arguments : Json
    // private fields
    }

    Stable execution context for a single tool effect. effect_id is the reducer-allocated identity of the ExecuteTool effect — the same id the runtime later receives in cancel_effects. Runtimes that propagate cancellation MUST key their in-flight execution state (e.g. an AbortController) by effect_id, not by execution order or call content.

    EffectContext::EffectContext

    Hosts forwarding an effect must forward this context unchanged. This constructor creates an unbound legacy effect unless a framework supplies an operation-captured provider.

    EffectContext::has_bound_tool

    fn EffectContext::has_bound_tool(self : EffectContext) -> Bool

    EnqueueOutcome

    pub(all) enum EnqueueOutcome {
    Accepted(command_id~ : String)
    RejectedStale(reason~ : String)
    RejectedQueueFull(depth~ : Int)
    AbortAlreadyRequested
    RejectedQueueFailure(reason~ : String)
    } derive(Eq,
    Debug
    )

    Pure result returned by Agent-owned host control operations.

    EnqueueOutcome::equal

    EnqueueOutcome::not_equal

    fn EnqueueOutcome::not_equal(x : EnqueueOutcome, y : EnqueueOutcome) -> Bool

    EnqueueOutcome::output

    fn EnqueueOutcome::output(self : EnqueueOutcome, logger : &Logger) -> Unit

    EnqueueOutcome::to_string

    fn EnqueueOutcome::to_string(self : EnqueueOutcome) -> String

    PortRuntime

    pub struct PortRuntime {
    // private fields
    }

    PortRuntime::PortRuntime

    PortRuntime::execute_tool

    PortRuntime::supports_bound_tools

    fn PortRuntime::supports_bound_tools(_self : PortRuntime) -> Bool