@linxin666/dsh-client-ui-task-board 0.4.8 → 0.4.9

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 (64) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +28 -22
  3. package/README.zh.md +28 -22
  4. package/lib/client.js +1435 -682
  5. package/lib/client.js.map +1 -1
  6. package/lib/index.js +356 -366
  7. package/lib/types/client/PluginSettingsCard.d.ts +21 -0
  8. package/lib/types/client/TaskBoardSettingsCard.d.ts +7 -0
  9. package/lib/types/client/board/ExecutionLog.d.ts +16 -0
  10. package/lib/types/client/board/TaskForm.d.ts +4 -0
  11. package/lib/types/client/board/VerificationReport.d.ts +2 -15
  12. package/lib/types/client/body-mutations.d.ts +45 -0
  13. package/lib/types/client/locales.d.ts +42 -6
  14. package/lib/types/client/suppress-schedule-row.d.ts +86 -0
  15. package/lib/types/core/controller.d.ts +1 -1
  16. package/lib/types/core/subtask.d.ts +59 -49
  17. package/lib/types/core/tasks.d.ts +5 -8
  18. package/lib/types/core/use-cases/task-update.d.ts +1 -1
  19. package/lib/types/core/workspace-target.d.ts +23 -3
  20. package/lib/types/host/launch-admission.d.ts +8 -9
  21. package/lib/types/host-ledger.d.ts +72 -48
  22. package/lib/types/host-routes.d.ts +49 -0
  23. package/lib/types/host-runner.d.ts +20 -10
  24. package/lib/types/host-service.d.ts +7 -50
  25. package/lib/types/index.d.ts +61 -63
  26. package/lib/types/loopback.d.ts +21 -0
  27. package/lib/types/protocol.d.ts +0 -5
  28. package/lib/types/tool-surface.d.ts +1 -0
  29. package/package.json +25 -25
  30. package/src/client/CardDefaultPresetField.tsx +1 -1
  31. package/src/client/PluginSettingsCard.tsx +78 -18
  32. package/src/client/TaskBoardSettingsCard.tsx +68 -25
  33. package/src/client/board/ExecutionLog.tsx +140 -0
  34. package/src/client/board/LinkSubtaskModal.tsx +1 -9
  35. package/src/client/board/NewTaskModal.tsx +2 -11
  36. package/src/client/board/TaskCard.tsx +45 -23
  37. package/src/client/board/TaskDetail.tsx +407 -261
  38. package/src/client/board/TaskForm.tsx +19 -4
  39. package/src/client/board/VerificationReport.tsx +143 -104
  40. package/src/client/board/task-markdown.module.css +11 -8
  41. package/src/client/board-settings.module.css +35 -7
  42. package/src/client/board.module.css +855 -115
  43. package/src/client/body-mutations.ts +133 -0
  44. package/src/client/index.ts +10 -0
  45. package/src/client/locales.ts +97 -24
  46. package/src/client/settings-card.module.css +71 -10
  47. package/src/client/suppress-schedule-row.ts +198 -0
  48. package/src/core/controller.ts +1 -3
  49. package/src/core/subtask.ts +81 -76
  50. package/src/core/tasks.ts +5 -9
  51. package/src/core/use-cases/task-update.ts +1 -3
  52. package/src/core/workspace-target.ts +27 -3
  53. package/src/host/agent-tools.ts +14 -15
  54. package/src/host/launch-admission.ts +8 -9
  55. package/src/host-ledger.ts +158 -125
  56. package/src/host-routes.ts +65 -2
  57. package/src/host-runner.ts +53 -28
  58. package/src/host-service.ts +42 -127
  59. package/src/index.ts +84 -106
  60. package/src/loopback.ts +32 -0
  61. package/src/protocol.ts +2 -9
  62. package/src/tool-surface.ts +1 -0
  63. package/lib/types/client/board/team-run-promotion.d.ts +0 -26
  64. package/src/client/board/team-run-promotion.ts +0 -39
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: f2a57e29fc885f288fb7adc5fb0ffde6cbb10d36
6
- README.zh.md: 20a6aaf47bb912b7bd65e6d144f0006c2cc04f61
5
+ README.md: 4e17ddf550aa0063342019a6e9467c1304a16f5c
6
+ README.zh.md: ab61ab5a4471268d177c44bf3aef28026d2227f6
package/README.md CHANGED
@@ -5,34 +5,36 @@ 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
  &nbsp;
8
- <img src="https://img.shields.io/badge/DSH-%3E%3D0.2.1--rc.2-4c6ef5?style=flat-square&amp;labelColor=454a54" alt="DSH">
8
+ <img src="https://img.shields.io/badge/DSH-%3E%3D0.2.1--rc.3-4c6ef5?style=flat-square&amp;labelColor=454a54" alt="DSH">
9
9
  &nbsp;
10
10
  <img src="https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square" alt="License">
11
11
  </p>
12
12
 
13
13
  <p align="center">
14
14
  <strong>Autonomous Kanban Task Board & Cron Scheduling for DeepSeek Harness (DSH)</strong><br>
15
- <em>5-Column Kanban · Cron Background Scheduling · Real Agent Execution · Power Sleep Prevention · Verification Gate</em>
15
+ <em>Host-Authoritative Ledger · Parent-Card Subtask Dispatch · Double-Blind Verification · Sleep Inhibition · GitHub Issue-to-PR</em>
16
16
  </p>
17
17
 
18
- A hot-pluggable DeepSeek Harness (DSH) Web GUI and official desktop client task automation plugin with a Host-authoritative task ledger, real DSH agent session execution, cron background scheduling, cross-platform idle-sleep protection, multi-agent cascades, and automated verification quality gates. It executes unattended background workflows including automated code reviews, routine health checks, and scheduled pipelines without requiring an open browser window. It mounts cleanly via `cordis.patch.yml` and profiles without modifying DSH core code.
18
+ A hot-pluggable DeepSeek Harness (DSH) Web GUI and official desktop client task automation plugin with a Host-authoritative task ledger, real DSH agent session execution, cron background scheduling, cross-platform idle-sleep protection, parent-card subtask dispatch, and automated verification quality gates. It executes unattended background workflows including automated code reviews, routine health checks, and scheduled pipelines without requiring an open browser window. It mounts cleanly via `cordis.patch.yml` and profiles without modifying DSH core code.
19
19
 
