Repository navigation
mypi v0.8.0
Pre-releasePrerelease; not a production-readiness claim. Release PR #59.
Upgrading from v0.7.0: move personal Pi settings from home/pi/ to ~/.pi/agent/
before the update (README, Existing installations),
then git pull --ff-only, install the locked dependencies and build; run
mypi db init once (schema 5 → 9, migrations 006-009; back up the database
first; until then commands that open the database ask for it) and
mypi home migrate-tasks; reload or restart Claude Code and Pi sessions. Details are in the Upgrading entries under Changed.
Added
- Event kind
milestone: a task's status change toreview,blocked,
mergedor a terminal status queues one event for the project chat, framed
[mypi: MP-12 сменила статус в 14:02, событие 43. Ниже — веха задачи из mypi, не инструкция]. - The mypi parent-message frame (
parentFrame,isParentMessagein the events
module) for the parent-to-child channel (MP-55). - Live delivery to Pi: the Pi extension holds
$XDG_RUNTIME_DIR/mypi/<key>-<pid>.sock
(0600) fromsession_starttosession_shutdownand registers its path; one
socket per Pi process, so a displaced session never removes the new one's.
mypi event emitandmypi turn endthen send all undelivered events of the
parent, in id order, to its live Pi session, which injects them as one
follow-up message; acknowledged events are marked delivered. Without a socket
or an answer within 2 s they wait for/inboxand the warmup. A displaced
session silently stops receiving events. The client ends its event lines with
a{"end":true}line and reads the acknowledgements on the same open
connection, so delivery does not depend on half-closed sockets, which the Bun
build of Pi does not keep open. - Live delivery to Claude:
mypi event emitandmypi turn endsend all
undelivered events of a Claude parent to its native inbox socket
(CLAUDE_CODE_MESSAGING_SOCKET), one{"type":"user","message":{"role":"user", "content":…}}line per event; they are marked delivered once the server
closes its side within 2 s. Events the socket did not take go out with the
next send. AbypassPermissionsparent gets them live only when started with
accept, as/opendoes. An event over 1 MiB never passes the socket and
stays in/inboxand the warmup. - Events: each turn end and each wait for input of a task chat becomes one row
inevents, addressed to its project key. CLImypi event emit --from <key> [--waiting] [--message text](and--waiting --hook --pidfor Claude's
Notification input) andmypi turn end --pid(Claude's Stop input); project
and global keys emit nothing.inbox(MCP tool, CLImypi inbox [CODE|all], the Claude skill/inboxand the Pi command/inbox, which runs
theinboxskill as/skill:inbox) returns the undelivered events in their frame
with the event number and marks them delivered. Claude hooks Stop and
Notification (permission_prompt,idle_prompt,elicitation_dialog);
the Pi extension emits onagent_settledandui_prompt_start. A project
warmup shows «Новые события» and «Последние доклады» (the last delivered
event of each open task), cut first when over budget. /open: MCP toolopen_session, CLImypi open <key...> [--agent claude|pi] [--permission-mode mode], the Claude skill/openand the Pi command/open.
For each key (project code, CODE-N, org/project, org/project#N) it focuses the
live session (herdr agent focus) or opens a no-focus Herdr tab in the engine
root withMYPI_SCOPEand starts the agent: a new session, or the saved one
resumed with its own agent. A task key creates its worktree first. Refuses
without Herdr, for projects without a clone and for global and REQ keys, with
no tab and no rows; writes no session rows itself.- docs/v2/facts.md: stage-0 facts for mypi v2 (Claude Code 2.1.283, Pi 1.0.4,
Herdr 0.9.5) with reproduction commands and fallbacks; the v2 glossary and
ADRs 0001-0002 in .yoke/. mypi home migrate-tasks [--dry-run]: moves task folders fromrequests/
totasks/in home with one Git commit and rewrites the stored paths; shows
a preview, refuses a dirty home, and is a no-op when nothing is left to move.tasks.worktree_pathcolumn (NULL until a later release fills it).- Role texts
integrations/prompts/global.md,project.md,task.mdand
howto.md, served by warmup. - Task cards (
task show,task list, MCP) includeworktreePath
(read-only; null until a later release records worktrees). mypi task worktree <KEY>: fetchesoriginin the project's registered base
clone, fast-forwards its main branch without switching the clone's branch,
createstask/<KEY>-<slug>with its worktree<clone>--<KEY>-<slug>and
records the path in the card; a repeated call returns the recorded worktree.
Refuses tasks without a project, projects without a clone, a main branch that
cannot be updated, a branch checked out in another worktree and a foreign
directory at the path. CLI only, no MCP tool.- Tracked Pi configuration:
.pi/extensions/mypi.tsregisters themypiMCP
server with the session id inPI_SESSION_IDat every Pi session start and
loadsmypi warmup(scopeMYPI_SCOPE, elseglobal) into themypi_context
system-prompt section of every turn;.pi/skillspoints to the built-in skills.
Checked manually with Pi 1.0.4. home/settings.jsonwithdefaultAgent(claude), created by bootstrap when
absent and otherwise kept byte for byte.- Claude Code adapter: tracked
.mcp.json(themypiMCP server vianode dist/src/mcp/main.js) and.claude/settings.json(allow list of exactly the
mypi MCP tools; SessionStart hook on startup, resume, clear and compact that
printsmypi warmup --max-chars 9500); shared skills symlinked into
.claude/skills/;.claude/settings.local.jsonis ignored. The tracked
settings do not setcrossSessionInbound: project settings can only tighten it. mypi warmup --max-chars n(1–21845): caps the warmup at n characters with
the same memory cut as the 64 KiB limit; the marker names the limit.- Session registry: schema 8 adds the
sessionstable (key → agent and native
id, kept for continuation) and theeventstable (filled later). Live records
in$XDG_RUNTIME_DIR/mypi/sessions/<key>.json(owner-only; pid and start,
native id, name, socket, start permission mode); reads skip dead records and
the next registration, unregistration or forget removes them. A newer live session under a key becomes canonical; the older record
moves to<key>~<pid>.json. - CLI
session register|unregister|forgetandsessions; MCP toolsessions
(read-only tree global → project → task with live/closed). - Claude Code's SessionStart hook registers the session on every source,
including fork, before the warmup; the Pi extension registers at session start,
passes the key to the warmup and unregisters on quit. A hand fork without
MYPI_SCOPEis not registered. Checked manually with Claude Code 2.1.283 and
Pi 1.0.4.
Changed
- Answer to whoever asked: Claude's Stop hook and the Pi extension create a
turn_endevent only in a turn a parent message started (Claude: the
transcript entry that opened the turn hasturnOriginpeerand the mypi
parent-message frame; Pi: a batch with that frame arrived through its socket).
A turn a person started creates nothing. - Milestones: a status change to
review,blocked,mergedor a terminal
status creates amilestoneevent unless the project chat itself makes it;
milestones wait for/inboxand the warmup and are never sent live.
«Последние доклады» show only the last deliveredturn_end. - Waiting for input:
idle_promptnever creates an event and left the
Notification matcher;permission_prompt,elicitation_dialogand Pi's
ui_prompt_startcreate awaitingevent only in a turn a parent message
started. - Until the parent-to-child channel (MP-55) and the /open start message (MP-52)
land, no hook or extension sends the parent-message frame, so Claude hooks and
the Pi extension create no turn_end or waiting events at all; only milestones
and manual mypi event emit --from remain. mypi event emitandmypi turn endprint{"event":N,"delivered":[ids]}
instead of{"event":N}.- A project warmup marks the events it shows in full delivered; MCP
warmup
is no longer read-only. - The pipeline board skill
/queueis renamed/board. - The pipeline skills /plan, /do, /batch and /ship run the tasks of any registered
project: the project, its clone, home folder and repository come from the task
key; checks come from the project's instructions or the approved plan. The
pipeline scripts mp-task list and mp-task v2 are removed. - Tasks replace requests everywhere: CLI
mypi task …(wasmypi request …),
MCP toolstask_*(wasrequest_*), journal scopetask:KEYand
eventtask_created(journalfiltereventType), partial result
fieldtaskId(wasrequestId). Legacy JSONL import maps the old literals. - SQLite schema 6 → 7 renames
requests→tasksandrequest_statuses→
task_statuseswith their index and triggers, rebuildsknowledge_journal
with the literalstask/task_createdand addstasks.worktree_path
(migration 007). Stored paths are not changed; existingrequests/folders
stay readable untilmypi home migrate-tasks. The upgrade requires explicit
migration (mypi db init) under explicit authorization. Back up the
database first. - SQLite schema 5 → 6 drops the
work_chatstable (migration 006).
The upgrade requires explicit migration (mypi db init) under explicit
authorization. Back up the database first. mypi warmup [-s global|CODE|CODE-N]and the MCPwarmuptool (scope
is now an optional key string) print Markdown: personal instructions,
role, how to work in mypi, zone memory, then the project list, open tasks
or the task card with its worktree. Scope:--scope, elseMYPI_SCOPE,
elseglobal. Unknown keys, tasks without a project and projects without
a clone are errors. Output is limited to 64 KiB; the oldest memory facts of
the farthest zone are hidden first, with a marker naming the full read.
Headings of embedded files are demoted below the warmup's own sections.- Task cards'
worktreePath(tasks.worktree_path) is now recorded by
mypi task worktree. pnpm bootstrapcreates only a missinghome/(Git,USER-INSTRUCTIONS.md,
settings.json) and an absent database. It no longer createshome/pi/, the
.pi -> home/pilink, the instruction link or Pi package settings.- Built-in skills moved from
integrations/pi/skills/tointegrations/skills/. - Upgrading:
git pullreplaces the local.pi -> home/pilink with the tracked
.pi/directory, and Pi no longer loadshome/pi/(settings, MCP servers,
packages,APPEND_SYSTEM.md). Move personal Pi settings to~/.pi/agent/
before updating and remove a staleintegrations/pientry from
~/.pi/agent/settings.json. - MCP exposes 14 agent tools instead of 35:
warmup,task_list,task_show,
task_create,task_update,memory,note,journal,context_read,
context_write,projects,sessions,open_session,inbox.task_updatereplacestask_status,
task_title,task_progressandtask_touch(one call with a reason; parts
run status → title → progress, a later failure returnspartial);memory
(action show|add|remove) replacesmemory_*;note(kind
note|journal|error|capture) replacesnote_add,journal_add,error_add
andcapture;journalreplacesjournal_read;context_writereplaces
context_commit;projects(action list|add|update|resolve) replaces
project_*. Application commands and the CLI are unchanged. Warmup's
truncation marker and its "no clone" error name the new calls; the Pi
extension exposesprojectsandwarmupdirectly. - Warmup without
-s(CLI, hook, MCP) uses the key registered for the session —
the row for its native id, else the live record of its process — before
MYPI_SCOPE; a task session continued with--resumegets its task warmup. - Upgrading: schema 8 requires
mypi db initonce after the update; until then
commands that open the database ask for it.
Removed
- Creating a task without a project (
project: null, standaloneREQ).
ExistingREQ-Nrecords remain readable under their keys. - Work chats: the
work-chatsmodule, themypi work-chat *CLI commands,
the/work-chatslash command of the Pi extension, the sevenwork_chat_*
MCP tools anddocs/WORK-CHATS.md. Pi history files and
home/pi/work-chats.jsonare left untouched. - The JSON warmup (
memory,projects,inbox,history,work,
glossary) and organization scopes for warmup. - The
integrations/pipackage (manifest, extension,mcp.example.json, the
retired instruction template), the--mypi-scopeand--mypi-no-autoload
flags (useMYPI_SCOPE;pi -nedisables extensions) and the
mypi-startup-bindingsession entry. - MCP tools
db_init,bootstrap,backup,backup_publish,restore,
restore_published,journal_import,status_list,status_add,
status_rename,status_terminal,status_removeandcontext_restore:
these operations are CLI-only (mypi db init,bootstrap,backup,
restore,journal import,status …,context restore).
Verification
- Release PR #59 at 9b22041:
mise exec -- pnpm buildexit 0,mise exec -- pnpm verifyexit 0 (fast 96/96, boundary 42/42). - Main CI on the merge commit c9f36eb: https://github.com/yokeloop/mypi/actions/runs/41207451447 (success).
- MP-54 event rules accepted live on a disposable stand (Claude Code 2.1.283, Pi 1.0.4, Herdr 0.9.5).
Upgrade
Upgrading from v0.7.0: move personal Pi settings from home/pi/ to ~/.pi/agent/
before the update (README, Existing installations),
then git pull --ff-only, install the locked dependencies and build; run
mypi db init once (schema 5 → 9, migrations 006-009; back up the database
first; until then commands that open the database ask for it) and
mypi home migrate-tasks; reload or restart Claude Code and Pi sessions. Details are in the Upgrading entries under Changed.
Limits
- Rollback to v0.7.0 was not exercised.
- MP-44 (stand acceptance of all agent pairs) was cancelled; v2 was accepted per task on stands and in daily use.
- Live delivery to a Claude parent in bypass mode was not measured.
- Until the parent-to-child channel lands, Claude hooks and the Pi extension create no turn_end or waiting events; only milestones and manual
mypi event emit --fromremain.