export interface PresetManifestEntry { /** Canonical `--preset` name = the boilerplate filename. */ name: string; /** One-line summary shown by `ztrack init --list`. */ description: string; /** Alternate `--preset` inputs that resolve to this preset (e.g. `default`). */ aliases?: string[]; /** The recommended baseline — what `ztrack init` (no `--preset`) installs. Exactly one. */ recommended?: boolean; } /** The full preset catalog, read from the per-preset `.json` sidecars. */ export declare function presetManifest(): PresetManifestEntry[]; /** The baseline preset `ztrack init` installs with no `--preset`. */ export declare function recommendedPreset(): string; /** Every accepted `--preset` input: canonical names plus their aliases. */ export declare function initTrackerPresets(): readonly string[]; export declare function resolvePresetName(preset: string): string; export type InitTrackerProjectOptions = { preset?: string; /** Permanently link an external tracker (e.g. { provider: 'github', repo: 'o/n' }). */ sync?: { provider: 'github'; repo: string; policy?: 'hub-wins' | 'twin-wins' | 'merge'; }; /** `shared`: a central, cross-worktree board (for multi-worktree/agent fleets). Default `branch` * (committed, branch-scoped). See TrackerConfig.board. */ board?: 'branch' | 'shared'; }; export declare function trackerValidationEntrypointPath(projectRoot: string): string; export declare function trackerValidationBasePath(projectRoot: string): string; export declare function trackerVisualizerExtensionPath(projectRoot: string): string; export declare function trackerVisualizerExtensionBasePath(projectRoot: string): string; export interface UpgradePresetResult { status: 'updated' | 'up-to-date' | 'conflicts' | 'no-base'; entrypoint: string; installedFrom: string; conflicts: number; /** VIZ-15: the repo-owned dashboard extension upgrades in lockstep, as its own artifact. */ extension: ExtensionUpgradeResult; } export interface ExtensionUpgradeResult { status: 'seeded' | 'up-to-date' | 'conflicts' | 'updated' | 'no-base' | 'skipped'; path: string; basePath: string; conflicts: number; } /** * Upgrade the repo-local preset: 3-way merge the current bundled template (for the * variant this repo installed) into the edited preset.ts, preserving local edits. * Conflicts are written as `<<<<<<<` markers for a human/agent to resolve. The pristine * base advances to the new upstream on a clean OR conflicted merge. * * VIZ-15: also upgrades the repo-owned dashboard extension.tsx (installed alongside the preset) * the same way — an independent artifact with its own status, reported under `.extension`. */ export declare function upgradeTrackerPreset(projectRoot: string): UpgradePresetResult; /** * Initialize a tracker project: write the local backend config, install a * repo-local validation preset, and add a managed .gitignore block. Idempotent and * shared by `ztrack init` and the tracker_init MCP tool so an MCP-only agent * can bootstrap a fresh repo without the CLI. */ export declare function initTrackerProject(root: string, teamKey?: string, options?: InitTrackerProjectOptions): { configPath: string; alreadyInitialized: boolean; teamKey: string; preset: string; validationEntrypoint?: string; visualizerExtensionPath?: string; }; /** Idempotently ensure ztrack's managed `.gitignore` patterns are present. On a fresh repo * it writes the whole block; on a repo whose block predates a new pattern (e.g. the loop * runtime files added later) it appends only the missing lines — so the loop's session * state never leaks into a commit on a repo that was `init`'d before the loop existed. * Called by `init` and by `ztrack loop start` (the point where loop-state files appear). */