eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
27 lines (26 loc) • 1.58 kB
TypeScript
import type { HarnessSession, SessionStateMap } from "#harness/types.js";
import type { RuntimeToolResultActionResult } from "#shared/action-types.js";
/** A workflow tool run the active turn waits on. Background runs live in the task index. */
export interface WorkflowToolRunRecord {
readonly callId: string;
readonly hookToken: string;
readonly runId: string;
readonly toolName: string;
readonly resultKind?: "subagent" | "tool";
}
export declare function getWorkflowToolRuns(state: SessionStateMap | undefined): readonly WorkflowToolRunRecord[];
export declare function findWorkflowToolRun(state: SessionStateMap | undefined, callId: string): WorkflowToolRunRecord | undefined;
export declare function recordWorkflowToolRun<T extends {
readonly state?: SessionStateMap;
}>(session: T, record: WorkflowToolRunRecord): T;
export declare function removeWorkflowToolRun<T extends {
readonly state?: SessionStateMap;
}>(session: T, callId: string): T;
export declare function clearWorkflowToolRuns(session: HarnessSession): HarnessSession;
/** The turn inbox is shared; a result settles a call only if the turn recorded that run. */
export declare function isInboxToolResultFromRecordedWorkflowToolRun(state: SessionStateMap | undefined, result: RuntimeToolResultActionResult): boolean;
/** A child result reported through a shared subagent execute run. */
export declare function isInboxSubagentResultFromRecordedWorkflowToolRun(state: SessionStateMap | undefined, result: {
readonly callId: string;
readonly subagentName: string;
}): boolean;