Skip to content

[Reborn] Add loop support services #3091

@serrrfirat

Description

@serrrfirat

Parent

#2987

What to build

Add the Reborn loop support service layer behind AgentLoopHost: PromptContextService, MemoryPromptContextService, SkillContextService, InstructionBundleBuilder, and HostManagedModelGateway.

These services should assemble model input and model streaming through host policy while preserving Reborn authority boundaries. Loops should not own raw provider clients, raw memory repositories, raw secrets, or direct tool/runtime handles.

Run profile / model-context dependency

Run profile resolution is tracked in #3107. Loop support services should consume resolved model/context/checkpoint policy ids from the immutable per-run snapshot; the model gateway resolves effective provider/model per call within the model_profile_id policy envelope.

Acceptance criteria

  • Instruction bundles can be built from thread snapshots, system/user/agent/project scope, memory context, skill context, visible capability surface, and safety policy.
  • Memory prompt context uses Reborn memory services and respects tenant/user/agent/project isolation and current primary-scope rules.
  • Skill context selection remains deterministic and does not bypass trust/capability visibility decisions.
  • Model streaming routes through a host-managed gateway with provider/model policy, budget/resource accounting hooks, credential handling, redaction, and stable sanitized errors.
  • Tests cover empty context, memory unavailable, skill unavailable, denied provider/model policy, credential missing, redaction sentinel, and deterministic bundle rebuild.
  • The loop support layer does not call RuntimeDispatcher, raw provider clients, raw secret stores, or raw filesystem/network/process handles directly.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    rebornIronClaw Reborn architecture and landing work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions