@linxin666/dsh-client-ui-task-board 0.4.13 → 0.4.15
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 +4 -4
- package/README.zh.md +4 -4
- package/lib/client.js +244 -264
- package/lib/client.js.map +1 -1
- package/lib/index.js +36 -11
- package/lib/types/client/board/source-group.d.ts +27 -0
- package/lib/types/client/locales.d.ts +1 -0
- package/lib/types/client/pending-verify.d.ts +47 -0
- package/lib/types/client/plugin-card-seat.d.ts +1 -1
- package/lib/types/client/service.d.ts +4 -1
- package/lib/types/core/controller.d.ts +7 -1
- package/lib/types/core/extension.d.ts +14 -0
- package/lib/types/host-routes.d.ts +6 -0
- package/lib/types/index.d.ts +1 -1
- package/package.json +28 -28
- package/src/client/board/TaskBoard.tsx +47 -10
- package/src/client/board/source-group.ts +94 -0
- package/src/client/board.module.css +17 -0
- package/src/client/host-api.ts +7 -0
- package/src/client/index.ts +11 -10
- package/src/client/locales.ts +2 -0
- package/src/client/pending-verify.ts +90 -0
- package/src/client/plugin-card-seat.ts +2 -2
- package/src/client/service.ts +24 -0
- package/src/core/controller.ts +18 -0
- package/src/core/extension.ts +16 -0
- package/src/host-routes.ts +46 -11
- package/src/index.ts +1 -1
- package/lib/types/client/suppress-schedule-row.d.ts +0 -86
- package/src/client/suppress-schedule-row.ts +0 -198
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: 6d192216b8c688901498c41eecc4f774845afd04
|
|
6
|
+
README.zh.md: 4b51ab18e56f868c42acaaffdea0e40c2f0ffad3
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ English | [中文](README.zh.md)
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
<img src="https://img.shields.io/npm/v/@linxin666/dsh-task-board?style=flat-square" alt="Version">
|
|
7
7
|
|
|
8
|
-
<img src="https://img.shields.io/badge/DSH-%3E%3D0.2.
|
|
8
|
+
<img src="https://img.shields.io/badge/DSH-%3E%3D0.2.2--rc.1-4c6ef5?style=flat-square&labelColor=454a54" alt="DSH">
|
|
9
9
|
|
|
10
10
|
<img src="https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square" alt="License">
|
|
11
11
|
</p>
|
|
@@ -24,10 +24,10 @@ A hot-pluggable DeepSeek Harness (DSH) Web GUI and official desktop client task
|
|
|
24
24
|
|
|
25
25
|
## Features
|
|
26
26
|
|
|
27
|
-
Cards keep multi-line title and description previews with visible metadata. Previews strip Markdown formatting; task details render description and prompt as safe Markdown without raw HTML or automatic remote images, and content taller than about eight rendered lines is clamped to a fixed height with a fade hint and a "Show more" toggle that expands and collapses it, while shorter content renders untouched with no toggle. Stored task text is unchanged. A bracketed title prefix such as `[Bug]:` renders as a type badge, and the description preview skips issue-form boilerplate (checkbox lists, section headings, empty-field placeholders), preferring a summary section when one exists. A left stripe shows the latest run (running, succeeded, failed, cancelled); a card whose column disagrees with that run is labelled as set by hand. Each column shows the time its cards differ by — created in Backlog/To Do, started while running, settled in Done/Failed — read in the Host time zone. The latest execution session opens straight from the card. Every column header toggles compact single-line cards (Done starts compact, the choice is stored in the browser); Done, Failed and the archive
|
|
27
|
+
Cards keep multi-line title and description previews with visible metadata. Previews strip Markdown formatting; task details render description and prompt as safe Markdown without raw HTML or automatic remote images, and content taller than about eight rendered lines is clamped to a fixed height with a fade hint and a "Show more" toggle that expands and collapses it, while shorter content renders untouched with no toggle. Stored task text is unchanged. A bracketed title prefix such as `[Bug]:` renders as a type badge, and the description preview skips issue-form boilerplate (checkbox lists, section headings, empty-field placeholders), preferring a summary section when one exists. A left stripe shows the latest run (running, succeeded, failed, cancelled); a card whose column disagrees with that run is labelled as set by hand. Each column shows the time its cards differ by — created in Backlog/To Do, started while running, settled in Done/Failed — read in the Host time zone. The latest execution session opens straight from the card. Every column header toggles compact single-line cards (Done starts compact, the choice is stored in the browser). All five columns and the archive first group cards by provider source — full `owner/repository` labels for GitHub — with unclaimed cards in Local tasks; source groups sort by label and their fold choices persist per browser. Done source groups start collapsed while the other columns and the archive start expanded, and search always reveals matching groups. Done, Failed and the archive nest Today / Last 7 days / Earlier within each source group and fold the oldest group once that source holds more than 30 cards, unless a search is active.
|
|
28
28
|
|
|
29
29
|
- **Task board UI**: the board is the shell's own center-column panel — like the desktop application's Plugins page, it contributes a row to the shell's official sidebar panel list and a page to the layout's center-column seat, so row geometry, the active highlight, the collapsed rail, the label, and language switching are the shell's to own; the board provides five kanban columns, search, task details, archive/restore, execution history, and links to execution transcripts. Every column is reachable by hand, by dragging a card or from the detail view's move menu: the move writes the column and no execution record, so Done or Failed declares work that finished (or failed) outside a tracked run and Running parks work that is under way without a session, while a card the runner is actually executing refuses every move until it settles. Archived tasks are read-only except for restore, delete, and transcript viewing, and cannot run manually or on schedule until restored.
|
|
30
|
-
- **
|
|
30
|
+
- **Two complementary automation entries**: the shell's official *Automation tasks* page manages reminders and timed prompts in the Host Schedule service, while *Task board* manages cards, subtasks, real Session execution, cron, acceptance, and execution history. Both entries stay available so the user can choose the task shape; the board neither hides nor takes over the official page.
|
|
31
31
|
- **Detail layout and folds**: the task detail is two columns on a wide viewport — the left holds the task itself (description, execution prompt, labels, subtasks, frozen snapshot, handover bundle) and the right holds how this run will run (execution settings, scheduled runs, execution history, status); a narrow viewport falls back to one column in the same order. Workspace, agent preset, permission, model, and reasoning effort stay visible, while the three card-level switches (continue in the same conversation, start with /goal, skip this task's acceptance) fold into one "Advanced" row that echoes the switches that are on while it is closed, so the card's shape is readable without expanding it. Scheduled runs and execution history each take one fold row: the schedule row says whether a rule is armed and when it next fires, the history row says how many runs there are and what the latest one did, and the list itself shows the five most recent runs until it is expanded; an acceptance report shows one verdict badge on its row and the verdict, judge route, per-criterion scores, and findings only once expanded. The permission gate and the current status never fold. The view uses three type sizes (title, body, meta), status and result badges share one filled slot scale, and every fold row and button carries a hit target of at least 44 pixels.
|
|
32
32
|
- **Continuation cards (data plane)**: a new task may paste a `<<<FREEZE ... >>>FREEZE` block from a session; it parses into a goal/progress/next snapshot persisted with the task (ledger v3). Cards carry a frozen badge, the detail view shows the full snapshot and freeze time, search covers snapshot text, and archive/restore matches plain tasks. The snapshot reuses the freeze security gate at the protocol layer: sensitive patterns become `[REDACTED]` with a marker, slash-prefixed command lines reject the whole snapshot, and each field is capped at 8 KiB.
|
|
33
33
|
- **Handover bundles and the permission confirmation gate**: a continuation card may attach a handover bundle — the pinned execution triplet (workspace / agent preset / permission) plus doc/script references. The bundle's triplet overrides the plain pin fields at execution, and the references ride the prompt as a handover preamble. A binding whose effective permission is above the deployment's permission baseline — the Host's own default permission preset unless the profile pins `sessionDefaultPermission` — is unconfirmed: manual run refuses, cron skips the card and rolls to the next occurrence, and the confirm button in the task detail resolves the binding; any later permission or bundle change re-arms the gate.
|
|
@@ -51,7 +51,7 @@ Cards keep multi-line title and description previews with visible metadata. Prev
|
|
|
51
51
|
- **Fail-closed pins**: a missing workspace, missing or broken preset, or rejected permission command fails before the task prompt is sent.
|
|
52
52
|
- **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.
|
|
53
53
|
- **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.
|
|
54
|
-
- **Live synchronization**: mutations return a full revisioned snapshot; SSE announces revision, scheduler, and power changes,
|
|
54
|
+
- **Live synchronization**: mutations return a full revisioned snapshot; SSE announces revision, scheduler, and power changes. The mirror has five re-read entry points: change frames (revision advancing), connection establishment or re-establishment (`EventSource.onopen`), page visibility recovery, stream errors (`EventSource.onerror`, throttled by `STREAM_ERROR_NOTIFY_MS`), and a bounded verification read while the mirror still has unsettled executions (`src/client/pending-verify.ts`, `PENDING_VERIFICATION_MS` 15 seconds, stopped as soon as the last execution settles). A connection can stay open yet stop delivering, in which case there is neither an `onerror` nor a frame, so frames cannot be verified from the browser side. An idle board with no unsettled executions performs zero reads.
|
|
55
55
|
- **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.
|
|
56
56
|
- **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.
|
|
57
57
|
- **Agent tools**: every session gets eight model-facing tools (`task_board_list`, `task_board_get`, `task_board_create`, `task_board_update`, `task_board_set_parent`, `task_board_run`, `task_board_manage`, `task_board_schedule`) that drive the same Host ledger the browser drives, so an agent can list the board, create subtasks, link or detach them, start a run, move a card to any column (declaring it done, failed, or in progress without a run), archive/restore/delete it, settle a card the board can no longer observe, and arm its cron schedule from the conversation.
|
package/README.zh.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
<img src="https://img.shields.io/npm/v/@linxin666/dsh-task-board?style=flat-square" alt="Version">
|
|
7
7
|
|
|
8
|
-
<img src="https://img.shields.io/badge/DSH-%3E%3D0.2.
|
|
8
|
+
<img src="https://img.shields.io/badge/DSH-%3E%3D0.2.2--rc.1-4c6ef5?style=flat-square&labelColor=454a54" alt="DSH">
|
|
9
9
|
|
|
10
10
|
<img src="https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square" alt="License">
|
|
11
11
|
</p>
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
|
|
25
25
|
## 功能
|
|
26
26
|
|
|
27
|
-
卡片保留多行标题、描述预览及可见的元数据。预览去除 Markdown 标记,详情中的描述与 Prompt 按安全 Markdown 渲染,不执行原始 HTML 或自动加载远程图片;超过约八行的内容默认按固定高度钳制并带渐隐提示,点「展开全文」展开、可再收起,未超出的内容原样渲染且无切换按钮。任务原文保持不变。标题开头的方括号前缀(如 `[Bug]:`)渲染为类型徽章,描述预览跳过 Issue 表单的模板内容(勾选列表、小节标题、空字段占位),存在摘要类小节时优先取它。卡片左侧色条显示最近一次执行(运行中、成功、失败、取消);所在列与该次执行不一致的卡片标注为手动结算。每列显示能区分卡片的时间——待规划/待办为创建时间、运行中为开始时间、已完成/已失败为结算时间——按 Host
|
|
27
|
+
卡片保留多行标题、描述预览及可见的元数据。预览去除 Markdown 标记,详情中的描述与 Prompt 按安全 Markdown 渲染,不执行原始 HTML 或自动加载远程图片;超过约八行的内容默认按固定高度钳制并带渐隐提示,点「展开全文」展开、可再收起,未超出的内容原样渲染且无切换按钮。任务原文保持不变。标题开头的方括号前缀(如 `[Bug]:`)渲染为类型徽章,描述预览跳过 Issue 表单的模板内容(勾选列表、小节标题、空字段占位),存在摘要类小节时优先取它。卡片左侧色条显示最近一次执行(运行中、成功、失败、取消);所在列与该次执行不一致的卡片标注为手动结算。每列显示能区分卡片的时间——待规划/待办为创建时间、运行中为开始时间、已完成/已失败为结算时间——按 Host 时区读取。最近一次执行的会话可直接从卡片打开。每个列头都可切换紧凑单行卡片(已完成列默认紧凑,选择保存在浏览器中)。五个主列与归档先按提供方来源分组——GitHub 显示完整 `owner/repository`——未被提供方认领的卡片进入「本地任务」组;来源组按名称排序,折叠选择按浏览器保存。已完成的来源组默认折叠,其他主列与归档默认展开,搜索总会露出命中的分组。已完成、已失败与归档在每个来源组内部再按「今天 / 近 7 天 / 更早」分组,该来源超过 30 张卡时折叠最早一组,搜索时不折叠。
|
|
28
28
|
|
|
29
29
|
- **任务看板 UI**:看板是 shell 自己的中栏面板——它像桌面版【插件】页那样,向 shell 的官方侧栏面板列表贡献一行、向布局的中栏座位贡献一页,因此行的几何、选中高亮、折叠 rail、标签与语言切换都由 shell 统一负责;看板提供五列布局、搜索、任务详情、归档/恢复、执行历史和执行会话跳转。五列都可以手工切换:拖拽卡片或从详情页的「移动到…」菜单切换状态,只写列、不产生执行记录——「已完成」「已失败」声明工作在受追踪的执行之外结束(或失败),「进行中」则表示工作正在进行但没有对应会话;真正在执行中的卡片在结算前拒绝任何移动。归档任务除恢复、删除和查看 transcript 外保持只读,恢复前不能手动或定时执行。
|
|
30
|
-
-
|
|
30
|
+
- **两个互补的自动化入口**:shell 官方「自动化任务」页管理 Host Schedule 服务里的提醒与定时提示;「任务看板」管理卡片、子任务、真实会话执行、cron、验收与执行历史。两个入口同时保留,用户可按任务形态选择,看板不会隐藏或接管官方页面。
|
|
31
31
|
- **任务详情的布局与折叠**:任务详情在宽视口上是双栏——左栏是任务本身(描述、执行 Prompt、标签、子任务、冻结快照、交接包),右栏是这次执行会怎么跑(执行设置、定时运行、执行记录、状态);窄视口按同一顺序退回单栏。执行设置里的工作区、Agent 预设、权限、模型与思考档位常驻可见,三个卡片级开关(同一对话继续、以 /goal 开始执行、跳过本任务的验收)收进一行「高级设置」,收起时在行上回显已开启项,因此不展开也知道这张卡会怎么跑。定时运行与执行记录各占一行折叠:定时行说明是否启用与下次触发时刻,执行记录行说明次数与最近一次结果,记录本身默认只列最近五次,展开才看全部;每条记录里的验收报告在行上只给一个结论徽标,展开后才是判定、裁判路由、逐项分数与问题反馈。权限确认门与当前状态不折叠。视图内字号只有三档(标题、正文、元信息),状态与结果徽标共用一套填充色槽位,折叠行与按钮的命中区不小于 44 像素。
|
|
32
32
|
- **续接卡片(数据面)**:新建任务时可粘贴会话输出的 `<<<FREEZE … >>>FREEZE` 冻结块,解析为「目标/进度/下一步」快照随任务持久化(v3 账本);卡片带冻结徽标,详情页可读完整快照与冻结时间,搜索覆盖快照文本,归档/恢复与普通任务一致。快照在协议层复用冻结安全门:敏感模式自动替换为 `[REDACTED]` 并标记、以 `/` 开头的命令行整体拒绝、每字段 8 KiB 上限。
|
|
33
33
|
- **交接包与权限确认门**:续接卡片可附交接包——钉住三元组(工作区/agent 预设/权限)加文档与脚本引用。执行时交接包三元组覆盖普通钉住字段,引用以交接前言随 Prompt 下发。有效权限高于部署权限基线——未钉住 `sessionDefaultPermission` 时即宿主自己的默认权限预设——的绑定处于待确认状态:手动执行被拒绝、cron 跳过该卡并滚动到下一触发点,任务详情中的确认按钮完成人工确认;此后任何权限或交接包变更都会重新武装确认门。
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
- **钉子失败即关闭**:工作区缺失、预设缺失或损坏、权限命令被拒绝时,任务 Prompt 不会发送。
|
|
52
52
|
- **Host 调度器**:5 段 cron 支持 `*`、`*/n`、范围、逗号列表和周日 `0/7`。每条规则携带自己的 IANA 时区(默认跟随 Host 时区),日期/星期遵循 Vixie 语义:两个字段都受限时为 OR,其余组合为 AND。夏令时切换处的墙上时间空洞会被跳过,重复出现的歧义时刻只触发一次并取更早者。规则有两种计划:循环 cron(可设次数上限,支持不限、1、2 或任意正整数)或在未来某一时刻只执行一次的单次计划;Host 只统计它真正开启的执行,达到上限或单次已执行的规则会在账本里自行停止,而不是等被执行的工作去关掉它。
|
|
53
53
|
- **确定性恢复**:已有 session id 的 running execution 在重启后继续观察;没有 session id 的启动中断会取消且不会重发。
|
|
54
|
-
- **实时同步**:变更返回完整 revision snapshot;SSE 只提示 revision、scheduler 与 power
|
|
54
|
+
- **实时同步**:变更返回完整 revision snapshot;SSE 只提示 revision、scheduler 与 power 变化。镜像的重读入口共有五个:变更帧(revision 前进)、连接建立或重建(`EventSource.onopen`)、页面恢复可见、流报错(`EventSource.onerror`,按 `STREAM_ERROR_NOTIFY_MS` 节流)、以及镜像里仍有未结算执行时的一次有界校验读取(`src/client/pending-verify.ts`,`PENDING_VERIFICATION_MS` 15 秒,最后一条执行结算即停止)。连接可以保持打开却不再投递,此时既没有 `onerror` 也没有帧,所以帧无法从浏览器侧被验证。无未结算执行的空闲看板零读取。
|
|
55
55
|
- **可选空闲睡眠保护**:默认关闭;开启后覆盖全部运行中的 DSH 会话、已启用且未归档的任务计划和未知会话状态。
|
|
56
56
|
- **系统提示词注入**:Host 通过 `SystemPrompt.section` 注册 order 200 的 `plugin:task-board` 段;任务看板设置可单独关闭声明而不关闭看板。该提示也会提醒 agent 在最终回复前收尾可见的 `todo_write` 计划列表。
|
|
57
57
|
- **Agent 工具**:每个会话都可使用八个面向模型的工具(`task_board_list`、`task_board_get`、`task_board_create`、`task_board_update`、`task_board_set_parent`、`task_board_run`、`task_board_manage`、`task_board_schedule`),它们驱动与浏览器完全相同的 Host 账本,因此 agent 可以在对话里列出看板、创建子任务、关联或解除关联、执行一张卡片、把卡片移到任意列(含不经执行直接声明完成、失败或进行中)、归档/恢复/删除卡片、对看板已无法观察的卡片强制结算,以及为卡片配置 cron 计划。
|