import type { Skill } from "./skill-contract.js"; export type SkillInstallSpec = { id?: string; kind: "brew" | "node" | "go" | "uv" | "download"; label?: string; bins?: string[]; os?: string[]; formula?: string; package?: string; module?: string; url?: string; archive?: string; extract?: boolean; stripComponents?: number; targetDir?: string; }; export type OpenClawSkillMetadata = { always?: boolean; skillKey?: string; primaryEnv?: string; emoji?: string; homepage?: string; os?: string[]; requires?: { bins?: string[]; anyBins?: string[]; env?: string[]; config?: string[]; }; install?: SkillInstallSpec[]; }; export type SkillInvocationPolicy = { userInvocable: boolean; disableModelInvocation: boolean; }; export type SkillCommandDispatchSpec = { kind: "tool"; /** Name of the tool to invoke (AnyAgentTool.name). */ toolName: string; /** * How to forward user-provided args to the tool. * - raw: forward the raw args string (no core parsing). */ argMode?: "raw"; }; export type SkillCommandSpec = { name: string; skillName: string; description: string; /** Localized descriptions for native command surfaces that support them. */ descriptionLocalizations?: Record; /** Optional deterministic dispatch behavior for this command. */ dispatch?: SkillCommandDispatchSpec; /** Native prompt template used by Claude-bundle command markdown files. */ promptTemplate?: string; /** Source markdown path for bundle-backed commands. */ sourceFilePath?: string; }; export type SkillsInstallPreferences = { preferBrew: boolean; nodeManager: "npm" | "pnpm" | "yarn" | "bun"; }; export type ParsedSkillFrontmatter = Record; export type SkillExposure = { includeInRuntimeRegistry: boolean; includeInAvailableSkillsPrompt: boolean; userInvocable: boolean; }; export type SkillEntry = { skill: Skill; frontmatter: ParsedSkillFrontmatter; metadata?: OpenClawSkillMetadata; invocation?: SkillInvocationPolicy; exposure?: SkillExposure; }; export type SkillEligibilityContext = { remote?: { platforms: string[]; hasBin: (bin: string) => boolean; hasAnyBin: (bins: string[]) => boolean; note?: string; }; }; export type SkillSnapshot = { prompt: string; skills: Array<{ name: string; primaryEnv?: string; requiredEnv?: string[]; }>; /** Normalized agent-level filter used to build this snapshot; undefined means unrestricted. */ skillFilter?: string[]; resolvedSkills?: Skill[]; version?: number; };