/** * [WHO]: REGISTRY (internal, ordered), BuiltinExtension, builtInExtensions, getBuiltinExtensionPaths() * [FROM]: Depends on node:fs, node:path, process.env, node:module * [TO]: Consumed by main.ts, core/runtime/sdk.ts, test files * [HERE]: builtin-extensions.ts - the single ordered built-in extension registry for Catui * * One ordered list drives both the public metadata projection and the load path resolution, so * `defaultEnabled` is the loading decision rather than a second, independent declaration. */ export type BuiltinExtensionRiskLevel = "passive" | "command" | "tool" | "background" | "write-capable"; export type BuiltinExtensionTestContract = "lifecycle" | "external-process" | "resource-discovery" | "write-guard"; /** Public metadata projection. Load location is internal; see {@link BuiltinRegistration}. */ export interface BuiltinExtension { id: string; category: "default" | "optional" | "package"; defaultEnabled: boolean; riskLevel: BuiltinExtensionRiskLevel; requiresUI: boolean; startsTimers: boolean; writesWorkspace: boolean; externalProcess: boolean; resourceDiscovery?: boolean; testContracts?: readonly BuiltinExtensionTestContract[]; testFiles?: readonly string[]; } /** Public metadata view. Same order as {@link REGISTRY}, minus internal load fields. */ export declare const builtInExtensions: readonly BuiltinExtension[]; /** * Resolve the default-loaded built-in extensions from {@link REGISTRY}, in registry order. * * An entry loads when `defaultEnabled` is true, or when its activation switch is on. That is the * only loading rule: there is no second list that can disagree with the metadata. * * Default-loaded from `extensions/builtin/`: the discipline, tool and passive skills * (typesafe, discipline, skill-tool, catpaw, humanizer, catail), memory (nanomem), * internet access (link-world), MCP, security-audit, and the interactive surfaces * (presence, idle-think, ask-user-question). * * Opt-in, enabled via configuration or `--extension`: * - Simplify (code simplification) - extensions/optional/simplify/ * - export-html (HTML export) - extensions/optional/export-html/ * - Browser harness (CDP automation) - extensions/builtin/browser/ (opt-in since P6/EV03; source stays * under builtin/ until the Q2 physical/package opt-in decision moves it to extensions/optional/ or a package) * * Product-approved optional source loaded by default: * - Evolution (controlled self-evolution) - extensions/optional/evolution/ * * An entry whose compiled `index.js` and TypeScript `index.ts` are both absent is * skipped, so a missing optional resource degrades to "not loaded" rather than throwing. */ export declare function getBuiltinExtensionPaths(): string[]; /** * @deprecated Use getBuiltinExtensionPaths() instead */ export declare function getNanopencilDefaultExtensionPaths(): string[]; /** * @deprecated Use getBuiltinExtensionPaths() instead */ export declare function getCatuiDefaultExtensionPaths(): string[];