Skip to content
CAI
Software that uses CAICheck a score

earendil-works/pi

48.0

Weak · 28 September 2026

196.3k

lines of production code

TypeScript

primary language

3

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a modular, durable coding agent platform that manages AI-driven software development tasks through a robust, event-sourced runtime. It provides a comprehensive execution environment with built-in tools for file manipulation and shell commands, supporting complex session management features like branching, forking, and context compaction. The architecture is built on a composable framework that enables extensibility via plugins, custom providers, and remote service communication, while ensuring reliability through transactional state persistence and crash recovery.

How it got here

2025 — modular architecture and agent hardening

38 changes.

The project underwent a major structural overhaul, decomposing monolithic packages into modular, reusable components for the AI integration, agent core, and TUI. This period focused on hardening the coding agent with durable session management, robust tool execution, and comprehensive test coverage, while simultaneously removing legacy pod management and renderer implementations.

2026 — Durable runtime and Chord architecture

79 changes.

This period focused on replacing the legacy agent harness with a durable, state-driven execution engine backed by the new Chord application-composition runtime. The work introduced transactional session management, JSONL and SQLite storage backends, and a unified extension system to support complex multi-process and plugin-based agent architectures.

Features

Add GitLab Duo provider extension example

A new example extension for the coding agent has been added at \packages/coding-agent/examples/extensions/custom-provider-gitlab-duo\. This extension enables users to access GitLab Duo AI models (including Claude Opus/Sonnet/Haiku and GPT-5 variants) through GitLab's AI Gateway. It implements OAuth authentication using a bundled client ID and supports both direct access token caching and streaming responses. The package includes a test script (\test.ts\) to verify connectivity and model functionality.

packages/coding-agent/examples/extensions/custom-provider-gitlab-duo · high confidence

Add Unix domain socket transport for server communication

The server now supports communication via Unix domain sockets, introduced through new files in the \packages/server/src/transports/unix\ directory. This includes a \getUnixSocketPath\ utility that derives socket paths from server IDs, a robust \UnixListener\ implementation handling socket lifecycle, permissions, and stale socket cleanup, and a \createUnixServer\ factory to compose the server with this transport. Users can now configure the server to listen on Unix sockets with customizable permissions and timeouts.

packages/server/src/transports · high confidence

Add dynamic-resources extension example demonstrating resources\_discover hook

The dynamic-resources extension example now demonstrates the \resources\_discover\ hook, allowing the coding agent to dynamically load skills, prompt templates, and themes at runtime. The extension registers paths for \SKILL.md\, \dynamic.md\, and \dynamic.json\ (a theme definition with specific color variables and export settings), enabling users to see how external resources can be discovered and integrated into the agent's context.

packages/coding-agent/examples/extensions/dynamic-resources · high confidence

Add example extension demonstrating local npm dependency resolution

The with-deps example extension now includes a new tool, parse\_duration, which utilizes the external 'ms' library to convert human-readable duration strings into milliseconds. This addition serves to verify that the jiti module resolver correctly locates and loads modules from the extension's own node\_modules directory, ensuring that extensions can safely depend on their own local npm packages.

packages/coding-agent/examples/extensions/with-deps · high confidence

Add llama.cpp extension for local model management

Introduces a new built-in extension for the coding agent that integrates with the llama.cpp router, allowing users to discover, download, load, and unload local models via a TUI interface. The extension includes a Hugging Face client for searching GGUF models, a provider implementation that exposes local models to the agent with support for streaming and reasoning templates, and UI components for managing model states and download progress.

packages/coding-agent/src/extensions · high confidence

Add pi-example-plugin demonstrating session and TUI facets

The \@earendil-works/pi-example-plugin\ package is introduced as an example implementation of Chord facets, providing a session worker and a TUI interface. The session facet exposes a greeting service that tracks worker activations using replicated state, while the TUI facet registers a \/hello\ slash command that invokes this service and displays the result. This example illustrates how plugins can be loaded via the \-e\ flag, how facets are discovered and built into the server cache, and how the plugin lifecycle handles reloading and state persistence across client connections.

packages/coding-agent/examples/plugins/pi-example-plugin · high confidence

Add strict CBOR encoder and decoder with cycle detection

The protocol package now includes a new CBOR serialization layer (encoder and decoder) that enforces strict RFC 8949 compliance. This implementation rejects cyclic object references to prevent infinite loops, limits nesting depth and container sizes to protect against resource exhaustion, and disallows unsupported features like indefinite-length items and CBOR tags. Users can now safely encode and decode protocol payloads with built-in protection against malformed or malicious inputs.

packages/protocol/src/cbor · high confidence

Add subagent example extension with isolated context and workflow presets

The subagent example extension now provides a tool for delegating tasks to specialized subagents (scout, planner, reviewer, worker) that run in isolated \pi\ subprocesses. It supports single, parallel, and chained execution modes, with output streaming and usage tracking. The extension includes sample agent definitions and workflow presets (implement, scout-and-plan, implement-and-review) to demonstrate common multi-agent patterns.

packages/coding-agent/examples/extensions/subagent · high confidence

Added DOOM build script and WebAssembly module for the Doom Overlay extension

The Doom Overlay extension now includes a build script (\build.sh\) that compiles the DOOM game engine into a WebAssembly module using Emscripten. This script handles dependency checks for Emscripten, clones the \doomgeneric\ repository, and generates \doom.js\ and \doom.wasm\ files. The generated JavaScript module initializes the DOOM runtime in a Node.js environment, providing the core functionality for the overlay.

packages/coding-agent/examples/extensions/doom-overlay/doom · high confidence

Automated telemetry documentation generation

A new script has been added to automatically generate and validate the telemetry schema documentation. This tool reads the defined AI and Harness telemetry schemas and produces a structured Markdown file, ensuring that the public documentation remains synchronized with the underlying code definitions.

packages/agent/scripts · high confidence

HTML export now supports ANSI terminal colors and custom tool rendering

The HTML export feature now preserves terminal styling by converting ANSI escape codes (including 256-color and true-color palettes) into inline HTML styles, ensuring code blocks and tool outputs retain their original colors. Additionally, custom tool outputs are now rendered using the same TUI renderers as the main interface, converting their ANSI output to HTML for consistent display in the exported session.

packages/coding-agent/src/core/export-html · high confidence

Interactive mode restructured into modular components with new bug reporting and session sharing capabilities

The interactive coding agent mode has been reorganized into a modular architecture, splitting the previous monolithic implementation into distinct files for the main mode logic, TUI rendering, chat viewport layout, external editor handling, and model catalog management. This refactor introduces a new /bug command that allows users to generate and send diagnostic reports (including session transcripts or model-generated summaries) to developers, with options to upload directly or export as a local zip file. Additionally, session sharing has been enhanced to support uploading session artifacts to Radius for collaborative viewing, with a fallback to creating private GitHub gists if Radius is unavailable.

packages/coding-agent/src/modes/interactive · high confidence

Introduce 'mini', an experimental three-process coding agent

Adds a new experimental coding agent named 'mini' located in \packages/coding-agent/src/experimental/mini\. This agent runs across three distinct processes—a presentation host (TUI), a session server, and a session worker—that communicate via JSON over a Unix socket and child process pipes. It leverages the durable \AgentHarness\ to provide a minimal, RPC-shaped interface for coding tasks, featuring state replication where the worker holds live objects and presentations maintain a replicated snapshot of the lane. The implementation includes a custom RPC layer for routing and liveness, a transport abstraction for newline-delimited JSON, and specific services for lane management and model authentication.

packages/coding-agent/src/experimental/mini · high confidence

Introduce Agent Harness execution tools (bash, edit, read, write)

