UNPKG

aiwg

Version:

Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo

46 lines 1.9 kB
/** * `aiwg run skill <name>` — execute a script-bearing skill (#1227). * * Resolves the skill via the artifact index (the same one `aiwg discover` * and `aiwg show` use), reads its `script:` declaration, and dispatches * the entrypoint through the runtime registry. * * Critical CWD invariant: by default, the script runs from the CALLING * project's root, not the skill's source directory. Skill scripts live * at `$AIWG_ROOT/agentic/code/...` but operate on the user's project, so * relative paths inside the script (`.aiwg/`, `src/`, `package.json`) * must resolve into the user's tree. The manifest can override via * `cwd: skill-dir` for the rare case of a script that bundles its own * relative assets, or `cwd: aiwg-root` as an escape hatch. * * Env vars exported to the script: * AIWG_SKILL_DIR absolute path to the skill's source directory * AIWG_PROJECT_ROOT absolute path to the calling project's root * AIWG_ROOT absolute path to the AIWG install root * * Stdin streams in, stdout/stderr stream out, the script's exit code is * the CLI's exit code. No magic wrapping. */ export interface RunSkillOptions { cwd: string; name: string; args: string[]; /** Override the script's CWD policy from the CLI (e.g., --cwd <path>) */ cwdOverride?: string; } /** * Run a skill's script entrypoint. Returns the exit code; the caller * decides whether to `process.exit()` with it. */ export declare function runSkill(opts: RunSkillOptions): Promise<number>; /** * CLI entrypoint for `aiwg run skill <name> [-- args...]`. * * Argument convention: * aiwg run skill <name> [--cwd <path>] [-- <args forwarded to script>] * * Anything after `--` is verbatim-forwarded. If no `--`, all args after * the skill name are forwarded. */ export declare function main(args: string[]): Promise<number>; //# sourceMappingURL=run.d.ts.map