Files
deepseek-harness/packages/tasks
Yichen Jiang cf5fbd02b8 fix(tasks-local): return the layer disposer directly and cover scoped teardown
`ScopedLayers.effect` already returns an exact `() => void`, so the inherited
`() => void dispose()` wrapper voided a void — two lint rules, four errors.

The scoped layer's own teardown had no test, which is the registry-contribution
disposal contract the testing policy requires and the only path that calls
`TaskLayer.isEmpty()`: `ScopedLayers` prunes a scope's layer when its last
contribution disposes. The new case mounts one plugin contributing both a
surface and a listener into one scope, then unloads it and observes that the
agents which joined that scope are refused again.

Refs #2141
2026-08-10 16:34:29 +08:00
..

tasks/ — background-task capability family

English | 中文

This family gives long-running tools one owner-isolated background-task protocol for observation, cancellation, waiting, and completion notices.

Package Role ctx key
tasks/ Defines the task registry and lifecycle contract ctx.tasks
tasks-local/ Implements the process-local task registry registers on ctx.tasks
tool-tasks/ Exposes task control and completion notices to the model registers on ctx.tools

See the background-task runtime and task-registry decisions.

The subsystem reference — the id scheme, the owner-fenced contract, snapshots — is docs/subsystems/tasks.md; design in the background-task runtime and task-registry contract Agent Notes.