/** * cogitator plugin - install, update and manage plugins and their marketplaces, in the formats of * Claude Code's plugins, and run their eval suites */ import { Command } from 'commander'; import { experimental_PluginInstaller, type PluginInstallerOptions } from '@cogitator-ai/core'; import type { PluginOptionValue } from '@cogitator-ai/types'; /** How the plugin commands talk to the person running them */ export interface PluginIo { print(line: string): void; /** Asks a yes or no question, undefined when nobody can answer (not a terminal) */ confirm(question: string): Promise; /** Reads a secret without showing it, undefined when nobody can answer */ secret(question: string): Promise; } /** What the commands are built with: the installer's options and how to talk */ export interface PluginCommandContext { io: PluginIo; installer: (options: PluginInstallerOptions) => experimental_PluginInstaller; cwd: string; /** Directories of the user's settings (default `~/.cogitator`, `~/.claude`) */ userDirs?: readonly string[]; } /** Talks on the terminal: prompts only when stdin is one */ export declare function terminalPluginIo(): PluginIo; type Scope = 'user' | 'project' | 'local'; /** `key=value` pairs as option values: `true`, `false` and numbers read as such */ export declare function parseOptionPairs(pairs: readonly string[]): Record; interface CommonFlags { json?: boolean; yes?: boolean; } /** `cogitator plugin install` */ export declare function runInstall(spec: string, flags: CommonFlags & { scope?: Scope; config?: string[]; secret?: string[]; marketplace?: string; }, context?: PluginCommandContext): Promise; /** `cogitator plugin uninstall` */ export declare function runUninstall(spec: string, flags: CommonFlags & { keepData?: boolean; prune?: boolean; }, context?: PluginCommandContext): Promise; /** `cogitator plugin enable` and `disable` */ export declare function runSetEnabled(spec: string, enabled: boolean, flags: CommonFlags & { scope?: Scope; }, context?: PluginCommandContext): Promise; /** `cogitator plugin update` */ export declare function runUpdate(spec: string | undefined, flags: CommonFlags, context?: PluginCommandContext): Promise; /** `cogitator plugin list`: the install records, what the settings enable, what is wrong with each */ export declare function runList(flags: CommonFlags & { available?: boolean; }, context?: PluginCommandContext): Promise; /** `cogitator plugin configure` */ export declare function runConfigure(spec: string, flags: CommonFlags & { set?: string[]; secret?: string[]; unset?: string[]; }, context?: PluginCommandContext): Promise; /** `cogitator plugin validate`: 0 passed, 1 failed, 2 when the validator itself failed */ export declare function runValidate(path: string, flags: { strict?: boolean; json?: boolean; }, context?: PluginCommandContext): Promise; /** `cogitator plugin marketplace add|list|remove|update` */ export declare function runMarketplace(action: 'add' | 'list' | 'remove' | 'update', argument: string | undefined, flags: CommonFlags, context?: PluginCommandContext): Promise; export declare const pluginCommand: Command; export {}; //# sourceMappingURL=plugin.d.ts.map