@sema-agent/core
Version:
Stateless, task-oriented AI agent core
10 lines (9 loc) • 708 B
TypeScript
import { type PendingSessionNotifications } from "../task-notification.js";
import type { RunnerDeps, TaskSpec } from "../types.js";
import type { Prepared, RunInternals } from "./contracts.js";
/** `undefined` when there is nothing to wait for (no debt, no peer task rows to look at): the leg goes on on the same tick. */
export declare function settleBeforeTurnOpen(pending: PendingSessionNotifications, prepared: Pick<Prepared, "sessionId" | "sessionIncarnation" | "sessionIncarnationUnread" | "abortController">, leg: {
readonly deps: Pick<RunnerDeps, "peerTaskStore" | "a2a" | "onError">;
readonly spec: TaskSpec;
readonly internals: RunInternals | undefined;
}): Promise<void> | undefined;