mirror of
https://github.com/wassname/pi-lgtm.git
synced 2026-06-27 16:46:17 +08:00
14 KiB
14 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
0.4.2 - 2026-03-24
Added
- Task numbers in widget — each task line now shows its
#id(e.g.,◻ #3 Do something), making blocker references likeblocked by #3easy to cross-reference at a glance. Numbers are dimmed so they stay readable without competing with the task subject.
0.4.1 - 2026-03-22
Added
- Auto-clear completed tasks — new
autoClearCompletedsetting with three modes:never: completed tasks stay visible until manually clearedon_list_complete(default): completed tasks are cleared after all tasks are done and a few turns pass — user sees the "all done" state before cleanupon_task_complete: each completed task is cleared individually after a few turns- Both auto-clear modes use a turn-based delay (matching
REMINDER_INTERVAL) for consistent, non-jarring UX — tasks linger briefly so the user sees the completion before they disappear
AutoClearManager— extracted, testable class (src/auto-clear.ts) handling turn-based clearing logic with per-task and batch countdown tracking- 20 new unit tests — full coverage of all three auto-clear modes, turn delays, dependency cleanup, batch reset, dynamic mode switching, session reset, and store swap
Changed
- Settings —
/tasks→ Settings now shows "Auto-clear completed tasks" toggle withnever/on_list_complete/on_task_completevalues. Also configurable via.pi/tasks-config.json.
Fixed
/newand/resumenow correctly switch session state —storeUpgradedandpersistedTasksShownflags were never reset onsession_switch, causing the store to stay pointed at the old session file and the widget to not refresh. All session-scoped state (turn counters, reminder flags, auto-clear tracking) is now reset on both/newand/resume. Memory-mode tasks are explicitly cleared on/new.
0.4.0 - 2026-03-22
Added
- RPC-based subagent spawning —
TaskExecutenow communicates with@tintinweb/pi-subagentsvia a standardized RPC envelope (rpcCallhelper) with protocol version negotiation and timeout handling. - RPC-based subagent stopping —
stopSubagentsends stop requests viasubagents:rpc:stopevent bus RPC. - TaskOutput supports subagent tasks — can wait for subagent completion with blocking/timeout, using
subagents:completedandsubagents:failedevents. - TaskStop supports subagent tasks — stops running subagents via RPC and marks the task as completed.
- Debug logging — set
PI_TASKS_DEBUG=1to trace RPC communication (request/reply/timeout) and spawn errors to stderr. - TaskExecute prompt guidelines — agents are instructed not to use the Agent tool for tasks already launched via TaskExecute.
- Biome linter — added Biome for correctness linting.
Changed
- TaskOutput/TaskStop accept agent IDs — both tools now resolve agent IDs (including partial prefixes) to task IDs via
agentTaskMap, fixing the mismatch where TaskExecute returns agent IDs but TaskOutput/TaskStop only accepted task IDs. - TaskGet shows metadata — non-empty metadata is now displayed in TaskGet output as JSON.
- TaskGet filters completed blockers — consistent with TaskList, TaskGet now only shows open (non-completed) blockers instead of all dependency edges.
- TaskExecute success message — now includes guidance to use TaskOutput for progress and not spawn duplicate agents.
- Softened TaskExecute description — removed "Requires @tintinweb/pi-subagents extension" from the tool description to prevent agents from refusing to use it when the extension is loaded.
- Stopped subagents handled gracefully —
subagents:failedlistener now distinguishes intentional stops (status"stopped"→ mark completed, preserve partial result) from actual errors (revert to pending).
0.3.3 - 2026-03-17
Added
- Session-scoped task storage — new
taskScopeconfig with three modes:memory(in-memory only),session(per-session file, default),project(shared across sessions). Session mode usestasks-<sessionId>.json, surviving session resume while keeping sessions isolated. - Session resume support —
session_switchevent handler reloads persisted tasks on resume without auto-clearing completed tasks (user may want to review). - Session file cleanup — empty session task files are automatically deleted when all tasks are cleared, preventing stale file accumulation.
- "Clear all" in
/tasksmenu — wipe all tasks regardless of status, not just completed ones.
Changed
- Unified storage setting — replaced
persistTasks(boolean) with a singletaskScope: "memory" | "session" | "project"setting. ThepersistTasksfield is no longer recognized. - Auto-clear completed on new session start — when all persisted tasks are completed, they are silently cleared instead of showing stale completed work. On resume, completed tasks are preserved.
- Widget only shows on start if there's unfinished work — sessions with only completed tasks start with a clean slate.
- Settings moved to last position in
/tasksmenu for better UX (actions first, config last).
Fixed
- Robust session store upgrade — store upgrade from in-memory to file-backed triggers on
turn_start,before_agent_start,session_switch, andtool_execution_start— whichever fires first.
0.3.2 - 2026-03-17
Fixed
- Completed tasks no longer vanish from the list — completed tasks are now persisted to disk so they survive reloads and show as strikethrough instead of disappearing. Use "Clear completed" in
/tasksto explicitly remove them.
0.3.1 - 2026-03-16
Added
- Local-by-default task persistence — tasks now auto-persist to
<cwd>/.pi/tasks/tasks.jsonon every mutation and reload on restart. No config needed. SetPI_TASKS=offto opt out (CI/automation). - Settings persistence —
persistTasksandautoCascadesettings survive restarts via<cwd>/.pi/tasks-config.json. - "Persist tasks" toggle in Settings —
/tasks→ Settings now shows two toggles: auto-execute and persist. Both are saved immediately totasks-config.json. - Completed tasks excluded from disk — only
pendingandin_progresstasks are written to disk. Completed tasks are in-memory only and pruned on restart. (Reverted in 0.3.2 — completed tasks are now persisted.) - Absolute path support —
TaskStorenow accepts an absolute file path in addition to a short list ID.
Changed
- ⚠ BREAKING:
PI_TASKS_FILE/PI_TASKS_LIST→PI_TASKS— two env vars consolidated into one. Values:off(in-memory),sprint-1(named list →~/.pi/tasks/sprint-1.json),/abs/path(absolute),./rel/path(relative to cwd).PI_TASKS_LIST=nameusers: rename toPI_TASKS=name. - Settings menu — extracted to
src/ui/settings-menu.tsand rebuilt usingui.custom()+SettingsListfor native TUI rendering: keyboard navigation, live toggle, per-row descriptions, theme-consistent styling. autoCascadesetting — now loaded fromtasks-config.jsonon startup so the toggle survives restarts.- Hardened
TaskUpdatedescription — added "Before starting work on a task: mark itin_progressBEFORE beginning" as an explicit use case. Previously this rule only appeared inTaskCreate; now it lives in the tool actually used to set that status. - Removed
before_agent_startsystem prompt injection — task state is no longer injected into the system prompt on every agent loop. Analysis showed this creates wallpaper noise that trains the model to ignore the task block. Claude Code itself does not do this: the workflow contract lives in tool descriptions (read at decision time) and the periodic<system-reminder>nudge (fired when task tools haven't been used recently). Removed the corresponding 3 tests. - Widget render-once refactor —
TaskWidgetnow registers the widget callback a single time and usestui.requestRender()for subsequent updates instead of callingsetWidget()on every tick. Rendering logic extracted torenderWidget(). Eliminates redundant callback re-registration and keeps a cachedtuireference for lightweight invalidation.
0.3.0 - 2026-03-14
Changed
- Eventbus RPC for subagent communication — replaced the
Symbol.forglobal registry bridge with a proper eventbus RPC protocol.pi-tasksnow communicates with@tintinweb/pi-subagentsvia scoped request/reply channels (subagents:rpc:spawn,subagents:rpc:ping), eliminating shared mutable global state and enabling reliable cross-extension coordination regardless of load order. - Presence detection — two-path handshake: (1) ping RPC on init with scoped reply channel, (2)
subagents:readybroadcast listener. Works whetherpi-subagentsloads before or afterpi-tasks. - Agent-task mapping — in-memory
agentTaskMap(agentId → taskId) replaces linearstore.list().find()scans for O(1) completion event lookup. - Spawn error handling —
spawnSubagent()returns a Promise with 30s timeout. Failed spawns revert tasks topendingwith error in metadata instead of silently failing. - Removed
SubagentBridgetype — thetypes.tsinterface for the global registry bridge is no longer needed. - Widget icon colors — completed tasks show green
✔, in-progress tasks show accent-colored◼(matching Claude Code's UI).
0.2.0 - 2026-03-12
Added
TaskExecutetool — execute tasks as background subagents via @tintinweb/pi-subagents. Tasks withagentTypemetadata are spawned as independent agents; validates status, dependencies, and agent type before launching.agentTypeparameter onTaskCreate— opt-in field (e.g.,"general-purpose","Explore") that marks tasks for subagent execution.- Auto-cascade — when enabled via
/tasks→ Settings, completed agent tasks automatically trigger execution of their unblocked dependents, flowing through the task DAG like a build system. Off by default. - Subagent completion listener — listens to
subagents:completedandsubagents:failedevents to automatically update task status. Failed tasks revert topendingwith error stored in metadata. - READY tags in system prompt — pending tasks with
agentTypeand all dependencies completed are marked[READY — use TaskExecute to start]in the system prompt. - Agent ID in widget — in-progress tasks backed by subagents show the agent ID (e.g.,
✳ Writing tests (agent abc12)…). - Settings menu —
/tasks→ Settings → toggle "Auto-execute tasks with agents". SubagentBridgetype — typed interface for the cross-extension Symbol.for bridge.
Changed
@tintinweb/pi-subagentsglobal registry now exposesspawn()andgetRecord()in addition towaitForAll()andhasRunning().@tintinweb/pi-subagentsemits lifecycle events onpi.events:subagents:created,subagents:started,subagents:completed,subagents:failed,subagents:steered.AgentManageraccepts an optionalonStartcallback, fired when an agent transitions to running (including from queue).
0.1.0 - 2026-03-12
Initial release — Claude Code-style task tracking and coordination for pi.
Added
- 6 LLM-callable tools —
TaskCreate,TaskList,TaskGet,TaskUpdate,TaskOutput,TaskStop— matching Claude Code's exact tool specs, descriptions, and schemas. - System-reminder injection — periodic
<system-reminder>nudges appended to non-task tool results when tasks exist but task tools haven't been used for 4+ turns. Matches Claude Code's host-level reminder mechanism. - Prompt guidelines —
promptGuidelineson TaskCreate injects persistent guidance into the system prompt, nudging the LLM to use task tools for complex work. - Task state in system prompt —
before_agent_startevent appends current task state to the system prompt on every agent loop, ensuring task awareness survives context compaction. - Persistent widget — live task list above editor with
✔(completed, strikethrough + dim),◼(in-progress),◻(pending), animated star spinner (✳✽) for active tasks with elapsed time and token counts (e.g.,✳ Running tests… (2m 49s · ↑ 4.1k ↓ 1.2k)). - Multiple parallel active tasks — widget supports multiple simultaneous spinners.
/taskscommand — interactive menu: view tasks with actions (start, complete, delete), create tasks, clear completed.- Bidirectional dependency management —
addBlocks/addBlockedBymaintain both sides automatically. Edges cleaned up on task deletion. - Dependency warnings — cycles, self-dependencies, and dangling references produce warnings in TaskUpdate responses. Edges are still stored, matching Claude Code's permissive behavior.
- File-backed shared storage — set
PI_TASK_LIST_IDenv var for multi-session coordination at~/.pi/tasks/<id>.json. File locking with stale-lock detection prevents race conditions. - In-memory session-scoped mode — default when no env var is set, zero disk I/O.
- Background process tracker — output buffering (stdout + stderr), waiter notification, graceful stop with timeout escalation (SIGTERM → 5s → SIGKILL).
- 78 unit tests — task store CRUD, dependencies, warnings, file persistence; widget rendering, icons, spinners, token/duration formatting; process tracker lifecycle.