UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

28 lines (27 loc) • 2.07 kB
import type { EstablishedPlan } from "./shell-read-establish.js"; import type { ObservedEnvironment } from "./shell-read-environment.js"; import type { EstablishedRead } from "./shell-read-judge.js"; import { type HomeViewsCarrier } from "./read-deny-home.js"; /** Every read of either establishment whose candidate's settled target set — or the set of link-chain hops it was judged * through ({@link EstablishedRead.hops}: a chain re-pointed through another directory may keep its terminal) — differs * between the two. */ export declare function movedReads(previous: EstablishedPlan, again: EstablishedPlan): EstablishedRead[]; /** One read candidate's landing: its key and where it settled, each as a sha256 hex digest (the key's raw tuple joins on * NUL and follows the command's length; a pattern lands on up to thousands of entries), with the raw word and the * settled targets kept for the sentence that names a moved one. */ export interface ReadLanding { readonly key: string; readonly landing: string; readonly raw: string; readonly targets: readonly string[]; } /** Every read candidate of the establishment (nested plans included) with where it landed, in plan order. A candidate * that settled nowhere (a lexical or unestablishable read) lands on the empty set — placed later, that is a move. */ export declare function readLandingsOf(e: EstablishedPlan): ReadLanding[]; /** * The establishment with every read that landed carrying its HOME VIEW (read-deny-home.ts) among its spellings, nested * plans included: the deny judge then places a home-anchored row wherever the target IS below the home, whatever it is * spelled through. The views are `placed`'s — the home views of the placement the boundary's deny seats were compiled * at. A read that did not land (lexical, unestablishable) is left as it is. */ export declare function withHomeViews(door: Pick<ObservedEnvironment, "fs" | "adopt">, placed: HomeViewsCarrier | undefined, established: EstablishedPlan, signal?: AbortSignal): Promise<EstablishedPlan>;