gosomea/dsh-task-supervisor ↗★ 3

dsh-task-supervisor

DSH-native supervised task lifecycle 适合需要跟踪复杂任务DAG进度、设置检查点和决策监督的用户。

パッケージ
dsh-task-supervisor
互換性
未検証
Harness ピア範囲
^0.1.7-alpha.2 || ^0.2.0-rc.2
Cordis ピア範囲
^4.0.4
バージョン
0.1.8
ライセンス
UNLICENSED
最終更新
2026/10/19

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:gosomea/dsh-task-supervisor

ドキュメント

README 全文を読む ↗

description: "Add persistent tasks, DAG progress, checkpoint reviews and Supervisor consultation to a DSH Web profile." kind: "package-bundle"

DSH Task Supervisor

English | 中文

npm · Report an issue · Community

Summary

Use /task to track, pause and rework a goal, follow its DAG, and obtain reviews during planning, execution and completion. The main Agent plans and delivers; Supervisor persists state, schedules reviews, and continues, pauses or closes the task under valid decisions. Discuss requirements, ask about progress and explicitly change tasks in consultation. Default review examines the main conversation log; direct artifact reads and isolated checks require configuration, and passing review does not guarantee that nothing was missed.

Table of Contents


Get started

This page describes 0.1.8, which creates Tasks in native DSH modes. Recovery controls and actionable next steps are described in the 0.1.8 release. Requirement-source format and correction errors are described in the 0.1.7 release. Expired-review recovery and direct status queries are described in the 0.1.6 release. Reviewer initialization, fault classification and recovery changes are in the 0.1.5 release. Complete reports are separate from tool process details; requirement outcomes, Task/attempt evidence scope and bounded read correction are described in review experience. Earlier native-process and recovery changes are in the 0.1.3 release. Earlier versions and public Host boundaries are documented in the 0.1.2 release, public DSH installation validation and supervised tasks in native modes.

Install into a Web profile

Node 24 and official DSH 0.2.0-rc.2 are validated without Host or native sandbox modifications. Retain the profile's model configuration and install the public package:

dsh plugin --profile web add /absolute/path/to/dsh-task-supervisor-0.1.8.tgz
dsh web

To test current source, build and pack it with the development commands below, then use dsh plugin --profile web add /absolute/path/to/package.tgz in an isolated profile. The package includes Host and Web plugins plus an optional check gateway; DSH provides its native components.

Create and approve a task

Enter /task in the main conversation to begin planning. Bare /task waits for the next message as the objective; with an unfinished task it shows status without resuming execution. /task new remains a compatibility alias. The main Agent can also use the task tool for an explicit natural-language creation request.

After plan review passes, execution normally waits for /task approve, a qualifying approval reply in the main conversation, or the sidebar approval button. Explicitly authorize execution after review to automate that approval. Approval permits implementation; node and whole-task acceptance still apply.

The main conversation shows a compact DAG, participating Agents, progress and short review notices. A node or details link opens the full sidebar: conversation handles consultation and requirements; details holds plans, nodes, reviews and controls. The more menu provides read-only task history.

Main conversation DAG and sidebar rework details

An earlier isolated validation example retaining the reason and dependency impact of a passed node entering a new rework attempt.


Architecture and responsibilities

Supervisor contains a deterministic controller and model reviewers. The controller owns task state and continuation authority; reviewers make evidence-based decisions. Consultation is a user-facing Session, separate from automatic checkpoint review.

flowchart TD
  U["用户 / User"] --> M["主 Agent / Main Agent"]
  U -->|"批准、暂停 / Controls"| C["Supervisor 控制器 / Controller"]
  M -->|"计划、报告、完成申请 / Submissions"| C
  C -->|"绑定版本与证据 / Bound review job"| R["审查者 / Reviewer"]
  R -->|"裁决与引用 / Decision and evidence"| C
  C -->|"续行、暂停、完成 / Continue, pause, complete"| M
  M --> L["DSH 原生 Session 日志 / Session logs"]
  C --> L
  R --> L
Actor or componentResponsibilityAuthority and limits
UserSupplies objectives, constraints, approval and necessary decisions.Initial execution defaults to manual approval; every post-completion reopening needs an impact-confirmation click.
Main AgentInvestigates, proposes plans, implements, integrates, reports and requests completion.Can propose completion but cannot mark the Task accepted itself.
Supervisor controllerPersists tasks and DAGs, admits turns, starts reviews, applies valid decisions, stops and restores owned work.Checks identity, versions, permission and evidence validity before transitions; model prose alone grants no authority.
Checkpoint reviewerChecks original requirements and evidence within the job, returning pass, revise or needs-user.Normally a fresh native Session per checkpoint; supplementation or recovery retains the job identity and never implements in the main workspace.
Delegated Worker, optionalImplements ready DAG nodes within exact assigned file paths.The main Agent integrates and rechecks; a Worker report does not accept its node.
ConsultationRefines objectives, proposes drafts, explains progress and forwards explicit controls.Ordinary questions do not pause execution; the same controller validates control requests.
DSH Sessions and projectionsRetain human messages, execution and control records, review links and rebuildable views.Native logs are authoritative; projections do not create a second history requiring manual synchronization.

Current source retains the main Session's native preset and Goal/Plan tools. While a Task exists, Supervisor disarms native Goal continuation through public GoalService; native Plan/Todo can organize work but cannot approve or accept the Task. Supervisor does not act as a general Team Lead; the main Agent and Workers implement.


The complete Task lifecycle

A task can span many model turns. Reviews in this diagram are formal checkpoints handed to the controller after submission; planning and execution also receive activity observations under the next section's conditions.

flowchart TD
  A["建立目标 / Create task"] --> B["勘察与规划 / Plan"]
  B --> C["计划覆盖审查 / Plan review"]
  C -->|"修订 / Revise"| B
  C -->|"通过 / Pass"| D["执行批准 / Approval"]
  D --> E["实施就绪节点 / Execute ready node"]
  E --> F["节点验收 / Node review"]
  F -->|"补做 / Revise"| E
  F -->|"还有节点 / More nodes"| E
  F -->|"全部通过 / All passed"| G["整体验收 / Completion review"]
  G -->|"补做 / Revise"| E
  G -->|"通过 / Pass"| H["完成 / Complete"]
  H --> I["发现原目标缺陷 / Repair proposal"]
  I -->|"用户确认影响 / Confirm impact"| E
  1. Establish requirements. Create a task directly, or refine a broad idea into a consultation draft first. The controller binds the main Session, task ID and requirements version. Original human requirements remain the acceptance authority.
  2. Investigate and form a plan. The main Agent uses native tools to inspect inputs and the workspace, then proposes criteria and a DAG. Planning retains native permissions and asks for investigation before implementation approval; it does not prohibit every read or run_code. Supervisor can inspect planning progress for unknown conditions, repetition or stalled investigation.
  3. Submit the plan. task_submit_plan persists the job, proposal, requirements version, evidence cutoff and reviewer Session identity, promptly returns submitted, and ends the turn. After tool activity settles, the controller runs coverage review. Revision findings return to the main Agent; a pass enters initial execution approval.
  4. Admit implementation. Wait for user approval by default; explicit preauthorization permits automatic execution only after review passes. Independent mode checks declared capabilities and toolchains first. Requirements edits revoke prior approval and preauthorization and return to planning. Later plan revisions under unchanged requirements still need review without unconditionally repeating initial approval.
  5. Execute DAG nodes. Predecessors must pass review before successors become ready. The main Agent records the current attempt with task_start_node, then implements or delegates non-overlapping file scopes. After integration and rechecks it submits evidence with task_report_stage. Supervisor can inspect progress during work or continue after a turn ends.
  6. Accept or rework a node. Only a passing review accepts the attempt and releases dependencies. Revision requires more work without accepting the node. A defect in an accepted node can trigger task_rework_node, creating new attempts for it and its descendants while retaining unrelated branches and historical reviews. Resubmissions bind the current attempt.
  7. Check the whole delivery. All nodes passing still requires the main Agent to submit the current combined result with task_request_completion. Completion review checks every necessary original requirement, component relationships and supporting evidence. Only a valid applied pass completes the Task. Revision returns to implementation; user needs or internal faults pause it.
  8. Continue after completion. The same Session can start another task and retain the previous one in history. An original-objective defect first requires a repair reason, root nodes and impact proposal. Every reopening waits for a user confirmation click, then returns to the same Task/DAG, preserving prior completion and reaccepting affected nodes and the combined result.

“Review submitted” does not mean “review passed”; native turn completion does not mean Task completion. During review, the main Agent waits for handoff. The UI shows job kind, elapsed time, evidence reads, last activity, deadline and next action; the proposal DAG is explicitly unapproved. Read counts measure activity, not completion percentage or coverage.


When reviewers intervene and what they check

These are five job kinds in one review engine, not five resident Agents. Jobs bind requirements, plan, node attempt and evidence cutoff. A pass has a different meaning at each checkpoint.

Job and phaseTriggerWhat the reviewer checksController response
planning: plan formationA normal planning turn ends without submission, activity reaches observation thresholds, or planning still needs inspection after truncation recovery.Separates confirmed investigation facts from unknowns, evaluates relevant new progress and proposes a concrete next output.Pass or revise only permits further planning; user needs or consecutive lack of progress pauses, never authorizes implementation.
plan: proposed planThe main Agent submits an initial or revised plan; coverage review is on by default.Checks original requirements, criterion provenance, coverage, feasibility, normalized dependencies, verification ordering and required capabilities; rejects downstream checks needed to accept their predecessors.Pass enters the valid approval path; missing or weakened requirements return for revision; necessary user decisions pause.
progress: implementationActivity reaches observation thresholds, or automatic continuation without node reports reaches its configured limit.Examines actual output, tool failures, repetition and drift across ready/running nodes to decide continuation, correction or help.Pass continues work without accepting a node; revise delivers correction; user needs pause.
stage: node acceptanceThe main Agent submits evidence for the current attempt; delegated nodes require main-Session integration checks.Checks node requirements, action constraints and evidence, including child and integration records as needed; independent mode inspects current artifacts.Pass accepts the attempt and releases dependencies; revise requires work; user needs pause.
completion: task closureAfter every node passes, the main Agent requests completion.Checks all necessary original requirements and the combined delivery, rather than merely aggregating node passes or accepting the main summary.Only a valid pass completes; revise requires work; unresolved verification requiring the user pauses.

Default native safe-step observations trigger on 24 tool results, five minutes with recorded tool activity since the previous observation, or three consecutive tool errors. Wall time alone without new tool results does not trigger inspection or prove drift. Execution also uses maxAutomaticRoundsWithoutReport: 3 as a turn-based fallback. Formal verdicts reset observation so review time cannot immediately count as another main-Agent progress interval.

planningSupervision controls planning review; observeLongTurns controls in-turn observation; progressReviewMode: required-only skips execution-progress review while retaining plan, node and completion checkpoints. Thresholds are configurable, not continuous observation of every operation. On an output-limit ending, the controller can resume another turn with confirmed context; that recovery is not a review pass.


Evidence and independent verification

A separate Session isolates review context but does not prove that the reviewer ran or observed artifacts. The UI shows the effective mode. Plan and progress jobs use log review; node and completion jobs use the configured verification method.

ModeReviewer capabilitiesDecision boundary
reviewVerification: log, defaultPages through human requirements, tool calls/results, main reports, child integration records and available native images before the cutoff.Checks recorded behavior and evidence, not reviewer-run product execution; unavailable behavior remains explicitly unverified.
reviewVerification: independentCaptures artifacts including applicable uncommitted/untracked files, reads them directly, and uses configured isolated command execution as required.Claims only available capabilities. Reading alone needs no runner; computation or behavior checks require a suitable environment. Independent browser observation is unavailable.

Explicit independent mode with independentVerification.storageRoot enables the generic protocol below; execution additionally needs a configured container and toolchain. Sessions retaining only legacy independentVerification use the compatibility protocol without invented historical check plans. Independent node and completion review