eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
44 lines (43 loc) • 1.57 kB
TypeScript
import type { CompiledModuleMap } from "#compiler/module-map.js";
import type { ResolvedModuleSourceRef } from "#runtime/types.js";
/**
* Error raised when compiled artifacts cannot be hydrated into a runtime-owned
* authored agent model.
*/
export declare class ResolveAgentError extends Error {
readonly logicalPath?: string;
readonly sourceId?: string;
constructor(message: string, input?: {
logicalPath?: string;
sourceId?: string;
});
}
/**
* Builds the resolved source ref block shared by every per-primitive
* resolver that targets a `module` source.
*/
export declare function createResolvedModuleSourceRef(sourceRef: {
readonly exportName?: string;
readonly logicalPath: string;
readonly sourceId: string;
}): ResolvedModuleSourceRef;
/**
* Looks up a compiled module namespace for one resolved agent node and
* returns the materialized exported value referenced by the given
* compiled definition.
*
* Throws {@link ResolveAgentError} when the module map does not contain
* the expected source — every per-primitive resolver shares this
* lookup, so the helper centralizes the error message and avoids
* duplicating ~25 lines of boilerplate per resolver.
*/
export declare function loadResolvedModuleExport(input: {
readonly definition: {
readonly exportName?: string;
readonly logicalPath: string;
readonly sourceId: string;
};
readonly kindLabel: string;
readonly moduleMap: CompiledModuleMap;
readonly nodeId: string | undefined;
}): Promise<unknown>;