eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
54 lines (53 loc) • 2.35 kB
TypeScript
import type { Runtime, SessionCapabilities } from "#channel/types.js";
import type { HandleEventFn, HarnessToolMap, StepFn } from "#harness/types.js";
import type { RunMode } from "#shared/run-mode.js";
import { type RuntimeModelResolutionScope } from "#runtime/agent/resolve-model.js";
import type { RuntimeCompiledArtifactsSource } from "#runtime/compiled-artifacts-source.js";
import type { ResolvedRuntimeAgentNode } from "#runtime/graph.js";
/**
* Factory that creates a {@link Runtime} for the given compiled
* artifacts source and optional node id. Matches the signature of
* `createWorkflowRuntime`, so callers pass the constructor directly —
* no wrapper needed.
*/
export type CreateRuntime = (config: {
readonly compiledArtifactsSource: RuntimeCompiledArtifactsSource;
readonly nodeId?: string;
}) => Runtime;
/**
* Input for building a harness step for one resolved runtime node.
*/
export interface CreateExecutionNodeStepInput {
/**
* Session-level capabilities propagated from the runtime. The
* harness passes this through to `buildToolSet` so `ask_question`
* registration and any other capability-gated behavior tracks the
* current run.
*/
readonly capabilities?: SessionCapabilities;
/**
* Runtime constructor used by the subagent tool executor to start
* delegated child runs on the same workflow runtime as the parent.
*/
readonly createRuntime: CreateRuntime;
readonly handleEvent?: HandleEventFn;
readonly mode: RunMode;
readonly modelResolutionScope: RuntimeModelResolutionScope;
readonly node: ResolvedRuntimeAgentNode;
}
/**
* Builds a harness step for one resolved runtime node using the execution-owned
* tool, sandbox, and subagent wiring.
*/
export declare function createExecutionNodeStep(input: CreateExecutionNodeStepInput): StepFn;
/**
* Resolves unified {@link HarnessToolDefinition}s from the node's registries.
*
* For authored tools: copies all lifecycle fields from the resolved definition.
* For subagent tools: surfaces runtime-owned subagent-call metadata and leaves
* execution to the runtime layer.
* Tools without `execute` (provider-managed) get entries with schema but no execute.
*/
export declare function createNodeHarnessTools(input: {
readonly node: ResolvedRuntimeAgentNode;
}): HarnessToolMap;