The agent harness now includes a suite of built-in execution tools for interacting with the environment. The \bash\ tool allows executing shell commands with configurable timeouts, output truncation (to 100 lines or 100KB), and checkpointed streaming updates. The \edit\ tool enables precise file modifications using exact text replacement with fuzzy matching support and preserves original line endings. The \read\ tool handles both text files (with offset/limit pagination and truncation) and images (supporting JPEG, PNG, GIF, WebP, and BMP via base64 encoding or a pluggable image processor). The \write\ tool creates or overwrites files, automatically creating parent directories. All file operations are serialized via a mutation queue to prevent race conditions on the same path.

packages/agent/src/harness/tools · high confidence

Introduce AgentHarness v2 runtime with durable session management and extensible tool execution

The agent harness has been replaced with a new runtime architecture that introduces durable session lanes, atomic JSONL session writes, and a structured hook system for intercepting runs and tool calls. Users benefit from improved reliability through bounded shell execution output, configurable retry policies, and explicit shutdown lifecycle management. The harness now supports loading skills and prompt templates from directories with diagnostic reporting, and provides a typed event bus for observing session state changes. This change also adds comprehensive telemetry schemas for AI provider requests and harness operations, enabling better observability of agent behavior.

packages/agent/src/harness · high confidence

Introduce Chord Delta for immutable JSON revision tracking and replication

The \packages/chord/src/delta\ module now provides a complete system for tracking changes to plain JSON structures as immutable revisions. It introduces a \Tracker\ API that manages a mutable draft overlay for safe, transactional edits, which are then materialized into exact operation batches (\Op\) via \prepare()\. These batches support efficient, immutable replay to replicas using \applyImmutable\ and \applyImmutableBatches\, ensuring structural sharing and preventing side effects. The module includes a robust diffing engine (\diff.ts\) that generates compact operations (such as string appends/truncates and array permutations) and a wire-format encoder/decoder (\WireOp\) for optimized network transmission. It also enforces strict JSON validity through \JsonRevisionValidator\ and protects against prototype pollution by rejecting unsafe path segments like \\_\proto\\_\.

packages/chord/src/delta · high confidence

Introduce Chord application-composition runtime

This change introduces the Chord runtime, a new standalone framework for building agentic applications. It provides a facet-based composition model where developers define modular units (facets) and host them via a lifecycle-aware host that supports hot-reloading and disposal. The runtime includes a service layer with support for both local and remote service bindings, allowing services to be shared across process boundaries. It also features a replicated state system that maintains consistent, immutable state across distributed nodes, with support for both mutable local changes and attached immutable sources. Additionally, the runtime provides a context system for managing invocation-scoped values and cancellation signals, and includes utilities for strict JSON handling and facet bundling for deployment.

packages/chord/src · high confidence

Introduce Chord's remote service architecture with replicated state and lifecycle management

This change implements the core Chord service infrastructure, introducing a new remote service model that supports both singleton and keyed service instances. It adds a replicated state system allowing service members to maintain synchronized, observable state across boundaries, complete with delta-backed encoding/decoding for wire transmission. The update also defines a strict facet lifecycle (setup, active, disposing) and service instance directory to manage keyed service registration, observation, and disposal, ensuring services remain available during reloads and handling post-cutover failures terminally.

packages/chord/src/services · high confidence

Introduce Node.js SQLite session backend

A new session storage backend for Node.js environments is added under \packages/session-backends/sqlite-node\. It wraps the native \node:sqlite\ module to provide a \SqliteDatabase\ abstraction and implements the full session repository, including schema initialization via \001\_initial.sql\, entry and value persistence, branch indexing, usage tracking, and session lifecycle management. This enables agent sessions to be stored in local SQLite files on Node.js runtimes.

packages/session-backends/sqlite-node/src · high confidence

Introduce adaptive shell output capture and usage tracking utilities

Added new utility modules in the agent harness to manage shell execution output and usage metrics. The \adaptive-publisher\ and \output-capture\ classes implement rate-limited, bounded output streaming that automatically throttles updates based on byte size and time intervals, while truncating content to configurable line and byte limits (default 2000 lines, 50KB) to prevent memory bloat. The \shell-output\ module provides a compatibility layer for executing shell commands with this capture logic, handling partial lines and spill paths. Additionally, \usage.ts\ introduces functions to initialize and aggregate AI token usage and cost data, supporting legacy v3 session reporting.

packages/agent/src/harness/utils · high confidence

Introduce behavioral eval harness for Pi's coding agent

This change adds a new \packages/evals\ package that provides a structured framework for running behavioral evaluations on the Pi coding agent. It introduces a \vitest-evals\-based harness that supports both host-side smoke tests and isolated, Docker-based documentation-lift comparisons (running \with\_docs\ vs \without\_docs\ variants to measure the impact of documentation on agent behavior). The package includes specific eval suites for auditing documentation accuracy, testing custom provider configuration (including OpenAI-compatible and streaming APIs), verifying extension tool creation, and validating TUI context footer rendering, all orchestrated via a CLI that manages Docker image builds, task planning, and comparative reporting.

packages/evals · high confidence

Introduce experimental 'micro' terminal coding agent

Adds a new, lightweight local coding agent under \packages/coding-agent/src/experimental/micro\ that runs as a single process with no server, worker, or RPC split. It provides a terminal user interface (TUI) for interacting with AI models, supporting features like session persistence (with \--continue\ to resume), model selection, thinking level cycling, and tool usage (read, bash, edit, write). The agent uses Pico3 for the harness and JSONL storage, and defaults to \openai-codex/gpt-5.6-sol\. It is designed to be simpler than the existing \mini\ agent, with a narrower API surface for the TUI and no compatibility fixes for tool arguments that fail Pico's schema validation.

packages/coding-agent/src/experimental/micro · high confidence

Introduce experimental CLI commands for client and server interactions

The experimental CLI now exposes dedicated \client\ and \server\ commands, allowing users to initiate direct chat sessions or configure server instances via the command line. The \client\ command supports options to connect to a specific address, resume or continue existing sessions, select a provider and model, load external plugin packages, and pass a one-shot prompt. The \server\ command allows configuration of the server ID, session directory, provider, model, and plugin packages, with validation ensuring the server ID is a valid lowercase UUIDv4. These commands provide the interface layer for the underlying experimental coding agent capabilities.

packages/coding-agent/src/cli/experimental/commands · high confidence

Introduce model data validation and generation scripts

The \packages/ai/scripts\ directory now includes a suite of TypeScript scripts to manage and validate AI model metadata. \generate-models.ts\ fetches model catalogs from sources like models.dev and OpenRouter, handling provider-specific configurations (e.g., Cloudflare, Together AI) and generating structured model data. \model-data.ts\ provides the validation logic to ensure generated data integrity, including schema versioning and file hashing. Supporting scripts include \check-model-data.ts\ for CI/validation, \models-dev-reasoning-options.ts\ and \openrouter-reasoning-options.ts\ for mapping reasoning effort levels, and \generate-test-image.ts\ for creating test assets.

packages/ai/scripts · high confidence

Introduce pluggable, streaming core tools with robust platform handling

The coding agent now uses a new set of core tools (bash, edit, find, grep, ls, read, write, and PowerShell) that support pluggable operations for remote execution, streaming output with bounded memory, and improved platform compatibility. Bash and PowerShell commands stream output incrementally, handle timeouts, and manage detached process trees to prevent hangs. The edit tool supports multi-edit operations, fuzzy matching for whitespace and Unicode normalization, and preserves unchanged lines to avoid duplicate output. File operations are serialized via a mutation queue to prevent race conditions. Path resolution handles macOS-specific quirks like NFD filenames, curly quotes, and AM/PM spacing in screenshot names. Output is truncated and persisted to temp files when limits are exceeded, with clear notices to the user.

