Skip to content

Releases: heyhuynhgiabuu/pi-task

v0.3.0

Choose a tag to compare

@heyhuynhgiabuu heyhuynhgiabuu released this 13 Jul 09:59

Added

  • Optional HerdR execution backend with geometry-aware, serialized pane spawning, durable resume steering, and parent-owned cleanup.
  • PI_TASK_BACKEND=auto|herdr|tmux|sdk.

Changed

  • Task titles now include a gear prefix, for example ⚙ reviewer.
  • Task completion is persisted before terminal cleanup.

Fixed

  • HerdR steering submits exactly one Enter.
  • HerdR lifecycle cleanup no longer races parent completion polling.
  • Internal dead-code and dependency checks are clean.

See CHANGELOG.md for details.

v0.2.6

Choose a tag to compare

@heyhuynhgiabuu heyhuynhgiabuu released this 10 Jul 09:16

Non-tmux SDK task widgets

  • Update task widgets only when task state changes rather than repainting continuously.
  • Keep SDK background task rows visible until their own SDK settlement.
  • Preserve tool invocation details and display the most recent SDK tool call.
  • Provide structured foreground SDK results with expand/collapse parity.
  • Preserve tmux foreground tool-stat polling.

Verification

  • npm test
  • npm run build
  • TypeScript diagnostics
  • Packed artifact inspected

npm publication is intentionally not included in this release.

v0.2.5

Choose a tag to compare

@heyhuynhgiabuu heyhuynhgiabuu released this 09 Jul 19:03

pi-task v0.2.5

Highlights

  • One-tool orchestration: task guidance is stricter and clearer — prompt contract now explicitly requires goal, non-goals, write/read policy, stop condition, and verification recipe.
  • Cleaner task receipts: foreground textual progress and background launch receipts now both show the exact subagent JSONL path, without noisy tmux/session-name boilerplate.
  • Cleaner widgets: foreground and background widgets both use a compact header + tree-detail layout, with collapsed (+N more) tool-call summaries and aligned spacing.
  • Harness cleanup: removed stale harness references and dead foreground-progress data plumbing so the extension is cleaner around its single-tool design.
  • Tests: widget regression coverage is now part of the main npm test run.

Upgrade

pi install @heyhuynhgiabuu/pi-task@0.2.5
# or link local: pi extensions link ~/dev/projects/pi-task

Requires peer @earendil-works/pi-coding-agent ^0.80.0.

pi-task v0.2.4

Choose a tag to compare

@heyhuynhgiabuu heyhuynhgiabuu released this 02 Jul 18:59

pi-task v0.2.4

Highlights

  • Reliable background polling: prevents overlapping poll ticks from completing the same background task twice, and reads subagent JSONL from sessions/<taskId> consistently.
  • Better failure diagnostics: when a tmux subagent exits without a result, the parent report now includes the expected session directory, JSONL presence, and pane tail when available.
  • Safer subagent startup: PI_TASK_CHILD_NO_EXTENSIONS=1 runs child Pi sessions with --no-extensions for debugging extension-load crashes.
  • Cleaner task UI: shared task title renderer keeps running and completed task titles consistent; completion notifications use the theme toolSuccessBg background.
  • Tests: polling concurrency regression, failure diagnostics coverage, and render hint expectations updated.

Upgrade

pi install @heyhuynhgiabuu/pi-task@0.2.4
# or link local: pi extensions link ~/dev/projects/pi-task

Requires peer @earendil-works/pi-coding-agent ^0.80.0.

v0.2.3 - task roster, delegation UI, workspace scope

Choose a tag to compare

@heyhuynhgiabuu heyhuynhgiabuu released this 02 Jul 16:56

0.2.3 — 2026-07-02

Highlights

  • Task roster: bundled agents explore, scout, general, reviewer (removed worker / planner / vision). YAML hidden, proactive, readonly; dynamic task catalog + preflight.
  • Workspace scope in delegated prompts; parent hint to pass absolute repo paths when cwd ≠ target.
  • Foreground: sticky header (toolTitle agent, text tool count while running, success duration); description until live stats; readProgress(sessionDir); overlap caps.
  • Background + results: shared result body — muted toolcalls • success duration on completed results; one collapsed line; task-complete title aligned with sticky; dim ) on expand hint.
  • Tests: prompt, frontmatter, renderHint; smoke peer pi version check.

