Interface EmergentCapabilityEngineDeps

Dependencies injected into the EmergentCapabilityEngine constructor.

All collaborators are provided externally so the engine is trivially testable with mocks — no real LLM calls, no real sandbox execution.

interface EmergentCapabilityEngineDeps {
    config: EmergentConfig;
    composableBuilder: ComposableToolBuilder;
    sandboxForge?: SandboxedToolForge;
    judge: EmergentJudge;
    registry: EmergentToolRegistry;
    stepGate?: StepGate;
    onToolForged?: ((tool, executable) => Promise<void>);
    onToolPromoted?: ((tool) => Promise<void>);
    onToolRemoved?: ((tool) => Promise<void>);
    onToolRestored?: ((tool) => Promise<void>);
}

Properties

Resolved emergent capability configuration.

composableBuilder: ComposableToolBuilder

Builder for composable (tool-chaining) implementations.

sandboxForge?: SandboxedToolForge

The forge for code-forged tools. Optional: without it the engine builds one from config.sandboxMemoryMB, config.sandboxTimeoutMs and config.executor; with it, config.executor must be absent or this forge's own executor (executor_conflict otherwise). Under a ceiling (config.capabilities) a forge given here must be no wider than the ceiling (construction fails with forge_wider_than_ceiling naming the option), narrows it where it is narrower, and serves this engine only.

LLM-as-judge evaluator for creation and promotion reviews.

Tiered registry for storing and querying emergent tools.

stepGate?: StepGate

The gate composed tools run their steps through. ToolOrchestrator passes its own; a host that builds the engine directly passes one from createStepGate, or gives the builder one. Without a gate the engine forges code but refuses to compose (compose_needs_gate).

onToolForged?: ((tool, executable) => Promise<void>)

Optional callback used to activate a newly forged tool immediately.

Type declaration

    • (tool, executable): Promise<void>
    • Parameters

      Returns Promise<void>

onToolPromoted?: ((tool) => Promise<void>)

Optional callback used when a tool is promoted to a persisted tier.

Type declaration

    • (tool): Promise<void>
    • Parameters

      Returns Promise<void>

onToolRemoved?: ((tool) => Promise<void>)

Optional callback used when a tool is removed from the live runtime.

Type declaration

    • (tool): Promise<void>
    • Parameters

      Returns Promise<void>

onToolRestored?: ((tool) => Promise<void>)

Optional callback used to register again a tool of the host's whose name a forged composition's executable took, when the forge takes that executable out again (the composition reached itself once registered). Without it the name is left empty in that case.

Type declaration

    • (tool): Promise<void>
    • Parameters

      Returns Promise<void>