opencode-supertask 0.1.36 → 0.1.37

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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable user-facing changes are recorded here. This project follows semantic versioning while it is in the `0.x` development series.
4
4
 
5
+ ## [0.1.37] - 2026-07-18
6
+
7
+ ### Fixed
8
+
9
+ - Gateway-managed OpenCode runs now set `PWD` to the task working directory, preventing OpenCode server errors when PM2's saved `PWD` differs from the task's `cwd`.
10
+
11
+ [0.1.37]: https://github.com/vbgate/opencode-supertask/compare/v0.1.36...v0.1.37
12
+
5
13
  ## [0.1.36] - 2026-07-18
6
14
 
7
15
  ### Added
package/dist/cli/index.js CHANGED
@@ -22909,6 +22909,7 @@ var init_worker = __esm({
22909
22909
  const args = ["run", "--agent", task.agent, "--format", "json"];
22910
22910
  if (model) args.push("-m", model);
22911
22911
  args.push(task.prompt);
22912
+ const cwd = task.cwd || process.cwd();
22912
22913
  const child = spawn(process.execPath, [
22913
22914
  this.launcherEntry(),
22914
22915
  LAUNCH_IDENTITY_ARGUMENT,
@@ -22916,9 +22917,10 @@ var init_worker = __esm({
22916
22917
  this.opencodeBin,
22917
22918
  ...args
22918
22919
  ], {
22919
- cwd: task.cwd || process.cwd(),
22920
+ cwd,
22920
22921
  env: {
22921
22922
  ...process.env,
22923
+ PWD: cwd,
22922
22924
  [MANAGED_RUN_ENV]: MANAGED_RUN_ENV_VALUE
22923
22925
  },
22924
22926
  stdio: ["pipe", "pipe", "pipe", "ipc"],
@@ -22929,7 +22931,7 @@ var init_worker = __esm({
22929
22931
  runId,
22930
22932
  launchIdentity,
22931
22933
  child,
22932
- commandContext: runCommandContext(this.opencodeBin, args, task.cwd || process.cwd()),
22934
+ commandContext: runCommandContext(this.opencodeBin, args, cwd),
22933
22935
  output: "",
22934
22936
  sessionId: null,
22935
22937
  timeoutTimer: null,