import { createAgentSessionServices, createAgentSessionFromServices, createAgentSessionRuntime, SessionManager, VERSION } from '@earendil-works/pi-coding-agent'; export { createAgentSessionServices, createAgentSessionFromServices, createAgentSessionRuntime, SessionManager, VERSION, }; /** * The minimal slice of the pi SDK the broker needs. Both the real package and the * T11 `fake-engine` fixture satisfy this shape, so the broker can be driven by * either via the `CRTR_BROKER_ENGINE` seam below. * * C3 (viewer-reuse scout `mq5thyli`): the broker drives the SERVICES path * (`createAgentSessionServices` → `createAgentSessionFromServices`), NOT plain * `createAgentSession`. Only the services path runs `registerProvider` (extension * model-providers) + `applyExtensionFlagValues`, so a node whose model comes from * a custom-provider extension actually gets a model. Mirrors pi `main.js`. */ export interface BrokerEngine { createAgentSessionServices: typeof createAgentSessionServices; createAgentSessionFromServices: typeof createAgentSessionFromServices; /** * The session-replacement runtime factory (T3 new_session/switch_session/fork). * OPTIONAL: the real SDK (0.78.1) exposes it, so production gets full session * replacement; the `fake-engine` test fixture does NOT provide it, so the * broker degrades those three ops to an `error{engine_error}` reply rather than * failing engine validation. Everything else works on both. */ createAgentSessionRuntime?: typeof createAgentSessionRuntime; SessionManager: typeof SessionManager; VERSION: string; } /** * Resolve the broker's engine module. Defaults to the real SDK; honors the * `CRTR_BROKER_ENGINE` env var (T11 test seam) so a lifecycle test can point the * broker at `fixtures/fake-engine.ts` without touching production code. This is the * sole dynamic-import indirection point — keep all engine resolution flowing * through here so the seam stays a single, auditable swap. */ export declare function loadBrokerEngine(): Promise; export declare function assertEngineVersion(engineVersion?: string): void;