/** * CEE Engine / Orchestrator Example (TypeScript) * * This example shows how a backend engine or orchestrator (such as PLoT or a * decision-intelligence service) might: * * - Call multiple CEE endpoints via the TypeScript SDK. * - Collapse their metadata into a single CeeDecisionReviewPayload. * - Derive coarse-grained engine actions (warn, auto re-run, tag health band) * based solely on CEE metadata. * * In the SSOT, this code runs on the PLoT/engine side only. Scenario UIs * consume metadata-only review bundles from PLoT and never call CEE directly * or hold CEE credentials. * * Notes: * - This file is not executed automatically in CI; it is example code only. * - When consuming the published SDK, replace "../index.js" with * "@olumi/assistants-sdk". */ import { type CeeDecisionReviewPayload } from "../index.js"; /** * Minimal configuration for an engine service calling CEE. */ export interface EngineCeeConfig { apiKey: string; baseUrl?: string; timeoutMs?: number; } /** * Minimal scenario metadata available to an engine; the CEE layer never needs * to see raw prompts or graphs from the engine. */ export interface EngineScenario { id: string; label: string; createdAt: string; } export type EngineHealthBand = "ok" | "warning" | "risk"; /** * Coarse-grained actions an engine might take based on CEE. */ export interface EngineCeeActions { healthBand: EngineHealthBand; shouldWarn: boolean; shouldAutoReRun: boolean; traceId?: string; } /** * Example engine-facing wrapper around a CEE decision review payload. */ export interface EngineCeeDecisionReview { scenarioId: string; createdAt: string; cee: CeeDecisionReviewPayload; actions: EngineCeeActions; } /** * Pure helper: derive engine actions from a metadata-only * CeeDecisionReviewPayload. */ export declare function computeEngineCeeActions(review: CeeDecisionReviewPayload): EngineCeeActions; /** * Example async orchestration function. In a real engine, this might be wired * into a batch evaluation pipeline or a scenario runner. * * This example deliberately avoids logging prompts or graph contents; it uses * only metadata and the SDK helpers. */ export declare function runEngineCeeReviewForScenario(scenario: EngineScenario, config: EngineCeeConfig): Promise;