@sema-agent/core
Version:
Stateless, task-oriented AI agent core
23 lines (22 loc) • 1.62 kB
TypeScript
import type { TaskSpec } from "../types.js";
import type { InstallingPhaseResult, Prepared, ResumeRun, RunnerDepsSeat, RunState } from "./contracts.js";
export interface RunAttachmentSeatsInput<R> {
/** borrowed-readonly — the task spec: the attachments config and the `finalVerification` opt-in. */
spec: TaskSpec;
/** borrowed-mutable — the leg's prepared seat: `announcedListingsRef` is seeded; the session, the listing faces,
* the date-change / instruction-source / size-guideline faces, the tool effects and the reminder mark are read. */
prepared: Prepared;
/** borrowed-readonly — the resume plan when this leg resumes a checkpoint (its `announcedListings` mirror is the first seed rung). */
resume: ResumeRun | undefined;
/** borrowed-mutable — the run's mutable state: this lane is the WRITER of the `counters` and `attach` groups' initial
* values (later writers: the harness handlers, the boundary, the recovery pass). */
rs: RunState;
/** borrowed-readonly — the Runner's deployment deps, read once for `probeInstructionSources`. */
runner: RunnerDepsSeat;
/** borrowed-readonly — the lanes after this one, entered in this lane's last continuation (the seats it wrote are on `rs`). */
next: (seats: RunAttachmentSeatsResult) => Promise<R>;
}
/** Nothing comes back: the lane's products are the `counters` / `attach` groups it wrote on the borrowed run state. */
export interface RunAttachmentSeatsResult extends InstallingPhaseResult {
}
export declare function runAttachmentSeats<R>(input: RunAttachmentSeatsInput<R>): Promise<R>;