UNPKG

framework

Version:

The (AI) Framework: turnkey, zero-config AI orchestration that wraps a coding-agent CLI (Claude Code) as a black box and takes you from an idea to a running app. Vite for AI.

35 lines 2.22 kB
import { ARCHIVE_DIR } from './store/index.js'; import { type GitRunner } from './project.js'; /** * Committed session history (#1179): where a project's finished agents are archived so they survive * the repo being cleaned. * * The bug this exists for: agent state was written to `.the-framework/agents/`, which the install-time * `.gitignore` keeps untracked, so `git clean -fdx` — an ordinary thing to do to a repo — deleted * every session a project had ever run. Nothing was recoverable, because nothing had ever been * committed. Since #1582 the lasting copy lives on the data branch, as `agents/<user>/`. * * Scoped per user rather than one shared directory. Two people working the same repo would * otherwise write the same paths from different machines and conflict on every merge; under their * own directory their histories simply sit side by side. The list being visible to the whole team * is the intended outcome, not a leak — see the issue. * * The identity is the git `user.email` already configured in the repo, so there is nothing new to * set up and the directory matches the name on the commits. */ /** The directory, under a user's own directory, that holds their archived agents. */ export { ARCHIVE_DIR }; /** Where an agent's history goes when git has no identity configured. */ export declare const ANONYMOUS_USER_DIR = "anonymous"; /** * An email as a directory name: lowercased, with anything outside a conservative set replaced by * `-`. The result must start with a letter or digit, which is what rules out `.`, `..` and dotfile * names — this value comes from repo configuration and is joined onto a path, so a name that could * climb out of the directory is the one thing that must be impossible. Anything that cannot be made * to fit falls back to {@link ANONYMOUS_USER_DIR} rather than to a guess. */ export declare function userDirName(email: string | undefined): string; export declare function resolveUserDir(cwd: string, git?: GitRunner): Promise<string>; /** Drop the {@link resolveUserDir} cache. For tests, and for a daemon that outlives a config change. */ export declare function forgetUserDirs(): void; //# sourceMappingURL=agent-archive.d.ts.map