Lines 3-43javascript
3 return (mod && mod.__esModule) ? mod : { "default": mod };
5Object.defineProperty(exports, "__esModule", { value: true });
6exports.shellQuoteArg = shellQuoteArg;
7exports.parseEnvFile = parseEnvFile;
8exports.assembleEnv = assembleEnv;
9exports.skillRunWithConfig = skillRunWithConfig;
10exports.skillRun = skillRun;
12 * solidactions skill run <dir> [--crew <c>] [--environment <env>] [--env-file <f>] -- <command...>
14 * Local analogue of the crews MCP exec_skill: runs <command> with cwd=<dir>
15 * (matching the sandbox's cwd=/work/skills/<slug>), with crew variables
16 * fetched at runtime from /api/v1/crews/{id}/variables/resolve. Secrets are
17 * included only when the API key holds env:reveal; skipped names are printed.
18 * DELIBERATE DIVERGENCE from remote exec_skill: default environment is `dev`
19 * (this is a dev tool); remote defaults to production. Always prints the env.
21const fs_1 = __importDefault(require("fs"));
22const os_1 = __importDefault(require("os"));
23const path_1 = __importDefault(require("path"));
24const child_process_1 = require("child_process");
25const axios_1 = __importDefault(require("axios"));
HighChild Process
Package source references child process execution.
dist/commands/skill-run.jsView on unpkg · L23 26const chalk_1 = __importDefault(require("chalk"));
27const js_yaml_1 = __importDefault(require("js-yaml"));
28const api_1 = require("../utils/api");
29const crew_1 = require("../utils/crew");
30const RESERVED_KEYS = ['WORKFLOW_INPUT', 'WORKFLOW_INPUT_URL', 'STEPS_TRIGGER_ID', 'TENANT_ID', 'SA_PROXY_URL', 'SA_PROXY_TOKEN', 'WORKFLOW_SLUG', 'PATH', 'HOME'];
31const RESERVED_PREFIXES = ['SOLIDACTIONS_'];
32function isReservedEnvName(name) {
33 return RESERVED_KEYS.includes(name) || RESERVED_PREFIXES.some((p) => name.toUpperCase().startsWith(p));
36 * Single-quote a commander-parsed argument for re-injection into a shell
37 * command line. commander's `<command...>` variadic already split the
38 * user's invocation into discrete argv words (the outer shell did any
39 * quote-stripping); joining those words back together with bare spaces and
40 * handing them to `sh -c` would let the inner shell reinterpret any
41 * metacharacters they contain (spaces, quotes, parens, `&&`, ...). Quoting
42 * each word individually keeps it intact as a single shell token, while
43 * still letting `shell: true` run multi-word commands.