20
- - The browser is an asynchronous view; closing the page does not stop Host scheduling or execution settlement.
21
- - Every run applies the pinned workspace, agent preset, and permission before sending the task prompt; by default each run creates its own DSH session, and a task can opt into continuing in its previous session instead (issue #1419).
22
- - dsh's built-in `/goal` is armed for every run by default, so the session keeps working automatic continuation rounds until the goal completes and the board settles the execution on that goal's end; each task can turn the option off.
23
- - The display may turn off while optional power protection keeps the computer from entering idle system sleep.
20
+ - Host-authoritative architecture and offline background execution: The browser is merely an asynchronous view; closing tabs or dropping connections will not interrupt Host scheduling, session execution, or atomic ledger settlement. Built-in cross-platform sleep inhibition (macOS, Windows, Linux) allows screens to power down while preventing system idle sleep for reliable unattended automation.
21
+ - Parent-card dispatch over subtask trees: a task can carry subtasks, one to three levels deep as the deployment allows. Running a card opens one session, that card's own: the Host opens nothing for its subtasks, and that session reads them with `task_board_get`, dispatches them with `subagent` in dependency order, and writes their conclusions back with `task_board_manage` before it finishes. A card whose subtasks are still unfinished runs under the liangshen dispatcher preset.
22
+ - Double-blind adversarial judge quality gates (No False Completion): Intercepts false agent completion claims; requires verification by an independent Judge Model using strict coding criteria, a 0.65 threshold, two-round A/B position swapping, and validation against real workspace filesystem diffs, returning actionable diagnostics for self-repair.
23
+ - Automated GitHub loop, freeze handover, and agent tool surface: Real-time bidirectional GitHub Issues sync automates agent bug fixing and PR creation; supports `<<<FREEZE` session context snapshots with handover packages; exposes 8 native model tools for autonomous planning and external execution registration.
24
24
 
25
25
  ## Features
26
26
 
27
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 group cards into Today / Last 7 days / Earlier and fold the oldest group once a column holds more than 30 cards, unless a search is active.
28
28
 
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 status row: 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.
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
+ - **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.
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.
30
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.
31
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.
32
34
  - **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.
33
35
  - **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. A **Manage labels** action on the filter row opens the label manager: every label in use with the number of tasks carrying it, a rename that rewrites the label on every card (merging into an existing label of that name and keeping that label's execution hint), and a delete that removes it from every task including archived ones. Both are ledger-wide Host transactions, so several windows looking at one board stay consistent.
34
- - **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 the members of its subtask tree that still have work, concurrently — one DSH session per member, all under one run group, with at most `runLaunchWidth` of them in flight at once — and a subtask already in the done column is not executed again (the same rule for a manual run, a re-run and a due occurrence; move it back to the todo column, or run it on its own, to run it again). The parent card stays in the running column until its own turn and every subtask this run opened 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.
35
- - **Agent Team runs (per task)**: successfully creating or linking a subtask from the task detail automatically enables team execution on its parent when the deployment serves Agent Teams. Cancelled or failed actions and existing task trees leave the preference unchanged. The parent can be switched back to independent sessions in its detail view; another successful create/link enables Team again. A task may also enable it explicitly 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. 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 Lead's verdict governs the run: a teammate's own completed turn settles its card even while the Team keeps that session alive, and once the Lead's own outcome lands, every member still open is settled with it. 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 pin the Lead session does not already carry is refused, because a teammate inherits that session's permission and cannot be narrowed below it — a pin the Lead already covers runs the member at the Lead's authority instead of failing the run. Team runs always mint a fresh Lead session (teammate names are immutable within a Team) and use `teamProvider`. An execution whose session history cannot be read at all is reported failed with the reason after two minutes of polling, so an unreadable session can never leave a card in the running column.
36
+ - **Subtasks and parent-card dispatch**: 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 card opens one session for that card and none for its subtasks, and running a subtask directly is the same operation: that card is the root of the run even when it carries a parent and subtasks of its own, and nothing under it is expanded. A subtask already in the done column is outside the run's dispatch set, so finishing subtasks one by one and then running the parent costs one session instead of a repeat of the tree; move it back to the todo column to have it dispatched again. The board marks parent and subtask cards, the detail view lists the direct subtasks and says what one run will do, and the header offers a one-click hide-subtasks filter.
37
+ - **Parent-card dispatch and subtask accounting**: clicking a card that carries unfinished subtasks opens that card's own session and nothing else. The run is forced under the `liangshen` dispatcher preset shipped by `packages/dsh-liangshen`, the card's stored agent preset is never rewritten, and session reuse is skipped so the run mints a fresh session; a deployment that registers no `liangshen` preset fails the run closed, with that missing preset as the reason on the card. The prompt names every unfinished subtask with its title, task id, and status, states that no session is opened for them, and asks the session to read each card with `task_board_get`, dispatch it with `subagent` in dependency order (independent ones may run together), and write each conclusion back with `task_board_manage({action:'record-external-outcome'})` before it finishes. A conclusion the session never wrote back is supplied by the Host when the card's own run ends: every still-unrecorded unfinished subtask inherits that verdict as an external record whose initiator reads `parent-run:<card id>` and whose reason says the card ran no session of its own and inherited the parent run's conclusion. The backfill is idempotent, and a cancelled parent writes nothing. A card with no unfinished subtask is unaffected.
36
38
  - **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.
37
39
  - **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.
38
40
  - **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.
@@ -50,7 +52,7 @@ Cards keep multi-line title and description previews with visible metadata. Prev
50
52
  - **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.
51
53
  - **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.
52
54
  - **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.
53
- - **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 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.
55
+ - **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.
54
56
  - **External outcomes (issue #1826)**: work that is not executed by this Host — an agent outside DSH such as Codex or Claude Code, running its own model — can be recorded as a real run rather than a bare column edit. `task_board_manage(action: 'record-external-outcome', result: 'succeeded'|'failed', initiatedBy: <who>)` appends an execution record carrying the verdict, the caller and an optional summary, and the terminal column is derived from that same record by the same rule a Host settlement uses (`core/tasks.ts` `settledStatus`). The record is marked `external`, never carries a session, and is refused while the card still has an open execution (while this Host is running the card it stays the only authority) and on an archived card. `running` and `cancelled` cannot be recorded this way: those stay Host-only. A manual `move-done`/`move-failed` remains available and still writes only the column — the difference is that this one leaves a record behind, so the column and the run history can never disagree.
55
57
 
56
58
  - **External provider extensions**: the GitHub Issues extension (`@linxin666/dsh-client-ui-task-board-github`, enabled by default) synchronizes GitHub Issues into board cards. It is a provider of THIS board, so its configuration renders inside this plugin's own settings card — the section only appears while the extension is installed, and its repository/credential form only while the extension is on; see [its README](../dsh-task-board-github/README.md).
@@ -65,7 +67,7 @@ The board view renders on first open and keeps its local view state when closed
65
67
  - `src/client/native-panel.tsx` registers the board's sidebar row and center-column page (the official `sidebar.panellist` list seat and the keyed `main` seat) and maintains the center-column exclusivity protocol with the ssh panel.
66
68
  - `src/client/host-api.ts` imports legacy browser data once, submits idempotent actions, and treats Host snapshots as the only confirmed UI state.
67
69
  - Same-origin endpoints are `GET /api/task-board/state`, `GET /api/task-board/events`, and `POST /api/task-board/action`.
68
- - Every endpoint requires a browser same-origin marker: `sec-fetch-site: same-origin`, an `Origin` header, or the Host's `dsh-auth-*` browser-auth cookie. The last one is how the DSH Desktop shell reaches the board: it serves the Web GUI from `dsh-app://app/` and forwards that page's requests itself, dropping `Origin` and `sec-fetch-site` and attaching the authority-bound cookie it redeemed from the Host's launch URL at startup. 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.
70
+ - Every endpoint requires browser authentication. Under the board's own fence that means a browser same-origin marker: `sec-fetch-site: same-origin`, an `Origin` header, or the Host's `dsh-auth-*` browser-auth cookie. The last one is how the DSH Desktop shell reaches the board: it serves the Web GUI from `dsh-app://app/` and forwards that page's requests itself, dropping `Origin` and `sec-fetch-site` and attaching the authority-bound cookie it redeemed from the Host's launch URL at startup. Direct access is restricted to the DSH loopback origin. A deployment DSH itself serves through a trusted reverse proxy or ingress is instead admitted by the Host's `connection` service, which applies its own Host/Origin fence and verifies the signed browser session before the board sees the request; an authenticated same-host proxy that DSH does not front must use an explicit Host allowlist and a server-injected token, and a deployment whose own tunnel dials the loopback upstream can instead turn on `trustForwardedProxy` (see Configuration), which admits that shape on the same-origin marker alone. 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.
69
71
 
70
72
  ## Agent tools
71
73
 
@@ -76,7 +78,7 @@ The board is operable from a conversation, not only from the GUI. Each tool driv
76
78
  - `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.
77
79
  - `task_board_update` edits content, labels, and execution targets; an empty string clears a target and an empty label array clears the labels.
78
80
  - `task_board_set_parent` links an existing card under a parent, or detaches it with an empty parent id.
79
- - `task_board_run` runs a card now (optionally re-running a settled one), cascading over the subtask tree members that are not in the done column; it consumes real API quota and refuses an unconfirmed above-default permission with `confirmation-required`.
81
+ - `task_board_run` runs a card now (optionally re-running a settled one) and nothing else: the card gets its own session, the Host opens none for its subtasks, and a card with unfinished subtasks is told which of them its session must dispatch; it consumes real API quota and refuses an unconfirmed above-default permission with `confirmation-required`.
80
82
  - `task_board_manage` moves a card to any column — the move writes the column and never an execution record, so backlog/todo plan, done/failed declare work that finished outside a tracked run and running parks work that is under way without a session, while a card with an open execution refuses the move until it settles — archives or restores it, deletes it, or settles a running card the board can no longer observe (recording a cancelled verdict with the caller as the reason and returning the card to todo), with the Host's running-task and subtask guards.
81
83
  - `task_board_schedule` arms, changes, or disarms a card's schedule — a recurring cron rule (optionally capped by `maxRuns`; `0` clears the cap back to unlimited) or a one-shot at an epoch-millisecond `at` — including its IANA time zone (an empty `timeZone` clears it back to the Host zone).
82
84
 
@@ -111,10 +113,11 @@ This plugin's settings card groups its options into collapsible sections — the
111
113
  | `preventIdleSleep` | `false` | Holds one system idle-sleep assertion while any DSH session runs, any schedule is enabled, or session state is unknown. |
112
114
  | `trustedProxyHosts` | `[]` | Canonical `host[:port]` authorities accepted only through the authenticated loopback reverse-proxy path. |
113
115
  | `proxyTokenEnv` | `DSH_TASK_BOARD_PROXY_TOKEN` | Environment variable containing the reverse-proxy token; the token itself is never stored in plugin config. |
116
+ | `trustForwardedProxy` | `false` | Admits a forwarded request that landed on this machine's loopback upstream — the shape your own reverse proxy or tunnel produces when it dials `127.0.0.1:<port>` — on the browser same-origin marker alone. Off keeps every forwarded request remote (issue #1906); on still refuses an explicit `sec-fetch-site: cross-site` marker, and the token-allowlisted proxy path above is unchanged. Volatile: read at each request, so an edit binds the next one without a restart. |
114
117
  | `sessionDefaultPermission` | follow the Host | Explicit baseline for the permission confirmation gate. Unset, the board follows the Host's own default permission preset (what new DSH sessions start at) and falls back to `read-only` when the deployment serves no permission catalog. A card whose effective permission (handover bundle or pin) is above the baseline requires a human confirmation before it may run; cron refuses unconfirmed cards. |
115
- | `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. |
118
+ | `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. It decides only how deep the tree under one card can go: a run opens that card's own single session and dispatches its subtasks from there, so the depth never changes how many sessions one run opens. |
116
119
  | `sessionPollSeconds` | `5` | How often, in seconds, the Host re-reads the DSH session roster while the board has something to reconcile: a running card or an open execution. An idle board with neither does not poll at all. Range 1 to 300; a shorter interval settles runs sooner and costs the Host more. |
117
- | `runLaunchWidth` | `3` | How many run launches may be in flight at once, 1 to 16. One run opens its whole subtree, so this bounds the burst of sessions one run action creates; the waiting members still start, they just enter the running column in batches. The default follows this repository's measured guidance for heavy implementation subagents (at most three). Read at each admission, so a live edit bounds the launches that have not been admitted yet. |
120
+ | `runLaunchWidth` | `3` | How many run launches may be in flight at once, 1 to 16. It only matters when several cards want to run at the same moment — a manual run, a re-run and a due occurrence alike: that many executions are admitted to create their session and queue their prompt, and the rest wait their turn, round-robin across runs and FIFO inside one. Running a single card opens one session, so this value never changes the shape of one run. The default follows this repository's measured guidance for heavy implementation subagents (at most three). Read at each admission, so a live edit bounds the launches that have not been admitted yet. |
118
121
  | `spendBudgetTokens` | `0` | Daily token ceiling for the work this board dispatches. `0` means no gate, and the board then reads no ledger and counts nothing at all. The unit is tokens because the usage ledger prices only DeepSeek's own routes and reports 0 for every other route. Measured against the family usage ledger's local-date bucket: a manual run or re-run whose day already spent the cap is refused, and the caller sees that message as its board-refused reason; a due schedule records the refusal on the scheduler error and skips the occurrence without spending a planned run, so raising the cap or the local day rolling over admits the next trigger. Read at each gate, so an edit binds the next run without a restart. |
119
122
  | `goalRunEnabled` | `false` | GLOBAL native `/goal` switch. While off, every card runs one plain turn and the board never arms dsh's built-in `/goal`; a run uses native `/goal` only when this is on AND the card's own Start with /goal option is checked (that option is off by default). The value is frozen when an execution starts, so a live edit only affects executions that begin afterwards, and a card's stored `goalRun` preference is never rewritten. Such a run is recorded as `goal-disabled`: it is neither reported as accepted nor failed for lacking a completion call. Independent of `goalVerification`. |
120
123
  | `goalVerification` | `true` | Goal acceptance for executions this board starts. When on, `update_goal(action: complete)` inside a task execution is refused until an acceptance pass is recorded for that execution. Only goal-form executions are affected: plain chat and a card that did not opt into `goalRun` are untouched. A single card can opt out of the gate on its own with the Skip acceptance checkbox (below). |
@@ -122,7 +125,6 @@ This plugin's settings card groups its options into collapsible sections — the
122
125
  | `goalVerificationReasoningEffort` | `''` (inherit) | Judge reasoning level. Blank inherits the host default level; a level the resolved model does not declare is never sent, and the fallback to that model's own default is recorded and shown. |
123
126
  | `goalVerificationCallTimeoutSeconds` | `150` | Ceiling of ONE judge request of an acceptance, in seconds (range 30 to 600). One acceptance issues six judge requests, so a ceiling too small for the judge model turns a slow but healthy route into a wall of timeouts. |
124
127
  | `goalVerificationBudgetSeconds` | `1200` | Total ceiling of ONE acceptance attempt, in seconds (range 120 to 1800), covering evidence rendering and every judge call including retries. Keep it at or above the per-call ceiling times six or the acceptance can never finish; an attempt that runs out is recorded as a budget stop that judges nothing and spends no budget. |
125
- | `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. |
126
128
  | `cardDefaultMode` | `''` (no default) | Agent preset a newly created card starts from. Blank pins nothing, so the card follows the deployment default as before. |
127
129
  | `cardDefaultPermission` | `''` (no default) | Permission a newly created card starts from. It may sit above the session permission baseline: it is a prefill, so an above-baseline binding still needs a human confirmation before the card runs. |
128
130
  | `cardDefaultModel` | `''` (no default) | Execution model (`provider/model`) a newly created card starts from. Blank pins nothing and makes `cardDefaultReasoningEffort` inert. |
@@ -130,7 +132,11 @@ This plugin's settings card groups its options into collapsible sections — the
130
132
 
131
133
  All four new-card defaults are blank by default and volatile: an edit takes effect without a restart, for the cards created afterwards and on a page that is already open (no reload is needed for the new-task dialog to offer the saved values), and a blank value pins nothing, so a deployment that configures none of them creates cards exactly as it does today. A new card takes each of its execution targets in one order — the explicit choice made in the new-task dialog wins over the values carried over from the card it was created from (a duplicate keeps its source's pins, a subtask keeps its parent's), which win over the board defaults — and the parent's permission is never carried over. None of the four lifts the permission gate: a default permission above the session baseline is only a prefill, and the card still waits for a human confirmation before it may run.
132
134
 
133
- 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.
135
+ Direct browser access remains limited to the DSH loopback origin. A deployment that DSH already serves through its own trusted-proxy or ingress arrangement (for example `dsh web --trusted-host dsh.example.internal` behind TLS termination) needs no board-specific setting: the routes bridge the Host's `connection` service, so a request whose Host/Origin fence and signed `dsh-auth-*` browser session that service accepts is admitted on its verdict, while a request it declines still faces the board's own fence. This path grants nothing a browser without the Host-issued session could use, and it is independent of the settings below.
136
+
137
+ 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.
138
+
139
+ The alternative shape is a request an operator's own tunnel or reverse proxy forwarded to this machine. With `trustForwardedProxy` on, a request that carries a forwarding header and arrived on the loopback upstream (loopback socket and loopback Host) is admitted on the browser same-origin marker alone; an explicit `sec-fetch-site: cross-site` marker is still refused, and a request that came through a proxy that is not dialing this machine stays remote. The switch is volatile and read per request, so an edit binds the next request; leave it off unless you operate the hop yourself, because a proxy you do not control can forge those markers on your behalf.
134
140
 
135
141
  On macOS the backend starts `/usr/bin/caffeinate -i -w <host-pid>` and never requests `-d`. On Windows it starts the absolute Windows PowerShell under `SystemRoot` with a fixed helper that requests only `ES_CONTINUOUS | ES_SYSTEM_REQUIRED`; it never requests `ES_DISPLAY_REQUIRED`, changes a power plan, or requires administrator privileges. On Linux it starts a systemd-logind `idle` block inhibitor only from `/usr/bin/systemd-inhibit` or `/bin/systemd-inhibit`; it does not request `sleep`, `handle-lid-switch`, or a display/screensaver inhibitor. A Linux host without systemd-logind reports `unsupported` or a visible error and does not start a desktop-specific fallback. Other platforms report `unsupported`.
136
142
 
@@ -149,13 +155,13 @@ On macOS the backend starts `/usr/bin/caffeinate -i -w <host-pid>` and never req
149
155
 
150
156
  ## Security model
151
157
 
152
- - The plugin stays inside the existing DSH Web deployment and network boundary and emits no permissive CORS headers. State, action, and SSE routes share the same access fence; bare local command-line requests are not accepted as browser requests.
158
+ - The plugin stays inside the existing DSH Web deployment and network boundary and emits no permissive CORS headers. State, action, and SSE routes share the same access fence; bare local command-line requests are not accepted as browser requests. When the deployment serves the Host's `connection` service, the fence admits exactly the requests that service already authenticated — its Host/Origin fence plus the signed `dsh-auth-*` browser session — and keeps its own loopback and token checks as the fallback for every other request. The fence otherwise refuses every forwarded request unless `trustForwardedProxy` is on, and even then only the forwarded shape that landed on this machine's loopback upstream and carries no cross-site marker.
153
159
  - All mutation payloads use a strict, versioned discriminated union; schedule-owned timestamps and execution outcomes cannot be written by the browser.
154
160
  - Workspace, preset, permission, cron, task status, and imported records are validated again on the Host.
155
161
  - 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).
156
162
  - 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.
157
163
  - 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.
158
- - 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.
164
+ - 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.
159
165
  - 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.
160
166
  - 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.
161
167
 
@@ -195,15 +201,15 @@ Set `DSH_POWER_SMOKE=1` to opt into the native helper smoke test on Windows, mac
195
201
  - 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.
196
202
  - Keeping enabled schedules armed may increase battery consumption because protection starts before their future trigger time.
197
203
  - Host execution consumes the same API quota as an ordinary DSH agent session.
198
- - Running a task also runs the unfinished members of its subtask tree: every one of them gets its own DSH session, started in batches of `runLaunchWidth` (three by default), so a deep tree opens several concurrent sessions and each consumes API quota. A subtask that is already done is skipped, so re-running a parent after its subtasks were finished one by one costs one session, not the whole tree.
199
- - 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.
204
+ - Running a card opens one session, its own, and that session dispatches the unfinished subtasks with subagents inside it: a card with many subtasks consumes the quota of every subagent it dispatches, while the board itself opens nothing extra. A subtask whose conclusion is never written back inherits the parent run's verdict, which records the parent's judgement rather than a separate execution of that card.
205
+ - Agent tool calls are model-driven: a run or a scheduled execution 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.
200
206
  - A goal run keeps working for as many rounds as the objective needs: every round consumes API quota, and the session stays busy until the goal completes or dsh blocks it (round limit, a rejected round, or a failed queue), which the board reports as a failed execution.
201
207
  - Goal mode needs the runtime's `/goal` command and a command dispatcher. A deployment that serves neither still runs every card as a single turn; the host log reports that the goal was unavailable instead of failing the run.
202
208
 
203
209
  - Acceptance spends model requests: one acceptance is three criteria times two rounds (six judge requests), and one execution may accept twice, so a goal cycle that needs its one repair costs up to twelve extra requests on top of the work itself.
204
210
  - No cost estimate is shown for an acceptance: this deployment exposes no reliable per-token price for the resolved judge route, so the report lists tokens only.
205
211
  - The host-observed workspace-change block appears only when the deployment records changes and the read succeeds; an unavailable service or a failed comparison degrades the evidence to the trajectory alone rather than failing the acceptance.
206
- - 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) and a teammate execution are not gated, and their record says so explicitly instead of implying they were verified. 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.
212
+ - 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.
207
213
  - 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).