packages/coding-agent/src/core/tools · high confidence

Introduce typed document definitions and versioned storage contracts

The durable package now exposes \defineDoc\ and \defineDocFamily\ APIs that allow users to define documents with explicit scopes (session, task, or conversation) and versioned schemas. This change introduces strict type safety for document access, enforcing scope and history semantics (latest-only vs. rewindable) at runtime, and supports document migrations via a \migrate\ hook when version numbers change. It also establishes the foundational type contracts for versioned document storage, including \DocumentSemantics\, \DocToken\, and \StoredDocument\, which underpin the new transactional session and document features.

packages/durable/src · high confidence

Introduce unified built-in provider registry and typed model accessors

The \packages/ai/src/providers\ area now exposes a centralized registry for all built-in AI providers. A new \all.ts\ entrypoint aggregates every provider (including Amazon Bedrock, Anthropic, Azure OpenAI Responses, Cloudflare AI Gateway, Google Vertex, and many others) and provides typed helper functions—such as \getBuiltinModel\, \getBuiltinImageModel\, and \getBuiltinClassifierModel\—to safely retrieve chat, image, and classifier models from the generated catalog. Each provider is now paired with an auto-generated \.models.ts\ file that flattens its specific model data (chat, image, classifier) from local JSON manifests, and the \builtinProviders()\ and \builtinModels()\ utilities allow consumers to instantiate or register all providers in a single call.

packages/ai/src/providers · high confidence

Introduce vendor-neutral telemetry contracts and typed schema utilities

The new \@earendil-works/pi-telemetry\ package provides a backend-agnostic telemetry system for the platform. It introduces a callback-based \TelemetryContext\ and \TelemetrySpan\ contract that allows applications to explicitly propagate parent-child span relationships without relying on global state or specific backends. The package includes a shared \NOOP\_TELEMETRY\_CONTEXT\ for optional telemetry, a deterministic \InMemoryTelemetryContext\ for local diagnostics and testing, and a runner-independent adapter conformance suite to validate custom backend integrations. Additionally, it offers typed, serializable schema definitions with TypeScript inference to enforce strict attribute types and required fields for spans and events.

packages/telemetry · high confidence

Introduces durable session storage and forking capabilities

The agent harness now supports durable session state with atomic commit validation, in-memory and JSONL storage backends, and explicit session forking. Users can now fork sessions into new branches or trees, with the system handling branch tips, lane configurations, and entry lineage automatically. Session mutations are serialized through a mutation line to prevent concurrent writes, and context building respects compaction and branch summaries. This enables reliable session persistence, recovery, and branching without data loss or corruption.

packages/agent/src/harness/session · high confidence

Introduces structured branch summarization with file-operation tracking

The agent harness now generates detailed summaries for conversation branches, capturing not only the textual summary but also the specific files read and modified during the branch's exploration. This change adds new \branch-summarization.ts\ and \compaction.ts\ modules that handle entry collection, token-budget-aware message preparation, and LLM-based summarization with retry policies. The system extracts file operations from tool calls (read, write, edit) and attaches this metadata to branch summary entries, enabling better context preservation and reuse when navigating between conversation branches.

packages/agent/src/harness/compaction · high confidence

Introduces the Pico3 agent kernel with transactional state and bounded output handling

This change adds the Pico3 kernel implementation to the agent harness, introducing a new execution model with transactional replicated state and immutable delta tracking. It provides a hardened session architecture that manages conversation history, tool execution (including a new \bash\ tool), and background jobs, while integrating with the Chord library for state synchronization. The update also includes a \Bounded\ byte collector to enforce strict memory limits on output streams and a \JsonlStorage\ backend for durable, append-only persistence with crash-recovery capabilities.

packages/agent/src/harness/pico3 · high confidence

Introduction of experimental CLI command framework

The coding agent now includes a new experimental CLI structure under \packages/coding-agent/src/cli/experimental\. This introduces a custom command parsing and execution framework (\command.ts\) that supports subcommands, specifically \server\ and \client\ modes. It adds new command-line options for authentication (\--auth-token\, \--auth-token-file\) and connection addressing (\--connect\), which now supports both Unix socket paths and Radius transport addresses using UUIDv4 server IDs. The implementation enforces mutual exclusivity for auth methods and validates transport protocols strictly.

packages/coding-agent/src/cli/experimental · high confidence

Native clipboard and modifier-key support for Windows, macOS, and Linux

The TUI now includes native platform helpers for Windows, macOS (Darwin), and Linux that provide asynchronous text and image clipboard access and modifier-key state detection. This change introduces a shared C clipboard abstraction and platform-specific implementations (using AppKit on macOS, X11/libxcb on Linux, and Win32 APIs on Windows) along with build scripts and prebuild targets for each OS, replacing or supplementing previous command-line or terminal-based clipboard paths with direct native integration.

packages/tui/native · high confidence

New AI utility library for streaming, error handling, and retry logic

The \packages/ai/src/utils\ directory now contains a comprehensive set of utility modules to support the AI provider infrastructure. This includes \abort-signals.ts\ and \abort.ts\ for managing operation lifecycles and race conditions, \assistant-message-frame.ts\ for encoding and decoding streaming assistant message events, and \overflow.ts\ for detecting context window limits across various providers. Error handling is standardized via \error-body.ts\ and \diagnostics.ts\, while \provider-retry.ts\ and \retry.ts\ implement robust, abortable retry policies for transient network and provider errors. Additional utilities cover JSON parsing with repair (\json-parse.ts\), context token estimation (\estimate.ts\), HTTP proxy resolution (\node-http-proxy.ts\), and provider environment variable handling (\provider-env.ts\).

packages/ai/src/utils · high confidence

New DOOM overlay demo extension

Added a new example extension that runs the DOOM shareware game as a terminal overlay, demonstrating real-time rendering at 35 FPS using half-block characters and 24-bit color. The extension includes a WebAssembly wrapper for the doomgeneric engine, a component for rendering frames and handling input (WASD, arrows, fire, etc.), and logic to automatically download the shareware WAD file on first run if not found locally. Users can launch the demo via the \/doom-overlay\ command in TUI mode.

packages/coding-agent/examples/extensions/doom-overlay · high confidence

New Node.js-based execution environment for the agent harness

