@linxin666/dsh-client-ui-task-board 0.4.19 → 0.4.21

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.
Files changed (45) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +1 -1
  3. package/README.zh.md +1 -1
  4. package/lib/client.js +190 -63
  5. package/lib/client.js.map +1 -1
  6. package/lib/index.js +599 -95
  7. package/lib/types/client/board/TaskForm.d.ts +3 -1
  8. package/lib/types/client/index.d.ts +7 -1
  9. package/lib/types/client/native-panel.d.ts +1 -1
  10. package/lib/types/client/seats.d.ts +36 -2
  11. package/lib/types/client/settings-form.d.ts +2 -0
  12. package/lib/types/core/controller.d.ts +1 -1
  13. package/lib/types/core/extension.d.ts +160 -1
  14. package/lib/types/core/session-reuse.d.ts +46 -13
  15. package/lib/types/core/tasks.d.ts +16 -5
  16. package/lib/types/host/agent-tools.d.ts +12 -2
  17. package/lib/types/host/extension-registry.d.ts +38 -1
  18. package/lib/types/host-ledger.d.ts +86 -1
  19. package/lib/types/host-runner.d.ts +20 -1
  20. package/lib/types/host-service.d.ts +64 -15
  21. package/lib/types/protocol.d.ts +18 -1
  22. package/package.json +1 -1
  23. package/src/client/board/ExecutionLog.tsx +15 -2
  24. package/src/client/board/NewTaskModal.tsx +88 -3
  25. package/src/client/board/TaskDetail.tsx +18 -11
  26. package/src/client/board/TaskForm.tsx +13 -2
  27. package/src/client/board.module.css +67 -1
  28. package/src/client/index.ts +3 -0
  29. package/src/client/locales.ts +7 -6
  30. package/src/client/native-panel.tsx +2 -1
  31. package/src/client/seats.tsx +32 -4
  32. package/src/client/service.ts +3 -0
  33. package/src/client/settings-form.ts +21 -2
  34. package/src/core/controller.ts +9 -3
  35. package/src/core/execution-summary.ts +3 -2
  36. package/src/core/extension.ts +159 -1
  37. package/src/core/session-reuse.ts +58 -21
  38. package/src/core/store.ts +2 -0
  39. package/src/core/tasks.ts +16 -5
  40. package/src/host/agent-tools.ts +70 -17
  41. package/src/host/extension-registry.ts +157 -2
  42. package/src/host-ledger.ts +274 -23
  43. package/src/host-runner.ts +44 -5
  44. package/src/host-service.ts +190 -37
  45. package/src/protocol.ts +37 -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: 0d4ca3e4c68aa190534ef528b7d5091440348d8a
6
- README.zh.md: 57eda01abdd79a46a29cd8943e3c1a8cceb33011
5
+ README.md: e335ca2a8d9afd14d772c1de343aa8bbb4274e3d
6
+ README.zh.md: 9e08d8a35c12a540bf92568a9fa99b12b725a708
package/README.md CHANGED
@@ -43,7 +43,7 @@ Cards keep multi-line title and description previews with visible metadata. Prev
43
43
  - **Bounded execution history**: each task keeps the most recent 20 execution records; the oldest runs are trimmed when a new run starts, so ledger size and write cost stay bounded regardless of how often a task has run.
44
44
  - **Real execution**: manual and scheduled runs use the same Host runner, which by default creates a fresh session, renames it, applies the agent preset and `/permission <id>`, queues the task prompt as a plain single-turn run, and settles the execution from that turn's result.
45
45
  - **Task reasoning effort**: the task model picker exposes a reasoning-effort selector when the selected model declares supported levels in the Host model catalog. Leaving it blank inherits the model/Host default; only that model's declared levels are offered. The task stores its choice and applies it when selecting the execution model, including a reused session.
