infinicode 2.8.57 → 2.8.58

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.
@@ -35,7 +35,22 @@ export async function performSelfUpdate(opts = {}) {
35
35
  try {
36
36
  // Use npm.cmd on Windows so we never need a shell (no injection surface).
37
37
  const bin = process.platform === 'win32' ? 'npm.cmd' : 'npm';
38
- const res = await execa(bin, ['install', '-g', spec], { all: true, timeout: 300_000 });
38
+ const args = ['install', '-g', spec];
39
+ let res;
40
+ try {
41
+ res = await execa(bin, args, { all: true, timeout: 300_000 });
42
+ }
43
+ catch (err) {
44
+ const message = String(err.all ?? err.message ?? err);
45
+ const unprivileged = process.platform !== 'win32' && process.getuid?.() !== 0;
46
+ if (!unprivileged || !/\bEACCES\b|permission denied/i.test(message))
47
+ throw err;
48
+ // RoboPark systemd services normally run as root. This fallback also
49
+ // supports an operator-launched satellite when sudo is intentionally
50
+ // configured non-interactively; it never prompts or shells out.
51
+ info('[update] global npm directory is root-owned; retrying with sudo -n…');
52
+ res = await execa('sudo', ['-n', bin, ...args], { all: true, timeout: 300_000 });
53
+ }
39
54
  const tail = String(res.all ?? res.stdout ?? '').split('\n').filter(Boolean).slice(-2).join(' ').trim();
40
55
  info(`[update] installed ${spec}${tail ? ' — ' + tail : ''}`);
41
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "infinicode",
3
- "version": "2.8.57",
3
+ "version": "2.8.58",
4
4
  "description": "OpenKernel — provider-agnostic AI execution kernel. Native coding agent + mission-driven execution runtime.",
5
5
  "type": "module",
6
6
  "main": "./dist/kernel/index.js",
@@ -74,7 +74,6 @@
74
74
  "node": ">=20"
75
75
  },
76
76
  "dependencies": {
77
- "@anthropic-ai/claude-code": "^2.1.207",
78
77
  "@modelcontextprotocol/sdk": "^1.29.0",
79
78
  "chalk": "^5.3.0",
80
79
  "commander": "^12.1.0",