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.
41 lines • 2.27 kB
TypeScript
import { type StoreFs } from './store/index.js';
/**
* The layout gate (#1575): a build refuses to run in a repo whose recorded bookkeeping layout
* differs from its own.
*
* The failure this closes was caught live (#1574): the cloud environment installs the framework
* from npm, the last published build predated the `sessions/` → `agents/` rename, and the web
* run's bookkeeping landed under the old name — a wrong-layout commit that main's guard test
* rejects, hours after the session could have said it will not work. Same philosophy as the
* extension gate (#1519): a skewed build half-works, so it is refused outright with both sides
* named, no degraded mode.
*
* The repo's half is a tracked marker file whose content is *derived from the build's own layout
* constants*, so a rename changes the derivation by itself and the lockstep test fails the rename
* PR until the checked-in marker is regenerated — nothing to remember to bump. A repo without the
* marker is ungated, the way an absent `expectedExtensionVersion` leaves the bridge ungated:
* install writes it, so every newly activated repo is gated from the start.
*/
/** The marker's name under `.the-framework/`. Tracked, so every worktree and clone carries it. */
export declare const LAYOUT_FILE = "LAYOUT";
/** The marker path under `cwd`'s `.the-framework/`. */
export declare function layoutMarkerPath(cwd: string): string;
/**
* The layout this build writes, as one comparable string: every name a committed artifact's path
* hangs off. Pure data — a comment line would put message wording into the equality.
*/
export declare function layoutMarker(): string;
/** The outcome of {@link checkLayout}. A failure is a value carrying the refusal, never a throw. */
export type LayoutCheck = {
ok: true;
} | {
ok: false;
error: string;
};
/**
* Compare the repo's recorded layout against this build's. A missing marker passes (an unmarked
* repo is ungated); a present-but-different one refuses with both sides named and the fix for
* each direction — the stale-published-build case this exists for, and the older-repo case.
*/
export declare function checkLayout(cwd: string, fs?: StoreFs): Promise<LayoutCheck>;
//# sourceMappingURL=layout.d.ts.map