@sema-agent/core
Version:
Stateless, task-oriented AI agent core
19 lines (18 loc) • 1.21 kB
TypeScript
import type { EngineNotice } from "../engine-notice.js";
import { type ToolTurnIncompleteCause, type ToolTurnRepair } from "../../internal/llm.js";
/** The notice's attribution ids — the same pair, for the same reason, as the fold seat's. */
export interface ToolTurnRepairSeatIds {
sessionId: string;
runId: string;
}
/** The person's line for one cause — once per run per cause, whichever observer saw it first. */
export interface ToolTurnIncompleteSeat {
/** Announce `count` items of `cause` (and, for a missing result, the calls) unless this run already said it. */
announce(cause: ToolTurnIncompleteCause, count: number, toolCallIds?: readonly string[]): void;
/** Observe one assistant message: announces each stream drop it reports (`streamDropsOf`). */
observe(message: {
readonly diagnostics?: unknown;
}): void;
}
export declare function createToolTurnIncompleteSeat(onNotice: ((notice: EngineNotice) => void) | undefined, ids: ToolTurnRepairSeatIds): ToolTurnIncompleteSeat;
export declare function createToolTurnRepairSeat(onNotice: ((notice: EngineNotice) => void) | undefined, ids: ToolTurnRepairSeatIds): (repairs: readonly ToolTurnRepair[]) => void;