@linxin666/dsh-client-ui-task-board 0.4.12 → 0.4.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/README.i18n.yaml +2 -2
- package/README.md +9 -3
- package/README.zh.md +9 -3
- package/lib/client.js +1476 -478
- package/lib/client.js.map +1 -1
- package/lib/index.js +1280 -65
- package/lib/types/client/board/AttachmentField.d.ts +70 -0
- package/lib/types/client/board/model-options.d.ts +21 -1
- package/lib/types/client/board/source-group.d.ts +27 -0
- package/lib/types/client/host-api.d.ts +25 -0
- package/lib/types/client/locales.d.ts +17 -0
- package/lib/types/client/pending-verify.d.ts +47 -0
- package/lib/types/client/service.d.ts +4 -1
- package/lib/types/core/attachment.d.ts +132 -0
- package/lib/types/core/controller.d.ts +26 -2
- package/lib/types/core/extension.d.ts +82 -0
- package/lib/types/core/session-reuse.d.ts +7 -1
- package/lib/types/core/tasks.d.ts +38 -1
- package/lib/types/core/use-cases/task-update.d.ts +21 -0
- package/lib/types/core/wire-projection.d.ts +35 -0
- package/lib/types/host/attachments.d.ts +250 -0
- package/lib/types/host/extension-registry.d.ts +40 -0
- package/lib/types/host-ledger.d.ts +16 -0
- package/lib/types/host-routes.d.ts +14 -0
- package/lib/types/host-runner.d.ts +53 -1
- package/lib/types/host-service.d.ts +59 -0
- package/lib/types/index.d.ts +23 -0
- package/lib/types/protocol.d.ts +39 -6
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +6 -2
- package/src/client/TaskBoardSettingsCard.tsx +11 -1
- package/src/client/board/AttachmentField.tsx +383 -0
- package/src/client/board/EditTaskModal.tsx +63 -0
- package/src/client/board/NewTaskModal.tsx +76 -4
- package/src/client/board/TaskBoard.tsx +47 -10
- package/src/client/board/TaskDetail.tsx +30 -2
- package/src/client/board/model-options.ts +32 -2
- package/src/client/board/source-group.ts +94 -0
- package/src/client/board.module.css +83 -0
- package/src/client/host-api.ts +70 -0
- package/src/client/index.ts +11 -0
- package/src/client/locales.ts +34 -0
- package/src/client/pending-verify.ts +90 -0
- package/src/client/service.ts +24 -0
- package/src/core/attachment.ts +287 -0
- package/src/core/controller.ts +47 -1
- package/src/core/extension.ts +86 -0
- package/src/core/session-reuse.ts +7 -1
- package/src/core/store.ts +10 -1
- package/src/core/tasks.ts +49 -0
- package/src/core/use-cases/task-update.ts +27 -2
- package/src/core/wire-projection.ts +81 -0
- package/src/host/attachments.ts +650 -0
- package/src/host/extension-registry.ts +150 -5
- package/src/host-ledger.ts +32 -4
- package/src/host-routes.ts +168 -13
- package/src/host-runner.ts +124 -4
- package/src/host-service.ts +165 -12
- package/src/index.ts +47 -0
- package/src/protocol.ts +57 -9
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: 85e08b6bdac8ae4fc1bf102ef1c7f8e82bb08be3
|
|
6
|
+
README.zh.md: 5ffd015d9c54f9571c04ee48433d028a99af4300
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ 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
|
- **One scheduling entry in the sidebar**: while the board is enabled, the shell's official *Automation tasks* entry (the host `ui-schedule` page over the Host Schedule service) is hidden, so the sidebar offers one scheduling surface instead of two. The board's own master switch owns the state: switching the board off brings the official entry back, and the official page keeps working everywhere else it is still reachable — the entry is hidden, not uninstalled.
|
|
@@ -39,6 +39,7 @@ Cards keep multi-line title and description previews with visible metadata. Prev
|
|
|
39
39
|
- **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. A root task created without a project choice — from the form or through the board's agent tool — inherits the workspace of the session that created it, and a card that still pins nothing runs in the deployment's most recently used workspace instead of the Host's own working directory.
|
|
40
40
|
- **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.
|
|
41
41
|
- **Collapsible task form**: the create/duplicate/subtask dialog groups its configuration into collapsible regions — task content open by default, then labels, execution settings, run mode, handover, and scheduled runs — and every collapsed region keeps a one-line summary of the values it holds, so the dialog fits without a scrollbar (its body keeps an overflow fallback for very short windows). The agent-preset field is named "Agent preset" and lists the deployment's built-in presets under localized names plus any user preset, with an inherit default that names the preset a run without a pin actually uses.
|
|
42
|
+
- **Card attachments (issue #1979)**: a card may carry up to eight files and images. The create and edit forms accept them three ways — drag and drop, paste, and the file picker — and a picked file stays a LOCAL preview until the card is saved: the upload happens on save, so a card the user abandons leaves no stored object behind. The drop area is focusable and keyboard-operable, and the removal controls are disabled while a save is in flight. An image is stored as a raster image and travels with the execution as an image part of the prompt, placed after the text part; any other file is stored verbatim and reaches the execution session as a readable host path in a read-only attachment section of its own, separate from the handover references. The card keeps METADATA only — the kind, the stored identifier, the name, the size, the media type, the digest of the exact stored bytes, and the pixel size of an image — never the bytes, never base64, never a data URL. The display name is always one canonical line without any path part, so it can neither break the prompt nor point at a directory. Before the ledger commits an attachment, the Host proves the claim against the official attachment storage: an image is read back and compared, a file is streamed and its digest recomputed, and a reference the storage cannot prove refuses the whole action, so a spoofed client claim never becomes a stored fact. Every execution resolves the attachments afresh, and a route that declares it cannot read images refuses the run before the prompt is queued. The board's limits are eight attachments per card, 10 MiB per attachment and 32 MiB per card; a deployment whose own attachment storage is stricter — including its per-message image budget — lowers the published limit, and the Host enforces that budget both when it writes the card and when the execution resolves it. One stored object is claimed once: the same content never appears twice on a card.
|
|
42
43
|
- **Host-authoritative ledger**: tasks, schedules, and execution records live in `$DSH_HOME/task-board/ledger-v2.json`; browser actions become confirmed Host transactions.
|
|
43
44
|
- **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
45
|
- **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>`, then queues the task prompt.
|
|
@@ -50,7 +51,7 @@ Cards keep multi-line title and description previews with visible metadata. Prev
|
|
|
50
51
|
- **Fail-closed pins**: a missing workspace, missing or broken preset, or rejected permission command fails before the task prompt is sent.
|
|
51
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.
|
|
52
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.
|
|
53
|
-
- **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.
|
|
54
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.
|
|
55
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.
|
|
56
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.
|
|
@@ -143,8 +144,9 @@ On macOS the backend starts `/usr/bin/caffeinate -i -w <host-pid>` and never req
|
|
|
143
144
|
|
|
144
145
|
## Data storage and migration
|
|
145
146
|
|
|
146
|
-
- The authoritative ledger file is `$DSH_HOME/task-board/ledger-v2.json` (the file name is historical); the current document schema is
|
|
147
|
+
- The authoritative ledger file is `$DSH_HOME/task-board/ledger-v2.json` (the file name is historical); the current document schema is v7, and an older document (v2, v3, v4, v5 or v6) is migrated losslessly in place on the next Host start. New POSIX files use mode `0600`; Windows inherits the user directory ACL.
|
|
147
148
|
- v5 adds the per-execution acceptance block (`verification`). The migration deliberately does NOT stamp one, so an execution opened before v5 keeps settling on its historical verdict and no in-flight run is retroactively judged by a gate that was never armed for it. A malformed block is dropped (that execution is then treated as unverified — fail closed), and an imported execution record never carries one, because a fabricated pass record must not let imported work look accepted.
|
|
149
|
+
- v6 adds the schedule plan type and the run budget, and v7 adds the card attachment metadata (`attachments`). Both are additive: a card written before the field existed keeps running exactly as it did, and a malformed attachment list is repaired entry by entry (unusable entries dropped, count and byte caps applied) instead of dropping the task row. The legacy browser import does NOT accept attachments: a v1 export never carried one, so a document claiming one is refused rather than let past the storage check.
|
|
148
150
|
- A v2 to v3 migration failure (structurally invalid task rows) fails closed with an explicit error and keeps the original file untouched; it never restarts from an empty ledger silently. A corrupt or unsupported-schema file is moved to a collision-resistant `ledger-v2.json.corrupt-*` name and the Host starts with an empty ledger plus a visible scheduler error. The corrupt bytes are not overwritten.
|
|
149
151
|
- On the first upgraded page load for an origin, `dsh.taskBoard.v1` is imported by stable source and request ids. Tasks merge by id, strictly newer browser top-level fields win, equal timestamps keep Host fields, and execution records merge by execution id.
|
|
150
152
|
- The most recent 256 request ids and SHA-256 action fingerprints are stored with the ledger, so a retried mutation remains idempotent after a Host restart without duplicating full action payloads.
|
|
@@ -162,6 +164,7 @@ On macOS the backend starts `/usr/bin/caffeinate -i -w <host-pid>` and never req
|
|
|
162
164
|
- 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).
|
|
163
165
|
- 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.
|
|
164
166
|
- 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.
|
|
167
|
+
- Attachment metadata is client-asserted too, and the Host does not believe it: every attachment an action carries is read back from the official attachment storage before the ledger commits it (an image is compared field by field, by digest and by its stored display name, a file is streamed and its digest recomputed), and a reference the storage cannot prove refuses the action. The upload route measures the ACTUAL request stream and refuses a body past the limit — the refused upload never reaches the ledger, and the storage SDK does not guarantee that a partially written backend object is cleaned up, so the board promises no such cleanup. The image read route serves an object only when a card of this board references it, so an unreferenced identifier is not readable.
|
|
165
168
|
- 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`. The permission gate judges the binding the card being run resolves on its own: a subtask's own unconfirmed elevated pin no longer blocks its parent, because the parent opens no session for it, while a subtask that runs on its own resolves an inherited binding down the ancestor chain, and the inherited binding carries that ancestor's human confirmation. The binding is never copied onto the card, so detaching a subtask cannot leave a confirmed elevated task behind.
|
|
166
169
|
- 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.
|
|
167
170
|
- 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.
|
|
@@ -213,6 +216,9 @@ Set `DSH_POWER_SMOKE=1` to opt into the native helper smoke test on Windows, mac
|
|
|
213
216
|
- Acceptance is enforced only where it can be: a run that never became a goal run (`/goal` refused or unavailable, or the global switch off) is not gated, and its record says so explicitly instead of implying it was verified; a teammate record left by a historical team run carries no acceptance either. A global-switch run is marked `goal-disabled` — its own reason, distinct from a refused command — so it is never read as a passed acceptance either. A deployment that serves no model catalog cannot resolve a judge route, so a completion claim is refused and recorded as an acceptance anomaly; once the anomaly budget is spent the card is held open rather than failed, and recovering needs a user to clear the anomalies.
|
|
214
217
|
- The first version always judges with the coding criteria: there is no automatic rubric selection, so a non-coding task is judged by engineering criteria (the settings copy states this).
|
|
215
218
|
- If a third-party verifier (for example the installed `dsh-llm-verifier`) also enables its own automatic acceptance, both judges score the same session independently: this board's acceptance gates completion while the other only steers, and no public SDK interface lets them share one verdict. Turning that plugin's automatic mode off is the only reliable way to avoid paying for two judgments.
|
|
219
|
+
- The official attachment storage has no deletion API. Removing an attachment from a card, or deleting the card itself, removes the METADATA only: the stored object stays in the deployment's attachment storage. The board neither promises a physical deletion nor works around one.
|
|
220
|
+
- A non-image attachment reaches the execution session as a readable host path, so the session can only read the file when the deployment's attachment storage is host-file-backed. A deployment whose storage hands out no readable path fails the run with that reason instead of silently running the card without its attachment.
|
|
221
|
+
- An image attachment needs a model route that accepts image input. The board asks the official model service about the route the run really uses (the card's pin, or the current route of a reused session); a route that declares its modalities and excludes images refuses the run before the prompt is queued. A route whose modalities cannot be read is treated as unknown and allowed, and a route the board cannot resolve at all skips this preflight — in both cases the official Host check remains the fallback.
|
|
216
222
|
|
|
217
223
|
## Telemetry
|
|
218
224
|
|
package/README.zh.md
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
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 官方侧栏里的「自动化任务」入口(宿主 `ui-schedule` 页面,挂在 Host Schedule 服务上)会被隐藏,侧栏因此只提供一个调度面而不是两个。该状态由看板自己的总开关掌握:关闭看板,官方入口随之回来;官方页面在其他仍可触达的地方照常工作——隐藏的是入口,不是卸载。
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
- **项目分区(issue #1536)**:看板头部新增项目下拉,选项来自当前部署的 DSH 工作区——「全部项目」加每个已注册项目。选定项目后各列只显示钉在该项目上的任务,未钉工作区的任务只在「全部项目」下可见;在某个项目下打开「新建任务」会把该项目预选为任务工作区,「新建项目…」则用与 GUI「添加项目」相同的运行时接口把宿主目录注册为项目。未选项目而创建的根任务——无论来自表单还是看板的 agent 工具——继承创建它的会话所在的工作区;仍未钉住工作区的卡片在部署最近使用的工作区里执行,而不是落到宿主自身的工作目录。
|
|
40
40
|
- **粘贴文本 AI 解析(issue #1540)**:新建任务表单可以把从别处复制的一段话交给模型,整理成标题、描述和执行 Prompt。模型取当前部署已配置的模型(与任务「模型」下拉同一份列表,默认选中第一项),调用在宿主侧完成,走看板既有的回环与同源校验,预算 45 秒并支持取消。解析结果只填进表单:不提交就不会创建任务,解析失败也不会改动你已经输入的内容。
|
|
41
41
|
- **可折叠的任务表单**:新建/复制/子任务对话框把配置分成可折叠区域——任务内容默认展开,其后依次是标签、执行设置、运行方式、交接与续跑、定时运行——每个折叠区域都保留一行当前值摘要,因此对话框不需要滚动条(正文仍保留极矮窗口下的溢出兜底)。Agent 预设字段更名为「Agent 预设」,把部署内置预设以本地化名称列出,并附上任何用户预设;默认的「继承」选项会写明未钉住时真正使用的预设。
|
|
42
|
+
- **卡片附件(issue #1979)**:一张卡片最多带八个文件或图片。新建与编辑表单支持三种加入方式——拖放、粘贴、文件选择器;选中的文件在保存卡片之前只是一份本地预览:上传发生在保存时,因此被放弃的卡片不会在存储里留下对象。拖放区可聚焦、可用键盘操作,保存进行期间移除按钮禁用。图片按位图图片存储,随执行以 Prompt 的图片部件下发,位置在文字部件之后;其余文件按原样存储,以只读路径进入执行会话,并写在独立于交接引用的附件小节里。卡片只保存**元数据**——类型、存储标识、名称、大小、媒体类型、精确字节的摘要,以及图片的像素尺寸——绝不保存字节、base64 或 data URL。展示名称始终是一行规范形、不含任何路径部分,因此既不会破坏 Prompt,也不会指向某个目录。账本提交附件之前,Host 会拿官方附件存储证明这条声明:图片读回比对,文件流式读取并重算摘要,存储无法证明的引用会让整个动作被拒绝,因此伪造的客户端声明不会成为已存事实。每次执行都会重新解析附件;声明不支持图片的路由会在 Prompt 入队之前拒绝这次运行。看板的限额是每卡 8 个附件、单附件 10 MiB、每卡合计 32 MiB;部署自身的附件存储更严格时(含每条消息的图片预算)会下调公布的上限,Host 在写入卡片与执行解析两处都强制该预算。同一个存储对象只被认领一次:同一份内容不会在一张卡上出现两次。
|
|
42
43
|
- **Host 权威账本**:任务、计划和执行记录存于 `$DSH_HOME/task-board/ledger-v2.json`;浏览器动作只有经 Host 确认后才成为 UI 状态。
|
|
43
44
|
- **有界执行历史**:每个任务只保留最近 20 条执行记录;新运行开始时截掉最旧的记录,使账本大小与每次写入成本不随任务历史无限增长。
|
|
44
45
|
- **真实执行**:手动运行和定时运行共用 Host runner,默认新建独立会话、重命名、应用 agent 预设和 `/permission <id>`,再以 queue 模式发送任务 Prompt。
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
- **钉子失败即关闭**:工作区缺失、预设缺失或损坏、权限命令被拒绝时,任务 Prompt 不会发送。
|
|
51
52
|
- **Host 调度器**:5 段 cron 支持 `*`、`*/n`、范围、逗号列表和周日 `0/7`。每条规则携带自己的 IANA 时区(默认跟随 Host 时区),日期/星期遵循 Vixie 语义:两个字段都受限时为 OR,其余组合为 AND。夏令时切换处的墙上时间空洞会被跳过,重复出现的歧义时刻只触发一次并取更早者。规则有两种计划:循环 cron(可设次数上限,支持不限、1、2 或任意正整数)或在未来某一时刻只执行一次的单次计划;Host 只统计它真正开启的执行,达到上限或单次已执行的规则会在账本里自行停止,而不是等被执行的工作去关掉它。
|
|
52
53
|
- **确定性恢复**:已有 session id 的 running execution 在重启后继续观察;没有 session id 的启动中断会取消且不会重发。
|
|
53
|
-
- **实时同步**:变更返回完整 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` 也没有帧,所以帧无法从浏览器侧被验证。无未结算执行的空闲看板零读取。
|
|
54
55
|
- **可选空闲睡眠保护**:默认关闭;开启后覆盖全部运行中的 DSH 会话、已启用且未归档的任务计划和未知会话状态。
|
|
55
56
|
- **系统提示词注入**:Host 通过 `SystemPrompt.section` 注册 order 200 的 `plugin:task-board` 段;任务看板设置可单独关闭声明而不关闭看板。该提示也会提醒 agent 在最终回复前收尾可见的 `todo_write` 计划列表。
|
|
56
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 计划。
|
|
@@ -143,8 +144,9 @@ macOS 后端启动 `/usr/bin/caffeinate -i -w <host-pid>`,绝不请求 `-d`。
|
|
|
143
144
|
|
|
144
145
|
## 数据存储与迁移
|
|
145
146
|
|
|
146
|
-
- 权威账本文件固定为 `$DSH_HOME/task-board/ledger-v2.json`(文件名为历史沿用);当前文档 schema 为
|
|
147
|
+
- 权威账本文件固定为 `$DSH_HOME/task-board/ledger-v2.json`(文件名为历史沿用);当前文档 schema 为 v7,更旧的文档(v2/v3/v4/v5/v6)会在下一次 Host 启动时逐字段无损迁移并原地写回。POSIX 新文件权限为 `0600`;Windows 继承用户目录 ACL。
|
|
147
148
|
- v5 增加每 execution 的验收块(`verification`)。迁移刻意不补写该块:v5 之前开启的 execution 仍按历史判定结算,不会因为一个从未为它武装的完成门而被追溯验收。无法解析的验收块会被丢弃(该 execution 视为未验收,fail closed);import 带入的 execution 记录一律剥离该块,否则伪造的通过记录会让导入的工作看起来已验收。
|
|
149
|
+
- v6 增加调度计划类型与次数预算,v7 增加卡片附件元数据(`attachments`)。两者都是增量式的:该字段出现之前写入的卡片行为完全不变;非法的附件列表逐条修复(丢弃不可用条目,并应用数量与字节上限),而不是丢掉整行任务。旧版浏览器 import **不接受**附件:v1 导出从不携带附件,因此声称携带附件的文档会被拒绝,而不是绕过存储校验进入账本。
|
|
148
150
|
- v2 到 v3 迁移失败(任务行结构非法)时失败关闭并报出明确错误,原文件保持不动;绝不静默以空账本重启。损坏或未知 schema 的文件会移动到防碰撞的 `ledger-v2.json.corrupt-*` 名称,Host 以空账本和可见 scheduler 错误启动,不覆盖损坏字节。
|
|
149
151
|
- 每个 origin 首次加载新版页面时,按稳定 source id 和 request id 导入 `dsh.taskBoard.v1`。任务按 id 合并,浏览器端严格较新的顶层字段优先,时间戳相同时保留 Host 字段,执行记录按 execution id 合并。
|
|
150
152
|
- 最近 256 个 request id 与动作的 SHA-256 指纹会随账本持久化,因此 Host 重启后的变更重试仍保持幂等,且不会复制完整动作载荷。
|
|
@@ -162,6 +164,7 @@ macOS 后端启动 `/usr/bin/caffeinate -i -w <host-pid>`,绝不请求 `-d`。
|
|
|
162
164
|
- 卡片有效权限高于配置的会话默认值时进入待确认状态:人工确认该确切绑定之前,Host 拒绝手动执行与 cron 触发;变更钉住权限或交接包会清除确认(封死先确认后替换的提权路径)。
|
|
163
165
|
- 任务 Prompt 是发给 DSH agent 会话的数据。协议不接受 shell 命令、PowerShell 正文、可执行路径或可配置 helper 参数。
|
|
164
166
|
- 任务标签与 Prompt 同属客户端断言,并走同一条受门禁的动作通道:协议层拒绝空标签名、未知键、超过八个标签以及超长的标签名或执行提示。标签的执行提示会做分隔符转义(无法伪造续接卡片的来源声明标记),且注入位置在该来源声明包裹之外。
|
|
167
|
+
- 附件元数据同属客户端断言,而 Host 不相信它:动作携带的每个附件都会在账本提交前从官方附件存储读回核对(图片逐字段比对、并核对摘要与存储自己的展示名称,文件流式读取并重算摘要),存储无法证明的引用会让动作被拒绝。上传路由按请求流的**实际**字节计量,超限的请求体被拒绝——被拒的上传不会进入账本,而存储 SDK 不保证已写入后端的部分对象被清理,因此看板不承诺这样的清理。图片读取路由只服务于本看板某张卡片引用过的对象,未被引用的标识读不出来。
|
|
165
168
|
- 子任务父子关系由 Host 而非浏览器判定:父任务必须存在且在看板上、任务不能挂到自己的后代之下、结果深度不得超过 `maxSubtaskDepth`。权限门只看被运行的那张卡自身解析出的绑定:子卡自己钉住的未确认高权限不再拦住父卡,因为父卡根本不为它开会话;子卡自行执行时按祖先链解析继承的绑定,并带上该祖先的人工确认戳。绑定绝不复制到卡片上,因此解除关联不会残留一张已确认的高权限任务。
|
|
166
169
|
- Agent 工具面经进程内服务直达同一个 Host 账本,而不经过 HTTP 栅栏,并且不携带任何确认能力:拒绝语义、失败即关闭的钉子、深度门禁与运行中任务锁全部照旧生效,任何工具调用都无法解除高于默认权限的绑定。
|
|
167
170
|
- 电源 helper 使用固定可执行路径、固定参数、`shell: false`,失败后按 1、2、5、10、30 秒有界退避。Linux helper 通过 Host stdin 生命周期退出,使 systemd inhibitor 随 Host 异常退出自动释放。
|
|
@@ -213,6 +216,9 @@ pnpm --filter @linxin666/dsh-client-ui-task-board build
|
|
|
213
216
|
- 验收只在能生效的地方强制执行:没有成为 goal 执行的运行(`/goal` 被拒绝或不可用,或全局总开关关闭)不受门禁,记录会明确说明,而不是暗示它已被验收;历史上团队执行遗留的 teammate 记录同样不带验收。总开关关闭的运行记为 `goal-disabled`(独立原因,与「命令被拒」区分),因此也不会被读成已验收通过。宿主不提供模型目录时无法解析裁判路由,完成声明按 fail closed 拒绝并记为验收异常;异常额度用尽后卡片保持打开而不是判死,恢复需要用户清除这些异常。
|
|
214
217
|
- 第一版一律使用 coding 判据:没有自动 rubric 选择,非工程任务也按工程判据评判(设置界面已说明)。
|
|
215
218
|
- 若第三方验收插件(例如已安装的 `dsh-llm-verifier`)也开启了自己的自动验收,两个裁判会各自对同一会话评分:本看板的验收决定能否完成,另一个只做提示,公开 SDK 接口无法让二者共享同一判定。要避免为两次判定付费,只能关闭对方的自动模式。
|
|
219
|
+
- 官方附件存储没有删除接口。从卡片移除附件、或删除卡片本身,移除的只是**元数据**:存储对象仍留在部署的附件存储里。看板既不承诺物理删除,也不为此绕路。
|
|
220
|
+
- 非图片附件以可读宿主路径进入执行会话,因此只有当部署的附件存储以宿主文件形式保存时,会话才能真正读到该文件。存储不给可读路径的部署会让这次运行以该原因失败,而不是悄悄丢掉附件照常执行。
|
|
221
|
+
- 图片附件需要接受图片输入的模型路由。看板会向官方模型服务询问这次运行真正使用的路由(卡片钉住的模型,或复用会话当前所在的路由);声明了模态且不含图片的路由会在 Prompt 入队之前拒绝这次运行。模态读不到的路由视为未知,放行;完全解析不出路由时预检被跳过——这两种情况下官方 Host 的检查仍是兜底。
|
|
216
222
|
|
|
217
223
|
## 数据遥测
|
|
218
224
|
|