A new Node.js implementation of the execution environment has been added to the agent harness, providing the underlying runtime for shell command execution and file system operations. This file introduces robust timeout handling with validation for positive, finite values, cross-platform path resolution (including Windows home directory and file:// URL support), and safe process spawning with hidden console windows on Windows. It also establishes the foundation for atomic file writes and structured error mapping for file operations, serving as the concrete Node.js backend for the harness's execution capabilities.

packages/agent/src/harness/env · high confidence

New OAuth authentication flows for Anthropic, GitHub Copilot, Kimi, Meta, OpenRouter, and xAI

The \packages/ai/src/auth/oauth\ directory now includes dedicated OAuth modules for Anthropic, GitHub Copilot, Kimi Code, Meta (Muse), OpenRouter, and xAI, alongside shared infrastructure for PKCE, device-code polling, and callback UI pages. Users can now authenticate with these providers directly through the CLI, with flows supporting both browser-based callbacks and device-code authorization for headless environments.

packages/ai/src/auth/oauth · high confidence

New Plan Mode extension for read-only code analysis

A new Plan Mode extension is available in the coding-agent examples, providing a read-only exploration mode for safe code analysis. When enabled via the \/plan\ command or the \Ctrl+Alt+P\ shortcut, it disables built-in write tools (edit, write) and restricts bash commands to a strict allowlist of read-only operations (e.g., cat, grep, git status), blocking destructive actions like rm or npm install. The extension also introduces explicit step tracking: it extracts numbered steps from 'Plan:' sections in agent responses, displays a progress widget during execution, and recognizes \\[DONE:n\]\ markers to update completion status, with state persistence across session resumes.

packages/coding-agent/examples/extensions/plan-mode · high confidence

New SDK and extension examples for the coding agent

Added example code demonstrating programmatic SDK usage via \createAgentSession()\, CLI integration through an RPC client (\rpc-client.ts\), and a custom TUI chat client (\rpc-extension-ui.ts\) that handles extension UI requests like select, confirm, input, and editor dialogs. The \extensions/\ directory now includes examples for lifecycle event handlers, custom tools, commands, custom UI components, Git integration, system prompt modifications, external integrations, and custom providers.

packages/coding-agent/examples · high confidence

New SDK usage examples for programmatic agent integration

Added a comprehensive set of TypeScript examples in the SDK directory demonstrating how to integrate the coding agent programmatically. The examples cover creating minimal sessions, selecting specific models and thinking levels, customizing system prompts and skills, configuring tool allowlists, registering extensions and custom tools, managing context files and prompt templates, handling API keys and OAuth, overriding settings, and managing session persistence and runtime switching.

packages/coding-agent/examples/sdk · high confidence

New TUI development and diagnostics extensions

Added four new extensions to the .pi/extensions directory to enhance the developer experience and provide runtime diagnostics. The \redraws\ extension introduces a \/tui\ command that displays the count of full TUI redraws, aiding in performance debugging. The \tps\ extension monitors agent lifecycle events to calculate and display tokens-per-second (TPS) along with input/output/cache token usage and total duration upon agent completion. The \prompt-url-widget\ extension enhances the UI by parsing GitHub PR, issue, and security advisory URLs from prompts to fetch and display rich metadata (titles, authors, severity) in a dedicated widget. Finally, the \import-repro\ extension allows users to import and switch to sessions shared via GitHub Gists, pi.dev share URLs, or GitHub issue comments, automatically handling path rewrites for cross-platform compatibility.

.pi/extensions · high confidence

New TUI framework with differential rendering, search, and theming

The \packages/tui/src\ directory has been replaced with a new TUI implementation that introduces several user-facing capabilities. Users can now search the transcript history using the new \AltScreenSearchIndex\ and fuzzy matching logic in \fuzzy.ts\. The interface supports customizable keybindings via \keybindings.ts\ and includes Emacs-style text editing features like a kill ring (\kill-ring.ts\) for yank and yank-pop operations. Visual presentation is enhanced by a new theming system in \colors.ts\ that supports OKLCH and OKHSL color spaces, and Markdown content can now render LaTeX math via \latex.ts\. The framework also provides a new \EditorComponent\ interface in \editor-component.ts\ that allows extensions to supply custom editor implementations.

packages/tui/src · high confidence

New client library with Unix socket transport and service discovery

The client package has been rewritten to introduce a new \Client\ class and \Connection\ lifecycle, supporting pluggable byte transports. A key addition is native Unix socket support, including a \createUnixTransportFactory\ for Node.js environments and a \discoverUnixServers\ function that probes local directories for server-addressed sockets to enable automatic local service discovery. The client now handles service subscriptions and catalogue requests via the Chord protocol, replacing previous session-based RPC patterns with a more direct service-oriented model.

packages/client/src · high confidence

New custom Anthropic provider example with OAuth and streaming support

An example extension has been added at packages/coding-agent/examples/extensions/custom-provider-anthropic that demonstrates how to register a custom provider for the Anthropic API. This example implements custom streaming logic, supports authentication via both API keys (environment variable) and OAuth (including PKCE flow and token refresh), and defines two model configurations, allowing users to see how to integrate custom AI providers into the coding agent.

packages/coding-agent/examples/extensions/custom-provider-anthropic · high confidence

New developer tooling and release scripts for the pi coding agent

This change introduces a suite of new scripts in the \scripts/\ directory to support the pi coding agent's development workflow and release process. It adds \auto-pi.sh\ as a developer wrapper to run the latest local build, \build-binaries.sh\ to compile standalone binaries for all supported platforms (including Windows ARM64), and \build-coding-agent-bundle.mjs\ to bundle the agent's Node runtime. It also includes several quality and security checks: \check-browser-smoke.mjs\ and \check-entry-graphs.mjs\ to verify browser-safe exports and bundle size budgets, \check-lockfile-commit.mjs\ and \check-pinned-deps.mjs\ to enforce dependency pinning and review lockfile changes, and \check-runtime-deps.mjs\ to ensure all runtime imports are declared. Finally, \coding-agent-consumer.mjs\ provides smoke tests to validate the published package's consumer experience.

scripts · high confidence

New durable assistant and tool execution harness

The agent harness now includes a new execution layer for assistant responses and tool calls. The \assistant.ts\ module introduces \streamHarnessAssistant\ to process assistant streams with configurable context transformation, payload hooks, and metadata capture, while \effect-gate.ts\ provides a \Gate\ mechanism to control effect admission and handle aborts safely. The \tools.ts\ module adds a complete pipeline for tool execution, including argument preparation, validation, before/after tool hooks, and result finalization, ensuring that tool effects are gated and durable.

packages/agent/src/harness/execution · high confidence

New durable storage backends: JSONL and SQLite

Users can now persist durable state using two new storage implementations: a JSONL-based backend (with Node-specific file system support) and a SQLite-based backend (with a Node adapter using the built-in \node:sqlite\ module). The JSONL storage uses append-only log files with sidecar files for large payloads and supports corruption detection, while the SQLite storage provides a relational schema with automatic migration support and WAL mode for concurrency. Both backends implement the same \Storage\ interface, allowing users to choose between file-based simplicity and database-backed durability.

packages/durable/src/storage · high confidence

New extension examples and documentation for the pi-coding-agent

This change introduces a comprehensive suite of example extensions and a detailed README for the pi-coding-agent, demonstrating how to extend the agent's capabilities. The examples cover lifecycle management (e.g., \permission-gate\, \project-trust\), custom tool creation (\hello\, \question\, \dynamic-tools\), UI customization (\custom-footer\, \custom-header\, \border-status-editor\), and system integration (\bash-spawn-hook\, \mac-system-theme\). The README provides usage instructions and categorizes the examples by functionality, serving as a practical guide for users to implement their own extensions.

packages/coding-agent/examples/extensions · high confidence

New interactive TUI components and Easter eggs

The interactive mode now includes a suite of new terminal UI components: \ArminComponent\ and \DaxnutsComponent\ provide animated ASCII Easter eggs, while \BashExecutionComponent\ handles streaming bash output with visual line truncation and status indicators. Session and tool state are now rendered via \BranchSummaryMessageComponent\ and \CompactionSummaryMessageComponent\ (collapsible summaries), \AssistantMessageComponent\ (with thinking block toggling and OSC 133 markers), and \CustomMessageComponent\/\CustomEntryComponent\ (supporting extension-provided renderers). Configuration management is handled by \ConfigSelectorComponent\, and the input experience is enhanced by \CustomEditor\ (app-level keybindings and status embedding) and \CountdownTimer\ (for cancellable dialogs).

packages/coding-agent/src/modes/interactive/components · high confidence

New print mode and JSON event streaming for single-shot agent runs

The coding agent now supports a dedicated print mode for single-shot interactions, accessible via the \pi -p\ command for plain text output or \pi --mode json\ for structured JSON event streams. This change introduces a new \print-mode.ts\ implementation that handles session lifecycle, signal termination, and output formatting, alongside a \json-event.ts\ module that transforms internal session events into a clean, non-partial JSON wire format suitable for external consumers. The \index.ts\ barrel file exposes these new modes and their associated types, enabling users to integrate the agent into scripts or other tools via stdout.

packages/coding-agent/src/modes · high confidence

New sandbox extension for OS-level bash command isolation

A new example extension has been added to the coding-agent that enables OS-level sandboxing for bash commands using the @anthropic-ai/sandbox-runtime library. This extension replaces the built-in bash tool to enforce strict filesystem and network restrictions (such as blocking access to \~/.ssh or \~/.aws and limiting allowed domains) via platform-specific tools like sandbox-exec on macOS and bubblewrap on Linux. Users can configure these restrictions via global or project-local JSON config files and enable the feature using the \pi -e ./sandbox\ command.

packages/coding-agent/examples/extensions/sandbox · high confidence

New session storage and repository benchmarks

Added a new benchmark suite under \packages/agent/benchmark/session\ to measure the performance and memory footprint of session storage and repository implementations. The suite includes timing benchmarks for read and write operations (such as message transactions, session listing, and forking), as well as memory profiling tools that track loaded footprint and heap allocation sites. These benchmarks currently target the in-memory \MemoryStorage\ and \MemorySessionRepo\ implementations using deterministic synthetic datasets, providing a baseline for comparing backend performance.

packages/agent/benchmark · high confidence

New utility modules for clipboard, image processing, and system integration

The coding-agent now includes a suite of new utility modules in \packages/coding-agent/src/utils\ to handle clipboard operations, image processing, and system integration. Clipboard functionality has been expanded to support Wayland (via \wl-paste\/\wl-copy\), X11 (via \xclip\/\xsel\), WSL (via PowerShell), and remote sessions (via OSC 52), with native fallbacks and proper error handling. Image processing now uses \@silvia-odwyer/photon-node\ (WASM-based) to convert images to PNG, apply EXIF orientation, and resize images to fit within size limits, replacing previous dependencies. Additional utilities include ANSI code stripping, changelog parsing, child process management with graceful stdio handling, git URL parsing, and frontmatter parsing.

packages/coding-agent/src/utils · high confidence

Support for bundled and package-based plugin facets

The coding agent now supports loading plugin facets from bundled artifacts and external packages. This change introduces new loaders that can read facet bundles from manifest paths and build artifacts from specified package directories, enabling a more flexible plugin architecture where facets can be distributed and loaded dynamically rather than being statically compiled into the agent.

packages/coding-agent/src/experimental/plugins · high confidence

Support for bundling and loading facet plugins as portable artifacts

The Chord node runtime now supports packaging facet plugins into self-contained, content-addressed bundles that can be transported and loaded at runtime. This change introduces a build pipeline (using esbuild) to compile facet entries into CommonJS modules with integrity verification, a manifest format (chord.facet-bundle v2) to describe bundle structure, and a loader that materializes these artifacts into temporary directories for execution. Plugins can now be configured via package.json (chord.facets, chord.external, chord.sourceMap) to define their facet entries and external dependencies, enabling a more modular and secure plugin distribution model.

packages/chord/src/node · high confidence

Unified extension system for lifecycle events and custom tools

The coding agent now exposes a comprehensive extension API that allows third-party modules to subscribe to agent lifecycle events (such as session start, shutdown, and compaction), register custom LLM-callable tools, and interact with the user interface via dialogs, widgets, and footer components. This unified system replaces previous fragmented hooks, providing a consistent runtime for extensions to modify system prompts, intercept input, and manage session state across different execution environments including Node.js, Bun, and compiled binaries.

packages/coding-agent/src/core/extensions · high confidence

Removals

Removal of legacy console, JSON, and TUI renderers

The \console-renderer.ts\, \json-renderer.ts\, and \tui-renderer.ts\ files have been deleted from the \packages/agent/src/renderers\ directory. This removes the previous implementations for displaying agent events in plain text, JSON format, and a terminal user interface, respectively. Users relying on these specific renderer classes for event output will need to migrate to the new rendering architecture introduced in this change.

packages/agent/src/renderers · high confidence

Removal of legacy pod setup and model run scripts

The \model\_run.sh\ and \pod\_setup.sh\ scripts within the \packages/pods/scripts\ directory have been deleted. These scripts previously handled the bootstrapping of GPU pods, including CUDA toolkit installation, virtual environment creation, and the execution of vLLM model servers. Their removal indicates a shift away from this specific manual or CLI-driven pod initialization workflow.

packages/pods/scripts · high confidence

Removal of pods command implementations

The command implementations for managing AI model pods have been removed from the codebase. Specifically, the files handling model deployment logic (including GPU selection and vLLM argument configuration), pod lifecycle management (listing, setting up, and removing pods), and the interactive prompt interface that connected to local models via the agent package have been deleted. This eliminates the ability to configure remote GPU pods, deploy models to them, or interact with them through the CLI.

packages/pods/src/commands · high confidence

Removed the pods package and CLI

The \packages/pods\ source code has been deleted, removing the CLI commands and library functions used to manage remote GPU pods (including setup, switching, and removal) and model deployments (starting, stopping, and listing models). This eliminates the ability to configure SSH connections, manage vLLM instances on remote hosts, and load model-specific GPU configurations via the \pi\ command-line interface.

packages/pods/src · high confidence

Architecture

AI API implementations moved to src/api with lazy loading

The AI provider implementations (Anthropic, Azure OpenAI, Bedrock, Cloudflare, Google, etc.) have been reorganized into the \packages/ai/src/api\ directory. Each provider now has a dedicated lazy-loading wrapper (e.g., \anthropic-messages.lazy.ts\) that dynamically imports the actual implementation file (e.g., \anthropic-messages.ts\) only when needed. This change improves bundle size by deferring the loading of provider-specific code and SDK dependencies until they are actually used, while maintaining the same external API surface for consumers.

packages/ai/src/api · high confidence

Decouple tool renderers from implementations to reduce startup size

The coding agent now separates the presentation logic for built-in tools (bash, edit, find, grep, ls, read, write) from their execution implementations. By importing only these new renderer modules, processes that display tool output no longer load the tool execution paths or their TypeBox parameter schemas, which removes approximately 17 MB of module graph. This architectural change allows for lighter-weight rendering processes while keeping the public tool definitions unchanged.

packages/coding-agent/src/core/tools/renderers · high confidence

Introduce AgentSessionRuntime for isolated session lifecycle management

The coding agent now uses a dedicated runtime layer (AgentSessionRuntime) to manage the lifecycle of individual sessions. This runtime owns the current AgentSession along with its cwd-bound services (model runtime, settings, resource loader) and handles session switching, forking, and shutdown. By encapsulating the teardown and recreation of these services, the agent ensures that session state is properly isolated and persisted, preventing issues like duplicate session headers or lost state during branch summarization and compaction.

packages/coding-agent/src/core · high confidence

Refactored TUI into a modular component architecture

The TUI package has been restructured from a monolithic implementation into a system of distinct, reusable components. This change introduces new modules for layout and rendering (Box, HStack, Stack, Spacer), input handling (Input, Editor with kill ring and undo support), and UI controls (ScrollView with configurable scrollbars, SelectList, SettingsList). It also adds specialized components for visual feedback (Loader, CancellableLoader, AltScreenFlashContainer) and media (Image), alongside utilities for mouse interaction (MouseRegion) and markdown rendering. This modularization provides a cleaner foundation for future TUI features and improvements.

packages/tui/src/components · high confidence

Behavioural changes

Agent harness API overhaul: new turn control hooks and session storage migration

The agent package introduces significant behavioral changes to the agent loop and session management. The \shouldStopAfterTurn\ hook is replaced by \finishTurn\ and \prepareRequest\, giving you finer control over when a turn ends and allowing you to inject canonical context before every provider request. The \Agent.peekQueuedMessages()\ method lets you preview queued messages without consuming them. Session storage has migrated to a v4 lane-based model with \Session\, \SessionStorage\, and \SessionRepo\ APIs, replacing legacy JSONL and in-memory repositories; you must now use \JsonlSessionRepo\ or \InMemorySessionRepo\. Additionally, the package name has changed from \pi-agent\ to \@earendil-works/pi-agent-core\, and the README has been rewritten to reflect the new event flow, tool execution modes (parallel vs. sequential), and facet service integration.

packages/agent · high confidence

Agent package refactored with new harness, proxy, and search APIs

The agent package has been significantly restructured to support a new durable harness architecture and improved streaming capabilities. The core agent loop has been extracted into \agent-loop.ts\ with a new \AgentMessage\-centric design, while the previous CLI, argument parsing, and session management files have been removed in favor of a more modular approach. A new \proxy.ts\ module enables LLM calls to be routed through a server to reduce bandwidth, and a \search/index.ts\ module introduces session and entry search capabilities. The public API now exposes the \AgentHarness\, compaction utilities, telemetry schemas, and new configuration options like \thinkingBudgets\ and \maxRetryDelayMs\ via \AgentOptions\, providing a more robust and extensible foundation for agent execution.

packages/agent/src · high confidence

Automated pre-commit checks for formatting, linting, and browser smoke tests

A new pre-commit hook has been added to automatically enforce code quality standards before changes are committed. The hook runs formatting, linting, and type checking on all staged files. Additionally, if changes are detected in the AI packages, web UI, or root package files, it triggers a browser smoke test to ensure critical user-facing functionality remains stable. The hook also automatically restages any files modified by the formatting step.

.husky · high confidence

CLI architecture refactored into modular components

The CLI implementation has been restructured from a monolithic entry point into a modular architecture, splitting the code into dedicated files for argument parsing (args.ts), authentication (auth-check.ts, auth-command.ts, credential-print.ts), file processing (file-processor.ts), session management (session-picker.ts), and startup UI (startup-ui.ts). This change introduces a new \auth\ subcommand for managing provider credentials (including \check\, \print-api-key\, and \print-bearer-token\), adds a TUI-based configuration selector (\pi config\), and implements a new first-time setup flow for the official distribution.

packages/coding-agent/src/cli · high confidence

Centralized compaction and branch summarization logic

The core logic for context compaction and branch summarization has been refactored into a dedicated \packages/coding-agent/src/core/compaction\ module. This change consolidates the code responsible for summarizing long sessions and generating summaries when navigating session branches, extracting shared utilities for file operation tracking and message serialization. Users benefit from more robust context management, including improved handling of file read/write operations in summaries and better token budgeting for summarization requests.

packages/coding-agent/src/core/compaction · high confidence

Coding agent CLI restructured with new entry points and migration logic

The coding agent's source code has been reorganized into a new modular structure, introducing dedicated entry points for the standard CLI (cli.ts) and RPC mode (rpc-entry.ts) while centralizing configuration, session management, and extension logic. A new migrations module automatically handles legacy data transitions, including moving sessions from the agent root to project-specific directories, migrating authentication credentials from oauth.json and settings.json to a unified auth.json, and renaming the commands/ directory to prompts/. The package manager CLI has also been updated to support managed self-updates and improved install method detection for Bun, npm, pnpm, and yarn environments.

packages/coding-agent/src · high confidence

Durable runtime introduces typed IDs, transactional sessions, and new storage backends

The \@earendil-works/pi-durable\ package has been restructured to provide a durable conversation, task, and document runtime with significant API changes and new capabilities. The API is now breaking: record IDs are replaced with erased branded numeric types (including \TaskId\<R\>\), and the \Tx\ interface is split into \createConversation\ and \forkConversation\ to enforce explicit ownership. Functionally, the package now supports transactional sessions with typed durable documents, snapshots, and commit publications. It also introduces document checkpoint selection for rewinding conversation history and policy-driven conversation document copying for forks. Storage is expanded with dedicated JSONL and SQLite backends (in addition to the existing in-memory implementation), and the package exports a conformance suite and benchmark workloads for validating custom storage adapters.

packages/durable · high confidence

Experimental coding-agent client and TUI moved outside the CLI

The experimental coding-agent runtime has been restructured to operate independently of the main CLI. A new \cli.ts\ entry point now dispatches to dedicated experimental commands, while the client logic is split into a headless \client.ts\ (for scripting and non-interactive use) and a new \client-tui.ts\/\client-tui-chat.ts\ implementation that renders the interactive terminal UI. This change also introduces a new \coordinator.ts\ process to manage internal process roles and connections, and adds \radius-relay.ts\/\radius-auth.ts\ to handle authenticated remote Radius relay sessions, allowing the experimental client to connect to remote servers via Radius or local Unix sockets.

packages/coding-agent/src/experimental · high confidence

Expose pi-client exports via coding-agent client entrypoint

The client entrypoint at packages/coding-agent/src/client/index.ts now re-exports all symbols from the @earendil-works/pi-client package, making the underlying client library's API directly available to consumers of the coding-agent client module.

packages/coding-agent/src/client · high confidence

Introduce JSONL session storage with legacy v3 migration and atomic writes

The agent harness now uses a new JSONL-based session storage format (format version 4) for durable session persistence. This change introduces atomic file writes to prevent corruption from torn tails or interrupted forks, and includes a migration path that automatically upgrades existing legacy v3 sessions on first write. The implementation supports session forking, branch management, and lane state tracking while maintaining backward compatibility with v3 session headers.

packages/agent/src/harness/session/jsonl · high confidence

Introduce durable, atomic runtime drive with boundary-based checkpointing and recovery

The agent harness runtime drive has been restructured into a durable, state-machine-driven execution model. This change introduces boundary-based checkpointing (boundary.ts, checkpoint.ts) that atomically commits lane inputs and state transitions, ensuring runs are resilient to interruptions. It adds a comprehensive recovery system (recovery.ts, reconcile.ts) that can safely resume or abort operations from persisted frames, handling cancelled assistant effects and deferred polls. The drive now manages the full lifecycle of assistant generation (generation.ts), deferred polling (deferred.ts), and tool execution (tools.ts, tool-placement.ts) with structural compaction and branch summarization (structural.ts) integrated directly into the durable flow. This provides a consistent, crash-safe execution path for agent runs.

packages/agent/src/harness/runtime/drive · high confidence

Introduce experimental service slices for the coding agent

The coding agent now exposes a new set of experimental service slices (SessionDirectory, SessionManagement, Models, AgentController, Transcript, SlashCommands, PresentationPlugins, and PresentationUI) that replace the legacy session RPC facade. These services are defined using the Chord framework, enabling replicated state for sessions and transcripts, process-local slash command registration, and a presentation-safe controller for agent operations. This change simplifies the service API, tightens experimental boundaries, and allows the client to run as a direct chat with preserved handles across facet reloads.

packages/coding-agent/src/experimental/services · high confidence

Introduce protocol version 8 with CBOR framing and strict message validation

The protocol package now implements version 8, defining a new wire format that uses CBOR encoding with length-prefixed framing for client and server messages. This change introduces strict schema validation via TypeBox for all incoming messages, rejecting invalid or cyclic data with specific \ProtocolValidationError\ exceptions. The new codec layer handles incremental decoding of framed payloads, ensuring that only well-formed, version-compatible messages are processed by the system.

packages/protocol/src · high confidence

Introduces new modular package structure and CLI for @earendil-works/pi-ai

The \packages/ai/src\ directory has been reorganized into a modular layout with a new core entry point (\index.ts\) that exports only side-effect-free types and utilities, while provider implementations, API wrappers, and OAuth flows are moved to dedicated subdirectories (\api/\, \auth/\, \providers/\). A new \compat.ts\ entrypoint is provided to maintain backward compatibility with the previous global API surface for existing applications. Additionally, a new CLI (\cli.ts\) is introduced to allow users to list available providers and perform interactive OAuth logins directly from the command line, and a new \bun-oauth.ts\ module registers bundled OAuth flows for standalone Bun binaries.

packages/ai/src · high confidence

Lazy-loaded OpenRouter image generation provider

The OpenRouter image provider is now registered via a new built-in registration module that implements lazy loading. This means the OpenRouter image generation code is only imported when actually needed, reducing initial bundle size and startup time. The provider handles load errors gracefully by returning a structured error response instead of crashing.

packages/ai/src/providers/images · high confidence

New composable server runtime with session routing and transport abstraction

The server package has been replaced with a new implementation that introduces a composable protocol server architecture. This change abstracts network transport via a new \ServerListener\ interface, allowing the server to accept byte connections through pluggable listeners rather than a fixed implementation. It introduces a \SessionRouter\ to manage client attachments and route service calls to specific sessions, supporting features like session draining and attachment lifecycle management. The new server exposes a structured error model (\ServerError\ hierarchy) for handling routing and session-specific failures, and relies on the \@earendil-works/chord\ library for service state encoding and RPC handling.

packages/server/src · high confidence

New provider-owned authentication infrastructure for AI models

The AI package introduces a new authentication system where providers define their own auth logic, replacing the previous implicit resolution. This change adds a request-scoped auth resolution layer that prioritizes stored credentials over environment variables, implements double-checked locking for OAuth token refreshes to prevent race conditions, and provides a pluggable credential store interface with a default in-memory implementation. Users will experience more reliable authentication handling, particularly for OAuth flows, and the system now supports provider-specific environment overlays and explicit cancellation via abort signals.

packages/ai/src/auth · high confidence

Redesigned interactive theme system with system theme and granular color tokens

The interactive coding agent now uses a new theme architecture that includes built-in dark and light themes, a dynamic 'system' theme that adapts to the terminal's palette, and a comprehensive set of granular color tokens. This change introduces specific styling for tool execution states (pending, success, error), markdown rendering (headings, links, code blocks), syntax highlighting, and user message backgrounds. It also adds support for scrollbar theming, transcript search match highlighting, and distinct colors for AI thinking levels, allowing for a more consistent and visually distinct interface across different terminal environments.

packages/coding-agent/src/modes/interactive/theme · high confidence

Replace legacy harness runtime with durable, state-driven execution engine

The agent harness runtime has been replaced with a new durable implementation that manages agent lanes through explicit state transitions and checkpointing. This change introduces a structured drive loop that processes operations across distinct phases (starting, checkpointing, assistant generation, tool execution, and structural navigation) and ensures burst-safe framing for assistant messages. The new runtime supports restoring lane state from persistent storage, handling deferred operations with retry logic, and providing granular progress tracking for both assistant frames and tool results, fundamentally shifting the agent's execution model from a legacy imperative style to a durable, event-sourced architecture.

packages/agent/src/harness/runtime · high confidence

Repository governance, line-ending normalization, and test isolation hardening

The repository now enforces stricter operational and security standards through new documentation and configuration. A new AGENTS.md defines mandatory development rules for AI agents (e.g., erasable TypeScript syntax, specific import patterns, and commit message formats), while CONTRIBUTING.md establishes a quality bar and auto-closure gate for new contributors. Security is clarified in a new SECURITY.md, and the old PUBLISHING.md has been removed. To prevent cross-platform line-ending issues, .gitattributes now enforces LF for text files and CRLF for Windows scripts. Additionally, test execution is hardened: test.sh now runs in a fully isolated environment (clearing API keys and using a temporary home directory), and new pi-test.sh/ps1/bat scripts allow running the CLI with or without environment variables, ensuring tests and local runs do not leak credentials or depend on the host environment.

(repo-wide) · high confidence

Rewritten RPC mode with typed protocol and client

The RPC mode for headless agent operation has been rewritten to use a strict JSON Lines (JSONL) protocol with a new typed client and server implementation. This change introduces a dedicated \jsonl.ts\ module for reliable LF-only line framing, replacing previous stdout handling to prevent issues with Unicode separators. The new \RpcClient\ spawns the agent process and provides a strongly-typed API for commands such as prompting, session management, and bash execution, while \rpc-mode.ts\ now handles the server-side logic using this typed protocol. Consumers of the RPC interface will interact with a more robust, type-safe interface that ensures proper request/response correlation and event streaming.

packages/coding-agent/src/modes/rpc · high confidence

SQLite session backend package initialization and v0.84.0 release notes

The \@earendil-works/pi-session-backend-sqlite-node\ package has been introduced (renamed from \@earendil-works/pi-storage-sqlite-node\) to provide a Node.js SQLite storage backend for agent harness sessions. This entry documents the package's initial structure, including its README, build configuration, and test/benchmark setups, alongside the release notes for v0.84.0. Key changes in this release include a breaking migration from the legacy schema to the v4 lane-based \SessionRepo\ contract, the addition of bounded active-branch queries, durable operation records, global facts, shared sequence allocation, session statistics, and fenced writer leases. It also fixes session listings to avoid acquiring writer claims during inventory reads and introduces a composable, parameterized \sql\ template tag for queries, along with covering indexes for session, record, branch, and fact queries.

packages/session-backends/sqlite-node · medium confidence

Unified image and classifier models into the main Models surface

The separate \ImagesModels\ collection and \ImagesProvider\ have been removed and unified into the standard \Provider\ and \Models\ APIs. Image models are now \ImageModel\ instances that share the \BaseModel\ interface with chat models, and image generation is handled via \Models.generateImages()\ and \createProvider({ images })\. The generated model data schema has been updated to version 6 to support multiple model types (chat, image, classifier) per upstream ID, and a new classifier model system with \Models.classify()\ has been added to support JEV-style classification tasks through providers like TypeSafe and Cloudflare Workers AI.

packages/ai · high confidence

Fixes

Added session migration script to fix v0.30.0 storage bug

A new shell script (migrate-sessions.sh) is provided to correct a data-loss issue introduced in v0.30.0, where session files were incorrectly saved to the root agent directory instead of their proper subdirectories. This script scans for orphaned .jsonl files in \~/.pi/agent/, extracts the current working directory from each file's header, and moves them into the correct session-specific directories (e.g., \~/.pi/agent/sessions/--project-path--). It supports a --dry-run mode for verification before performing the actual file moves.

packages/coding-agent/scripts · high confidence

Fix missing SQLite migrations in distribution build

The SQLite session backend now correctly includes database migration files in the published distribution. A new build script copies the migration files from the source directory to the distribution directory, resolving the ENOENT errors that occurred when the application attempted to access these files at runtime.

packages/session-backends/sqlite-node/scripts · high confidence

Fixes environment variable restoration and process warnings in Bun-compiled binaries

This change introduces a workaround for a Bun issue where \process.env\ is empty inside sandbox environments (e.g., nono on Linux/macOS) by restoring environment variables from \/proc/self/environ\ at startup. It also suppresses process warnings in the CLI and registers OAuth flows and Bedrock provider modules specifically for the Bun runtime entrypoint, ensuring the coding agent functions correctly when compiled into a binary.

packages/coding-agent/src/bun · high confidence

Test coverage

Added SQLite session repository and storage benchmarks; Added benchmark test infrastructure for session repository and storage performance; Added comprehensive acceptance tests for the agent runtime harness; Added comprehensive test coverage for the Agent Harness v2 runtime; Added comprehensive test coverage for the agent package; Added comprehensive tests for the coding agent session manager; Added regression test suite for coding-agent session and tool behaviors; Added server-side protocol and lifecycle tests; Added server-side test infrastructure for protocol conformance; Added session repository and storage conformance test suites; Added session storage testing utilities and conformance suites; Added test coverage for SQLite session backend; Added test coverage for protocol serialization, framing, and validation; Added test fixtures for assistant thinking content and session compaction; Added test suite for Pico3 agent kernel; Added test utility modules for agent testing; Added tests for AgentSession auto-compaction, branching, and concurrency; Added tests for Chord package boundaries, facet bundling, context management, and delta operations; Added tests for client connection, service subscription, and Unix socket transport; Added tests for delta tracker retention and lifecycle semantics; Added tests for durable package environment, storage, and session APIs; Expanded test coverage for AI provider abort handling and Anthropic-specific behaviors; Expanded test coverage for TUI components and regression fixes; Exported scoped storage conformance suite and benchmarking utilities; New deterministic test suite for AgentSession behavior.

Dependencies

Initial release of v0.87.1 with new package structure and dependency updates

This release introduces version 0.87.1 across the monorepo, establishing a new package structure with dedicated packages for the AI integration (@earendil-works/pi-ai), application runtime (@earendil-works/chord), and durable storage (@earendil-works/pi-durable). The coding agent now requires Node.js \>=22.19.0 and includes updated dependencies such as undici 8.10.2, typebox 1.3.27, and the Anthropic SDK 0.124.0. Example extensions for sandboxing, custom providers, and the Gondolin integration have been added to demonstrate plugin capabilities.

(dependencies) · high confidence

Updated vendor libraries for code highlighting and Markdown parsing

The export-html module now uses updated versions of its bundled vendor libraries: Highlight.js has been upgraded to v11.9.0 and the Markdown parser (marked) to v18.0.5. These updates replace the previous versions in the \packages/coding-agent/src/core/export-html/vendor\ directory, ensuring that code syntax highlighting and Markdown-to-HTML conversion in exported documents reflect the latest behavior and fixes from these libraries.

packages/coding-agent/src/core/export-html/vendor · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 45 → 48 (+3.4)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.16) — scores are not directly comparable.

