opencode-supertask 0.1.8 → 0.1.10
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/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/gateway/index.js +2 -0
- package/dist/gateway/index.js.map +1 -1
- package/dist/plugin/supertask.js +7 -2
- package/dist/plugin/supertask.js.map +1 -1
- package/dist/web/index.js +2 -0
- package/dist/web/index.js.map +1 -1
- package/dist/worker/index.js +2 -0
- package/dist/worker/index.js.map +1 -1
- package/drizzle/0004_tiny_the_watchers.sql +30 -0
- package/drizzle/meta/0004_snapshot.json +479 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
package/dist/plugin/supertask.js
CHANGED
|
@@ -26739,6 +26739,8 @@ var tasks = sqliteTable("tasks", {
|
|
|
26739
26739
|
// 任务分组与依赖
|
|
26740
26740
|
batchId: text("batch_id"),
|
|
26741
26741
|
dependsOn: integer2("depends_on"),
|
|
26742
|
+
// OpenCode Session
|
|
26743
|
+
sessionId: text("session_id"),
|
|
26742
26744
|
// 状态
|
|
26743
26745
|
status: text("status").default("pending"),
|
|
26744
26746
|
// 时间戳(老字段保持秒级 timestamp)
|
|
@@ -27481,9 +27483,11 @@ var SuperTaskPlugin = async () => {
|
|
|
27481
27483
|
"(\u5DF2\u5E9F\u5F03) \u5DE5\u4F5C\u76EE\u5F55\u3002\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u8BB0\u5F55\u63D0\u4EA4\u4EFB\u52A1\u65F6\u7684 opencode run \u542F\u52A8\u76EE\u5F55\u3002"
|
|
27482
27484
|
)
|
|
27483
27485
|
},
|
|
27484
|
-
async execute(args) {
|
|
27486
|
+
async execute(args, ctx) {
|
|
27485
27487
|
try {
|
|
27486
27488
|
const submitCwd = process.cwd();
|
|
27489
|
+
console.log("[supertask] ctx keys:", Object.keys(ctx ?? {}));
|
|
27490
|
+
console.log("[supertask] sessionID:", ctx?.sessionID);
|
|
27487
27491
|
const task = await TaskService.add({
|
|
27488
27492
|
name: args.name,
|
|
27489
27493
|
agent: args.agent,
|
|
@@ -27494,7 +27498,8 @@ var SuperTaskPlugin = async () => {
|
|
|
27494
27498
|
urgency: args.urgency ?? 3,
|
|
27495
27499
|
batchId: args.batchId,
|
|
27496
27500
|
dependsOn: args.dependsOn,
|
|
27497
|
-
cwd: submitCwd
|
|
27501
|
+
cwd: submitCwd,
|
|
27502
|
+
sessionId: ctx.sessionID
|
|
27498
27503
|
});
|
|
27499
27504
|
return JSON.stringify({ id: task.id, status: "created" });
|
|
27500
27505
|
} catch (error45) {
|