/** * `agent-native app-skill` packages an agent-native app as a distributable * skill bundle: instructions + MCP connector + embeddable app surfaces. * * The manifest intentionally contains no user secrets. Hosted installs write * URL-only MCP entries; clients that need auth complete OAuth/device setup in * the host. Local installs point at a developer-owned app process. */ import { type ClientId } from "./mcp-config-writers.js"; export type SkillVisibility = "internal" | "exported" | "both"; export type AppSkillHostAdapter = "codex-plugin" | "claude-marketplace" | "vercel-skills" | "plain-skill" | "claude-skill" | "chatgpt-mcp" | "generic-mcp"; export interface AppSkillManifestSkill { path: string; visibility: SkillVisibility; exportAs?: string; } export interface AppSkillSurface { id: string; action?: string; path: string; mediaTypes?: string[]; defaultMediaType?: string; } export interface AppSkillManifest { schemaVersion: 1; id: string; displayName: string; description: string; /** * Optional semver base for generated plugin manifests. Codex keys its plugin * cache on the version string, so the packer appends a content hash to this * base; leave it unset to default to "1.0.0". */ version?: string; hosted: { url: string; mcpUrl: string; }; mcp: { serverName: string; aliases?: string[]; }; local?: { template?: string; sourcePath?: string; defaultUrl?: string; commands?: { install?: string; dev?: string; start?: string; }; }; auth?: { mode?: "oauth" | "device" | "none"; setup?: string; }; surfaces: AppSkillSurface[]; skills: AppSkillManifestSkill[]; hostAdapters: AppSkillHostAdapter[]; } export interface LoadedAppSkillManifest { manifest: AppSkillManifest; file: string; dir: string; } export interface ParsedAppSkillArgs { command: "ensure" | "launch" | "pack" | "help"; manifest?: string; client: string; scope: string; serverName?: string; out?: string; into?: string; mode: "hosted" | "local"; dryRun: boolean; skipInstall: boolean; noRegister: boolean; printJson: boolean; yes: boolean; } export interface EnsureAppSkillOptions { mode?: "hosted" | "local"; clients?: ClientId[]; scope?: string; serverName?: string; baseDir?: string; dryRun?: boolean; confirm?: boolean; yes?: boolean; log?: (message: string) => void; } export interface EnsureAppSkillResult { mode: "hosted" | "local"; serverName: string; mcpUrl: string; clients: ClientId[]; written: { client: ClientId; file: string; }[]; } export interface LaunchAppSkillOptions { mode?: "hosted" | "local"; into?: string; dryRun?: boolean; skipInstall?: boolean; noRegister?: boolean; clients?: ClientId[]; scope?: string; serverName?: string; baseDir?: string; confirm?: boolean; yes?: boolean; log?: (message: string) => void; } export interface AppSkillLaunchPlan { mode: "hosted" | "local"; appId: string; appDir?: string; sourceDir?: string; url: string; mcpUrl: string; serverName: string; commands: { install?: string; dev?: string; start?: string; }; } export declare function normalizeAppSkillManifest(raw: unknown): AppSkillManifest; export declare function findAppSkillManifest(startDir?: string): string; export declare function loadAppSkillManifest(file?: string): LoadedAppSkillManifest; export declare function exportedSkills(manifest: AppSkillManifest): AppSkillManifestSkill[]; export declare function internalSkills(manifest: AppSkillManifest): AppSkillManifestSkill[]; export declare function parseAppSkillArgs(argv: string[]): ParsedAppSkillArgs; export declare function exportedSkillContentHash(manifestDir: string, skills: AppSkillManifestSkill[], manifest: AppSkillManifest): string; /** * Plugin version embeds a content hash of the exported skills + MCP server * identity/endpoint. * Codex keys its plugin cache on the version string, so a changed skill or MCP * URL yields a new version and `codex plugin marketplace upgrade` (which runs * on startup) delivers the update automatically — no manual semver bump per * edit. Claude Code uses commit-SHA versioning instead (plugin.json omits * version), so it auto-updates on every push. */ export declare function resolvePluginVersion(manifest: AppSkillManifest, manifestDir: string, skills: AppSkillManifestSkill[]): string; export interface AppSkillPackResult { outDir: string; exportedSkillNames: string[]; files: string[]; } export declare function buildAppSkillPack(loaded: LoadedAppSkillManifest, outDir: string): AppSkillPackResult; export declare function resolveLaunchPlan(loaded: LoadedAppSkillManifest, options?: LaunchAppSkillOptions): AppSkillLaunchPlan; export declare function ensureAppSkill(loaded: LoadedAppSkillManifest, options?: EnsureAppSkillOptions): Promise; export declare function launchAppSkill(loaded: LoadedAppSkillManifest, options?: LaunchAppSkillOptions): Promise; export declare function runAppSkill(argv: string[]): Promise; //# sourceMappingURL=app-skill.d.ts.map