46
- - **Optional session reuse**: a task can opt into continuing in its previous execution's session (issue #1419). Reuse happens only when that session is idle and still present in the runtime roster — the Host then re-applies the pinned permission and model on it and queues the prompt, keeping the conversation title and history; otherwise the run mints a fresh session as before, so an unknown roster or a busy session never blocks a scheduled run. The roster read is taken for the launch itself, so a board that has been idle reuses a session that has been idle all along instead of refusing it.
46
+ - **Optional session reuse**: a task can opt into continuing in its previous execution's session (issue #1419). Reuse happens only when that session is idle, still present in the runtime roster, and not archived (issue #2068) — the Host then re-applies the pinned permission and model on it and queues the prompt, keeping the conversation title and history; otherwise the run mints a fresh session as before, so an unknown roster, a busy session, or a conversation the user archived never blocks a scheduled run. The roster and archive-set reads are taken for the launch itself, so a board that has been idle reuses a session that has been idle all along instead of refusing it.
47
47
  - **Idle-aware session polling (issue #1821)**: the Host reads the DSH session roster only while the board has something that roster can decide — an execution to inspect, or a card parked in the running column whose verdict may arrive from a settle this process never saw. An empty board with no running card, no open execution and no enabled schedule polls nothing at all, so an idle Host no longer rebuilds every persisted session row (string conversion, object allocation, one stat per record) on a fixed heartbeat. The cadence that governs a busy board is the `sessionPollSeconds` setting, and a roster read that fails or stays unknown backs off on a doubling delay up to one minute, so a session tree that is down is not hammered at the poll interval.
48
48
  - **Fail-closed pins**: a missing workspace, missing or broken preset, or rejected permission command fails before the task prompt is sent.
49
49
  - **Host scheduler**: 5-field cron supports `*`, `*/n`, ranges, comma lists, and Sunday `0/7`. Each rule carries its own IANA time zone (the Host's zone by default), and day-of-month/day-of-week follow Vixie semantics: both fields restricted means OR, any other combination means AND. Wall-clock gaps at a daylight-saving transition are skipped, and an ambiguous repeated time fires once, at the earlier instant. A rule is either a recurring cron rule — optionally capped by a run limit (unlimited, 1, 2, or any positive whole number) — or a one-shot pinned to a single future instant; the Host counts the executions it actually opens, and a rule that reaches its cap or fires its one-shot stops itself in the ledger rather than waiting for the executed work to disarm it.
package/README.zh.md CHANGED
@@ -43,7 +43,7 @@
43
43
  - **有界执行历史**:每个任务只保留最近 20 条执行记录;新运行开始时截掉最旧的记录,使账本大小与每次写入成本不随任务历史无限增长。
44
44
  - **真实执行**:手动运行和定时运行共用 Host runner,默认新建独立会话、重命名、应用 agent 预设和 `/permission <id>`,以 queue 模式发送任务 Prompt 执行普通单回合对话,并按该回合结果结算。
45
45
  - **任务思考强度**:所选模型在 Host 模型目录中声明支持的思考档位时,任务模型选择器提供思考强度下拉框。留空沿用模型/宿主默认值,只提供该模型声明的档位。任务保存该选择,并在选择执行模型时应用,包括复用已有会话的执行。
46
- - **可选会话复用**:任务可选择在上一执行会话中继续(issue #1419)。仅当该会话空闲且仍在运行时会话名册中才复用——Host 会重新应用钉住的权限与模型再以 queue 模式发送 Prompt,会话标题与历史保持不变;否则照旧新建会话,因此名册未知或会话正忙都不会阻塞定时运行。名册读取就发生在这次启动本身,所以长期空闲的看板会复用一个一直空闲的会话,而不是因为缓存过期而拒绝它。
46
+ - **可选会话复用**:任务可选择在上一执行会话中继续(issue #1419)。仅当该会话空闲、仍在运行时会话名册中、且未被归档(issue #2068)时才复用——Host 会重新应用钉住的权限与模型再以 queue 模式发送 Prompt,会话标题与历史保持不变;否则照旧新建会话,因此名册未知、会话正忙、或该会话已被用户归档都不会阻塞定时运行。名册与归档集的读取就发生在这次启动本身,所以长期空闲的看板会复用一个一直空闲的会话,而不是因为缓存过期而拒绝它。
47
47
  - **空闲时停止会话轮询(issue #1821)**:只有当看板确实有需要名册裁决的事情时,Host 才读取 DSH 会话名册——存在待核对的执行,或运行列里有一张卡片(它的结果可能来自本进程没观测到的结算)。空看板、没有运行中卡片、没有未结算执行、也没有已启用计划时不轮询任何东西,因此空闲的 Host 不再按固定心跳重建每一条持久化会话行(字符串转换、对象分配、每条记录一次 stat)。有工作时按配置项 `sessionPollSeconds` 的节奏轮询;读取失败或名册仍未知时按翻倍延迟退避,上限一分钟,因此会话树故障时不会被按轮询间隔反复冲击。
48
48
  - **钉子失败即关闭**:工作区缺失、预设缺失或损坏、权限命令被拒绝时,任务 Prompt 不会发送。
49
49
  - **Host 调度器**:5 段 cron 支持 `*`、`*/n`、范围、逗号列表和周日 `0/7`。每条规则携带自己的 IANA 时区(默认跟随 Host 时区),日期/星期遵循 Vixie 语义:两个字段都受限时为 OR,其余组合为 AND。夏令时切换处的墙上时间空洞会被跳过,重复出现的歧义时刻只触发一次并取更早者。规则有两种计划:循环 cron(可设次数上限,支持不限、1、2 或任意正整数)或在未来某一时刻只执行一次的单次计划;Host 只统计它真正开启的执行,达到上限或单次已执行的规则会在账本里自行停止,而不是等被执行的工作去关掉它。