autopilot-code 0.0.18 → 0.0.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.
package/dist/cli.js CHANGED
@@ -158,6 +158,8 @@ function generateSystemdUnit(logPath, intervalSeconds, useSystem) {
158
158
  ];
159
159
  const user = process.env.USER || "root";
160
160
  const home = process.env.HOME || "/root";
161
+ // Include current PATH so systemd can find nvm-installed binaries like opencode
162
+ const currentPath = process.env.PATH || "/usr/bin:/bin";
161
163
  return `[Unit]
162
164
  Description=Autopilot automated issue runner
163
165
  After=network.target
@@ -173,6 +175,8 @@ StandardError=journal
173
175
  SyslogIdentifier=autopilot
174
176
  ${useSystem ? `User=${user}` : ""}
175
177
  Environment="NODE_ENV=production"
178
+ Environment="PATH=${currentPath}"
179
+ Environment="HOME=${home}"
176
180
 
177
181
  [Install]
178
182
  WantedBy=${useSystem ? "multi-user.target" : "default.target"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autopilot-code",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "private": false,
5
5
  "description": "Repo-issue–driven autopilot runner",
6
6
  "license": "MIT",
@@ -738,9 +738,12 @@ def run_cycle(
738
738
 
739
739
  # If agent==opencode, delegate to bash script
740
740
  if cfg.agent == "opencode":
741
+ # Script is in the same directory as this Python file
742
+ script_dir = Path(__file__).parent
743
+ script_path = script_dir / "run_opencode_issue.sh"
741
744
  sh(
742
745
  [
743
- "/home/kellye/clawd/repos/autopilot/scripts/run_opencode_issue.sh",
746
+ str(script_path),
744
747
  str(cfg.root),
745
748
  str(issue["number"]),
746
749
  ]