UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

12 lines (11 loc) • 956 B
/** * A Brain's non-streaming face, read the one way every layer that dispatches a request to a Brain reads it — the routing, failover * and circuit-breaker decorators and the engine's model lane: the Brain's own `complete` when it has one, called on that Brain and * its message returned exactly as it answered (the Brain contract, `core/model-seat.ts`: the summary path's recovery reads * `errorKind` off it), else the Brain's `stream` read to its final message — the derivation `brainToRuntime` applies to a Brain * with no `complete`. A decorator therefore always has a `complete` face: what a request reaches through it is the face the Brain * that serves the request has, decided per request (a router cannot know before it is asked which line serves a model). */ import type { CompleteSimpleFn } from "../internal/llm.js"; import type { Brain } from "../core/types.js"; export declare function completeOf(brain: Brain): CompleteSimpleFn;