@linxin666/dsh-client-ui-task-board 0.4.1 → 0.4.2
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 +24 -0
- package/README.zh.md +24 -0
- package/lib/client.js +917 -81
- package/lib/client.js.map +1 -1
- package/lib/index.js +1774 -1420
- package/lib/types/client/TaskBoardSettingsCard.d.ts +4 -0
- package/lib/types/client/board/LinkSubtaskModal.d.ts +11 -0
- package/lib/types/client/board/NewTaskModal.d.ts +7 -1
- package/lib/types/client/board/TaskCard.d.ts +11 -1
- package/lib/types/client/locales.d.ts +33 -0
- package/lib/types/core/controller.d.ts +30 -1
- package/lib/types/core/subtask.d.ts +122 -0
- package/lib/types/core/tasks.d.ts +46 -3
- package/lib/types/core/use-cases/task-archive.d.ts +10 -13
- package/lib/types/core/use-cases/task-create.d.ts +13 -4
- package/lib/types/core/use-cases/task-delete.d.ts +7 -1
- package/lib/types/core/use-cases/task-parent.d.ts +21 -0
- package/lib/types/core/use-cases/task-update.d.ts +1 -1
- package/lib/types/host/agent-tools.d.ts +27 -0
- package/lib/types/host-ledger.d.ts +88 -4
- package/lib/types/host-runner.d.ts +39 -1
- package/lib/types/host-service.d.ts +47 -0
- package/lib/types/index.d.ts +83 -5
- package/lib/types/protocol.d.ts +14 -0
- package/package.json +23 -21
- package/src/client/TaskBoardSettingsCard.tsx +48 -3
- package/src/client/board/LinkSubtaskModal.tsx +82 -0
- package/src/client/board/NewTaskModal.tsx +40 -6
- package/src/client/board/TaskBoard.tsx +88 -8
- package/src/client/board/TaskCard.tsx +52 -2
- package/src/client/board/TaskDetail.tsx +124 -1
- package/src/client/board.module.css +96 -0
- package/src/client/host-api.ts +14 -4
- package/src/client/index.ts +11 -1
- package/src/client/locales.ts +70 -2
- package/src/core/controller.ts +69 -8
- package/src/core/store.ts +15 -0
- package/src/core/subtask.ts +286 -0
- package/src/core/tasks.ts +50 -2
- package/src/core/use-cases/task-archive.ts +46 -12
- package/src/core/use-cases/task-create.ts +42 -7
- package/src/core/use-cases/task-delete.ts +11 -1
- package/src/core/use-cases/task-parent.ts +64 -0
- package/src/core/use-cases/task-update.ts +3 -1
- package/src/host/agent-tools.ts +643 -0
- package/src/host-ledger.ts +323 -45
- package/src/host-runner.ts +141 -12
- package/src/host-service.ts +127 -10
- package/src/index.ts +181 -9
- package/src/protocol.ts +26 -2
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: 5cf3bca7e966014fa4dafa5ebef708a2dd0f5a01
|
|
6
|
+
README.zh.md: 004a8584ac410fa712219fc341d52d38b5195fb5
|
package/README.md
CHANGED
|
@@ -15,6 +15,8 @@ A hot-pluggable DeepSeek Harness (DSH) Web GUI plugin with a Host-authoritative
|
|
|
15
15
|
- **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 `sessionDefaultPermission` (default `read-only`) 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.
|
|
16
16
|
- **Claim provenance wrap and source audit**: executing a continuation card (a card with a frozen snapshot) mandatorily wraps the task instruction in a source-declaration template — freeze instant, source session, and an unreviewed-content warning — composed after the handover preamble so the picking-up agent stays wary of stored prompt injection in card text. The session issuing a create/update action is stamped into the snapshot (frozenBy, re-stamped when the snapshot is replaced), and the session issuing a run/rerun lands on the execution record (initiatedBy) together with a captured copy of the freeze provenance; both are visible in the task detail. The initiator is client-asserted audit metadata, not a trust boundary.
|
|
17
17
|
- **Task tags (issue #1521)**: a task may carry up to eight labels. A label renders as a colour-toned badge on the card — the tone is hashed from the name, so one label always paints the same way and no colour is stored — the board header gains a multi-select tag filter built from every label in use (including archived tasks), and search also matches label names. A label with an "execution hint" is injected ahead of the execution prompt on every run as a `标签提示` block; a label without one is display and filter only, so an untagged task's prompt is byte-for-byte what it was before the feature. Labels stay editable after the first run: they classify the task and shape the next run, they are not the record of what already ran.
|
|
18
|
+
- **Subtasks and cascade runs**: a task can be given subtasks, either by creating one from its detail view (the form starts from the parent's workspace, preset, permission, and model, and each stays overridable) or by linking an existing task that has no parent yet; a subtask can be detached again once it is not running. The lineage gate lives in the Host: the parent must exist and be on board, a task can never be attached under one of its own descendants, and a tree may not exceed the configured `maxSubtaskDepth` (1 by default, 3 maximum). Running a task also runs its whole subtask tree concurrently — one DSH session per member, all under one run group — and the parent card stays in the running column until its own turn and every subtask have settled; its verdict fails if any member failed, and one failing subtask never stops the others. The board marks parent and subtask cards, the detail view lists the direct subtasks, and the header offers a one-click hide-subtasks filter.
|
|
19
|
+
- **Agent Team runs (opt-in per task)**: a task may opt into team execution in its detail view (or through `task_board_create`/`task_board_update`). Running such a task starts ONE session — the Team Lead — and the Host then asks the Agent Teams service to spawn one teammate per subtask inside it, attaching each teammate's session to that subtask's execution so the ordinary session monitor settles it. The subtree is flattened into that one Team (only a Lead may spawn); the Lead's prompt lists every teammate by name and points at the team tools, and the parent still settles only after its own turn and every subtask. A plain cascade prompts the same way but names the independent sessions instead. The mode needs the optional `agentTeams` service: a deployment without it refuses the run by name instead of silently degrading, and a subtask that pins its own above-default permission is refused because a teammate cannot carry that pin. Team runs always mint a fresh Lead session (teammate names are immutable within a Team) and use `teamProvider`.
|
|
18
20
|
- **Project partition (issue #1536)**: the board header offers a project row built from the deployment's DSH workspaces — "all projects" plus one entry per registered project. Selecting a project narrows the columns to the tasks pinned to it, and tasks with no pinned workspace stay visible under "all projects". Opening the new-task form while a project is open preselects that project as the task's workspace, and "new project…" registers a host directory through the same runtime call the GUI's own add-project uses.
|
|
19
21
|
- **AI parse of pasted text (issue #1540)**: the new-task form takes text copied from anywhere and has a model turn it into the title, description, and run prompt. The model is one of the deployment's configured models (the same list the task's model pin uses, first entry preselected), and the call runs on the Host behind the board's usual loopback and same-origin fence, with a 45 s budget and a cancel affordance. The draft only fills the form: nothing is created until the task is submitted, and a failed parse leaves what you already typed untouched.
|
|
20
22
|
- **Host-authoritative ledger**: tasks, schedules, and execution records live in `$DSH_HOME/task-board/ledger-v2.json`; browser actions become confirmed Host transactions.
|
|
@@ -27,6 +29,7 @@ A hot-pluggable DeepSeek Harness (DSH) Web GUI plugin with a Host-authoritative
|
|
|
27
29
|
- **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.
|
|
28
30
|
- **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.
|
|
29
31
|
- **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.
|
|
32
|
+
- **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, run a cascade, move/archive/restore/delete a card, and arm its cron schedule from the conversation.
|
|
30
33
|
|
|
31
34
|
## Architecture and protocol
|
|
32
35
|
|
|
@@ -39,6 +42,21 @@ The board view renders on first open and keeps its local view state when closed
|
|
|
39
42
|
- Same-origin endpoints are `GET /api/task-board/state`, `GET /api/task-board/events`, and `POST /api/task-board/action`.
|
|
40
43
|
- Every endpoint requires a browser same-origin marker. Direct access is restricted to the DSH loopback origin; an authenticated same-host reverse proxy must use an explicit Host allowlist and a server-injected token. POST requests additionally require JSON. Ordinary actions are limited to 64 KiB and import to 2 MiB. The action union has no command, executable path, shell text, or arbitrary argument field.
|
|
41
44
|
|
|
45
|
+
## Agent tools
|
|
46
|
+
|
|
47
|
+
The board is operable from a conversation, not only from the GUI. Each tool drives the same Host ledger, so a card created in the GUI is immediately visible to agents and vice versa, and every gate the UI honors still holds. The surface follows the `enabled` switch: a disabled board answers no tool call, and a deployment whose runtime serves no tool registry still mounts the board with the GUI intact.
|
|
48
|
+
|
|
49
|
+
- `task_board_list` lists cards with filters (column, parent, roots only, label, free-text query, archived) plus the board summary: revision, time zone, subtask depth limit, session-default permission, and column counts.
|
|
50
|
+
- `task_board_get` reads one card in full: prompt, labels, parent link, direct subtasks, execution targets, schedule, permission-gate state, and the last ten execution attempts with their session ids, initiator, and outcome.
|
|
51
|
+
- `task_board_create` creates a task or, with `parentId`, a subtask; execution targets left unset inherit the parent, and the deployment subtask-depth limit applies.
|
|
52
|
+
- `task_board_update` edits content, labels, and execution targets; an empty string clears a target and an empty label array clears the labels.
|
|
53
|
+
- `task_board_set_parent` links an existing card under a parent, or detaches it with an empty parent id.
|
|
54
|
+
- `task_board_run` runs a card now (optionally re-running a settled one), cascading over its whole subtask tree; it consumes real API quota and refuses an unconfirmed above-default permission with `confirmation-required`.
|
|
55
|
+
- `task_board_manage` moves a card between backlog and todo, archives or restores it, or deletes it, with the Host's running-task and subtask guards.
|
|
56
|
+
- `task_board_schedule` arms, changes, or disarms a card's cron schedule.
|
|
57
|
+
|
|
58
|
+
There is deliberately no tool that confirms a permission binding: that gate exists so a human lifts an above-default permission, and an agent able to stamp it would make the gate decorative. An agent that hits `confirmation-required` asks the user to confirm the card in the board UI. Tool calls are attributed: a run records the calling session as its initiator, and a create/update stamps it into a continuation card's snapshot.
|
|
59
|
+
|
|
42
60
|
## Install
|
|
43
61
|
|
|
44
62
|
Install the aggregate package or this package alone, then restart `dsh web`:
|
|
@@ -67,6 +85,8 @@ dsh plugin --profile web add link:$(pwd)/packages/dsh-task-board
|
|
|
67
85
|
| `trustedProxyHosts` | `[]` | Canonical `host[:port]` authorities accepted only through the authenticated loopback reverse-proxy path. |
|
|
68
86
|
| `proxyTokenEnv` | `DSH_TASK_BOARD_PROXY_TOKEN` | Environment variable containing the reverse-proxy token; the token itself is never stored in plugin config. |
|
|
69
87
|
| `sessionDefaultPermission` | `read-only` | The deployment's session-default permission. A card whose effective permission (handover bundle or pin) is above this value requires a human confirmation before it may run; cron refuses unconfirmed cards. |
|
|
88
|
+
| `maxSubtaskDepth` | `1` | Subtask depth limit, 1 to 3. At 1 a task may carry one level of subtasks and a subtask cannot be given subtasks of its own; every extra level multiplies the sessions one run of the root opens. |
|
|
89
|
+
| `teamProvider` | `spawn` | Continuable-subagent provider the Agent Teams service composes a teammate from. Only team-mode runs use it; it matches the Agent Teams tool plugin's `freshProvider` default. |
|
|
70
90
|
|
|
71
91
|
Direct browser access remains limited to the DSH loopback origin. For a same-host authenticated reverse proxy, bind DSH Web to loopback, set `trustedProxyHosts`, place a high-entropy token in the environment variable selected by `proxyTokenEnv`, and configure the proxy to replace (not forward from the client) `X-Dsh-Task-Board-Proxy-Token` after it authenticates the request. The proxy Host must be allowlisted, and the browser `Origin` must have that same authority. Restart the Host after changing these composition-level proxy settings.
|
|
72
92
|
|
|
@@ -90,6 +110,8 @@ On macOS the backend starts `/usr/bin/caffeinate -i -w <host-pid>` and never req
|
|
|
90
110
|
- A card's effective permission above the configured session default enters a pending-confirmation state: the Host refuses manual runs and cron triggers until a human confirms the exact binding, and changing the pinned permission or the handover bundle clears the confirmation (no confirm-then-swap escalation).
|
|
91
111
|
- A task prompt is data sent to a DSH agent session. The protocol does not accept shell commands, PowerShell bodies, executable paths, or configurable helper arguments.
|
|
92
112
|
- Task labels are client-asserted like the prompt itself and ride the same gated action channel: the protocol gate rejects a blank name, an unknown key, more than eight labels, and an over-long name or hint. A label's injected hint is delimiter-escaped (it cannot forge the continuation-card provenance markers) and is placed outside that provenance wrap.
|
|
113
|
+
- The subtask lineage is validated on the Host, not in the browser: the parent must exist and be on board, attaching a task under one of its own descendants is refused, and the resulting depth must stay within `maxSubtaskDepth`. A subtask that leaves its own permission unset resolves the parent's binding at launch together with the parent's human confirmation — the binding is never copied onto the card, so detaching a subtask cannot leave a confirmed elevated task behind — while pinning its own permission puts it back under the confirmation gate; a run whose subtask tree contains an unconfirmed binding is refused before any session starts, and cron rolls the schedule instead.
|
|
114
|
+
- The agent tool surface reaches the same Host ledger through the in-process service rather than the HTTP fence, and it carries no confirmation capability: refusals, fail-closed pins, the depth gate and the running-task locks all still apply, and no tool call can lift an above-default permission binding.
|
|
93
115
|
- Power helpers use fixed executable paths, fixed arguments, `shell: false`, and bounded retry delays of 1, 2, 5, 10, then 30 seconds. The Linux helper follows the Host stdin lifetime so the systemd inhibitor is released automatically after an abnormal Host exit.
|
|
94
116
|
|
|
95
117
|
## Build and test
|
|
@@ -126,6 +148,8 @@ Set `DSH_POWER_SMOKE=1` to opt into the native helper smoke test on Windows, mac
|
|
|
126
148
|
- Linux requires systemd-logind and policy permission for the current user to acquire an idle block lock. Containers, WSL, hosts without a system bus, and non-systemd systems may report `unsupported` or `error`. Whether a desktop also associates a logind idle lock with display idleness is desktop policy; the plugin does not request a screensaver or display inhibitor.
|
|
127
149
|
- Keeping enabled schedules armed may increase battery consumption because protection starts before their future trigger time.
|
|
128
150
|
- Host execution consumes the same API quota as an ordinary DSH agent session.
|
|
151
|
+
- Running a task also runs its subtask tree: one DSH session per member starts at once, so a deep tree opens several concurrent sessions and each consumes API quota.
|
|
152
|
+
- Agent tool calls are model-driven: a run or a scheduled cascade started from a conversation consumes the same API quota, and an agent can arm a schedule that keeps firing until it is disarmed or the board is switched off.
|
|
129
153
|
|
|
130
154
|
## Telemetry
|
|
131
155
|
|
package/README.zh.md
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
- **交接包与权限确认门**:续接卡片可附交接包——钉住三元组(工作区/agent 预设/权限)加文档与脚本引用。执行时交接包三元组覆盖普通钉住字段,引用以交接前言随 Prompt 下发。有效权限高于 `sessionDefaultPermission`(默认 `read-only`)的绑定处于待确认状态:手动执行被拒绝、cron 跳过该卡并滚动到下一触发点,任务详情中的确认按钮完成人工确认;此后任何权限或交接包变更都会重新武装确认门。
|
|
16
16
|
- **领卡来源声明包裹与来源审计**:执行续接卡片(带冻结快照的卡片)时,任务指令被来源声明模板强制包裹——冻结时间、来源会话与未经人工审查提示,组合在交接前言之后,使接手 Agent 对卡片文本中的存储型提示注入保持警惕。create/update 动作的发起方会话织入快照(frozenBy,快照被替换时重新盖章),run/rerun 的发起方会话连同冻结来源的捕获副本一起落在执行记录(initiatedBy)上,两者均可在任务详情查看。发起方为客户端断言的审计元数据,不构成信任边界。
|
|
17
17
|
- **任务标签(issue #1521)**:每个任务可带最多八个标签。标签在卡片上渲染为带色调的徽章——色调由标签名哈希得到,因此同一标签永远同色,也不需要存储颜色;看板顶栏据此提供多选标签筛选,候选项来自全账本在用的标签(含已归档任务),搜索也会匹配标签名。填了「执行提示」的标签会在每次执行前以 `标签提示` 段注入到执行 Prompt 之前;没填的标签只作展示与筛选,因此无标签任务的 Prompt 与加入该功能前逐字节一致。标签在首次执行后仍可编辑:它们给任务分类、塑造下一次运行,而不是「已经跑过什么」的凭证。
|
|
18
|
+
- **子任务与级联执行**:任务可以有子任务——在详情页新建子任务(表单以父任务的工作区、模式、权限和模型为起点,每一项都可覆盖),或把一个还没有父任务的现有任务关联为子任务;子任务不在运行中时也可以解除关联。父子关系的准入由 Host 判定:父任务必须存在且在看板上、任务不能挂到自己的后代之下、树的深度不得超过配置的 `maxSubtaskDepth`(默认 1 层,最大 3 层)。执行一个任务会并发执行它整棵子任务树——每个成员各开一个 DSH 会话,同属一个 run group——父任务卡片会一直留在「进行中」列,直到它自己的回合与全部子任务都结算;任一成员失败则父任务判为失败,而单个子任务失败不会阻塞其它子任务。看板会标注父任务与子任务卡片,详情页列出直接子任务,顶栏提供一键隐藏子任务。
|
|
19
|
+
- **Agent Team 执行(任务级 opt-in)**:任务可在详情页(或经 `task_board_create`/`task_board_update`)开启团队执行。执行这样的任务只启动一个会话——Team Lead——随后 Host 通过 Agent Teams 服务在它内部为每个子任务派生一个 teammate,并把 teammate 的会话挂到该子任务的 execution 上,由既有会话监视器结算。整棵子树被压平成这一个 Team(只有 Lead 可以派生);Lead 的提示词按名字列出每个 teammate 并指向团队工具,父任务仍只在自己回合与全部子任务结算后才结算。普通级联的提示词结构相同,只是改为列出各独立会话。该模式依赖可选的 `agentTeams` 服务:未提供该服务的部署会明确拒绝执行而不是静默降级;子任务自己钉住的高于默认的权限也会被拒绝,因为 teammate 无法承载该钉住值。团队执行总是新建 Lead 会话(同一 Team 内 teammate 名字不可变),并使用 `teamProvider`。
|
|
18
20
|
- **项目分区(issue #1536)**:看板头部新增项目下拉,选项来自当前部署的 DSH 工作区——「全部项目」加每个已注册项目。选定项目后各列只显示钉在该项目上的任务,未钉工作区的任务只在「全部项目」下可见;在某个项目下打开「新建任务」会把该项目预选为任务工作区,「新建项目…」则用与 GUI「添加项目」相同的运行时接口把宿主目录注册为项目。
|
|
19
21
|
- **粘贴文本 AI 解析(issue #1540)**:新建任务表单可以把从别处复制的一段话交给模型,整理成标题、描述和执行 Prompt。模型取当前部署已配置的模型(与任务「模型」下拉同一份列表,默认选中第一项),调用在宿主侧完成,走看板既有的回环与同源校验,预算 45 秒并支持取消。解析结果只填进表单:不提交就不会创建任务,解析失败也不会改动你已经输入的内容。
|
|
20
22
|
- **Host 权威账本**:任务、计划和执行记录存于 `$DSH_HOME/task-board/ledger-v2.json`;浏览器动作只有经 Host 确认后才成为 UI 状态。
|
|
@@ -27,6 +29,7 @@
|
|
|
27
29
|
- **实时同步**:变更返回完整 revision snapshot;SSE 只提示 revision、scheduler 与 power 变化,重连和页面恢复可见时重新拉完整 snapshot。
|
|
28
30
|
- **可选空闲睡眠保护**:默认关闭;开启后覆盖全部运行中的 DSH 会话、已启用且未归档的任务计划和未知会话状态。
|
|
29
31
|
- **系统提示词注入**:Host 通过 `SystemPrompt.section` 注册 order 200 的 `plugin:task-board` 段;任务看板设置可单独关闭声明而不关闭看板。该提示也会提醒 agent 在最终回复前收尾可见的 `todo_write` 计划列表。
|
|
32
|
+
- **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 计划。
|
|
30
33
|
|
|
31
34
|
## 架构与协议
|
|
32
35
|
|
|
@@ -39,6 +42,21 @@
|
|
|
39
42
|
- 同源接口为 `GET /api/task-board/state`、`GET /api/task-board/events` 和 `POST /api/task-board/action`。
|
|
40
43
|
- 所有接口都要求浏览器同源标记。直接访问只允许 DSH loopback origin;同机认证反向代理必须使用显式 Host 白名单和服务端注入 token。POST 还必须为 JSON。普通动作上限 64 KiB,导入上限 2 MiB。action 联合中没有命令、可执行路径、shell 文本或任意参数字段。
|
|
41
44
|
|
|
45
|
+
## Agent 工具
|
|
46
|
+
|
|
47
|
+
看板不止能从界面操作,也能从对话里操作。每个工具都驱动同一个 Host 账本,因此在界面创建的任务对 agent 立即可见,反之亦然;界面遵守的每一道门禁在这里同样生效。工具面跟随 `enabled` 开关:看板关闭时不响应任何工具调用;运行时不提供工具注册表的部署仍会正常挂载看板,界面不受影响。
|
|
48
|
+
|
|
49
|
+
- `task_board_list`:按列、父任务、仅根任务、标签、自由文本与归档状态筛选卡片,并返回看板摘要——revision、时区、子任务深度上限、会话默认权限与各列计数。
|
|
50
|
+
- `task_board_get`:读取单张卡片的完整信息——Prompt、标签、父任务链接、直接子任务、执行目标、计划、权限门状态,以及最近十次执行(含会话 id、发起方与结果)。
|
|
51
|
+
- `task_board_create`:创建任务;带 `parentId` 时创建子任务。未单独设置的执行目标继承父任务,并受部署的子任务深度上限约束。
|
|
52
|
+
- `task_board_update`:修改内容、标签与执行目标;空字符串清除某个目标,空标签数组清除全部标签。
|
|
53
|
+
- `task_board_set_parent`:把现有卡片挂到某个父任务下,或用空 parentId 解除关联。
|
|
54
|
+
- `task_board_run`:立即执行一张卡片(可选择重跑已结算的卡片),并级联执行它整棵子任务树;会消耗真实 API 额度,且未确认的高于默认权限的绑定会以 `confirmation-required` 被拒绝。
|
|
55
|
+
- `task_board_manage`:在待办与待规划之间移动卡片、归档或恢复、删除,同样受 Host 的运行中子任务与父子关系护栏约束。
|
|
56
|
+
- `task_board_schedule`:启用、修改或关闭卡片的 cron 计划。
|
|
57
|
+
|
|
58
|
+
这里刻意没有「确认权限」工具:该门禁存在的意义就是由人工放行高于默认值的权限,若 agent 能自行盖章,这道门就形同虚设。遇到 `confirmation-required` 的 agent 应当请用户在界面确认该卡片。工具调用带归属:执行会把发起会话记为 initiator,创建/更新则会把发起会话写进续接卡片快照。
|
|
59
|
+
|
|
42
60
|
## 安装
|
|
43
61
|
|
|
44
62
|
安装聚合包或单独安装本包,然后重启 `dsh web`:
|
|
@@ -67,6 +85,8 @@ dsh plugin --profile web add link:$(pwd)/packages/dsh-task-board
|
|
|
67
85
|
| `trustedProxyHosts` | `[]` | 仅通过已认证 loopback 反向代理路径接受的规范 `host[:port]` authority 白名单。 |
|
|
68
86
|
| `proxyTokenEnv` | `DSH_TASK_BOARD_PROXY_TOKEN` | 保存反向代理 token 的环境变量名;token 本身不会写入插件配置。 |
|
|
69
87
|
| `sessionDefaultPermission` | `read-only` | 部署的会话默认权限。卡片有效权限(交接包或钉住字段)高于该值时,运行前必须经人工确认;cron 拒绝调度待确认卡片。 |
|
|
88
|
+
| `maxSubtaskDepth` | `1` | 子任务深度上限,1 到 3。取 1 时一个任务只能有一层子任务,子任务不能再创建或关联子任务;每多一层,执行根任务一次开启的会话数就会成倍增加。 |
|
|
89
|
+
| `teamProvider` | `spawn` | Agent Teams 服务用来组成 teammate 的 continuable-subagent provider。仅团队执行模式使用,与 Agent Teams 工具插件的 `freshProvider` 默认值一致。 |
|
|
70
90
|
|
|
71
91
|
浏览器直接访问仍限制为 DSH loopback origin。若使用同机认证反向代理,应让 DSH Web 绑定 loopback,配置 `trustedProxyHosts`,在 `proxyTokenEnv` 指定的环境变量中放置高熵 token,并让代理在完成认证后替换(不能透传客户端提供的)`X-Dsh-Task-Board-Proxy-Token`。代理 Host 必须在白名单内,浏览器 `Origin` 必须与其 authority 相同。修改这些 composition 级代理设置后需重启 Host。
|
|
72
92
|
|
|
@@ -90,6 +110,8 @@ macOS 后端启动 `/usr/bin/caffeinate -i -w <host-pid>`,绝不请求 `-d`。
|
|
|
90
110
|
- 卡片有效权限高于配置的会话默认值时进入待确认状态:人工确认该确切绑定之前,Host 拒绝手动执行与 cron 触发;变更钉住权限或交接包会清除确认(封死先确认后替换的提权路径)。
|
|
91
111
|
- 任务 Prompt 是发给 DSH agent 会话的数据。协议不接受 shell 命令、PowerShell 正文、可执行路径或可配置 helper 参数。
|
|
92
112
|
- 任务标签与 Prompt 同属客户端断言,并走同一条受门禁的动作通道:协议层拒绝空标签名、未知键、超过八个标签以及超长的标签名或执行提示。标签的执行提示会做分隔符转义(无法伪造续接卡片的来源声明标记),且注入位置在该来源声明包裹之外。
|
|
113
|
+
- 子任务父子关系由 Host 而非浏览器判定:父任务必须存在且在看板上、任务不能挂到自己的后代之下、结果深度不得超过 `maxSubtaskDepth`。子任务若不单独设置权限,会在启动时解析父任务的绑定以及父任务的人工确认——绑定绝不复制到卡片上,因此解除关联不会残留一张已确认的高权限任务;一旦单独钉住权限,就重新回到确认门之下。若子任务树中存在未确认的绑定,整次运行会在任何会话启动前被拒绝,cron 则滚动到下一触发点。
|
|
114
|
+
- Agent 工具面经进程内服务直达同一个 Host 账本,而不经过 HTTP 栅栏,并且不携带任何确认能力:拒绝语义、失败即关闭的钉子、深度门禁与运行中任务锁全部照旧生效,任何工具调用都无法解除高于默认权限的绑定。
|
|
93
115
|
- 电源 helper 使用固定可执行路径、固定参数、`shell: false`,失败后按 1、2、5、10、30 秒有界退避。Linux helper 通过 Host stdin 生命周期退出,使 systemd inhibitor 随 Host 异常退出自动释放。
|
|
94
116
|
|
|
95
117
|
## 构建与测试
|
|
@@ -126,6 +148,8 @@ pnpm --filter @linxin666/dsh-client-ui-task-board build
|
|
|
126
148
|
- Linux 需要 systemd-logind 及允许当前用户取得 idle block lock 的策略;容器、WSL、无 system bus 或非 systemd 系统可能显示 `unsupported` 或 `error`。桌面环境是否把 logind idle lock 与显示器空闲联动属于其自身策略,插件不请求屏保或显示器 inhibitor。
|
|
127
149
|
- 已启用计划会从未来触发点之前持续持锁,因此可能增加电池消耗。
|
|
128
150
|
- Host 执行消耗与普通 DSH agent 会话相同的 API 额度。
|
|
151
|
+
- 执行一个任务会同时执行它的子任务树:每个成员都会立刻开启一个 DSH 会话,树越深并发会话越多,每个会话都会消耗 API 额度。
|
|
152
|
+
- Agent 工具调用由模型驱动:从对话发起的执行或定时级联同样消耗 API 额度,且 agent 可以启用一个持续触发的计划,直到被关闭或看板被关掉。
|
|
129
153
|
|
|
130
154
|
## 数据遥测
|
|
131
155
|
|