Skip to content

pi_agent_rust 0.9.0

Latest

Choose a tag to compare

@Dicklesworthstone Dicklesworthstone released this 21 Nov 18:00
· 254 commits to main since this release

Install or upgrade:

curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/pi_agent_rust/main/install.sh | bash
pi self-update            # from an existing install (on v0.8.0 Apple Silicon / Linux arm64; use install.sh once on Linux x86_64, macOS Intel, and Windows to pick up the raised 256 MiB updater ceiling)

Every asset has a .sha256 sidecar and a prehashed Minisign signature (.minisig); SHA256SUMS covers all 10 payloads and is signed too. The public key is minisign.pub in the repository (key ID 1BBD79B28BF718D0). Linux binaries are built against glibc 2.28 or newer. All published binaries are built with --profile dist (opt-level = 3, fat LTO, single codegen unit, panic = "abort", stripped) for speed.

This release is built from tag v0.9.0 (1a7d2d2bdbb0e080e9bee0dd89e4f3a5c535b0b5).

The macOS binaries are not notarized (Apple Silicon: the linker's ad-hoc signature; Intel: unsigned), as in earlier releases. Installed by the script or by pi self-update they run as they are; a copy downloaded with a browser needs its quarantine flag removed first.

How this release was checked.

  • Quality gates on the tag commit (1a7d2d2bd): cargo fmt --all -- --check, cargo clippy --locked --all-targets --keep-going -- -D warnings, cargo clippy --locked --lib --bins --test extension_lockfile_provenance --features wasm-host --keep-going -- -D warnings, Linux-hosted x86_64-pc-windows-gnu cross-check, shellcheck, tests/installer_regression.sh (77/77 pass), scripts/skill-smoke.sh, scripts/check_module_reachability.py, scripts/check_fixture_read_patience.py, scripts/check_readme_evidence_freshness.py (12/12 pass), scripts/check_dsr_contract_sync.py (0 drift), and cargo audit (0 vulnerabilities on both Cargo.lock and fuzz/Cargo.lock).
  • Test suites on the tag commit: wasm_host (20/20), extension_lockfile_provenance (151/151), readme_tool_inventory (7/7), release_evidence_gate (95/95), lib unit suite (15,749/15,749), e2e_cli (223/223), e2e_provider_streaming (120/120), e2e_rpc (174/174), e2e_tui_features (121/121), provider_streaming (191/191), sdk_multimodal (27/27), tools_conformance (289/289), and cargo publish --dry-run --locked (799 files, 8.3 MiB compressed).
  • Every platform archive and raw binary was verified for target architecture, glibc <= 2.28 floor (Linux x86_64/arm64), macOS deployment target (darwin arm64/amd64), PE32+ format (Windows x86_64), embedded pi --version git SHA provenance, and cryptographic signatures (SHA256SUMS + .sha256 + prehashed -H .minisig with authenticated DSR trusted comments).

A major feature and hardening wave on top of v0.8.0 (~887 commits). Adds native /goal workflows across both terminal stacks and RPC/SDK, the pi web browser companion (--terminal mirror + TLS 1.3 + scannable QR), project memory learning (/memory sync), --wait-async background print loops, shared session-tree cost caps (--warn-cost/--max-cost), ACP session forks/live steering/editor-buffered file tools/native audio-video prompts, native MCP OAuth/SSE/form & URL elicitation, live model discovery v2 (models.fetched.json, /fast ultrafast), live /rules stream rules, grep exclusions and URL search, SnapCompact, real better-sqlite3/axios/zod/node:readline extension shims, wasmtime 48.0.10 (0 RUSTSEC advisories), Minisign signature verification in install.sh/pi self-update, and fixes the live openai-codex default model (gpt-5.6-sol) and VERGEN_GIT_SHA provenance.

Requires a minor SemVer bump (0.9.0) because four pi::sdk types marked Stable in docs/sdk.md added public struct fields or adjusted signatures (see Changed).

Added

  • Native /goal mode across FrankenTUI, classic TUI, SDK, and RPC.
    Run budgeted multi-turn autonomous objectives with continuation, budget revisions, interrupted-run reconciliation without replay or budget resets, and RPC/SDK lifecycle hooks (RpcGoalOp, RpcGoal, RpcGoalModeState, RpcGoalResult).
  • Mobile Web Remote (pi web / pi --web) with --terminal mirror, TLS 1.3, fail-closed LAN bind gate, and scannable terminal QR.
    Serves the browser companion and live terminal mirror (pi web --terminal), supports --web-tls-cert and --web-tls-key over asupersync TLS 1.3 (rustls), fails closed on non-loopback --web-bind unless paired with TLS or --web-allow-insecure-lan, and renders an ISO/IEC 18004 QR Model 2 matrix using Unicode half-blocks (▀/▄/█).
  • Project memory learning and consolidation (/memory sync).
    Extracts and consolidates durable project facts from completed sessions (autoExtract, extractEveryTurns, branch-aware checkpoints) and exposes AgentSessionHandle::sync_memory.
  • Background print-mode follow-ups (--wait-async / async.printWake).
    pi -p --wait-async waits for owned background subagent/job completions and executes follow-up turns within --max-time bounds instead of exiting while background tasks are still running.
  • Shared session-tree model spend limits (--warn-cost, --max-cost).
    Enforces per-session and shared session-tree budgets via CLI flags or session.warnCost/session.maxCost with durable .pi-cost-*.json billing journals that persist late model charges to their source sessions and reject stale lock identities.
  • ACP session forks, live steering, editor-buffered file tools, editor terminals, and native media.
    Added session/fork, _session/steering live steering, fs/read_text_file & fs/write_text_file routing through editor buffers, foreground bash in negotiated editor terminals, native audio/video editor prompts, configOptions model selectors, persistent project session directories by default unless --no-session is passed, trust-gated extension loading (ExtensionPolicy::evaluate_startup_trust), and mcp_servers updates during session/load with deterministic -32602 invalid-transport errors.
  • MCP OAuth, legacy HTTP SSE transport, interactive form/URL elicitation, and project discovery controls.
    Added native HTTP OAuth with durable credential lifecycle and cancellable auth in both TUI stacks, legacy HTTP SSE transport, user-approved form and URL elicitation (--mcp-config, /mcp reauth stale header repair, /mcp unauth), task-augmented tools, and mcp.enableProjectConfig project discovery settings.
  • Live model discovery v2 (models.fetched.json) and /fast ultrafast service tiers.
    Discovers and persists supported_reasoning_levels, reasoning aliases, and service_tiers (--fetch-models, --refresh-models, --persist-models), enabling /fast ultrafast selection and /effort & /models command spellings across both terminal stacks.
  • Live /rules stream rules and in-place /handoff.
    Enforces user-configured stream rules and corrections during live model generation (/rules) and runs native in-place context handoff in both terminal UIs and SDK/RPC.
  • Ordered SnapCompact and configurable automatic compaction policies.
    Added budgeted SnapCompact with native archive preservation across saves plus configurable compaction.thresholdPercent and compaction.methodOrder.
  • grep path exclusions (!glob), internal document URLs, and HTTP(S) search; archive/video read support.
    grep prunes scoped !glob exclusions consistently across native and external backends and searches internal document and HTTP(S) resources; read navigates bounded TAR/gzip/PAX/GNU source archives and local video metadata/frame previews; /review supports hosted GitHub pull requests and GitLab merge requests.
  • Persistent optional-tool settings and progressive xdev tool discovery bijection.
    Added tools.enableEval, tools.enableGithub, tools.enableSecurityScan, tools.enableSubagent, and tools.loadMode.<name> settings; aligned TOOL_TIERS in exact 1:1 bijection across all 36 built-in tools (BUILTIN_TOOL_NAMES + subagent), surfaced discoverable_index() in system prompts, synced activated tools into Agent::extend_tools mid-session, and added debug.extraAdapters / debug.allowCustomAdapters with DAP_ADAPTER_BLOCKED diagnostics.
  • Real extension runtime shims (better-sqlite3, axios, node:readline, imported native tool factories) and prebaked QuickJS bytecode.
    Backed better-sqlite3 with native SQLite, replaced the axios stub with a real HTTP adapter, added node:readline subprocess protocol streams, wired createReadTool..createLsTool factories to native host tools, precompiled the pi bridge and static virtual modules once per process via rquickjs::Module::write + Bundle, and gated unreached research controllers behind the opt-in experimental-controllers Cargo feature.
  • eval workpool pipelines, structured extraction, and persistent CommonJS realms.
    Added streaming JavaScript and Python workpool map/reduce pipelines with bounded retries, recoverable acknowledgments, schema-validated extraction, and workspace CommonJS module loading in retained JS realms.
  • Provider capability introspection and agentic tool-use parity across GitLab Duo, Cursor, Copilot, and Codex OAuth.
    Added ProviderCapabilities (pi::sdk::ProviderCapabilities), wired multi-turn history and <pi_tool_call> tool execution (StopReason::ToolUse) for GitLabProvider and streaming CursorProvider, forwarded model reasoning/vision/cost metadata plus live AuthStorage reload on Copilot's Chat Completions route, added DeepSeek text-encoded tool-call recovery, and implemented openai-codex OAuth refresh.
  • FrankenTUI extension dataDir, terminal inline image sizing, and complete KeyAction wiring.
    Exposed per-extension persistent ctx.dataDir / pi.dataDir, wired print-mode TTY render_inline to honor terminal.show_images and live terminal column width (while interactive TUI/FrankenTUI renders cell-safe attachment badges), surfaced startup session-recovery diagnostics, and connected all 15 previously inert AppAction keybindings.
  • Segmented SessionStoreV2 live synchronization.
    Opt-in sessionStore: "v2" (PI_SESSION_STORE=v2) atomically maintains .v2 segments, sidecar offset indexes, manifests, and clean source-state.json lineage markers alongside canonical JSONL saves and appends without startup full-replay stalls.

Changed

  • Breaking (pi::sdk SemVer surface).
    • pi::sdk::SessionOptions added public fields prewalk, out_enabled, out_default_enabled, workspace_trust_guard, warn_cost, max_cost, cost_budget, mutation_recorder, and startup_bootstrap (callers constructing SessionOptions must include ..SessionOptions::default()).
    • pi::sdk::RpcSessionStats added context_tokens and context_window; pi::sdk::RpcBashResult added capture.
    • AgentSessionHandle::set_max_tokens changed from pub const fn to pub fn.
    • Crate-root internal modules in src/lib.rs are now marked #[doc(hidden)], sealing the documented SemVer surface to pi::Error, pi::PiResult, and pi::sdk, and gating ExtensionDispatcher and hostcall_io_uring_lane behind experimental-controllers.
    • Additive pi::sdk exports: AgentCx, ApprovalMode, ApprovalState, AutoCompactionMethod, CompactionReader, PlanChange, PlanMode, PlanPersistence, SessionPlanReview, SdkStartupBootstrap, ToolFactoryContext, ExplicitBuiltinTools, RpcGoalOp, RpcGoal, RpcGoalModeState, RpcGoalResult, ProviderCapabilities.
  • Live default model priority (PROVIDER_DEFAULT_MODELS).
    Prioritized live-supported openai-codex/gpt-5.6-sol (gpt-5.6-terra, gpt-5.6-luna), openai/gpt-5.6, and anthropic/claude-sonnet-4-6 ahead of retired ChatGPT Codex IDs.
  • Distinct cost-cap exit code (EXIT_CODE_COST_CAP = 5).
    Print/JSON runs halted by Error::CostCap now exit with status 5, preserving status 3 exclusively for non-interactive approval unavailability, and explicit --skill / --prompt-template / --theme-path load failures exit with status 4.
  • 64 MiB default audio/video attachment cap (media.maxBytes) and sidecar/Gemini Files staging.
    DEFAULT_MEDIA_MAX_BYTES defaults to 64 MiB (67_108_864 bytes) across CLI @file, read_media, RPC, SDK, and interactive frontends (#225).
  • Explicit --tools initial-schema promotion and pi --list-providers / pi doctor capability reporting.
    Tools explicitly selected via --tools are promoted to LoadMode::Essential in the initial schema without requiring an xdev hop, and pi --list-providers plus pi doctor now report per-provider ProviderCapabilities.
  • Type-erased extension futures (WasmExtensionHandle + JsExtensionRuntimeHandle).
    Downstream SDK/test crates compile cleanly under --features wasm-host at rustc's default recursion_limit = 128.
  • Honest Node/npm compatibility shims and real npm:zod validation.
    Replaced silent fake-success stubs with fail-closed ERR_PI_SHIM_UNSUPPORTED_OPERATION errors and replaced the permissive npm:zod stub with recursive runtime validation.

Fixed

  • Shipped pi --version printing (unknown ...) on detached/gitless build hosts.
    build.rs now resolves canonical 40-hex commit SHAs from PI_BUILD_GIT_SHA, VERGEN_GIT_SHA, or git rev-parse HEAD and fails closed when PI_REQUIRE_GIT_SHA=1 while keeping crates.io source tarballs building cleanly.
  • Plain-host pi doctor failures (#267) and read-only SQLite session loading (#250).
    Made development swarm diagnostics strictly opt-in (pi doctor --only swarm), hardened settings validation, and enabled loading read-only SQLite session archives without requiring writable WAL sidecars.
  • Quiet --help/--version broken-pipe exit (#264), deterministic LSP test stdin under dash (#262), Windows \\?\ session lock path handling (#271), and extension persistence/startup fixes (#279, #282).
  • Clap-derived CLI flag pre-parser (--wait-async), lock-free OCC for RPC rewind, live /login//logout credential refresh, WASM extension slash-command dispatch, and agent_hub steering lock cleanup.
  • Installer and self-updater reliability (#263, #265, #266).
    Raised pi self-update binary download ceiling to 256 MiB, removed the hard xz binary requirement on macOS, and fixed mawk regex compatibility on Ubuntu/Debian.

Security

  • Startup Merkle package-lock.json verification and streaming digest hardening.
    Verifies installed package trees at startup against package-lock.json using 64 KiB streaming CRLF-normalized SHA-256 digests and rejects escaping symlinks fail-closed.
  • Zero RUSTSEC advisories across workspace and fuzz lockfiles (wasmtime 48.0.10).
    Upgraded optional wasmtime to 48.0.10 (remediating RUSTSEC-2026-0422..0424 and RUSTSEC-2026-0566..0573), refreshed semver-compatible direct and transitive dependencies, and synchronized fuzz/Cargo.lock (0 vulnerabilities in cargo audit).