opencode-supertask 0.1.40 → 0.1.41

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,23 @@
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.41] - 2026-07-19
6
+
7
+ ### Added
8
+
9
+ - Release gates now cover source and test typechecking, lint, coverage, Chromium interaction smoke, native macOS verification, minimum-Bun representative tests, and isolated installation of the packed npm artifact; the MIT license text is included in the package.
10
+
11
+ ### Fixed
12
+
13
+ - Worker task selection and the `running` transition are now one immediate transaction, preventing concurrent edits from changing a claimed task or bypassing batch serialization.
14
+ - Lowering an exhausted retry budget now recursively closes blocked dependents in the same transaction.
15
+ - Dashboard requests now require a loopback Host, and PM2/systemd diagnostics run asynchronously in a bounded helper process instead of blocking the Gateway event loop.
16
+ - Transient run-settlement failures retain ownership and the known exit outcome, retry quickly and then at a low frequency while the Gateway remains alive, and hand the run to Watchdog only during shutdown.
17
+ - OS process inspection remains bounded on Bun 1.1.45, fails closed on timeout or output overflow, and cleans up its managed Unix process group without leaking descendants or risking reused process-group IDs.
18
+ - npm releases now install-test and publish the exact same retained tarball instead of repacking after verification.
19
+
20
+ [0.1.41]: https://github.com/vbgate/opencode-supertask/compare/v0.1.40...v0.1.41
21
+
5
22
  ## [0.1.40] - 2026-07-19
6
23
 
7
24
  ### Added
@@ -94,7 +111,7 @@ This release contains the full 0.1.32 change set plus a deterministic database-r
94
111
 
95
112
  - Pinned plugin installation and Gateway launch to one exact npm version, rejecting stale floating `@latest` / `@next` cache entries and invalid file-as-directory working paths.
96
113
  - Recorded and validated task working directories before queueing so Gateway-launched OpenCode runs execute in the submitting project.
97
- - Hardened launcher/Worker IPC with a per-run guardian token and bidirectional drain proof; unknown or still-live process trees remain quarantined instead of being settled or retried unsafely.
114
+ - Hardened launcher/Worker IPC with a per-run guardian token and bidirectional drain proof; unknown or still-live managed process groups remain quarantined instead of being settled or retried unsafely.
98
115
  - Made database clear/restore backup-first, transactional, WAL-consistent, schema-compatible across expand-only N/N-1 releases, and safe against concurrent successful writes.
99
116
  - Hardened PM2 replacement, rollback, lifecycle locking, kill timeouts, macOS restart supervision, and Bun 1.1.45 IPC compatibility.
100
117
 
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 javazys
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -36,7 +36,7 @@ SuperTask is not another wrapper around cron. Scheduled work becomes an ordinary
36
36
  | Automatic recovery | Retry budgets, exponential backoff, dead-letter state, and manual retry |
37
37
  | Controlled execution | Global concurrency, priority ordering, dependencies, and global batch serialization |
38
38
  | Project awareness | Each task keeps its OpenCode project directory, Agent, model, and optional model variant |
39
- | Safe process handling | Cancel and shutdown wait for the managed OpenCode process tree to stop |
39
+ | Safe process handling | Cancel and shutdown wait for the managed OpenCode Unix process group to drain |
40
40
  | Observable runs | Session ID, exact reproducible command, model output, tools, errors, and raw JSONL |
41
41
  | Local Dashboard | Create, schedule, inspect, retry, cancel, and diagnose from `127.0.0.1` |
42
42
 
@@ -162,8 +162,10 @@ The project picker reads the selected directory's real `opencode agent list` and
162
162
  ## Reliability Without Hand-Waving
163
163
 
164
164
  - SQLite `BEGIN IMMEDIATE` protects the single-Gateway lock and global batch serialization.
165
+ - Candidate selection and the `running` transition happen in one immediate transaction, so concurrent edits cannot alter a claimed task.
165
166
  - Each managed run has a unique launcher identity and an isolated Unix process group.
166
167
  - A run settles only after the launcher proves the entire process group drained.
168
+ - Process containment ends at that group: descendants that deliberately call `setsid()` or start as detached daemons must manage their own lifecycle.
167
169
  - Shutdown and cancellation fail closed when process ownership cannot be proven.
168
170
  - `supertask doctor` verifies OpenCode, the effective pinned plugin, cache, CLI, Gateway package, ready lock, SQLite, Dashboard, and PM2 environment.
169
171
  - Database clear and restore are transactional, backup-first, WAL-consistent, and reject active work.
@@ -188,7 +190,7 @@ When every component already matches npm `latest`, normal upgrade is a no-op and
188
190
  - Node.js/npm for the documented install and upgrade flow
