PI-Desktop Baseline Freeze
- Baseline Version:
0.4.15 - Date:
2026-08-05 - Status:
Frozen for implementation details (Plan checkpoint artifact + approval/execution startup fence + protocol v9 + schema v10 + selectable shell catalog + icon-free composer prompt row + turn-boundary context checkpoint compaction + session-scoped work panel + pi-owned model metadata + provider/runtime safety + M5 hardening + settings IA + project archive + sidebar organization + app update delivery + three-platform release + Extensions page density and theme-readable actions) - Language policy: English-first
- Backend policy: Rust host core + pi agent sidecar
Version history:
0.3.4froze provider/runtime-safety decisions (D001–D033).0.4.0absorbs the Codex visual-parity decision series (D034+, gold source = decisions-log §D) and the M5 hardening decisions (D078–D083: signing lanes, brand icon, supervision, renderer sandbox, log channels, window state).0.4.1freezes the compact four-destination settings directory from D090 / ADR 0013.0.4.2replaces the frozen 720px settings content cap with the window-responsive D092 / ADR 0015 layout.0.4.3adopts retained multi-project sidebar tabs, non-destructive project/session organization, and session-rooted tool isolation through D093 / ADR 0016.0.4.4removes the passive composer context rail through D095.0.4.5freezes end-to-end thinking levels and provider presets through D096/D102 and ADR 0018.0.4.6supersedes D020's blanket deferral with the packaged application update modes in D120 / ADR 0022 while preserving D010.0.4.7lifts D010's macOS-only release scope through D126: tag builds publish installers and electron-updater feeds for macOS arm64, Windows x64, and Linux x64.0.4.8moves the durable Projects index out of the home sidebar and into Settings as the fifth Project archive destination through D133 / ADR 0026.0.4.9makes the pinned pi-ai catalog authoritative for known-model metadata and removes desktop-owned model parameter overrides through D136 / ADR 0027.0.4.10replaces destructive work-panel clearing on conversation switches with runtime session-scoped contexts through D142 / ADR 0028.0.4.11adopts turn-boundary model-context checkpoint compaction through D158 / ADR 0030 while preserving the complete visible transcript. The context-recovery amendment in ADR 0049 adds a durable retained-tail fallback for automatic compaction failures. D200 / ADR 0061 derives the budgets from the model window instead of settings and removes the compaction settings. D203 / ADR 0064 then rebuilds the mechanism to match Codex: compaction is inline only, a checkpoint carries the summary plus recent user messages, the model-facingnew_contexttool and two budget reminders are back, each compaction adds a transcript row and one warning, and a no-summary rollover family exists behind an internal switch.0.4.12standardizes home and thread-docked composer prompt rows without a leading brand mark through D160 / ADR 0031 while preserving shell branding elsewhere.0.4.13replaces the Chat operating profile with the Plan operating state through D188 / ADR 0052. Plan is the same pi Agent in planning state, keeps permission-mode selection, exposes Bash subject to that policy, denies Write/Edit/plugin tools, and submits structured plans through a separate host-owned approval transition. The host protocol is v7 and storage schema v8; persisted Chat values migrate to Plan while Agent remains the default.0.4.14replaces that proposal with immutable host-written Markdown checkpoints under<workspaceRoot>/.pi/plan/*.mdthrough D189 / ADR 0053. SubmitPlan accepts title, Markdown, and question; the Markdown bytes are preserved exactly while title/question remain structured approval fields. Approval is approve/reject only with explicit permission selection defaulting to Ask, and opens the artifact for review. Pending, queued, and running work is interrupted by the startup process fence without replay, while an already-approved session remains Agent. ADR 0054 adds the selectable shell catalog while retaining the Bash protocol name. The host protocol is v9 and storage schema is v10.0.4.15amends the D169 Extensions presentation through D196 / ADR 0058: the four-card numeric overview band is removed, and shared button surfaces use semantic theme tokens so primary and secondary actions remain visible in dark and light themes. No host protocol or storage schema changes.
Frozen Decisions
- Product name: PI-Desktop
- Desktop shell: Electron
- UI: React + TypeScript + Vite + Tailwind
- UI language default: English
- Docs / issues / commits language: English primary
- Agent engine: pi (
pi-ai+pi-agent-core) - Backend host core: Rust
- Agent loop location: Node/TypeScript pi sidecar (not renderer)
- Electron main role: thin orchestrator
- Bridge: preload IPC only for renderer
- Host services transport: Rust sidecar + stdio JSON-RPC (NDJSON)
- Storage ownership: Rust host-core owns SQLite exclusively
- MVP domain: local coding agent
- Default mode: Agent
- Product operating selector: Agent | Plan; the internal
page = "chat"value remains a conversation-surface implementation detail, not an operating mode - Agent tools: Read / Glob / Grep / Write / Edit / Bash
- Permission timeout: 120s → deny
- Session grant scope: by toolName
~/.piauto-import: not in MVP- Not in MVP: Gateway / remote WebUI control
- Extension model: user-installable plugin system
- Plugin first phase: commands / panel / agentTools / skills
- Plugin runtime target: separate process; M4 may use host-managed sandboxed runtime
- Plugin market: protocol defined, implementation postponed
- Plugin package format:
.piplug(zip) - Plugin trust first step: sha256 checksum; signature later
- First release platform: macOS arm64 only — lifted in
0.4.7/D126; tag builds now publish all three desktop platforms - TS schema library: typebox
- i18n library: i18next
- Bash: non-interactive, streamed, and resolved from the selectable shell catalog; default timeout 60s with a bounded override
- Onboarding: inline checklist
- Observability MVP: local logs only
- Error model: shared AppError code registry
- Provider coverage: universal via pi-ai native + OpenAI-compatible + custom
- Model policy: no closed allowlist; refreshable catalog + free-form model IDs
- Provider storage: Rust SQLite configs + OS secret store references
- Secrets backend: safeStorage primary + encrypted file fallback
- Workspace ignore: denylist + defaults +
.pi-desktopignore - Tool result limits: 256KB / 4000 lines with truncation markers
- Settings directory: Basics / Model configuration / Import / Project archive / Info; the project archive owns durable project discovery, archive, restore, and reopen workflows; plugin management remains the app shell's independent Plugins destination
- Sidebar organization: retained multi-project tabs with renderer-local project/session pin, archive, collapse, and sort metadata
- Project activation: one visible host workspace via existing
project.set; tool roots remain bound to the originating session project - Context management: pi-native checkpoint summaries in Codex's shape — inline compaction at the deterministic pre-request hard guard, the summary plus recent user messages carried forward, durable host checkpoints, and one overflow retry. The model can request a new window through
new_context; every compaction adds a transcript row and one warning. No user-facing settings - Plan tools and policy: Read / Glob / Grep / BrowserPreview / Bash plus
EnterPlanModeandSubmitPlan; Write/Edit/plugin and unknown tools are denied. Bash followsask,accept-edits, orauto, so Plan is planning intent, not a strict read-only security profile. - Plan checkpoint:
SubmitPlan(title, markdown, question)causes host-core to preserve the exact Markdown bytes in a new unique<workspaceRoot>/.pi/plan/*.mdartifact, while title/question remain structured fields in the existingplan_approvalsrow. The row records the artifact path/hash/size and execution fields. Approve/reject are the only actions; approval explicitly selectsask,accept-edits, orautowith Ask as the UI default, opens the artifact for review, and expires after 30 absolute minutes withPLAN_APPROVAL_TIMEOUT. - Plan recovery and shells: a startup transaction marks prior pending, queued, and running Plan work interrupted before serving RPC, with no replay; an already-approved interrupted execution leaves the session Agent. Configuration is idle-only and each session has one running turn. The renderer may stage one latest next-turn configuration while a turn is running, but it submits that choice only after the host reports idle.
defaultCommandShellselects the platform catalog entry; unavailable persisted choices fall back to the first available platform shell, each turn pins effective ID/dialect, and host rejects stale identity before streaming output under the 60-second default timeout.
Source of Truth
- Spec index:
docs/spec/README.md - Navigation:
docs/spec/NAV.md - Decisions log:
docs/spec/08-meta/decisions-log.md - ADRs:
docs/adr/ - Example plugin:
examples/plugins/hello
Delivery Status
M6 — Plan was implemented and accepted on 2026-08-05 against these frozen details:
- shared Plan/session/shell contracts and protocol v9
- schema v10 migration, immutable plan artifacts, and the
plan_approvalsexecution fields/startup fence - Rust-authoritative Plan policy, shell identity, and process cancellation
- one-Agent SubmitPlan/approval/execution state transitions
- renderer artifact approval, shell selection, and EN/zh-CN UX
- focused migration, policy, streaming, timeout, recovery, and rendered EN/zh-CN verification
The frozen protocol remains v9 and storage schema remains v10. Future changes must preserve the automated M6 scenarios E2E-104 through E2E-117 or update the relevant decision record before changing the contract.