opencode-supertask 0.1.12 → 0.1.13
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 +5 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/gateway/index.js +5 -7
- package/dist/gateway/index.js.map +1 -1
- package/dist/web/index.js +2 -5
- package/dist/web/index.js.map +1 -1
- package/dist/worker/index.d.ts +0 -1
- package/dist/worker/index.js +3 -2
- package/dist/worker/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -19093,8 +19093,7 @@ var init_config = __esm({
|
|
|
19093
19093
|
maxConcurrency: 2,
|
|
19094
19094
|
pollIntervalMs: 1e3,
|
|
19095
19095
|
heartbeatIntervalMs: 3e4,
|
|
19096
|
-
taskTimeoutMs: 18e5
|
|
19097
|
-
defaultModel: "zhipuai-coding-plan/glm-4.7"
|
|
19096
|
+
taskTimeoutMs: 18e5
|
|
19098
19097
|
},
|
|
19099
19098
|
scheduler: {
|
|
19100
19099
|
enabled: true,
|
|
@@ -19306,7 +19305,8 @@ var init_worker = __esm({
|
|
|
19306
19305
|
status: "running"
|
|
19307
19306
|
});
|
|
19308
19307
|
const modelToUse = this.resolveModel(task.model);
|
|
19309
|
-
const
|
|
19308
|
+
const modelArg = modelToUse ? ` -m "${modelToUse}"` : "";
|
|
19309
|
+
const cmd = `opencode run --agent supertask-runner${modelArg} --format json "\u6267\u884C\u4EFB\u52A1 ID: ${task.id}${modelToUse ? ` OVERRIDE_MODEL=${modelToUse}` : ""}"`;
|
|
19310
19310
|
const cwd = task.cwd || process.cwd();
|
|
19311
19311
|
const child = spawn("sh", ["-c", cmd], { cwd, stdio: ["inherit", "pipe", "pipe"] });
|
|
19312
19312
|
await TaskRunService.updatePid(run.id, process.pid, child.pid ?? 0);
|
|
@@ -19408,7 +19408,7 @@ var init_worker = __esm({
|
|
|
19408
19408
|
});
|
|
19409
19409
|
}
|
|
19410
19410
|
resolveModel(taskModel) {
|
|
19411
|
-
if (!taskModel || taskModel === "default") return
|
|
19411
|
+
if (!taskModel || taskModel === "default") return null;
|
|
19412
19412
|
return taskModel;
|
|
19413
19413
|
}
|
|
19414
19414
|
};
|
|
@@ -22140,13 +22140,12 @@ async function clearDatabase(){
|
|
|
22140
22140
|
|
|
22141
22141
|
async function saveConfig(){
|
|
22142
22142
|
const form=document.getElementById('config-form');
|
|
22143
|
-
|
|
22143
|
+
const data={
|
|
22144
22144
|
worker:{
|
|
22145
22145
|
maxConcurrency:Number(form.mc.value),
|
|
22146
22146
|
pollIntervalMs:Number(form.pi.value),
|
|
22147
22147
|
heartbeatIntervalMs:Number(form.hi.value)*1000,
|
|
22148
22148
|
taskTimeoutMs:Number(form.to.value)*60000,
|
|
22149
|
-
defaultModel:form.dm.value,
|
|
22150
22149
|
},
|
|
22151
22150
|
scheduler:{
|
|
22152
22151
|
enabled:form.se.checked,
|
|
@@ -22490,7 +22489,6 @@ var init_web = __esm({
|
|
|
22490
22489
|
<div class="form-row"><label>\u8F6E\u8BE2\u95F4\u9694(ms)</label><input type="number" name="pi" value="${config.worker.pollIntervalMs}" min="100" style="width:100px"></div>
|
|
22491
22490
|
<div class="form-row"><label>\u5FC3\u8DF3\u95F4\u9694(\u79D2)</label><input type="number" name="hi" value="${config.worker.heartbeatIntervalMs / 1e3}" min="5" style="width:100px"></div>
|
|
22492
22491
|
<div class="form-row"><label>\u4EFB\u52A1\u8D85\u65F6(\u5206\u949F)</label><input type="number" name="to" value="${config.worker.taskTimeoutMs / 6e4}" min="1" style="width:100px"></div>
|
|
22493
|
-
<div class="form-row"><label>\u9ED8\u8BA4\u6A21\u578B</label><input type="text" name="dm" value="${config.worker.defaultModel}" style="width:260px"></div>
|
|
22494
22492
|
</div>
|
|
22495
22493
|
<div class="card">
|
|
22496
22494
|
<h3 style="margin:0 0 12px;font-size:14px">Scheduler \u914D\u7F6E</h3>
|