Skip to content

[Reborn] Compose ironclaw_host_runtime services #3087

@serrrfirat

Description

@serrrfirat

Parent

#2987

Current split

#3095 now provides the ironclaw_host_runtime contract plus a first DefaultHostRuntime wrapper:

HostRuntime
  -> CapabilityHost
     over ExtensionRegistry
        + CapabilityDispatcher trait object
        + TrustAwareCapabilityDispatchAuthorizer
        + run-state / approval-request / capability-lease stores
        + optional ProcessManager

This issue owns the full concrete HostRuntimeServices graph around/behind that wrapper. The goal is not to add product workflow logic to host runtime; it is to assemble the concrete kernel services so upper Reborn layers do not manually wire dispatcher/runtime/process/resource/event/filesystem/memory/secrets/network/trust/obligation pieces.

What to build

Compose the Reborn kernel services into ironclaw_host_runtime so callers can construct one coherent host runtime service graph instead of manually wiring CapabilityHost, authorization/approvals/run-state, RuntimeDispatcher, process services, resources, events/audit, filesystem, memory, secrets/network policy, trust evaluation, obligations, runtime HTTP egress, and runtime adapters piecemeal.

This should stay composition-only: service-owned logic remains in the owning crates, and host runtime owns assembly/default wiring only.

Acceptance criteria

  • ironclaw_host_runtime exposes a narrow HostRuntimeServices/builder-style composition API for the kernel service graph.
  • Composition includes the feat(reborn): add host runtime contract facade #3095 DefaultHostRuntime/HostRuntime boundary and wires CapabilityHost, authorization/approvals/run-state, dispatcher, process services, resources, event/audit sink, filesystem, memory services, secrets/network services, and Script/MCP/WASM runtime adapters where available.
  • The concrete RuntimeDispatcher is constructed by composition code and Script/MCP/WASM lanes are registered via RuntimeAdapter; no direct concrete runtime dependencies are reintroduced into dispatcher/capabilities.
  • Required production services fail closed when missing or unconfigured; in-memory/dev fallbacks are explicit test/local profile choices only.
  • Trust evaluation is wired at the host-runtime boundary:
    • package/provider identity + manifest trust input are evaluated by host policy before visible-surface or invocation decisions;
    • user manifests cannot self-assert effective FirstParty/System trust;
    • the resulting TrustDecision is passed into CapabilityHost for action-time authorization;
    • trust downgrade/revocation fails closed for future invocations and does not leave stale privileged authority.
  • Capability surface inputs are composition-ready for [Reborn] Add ToolSurfaceService and CapabilityCatalog #3090: visible surfaces are derived from registry/grants/trust/runtime policy, while visibility remains only an affordance and every invocation still goes through CapabilityHost.
  • Built-in obligations from Decision::Allow { obligations } are routed to the configured obligation handler path from feat(reborn): wire built-in obligations and handoffs #3080:
    • unsupported/unconfigured obligations fail closed;
    • resource reservation, scoped mounts, network policy, one-shot secret injection, output limit/redaction, and audit before/after are either satisfied or rejected before publication.
  • Runtime HTTP egress is wired through the shared Use shared Reborn runtime HTTP egress for WASM, Script, and MCP #3085/feat(reborn): add shared runtime HTTP egress #3098 path where available:
  • Backend-aware health, cancel_work, and runtime_status replace production stubs:
    • health() reports missing/unhealthy required backends and registered runtime lanes without leaking infrastructure details;
    • cancel_work() fans out to process/runtime/capability cancellation ports where supported and returns explicit unknown/no-op outcomes where not supported;
    • runtime_status() reports scoped active run/process/runtime work from the real stores/backends with redacted metadata only.
  • Composition-level tests prove immediate invoke, approval-blocked invoke, spawn/process, and at least one Script/MCP/WASM runtime path flows through host runtime into dispatcher/runtime/process/event services with sanitized results.
  • Tests prove secrets, host paths, raw backend/provider errors, approval internals, lease metadata, and raw runtime output do not leak through public HostRuntime outcomes/status/health/errors.
  • Boundary tests keep ironclaw_host_runtime orchestration-focused and prevent product workflow, loop strategy, adapter UX, or v1 bridge policy from moving into it.

Related work

Sequencing / blockers

Metadata

Metadata

Assignees

Labels

module:M4-host-kernelReborn WebUI beta module M4: host kernel, security, composition, authority boundariesrebornIronClaw Reborn architecture and landing worksuggested_P1Issue creator suggests Priority 1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions