UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

811 lines (810 loc) 38 kB
import { z } from "#compiled/zod/index.js"; import { type DiscoverDiagnosticsSummary } from "#discover/diagnostics.js"; import { type CompiledDynamicSubagentDefinition, type CompiledRemoteAgentNode } from "#compiler/remote-agent-node.js"; import type { ChannelRouteMethod } from "#public/definitions/channel.js"; import type { NormalizedChannelCorsOptions } from "#channel/cors.js"; import type { InternalInstructionsDefinition } from "#shared/instructions-definition.js"; import type { Node } from "#shared/node.js"; import type { MarkdownSourceRef, ModuleSourceRef, SkillPackageSourceRef } from "#shared/source-ref.js"; import type { NamedSkillDefinition } from "#shared/skill-definition.js"; import { type InternalAgentDefinition, type InternalAgentModelDefinition, type InternalAgentCompactionDefinition, type ModelRouting } from "#shared/agent-definition.js"; import type { InternalToolDefinition } from "#tools/definition.js"; import type { CompiledToolBehavior } from "#tools/behavior.js"; import type { AgentSourceComposition, AgentSourceDescriptor, AgentSourceOwner, CompiledModuleBinding } from "#compiler/source-graph.js"; /** * Stable manifest kind emitted by the compiler for runtime loading. */ export declare const COMPILED_AGENT_MANIFEST_KIND = "eve-agent-compiled-manifest"; /** * Stable node id used by compiled artifacts for the root authored agent. */ export declare const ROOT_COMPILED_AGENT_NODE_ID = "__root__"; /** * Current compiled manifest schema version. */ export declare const COMPILED_AGENT_MANIFEST_VERSION = 51; /** * Compiled channel entry preserved in the compiled manifest. */ export type CompiledChannelEntry = CompiledChannelDefinition; /** * Active compiled channel entry — backed by an authored `Channel` module. */ export interface CompiledChannelDefinition { readonly kind: "channel"; readonly name: string; readonly logicalPath: string; readonly method: ChannelRouteMethod; readonly urlPath: string; readonly sourceId: string; readonly sourceKind: "module"; readonly exportName?: string; /** * Stable identifier of the `ChannelAdapter.kind` returned by the authored * route, captured at compile time. Examples: `"slack"`, `"http"`. Authors * may override the default kind on their adapter, so this field is the * adapter's reported value verbatim. Consumers (eg. dashboard surfaces) * normalize it for display via {@link normalizeChannelKindForDisplay}. * * Omitted when the route does not register an adapter. */ readonly adapterKind?: string; /** * Serializable CORS options to apply to this channel route. Omitted when the * channel leaves CORS untouched. */ readonly cors?: NormalizedChannelCorsOptions; } /** * Disabled compiled channel entry — marker that an authored file at this * slug exported `disableRoute()` to remove the matching framework default. */ export interface CompiledChannelPreflightDefinition { readonly cors: NormalizedChannelCorsOptions; readonly method: "OPTIONS"; readonly sourceIds: readonly string[]; readonly urlPath: string; } export interface CompiledShadowedChannelRoute { readonly method: ChannelRouteMethod; readonly source: AgentSourceDescriptor; readonly urlPath: string; readonly winnerSourceId: string; } export interface CompiledChannelRoutePlan { readonly effective: readonly CompiledChannelDefinition[]; readonly preflight: readonly CompiledChannelPreflightDefinition[]; readonly shadowed: readonly CompiledShadowedChannelRoute[]; } /** * Serializable runtime model reference preserved in the compiled manifest. * * Carries {@link ModelRouting} — decided at compile time from the authored model * value — so consumers (the dev server's `/eve/v1/info`, the TUI) can tell how * the model is reached without re-resolving it. Runtime model resolution uses * the routing-free {@link InternalAgentModelDefinition}; routing is a * compiled-output concern only. */ export type CompiledRuntimeModelReference = InternalAgentModelDefinition & { routing: ModelRouting; }; /** * Dynamic model resolver source preserved in the compiled manifest. */ export type CompiledDynamicModelDefinition = ModuleSourceRef & { readonly eventNames: readonly string[]; }; /** * Normalized authored compaction configuration preserved in the compiled * manifest. */ type CompiledAgentCompactionDefinition = Omit<InternalAgentCompactionDefinition, "model"> & { model?: CompiledRuntimeModelReference; }; /** * Normalized additive agent configuration preserved in the compiled manifest. */ type CompiledAgentDefinitionBase = Omit<InternalAgentDefinition, "model" | "compaction"> & { compaction?: CompiledAgentCompactionDefinition; source: ModuleSourceRef; }; export type CompiledAgentDefinition = CompiledAgentDefinitionBase & ({ readonly model: CompiledRuntimeModelReference; readonly dynamicModel?: never; } | { readonly model?: never; readonly dynamicModel: CompiledDynamicModelDefinition; }); /** * Normalized authored instructions prompt preserved in the compiled * manifest. */ export type CompiledInstructionsDefinition = InternalInstructionsDefinition & ((Omit<MarkdownSourceRef<undefined>, "definition"> & { readonly owner: AgentSourceOwner; }) | Omit<ModuleSourceRef, "exportName">); /** * Normalized authored skill preserved in the compiled manifest. */ export type CompiledSkillDefinition = NamedSkillDefinition & ((Omit<MarkdownSourceRef<undefined>, "definition"> & { readonly owner: AgentSourceOwner; }) | ModuleSourceRef | (SkillPackageSourceRef & { readonly owner: AgentSourceOwner; })); /** * Normalized authored schedule preserved in the compiled manifest. */ export type CompiledScheduleDefinition = z.infer<typeof compiledScheduleDefinitionSchema>; /** * Normalized authored sandbox metadata preserved in the compiled manifest. */ export type CompiledSandboxDefinition = z.infer<typeof compiledSandboxDefinitionSchema>; /** * Compiled sandbox workspace folder preserved in the compiled manifest. * * Corresponds to the `agent/sandbox/workspace/` directory discovered on * disk. Mounted into the live sandbox cwd at session bootstrap. */ type CompiledSandboxWorkspace = z.infer<typeof compiledSandboxWorkspaceSchema>; /** * Byte-free descriptor for the compiled workspace resource tree owned by one * graph node. */ export type CompiledWorkspaceResourceRoot = z.infer<typeof compiledWorkspaceResourceRootSchema>; /** * Normalized authored connection metadata preserved in the compiled manifest. */ export type CompiledConnectionDefinition = z.infer<typeof compiledConnectionDefinitionSchema>; /** Dynamic connection resolver source preserved for runtime evaluation. */ export interface CompiledDynamicConnectionDefinition extends ModuleSourceRef { readonly eventNames: readonly string[]; /** Map results from extensions receive this mount namespace. */ readonly extensionNamespace?: string; readonly slug: string; } /** * Normalized authored tool metadata preserved in the compiled manifest. */ export type CompiledToolDefinition = InternalToolDefinition & ModuleSourceRef & { readonly behavior?: CompiledToolBehavior; readonly hasExecute: boolean; readonly hasModelOutputProjection: boolean; readonly requiresApproval: boolean; readonly workflowProgram?: { readonly maxSubagents: number; }; }; /** * Compiled dynamic tool resolver entry. The resolver function lives in the * compiled module map; the manifest entry carries only the metadata needed * to load and invoke it at runtime. */ export interface CompiledDynamicToolDefinition extends ModuleSourceRef { readonly slug: string; readonly eventNames: readonly string[]; readonly rebindMissingCallbacks?: boolean; /** * Mount namespace when this resolver comes from an extension. The runtime * prefixes the names of tools the resolver produces (`forecast` → * `crm__forecast`) so extension-produced tools are namespaced like every * other extension contribution. Absent for consumer-authored resolvers. */ readonly extensionNamespace?: string; } export interface CompiledMemoryDefinition extends ModuleSourceRef { readonly description?: string; readonly slot: string; readonly visibility: "scope" | "session"; } /** * Compiled dynamic skill resolver entry. Mirrors * {@link CompiledDynamicToolDefinition} — the resolver produces skill * packages at runtime rather than tool definitions. */ export interface CompiledDynamicSkillDefinition extends ModuleSourceRef { readonly slug: string; readonly eventNames: readonly string[]; /** * Mount namespace when this resolver comes from an extension. Names of skills * a map resolver produces are prefixed with `${extensionNamespace}__`. */ readonly extensionNamespace?: string; } /** * Compiled dynamic instructions resolver entry. The resolver produces * role-aware instructions at runtime. */ export interface CompiledDynamicInstructionsDefinition extends ModuleSourceRef { readonly slug: string; readonly eventNames: readonly string[]; } /** * Normalized authored hook entry preserved in the compiled manifest. * * Hook event handlers are arbitrary functions — there is no static * shape the compiler can validate beyond the source ref. Per-handler * resolution happens at runtime via {@link resolveHookDefinition}. */ export interface CompiledHookDefinition extends ModuleSourceRef { readonly eventNames: readonly string[]; /** * Path-relative slug used for diagnostics and ordering. Derived from * the authored file's logical path * (eg. `agent/hooks/auth/guard.ts` → `"auth/guard"`). */ readonly slug: string; } /** * Non-recursive compiled authored agent payload shared by the root agent and * every flattened subagent node. */ export type CompiledAgentNodeManifest = z.infer<typeof compiledAgentNodeManifestSchema>; export type CompiledAgentResources = z.infer<typeof compiledAgentResourcesSchema>; export type CompiledSubagentNode = Readonly<ModuleSourceRef & Node & { backing: { readonly kind: "resource"; readonly sourcePath: string; }; entryPath: string; name: string; owner: AgentSourceOwner; parentNodeId: string; rootPath: string; } & ({ agent: CompiledAgentNodeManifest; configResolver?: never; description: string; } | { agent: CompiledAgentResources; configResolver: CompiledDynamicSubagentDefinition; description?: never; })>; export type { CompiledRemoteAgentNode } from "#compiler/remote-agent-node.js"; /** * Versioned compiled manifest emitted by the compiler and loaded by runtime. */ export type CompiledAgentManifest = z.infer<typeof compiledAgentManifestSchema>; declare const compiledScheduleDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ cron: z.ZodString; hasRun: z.ZodBoolean; name: z.ZodString; logicalPath: z.ZodString; markdown: z.ZodOptional<z.ZodString>; sourceId: z.ZodString; owner: z.ZodType<AgentSourceOwner, unknown, z.core.$ZodTypeInternals<AgentSourceOwner, unknown>>; sourceKind: z.ZodLiteral<"markdown">; }, z.core.$strict>, z.ZodObject<{ cron: z.ZodString; hasRun: z.ZodBoolean; name: z.ZodString; logicalPath: z.ZodString; markdown: z.ZodOptional<z.ZodString>; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; }, z.core.$strict>], "sourceKind">; declare const compiledSandboxDefinitionSchema: z.ZodObject<{ providerName: z.ZodOptional<z.ZodString>; environmentExportName: z.ZodOptional<z.ZodString>; inheritsParent: z.ZodOptional<z.ZodBoolean>; exportName: z.ZodOptional<z.ZodString>; logicalPath: z.ZodString; revisionHash: z.ZodString; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; }, z.core.$strict>; declare const compiledSandboxWorkspaceSchema: z.ZodObject<{ logicalPath: z.ZodString; rootEntries: z.ZodReadonly<z.ZodArray<z.ZodString>>; sourceId: z.ZodString; sourcePath: z.ZodString; }, z.core.$strict>; declare const compiledWorkspaceResourceRootSchema: z.ZodObject<{ contentHash: z.ZodOptional<z.ZodString>; logicalPath: z.ZodString; rootEntries: z.ZodReadonly<z.ZodArray<z.ZodString>>; }, z.core.$strict>; declare const compiledConnectionDefinitionSchema: z.ZodObject<{ connectionName: z.ZodString; description: z.ZodString; exportName: z.ZodOptional<z.ZodString>; logicalPath: z.ZodString; protocol: z.ZodDefault<z.ZodEnum<{ mcp: "mcp"; openapi: "openapi"; }>>; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; url: z.ZodString; vercelConnect: z.ZodOptional<z.ZodObject<{ connector: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>; declare const compiledAgentResourcesSchema: z.ZodObject<{ agentRoot: z.ZodString; appRoot: z.ZodString; bindings: z.ZodRecord<z.ZodString, z.ZodType<CompiledModuleBinding, unknown, z.core.$ZodTypeInternals<CompiledModuleBinding, unknown>>>; channelRoutes: z.ZodType<CompiledChannelRoutePlan, unknown, z.core.$ZodTypeInternals<CompiledChannelRoutePlan, unknown>>; connections: z.ZodArray<z.ZodObject<{ connectionName: z.ZodString; description: z.ZodString; exportName: z.ZodOptional<z.ZodString>; logicalPath: z.ZodString; protocol: z.ZodDefault<z.ZodEnum<{ mcp: "mcp"; openapi: "openapi"; }>>; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; url: z.ZodString; vercelConnect: z.ZodOptional<z.ZodObject<{ connector: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>>; dynamicConnections: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicConnectionDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicConnectionDefinition, unknown>>>>; diagnosticsSummary: z.ZodObject<{ errors: z.ZodNumber; warnings: z.ZodNumber; }, z.core.$strict>; sourceComposition: z.ZodType<AgentSourceComposition, unknown, z.core.$ZodTypeInternals<AgentSourceComposition, unknown>>; dynamicInstructions: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicInstructionsDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicInstructionsDefinition, unknown>>>>; dynamicSkills: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicSkillDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicSkillDefinition, unknown>>>>; dynamicTools: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicToolDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicToolDefinition, unknown>>>>; extensionMounts: z.ZodDefault<z.ZodArray<z.ZodType<CompiledExtensionMount, unknown, z.core.$ZodTypeInternals<CompiledExtensionMount, unknown>>>>; hooks: z.ZodArray<z.ZodType<CompiledHookDefinition, unknown, z.core.$ZodTypeInternals<CompiledHookDefinition, unknown>>>; memories: z.ZodDefault<z.ZodArray<z.ZodType<CompiledMemoryDefinition, unknown, z.core.$ZodTypeInternals<CompiledMemoryDefinition, unknown>>>>; sandbox: z.ZodObject<{ providerName: z.ZodOptional<z.ZodString>; environmentExportName: z.ZodOptional<z.ZodString>; inheritsParent: z.ZodOptional<z.ZodBoolean>; exportName: z.ZodOptional<z.ZodString>; logicalPath: z.ZodString; revisionHash: z.ZodString; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; }, z.core.$strict>; sandboxWorkspaces: z.ZodArray<z.ZodObject<{ logicalPath: z.ZodString; rootEntries: z.ZodReadonly<z.ZodArray<z.ZodString>>; sourceId: z.ZodString; sourcePath: z.ZodString; }, z.core.$strict>>; schedules: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{ cron: z.ZodString; hasRun: z.ZodBoolean; name: z.ZodString; logicalPath: z.ZodString; markdown: z.ZodOptional<z.ZodString>; sourceId: z.ZodString; owner: z.ZodType<AgentSourceOwner, unknown, z.core.$ZodTypeInternals<AgentSourceOwner, unknown>>; sourceKind: z.ZodLiteral<"markdown">; }, z.core.$strict>, z.ZodObject<{ cron: z.ZodString; hasRun: z.ZodBoolean; name: z.ZodString; logicalPath: z.ZodString; markdown: z.ZodOptional<z.ZodString>; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; }, z.core.$strict>], "sourceKind">>; remoteAgents: z.ZodArray<z.ZodType<Readonly<ModuleSourceRef & Node & { description: string; backing: { readonly kind: "resource"; readonly sourcePath: string; }; binding: CompiledModuleBinding; entryPath: string; name: string; owner: AgentSourceOwner; parentNodeId: string; outputSchema?: import("../shared/json.ts").JsonObject; path: string; rootPath: string; tool?: boolean; url?: string; }>, unknown, z.core.$ZodTypeInternals<Readonly<ModuleSourceRef & Node & { description: string; backing: { readonly kind: "resource"; readonly sourcePath: string; }; binding: CompiledModuleBinding; entryPath: string; name: string; owner: AgentSourceOwner; parentNodeId: string; outputSchema?: import("../shared/json.ts").JsonObject; path: string; rootPath: string; tool?: boolean; url?: string; }>, unknown>>>; skills: z.ZodReadonly<z.ZodArray<z.ZodType<CompiledSkillDefinition, unknown, z.core.$ZodTypeInternals<CompiledSkillDefinition, unknown>>>>; instructions: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodType<CompiledInstructionsDefinition, unknown, z.core.$ZodTypeInternals<CompiledInstructionsDefinition, unknown>>>>>; tools: z.ZodArray<z.ZodObject<{ availableInSubagents: z.ZodOptional<z.ZodBoolean>; behavior: z.ZodOptional<z.ZodType<CompiledToolBehavior, unknown, z.core.$ZodTypeInternals<CompiledToolBehavior, unknown>>>; description: z.ZodString; execution: z.ZodOptional<z.ZodLiteral<"background">>; exportName: z.ZodOptional<z.ZodString>; hasExecute: z.ZodBoolean; hasModelOutputProjection: z.ZodBoolean; inputSchema: z.ZodNullable<z.ZodType<import("../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../shared/json.ts").JsonObject, unknown>>>; logicalPath: z.ZodString; name: z.ZodString; outputSchema: z.ZodOptional<z.ZodType<import("../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../shared/json.ts").JsonObject, unknown>>>; requiresApproval: z.ZodBoolean; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; workflowProgram: z.ZodOptional<z.ZodObject<{ maxSubagents: z.ZodNumber; }, z.core.$strict>>; }, z.core.$strict>>; workspaceResourceRoot: z.ZodObject<{ contentHash: z.ZodOptional<z.ZodString>; logicalPath: z.ZodString; rootEntries: z.ZodReadonly<z.ZodArray<z.ZodString>>; }, z.core.$strict>; }, z.core.$strict>; declare const compiledAgentNodeManifestSchema: z.ZodObject<{ agentRoot: z.ZodString; appRoot: z.ZodString; bindings: z.ZodRecord<z.ZodString, z.ZodType<CompiledModuleBinding, unknown, z.core.$ZodTypeInternals<CompiledModuleBinding, unknown>>>; channelRoutes: z.ZodType<CompiledChannelRoutePlan, unknown, z.core.$ZodTypeInternals<CompiledChannelRoutePlan, unknown>>; connections: z.ZodArray<z.ZodObject<{ connectionName: z.ZodString; description: z.ZodString; exportName: z.ZodOptional<z.ZodString>; logicalPath: z.ZodString; protocol: z.ZodDefault<z.ZodEnum<{ mcp: "mcp"; openapi: "openapi"; }>>; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; url: z.ZodString; vercelConnect: z.ZodOptional<z.ZodObject<{ connector: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>>; dynamicConnections: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicConnectionDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicConnectionDefinition, unknown>>>>; diagnosticsSummary: z.ZodObject<{ errors: z.ZodNumber; warnings: z.ZodNumber; }, z.core.$strict>; sourceComposition: z.ZodType<AgentSourceComposition, unknown, z.core.$ZodTypeInternals<AgentSourceComposition, unknown>>; dynamicInstructions: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicInstructionsDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicInstructionsDefinition, unknown>>>>; dynamicSkills: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicSkillDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicSkillDefinition, unknown>>>>; dynamicTools: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicToolDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicToolDefinition, unknown>>>>; extensionMounts: z.ZodDefault<z.ZodArray<z.ZodType<CompiledExtensionMount, unknown, z.core.$ZodTypeInternals<CompiledExtensionMount, unknown>>>>; hooks: z.ZodArray<z.ZodType<CompiledHookDefinition, unknown, z.core.$ZodTypeInternals<CompiledHookDefinition, unknown>>>; memories: z.ZodDefault<z.ZodArray<z.ZodType<CompiledMemoryDefinition, unknown, z.core.$ZodTypeInternals<CompiledMemoryDefinition, unknown>>>>; sandbox: z.ZodObject<{ providerName: z.ZodOptional<z.ZodString>; environmentExportName: z.ZodOptional<z.ZodString>; inheritsParent: z.ZodOptional<z.ZodBoolean>; exportName: z.ZodOptional<z.ZodString>; logicalPath: z.ZodString; revisionHash: z.ZodString; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; }, z.core.$strict>; sandboxWorkspaces: z.ZodArray<z.ZodObject<{ logicalPath: z.ZodString; rootEntries: z.ZodReadonly<z.ZodArray<z.ZodString>>; sourceId: z.ZodString; sourcePath: z.ZodString; }, z.core.$strict>>; schedules: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{ cron: z.ZodString; hasRun: z.ZodBoolean; name: z.ZodString; logicalPath: z.ZodString; markdown: z.ZodOptional<z.ZodString>; sourceId: z.ZodString; owner: z.ZodType<AgentSourceOwner, unknown, z.core.$ZodTypeInternals<AgentSourceOwner, unknown>>; sourceKind: z.ZodLiteral<"markdown">; }, z.core.$strict>, z.ZodObject<{ cron: z.ZodString; hasRun: z.ZodBoolean; name: z.ZodString; logicalPath: z.ZodString; markdown: z.ZodOptional<z.ZodString>; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; }, z.core.$strict>], "sourceKind">>; remoteAgents: z.ZodArray<z.ZodType<Readonly<ModuleSourceRef & Node & { description: string; backing: { readonly kind: "resource"; readonly sourcePath: string; }; binding: CompiledModuleBinding; entryPath: string; name: string; owner: AgentSourceOwner; parentNodeId: string; outputSchema?: import("../shared/json.ts").JsonObject; path: string; rootPath: string; tool?: boolean; url?: string; }>, unknown, z.core.$ZodTypeInternals<Readonly<ModuleSourceRef & Node & { description: string; backing: { readonly kind: "resource"; readonly sourcePath: string; }; binding: CompiledModuleBinding; entryPath: string; name: string; owner: AgentSourceOwner; parentNodeId: string; outputSchema?: import("../shared/json.ts").JsonObject; path: string; rootPath: string; tool?: boolean; url?: string; }>, unknown>>>; skills: z.ZodReadonly<z.ZodArray<z.ZodType<CompiledSkillDefinition, unknown, z.core.$ZodTypeInternals<CompiledSkillDefinition, unknown>>>>; instructions: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodType<CompiledInstructionsDefinition, unknown, z.core.$ZodTypeInternals<CompiledInstructionsDefinition, unknown>>>>>; tools: z.ZodArray<z.ZodObject<{ availableInSubagents: z.ZodOptional<z.ZodBoolean>; behavior: z.ZodOptional<z.ZodType<CompiledToolBehavior, unknown, z.core.$ZodTypeInternals<CompiledToolBehavior, unknown>>>; description: z.ZodString; execution: z.ZodOptional<z.ZodLiteral<"background">>; exportName: z.ZodOptional<z.ZodString>; hasExecute: z.ZodBoolean; hasModelOutputProjection: z.ZodBoolean; inputSchema: z.ZodNullable<z.ZodType<import("../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../shared/json.ts").JsonObject, unknown>>>; logicalPath: z.ZodString; name: z.ZodString; outputSchema: z.ZodOptional<z.ZodType<import("../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../shared/json.ts").JsonObject, unknown>>>; requiresApproval: z.ZodBoolean; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; workflowProgram: z.ZodOptional<z.ZodObject<{ maxSubagents: z.ZodNumber; }, z.core.$strict>>; }, z.core.$strict>>; workspaceResourceRoot: z.ZodObject<{ contentHash: z.ZodOptional<z.ZodString>; logicalPath: z.ZodString; rootEntries: z.ZodReadonly<z.ZodArray<z.ZodString>>; }, z.core.$strict>; config: z.ZodType<CompiledAgentDefinition, unknown, z.core.$ZodTypeInternals<CompiledAgentDefinition, unknown>>; }, z.core.$strict>; /** * One mounted extension recorded on a compiled agent manifest. The runtime * evaluates {@link mountLogicalPath} at module-map load so the mount's factory * call binds the extension's config before any tool runs. */ export interface CompiledExtensionMount { /** Runtime packages this extension requires the consuming application to externalize. */ readonly externalDependencies: readonly string[]; /** Mount-derived namespace that prefixes the extension's tool/skill names. */ readonly namespace: string; readonly packageName: string; /** * Package-derived namespace that scopes the extension's durable state keys and * config binding. Distinct from {@link namespace}: state stays keyed to the * package so a consumer renaming the mount file cannot orphan persisted state. */ readonly packageNamespace: string; /** * Absolute path to the extension's source root on disk. The extension-scope * bundler plugin treats any module under this root as extension-owned and * rewrites its `eve/context`/`eve/extension` imports to bake in the namespace. */ readonly sourceRoot: string; readonly mountSourceId: string; readonly mountLogicalPath: string; } /** * Zod schema for the versioned compiled manifest emitted by the compiler. */ export declare const compiledAgentManifestSchema: z.ZodObject<{ agentRoot: z.ZodString; appRoot: z.ZodString; bindings: z.ZodRecord<z.ZodString, z.ZodType<CompiledModuleBinding, unknown, z.core.$ZodTypeInternals<CompiledModuleBinding, unknown>>>; extensionMounts: z.ZodDefault<z.ZodArray<z.ZodType<CompiledExtensionMount, unknown, z.core.$ZodTypeInternals<CompiledExtensionMount, unknown>>>>; channelRoutes: z.ZodType<CompiledChannelRoutePlan, unknown, z.core.$ZodTypeInternals<CompiledChannelRoutePlan, unknown>>; config: z.ZodType<CompiledAgentDefinition, unknown, z.core.$ZodTypeInternals<CompiledAgentDefinition, unknown>>; connections: z.ZodArray<z.ZodObject<{ connectionName: z.ZodString; description: z.ZodString; exportName: z.ZodOptional<z.ZodString>; logicalPath: z.ZodString; protocol: z.ZodDefault<z.ZodEnum<{ mcp: "mcp"; openapi: "openapi"; }>>; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; url: z.ZodString; vercelConnect: z.ZodOptional<z.ZodObject<{ connector: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>>; dynamicConnections: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicConnectionDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicConnectionDefinition, unknown>>>>; diagnosticsSummary: z.ZodObject<{ errors: z.ZodNumber; warnings: z.ZodNumber; }, z.core.$strict>; sourceComposition: z.ZodType<AgentSourceComposition, unknown, z.core.$ZodTypeInternals<AgentSourceComposition, unknown>>; dynamicInstructions: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicInstructionsDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicInstructionsDefinition, unknown>>>>; dynamicSkills: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicSkillDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicSkillDefinition, unknown>>>>; dynamicTools: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicToolDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicToolDefinition, unknown>>>>; hooks: z.ZodArray<z.ZodType<CompiledHookDefinition, unknown, z.core.$ZodTypeInternals<CompiledHookDefinition, unknown>>>; memories: z.ZodDefault<z.ZodArray<z.ZodType<CompiledMemoryDefinition, unknown, z.core.$ZodTypeInternals<CompiledMemoryDefinition, unknown>>>>; kind: z.ZodLiteral<"eve-agent-compiled-manifest">; remoteAgents: z.ZodArray<z.ZodType<Readonly<ModuleSourceRef & Node & { description: string; backing: { readonly kind: "resource"; readonly sourcePath: string; }; binding: CompiledModuleBinding; entryPath: string; name: string; owner: AgentSourceOwner; parentNodeId: string; outputSchema?: import("../shared/json.ts").JsonObject; path: string; rootPath: string; tool?: boolean; url?: string; }>, unknown, z.core.$ZodTypeInternals<Readonly<ModuleSourceRef & Node & { description: string; backing: { readonly kind: "resource"; readonly sourcePath: string; }; binding: CompiledModuleBinding; entryPath: string; name: string; owner: AgentSourceOwner; parentNodeId: string; outputSchema?: import("../shared/json.ts").JsonObject; path: string; rootPath: string; tool?: boolean; url?: string; }>, unknown>>>; sandbox: z.ZodObject<{ providerName: z.ZodOptional<z.ZodString>; environmentExportName: z.ZodOptional<z.ZodString>; inheritsParent: z.ZodOptional<z.ZodBoolean>; exportName: z.ZodOptional<z.ZodString>; logicalPath: z.ZodString; revisionHash: z.ZodString; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; }, z.core.$strict>; sandboxWorkspaces: z.ZodArray<z.ZodObject<{ logicalPath: z.ZodString; rootEntries: z.ZodReadonly<z.ZodArray<z.ZodString>>; sourceId: z.ZodString; sourcePath: z.ZodString; }, z.core.$strict>>; schedules: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{ cron: z.ZodString; hasRun: z.ZodBoolean; name: z.ZodString; logicalPath: z.ZodString; markdown: z.ZodOptional<z.ZodString>; sourceId: z.ZodString; owner: z.ZodType<AgentSourceOwner, unknown, z.core.$ZodTypeInternals<AgentSourceOwner, unknown>>; sourceKind: z.ZodLiteral<"markdown">; }, z.core.$strict>, z.ZodObject<{ cron: z.ZodString; hasRun: z.ZodBoolean; name: z.ZodString; logicalPath: z.ZodString; markdown: z.ZodOptional<z.ZodString>; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; }, z.core.$strict>], "sourceKind">>; skills: z.ZodReadonly<z.ZodArray<z.ZodType<CompiledSkillDefinition, unknown, z.core.$ZodTypeInternals<CompiledSkillDefinition, unknown>>>>; subagents: z.ZodArray<z.ZodType<CompiledSubagentNode, unknown, z.core.$ZodTypeInternals<CompiledSubagentNode, unknown>>>; instructions: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodType<CompiledInstructionsDefinition, unknown, z.core.$ZodTypeInternals<CompiledInstructionsDefinition, unknown>>>>>; tools: z.ZodArray<z.ZodObject<{ availableInSubagents: z.ZodOptional<z.ZodBoolean>; behavior: z.ZodOptional<z.ZodType<CompiledToolBehavior, unknown, z.core.$ZodTypeInternals<CompiledToolBehavior, unknown>>>; description: z.ZodString; execution: z.ZodOptional<z.ZodLiteral<"background">>; exportName: z.ZodOptional<z.ZodString>; hasExecute: z.ZodBoolean; hasModelOutputProjection: z.ZodBoolean; inputSchema: z.ZodNullable<z.ZodType<import("../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../shared/json.ts").JsonObject, unknown>>>; logicalPath: z.ZodString; name: z.ZodString; outputSchema: z.ZodOptional<z.ZodType<import("../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../shared/json.ts").JsonObject, unknown>>>; requiresApproval: z.ZodBoolean; sourceId: z.ZodString; sourceKind: z.ZodLiteral<"module">; workflowProgram: z.ZodOptional<z.ZodObject<{ maxSubagents: z.ZodNumber; }, z.core.$strict>>; }, z.core.$strict>>; version: z.ZodLiteral<51>; workspaceResourceRoot: z.ZodObject<{ contentHash: z.ZodOptional<z.ZodString>; logicalPath: z.ZodString; rootEntries: z.ZodReadonly<z.ZodArray<z.ZodString>>; }, z.core.$strict>; }, z.core.$strict>; export interface CreateCompiledAgentResourcesInput { readonly agentRoot: string; readonly appRoot: string; readonly bindings: Readonly<Record<string, CompiledModuleBinding>>; readonly channelRoutes: CompiledChannelRoutePlan; readonly connections?: readonly CompiledConnectionDefinition[]; readonly dynamicConnections?: readonly CompiledDynamicConnectionDefinition[]; readonly diagnosticsSummary?: DiscoverDiagnosticsSummary; readonly sourceComposition: AgentSourceComposition; readonly dynamicInstructions?: readonly CompiledDynamicInstructionsDefinition[]; readonly dynamicSkills?: readonly CompiledDynamicSkillDefinition[]; readonly dynamicTools?: readonly CompiledDynamicToolDefinition[]; readonly extensionMounts?: readonly CompiledExtensionMount[]; readonly hooks?: readonly CompiledHookDefinition[]; readonly memories?: readonly CompiledMemoryDefinition[]; readonly remoteAgents?: readonly CompiledRemoteAgentNode[]; readonly sandbox: CompiledSandboxDefinition; readonly sandboxWorkspaces?: readonly CompiledSandboxWorkspace[]; readonly schedules?: readonly CompiledScheduleDefinition[]; readonly skills?: readonly CompiledSkillDefinition[]; readonly instructions?: readonly CompiledInstructionsDefinition[]; readonly tools?: readonly CompiledToolDefinition[]; readonly workspaceResourceRoot?: CompiledWorkspaceResourceRoot; } /** Creates compiled filesystem-owned resources with stable defaults. */ export declare function createCompiledAgentResources(input: CreateCompiledAgentResourcesInput): CompiledAgentResources; /** Creates a compiled authored agent payload with stable defaults. */ export declare function createCompiledAgentNodeManifest(input: CreateCompiledAgentResourcesInput & { readonly config: CompiledAgentDefinition; }): CompiledAgentNodeManifest; /** * Computes the sorted `rootEntries` advertised by the workspace resource * tree for one graph node. * * Shared by the synthetic manifest factory (used in tests and the * in-memory compile path) and by `materializeWorkspaceResources` so both * paths emit identical descriptors. */ export declare function deriveResourceRootEntries(input: { readonly sandboxWorkspaces?: readonly CompiledSandboxWorkspace[]; readonly skills?: readonly CompiledSkillDefinition[]; }): readonly string[]; /** * Creates one stable compiled subagent node id from the parent node id and the * source entry discovered in that parent package. */ export declare function createCompiledSubagentNodeId(parentNodeId: string, sourceId: string): string; /** * Creates a compiled manifest with stable defaults. */ export declare function createCompiledAgentManifest(input: { readonly agentRoot: string; readonly appRoot: string; readonly bindings: Readonly<Record<string, CompiledModuleBinding>>; readonly channelRoutes: CompiledChannelRoutePlan; readonly config: CompiledAgentDefinition; readonly connections?: readonly CompiledConnectionDefinition[]; readonly dynamicConnections?: readonly CompiledDynamicConnectionDefinition[]; readonly diagnosticsSummary?: DiscoverDiagnosticsSummary; readonly sourceComposition: AgentSourceComposition; readonly dynamicInstructions?: readonly CompiledDynamicInstructionsDefinition[]; readonly dynamicSkills?: readonly CompiledDynamicSkillDefinition[]; readonly dynamicTools?: readonly CompiledDynamicToolDefinition[]; readonly hooks?: readonly CompiledHookDefinition[]; readonly remoteAgents?: readonly CompiledRemoteAgentNode[]; readonly sandbox: CompiledSandboxDefinition; readonly sandboxWorkspaces?: readonly CompiledSandboxWorkspace[]; readonly schedules?: readonly CompiledScheduleDefinition[]; readonly skills?: readonly CompiledSkillDefinition[]; readonly subagents?: readonly CompiledSubagentNode[]; readonly instructions?: readonly CompiledInstructionsDefinition[]; readonly tools?: readonly CompiledToolDefinition[]; readonly extensionMounts?: readonly CompiledExtensionMount[]; readonly workspaceResourceRoot?: CompiledWorkspaceResourceRoot; }): CompiledAgentManifest;