/** * Native extension manifests — single source of truth for built-in extensions. * * Native extensions are loaded by default on all machines unless explicitly * disabled via `Settings.disabledNativeExtensions`. Default-off extensions * are loaded only when opted in via `Settings.enabledNativeExtensions`. Each * extension has a stable `id` used in settings, a human-readable label for the * landing UI, and an optional file path for extensions that live as separate files. * * Extensions with empty `entryPath` are "core" features implemented directly * in the agent runtime (e.g., memory). They don't need a file to load, but * they still appear in the settings panel so users can see and toggle them. */ /** * Native (built-in) extension selection. * * Single source of truth shared by the SDK (`sdk.ts`) and the default * resource loader (`resource-loader.ts`) so the two option types cannot * drift apart. * * - "all": every file-based native extension is loaded. * - "none": no native extensions are loaded (programmatic SDK default — * SDK sessions are opt-in only, unlike the CLI/serve path where native * extensions are on by default). * - { enabled, disabled }: explicit selection — enabled ids minus disabled * ids. Extension ids come from `NATIVE_EXTENSIONS`. */ export type NativeExtensionsOption = "all" | "none" | { enabled: string[]; disabled: string[]; }; export interface NativeExtensionManifest { /** Stable identifier used in settings (e.g. "memory", "browser"). */ id: string; /** Human-readable name shown in the landing settings UI. */ label: string; /** One-line description for tooltips. */ description: string; /** Category for grouping in the settings panel. */ category: "core" | "automation" | "integration"; /** * Path to the extension entry file, relative to the CLI's extensions directory. * Empty string means the extension is built into the runtime (no file to load). */ entryPath: string; /** Whether this extension is enabled by default on all machines. */ defaultEnabled: boolean; /** Optional tags for filtering. */ tags?: string[]; } /** * Canonical list of native extensions. * * To add a new native extension, add its manifest here. The extension will * automatically appear in the landing settings panel and be loaded by default * unless `defaultEnabled: false`. */ export declare const NATIVE_EXTENSIONS: NativeExtensionManifest[]; /** * Look up a native extension by id. Returns undefined for unknown ids. */ export declare function getNativeExtension(id: string): NativeExtensionManifest | undefined; /** * Get the list of native extension entry paths that should be loaded, * respecting default-on disabled ids and default-off enabled ids. */ export declare function getEnabledNativeExtensionPaths(disabledIds: Set, enabledIds: Set): string[]; /** * Get native extension entry paths from an explicit selection. * * Loaded = enabled ids minus disabled ids. The `defaultEnabled` flags are * ignored — the caller takes full control. Used by the programmatic SDK path, * where native extensions are opt-in only. */ export declare function getExplicitNativeExtensionPaths(enabledIds: Set, disabledIds: Set): string[]; /** * Build the payload for the `native_extensions_info` relay frame. */ export declare function buildNativeExtensionsInfo(disabledIds: Set, enabledIds: Set): Array<{ id: string; label: string; description: string; category: string; defaultEnabled: boolean; enabled: boolean; tags?: string[]; }>; //# sourceMappingURL=native-extensions.d.ts.map