208
214
  - 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.
209
215
 
package/README.zh.md CHANGED
@@ -5,34 +5,36 @@
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
  &nbsp;
8
- <img src="https://img.shields.io/badge/DSH-%3E%3D0.2.1--rc.2-4c6ef5?style=flat-square&amp;labelColor=454a54" alt="DSH">
8
+ <img src="https://img.shields.io/badge/DSH-%3E%3D0.2.1--rc.3-4c6ef5?style=flat-square&amp;labelColor=454a54" alt="DSH">
9
9
  &nbsp;
10
10
  <img src="https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square" alt="License">
11
11
  </p>
12
12
 
13
13
  <p align="center">
14
14
  <strong>DeepSeek Harness(DSH)官方 Web GUI 与桌面客户端自动化任务管理与长程后台执行引擎</strong><br>
15
- <em>5 列状态流转 · Cron 后台定时调度 · 智能体真实执行 · 防休眠电源保护 · 任务验收质检</em>
15
+ <em>Host 权威事务账本 · 父卡自治派发子任务 · 对抗式双盲裁判验收 · 离线 Cron 与防休眠电源保护 · GitHub Issue-to-PR 闭环</em>
16
16
  </p>
17
17
 
18
- 一个高可用、可热插拔的 DeepSeek Harness (DSH) Web GUI 与官方桌面客户端任务自动化插件,提供 Host 权威任务账本、真实 DSH 会话自动化执行、Cron 表达式后台定时调度、跨平台空闲睡眠保护、多 Agent 团队级联与自动化质量验收门禁。用户无需常驻浏览器,即可在后台无人值守运行代码巡检、健康检查与定时自动化流水线。插件只通过 `cordis.patch.yml` 与 profile 机制挂载,零修改侵入 DSH 官方源码。
18
+ 一个高可用、可热插拔的 DeepSeek Harness (DSH) Web GUI 与官方桌面客户端任务自动化插件,提供 Host 权威任务账本、真实 DSH 会话自动化执行、Cron 表达式后台定时调度、跨平台空闲睡眠保护、父卡自治派发子任务与自动化质量验收门禁。用户无需常驻浏览器,即可在后台无人值守运行代码巡检、健康检查与定时自动化流水线。插件只通过 `cordis.patch.yml` 与 profile 机制挂载,零修改侵入 DSH 官方源码。
19
19
 
