insta 0.0.10 → 0.0.11

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.
@@ -7,11 +7,41 @@
7
7
  // project doubles as its stack manifest — that install happens on `project create|link`.
8
8
  import { spawn } from 'node:child_process';
9
9
  import { info } from '../util.js';
10
+ // The skills tool reports agents that don't support user-global installs (Eve, PromptScript, …)
11
+ // as red failures. That's expected reality, not a problem with THIS machine — showing red in the
12
+ // first 30s of onboarding erodes trust (Railway's installer reads all-green for a reason).
13
+ // Classify each output line: drop that expected noise, keep everything real.
14
+ export function classifyInstallLine(line) {
15
+ if (/does not support global skill installation/.test(line))
16
+ return 'skip';
17
+ if (/Failed to install \d+/.test(line))
18
+ return 'skip';
19
+ return 'keep';
20
+ }
10
21
  const defaultRunner = (cmd, args) => new Promise((resolve) => {
11
- const env = { ...process.env, AI_AGENT: process.env.AI_AGENT || 'insta' };
12
- const p = spawn(cmd, args, { stdio: 'inherit', env });
22
+ const env = { ...process.env, AI_AGENT: process.env.AI_AGENT || 'insta', FORCE_COLOR: '1' };
23
+ const p = spawn(cmd, args, { stdio: ['inherit', 'pipe', 'pipe'], env });
24
+ let skipped = 0;
25
+ const sift = (chunk) => {
26
+ for (const line of chunk.toString().split('\n')) {
27
+ // strip ANSI before classifying; print the original line to preserve the tool's styling
28
+ const plain = line.replace(/\x1b\[[0-9;]*m/g, '');
29
+ if (classifyInstallLine(plain) === 'skip') {
30
+ skipped++;
31
+ continue;
32
+ }
33
+ if (line.trim())
34
+ process.stdout.write(line + '\n');
35
+ }
36
+ };
37
+ p.stdout?.on('data', sift);
38
+ p.stderr?.on('data', sift);
13
39
  p.on('error', () => resolve({ ok: false }));
14
- p.on('close', (code) => resolve({ ok: code === 0 }));
40
+ p.on('close', (code) => {
41
+ if (skipped)
42
+ info(` (skipped ${skipped >= 3 ? 'some' : skipped} agent targets that don't support user-global installs — expected)`);
43
+ resolve({ ok: code === 0 });
44
+ });
15
45
  });
16
46
  // -g = user-level (machine-global); -a '*' = every agent dir the skills tool supports
17
47
  // (Claude Code, Codex, Cursor, OpenCode, Copilot, …); --copy = real files, not cache symlinks.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "insta",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "type": "module",
5
5
  "description": "InstaCloud CLI — a thin client of the platform control-plane API.",
6
6
  "keywords": [