eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
56 lines (55 loc) • 2.2 kB
TypeScript
import type { ChannelInstrumentationProjection, RunInput, SessionAuthContext, SessionCapabilities } from "#channel/types.js";
import type { HarnessSession } from "#harness/types.js";
import type { RuntimeSubagentCallActionRequest } from "#runtime/actions/types.js";
/**
* Pending runtime-action batch event metadata needed for child run lineage.
*/
interface BatchEventMetadata {
readonly sequence: number;
readonly turnId: string;
}
export type SubagentInputSource = {
readonly description: string;
readonly type: "local";
} | {
readonly type: "runtime";
};
/**
* Result of {@link buildSubagentRunInput}.
*
* Exposes the derived `childContinuationToken` alongside the
* {@link RunInput} so dispatch sites never re-derive the token from
* `(callId, parentSessionId)` on their own.
*/
export interface SubagentRunInputBuild {
readonly childContinuationToken: string;
readonly runInput: RunInput;
}
/**
* Builds the {@link RunInput} for one delegated subagent child run.
*/
export declare function buildSubagentRunInput(input: {
readonly action: RuntimeSubagentCallActionRequest;
readonly auth: SessionAuthContext | null;
readonly batchEvent: BatchEventMetadata;
/**
* Parent's session capabilities. Forwarded verbatim so HITL
* readiness flows transparently down through a subagent chain. Undefined
* parent capabilities produce an undefined child capability set.
*/
readonly capabilities?: SessionCapabilities;
readonly channelMetadata?: ChannelInstrumentationProjection;
/**
* Number of local subagent calls dispatched in this batch. The parent's
* remaining token quota is split evenly across them so parallel children
* are collectively, not individually, bounded by it. Remote agents run
* under their own deployment's limits and are not counted.
*/
readonly fanoutSize?: number;
readonly initiatorAuth: SessionAuthContext | null;
/** Hook token owned by the workflow currently waiting for this child. */
readonly parentContinuationToken?: string;
readonly session: HarnessSession;
readonly source: SubagentInputSource;
}): SubagentRunInputBuild;
export {};