Lenses

  • Code Health 72 → 61 (-10.7)
  • Architecture 69 (new)
  • Maturity 65 → 84 (+19.3)
  • Readiness 23 → 51 (+27.9)
  • Security 65 → 76 (+11.3)
  • Accessibility 36 (new)
  • Performance 60 (new)

Resolved (46)

  • (anonymous) (cognitive 16) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous) (cognitive 32) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous) (cyclomatic 18) (packages/coding-agent/src/core/export-html/template.js)
  • Boundary-crossing change coupling: env-api-keys.ts ↔ model-resolver.ts (packages/ai/src/env-api-keys.ts)
  • Change coupling: find.ts ↔ ls.ts (packages/coding-agent/src/core/tools/find.ts)
  • Change coupling: image-convert.ts ↔ image-resize.ts (packages/coding-agent/src/utils/image-convert.ts)
  • Change coupling: interactive-mode.ts ↔ print-mode.ts (packages/coding-agent/src/modes/interactive/interactive-mode.ts)
  • Change coupling: interactive-mode.ts ↔ rpc-mode.ts (packages/coding-agent/src/modes/interactive/interactive-mode.ts)
  • Change coupling: local-release.mjs ↔ publish.mjs (scripts/local-release.mjs)
  • Change coupling: openrouter.models.ts ↔ vercel-ai-gateway.models.ts (packages/ai/src/providers/openrouter.models.ts)
  • Change coupling: prompt-templates.ts ↔ skills.ts (packages/agent/src/harness/prompt-templates.ts)
  • Dimension evaluation failed
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • No artifact signing
  • …and 26 more

