Files
deepseek-harness/packages/tasks/README.md
T
Tianyi Cui 698b391bd6 refactor(tasks): split the task registry into seam and local implementation
The tasks/ family now matches the capability-seam shape: @deepseek-ai/dsh-tasks
keeps the abstract TaskService (ctx.tasks contract, vocabulary types, snapshot
invariant companion) and the new @deepseek-ai/dsh-tasks-local carries the
process-local registry (LocalTaskService: in-memory store, settlement,
owner-cleanup effects, teardown, TASK_WAIT_TIMEOUT). Compositions and test
harnesses now load dsh-tasks-local; producers, TaskKindMap merges, and
dsh-tool-tasks keep importing the seam only.

Producer misconfiguration diagnostics name dsh-tasks-local because loading the
implementation is the fix. The registry behavior suite moves to tasks-local;
the seam keeps a stub-subclass registration test and the probe-based invariant
suite.
2026-07-26 05:13:39 +08:00

1.4 KiB

tasks/ — background task capability family

The shared home for background-task ids, owner isolation, reads, cancellation, waiting, and completion notices. Bash, subagents, and future long-running tools use one model-facing protocol. See the background-task runtime Agent Note and the task-registry seam Agent Note.

Package ctx key Role
tasks (@deepseek-ai/dsh-tasks) ctx.tasks The registry seam: branded <kind>-N ids, the owner-fenced read/kill/wait/list contract, snapshot vocabulary, the attachSurface misconfiguration fence, and the snapshot invariant companion
tasks-local (@deepseek-ai/dsh-tasks-local) The process-local registry implementation: in-memory records, first-wins settlement bookkeeping, and the awaited owner-cleanup and teardown paths
tool-tasks (@deepseek-ai/dsh-tool-tasks) The model-facing control surface: task_output, task_list, task_kill, the completion-notice injection, and the background-habit prompt section

The registry owns state across producer or surface reloads; the tool package owns presentation. Producers register execution hooks through ctx.tasks.start and own whether their config exposes run_in_background.