eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
29 lines (28 loc) • 1.11 kB
TypeScript
import type { FlexibleSchema } from "ai";
import type { NeedsApprovalContext } from "#public/definitions/tool.js";
/**
* Runtime-owned action metadata attached to one harness-visible tool.
*
* These tools are surfaced to the model without a local `execute` function.
* The harness records the tool call and the runtime executes it later.
*/
export type HarnessRuntimeActionDefinition = {
readonly kind: "remote-agent-call" | "subagent-call";
readonly nodeId: string;
readonly remoteAgentName?: string;
readonly subagentName: string;
};
/**
* Unified harness-owned tool definition.
*/
export interface HarnessToolDefinition {
readonly approvalKey?: (toolInput: Readonly<Record<string, unknown>>) => string;
readonly description: string;
readonly execute?: (input: any) => any;
readonly inputSchema: FlexibleSchema;
readonly name: string;
readonly needsApproval?: (ctx: NeedsApprovalContext) => boolean;
readonly outputSchema?: FlexibleSchema;
readonly runtimeAction?: HarnessRuntimeActionDefinition;
readonly toModelOutput?: (output: unknown) => unknown;
}