Skip to content

Add focused Pi host adapter - #7

Merged
Johnny-xuan merged 2 commits into
mainfrom
feat/pi-adapter
Aug 7, 2026
Merged

Add focused Pi host adapter#7
Johnny-xuan merged 2 commits into
mainfrom
feat/pi-adapter

Conversation

@Johnny-xuan

Copy link
Copy Markdown
Owner

Summary

  • add a root Pi package that directly reuses TreeWork's shipped Skill, Rust runtime, transactions, and read-only MCP server
  • keep Pi's Agent-tool surface minimal with one lazy loader for Recall, Check, and Project Map
  • add explicit /treework-enter and /treework-return host commands for persisted, cwd-bound conversation handoff; prepare the session fork before Enter and recover cancelled switches to paused
  • port direct generated-state guardrails and the settled-agent consistency check to Pi lifecycle events
  • make Project Map browser behavior host-aware without changing accepted TreeWork state semantics
  • document install, use, cache cleanup, rollback, development, and release verification in English and Chinese

The adapter does not add lifecycle states, persisted fields, document types, Team/Runner state, or another source of truth.

Pi session replacement intentionally remains an explicit host command: Pi 0.84.x does not expose session replacement from Agent tool execution, so pretending Enter can be a model tool would either race sibling tools or silently fail. The TreeWork Skill teaches this boundary.

Verification

  • make test
    • 72 Rust tests
    • 64 Project Map tests + TypeScript check
    • CLI, read-model, hooks, MCP, activation, quarantine tests
    • Pi guardrail/MCP tests
    • real offline Pi RPC Enter/Return round-trip from a repository subdirectory
    • cancelled Pi switch recovery to paused with no orphan session
  • make validate
    • clean Project Map build
    • packaging, plugin, and Skill validation
    • Pi package install/load/remove check
  • independent final review: PASS

Closes #6

TreeWork Development added 2 commits August 7, 2026 15:34
Reuse TreeWork's Skill, CLI, transactions, and MCP server from Pi while preserving one project-state model. Add explicit session handoff commands, lifecycle guardrails, lazy read-only tools, reversible packaging, and end-to-end RPC tests.\n\nCloses #6
@Johnny-xuan
Johnny-xuan merged commit 970fc12 into main Aug 7, 2026
1 check passed
@Johnny-xuan
Johnny-xuan deleted the feat/pi-adapter branch August 7, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a focused Pi host adapter

1 participant