import { type BundledGjcSkillCatalogEntry } from "./gjc-skills.generated"; export declare const DEFAULT_GJC_DEFINITION_NAMES: readonly ["autoresearch", "deep-interview", "ralplan", "ultragoal"]; export type DefaultGjcDefinitionName = (typeof DEFAULT_GJC_DEFINITION_NAMES)[number]; export type DefaultGjcDefinitionKind = "skill" | "skill-fragment"; export type EmbeddedDefaultGjcSkill = { name: DefaultGjcDefinitionName; description: string; filePath: string; baseDir: string; source: "bundled:default"; hide?: boolean; /** Content is loaded on demand to keep startup free of bundled Markdown bodies. */ content: string; loadContent: () => Promise; }; export type DefaultGjcInstallStatus = "different" | "matching" | "missing" | "skipped" | "written"; export interface DefaultGjcSkillDefinition { kind: "skill"; name: DefaultGjcDefinitionName; relativePath: string; content: string; loadContent: () => Promise; } export interface DefaultGjcSkillFragmentDefinition { kind: "skill-fragment"; parentSkillName: DefaultGjcDefinitionName; relativePath: string; content: string; loadContent: () => Promise; } export type DefaultGjcDefinition = DefaultGjcSkillDefinition | DefaultGjcSkillFragmentDefinition; export interface InstallDefaultGjcDefinitionsOptions { check?: boolean; force?: boolean; /** * Only rewrite default definition files that already exist on disk but whose * content differs from the embedded defaults. Files that are absent are left * absent (status "missing"). Used by `gjc update` to refresh opted-in copies * without materializing new on-disk copies for users who never installed them. */ refreshOnly?: boolean; targetRoot?: string; } export type DefaultGjcDefinitionInstallFile = { kind: "skill"; name: DefaultGjcDefinitionName; path: string; status: DefaultGjcInstallStatus; } | { kind: "skill-fragment"; parentSkillName: DefaultGjcDefinitionName; path: string; status: DefaultGjcInstallStatus; }; /** * Bundled workflow definitions that GJC used to ship and no longer does. * * Installing defaults only ever wrote the CURRENT set, so a definition dropped * from the bundle stayed on disk under the agent dir forever — where * filesystem skill discovery still found it and `/skill:` still resolved. * `team` was the first removal, so it was the first to expose that gap. * * Retirement QUARANTINES rather than deletes: the directory is moved aside to * `/retired/./`. A user who customized the skill * keeps their content, and nothing is destroyed to satisfy a rename. */ export declare const RETIRED_GJC_DEFINITION_NAMES: readonly ["team"]; export type RetiredGjcDefinitionName = (typeof RETIRED_GJC_DEFINITION_NAMES)[number]; export type RetiredGjcDefinitionStatus = "absent" | "quarantined"; export interface RetiredGjcDefinitionFile { name: RetiredGjcDefinitionName; /** Directory that held the retired definition. */ path: string; /** Where it was moved, when quarantined. */ quarantinedTo?: string; status: RetiredGjcDefinitionStatus; } export interface DefaultGjcDefinitionInstallResult { targetRoot: string; total: number; written: number; skipped: number; matching: number; missing: number; different: number; files: DefaultGjcDefinitionInstallFile[]; /** Retired bundled definitions found under `targetRoot`, and what happened to them. */ retired: RetiredGjcDefinitionFile[]; } export declare class BundledDefaultContentError extends Error { readonly sourcePath: string; readonly cause: unknown; readonly code = "BUNDLED_DEFAULT_CONTENT_UNREADABLE"; constructor(message: string, sourcePath: string, cause: unknown); } export declare function readBundledContentSync(entry: BundledGjcSkillCatalogEntry): string; export declare function getDefaultGjcDefinitions(): readonly DefaultGjcDefinition[]; export declare function getDefaultGjcAgentDefinitions(): readonly DefaultGjcDefinition[]; export declare function getEmbeddedDefaultGjcSkillFragments(parentSkillName: DefaultGjcDefinitionName): DefaultGjcSkillFragmentDefinition[]; export declare function getEmbeddedDefaultGjcSkills(): EmbeddedDefaultGjcSkill[]; export declare function installDefaultGjcDefinitions(options?: InstallDefaultGjcDefinitionsOptions): Promise; /** * Quarantine any retired bundled definition still present under `targetRoot`. * * `check` reports what WOULD move without touching the filesystem, so * `--check` callers stay read-only. */ export declare function retireRemovedGjcDefinitions(targetRoot: string, options?: { check?: boolean; }): Promise;