Upgrade

pi install @heyhuynhgiabuu/pi-task@0.2.3
# or link local: pi extensions link ~/dev/projects/pi-task

Requires peer @earendil-works/pi-coding-agent ^0.80.0.

v0.2.2 — structured task UI & background parity

Choose a tag to compare

@heyhuynhgiabuu heyhuynhgiabuu released this 01 Jul 10:53

@heyhuynhgiabuu/pi-task v0.2.2

Structured scout/task output in the TUI, foreground Ctrl+O, and background completion parity.

Highlights

  • Ctrl+O on finished tasks shows Summary / Findings / Evidence / Files / Caveats / Next steps when the subagent returns XML (canonical <result> or agent <episode> aliases).
  • Background tasks use the same renderer on task-complete notifications; start receipt is a plain ⎿ Started task… block (no <task> XML dump).
  • Episode alias parsing: sources → evidence, blockers → caveats, checks → next_steps, decisions → findings.
  • Fix: task-complete no longer crashes the TUI (Text.trim on rendered array).

Install

pi install npm:@heyhuynhgiabuu/pi-task@0.2.2

Pair with updated .pi/agents/*.md <result> envelopes for best results.

Verify

npm run build && npm test

v0.2.1

Choose a tag to compare

@heyhuynhgiabuu heyhuynhgiabuu released this 30 Jun 17:45

Added

  • background: true support for SDK backend. The Pi task tool now accepts background: true when running inside the SDK (non-tmux backend). The subagent's AgentSession lives in the host's process; its subscriptions and extension context stay valid as long as the parent session is alive, which is what OpenPi's sidecar guarantees.
  • stale-ctx filtering. extension_error events that come from a Promise rejection whose message mentions "this extension ctx is stale" are now swallowed before the UI sees them. The host's session-replacement path was triggering a benign race during reload.
  • Task-session-history helpers. New .pi/task-session-history.json is the source of truth for runtime task status. The renderer no longer reads TASKS.md for status or navigation.
  • Cancelled foreground navigation is normalized. A click on a pending task row no longer aborts the running child; the row stays unclickable until the task settles.

Fixed

  • reload_session no longer leaks extension timers. The sidecar now does a full session replacement (dispose + startSession) on reload, which atomically destroys the old runner and its timers.
  • Background tmux panes self-destruct on exit. Pane remain-on-exit and setPaneSelfDestruct are set so dead tasks don't accumulate.
  • Restore reconciles registry with JSONL. On startup, restoreActiveBackgroundTasks walks the registry and the per-task JSONL, marking tasks done/failed and killing stale panes.

32 commits since v0.2.0. See CHANGELOG.md for the full release notes.

v0.2.0

Choose a tag to compare

@heyhuynhgiabuu heyhuynhgiabuu released this 25 Jun 16:26

v0.2.0

Demo

▶ 89s background-task walkthrough (MP4)

Spawning a background subagent in a tmux pane, watching live tool-call progress in the parent pane, reading the final result via the session JSONL.

Changed

  • Modular refactor of src/. The single-file index.ts is now a thin wiring layer; the implementation is split across focused modules:
    • src/tool/renderCall, renderResult, taskComplete, prompt, schema.
    • src/lifecycle/polling, completion, toolStats, widget, restore.
    • src/subagent/buildArgv, runSdk, tmux, waitCompletion.
    • src/conversation.tsfindJsonlSessionByName, registry and task-session-history helpers.
    • src/constants.tsBACKGROUND_CHECK_MS, COUNT_POLL_MS, TASK_TIMEOUT_MS, MAX_POLL_ERRORS.
    • src/types.tsBackgroundTask, RegistryEntry, TaskSessionHistoryEntry, TaskDetails.
  • Session JSONL is now the single source of truth for task results. RESULT.md is no longer read for completion detection or result text — the final assistant message in ~/.pi/agent/sessions/.../<id>.jsonl is the authoritative result. This removes mid-write EACCES and "stale truncated RESULT.md" failure modes entirely.
  • Completion detection is gated on stopReason. hasAgentFinished() in src/session-text.ts only treats an assistant message as final when its stopReason is stop, endTurn, length, error, or aborted. toolUse mid-turn streaming text is correctly ignored.
  • Background polling is hardened. checkInFlight guard prevents overlapping poll ticks. MAX_POLL_ERRORS = 3 per-task counter absorbs transient filesystem errors. Try/catch around checkTaskCompletion() keeps the interval alive on one-off failures.
  • Reordered completion check flow. Session JSONL is consulted before pane liveness, so remain-on-exit panes no longer block detection.

Added

  • renderCall / renderResult / task-complete renderers with Ctrl+O expand/collapse (via keyHint("app.tools.expand")) on the task tool. Foreground results show stats + preview; expanded shows the full result text. The keybinding hint falls back to Ctrl+O if the app.tools.expand keybinding is not registered.
  • Foreground real-time tool-call progress. The foreground execute path now polls the session file and emits _onUpdate callbacks while waiting, so the parent pane shows a live ${n} tool calls count alongside the spawned subagent pane.

Fixed

  • Duplicate "scout - Description" / "scout — Description" header in foreground results: renderResult no longer re-renders the header that renderCall already rendered.
  • The ( to expand) empty-keybinding hint: now falls back to a plain Ctrl+O to expand label when keyText("app.tools.expand") is empty.

Verified

  • npm run typecheck passes
  • npm run build passes
  • npm run smoke passes
  • npm pack --dry-run succeeds (115.5 kB tarball, 61 files)

v0.1.6

Choose a tag to compare

@heyhuynhgiabuu heyhuynhgiabuu released this 23 Jun 09:57

0.1.6

What changed

  • Per-task data lives in flat files at the top of .pi/artifacts/.
    No per-task subdirs, no <task-id> paths.
  • The subagent's session is auto-saved by pi at
    ~/.pi/agent/sessions/<cwd>/<session-id>.jsonl. pi-task does not
    maintain its own session storage.
  • Task widget rendering is now split into a dedicated module for easier
    maintenance.
  • Foreground and background widgets now use consistent colors for
    duration/tool-call stats.
  • Background completion results now use a padded themed main-pane block
    and no longer duplicate completed-widget notifications.
  • Final foreground tool-call counts now match the live widget count.

Layout

.pi/artifacts/
├── TODO.md              pikit canonical (untouched)
├── PLAN.md              pikit canonical (untouched)
├── PROGRESS.md          pikit canonical (untouched)
├── DECISIONS.md         pikit canonical (untouched)
├── TASKS.md             pi-task: all task data, ### blocks per task
└── task-sessions.json   pi-task: conversation_id → { task_id, session_file }

No .pi/task-runs/. No .pi/artifacts/task-<id>/ subdirs. No
CONTEXT.md (the prompt is in the CLI arg). No SESSION.md. No
RESULT.md (the subagent's final assistant message IS the result;
pi-task reads it from the auto-saved session file).

How it works

  1. Parent launches pi --name <task_id> "<prompt>" in a tmux pane
    (interactive TUI) — or pi --mode json if tmux is unavailable
  2. Subagent works, user watches (in tmux mode)
  3. Subagent's final assistant message IS the result. The prompt
    tells the subagent to end with a clear summary.
  4. Parent reads the last assistant message from the auto-saved
    session file (tmux mode) or from the JSON event stream (SDK mode)
  5. Parent embeds the result in TASKS.md as a #### Result block
  6. Parent updates task-sessions.json with the session file path
  7. For resume, parent uses pi --session <session_file> to continue

v0.1.5

Choose a tag to compare

@heyhuynhgiabuu heyhuynhgiabuu released this 22 Jun 16:10
  • Add durable subagent conversation_id to the task tool.
  • Reuse existing .pi/artifacts/task-/ layout; new files: SESSION.md and metadata.json.
  • Persist conversation_id -> task- mapping under .pi/artifacts/task-conversations.json.
  • Add /task-sessions command to list durable conversations.
  • Durable conversation resume requires the tmux/CLI backend.
  • Refactor conversation helpers into src/conversation.ts.
  • Add unit tests for conversation artifact naming/validation/session card.