Expand description
Phased todo tool (init/start/done/drop/rm/append/view). Todo tool — phased task management with 7 ops.
omp tools/todo.ts (938줄) 계약 이식:
- 7 ops: init, start, done, drop, rm, append, view
- 3상태 정규화 (in_progress는 한 phase에 하나)
- Markdown 라운드트립
- sub-agent 매칭 헬퍼 (⑥ 연동 후 활성화)
Structs§
- Collapsed
Selection - Result of
select_collapsed_todos: the rows to render plus an optional “… N more” summary line. - Init
List Entry - A phase seed supplied to the
initop. - MidRun
Nudge State - Tracks mutating-tool-call volume since the last
todotouch, to fire a hidden mid-run reconciliation nudge. Ports omp’sTodoTracker’s nudge half (todo-tracker.ts:15-16, 110-116). - Stop
Reminder State - State for the stop-time incomplete-todo reminder, scoped to a single
agent run.
build_stop_remindermutates it to dedup unchanged open-task sets and cap total reminders. - Todo
Completion Transition - Describes a task that newly transitioned to completed.
- Todo
Item - A single task within a phase.
- Todo
Phase - A named group of related tasks within a todo list.
- Todo
Tool todoagent tool. 상태 비저장 (상태는TodoStateProvider가 보유).- Todo
Update Result - Result of applying a batch of todo ops.
Enums§
- TodoOp
- Operations that can be applied to a todo list.
- Todo
Status - Status of a single todo task.
Constants§
- MAX_
TODO_ STOP_ REMINDERS - Maximum stop-reminder injections per agent run. A hard cap so a misbehaving agent (e.g. one that keeps adding todos and then stopping) cannot loop indefinitely.
Functions§
- apply_
ops - Apply a sequence of ops, returning the result + transitions + errors.
- build_
stop_ reminder - Build a stop-time reminder when the todo list has open tasks.
- find_
phase_ fuzzy - Exact (case-insensitive) -> unique prefix -> unique substring. Ambiguous
or no match ->
None. Ports omp’sfindPhaseFuzzy(todo-command-controller.ts:81-92). - find_
task_ fuzzy - Exact content match -> unique substring match -> if ambiguous, prefer a
single in_progress/pending hit. Ports omp’s
findTaskFuzzy(todo-command-controller.ts:94-113). - format_
summary - Render a human-readable summary of the todo list for display.
- markdown_
to_ phases - Markdown 체크리스트 → phases. 헤더 (
## Phase또는N. Phase)와 체크박스 파싱. ompmarkdownToPhases계약. - phases_
to_ markdown - phases → Markdown 체크리스트. 다중 phase면 로마 숫자 헤더.
- reconcile_
with_ subagents - Auto-complete open todos whose content matches a subagent that finished
successfully. Ports omp’s
#reconcileTodosWithSubagents(interactive-mode.ts:2369-2404). Idempotent: never touches an already closed task. Failed/aborted subagents are the caller’s responsibility to exclude fromcompleted_descriptions— this function only matches. - roman_
numeral - Convert a small integer (1–3999) to its uppercase Roman-numeral string
(e.g.
4→"IV",6→"VI"). Used for phase display names. - select_
collapsed_ todos - Walking-viewport selection for a phase’s collapsed todo preview. Ports
omp’s
selectCollapsedTodos(todo.ts:332-350). - todo_
matches_ any_ description - todo 내용과 서브에이전트 설명이 같은 작업을 가리키는지. 6자 이상 중복 정규화 매칭 (omp TODO_DESCRIPTION_MIN_OVERLAP).
- tokenize_
quoted - Quote-aware tokenizer: splits on whitespace, respects
"…"groups, and honors backslash escapes. Ports omp’stokenize(todo-command-controller.ts:37-58).