agent-worktree 0.5.3 → 0.5.4
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/install.js +13 -3
- package/package.json +5 -5
package/install.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
// ============================================================
|
|
2
|
-
// Postinstall: Verify Platform Package
|
|
2
|
+
// Postinstall: Verify Platform Package & Setup Shell Integration
|
|
3
3
|
// ============================================================
|
|
4
4
|
|
|
5
|
+
const { execFileSync } = require("child_process");
|
|
6
|
+
const { join } = require("path");
|
|
7
|
+
|
|
5
8
|
const PLATFORMS = {
|
|
6
9
|
"darwin-arm64": "@nekocode/agent-worktree-darwin-arm64",
|
|
7
10
|
"darwin-x64": "@nekocode/agent-worktree-darwin-x64",
|
|
@@ -18,12 +21,19 @@ if (!pkg) {
|
|
|
18
21
|
process.exit(0);
|
|
19
22
|
}
|
|
20
23
|
|
|
24
|
+
let pkgDir;
|
|
21
25
|
try {
|
|
22
|
-
require.resolve(`${pkg}/package.json`);
|
|
26
|
+
pkgDir = require.resolve(`${pkg}/package.json`);
|
|
23
27
|
} catch {
|
|
24
28
|
console.warn(`[agent-worktree] Warning: Platform package ${pkg} not installed`);
|
|
25
29
|
console.warn(`[agent-worktree] This may happen if npm failed to install optional dependencies`);
|
|
26
30
|
process.exit(0);
|
|
27
31
|
}
|
|
28
32
|
|
|
29
|
-
|
|
33
|
+
// Run 'wt setup' to install shell integration
|
|
34
|
+
const binaryPath = join(pkgDir, "..", "bin", "wt");
|
|
35
|
+
try {
|
|
36
|
+
execFileSync(binaryPath, ["setup"], { stdio: "inherit" });
|
|
37
|
+
} catch {
|
|
38
|
+
console.warn("[agent-worktree] Auto-setup failed. Run 'wt setup' manually.");
|
|
39
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-worktree",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Git worktree workflow tool for AI agents",
|
|
5
5
|
"keywords": ["cli", "git", "worktree", "ai", "agent"],
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"postinstall": "node install.js"
|
|
25
25
|
},
|
|
26
26
|
"optionalDependencies": {
|
|
27
|
-
"@nekocode/agent-worktree-darwin-arm64": "0.5.
|
|
28
|
-
"@nekocode/agent-worktree-darwin-x64": "0.5.
|
|
29
|
-
"@nekocode/agent-worktree-linux-x64": "0.5.
|
|
30
|
-
"@nekocode/agent-worktree-win32-x64": "0.5.
|
|
27
|
+
"@nekocode/agent-worktree-darwin-arm64": "0.5.4",
|
|
28
|
+
"@nekocode/agent-worktree-darwin-x64": "0.5.4",
|
|
29
|
+
"@nekocode/agent-worktree-linux-x64": "0.5.4",
|
|
30
|
+
"@nekocode/agent-worktree-win32-x64": "0.5.4"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
33
|
"node": ">=14"
|