New (1446)

  • (anonymous) (cognitive 31) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::buildTreePrefix (cognitive 26) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::computeStats (cognitive 41) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::computeStats (cyclomatic 21) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::flattenTree (cognitive 16) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::formatToolCall (cognitive 22) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::formatToolCall (cyclomatic 27) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::getTreeNodeDisplayHtml (cognitive 39) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::getTreeNodeDisplayHtml (cyclomatic 25) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::recalculateVisualStructure (cognitive 25) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::recalculateVisualStructure (cyclomatic 18) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::renderEntry (cognitive 103) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::renderEntry (cyclomatic 47) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::renderHeader (cognitive 20) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::renderHeader (cyclomatic 21) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::renderToolCall (cognitive 113) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::renderToolCall (cyclomatic 63) (packages/coding-agent/src/core/export-html/template.js)
  • (anonymous)::renderTree (cognitive 22) (packages/coding-agent/src/core/export-html/template.js)
  • AgentSession._checkCompaction (cognitive 41) (packages/coding-agent/src/core/agent-session.ts)
  • AgentSession._checkCompaction (cyclomatic 37) (packages/coding-agent/src/core/agent-session.ts)
  • …and 1426 more

Changes since last survey

  • 300 commits — 165 feature/other, 135 fixes

By area

  • packages/coding-agent — 93 commits
  • packages/ai — 74 commits
  • packages/agent — 57 commits
  • packages/durable — 22 commits
  • packages/tui — 17 commits
  • (repo) — 13 commits
  • packages/chord — 12 commits
  • packages/evals — 6 commits
  • .github/APPROVED_CONTRIBUTORS — 3 commits
  • (root) — 1 commit
  • .pi/skills — 1 commit
  • scripts/check-browser-smoke.mjs — 1 commit

