Files
deepseek-harness/docs/subsystems/todo.zh.md
T
Turtle f028f25667 refactor: remove runtime invariant plugins
Delete @deepseek-ai/dsh-invariants, every package's ./invariant companion
and its tests, the invariant gates and Vitest setup, the scoped-event
resolver generator, and the INVARIANT-coded listener rethrow paths.
Update docs, READMEs, Agent Notes, and add an upgrade guide.
2026-09-30 12:52:18 +08:00

1.5 KiB

Todo

English | 中文

本页记录 @deepseek-ai/dsh-tool-todo 拥有的持久 todo 词汇。面向模型的工具会整体替换一个 agent(智能体)会话的列表;该包还拥有事件声明和回放投影。工具行为与配置见包 README。

源码:packages/todo/tool-todo/src/types.ts

TodoItem:一条列表项

/**
 * One entry in an agent's todo list — the unit of the `todo/write`
 * whole-list snapshot declared by this package.
 *
 * Deliberately minimal: a human-readable `content` line and a three-state
 * `status`. No id, priority, or `activeForm` — the list is replaced wholesale
 * on every write (last-write-wins), so entries need no stable identity. The
 * three statuses describe the complete portable lifecycle needed by model and
 * UI consumers.
 */
interface TodoItem {
  /** What this task is — a short imperative line shown in the UI. */
  content: string
  /** Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several. */
  status: 'pending' | 'in_progress' | 'completed'
}

持久事件

该包通过声明合并把 todo/write: { todos: TodoItem[] } 加入 SessionEventMap。此事件仅写入日志,并携带完整替换列表;生成的持久化目录会记录其声明位置。