eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
70 lines (69 loc) • 3.42 kB
TypeScript
import type { PackageManagerKind } from "../../package-manager.js";
export declare const CURRENT_DIRECTORY_PROJECT_NAME = ".";
export declare const DEFAULT_AI_PACKAGE_VERSION = "__AI_SDK_VERSION__";
export declare const DEFAULT_CONNECT_PACKAGE_VERSION = "__VERCEL_CONNECT_VERSION__";
export declare const DEFAULT_ZOD_PACKAGE_VERSION = "__ZOD_VERSION__";
/**
* The eve package metadata that generated projects consume together. Keeping
* the dependency version and Node.js requirement in one value prevents a
* scaffold from installing one eve release while declaring another release's
* runtime contract.
*/
export interface EvePackageContract {
/** eve dependency version or npm specifier written to the generated package. */
version: string;
/** The matching eve release's authored `package.json` `engines.node` value. */
nodeEngine: string;
}
export declare const DEFAULT_EVE_PACKAGE_CONTRACT: EvePackageContract;
/** Resolves a stamped or explicitly supplied eve package contract. */
export declare function resolveEvePackageContract(contract?: EvePackageContract): EvePackageContract;
/**
* Provider slug a gateway model id routes through: the segment before the
* first "/" (e.g. `anthropic/claude-sonnet-4.6` → `anthropic`). The slug is
* injected into generated source, so characters outside the catalog's slug
* alphabet are dropped; an id without a usable prefix falls back to
* `anthropic`.
*/
export declare function modelProviderSlug(modelId: string): string;
/**
* Env var the byok scaffold reads the provider API key from, derived from the
* model's provider slug (e.g. `anthropic/...` → `ANTHROPIC_API_KEY`). The name
* is the scaffold's convention: the key is passed to the gateway `byok` block
* explicitly, so users can rename it freely. Non-alphanumerics fold to `_`
* and a leading digit is prefixed, keeping `process.env.<name>` valid source.
*/
export declare function byokProviderEnvVar(modelId: string): string;
/**
* The files that define the agent itself, rendered for `model`. This is the
* subset `eve init` writes when adding an agent to an existing project, where
* everything outside `agent/` belongs to the host app.
*/
export declare function agentTemplateFiles(model: string): Record<string, string>;
export declare function formatEveDependencySpecifier(versionOrSpecifier: string): string;
export interface ScaffoldBaseProjectOptions {
projectName: string;
model: string;
/**
* The manager that owns command execution and manager-specific generated
* project files for this scaffold.
* Defaults to pnpm.
*/
packageManager?: PackageManagerKind;
targetDirectory?: string;
overwriteExisting?: boolean;
onOverwriteFile?: (filePath: string) => void | Promise<void>;
evePackage?: EvePackageContract;
aiPackageVersion?: string;
connectPackageVersion?: string;
zodPackageVersion?: string;
typescriptPackageVersion?: string;
/**
* Scaffold an inline provider `byok` block in `agent.ts` that reads the
* provider key from `process.env` instead of relying on the managed Vercel
* AI Gateway. `process` is typed by the `@types/node` every scaffold ships.
*/
byokProvider?: boolean;
}
export declare function scaffoldBaseProject(options: ScaffoldBaseProjectOptions): Promise<string>;
export declare function isEveProject(projectRoot: string): Promise<boolean>;