@sema-agent/core
Version:
Stateless, task-oriented AI agent core
24 lines (23 loc) • 1.45 kB
TypeScript
/**
* The engine's side of the mods bus's two outward faces: which registrations the two seats hold, the
* notice an admission refusal becomes, and the sink that carries handler failures to `onError`.
*/
import type { EngineNotice } from "../engine-notice.js";
import type { RunnerDeps } from "../runner-deps.js";
import type { TaskSpec } from "../task-spec.js";
import { type ModAdmissionRecord, type ModBusInput, type ModSeats } from "./kernel/index.js";
import type { EngineDollar } from "./dollar.js";
/**
* The two seats, both kept: the deployment's (`RunnerDeps.mods`) and the task's (`TaskSpec.mods`). Neither overrides the other.
* (A retired `hooks` key on either is not read here: it is refused by name at the retired-key doors, where every other
* retired seat is — `retired-keys.ts`.)
*/
export declare function modSeatsOf(spec: Pick<TaskSpec, "mods">, deps: Pick<RunnerDeps, "mods">): ModSeats<EngineDollar>;
/** Handler failures land on the deployment's `onError` with `phase: "hook"`; a throwing sink is swallowed. */
export declare function modsReportToOnError(onError: RunnerDeps["onError"], sessionId: string): ModBusInput["report"];
type RefusedRecord = Extract<ModAdmissionRecord, {
readonly refusedBy: string;
}>;
/** The notice for a registration admission refused: the run goes on without it. */
export declare function registrationRefusedNotice(record: RefusedRecord, sessionId: string): EngineNotice;
export {};