import { Observer } from "./observer.contract.mjs"; //#region ../ai/src/observe/resolve-observers.d.ts /** * The value a flow's `observe` config option may take. Additive and * gated — when `undefined` (the default), behavior follows the global * observe-all flag, so a flow that never sets `observe` behaves exactly * as before unless an observability tool turned observe-all on. * * - `true` → route this flow to the globally registered observers, * even when observe-all is off. * - `false` → opt this flow out entirely, even when observe-all is on. * - an {@link Observer} object → a flow-local collector; only this flow's * report is routed, and only to it (the global observers are skipped). * A panoptic flow-local collector implements `Observer`, so it can be * passed here directly — core stays panoptic-agnostic. * - `undefined` → follow the global observe-all flag. */ type FlowObserveOption = boolean | Observer; /** * Resolve a flow's `observe` option into the concrete list of * {@link Observer}s to notify with that flow's completed report: * * - `false` → `[]` (opted out). * - `true` → the globally registered observers. * - an `Observer` object → just that one (flow-local). * - `undefined` → the globally registered observers when observe-all is * on AND this is a ROOT run, otherwise `[]`. * * Reads the ambient {@link currentRunFrame} for the observe-all path: * flows call it at completion, so a present frame means the run is nested * inside an orchestration callback and is already attached to its parent's * report tree — self-routing it again would double-count it as a separate * top-level trace (and double its tokens/cost in the aggregate). Explicit * `observe: true` / an `Observer` still route regardless of nesting. */ declare function resolveObservers(observe: FlowObserveOption | undefined): readonly Observer[]; //#endregion export { FlowObserveOption, resolveObservers }; //# sourceMappingURL=resolve-observers.d.mts.map