pixelagent 0.1.19 → 0.1.20

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.
Files changed (2) hide show
  1. package/bin/pixelagent.js +21 -3
  2. package/package.json +2 -3
package/bin/pixelagent.js CHANGED
@@ -1,6 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Shim so `npx pixelagent setup` works from the main `pixelagent` package.
4
- * Implementation lives in @pixelagent/cli.
3
+ * `npx pixelagent setup` entry point.
4
+ *
5
+ * The setup logic lives in @pixelagent/cli, which is intentionally NOT a
6
+ * dependency of this package. The React component must stay lean — pulling
7
+ * the CLI in as a dependency would drag the MCP server + Babel toolchain
8
+ * into every consumer's node_modules, even for annotate-only users.
9
+ * Instead we fetch the CLI on demand via npx, so MCP tooling is only
10
+ * installed when someone actually runs setup.
5
11
  */
6
- import '@pixelagent/cli/dist/index.js';
12
+ import { spawn } from 'node:child_process';
13
+
14
+ const child = spawn('npx', ['-y', '@pixelagent/cli', ...process.argv.slice(2)], {
15
+ stdio: 'inherit',
16
+ shell: process.platform === 'win32',
17
+ });
18
+
19
+ child.on('error', (err) => {
20
+ console.error('Failed to launch @pixelagent/cli via npx:', err.message);
21
+ process.exit(1);
22
+ });
23
+
24
+ child.on('exit', (code) => process.exit(code ?? 0));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelagent",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "Live DOM layer for vibe coders — annotate and edit running React apps",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -48,8 +48,7 @@
48
48
  "react-dom": ">=17.0.0"
49
49
  },
50
50
  "dependencies": {
51
- "@pixelagent/cli": "0.1.19",
52
- "@pixelagent/shared": "0.1.19"
51
+ "@pixelagent/shared": "0.1.20"
53
52
  },
54
53
  "devDependencies": {
55
54
  "@types/react": "^19.1.8",