@vibetonomy/agent 1.6.4 → 1.6.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/bin/launch.js +35 -4
- package/package.json +6 -6
package/bin/launch.js
CHANGED
|
@@ -22,6 +22,40 @@ const PLATFORMS = {
|
|
|
22
22
|
"win32-x64": "@vibetonomy/agent-win-x64",
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
+
// When launched via `npx`, this file lives in ~/.npm/_npx/<hash>/node_modules/...
|
|
26
|
+
// npx reuses that directory across releases and upgrades it in place. npm can
|
|
27
|
+
// then rewrite the cache's package-lock.json with a bare `{ "optional": true }`
|
|
28
|
+
// entry for the platform package — no version, no resolved URL — and skip
|
|
29
|
+
// installing it, on this and every later run. `npm install <pkg>` from the
|
|
30
|
+
// user's cwd cannot repair that; deleting the cache directory does.
|
|
31
|
+
function npxCacheDir(dir) {
|
|
32
|
+
const match = /^(.*[\\/]_npx[\\/][^\\/]+)[\\/]/.exec(dir);
|
|
33
|
+
return match ? match[1] : null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function missingPlatformPackageMessage(pkg) {
|
|
37
|
+
const cacheDir = npxCacheDir(__dirname);
|
|
38
|
+
if (cacheDir) {
|
|
39
|
+
const rm =
|
|
40
|
+
process.platform === "win32"
|
|
41
|
+
? `rmdir /s /q "${cacheDir}"`
|
|
42
|
+
: `rm -rf "${cacheDir}"`;
|
|
43
|
+
return (
|
|
44
|
+
`Platform package ${pkg} is missing from the npx cache.\n` +
|
|
45
|
+
`This happens when npx upgrades a cached install in place and npm drops\n` +
|
|
46
|
+
`the platform-specific optional dependency.\n\n` +
|
|
47
|
+
`Delete the cache and run the same npx command again:\n` +
|
|
48
|
+
` ${rm}`
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
return (
|
|
52
|
+
`Platform package ${pkg} is not installed.\n` +
|
|
53
|
+
`Optional dependencies may have been skipped (--omit=optional) or dropped\n` +
|
|
54
|
+
`during an upgrade. Reinstall @vibetonomy/agent with optional dependencies,\n` +
|
|
55
|
+
`or try: npm install ${pkg}`
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
25
59
|
function getBinaryPath() {
|
|
26
60
|
const key = `${process.platform}-${process.arch}`;
|
|
27
61
|
const pkg = PLATFORMS[key];
|
|
@@ -40,10 +74,7 @@ function getBinaryPath() {
|
|
|
40
74
|
const pkgJson = require.resolve(`${pkg}/package.json`);
|
|
41
75
|
pkgDir = dirname(pkgJson);
|
|
42
76
|
} catch {
|
|
43
|
-
console.error(
|
|
44
|
-
`Platform package ${pkg} is not installed.\n` +
|
|
45
|
-
`Try: npm install ${pkg}`,
|
|
46
|
-
);
|
|
77
|
+
console.error(missingPlatformPackageMessage(pkg));
|
|
47
78
|
process.exit(1);
|
|
48
79
|
}
|
|
49
80
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibetonomy/agent",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
4
4
|
"description": "Vibetonomy agent — managed Claude Code sessions via npx",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"@anthropic-ai/claude-agent-sdk": "0.3.285"
|
|
16
16
|
},
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"@vibetonomy/agent-linux-x64": "1.6.
|
|
19
|
-
"@vibetonomy/agent-linux-arm64": "1.6.
|
|
20
|
-
"@vibetonomy/agent-darwin-arm64": "1.6.
|
|
21
|
-
"@vibetonomy/agent-darwin-x64": "1.6.
|
|
22
|
-
"@vibetonomy/agent-win-x64": "1.6.
|
|
18
|
+
"@vibetonomy/agent-linux-x64": "1.6.5",
|
|
19
|
+
"@vibetonomy/agent-linux-arm64": "1.6.5",
|
|
20
|
+
"@vibetonomy/agent-darwin-arm64": "1.6.5",
|
|
21
|
+
"@vibetonomy/agent-darwin-x64": "1.6.5",
|
|
22
|
+
"@vibetonomy/agent-win-x64": "1.6.5"
|
|
23
23
|
},
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=18.0.0"
|