opencode-supertask 0.1.12 → 0.1.14
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/drizzle/meta/_journal.json +0 -7
- package/package.json +1 -1
package/dist/gateway/index.js
CHANGED
|
@@ -6204,8 +6204,7 @@ var init_config = __esm({
|
|
|
6204
6204
|
maxConcurrency: 2,
|
|
6205
6205
|
pollIntervalMs: 1e3,
|
|
6206
6206
|
heartbeatIntervalMs: 3e4,
|
|
6207
|
-
taskTimeoutMs: 18e5
|
|
6208
|
-
defaultModel: "zhipuai-coding-plan/glm-4.7"
|
|
6207
|
+
taskTimeoutMs: 18e5
|
|
6209
6208
|
},
|
|
6210
6209
|
scheduler: {
|
|
6211
6210
|
enabled: true,
|
|
@@ -18330,13 +18329,12 @@ async function clearDatabase(){
|
|
|
18330
18329
|
|
|
18331
18330
|
async function saveConfig(){
|
|
18332
18331
|
const form=document.getElementById('config-form');
|
|
18333
|
-
|
|
18332
|
+
const data={
|
|
18334
18333
|
worker:{
|
|
18335
18334
|
maxConcurrency:Number(form.mc.value),
|
|
18336
18335
|
pollIntervalMs:Number(form.pi.value),
|
|
18337
18336
|
heartbeatIntervalMs:Number(form.hi.value)*1000,
|
|
18338
18337
|
taskTimeoutMs:Number(form.to.value)*60000,
|
|
18339
|
-
defaultModel:form.dm.value,
|
|
18340
18338
|
},
|
|
18341
18339
|
scheduler:{
|
|
18342
18340
|
enabled:form.se.checked,
|
|
@@ -18680,7 +18678,6 @@ var init_web = __esm({
|
|
|
18680
18678
|
<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>
|
|
18681
18679
|
<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>
|
|
18682
18680
|
<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>
|
|
18683
|
-
<div class="form-row"><label>\u9ED8\u8BA4\u6A21\u578B</label><input type="text" name="dm" value="${config.worker.defaultModel}" style="width:260px"></div>
|
|
18684
18681
|
</div>
|
|
18685
18682
|
<div class="card">
|
|
18686
18683
|
<h3 style="margin:0 0 12px;font-size:14px">Scheduler \u914D\u7F6E</h3>
|
|
@@ -18895,7 +18892,8 @@ var WorkerEngine = class {
|
|
|
18895
18892
|
status: "running"
|
|
18896
18893
|
});
|
|
18897
18894
|
const modelToUse = this.resolveModel(task.model);
|
|
18898
|
-
const
|
|
18895
|
+
const modelArg = modelToUse ? ` -m "${modelToUse}"` : "";
|
|
18896
|
+
const cmd = `opencode run --agent supertask-runner${modelArg} --format json "\u6267\u884C\u4EFB\u52A1 ID: ${task.id}${modelToUse ? ` OVERRIDE_MODEL=${modelToUse}` : ""}"`;
|
|
18899
18897
|
const cwd = task.cwd || process.cwd();
|
|
18900
18898
|
const child = spawn("sh", ["-c", cmd], { cwd, stdio: ["inherit", "pipe", "pipe"] });
|
|
18901
18899
|
await TaskRunService.updatePid(run.id, process.pid, child.pid ?? 0);
|
|
@@ -18997,7 +18995,7 @@ var WorkerEngine = class {
|
|
|
18997
18995
|
});
|
|
18998
18996
|
}
|
|
18999
18997
|
resolveModel(taskModel) {
|
|
19000
|
-
if (!taskModel || taskModel === "default") return
|
|
18998
|
+
if (!taskModel || taskModel === "default") return null;
|
|
19001
18999
|
return taskModel;
|
|
19002
19000
|
}
|
|
19003
19001
|
};
|