/**
 * Nexus Prime kernel — public surface.
 *
 * The kernel is a small, deliberately boring wrapper layer that owns the
 * contracts CLI / MCP / orchestrator talk to. PR 3 adds three concerns:
 *   - context capabilities (hypertuneMax, differential, sessions, budget)
 *   - runtime backend contract (RuntimeBackend / PhantomRuntimeBackend)
 *   - kernel.run.execute() delegating to the configured RuntimeBackend
 *
 * Usage:
 *   import { kernel } from '../kernel/index.js';
 *   const pack  = await kernel.run.compileContext({ ... });
 *   const step  = await kernel.run.step({ runId, stepId, task, mutations });
 *   const exec  = await kernel.run.execute({ runId, stepId, task });
 *   const ht    = kernel.run.hypertuneMax(task, files);
 *   const delta = kernel.run.differential(prev, curr);
 */
import { getKernelContextService, KernelContextService, } from './context/index.js';
import { getKernelExecutionService, } from './execution/index.js';
export * from './context/index.js';
export * from './execution/index.js';
export * from './runtime/index.js';
/**
 * Kernel run-surface. Thin object; explicitly not a framework.
 * Only add methods here when the underlying kernel subsystem exists.
 */
export const kernel = {
    run: {
        // ── Context compilation ────────────────────────────────────────────
        compileContext(input) {
            return getKernelContextService().compileContext(input);
        },
        init() {
            return getKernelContextService().init();
        },
        hypertuneMax(task, files, graphConnectivity) {
            return getKernelContextService().hypertuneMax(task, files, graphConnectivity);
        },
        differential(prev, curr) {
            return getKernelContextService().differential(prev, curr);
        },
        async loadLatestSessionSummary() {
            return getKernelContextService().loadLatestSessionSummary();
        },
        allocateBudget(workers, totalBudget) {
            return getKernelContextService().allocateBudget(workers, totalBudget);
        },
        // ── Execution (step / verify / merge + backend execute) ────────────
        step(input) {
            return getKernelExecutionService().step(input);
        },
        verify(input) {
            return getKernelExecutionService().verify(input);
        },
        merge(input) {
            return getKernelExecutionService().merge(input);
        },
        execute(input) {
            return getKernelExecutionService().execute(input);
        },
    },
};
export { KernelContextService };