Notable commits

  • fix: Revert "fix(ai): update stale DeepSeek Flash test model IDs"
  • fix: Revert "fix(ci): Fix a broken test"
  • fix: fix(agent): expand fork conformance for Memory and JSONL
  • fix: fix(agent): map signal-killed processes to non-zero exit codes (#8994)
  • fix: fix(agent): reduce JSONL fork list index memory
  • fix: fix(agent): reject open legacy JSONL forks
  • fix: fix(agent): relax fork lane validation and sequence conformance
  • fix: fix(ai): accept Fireworks models in adaptive thinking metadata test
  • fix: fix(ai): add Qwen3.8 Flash to individual token plan
  • fix: fix(ai): apply model samplingParams in direct stream()/complete() calls
  • fix: fix(ai): avoid unsupported Gemini thinking levels
  • fix: fix(ai): default unknown providers to non-strict tools (closes #9816)
  • fix: fix(ai): derive Google thinking levels from models.dev
  • fix: fix(ai): detect z.ai prompt-too-long errors
  • fix: fix(ai): enable GLM-5.2 reasoning on Mistral
  • fix: fix(ai): exclude Cerebras from supportsStrictMode (#9804)
  • fix: fix(ai): identify Responses error providers
  • fix: fix(ai): ignore empty Mistral content deltas
  • fix: fix(ai): keep Baseten GLM-5.2 text-only (#8293)
  • fix: fix(ai): keep Copilot tests aligned with current model catalog
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

earendil-works/pi was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 28 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 6f7551516b84278eb9da1c340c8e7bc66be1a6ba — the exact code this score is about.
  • Scored under rubric-2026.09.16 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-eb9197011364.