20
- - 浏览器只是异步视图;关闭页面不会停止 Host 调度或执行结算。
21
- - 每次运行在发送任务 Prompt 前应用钉住的工作区、agent 预设与权限;默认每次新建独立 DSH 会话,任务也可选择改为在上一会话中继续(issue #1419)。
22
- - 默认每次运行都会武装 dsh 内置的 `/goal`:会话自动续跑多轮直到目标完成,看板在该目标真正结束后才结算本次执行;每个任务都可以关闭该选项。
23
- - 可选电源保护允许显示器熄灭,同时阻止整机因空闲进入系统睡眠。
20
+ - 宿主权威架构与离线后台执行:浏览器仅为异步视图,关闭页面或断网不影响 Host 调度、会话执行与原子账本结算;内置跨平台防休眠电源管理(macOS/Windows/Linux),允许显示器息屏同时阻止整机闲置休眠,确保无人值守长程自动化。
21
+ - 树状子任务的父卡自治派发:任务可以带子任务,深度按部署设置 1 到 3 层。执行一张卡只开它自己的一个会话:Host 不为子任务开任何会话,这个会话自己用 `task_board_get` 读子卡、用 `subagent` 按依赖顺序派发、完工前用 `task_board_manage` 回填结论。还有未完成子任务时,这次执行改用梁神(liangshen)派发预设。
22
+ - 对抗式双盲质量验收门禁(No False Completion):拦截 Agent 虚假完工自述,必须经由独立裁判模型沿用严苛 Coding 判据与 0.65 阈值进行 A/B 位置轮换打分,结合真实工作区磁盘 Diff 行级变更进行质检验收,带结构化问题反馈闭环自愈。
23
+ - 全自动 GitHub 闭环、冻结交接与智能工具面:无缝双向同步 GitHub Issues,自动驱动 Agent 修复并创建关联 PR;支持 `<<<FREEZE` 会话上下文安全快照与交接包;提供 8 项面向模型的原生工具,支持 Agent 自主规划与外部执行结果登记。
24
24
 
25
25
  ## 功能
26
26
 
27
27
  卡片保留多行标题、描述预览及可见的元数据。预览去除 Markdown 标记,详情中的描述与 Prompt 按安全 Markdown 渲染,不执行原始 HTML 或自动加载远程图片;超过约八行的内容默认按固定高度钳制并带渐隐提示,点「展开全文」展开、可再收起,未超出的内容原样渲染且无切换按钮。任务原文保持不变。标题开头的方括号前缀(如 `[Bug]:`)渲染为类型徽章,描述预览跳过 Issue 表单的模板内容(勾选列表、小节标题、空字段占位),存在摘要类小节时优先取它。卡片左侧色条显示最近一次执行(运行中、成功、失败、取消);所在列与该次执行不一致的卡片标注为手动结算。每列显示能区分卡片的时间——待规划/待办为创建时间、运行中为开始时间、已完成/已失败为结算时间——按 Host 时区读取。最近一次执行的会话可直接从卡片打开。每个列头都可切换紧凑单行卡片(已完成列默认紧凑,选择保存在浏览器中);已完成、已失败与归档按「今天 / 近 7 天 / 更早」分组,列内超过 30 张卡时折叠最早一组,搜索时不折叠。
28
28
 
29
- - **任务看板 UI**:看板是 shell 自己的中栏面板——它像桌面版【插件】页那样,向 shell 的官方侧栏面板列表贡献一行、向布局的中栏座位贡献一页,因此行的几何、选中高亮、折叠 rail、标签与语言切换都由 shell 统一负责;看板提供五列布局、搜索、任务详情、归档/恢复、执行历史和执行会话跳转。五列都可以手工切换:拖拽卡片或在详情页点状态即可,只写列、不产生执行记录——「已完成」「已失败」声明工作在受追踪的执行之外结束(或失败),「进行中」则表示工作正在进行但没有对应会话;真正在执行中的卡片在结算前拒绝任何移动。归档任务除恢复、删除和查看 transcript 外保持只读,恢复前不能手动或定时执行。
29
+ - **任务看板 UI**:看板是 shell 自己的中栏面板——它像桌面版【插件】页那样,向 shell 的官方侧栏面板列表贡献一行、向布局的中栏座位贡献一页,因此行的几何、选中高亮、折叠 rail、标签与语言切换都由 shell 统一负责;看板提供五列布局、搜索、任务详情、归档/恢复、执行历史和执行会话跳转。五列都可以手工切换:拖拽卡片或从详情页的「移动到…」菜单切换状态,只写列、不产生执行记录——「已完成」「已失败」声明工作在受追踪的执行之外结束(或失败),「进行中」则表示工作正在进行但没有对应会话;真正在执行中的卡片在结算前拒绝任何移动。归档任务除恢复、删除和查看 transcript 外保持只读,恢复前不能手动或定时执行。
30
+ - **侧栏只有一个调度入口**:看板启用期间,shell 官方侧栏里的「自动化任务」入口(宿主 `ui-schedule` 页面,挂在 Host Schedule 服务上)会被隐藏,侧栏因此只提供一个调度面而不是两个。该状态由看板自己的总开关掌握:关闭看板,官方入口随之回来;官方页面在其他仍可触达的地方照常工作——隐藏的是入口,不是卸载。
31
+ - **任务详情的布局与折叠**:任务详情在宽视口上是双栏——左栏是任务本身(描述、执行 Prompt、标签、子任务、冻结快照、交接包),右栏是这次执行会怎么跑(执行设置、定时运行、执行记录、状态);窄视口按同一顺序退回单栏。执行设置里的工作区、Agent 预设、权限、模型与思考档位常驻可见,三个卡片级开关(同一对话继续、以 /goal 开始执行、跳过本任务的验收)收进一行「高级设置」,收起时在行上回显已开启项,因此不展开也知道这张卡会怎么跑。定时运行与执行记录各占一行折叠:定时行说明是否启用与下次触发时刻,执行记录行说明次数与最近一次结果,记录本身默认只列最近五次,展开才看全部;每条记录里的验收报告在行上只给一个结论徽标,展开后才是判定、裁判路由、逐项分数与问题反馈。权限确认门与当前状态不折叠。视图内字号只有三档(标题、正文、元信息),状态与结果徽标共用一套填充色槽位,折叠行与按钮的命中区不小于 44 像素。
30
32
  - **续接卡片(数据面)**:新建任务时可粘贴会话输出的 `<<<FREEZE … >>>FREEZE` 冻结块,解析为「目标/进度/下一步」快照随任务持久化(v3 账本);卡片带冻结徽标,详情页可读完整快照与冻结时间,搜索覆盖快照文本,归档/恢复与普通任务一致。快照在协议层复用冻结安全门:敏感模式自动替换为 `[REDACTED]` 并标记、以 `/` 开头的命令行整体拒绝、每字段 8 KiB 上限。
31
33
  - **交接包与权限确认门**:续接卡片可附交接包——钉住三元组(工作区/agent 预设/权限)加文档与脚本引用。执行时交接包三元组覆盖普通钉住字段,引用以交接前言随 Prompt 下发。有效权限高于部署权限基线——未钉住 `sessionDefaultPermission` 时即宿主自己的默认权限预设——的绑定处于待确认状态:手动执行被拒绝、cron 跳过该卡并滚动到下一触发点,任务详情中的确认按钮完成人工确认;此后任何权限或交接包变更都会重新武装确认门。
32
34
  - **领卡来源声明包裹与来源审计**:执行续接卡片(带冻结快照的卡片)时,任务指令被来源声明模板强制包裹——冻结时间、来源会话与未经人工审查提示,组合在交接前言之后,使接手 Agent 对卡片文本中的存储型提示注入保持警惕。create/update 动作的发起方会话织入快照(frozenBy,快照被替换时重新盖章),run/rerun 的发起方会话连同冻结来源的捕获副本一起落在执行记录(initiatedBy)上,两者均可在任务详情查看。发起方为客户端断言的审计元数据,不构成信任边界。
33
35
  - **任务标签(issue #1521)**:每个任务可带最多八个标签。标签在卡片上渲染为带色调的徽章——色调由标签名哈希得到,因此同一标签永远同色,也不需要存储颜色;看板顶栏据此提供多选标签筛选,候选项来自全账本在用的标签(含已归档任务),搜索也会匹配标签名。填了「执行提示」的标签会在每次执行前以 `标签提示` 段注入到执行 Prompt 之前;没填的标签只作展示与筛选,因此无标签任务的 Prompt 与加入该功能前逐字节一致。标签在首次执行后仍可编辑:它们给任务分类、塑造下一次运行,而不是「已经跑过什么」的凭证。筛选行的**管理标签**入口会打开标签管理器:列出每个在用标签及其任务数,重命名会写到所有卡片上(与已有同名标签合并,并保留该标签的执行提示),删除会从全部任务(含已归档)上移除。两者都是 Host 的整账本事务,因此多个窗口看同一块看板时状态一致。
34
- - **子任务与级联执行**:任务可以有子任务——在详情页新建子任务(表单以父任务的工作区、模式、权限和模型为起点,每一项都可覆盖),或把一个还没有父任务的现有任务关联为子任务;子任务不在运行中时也可以解除关联。父子关系的准入由 Host 判定:父任务必须存在且在看板上、任务不能挂到自己的后代之下、树的深度不得超过配置的 `maxSubtaskDepth`(默认 1 层,最大 3 层)。执行一个任务会并发执行它这棵子任务树里尚未完成的成员——每个成员各开一个 DSH 会话,同属一个 run group,同一刻最多 `runLaunchWidth` 个在启动——已经在「完成」列的子任务不会被重复执行(手动执行、重新执行与定时到点都是同一条规则),需要重跑时把它移回「待办」列或单独执行它;父任务卡片会一直留在「进行中」列,直到它自己的回合与它本次开启的子任务都结算;任一成员失败则父任务判为失败,而单个子任务失败不会阻塞其它子任务。看板会标注父任务与子任务卡片,详情页列出直接子任务,顶栏提供一键隐藏子任务。
35
- - **Agent Team 执行(任务级)**:部署提供 Agent Teams 服务时,在任务详情中成功创建或关联子任务会自动开启父任务的团队执行。取消、失败和已有任务树不改变该偏好。用户可在父任务详情中手动切回独立会话;再次成功创建或关联子任务会重新开启 Team。任务也可经 `task_board_create`/`task_board_update` 显式开启团队执行。执行这样的任务只启动一个会话——Team Lead——随后 Host 通过 Agent Teams 服务在它内部为每个子任务派生一个 teammate,并把 teammate 的会话挂到该子任务的 execution 上。整棵子树被压平成这一个 Team(只有 Lead 可以派生);Lead 的提示词按名字列出每个 teammate 并指向团队工具,团队执行由 Lead 判定统辖:teammate 自己已完成的回合即结算它的卡片(即使 Team 仍让该会话存活),Lead 自身结果落定后,仍未报结果的成员一并按该判定结算。普通级联的提示词结构相同,只是改为列出各独立会话。该模式依赖可选的 `agentTeams` 服务:未提供该服务的部署会明确拒绝执行而不是静默降级;子任务自己的权限钉住若高于 Lead 会话实际权限也会被拒绝,因为 teammate 继承 Lead 会话的权限且无法被收窄;Lead 已覆盖的钉住则让该成员按 Lead 的权限照常执行,而不是让整次运行失败。团队执行总是新建 Lead 会话(同一 Team 内 teammate 名字不可变),并使用 `teamProvider`。会话历史完全读不到的 execution 会在轮询满两分钟后带原因判为失败,因此读不到历史的会话不会把卡片永久留在运行列。
36
+ - **子任务与父卡自治派发**:任务可以有子任务——在详情页新建子任务(表单以父任务的工作区、模式、权限和模型为起点,每一项都可覆盖),或把一个还没有父任务的现有任务关联为子任务;子任务不在运行中时也可以解除关联。父子关系的准入由 Host 判定:父任务必须存在且在看板上、任务不能挂到自己的后代之下、树的深度不得超过配置的 `maxSubtaskDepth`(默认 1 层,最大 3 层)。执行一张卡只为这张卡开一个会话,不为它的子任务开任何会话;直接点某张子卡执行也是同一件事:它自己就是这次运行的 root,即使它有父卡、自己也有子任务,也不会展开。已在「完成」列的子任务不在这次的派发集合里,因此把子任务逐个做完再执行父卡只花一个会话,而不是整棵树重来;需要重新派发就把它移回「待办」列。看板会标注父任务与子任务卡片,详情页列出直接子任务并说明一次执行会怎么做,顶栏提供一键隐藏子任务。
37
+ - **父卡自治派发与子卡记账**:点击一张带未完成子任务的卡,只开这张卡自己的会话,别的都不开。这次执行强制使用 `packages/dsh-liangshen` 提供的 `liangshen` 派发预设,卡片自己存的 Agent 预设绝不被改写,session 复用被跳过、新开一个会话;部署没有注册 `liangshen` 预设时失败关闭,原因写在卡片上。启动 Prompt 会列出每张未完成子卡的标题、任务 id 与状态,说明本次不为它们开会话,并要求这个会话用 `task_board_get` 读每张子卡、用 `subagent` 按依赖顺序派发(互不依赖的可以并发)、完工前用 `task_board_manage({action:'record-external-outcome'})` 把结论一次性写回。会话没有回填的结论由 Host 在父卡自身运行结束时补上:仍未回填的未完成子卡继承这次运行的判定,记为一条 external 记录,发起方写作 `parent-run:<父卡 id>`,原因说明本卡未单独开会话执行、结论继承自父卡运行。这次回填幂等,父卡判定为 cancelled 时不写。没有未完成子任务的卡不受影响。
36
38
  - **项目分区(issue #1536)**:看板头部新增项目下拉,选项来自当前部署的 DSH 工作区——「全部项目」加每个已注册项目。选定项目后各列只显示钉在该项目上的任务,未钉工作区的任务只在「全部项目」下可见;在某个项目下打开「新建任务」会把该项目预选为任务工作区,「新建项目…」则用与 GUI「添加项目」相同的运行时接口把宿主目录注册为项目。未选项目而创建的根任务——无论来自表单还是看板的 agent 工具——继承创建它的会话所在的工作区;仍未钉住工作区的卡片在部署最近使用的工作区里执行,而不是落到宿主自身的工作目录。
37
39
  - **粘贴文本 AI 解析(issue #1540)**:新建任务表单可以把从别处复制的一段话交给模型,整理成标题、描述和执行 Prompt。模型取当前部署已配置的模型(与任务「模型」下拉同一份列表,默认选中第一项),调用在宿主侧完成,走看板既有的回环与同源校验,预算 45 秒并支持取消。解析结果只填进表单:不提交就不会创建任务,解析失败也不会改动你已经输入的内容。
38
40
  - **可折叠的任务表单**:新建/复制/子任务对话框把配置分成可折叠区域——任务内容默认展开,其后依次是标签、执行设置、运行方式、交接与续跑、定时运行——每个折叠区域都保留一行当前值摘要,因此对话框不需要滚动条(正文仍保留极矮窗口下的溢出兜底)。Agent 预设字段更名为「Agent 预设」,把部署内置预设以本地化名称列出,并附上任何用户预设;默认的「继承」选项会写明未钉住时真正使用的预设。
@@ -50,7 +52,7 @@
50
52
  - **实时同步**:变更返回完整 revision snapshot;SSE 只提示 revision、scheduler 与 power 变化,重连和页面恢复可见时重新拉完整 snapshot。
51
53
  - **可选空闲睡眠保护**:默认关闭;开启后覆盖全部运行中的 DSH 会话、已启用且未归档的任务计划和未知会话状态。
52
54
  - **系统提示词注入**:Host 通过 `SystemPrompt.section` 注册 order 200 的 `plugin:task-board` 段;任务看板设置可单独关闭声明而不关闭看板。该提示也会提醒 agent 在最终回复前收尾可见的 `todo_write` 计划列表。
53
- - **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 计划。
55
+ - **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 计划。
54
56
  - **Host 之外完成的执行结果(issue #1826)**:不由本 Host 执行的工作——例如在 DSH 之外用各自模型工作的 Codex、Claude Code——可以登记成一次真实执行,而不是只改一列。`task_board_manage(action: 'record-external-outcome', result: 'succeeded'|'failed', initiatedBy: <完成者>)` 会追加一条 execution 记录,带上判定、完成者与可选摘要;终态列由这条记录推导,与 Host 结算走同一条规则(`core/tasks.ts` 的 `settledStatus`)。该记录带 `external` 标记、永远不带 session,并在卡片仍有未结算 execution 时被拒绝(本 Host 正在执行时它才是唯一权威),归档卡片同样拒绝。`running` 与 `cancelled` 不能这样登记:它们只属于 Host。手工 `move-done`/`move-failed` 仍然可用,也仍然只写列——区别在于这一条会留下记录,因此列与执行历史永远不会脱节。
55
57
 
56
58
  - **外部提供方扩展**:GitHub Issues 扩展(`@linxin666/dsh-client-ui-task-board-github`,默认开启)把 GitHub Issues 同步成看板卡片。它是本看板的提供方,因此其配置渲染在本插件自己的设置卡里——仅当扩展已安装时该区块才出现,且只有扩展开启时才显示仓库与凭据表单;见[扩展包 README](../dsh-task-board-github/README.zh.md)。
@@ -65,7 +67,7 @@
65
67
  - `src/client/native-panel.tsx` 注册看板的侧栏行与中栏页面(官方 `sidebar.panellist` 列表座位与 keyed `main` 座位),并维护与 ssh 面板的中栏互斥协议。
66
68
  - `src/client/host-api.ts` 单次导入旧浏览器数据、提交幂等动作,并把 Host snapshot 当作唯一已确认 UI 状态。
67
69
  - 同源接口为 `GET /api/task-board/state`、`GET /api/task-board/events` 和 `POST /api/task-board/action`。
68
- - 所有接口都要求浏览器同源标记:`sec-fetch-site: same-origin`、`Origin` 头,或 Host 的 `dsh-auth-*` 浏览器认证 cookie。最后一种是 DSH 桌面版到达看板的方式:它从 `dsh-app://app/` 提供 Web GUI,并自行转发该页面的请求,转发时删掉 `Origin` 与 `sec-fetch-site`,改为附上启动时用 Host 启动链接换来的、与 authority 绑定的 cookie。直接访问只允许 DSH loopback origin;同机认证反向代理必须使用显式 Host 白名单和服务端注入 token。POST 还必须为 JSON。普通动作上限 64 KiB,导入上限 2 MiB。action 联合中没有命令、可执行路径、shell 文本或任意参数字段。
70
+ - 所有接口都要求浏览器认证。在看板自己的围栏下,这体现为浏览器同源标记:`sec-fetch-site: same-origin`、`Origin` 头,或 Host 的 `dsh-auth-*` 浏览器认证 cookie。最后一种是 DSH 桌面版到达看板的方式:它从 `dsh-app://app/` 提供 Web GUI,并自行转发该页面的请求,转发时删掉 `Origin` 与 `sec-fetch-site`,改为附上启动时用 Host 启动链接换来的、与 authority 绑定的 cookie。直接访问只允许 DSH loopback origin。由 DSH 自己经可信反向代理或 Ingress 提供服务的部署,改由 Host 的 `connection` 服务放行:它执行自己的 Host/Origin 围栏并校验签名浏览器会话,再把请求交给看板;DSH 不负责前置的同机认证反向代理,仍必须使用显式 Host 白名单和服务端注入 token;部署自己的隧道拨的是本机回环上游时,也可以改为打开 `trustForwardedProxy`(见「配置」),该形态仅凭同源标记即可通过。POST 还必须为 JSON。普通动作上限 64 KiB,导入上限 2 MiB。action 联合中没有命令、可执行路径、shell 文本或任意参数字段。
69
71
 
70
72
  ## Agent 工具
71
73
 
@@ -76,7 +78,7 @@
76
78
  - `task_board_create`:创建任务;带 `parentId` 时创建子任务。未单独设置的执行目标继承父任务,并受部署的子任务深度上限约束。
77
79
  - `task_board_update`:修改内容、标签与执行目标;空字符串清除某个目标,空标签数组清除全部标签。
78
80
  - `task_board_set_parent`:把现有卡片挂到某个父任务下,或用空 parentId 解除关联。
79
- - `task_board_run`:立即执行一张卡片(可选择重跑已结算的卡片),并级联执行它子任务树里不在「完成」列的成员;会消耗真实 API 额度,且未确认的高于默认权限的绑定会以 `confirmation-required` 被拒绝。
81
+ - `task_board_run`:立即执行一张卡片(可选择重跑已结算的卡片),只开这张卡自己的会话:Host 不为它的子任务开会话,带未完成子任务的卡会被告知要派发哪些子卡;会消耗真实 API 额度,且未确认的高于默认权限的绑定会以 `confirmation-required` 被拒绝。
80
82
  - `task_board_manage`:把卡片移到任意列——只写列、绝不伪造执行记录,因此待规划/待办用于规划、已完成/已失败用于声明工作在受追踪的执行之外结束、进行中用于表示工作正在进行但没有会话;真正有未结算执行的卡片会拒绝移动直到结算——归档或恢复、删除,或对看板已无法观察的运行中卡片强制结算(记为 cancelled 并记录调用者原因,卡片回到待办),同样受 Host 的运行中子任务与父子关系护栏约束。
81
83
  - `task_board_schedule`:启用、修改或关闭卡片的计划——循环 cron(可选 `maxRuns` 上限,传 `0` 清空回不限次)或在 `at`(epoch 毫秒)指定时刻只执行一次的单次计划——包括其 IANA 时区(`timeZone` 传空字符串即清除,回退到 Host 时区)。
82
84
 
@@ -111,10 +113,11 @@ dsh plugin --profile web add link:$(pwd)/packages/dsh-task-board
111
113
  | `preventIdleSleep` | `false` | 存在运行中的 DSH 会话、已启用计划或未知会话状态时,持有一个系统空闲睡眠断言。 |
112
114
  | `trustedProxyHosts` | `[]` | 仅通过已认证 loopback 反向代理路径接受的规范 `host[:port]` authority 白名单。 |
113
115
  | `proxyTokenEnv` | `DSH_TASK_BOARD_PROXY_TOKEN` | 保存反向代理 token 的环境变量名;token 本身不会写入插件配置。 |
116
+ | `trustForwardedProxy` | `false` | 放行落在本机回环上游的被转发请求——也就是你自己的反向代理或隧道拨 `127.0.0.1:<端口>` 时产生的形态——且仍以浏览器同源标记为前提。关闭时一切被转发请求都判为远程(issue #1906);开启后显式 `sec-fetch-site: cross-site` 标记照旧拒绝,上面那条 token 白名单反代路径不变。volatile:每次请求实时读取,改动无需重启即对下一次请求生效。 |
114
117
  | `sessionDefaultPermission` | 跟随宿主 | 权限确认门的显式基线。未设置时跟随宿主自己的默认权限预设(DSH 新会话的起始权限),部署不提供权限目录时回退 `read-only`。卡片有效权限(交接包或钉住字段)高于该基线时,运行前必须经人工确认;cron 拒绝调度待确认卡片。 |
115
- | `maxSubtaskDepth` | `1` | 子任务深度上限,1 到 3。取 1 时一个任务只能有一层子任务,子任务不能再创建或关联子任务;每多一层,执行根任务一次开启的会话数就会成倍增加。 |
118
+ | `maxSubtaskDepth` | `1` | 子任务深度上限,1 到 3。取 1 时一个任务只能有一层子任务,子任务不能再创建或关联子任务。它只决定一张卡下面能挂多深:执行一张卡只开它自己的一个会话、子任务由它自己派发,所以层级深浅不改变一次执行开几个会话。 |
116
119
  | `sessionPollSeconds` | `5` | 看板有需要核对的事情(运行中的卡片或未结算执行)时,Host 重新读取 DSH 会话名册的间隔秒数。两者都没有的空闲看板完全不轮询。取值 1 到 300;间隔越短结算越快、Host 负载越高。 |
117
- | `runLaunchWidth` | `3` | 同一刻允许在启动中的运行数,1 到 16。一次执行会开启整棵子任务树,因此该值限制一次运行动作创建的会话洪峰;等待中的成员仍会启动,只是分批进入运行列。默认值取自本仓「重型实施子代理并发 ≤ 3」的实测纪律。每次准入时读取,修改只影响尚未入列的启动。 |
120
+ | `runLaunchWidth` | `3` | 同一刻最多几个执行被准入启动,1 到 16。它只在多张卡片同时要执行时起作用——手动执行、重新执行与到点定时一样:这么多个执行会创建会话并把 Prompt 入队,其余排队等待(队列在多次运行之间轮转、同一次运行内 FIFO)。单卡执行只开一个会话,所以这个值不改变单次运行的形态。默认值取自本仓「重型实施子代理并发 ≤ 3」的实测纪律。每次准入时读取,修改只影响尚未入列的启动。 |
118
121
  | `spendBudgetTokens` | `0` | 看板派活的每日 token 上限。`0` 表示不设闸,此时看板不读任何账本、也不做任何计数。计量单位是 token,因为使用账本只对 DeepSeek 官方路由计价,其他路由恒为 0。口径是 usage 账本按本地日期分桶的用量:当天已达上限时,手动执行与重新执行被拒绝,调用方拿到的拒绝原因就是这条文本;到点的定时执行把拒绝写进调度错误并跳过本次触发,不消耗计划次数,因此调高上限或跨过本地零点后下一次触发照常执行。每次闸门判定都重新读取,改完即时生效、无需重启。 |
119
122
  | `goalRunEnabled` | `false` | 全局原生 `/goal` 执行开关。关闭时所有卡片都按普通单回合执行,看板不再武装 dsh 内置的 `/goal`;只有它开启、且卡片自身的「以 /goal 开始执行任务」被勾选时(该选项默认关闭),运行才使用原生 /goal。该值在执行启动时冻结,因此实时修改只影响之后新开的执行,卡片存储的 `goalRun` 偏好绝不被改写。这类运行记录为 `goal-disabled`:既不会被报告为已验收通过,也不会因缺少完成调用被判失败。与 `goalVerification` 相互独立。 |
120
123
  | `goalVerification` | `true` | 本插件所开执行的 goal 验收。开启后,任务执行内的 `update_goal(action: complete)` 在该执行取得验收通过记录前一律被拒绝。只影响以 goal 形式执行的运行:普通聊天与未勾选 `goalRun` 的卡片不受影响。单张任务卡可以用「跳过本任务的验收」勾选退出本开关的约束(见下)。 |
@@ -122,7 +125,6 @@ dsh plugin --profile web add link:$(pwd)/packages/dsh-task-board
122
125
  | `goalVerificationReasoningEffort` | `''`(继承) | 裁判推理强度。留空继承宿主默认档位;目标模型未声明的档位绝不传参,回退到该模型自身默认档位并记录、展示。 |
123
126
  | `goalVerificationCallTimeoutSeconds` | `150` | 单次裁判调用的上限(秒,范围 30–600)。一次验收要发六次裁判调用,上限过小会把「慢但健康」的路由变成一整排超时。 |
124
127
  | `goalVerificationBudgetSeconds` | `1200` | 单次验收的总时间上限(秒,范围 120–1800),覆盖证据渲染与全部裁判调用(含重试)。应不小于单次调用上限的六倍,否则一次验收永远跑不完;耗尽时记为一类「预算耗尽」结果,不产生任何判定,也不消耗任何额度。 |
125
- | `teamProvider` | `spawn` | Agent Teams 服务用来组成 teammate 的 continuable-subagent provider。仅团队执行模式使用,与 Agent Teams 工具插件的 `freshProvider` 默认值一致。 |
126
128
  | `cardDefaultMode` | `''`(无默认值) | 新建卡片起始的 agent 预设。留空不钉住任何值,卡片照旧跟随部署默认预设。 |
127
129
  | `cardDefaultPermission` | `''`(无默认值) | 新建卡片起始的权限。它可以高于会话权限基线:它只是预填,高于基线的绑定仍需人工确认后才能运行。 |
128
130
  | `cardDefaultModel` | `''`(无默认值) | 新建卡片起始的执行模型(`provider/model`)。留空不钉住任何值,并使 `cardDefaultReasoningEffort` 失效。 |
@@ -130,7 +132,11 @@ dsh plugin --profile web add link:$(pwd)/packages/dsh-task-board
130
132
 
131
133
  四个新建卡片默认值都默认空,且都是 volatile:改动无需重启即生效,既作用于之后新建的卡片,也作用于已经打开的页面(无需刷新,新建对话框就会用上刚保存的值);留空不钉住任何值,因此完全不配置它们的部署创建卡片的行为与今天一致。新卡片的每个执行目标按同一顺序取值——新建对话框里的显式选择优先于从源卡带过来的值(复制卡片沿用源卡已钉住的值,新建子任务沿用父卡的),后者优先于看板默认值——而父卡的权限永不参与。这四个默认值都不会放松权限确认门:高于会话基线的默认权限只是预填,卡片仍要等人工确认后才能运行。
132
134
 
133
- 浏览器直接访问仍限制为 DSH loopback origin。若使用同机认证反向代理,应让 DSH Web 绑定 loopback,配置 `trustedProxyHosts`,在 `proxyTokenEnv` 指定的环境变量中放置高熵 token,并让代理在完成认证后替换(不能透传客户端提供的)`X-Dsh-Task-Board-Proxy-Token`。代理 Host 必须在白名单内,浏览器 `Origin` 必须与其 authority 相同。修改这些 composition 级代理设置后需重启 Host。
135
+ 浏览器直接访问仍限制为 DSH loopback origin。由 DSH 自己经可信反向代理或 Ingress 提供服务的部署(例如 TLS 在边缘终结、`dsh web --trusted-host dsh.example.internal`)无需看板侧配置:路由桥接 Host 的 `connection` 服务,该服务接受的 Host/Origin 围栏与签名 `dsh-auth-*` 浏览器会话即放行请求,被它拒绝的请求仍要过看板自己的围栏。这条路径不会给未持有 Host 签发会话的浏览器任何额外能力,也与下面两项配置无关。
136
+
137
+ 若使用同机认证反向代理,应让 DSH Web 绑定 loopback,配置 `trustedProxyHosts`,在 `proxyTokenEnv` 指定的环境变量中放置高熵 token,并让代理在完成认证后替换(不能透传客户端提供的)`X-Dsh-Task-Board-Proxy-Token`。代理 Host 必须在白名单内,浏览器 `Origin` 必须与其 authority 相同。修改这些 composition 级代理设置后需重启 Host。
138
+
139
+ 另一种形态是运维自己的隧道或反向代理转发到本机的请求。打开 `trustForwardedProxy` 后,携带转发头且落在回环上游(回环套接字与回环 Host)的请求仅凭浏览器同源标记即可通过;显式 `sec-fetch-site: cross-site` 标记照旧拒绝,经并非拨向本机的代理而来的请求仍判为远程。该开关是 volatile、按请求读取,改动对下一次请求生效;只有你自己运行那一跳时才打开它,因为不归你控制的代理可以替你伪造这些标记。
134
140
 
135
141
  macOS 后端启动 `/usr/bin/caffeinate -i -w <host-pid>`,绝不请求 `-d`。Windows 后端从 `SystemRoot` 启动绝对路径的 Windows PowerShell,固定 helper 只请求 `ES_CONTINUOUS | ES_SYSTEM_REQUIRED`;不请求 `ES_DISPLAY_REQUIRED`,不修改电源计划,也不需要管理员权限。Linux 后端只从 `/usr/bin/systemd-inhibit` 或 `/bin/systemd-inhibit` 启动 systemd-logind `idle` block inhibitor,不请求 `sleep`、`handle-lid-switch` 或显示器/屏保 inhibitor;没有 systemd-logind 时显示 `unsupported` 或可见错误,不启动桌面环境专用替代命令。其他平台报告 `unsupported`。
136
142
 
@@ -149,13 +155,13 @@ macOS 后端启动 `/usr/bin/caffeinate -i -w <host-pid>`,绝不请求 `-d`。
149
155
 
150
156
  ## 安全模型
151
157
 
152
- - 插件仍处在 DSH Web 既有部署与网络边界内,不返回宽松 CORS 头。state、action 与 SSE 共用同一访问栅栏;裸本地命令行请求不会被当作浏览器请求接受。
158
+ - 插件仍处在 DSH Web 既有部署与网络边界内,不返回宽松 CORS 头。state、action 与 SSE 共用同一访问栅栏;裸本地命令行请求不会被当作浏览器请求接受。部署提供 Host 的 `connection` 服务时,围栏只放行该服务已认证的请求——它的 Host/Origin 围栏加签名 `dsh-auth-*` 浏览器会话——其余请求继续走看板自己的 loopback 与 token 判定。除此之外,围栏拒绝一切被转发请求;除非打开 `trustForwardedProxy`,即使打开,也只有落在本机回环上游、且不带跨站标记的那种被转发形态被放行。
153
159
  - 所有变更载荷使用严格、版本化的判别联合;浏览器不能写入 scheduler 独占时间戳或 execution 结果。
154
160
  - 工作区、预设、权限、cron、任务状态和导入记录都会在 Host 再校验。
155
161
  - 卡片有效权限高于配置的会话默认值时进入待确认状态:人工确认该确切绑定之前,Host 拒绝手动执行与 cron 触发;变更钉住权限或交接包会清除确认(封死先确认后替换的提权路径)。
156
162
  - 任务 Prompt 是发给 DSH agent 会话的数据。协议不接受 shell 命令、PowerShell 正文、可执行路径或可配置 helper 参数。
157
163
  - 任务标签与 Prompt 同属客户端断言,并走同一条受门禁的动作通道:协议层拒绝空标签名、未知键、超过八个标签以及超长的标签名或执行提示。标签的执行提示会做分隔符转义(无法伪造续接卡片的来源声明标记),且注入位置在该来源声明包裹之外。
158
- - 子任务父子关系由 Host 而非浏览器判定:父任务必须存在且在看板上、任务不能挂到自己的后代之下、结果深度不得超过 `maxSubtaskDepth`。子任务若不单独设置权限,会在启动时解析父任务的绑定以及父任务的人工确认——绑定绝不复制到卡片上,因此解除关联不会残留一张已确认的高权限任务;一旦单独钉住权限,就重新回到确认门之下。若子任务树中存在未确认的绑定,整次运行会在任何会话启动前被拒绝,cron 则滚动到下一触发点。
164
+ - 子任务父子关系由 Host 而非浏览器判定:父任务必须存在且在看板上、任务不能挂到自己的后代之下、结果深度不得超过 `maxSubtaskDepth`。权限门只看被运行的那张卡自身解析出的绑定:子卡自己钉住的未确认高权限不再拦住父卡,因为父卡根本不为它开会话;子卡自行执行时按祖先链解析继承的绑定,并带上该祖先的人工确认戳。绑定绝不复制到卡片上,因此解除关联不会残留一张已确认的高权限任务。
159
165
  - Agent 工具面经进程内服务直达同一个 Host 账本,而不经过 HTTP 栅栏,并且不携带任何确认能力:拒绝语义、失败即关闭的钉子、深度门禁与运行中任务锁全部照旧生效,任何工具调用都无法解除高于默认权限的绑定。
160
166
  - 电源 helper 使用固定可执行路径、固定参数、`shell: false`,失败后按 1、2、5、10、30 秒有界退避。Linux helper 通过 Host stdin 生命周期退出,使 systemd inhibitor 随 Host 异常退出自动释放。
161
167
 
@@ -195,15 +201,15 @@ pnpm --filter @linxin666/dsh-client-ui-task-board build
195
201
  - Linux 需要 systemd-logind 及允许当前用户取得 idle block lock 的策略;容器、WSL、无 system bus 或非 systemd 系统可能显示 `unsupported` 或 `error`。桌面环境是否把 logind idle lock 与显示器空闲联动属于其自身策略,插件不请求屏保或显示器 inhibitor。
196
202
  - 已启用计划会从未来触发点之前持续持锁,因此可能增加电池消耗。
197
203
  - Host 执行消耗与普通 DSH agent 会话相同的 API 额度。
198
- - 执行一个任务会同时执行它子任务树里尚未完成的成员:每个成员都会开启自己的 DSH 会话,按 `runLaunchWidth`(默认 3)分批启动,树越深并发会话越多,每个会话都会消耗 API 额度。已在「完成」列的子任务会被跳过,因此把子任务逐个跑完再执行父任务只花一个会话,而不是整棵树。
199
- - Agent 工具调用由模型驱动:从对话发起的执行或定时级联同样消耗 API 额度,且 agent 可以启用一个持续触发的计划,直到被关闭或看板被关掉。
204
+ - 执行一张卡只开它自己一个会话,这个会话在内部用 subagent 派发未完成的子任务:子任务多的卡会消耗它派发的每个子 agent 的额度,而看板本身不为它们多开会话。没有回填结论的子卡继承父卡这次运行的判定——那是对父卡判断的记录,不是这张卡自己跑过一遍。
205
+ - Agent 工具调用由模型驱动:从对话发起的执行或定时运行同样消耗 API 额度,且 agent 可以启用一个持续触发的计划,直到被关闭或看板被关掉。
200
206
  - 目标执行会按目标需要不断续跑:每一轮都消耗 API 额度,会话会一直忙碌,直到目标完成或被 dsh 阻塞(轮次上限、回合被拒或入队失败),后者在看板上记为执行失败。
201
207
  - 目标模式依赖运行时的 `/goal` 命令与命令派发器。两者都不提供的部署仍会把每张卡片当单回合执行,并在宿主日志中记录目标模式不可用,而不是让执行失败。
202
208
 
203
209
  - 每次验收都会消耗模型请求:一次验收是 3 项判据 × 2 轮(6 次裁判请求),而同一 execution 最多验收两次,因此一个需要修复一次的 goal 周期最多在任务本身之外多花 12 次请求。
204
210
  - 验收不估费用:本部署无法为目标裁判路由提供可靠的分 token 价格来源,报告只列出 token 用量。
205
211
  - 宿主观察的工作区变更块只在部署确实记录变更且读取成功时出现;服务不可用或对比读取失败时,证据降级为只判轨迹,而不是让验收失败。
206
- - 验收只在能生效的地方强制执行:没有成为 goal 执行的运行(`/goal` 被拒绝或不可用,或全局总开关关闭)与团队执行的 teammate 成员不受门禁,记录会明确说明,而不是暗示它们已被验收。总开关关闭的运行记为 `goal-disabled`(独立原因,与「命令被拒」区分),因此也不会被读成已验收通过。宿主不提供模型目录时无法解析裁判路由,完成声明按 fail closed 拒绝并记为验收异常;异常额度用尽后卡片保持打开而不是判死,恢复需要用户清除这些异常。
212
+ - 验收只在能生效的地方强制执行:没有成为 goal 执行的运行(`/goal` 被拒绝或不可用,或全局总开关关闭)不受门禁,记录会明确说明,而不是暗示它已被验收;历史上团队执行遗留的 teammate 记录同样不带验收。总开关关闭的运行记为 `goal-disabled`(独立原因,与「命令被拒」区分),因此也不会被读成已验收通过。宿主不提供模型目录时无法解析裁判路由,完成声明按 fail closed 拒绝并记为验收异常;异常额度用尽后卡片保持打开而不是判死,恢复需要用户清除这些异常。
207
213
  - 第一版一律使用 coding 判据:没有自动 rubric 选择,非工程任务也按工程判据评判(设置界面已说明)。
208
214
  - 若第三方验收插件(例如已安装的 `dsh-llm-verifier`)也开启了自己的自动验收,两个裁判会各自对同一会话评分:本看板的验收决定能否完成,另一个只做提示,公开 SDK 接口无法让二者共享同一判定。要避免为两次判定付费,只能关闭对方的自动模式。
209
215