import { PluginInstallOperation, PluginMarketplaceCatalog } from "@agimon-ai/po-core/apiContracts"; //#region src/types/plugins.d.ts /** What the catalog and plugin pages draw. Containers map server state onto these; views never fetch. */ /** * Po plugins are layers turned on through presets; Codex and Claude Code plugins keep po-domain activation. * `external` is one of those when the host doesn't say which tool it came from. */ export type PluginSource = 'po' | 'codex' | 'claude' | 'external'; export type PluginInstall = 'available' | 'installing' | 'failed' | 'installed'; /** Derived from the plugin's onboarding `status()`, never stored. `none` means the plugin has no setup. */ export type PluginSetup = 'none' | 'checking' | 'needs-setup' | 'ready' | 'failed' | 'unavailable'; export type PluginIconKey = 'image' | 'calendar' | 'users' | 'globe' | 'search' | 'branch' | 'palette' | 'task' | 'message' | 'puzzle' | 'smartphone'; export interface PluginEntry { id: string; name: string; /** One line, written for someone who has never heard of the plugin. */ description: string; category: string; icon: PluginIconKey; /** The plugin's own logo as a `data:image` URI, when it ships one; `icon` is the fallback. */ logo?: string; publisher: string; source: PluginSource; install: PluginInstall; /** While installing: the files are in place and Po is switching the plugin on. */ finishing?: boolean; setup: PluginSetup; /** Presets in the current scope that include this plugin. */ inPresets: readonly string[]; /** In presets, but not the scope's default one: a new session does not start with it. */ outsideDefault?: boolean; /** Codex and Claude Code plugins only: on everywhere, or the domains that load it. */ domains?: 'everywhere' | readonly string[]; } /** Where a change lands: the host's presets, or one workspace's. */ export interface PluginScope { kind: 'host' | 'workspace'; /** "Studio Mac" or the workspace folder name. */ label: string; /** The computer that installs and runs plugins for this scope. */ host: string; } export interface PresetSummary { name: string; description: string; pluginIds: readonly string[]; isDefault: boolean; /** A workspace preset that replaces the host preset of the same name in this workspace. */ overridesHost?: boolean; /** Read from the host because the workspace has no preset of its own. */ inherited?: boolean; } /** One curated layer as the host's catalog describes it. Never carries integrity or registry URLs. */ export type CatalogLayer = PluginMarketplaceCatalog['layers'][number]; /** An install's progress; `conflict` and `clash` say why nothing was turned on. */ export type InstallOperation = PluginInstallOperation; export interface AgentPluginPin { origin: string; package: string; version: string; integrity: string; } export interface ExternalPluginsView { domains: { name: string; plugins: readonly string[]; }[]; plugins: { name: string; version?: string; installed?: AgentPluginPin; update?: AgentPluginPin; description?: string; origin: { kind: string; marketplace?: string; path?: string; }; skills: readonly string[]; mcpServers: readonly string[]; hooks: number; domains: readonly string[]; enabled: boolean; /** Only a plugin uploaded on this computer can be deleted. */ deletable?: boolean; }[]; } /** One of a plugin's MCP servers, as po-mcp's workspace catalog reports it. */ export type ExternalServerStatus = 'connected' | 'needs-sign-in' | 'needs-key' | 'failed' | 'not-checked'; export interface ExternalServerRow { name: string; kind?: 'remote' | 'local'; /** The URL, or the command without its arguments. */ target?: string; status: ExternalServerStatus; /** Key names the config asks for that the Vault cannot answer yet. Never values. */ missingKeys: readonly string[]; error?: string; /** A sign-in has started and is not finished yet. */ signingIn?: boolean; /** While a sign-in waits: the page the person opens to finish it, once the server has offered one. */ signInUrl?: string; } /** The subset of po-mcp's `McpRepositoryCatalog` this page reads; po-mcp is not a dependency. */ export interface McpCatalogWire { servers: readonly { name: string; state: string; error?: string; missingSecrets?: readonly string[]; management?: { kind?: 'remote' | 'local'; target?: string; }; }[]; } /** The subset of po-mcp's `McpAuthorizationFlow` this page reads. */ export interface McpAuthorizationWire { id: string; serverName: string; status: 'starting' | 'waiting' | 'completed' | 'failed' | 'cancelled' | 'expired'; authorizationUrl?: string; error?: string; } //#endregion //# sourceMappingURL=plugins.d.mts.map