189
191
  - macOS or Linux for Gateway task execution
190
192
 
191
- Windows Worker execution remains disabled until OS Job Object containment can guarantee safe process-tree cancellation. Queue execution does not require PM2 when the Gateway runs in the foreground.
193
+ Windows Worker execution remains disabled until OS Job Object containment can provide equivalent managed-process isolation and a recoverable drain proof. Queue execution does not require PM2 when the Gateway runs in the foreground.
192
194
 
193
195
  ## Install From Source
194
196
 
@@ -233,10 +235,15 @@ Then restart OpenCode and run `bun run gateway` from the repository.
233
235
  bun install --frozen-lockfile
234
236
  bun test
235
237
  bun run typecheck
238
+ bun run typecheck:tests
239
+ bun run lint
240
+ bun run test:coverage
241
+ bun run test:browser
236
242
  bun run build
243
+ bun run package:smoke
237
244
  ```
238
245
 
239
- CI also runs the built launcher IPC smoke test on the minimum supported Bun version.
246
+ CI runs the suite on Linux and macOS, exercises the real Dashboard in Chromium, installs the packed npm artifact, and runs representative built-product tests on the minimum supported Bun version.
240
247
 
241
248
  ## License
242
249
 
package/README.zh-CN.md CHANGED
@@ -36,7 +36,7 @@ SuperTask 不是给 cron 套一层壳。定时器生成的也是普通持久任
36
36
  | 自动恢复 | 重试预算、指数退避、停止重试状态和人工恢复 |
37
37
  | 可控执行 | 全局并发、优先级、依赖关系和全局同批次串行 |
38
38
  | 项目感知 | 每个任务保留 OpenCode 项目目录、Agent、模型和可选模型 variant |
39
- | 安全进程管理 | 取消或停机时等待整棵 OpenCode 进程树退出 |
39
+ | 安全进程管理 | 取消或停机时等待受管 OpenCode Unix 进程组排空 |
40
40
  | 可观测执行 | Session、真实命令、模型输出、工具、错误和原始 JSONL |
41
41
  | 本地控制台 | 在 `127.0.0.1` 创建、定时、查看、重试、取消和诊断 |
42
42
 
@@ -162,8 +162,10 @@ supertask cancel --id 42
162
162
  ## 可靠不是一句口号
163
163
 
164
164
  - SQLite `BEGIN IMMEDIATE` 保护单 Gateway 锁和全局批次串行。
165
+ - 候选筛选与 `running` 转换在同一个即时事务完成,并发编辑无法改写已经抢占的任务。
165
166
  - 每次执行都有唯一 launcher 身份和独立 Unix 进程组。
166
167
  - launcher 证明整组进程排空后,任务才会结算。
168
+ - 进程隔离边界止于该组;主动调用 `setsid()` 或以 detached daemon 方式离组的后代必须自行管理生命周期。
167
169
  - 无法证明进程归属时,取消和停机保持保守,不误杀、不重复跑。
168
170
  - `supertask doctor` 检查 OpenCode、精确插件、缓存、CLI、Gateway 包、ready 锁、SQLite、Dashboard 和 PM2 环境。
169
171
  - 数据库清空和恢复采用事务、先备份、包含 WAL 一致数据,并拒绝运行中任务。
@@ -188,7 +190,7 @@ supertask doctor --smoke --smoke-agent build --smoke-model provider/model --smok
188
190
  - 按本文方式安装和升级需要 Node.js/npm
189
191
  - Gateway 任务执行当前支持 macOS 和 Linux
190
192
 
191
- Windows Worker 在具备 Job Object 进程树隔离前保持禁用。前台运行 Gateway 时不依赖 PM2。
193
+ Windows Worker Job Object 能提供等价的受管进程隔离与可恢复排空证明前保持禁用。前台运行 Gateway 时不依赖 PM2。
192
194
 
193
195
  ## 从源码安装
194
196
 
@@ -233,10 +235,15 @@ bun run build
233
235
  bun install --frozen-lockfile
234
236
  bun test
235
237
  bun run typecheck
238
+ bun run typecheck:tests
239
+ bun run lint
240
+ bun run test:coverage
241
+ bun run test:browser
236
242
  bun run build
243
+ bun run package:smoke
237
244
  ```
238
245
 
239
- CI 还会使用最低支持 Bun 版本执行构建后 launcher IPC 冒烟测试。
246
+ CI Linux macOS 运行测试,用真实 Chromium 执行 Dashboard 冒烟验证,隔离安装 npm 打包产物,并在最低支持 Bun 版本运行代表性的构建产物测试。
240
247
 
241
248
  ## 许可证
242
249