/** * Wraps a discovered skill as a `ClawTool` so the leviathan loop can call it. * * The skill is invoked as a child process (`node `) and we capture * stdout/stderr. Skills that expose a CLI surface (Commander-style) accept a * sub-command + flags; we pass the raw `argv` array straight through. Output * is returned as { stdout, stderr, code } so the model can reason about it. */ import type { ClawTool } from '../agent/loop.js'; import type { LoadedSkill } from './registry.js'; export interface SkillCallArgs { /** Argv to pass after the skill bin (e.g. ["session-start", "myproj", "-d", "."]). */ argv: string[]; /** Working directory for the child process. Defaults to process.cwd(). */ cwd?: string; /** Override env. Merged on top of process.env. */ env?: Record; /** Hard kill after this many ms. Default: 10 minutes. */ timeoutMs?: number; } export interface SkillCallResult { stdout: string; stderr: string; code: number; } export declare function invokeSkill(skill: LoadedSkill, args: SkillCallArgs): Promise; export declare function skillToTool(skill: LoadedSkill): ClawTool; export declare function loadInstalledSkillTools(): ClawTool[];