colmugx/posoco/builtin does not have a README file

    CompositeUiPort

    pub(all) struct CompositeUiPort {
    contributors : Array[&
    UiPort
    ]
    }

    Fan-out UiPort: render delivers to every contributor; request tries each in order, first non-Unsupported wins.

    CompositeUiPort::CompositeUiPort

    CompositeUiPort::contributors

    CompositeUiPort::render

    Broadcast to every contributor in registration order. Best-effort.

    CompositeUiPort::request

    Try each contributor in order. First non-Unsupported result wins; all-Unsupported raises Unsupported.

    CompositeUiPort::ui_descriptor

    Concatenate autocomplete sources in registration order.

    NoopLifecycle

    pub(all) struct NoopLifecycle {
    }

    NoopLifecycle::on_shutdown

    async fn NoopLifecycle::on_shutdown(_self : NoopLifecycle) -> Unit

    NoopLifecycle::on_start

    async fn NoopLifecycle::on_start(_self : NoopLifecycle) -> Unit

    NoopUiPort

    pub(all) struct NoopUiPort {
    }

    Default UiPort for headless hosts. request raises Unsupported.

    NoopUiPort::NoopUiPort

    fn NoopUiPort::NoopUiPort() -> NoopUiPort

    NoopUiPort::render

    fn NoopUiPort::render(_self : NoopUiPort, _intent :
    UiRender
    ) -> Unit

    NoopUiPort::ui_descriptor

    SystemPromptHook

    pub(all) struct SystemPromptHook {
    base_prompt : String
    contributors : Array[SystemPromptSection]
    assembled : String?
    }

    Combines a fixed base prompt with contributor sections and prepends the result as a single System message at index 0. Empty sections are skipped.

    The assembled prompt is cached lazily on the first call to before_model. Laziness matters because extension Lifecycle::on_start callbacks run inside the first run_single_turn but before the first before_model, so contributors whose state is initialized in on_start must be read after that point. After caching, the text is frozen for the lifetime of the hook.

    SystemPromptHook::SystemPromptHook

    fn SystemPromptHook::SystemPromptHook(base_prompt~ : String, contributors~ : Array[SystemPromptSection]) -> SystemPromptHook

    SystemPromptHook::assemble

    fn SystemPromptHook::assemble(self : SystemPromptHook) -> String

    Assemble base + non-blank contributor sections, joined verbatim with a blank line (\n\n). A section whose text is only whitespace counts as empty and is skipped; surviving bodies are never trimmed or reflowed. The result is empty when the base prompt and every contributor are blank.

    SystemPromptHook::before_model

    Inject one stable SystemMessage at index 0.

    Semantics:
    1. If the assembled prompt is empty, return messages unchanged.
    2. If messages is empty, return [SystemMessage(assembled)].
    3. If messages[0] is a SystemMessage whose content is exactly one Text equal to the assembled prompt, return the same array instance (no rewrite, no journal noise).
    4. If messages[0] is a SystemMessage with different content, replace it.
    5. Otherwise prepend the new SystemMessage.

    SystemPromptHook::on_post_event

    SystemPromptHook::on_turn_begin

    async fn SystemPromptHook::on_turn_begin(_self : SystemPromptHook) -> Unit

    SystemPromptHook::on_turn_end

    async fn SystemPromptHook::on_turn_end(_self : SystemPromptHook) -> Unit

    SystemPromptSection

    pub(all) struct SystemPromptSection {
    id : String
    contributor : &
    SystemPromptContributor

    }

    A contributor entry: id records the source manifest for attribution; it is not rendered into the assembled prompt.

    SystemPromptSection::SystemPromptSection

    ToolRegistry

    Dynamic runtime tool registration. Implements ToolProvider.

    ToolRegistry::ToolRegistry

    fn ToolRegistry::ToolRegistry() -> ToolRegistry

    ToolRegistry::list_tools

    ToolRegistry::register

    Register (or deliberately replace) a tool at runtime. Re-registering an existing name overwrites both the definition and the executor — that is intentional hot-replacement semantics for dynamic registries. Callers that did NOT mean to replace should use register_strict, which fails fast on a name collision instead of silently shadowing the prior tool.

    ToolRegistry::register_strict

    Register a tool, failing fast with RuntimeError::ToolAlreadyRegistered when the name is already taken. This mirrors the composition-time rule: a name collision is never silently resolved by last-wins.

    ToolRegistry::unregister

    fn ToolRegistry::unregister(self : ToolRegistry, name : String) -> Unit

    UiRenderHook

    pub(all) struct UiRenderHook {
    ui : &
    UiPort

    }

    UiRenderHook: PipelineHook (on_post_event) that projects events into UI render intents. Non-raising by contract (both PipelineHook::on_post_event and UiPort::render are non-raising), so there is nothing to propagate.

    UiRenderHook::UiRenderHook

    UiRenderHook::on_post_event

    async fn UiRenderHook::on_post_event(self : UiRenderHook, _scope :
    EventScope
    ?, stage :
    HookStage
    ) -> Unit noraise

    UiRenderHook::on_turn_begin

    async fn UiRenderHook::on_turn_begin(_self : UiRenderHook) -> Unit

    UiRenderHook::on_turn_end

    async fn UiRenderHook::on_turn_end(_self : UiRenderHook) -> Unit

    UiRenderHook::tool_exposure

    parse_slash_args

    fn parse_slash_args(text : String, params : Array[
    CommandParam
    ]) -> Result[
    Json
    , String]

    Parse a slash argument string into a JSON object according to CommandParam definitions. Positional params fill in declaration order; non-positional params expect key=value form. Applies defaults for missing optional params. Returns Err with a reason string on type conversion failure or missing required params. Pure function (no IO).

    validate_args

    Validate a JSON object of args against a CommandDef's params. Checks required presence; optional params with no value and no default are omitted (not an error). Returns the (possibly defaulted) args on Ok. Pure function (no IO).