@linxin666/dsh-client-ui-task-board 0.2.3 → 0.2.5
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/README.i18n.yaml +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/client.js +8 -4
- package/lib/client.js.map +1 -1
- package/lib/index.js +17 -15
- package/lib/types/host-runner.d.ts +10 -1
- package/lib/types/host-service.d.ts +2 -1
- package/lib/types/index.d.ts +1 -1
- package/package.json +14 -10
- package/src/client/settings-form.ts +8 -6
- package/src/core/controller.ts +9 -1
- package/src/host-runner.ts +22 -8
- package/src/host-service.ts +8 -3
- package/src/index.ts +13 -3
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# node scripts/verify-docs.mjs --write <dir>
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 359b35160b1cf7a8c697152b4e3fc60193ed3599
|
|
6
|
+
README.zh.md: 535ac2b5c8b4c6fdbff61c08b9cadae3b5679cc7
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ A hot-pluggable DeepSeek Harness (DSH) Web GUI plugin with a Host-authoritative
|
|
|
18
18
|
- **Deterministic recovery**: a running execution with a recorded session is observed after restart; an interrupted start without a session id is cancelled and is not resent.
|
|
19
19
|
- **Live synchronization**: mutations return a full revisioned snapshot; SSE announces revision, scheduler, and power changes, while reconnect and page visibility recovery fetch a full snapshot.
|
|
20
20
|
- **Optional idle-sleep protection**: off by default; when enabled it covers every running DSH session, enabled non-archived task-board schedules, and unknown session state.
|
|
21
|
-
- **System-prompt injection**: the Host registers a `plugin:task-board` section (order 200) through `SystemPrompt.section`, and the task-board settings can disable the announcement without disabling the board.
|
|
21
|
+
- **System-prompt injection**: the Host registers a `plugin:task-board` section (order 200) through `SystemPrompt.section`, and the task-board settings can disable the announcement without disabling the board. The guidance also reminds agents to close any visible `todo_write` plan before the final answer.
|
|
22
22
|
|
|
23
23
|
## Architecture and protocol
|
|
24
24
|
|
package/README.zh.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
- **确定性恢复**:已有 session id 的 running execution 在重启后继续观察;没有 session id 的启动中断会取消且不会重发。
|
|
19
19
|
- **实时同步**:变更返回完整 revision snapshot;SSE 只提示 revision、scheduler 与 power 变化,重连和页面恢复可见时重新拉完整 snapshot。
|
|
20
20
|
- **可选空闲睡眠保护**:默认关闭;开启后覆盖全部运行中的 DSH 会话、已启用且未归档的任务计划和未知会话状态。
|
|
21
|
-
- **系统提示词注入**:Host 通过 `SystemPrompt.section` 注册 order 200 的 `plugin:task-board`
|
|
21
|
+
- **系统提示词注入**:Host 通过 `SystemPrompt.section` 注册 order 200 的 `plugin:task-board` 段;任务看板设置可单独关闭声明而不关闭看板。该提示也会提醒 agent 在最终回复前收尾可见的 `todo_write` 计划列表。
|
|
22
22
|
|
|
23
23
|
## 架构与协议
|
|
24
24
|
|
package/lib/client.js
CHANGED
|
@@ -907,7 +907,10 @@ window.__ModuleLoader__.load({
|
|
|
907
907
|
/** Settle tasks left 'running' whose sessions already finished. */
|
|
908
908
|
async reconcileRunningTasks() {
|
|
909
909
|
if (this.deps.exec === void 0) return;
|
|
910
|
-
if (this.reconcileInFlight)
|
|
910
|
+
if (this.reconcileInFlight) {
|
|
911
|
+
this.scheduleReconcile();
|
|
912
|
+
return;
|
|
913
|
+
}
|
|
911
914
|
this.reconcileInFlight = true;
|
|
912
915
|
try {
|
|
913
916
|
const events = [];
|
|
@@ -3449,7 +3452,8 @@ window.__ModuleLoader__.load({
|
|
|
3449
3452
|
const valid = plan.filter((item) => item.run !== void 0);
|
|
3450
3453
|
if (plan.length === 0 || this.saving || valid.length !== plan.length) return;
|
|
3451
3454
|
const plannedWrites = valid.map((item) => item.op);
|
|
3452
|
-
const
|
|
3455
|
+
const pending = /* @__PURE__ */ new Map();
|
|
3456
|
+
for (const item of plan) pending.set(item.field, this.staged.get(item.field));
|
|
3453
3457
|
this.saving = true;
|
|
3454
3458
|
this.failed = false;
|
|
3455
3459
|
this.failedReason = void 0;
|
|
@@ -3462,9 +3466,9 @@ window.__ModuleLoader__.load({
|
|
|
3462
3466
|
for (const field of result.fields) if (field.landed) landed.add(field.field);
|
|
3463
3467
|
} else this.failedReason = result.message;
|
|
3464
3468
|
} else for (const item of valid) if (await item.run()) landed.add(item.field);
|
|
3465
|
-
for (const field of
|
|
3469
|
+
for (const [field, before] of pending) if (landed.has(field) && this.staged.get(field) === before) this.staged.delete(field);
|
|
3466
3470
|
this.saving = false;
|
|
3467
|
-
this.failed = landed.size !==
|
|
3471
|
+
this.failed = landed.size !== pending.size;
|
|
3468
3472
|
this.publish();
|
|
3469
3473
|
}
|
|
3470
3474
|
/** The scope's batch surface when it supports one; undefined conservatively otherwise. */
|