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