insta 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ensure-skills.js +8 -1
- package/package.json +1 -1
package/dist/ensure-skills.js
CHANGED
|
@@ -11,8 +11,15 @@ import { join } from 'node:path';
|
|
|
11
11
|
// Codex → .agents/skills/ (.github/skills/ is the third well-known dir). These are regenerable
|
|
12
12
|
// agent context, not the developer's source — keep them out of git.
|
|
13
13
|
const SKILL_DIRS = ['.claude/skills/', '.agents/skills/', '.github/skills/'];
|
|
14
|
+
// `skills` prints a full-screen ASCII banner at the top of every `add`, so our 4 invocations
|
|
15
|
+
// would stack 4 banners. It skips the banner when it detects an agent driving it rather than a
|
|
16
|
+
// human — AI_AGENT is its first-checked signal (any non-empty value ⇒ agent mode). Setting it is
|
|
17
|
+
// honest here (this IS programmatic, not an interactive prompt) and, because we already pin the
|
|
18
|
+
// agents/skills/-y, has no effect on the install beyond quieting the banner. Preserve a caller's
|
|
19
|
+
// existing AI_AGENT (e.g. running inside another agent) rather than clobbering it.
|
|
14
20
|
const defaultRunner = (cmd, args, inherit = false) => new Promise((resolve) => {
|
|
15
|
-
const
|
|
21
|
+
const env = { ...process.env, AI_AGENT: process.env.AI_AGENT || 'insta' };
|
|
22
|
+
const p = spawn(cmd, args, { stdio: inherit ? 'inherit' : 'ignore', env });
|
|
16
23
|
p.on('error', () => resolve({ ok: false })); // e.g. npx not on PATH
|
|
17
24
|
p.on('close', (code) => resolve({ ok: code === 0 }));
|
|
18
25
|
});
|
package/package.json
CHANGED