@sema-agent/core
Version:
Stateless, task-oriented AI agent core
21 lines (20 loc) • 2.19 kB
TypeScript
import type { RunnerDeps } from "../types.js";
/** The retired-seat door ({@link assertNoRetiredRunnerDeps}) looks at the caller's own object, where a retired name may sit on
* the prototype or as a non-enumerable property. Then the deps must be a PLAIN object (prototype `Object.prototype` or none):
* every seat is read once as an OWN property — enumerable or not, a getter invoked once — into a copy of enumerable data
* properties, the object the engine keeps and spreads from; the caller's getters are never read again, and a seat a prototype
* would supply is never read, so an object with another prototype is refused rather than wired without that seat. The seats
* whose VALUE is screened at construction and never again are judged on the copy: the declared configuration root must be the
* absolute path of an existing directory — a root that names no directory guards nothing, so it is refused rather than read as
* absent; the request media budget must be one the trim can keep media under — a bad value is refused rather than read as a
* default or as "no budget" by the request trim and the `tool_end.output` projection. */
export declare function retainRunnerDeps(deps: RunnerDeps): RunnerDeps;
/**
* THE intake of a consolidation seat's endpoint key (`RunnerDeps.memoryConsolidationDriver.chat.apiKey`), where the engine receives
* the seat: `new Runner` (above) and the seat's hot-swap door (`swapDeps`, step two — before the seat is screened or written). The key
* is the string the endpoint triple carries (a chat function and an absent seat carry none). The seat is caller data below the
* receipt's one level: the key is read once, and a read that throws is refused in the receipt's words — the thrown value is not
* looked at (it may carry the key). Taken in, it is withheld from every child for the life of the process; a key that is the value
* of a variable every child is handed refuses (`config.invalid_argument`), and a key that is no credential is said to `onNotice`.
*/
export declare function holdConsolidationSeatKey(seat: RunnerDeps["memoryConsolidationDriver"], onNotice: RunnerDeps["onNotice"], moment: string): void;