@tinoy/pi-todo-parent

Give a child session a todo tool whose mutations are applied to the spawning session's todo list, without waking its model.

Packages

Package details

extension

Install @tinoy/pi-todo-parent from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@tinoy/pi-todo-parent
Package
@tinoy/pi-todo-parent
Version
0.3.1
Published
Oct 18, 2026
Downloads
521/mo · 10/wk
Author
tinoy
License
MIT
Types
extension
Size
28.4 KB
Dependencies
1 dependency · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

[!WARNING] Do not install anything here yet.

This is a fast-moving prototype: the interfaces change without notice, and nothing here is stable. Every package in this project is headed for a stable 1.0, but that is still some way off. Install one only if you intend to follow the code and expect breakage.

@tinoy/pi-todo-parent

Give a child session a todo tool whose mutations are applied to the spawning session's todo list, without waking its model.

pi install npm:@tinoy/pi-todo-parent

What it needs at call time

@juicesharp/rpiv-todo (its pure state reducer and branch replay) when a mutation is applied in the spawning session, and the pi-subagents supervisor-channel layout for the child-to-parent transport. That package is an OPTIONAL peer: it is reached through a guarded dynamic import, so a session without it still loads this extension, and the parent side answers a refusal naming the package and its install line instead of failing. The absence is reported once on the diagnostics log when this extension loads.

Registers

todo_parent, in a CHILD session (the marker PI_SUBAGENT_CHILD=1). The spawning session registers no tool: it runs the watcher that applies the requests.

Behaviour

A todo_parent call writes a request file into the supervisor channel directory and polls for the reply, so it is synchronous and bounded by a 15 s timeout. The spawning session appends an rpiv-todo-state custom entry to its own session branch — the same record the package's own todo tool writes, durable and replay-derivable — and then emits rpiv-todo:external-refresh.

A custom entry, never a faked toolResult: a result row that no assistant message declares is an orphan the provider rejects, and the transcript repair then drops it from every later request of that session.

The mutation is on the branch, not in the parent's live store: the installed rpiv-todo keeps its per-session state in a module-private map that no other extension can reach, so the parent's live todo tool and overlay see the entry at their next session start/compact/tree. A parent-side todo write before that appends an entry from the stale cached view, which wins the replay and drops the child's entry. Every reply carries that note.

Checks

No executable probe covers this package. It is two halves that only exist in a real session pair: the child side needs PI_SUBAGENT_CHILD=1 and a supervisor-channel directory to write its request into, and the parent side needs a live session's branch plus the installed rpiv-todo reducer that owns the mutation. scripts/check-probes.sh names this package in its header rather than running it. What a probe would assert the day one exists: a mutation applied as a replay-compatible todo row on the spawning session's branch, and a refusal naming @juicesharp/rpiv-todo with its install line when that package is absent.

Caveats

No caveat rows declared: the neighbour this extension needs is not a nicety, so it is stated under "What it needs at call time" instead of a "works better with" row.

Dependencies

pi-supplied imports (@earendil-works/pi-coding-agent, typebox) are peer dependencies with a * range and are never bundled. @juicesharp/rpiv-todo is an optional peer. Plain dependencies: @tinoy/pi-ext-lib.

Licence

MIT — see the repository LICENSE.