eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
52 lines (51 loc) • 2.82 kB
TypeScript
import type { ActivityObserverConfig } from "#channel/types.js";
import type { LocalDevRequestProvenance } from "#context/keys.js";
import type { ActivityWorkIdentityV1 } from "#protocol/activity.js";
import type { DynamicSubagentAgentConfig } from "#runtime/subagents/dynamic-agent-config.js";
import type { DynamicRemoteAgentConfig } from "#runtime/subagents/dynamic-remote-agent-config.js";
import type { CompiledBundle } from "#runtime/sessions/runtime-context-keys.js";
import type { RuntimeRemoteAgentDispatchRequest, RuntimeSubagentDispatchRequest } from "#shared/action-types.js";
import type { DispatchOutcome, RuntimeSession } from "#subagents/handle-dispatch.js";
import { buildSubagentRunInput, type SubagentInputSource } from "#subagents/tool.js";
import type { AgentChildTraceDispatch } from "#tracing/agent-invocation-coordinator.js";
export type SubagentStartTarget = {
readonly kind: "local";
readonly action: RuntimeSubagentDispatchRequest;
readonly dynamicSubagentAgentConfig?: DynamicSubagentAgentConfig;
readonly source: SubagentInputSource;
} | {
readonly kind: "remote";
readonly action: RuntimeRemoteAgentDispatchRequest;
readonly dynamicRemoteAgent?: DynamicRemoteAgentConfig;
};
/** Starts one planned fresh child against its local or remote target. */
export declare function startSubagent(input: {
readonly auth: Parameters<typeof buildSubagentRunInput>[0]["auth"];
readonly batchEvent: {
readonly sequence: number;
readonly turnId: string;
};
readonly bundle: CompiledBundle;
readonly callbackBaseUrl: string | undefined;
readonly capabilities: Parameters<typeof buildSubagentRunInput>[0]["capabilities"];
readonly channelMetadata: Parameters<typeof buildSubagentRunInput>[0]["channelMetadata"];
readonly inheritedConversation?: Parameters<typeof buildSubagentRunInput>[0]["inheritedConversation"];
readonly currentSession: RuntimeSession;
readonly fanoutSize: number;
readonly initiatorAuth: Parameters<typeof buildSubagentRunInput>[0]["initiatorAuth"];
/** Inherited originating-client metadata for the dev-TUI hint. */
readonly localDevRequest?: LocalDevRequestProvenance;
readonly parentContinuationToken: string | undefined;
readonly activityObserver?: ActivityObserverConfig & {
readonly workIdentity: ActivityWorkIdentityV1;
};
/** The backing agent reports as this task, rather than as a separate child work item. */
readonly taskActivityObserver?: ActivityObserverConfig & {
readonly workIdentity: ActivityWorkIdentityV1;
};
readonly sandboxSessionId: string;
readonly session: RuntimeSession;
readonly taskId?: string;
readonly target: SubagentStartTarget;
readonly trace: AgentChildTraceDispatch;
}): Promise<DispatchOutcome>;