autopilot-code 0.0.23 → 0.0.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autopilot-code",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "private": false,
5
5
  "description": "Repo-issue–driven autopilot runner",
6
6
  "license": "MIT",
@@ -13,6 +13,12 @@ if (process.env.CI || process.env.GITHUB_ACTIONS) {
13
13
  process.exit(0);
14
14
  }
15
15
 
16
+ // Skip if running in an autopilot worktree (prevents killing the running service)
17
+ if (process.cwd().includes('/tmp/autopilot-issue-') || process.env.AUTOPILOT_WORKTREE) {
18
+ console.log('Autopilot: skipping auto-install (running in worktree).');
19
+ process.exit(0);
20
+ }
21
+
16
22
  const cliPath = path.join(__dirname, '..', 'dist', 'cli.js');
17
23
 
18
24
  if (!fs.existsSync(cliPath)) {
@@ -91,6 +91,12 @@ else
91
91
  fi
92
92
  fi
93
93
 
94
+ # 1.5. Install dependencies if package.json exists (for Node.js projects)
95
+ if [[ -f "$WORKTREE/package.json" ]]; then
96
+ echo "[run_opencode_issue.sh] Installing npm dependencies..."
97
+ (cd "$WORKTREE" && npm install --silent) || true
98
+ fi
99
+
94
100
  # 2. Fetch issue title/body
95
101
  ISSUE_JSON=$(gh issue view "$ISSUE_NUMBER" --repo "$REPO" --json title,body)
96
102
  if command -v jq >/dev/null 2>&1; then