eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
41 lines (40 loc) • 1.85 kB
TypeScript
import { isEveProject, scaffoldBaseProject, type EvePackageContract } from "#setup/scaffold/index.js";
import type { Prompter } from "../prompter.js";
import { type SetupState } from "../state.js";
import type { SetupBox } from "../step.js";
/** Injected for tests; defaults to the real eve-scaffold helpers. */
export interface ScaffoldDeps {
scaffoldBaseProject: typeof scaffoldBaseProject;
isEveProject: typeof isEveProject;
}
export interface ScaffoldOptions {
/** Reports scaffold progress and overwrite warnings. The box never prompts. */
prompter: Prompter;
evePackage?: EvePackageContract;
/** Parent directory the project folder is created inside. Defaults to cwd. */
targetDirectory?: string;
/** Allow the in-place scaffold to replace eve scaffold files that already exist. */
overwriteExisting?: boolean;
/**
* Headless mode: a headless re-run over an existing eve project skips
* scaffolding (idempotent re-entry); an interactive run always scaffolds and
* lets `scaffoldBaseProject` own the in-place conflict rules. The box prompts
* for nothing, so this dispatch comes from the composition site.
*/
headless?: boolean;
deps?: ScaffoldDeps;
}
/**
* Whether the run is headless. A headless re-run over an existing eve project
* skips scaffolding (idempotent re-entry); an interactive run always scaffolds.
*/
export interface ScaffoldInput {
headless: boolean;
}
/**
* THE SCAFFOLD BOX: writes the base agent template into the path resolved by
* the target box. It prompts for nothing; the gather only records which mode
* ran, because a headless re-run on an already-scaffolded eve project skips the
* write and continues setup instead of failing.
*/
export declare function scaffold(options: ScaffoldOptions): SetupBox<SetupState, ScaffoldInput, string>;