@sema-agent/core
Version:
Stateless, task-oriented AI agent core
21 lines (20 loc) • 1.47 kB
TypeScript
/**
* The records a leg writes at its own close, after the last message of its run, that the fork-point judge
* (`settledForkOptions`) steps over — the one table it reads. A leg that stops with its tool batch still open (a durable
* approval park) writes these after that batch; they belong to that leg, so a fork cut before the open turn leaves them
* behind with it. Every other entry — a bookmark, a session name, a host's note, the settle's cross-boundary record (not
* measured: KNOWN-LIMITS `KL-fpc-b`) — ends the judge's walk.
*
* Exhaustive over the entry union: a new entry type does not compile until it is answered here. An answer names the
* station that writes the record at the leg's close; `false` is no such record. `custom` is answered per `customType`.
*/
import type { SessionTreeEntry } from "../internal/harness-types.js";
/** The `custom` entry of the session's date / prompt-head / memory anchor (its reader and writer: `runner/conversation-segment.ts`). */
export declare const DATE_ANCHOR_CUSTOM_TYPE = "engine:date-anchor";
type LegCloseAnswers = {
readonly [K in SessionTreeEntry["type"]]: K extends "custom" ? Readonly<Record<string, string>> : string | false;
};
export declare const LEG_CLOSE_RECORDS: LegCloseAnswers;
/** Is `entry` a record its leg wrote at its close ({@link LEG_CLOSE_RECORDS})? A type the table does not know: no. */
export declare function isLegCloseRecord(entry: SessionTreeEntry): boolean;
export {};