Skip to content

v20261013

Choose a tag to compare

@github-actions github-actions released this 13 Oct 07:00
· 1481 commits to main since this release

Breaking Changes

  • Removed the extension plugin system in favor of programmatic modules: the jiti file loader, extension discovery (~/.nanopi/agent/extensions, .nanopi/extensions), the extensions and packages settings keys, --extension/-e/--no-extensions, builtin:<name> resolution, the install/remove/uninstall/list/config subcommands, the npm/git package manager, bundled-extras dist/extras shipping, and runtime module reload are gone. Extensions are now SessionModule objects ({ name, factory }, factory receives a ModuleApi) composed in code via DefaultResourceLoader({ modules }) or createAgentSession({ modules }); the bundled extras, the run-mode module, llama.cpp, the built-in commands, and codex compaction are compiled in as BUILTIN_MODULES. Fourteen zero-consumer events were removed with their emit sites (user_bash, context, context_with_system, cache_warming_decision, after_provider_response, provider_stream_event, agent_before_settle, ui_prompt_start, ui_prompt_end, session_before_switch, session_info_changed, session_compact_failed, thinking_level_select, resources_discover), ExtensionRuntime reload/invalidation machinery was deleted (/reload now only refreshes settings, skills, prompts, and themes), and all Extension* API types were renamed to Module* (ModuleApi, ModuleContext, ModuleUIContext, ModuleRegistry, bindModules(), session.moduleRegistry).

  • Removed the built-in MCP support and the @earendil-works/pi-mcp package: the pi mcp command, mcp.json discovery, --no-mcp, MCP OAuth continuations (pi auth --continue), the mcp/codemode/tool-search built-in extensions, pi.registerMcpServer()/pi.getMcpServers()/mcp_servers_change, the McpServersChangeEvent export, and list_mcp_resources/list_mcp_resource_templates/read_mcp_resource are gone.

  • Removed codemode scripting (the @earendil-works/pi-codemode package, the QuickJS runtime, createCodemodeExtension, createToolSearchExtension, and the codemode settings section) and the "codemode" and "deferred" tool exposures; ToolExposure is now "direct" | "model-only" | "hidden".

  • Changed before_agent_start to also fire for runs started by pi.sendMessage(..., { triggerTurn: true }) while idle. BeforeAgentStartEvent is now a union on messageType: "user" events carry prompt and images, and "custom" events carry the starting message and no prompt. Messages returned by handlers are added to both kinds of run, and pending deliverAs: "nextTurn" messages are delivered with the custom-message run. Handlers that should act only on user prompts must check event.messageType === "user" (#10267, #5581)

  • Changed the session to count as busy while a run starts, including during before_agent_start handlers: ctx.isIdle() is false, pi.sendMessage() queues into the starting run instead of starting a second run that failed with "Agent is already processing", pi.sendUserMessage() requires deliverAs, and an abort requested meanwhile aborts the run once it starts

  • Removed the Bun runtime and compiled-binary distribution: the src/bun/ entrypoints, isBunBinary/isBunRuntime, the Bun sandbox-env restore, the Bun websocket proxy wrapper, build:binary/copy-binary-assets, scripts/build-binaries.sh, the six per-platform release archives, and the Bun install consumer in scripts/local-release.mjs. Node >= 22.19 is the only supported runtime.

  • Renamed the built-in /quit command to /exit, and the built-in /thinking command to /effort.

  • Removed the full screen TUI mode: the tuiMode, fullscreenExitOutput, fullscreenScrollbar, fullscreenCopyOnSelect, and fullscreenWheelScrollLines settings, the --tui-mode flag, the fullscreen transcript layout with its search/selection, the fullscreen-only 3D easter egg, and the now-unused scrollbar*/searchMatch* theme tokens are gone. The interactive TUI always renders inline with the terminal scrollback.

  • Removed the startup loaded-resource listing ([Context]/[Skills]/[Prompts]/[Extensions]); conflict and error diagnostics still render at startup and the listing moved into /status.

  • Removed the user-facing theme system and the /reload command. nanopi always renders with the system theme generated from the terminal's reported colors (grayscale until they arrive, refreshed on terminal light/dark switches): the built-in dark/light themes and their JSON files, custom theme discovery (~/.nanopi/agent/themes, .nanopi/themes), the theme and themes settings, --theme/--use-theme/--no-themes, the /settings Theme submenu and ThemeSelectorComponent, the theme file watcher, schemas/theme.schema.json, and SettingsManager.getThemeSetting()/getTheme()/setTheme()/getThemePaths() are gone; .nanopi/themes no longer requires project trust, and first-time setup is analytics-only. The SDK keeps the rendering layer (Theme class, theme, terminal color detection, getMarkdownTheme() and the other TUI helpers); initTheme() takes no arguments and installs the system theme, refreshSystemTheme() regenerates it, module UI contexts lose getAllThemes()/getTheme()/setTheme(), ResourceLoader loses getThemes(), and exportToHtml() loses its themeName option. The interactive /reload slash command is removed along with its handler; the runtime reload machinery (module-requested and models.json hot reloads) stays, and settings/keybindings/skill/prompt/context changes now require a restart to apply.

Added

  • Added xhigh and max to the thinkingBudgets settings schema, matching the new ThinkingBudgets fields and their 24576/32768-token default budgets.
  • Added the @nanopi/pi-extra run-mode and permission module (new packages/extra workspace package, modes build flavor component): registered as a hidden inline extension it provides plan/minimal/standard run modes via tool_call interception, --yolo, /plan and /mode, permission prompts for edit/write/shell calls (allow once / allow session / reject / let the AI decide), footer badges, subsystem toggles, NANOPI_INIT_MD / NANOPI_API_* ENV overrides, and the webui bridge (modes, permission SSE, settings, OAuth, pairing). Flavors that disable modes alias the module to an inert stub (see scripts/pi-extra-disabled-stub.mjs), leaving no flags, commands, badges, prompts, or bridge endpoints.
  • Added the mcp-lite bundled extra: a zero-dependency slim port of irahardianto/pi-mcp-extension (stdio + streamable-http transports, initialize/tools list+call/cancel, ~/.nanopi/mcp.json + .nanopi/mcp.json config layering, /mcp status). Its tools register as mcp__* with defaultActive: false; pi-subagent-mini forwards the extension to children and adds mcp__* to their default tool list when the extra module's mcp switch is on, and the extra module blocks mcp__* calls in main-agent sessions — MCP is subagent-only. Registers the extra/mcp-lite build flavor component.
  • Added built-in /init (generate an AGENTS.md contributor guide) and /context (interactive context-window distribution dialog with per-part previews) commands, and switched compaction to Codex style by default: every compaction (manual /compact, threshold, overflow) produces a handoff-framed summary with verbatim retention of the last 20,000 tokens of recent user messages across the cut point, rolling file lists, and a TUI-only post-compaction accuracy warning. Ported from the pi-extra-cmd and pi-codex-compact extension packages and registered as built-in inline extensions; any failure (no model, auth, empty summarize set) falls back to the default compaction.
  • Added bundled extras: twelve extension packages vendored under packages/coding-agent/src/extras/ (ask-lite, pi-codex-compact, pi-extra-cmd, pi-fake-codex, pi-fake-opencode, pi-lsp-mini, pi-rewind, pi-simplify, pi-smart-flow, pi-subagent-mini, pi-ui, todo-lite), compiled into every build as BUILTIN_MODULES (no extra/<name> build flavor components, no dist/extras shipping, no runtime registration; see the breaking changes above).
  • Added the pi-lsp-mini bundled extra: zero-dependency LSP integration with lsp_diagnostics, lsp_references, lsp_callgraph, lsp_rename (workspace rename, dry-run by default), and lsp_delete tools plus a /lsp server listing; diagnostics are appended after every write/edit. Language servers spawn lazily per language when first used (typescript/pyright/gopls/rust-analyzer/clangd auto-detected on PATH, overridden or extended via ~/.nanopi/agent/lsp.json). Gated by the extra module's lsp subsystem switch.
  • Added build flavors controlled by the root buildconfig.json: --flavor <name> / NANOPI_BUILD_FLAVOR selects a flavor for scripts/build-coding-agent-bundle.mjs, scripts/build-coding-agent-single-file.mjs, and the coding-agent copy-assets step (now packages/coding-agent/scripts/copy-assets.mjs). Flavors toggle peripheral components (webui, export-html, docs, examples, the goal placeholder, oauth/* flows) in bundle and single-file builds; the npm packages always publish the full flavor, and disabled components fail at runtime with "not included in this build" errors instead of module-not-found.
  • Added nanopi webui [-p <port>] (default port 5335): a loopback HTTP server that serves the new @nanopi/webui browser UI (ported from AtomCode, MIT) and bridges its /chat SSE transport, models, projects, sessions, skills, and filesystem browsing onto a headless AgentSession. nanopi runs tools without per-call approval, so the webui approval mode is always bypass
  • Added webui provider accounts mapped onto models.json: /config returns the vendor-preset and protocol catalogs plus the current accounts, and the provider-account CRUD, per-account model, and model-discovery endpoints write through to models.json and refresh the model runtime, so the settings' add-provider dialog (preset vendors, custom protocols) works.
  • Added the single-file distribution: pnpm run build:single-file produces a zero-dependency nanopi.js (all JS bundled by esbuild, package assets gzip-embedded and extracted to the user cache directory, lazy OAuth/Bedrock modules statically registered by src/standalone/). GitHub releases ship nanopi.js plus a nanopi-sidecars-<version>.tgz asset.
  • Added ctx.getLoadedResources() to the extension context: a snapshot of the loaded context files, skills, prompts, and extensions (hidden built-in inline extensions excluded) that backs the /status resource sections.
  • Added a Ctrl+C again to quit footer reminder after the first Ctrl+C press; the second press within one second (matching Codex's timeout) quits, and the reminder replaces the footer line for its window only.
  • Added sidecar downloads into the agent bin directory (.nanopi/agent/bin): the photon wasm is fetched from the npm registry and the TUI native prebuilds from the release sidecar tarball, each sha256-verified against hashes embedded at build time; failures degrade to raw images and no native clipboard instead of crashing.
  • Added built-in /status command showing the current model, provider, directory, session, thinking level, token usage, and context in a /context-style bottom-docked dialog (plain text via notify outside TUI), plus the loaded-resource listing ([Context]/[Skills]/[Prompts]/[Extensions] sections) that the startup page used to render (plain text via notify outside TUI).
  • Added a dim Type anything... placeholder in the interactive input box while it is empty.
  • Added NANOPI_CLIPBOARD_OSC52=1 to send copied text to the terminal with OSC 52 after the local clipboard write, so copies reach a remote client's clipboard when nanopi cannot detect the remote session, such as multiplexer attaches from another machine or remote IDE daemons (#10826, #10835, #10114)
  • Added next-prompt suggestions: after each assistant reply the current model generates a one-line suggested follow-up shown as dim ghost text in the empty input box; right arrow accepts it, any other input dismisses it for that turn. Controlled by the nextPromptSuggestions setting (default on, toggle in /settings), generated via AgentSession.generateNextPromptSuggestion() without touching the transcript.

Changed

  • Changed the extra module's subsystem switches (lsp, mcp, subagent, askquestion, todo) to apply to fresh sessions from their persisted settings, not only when toggled live from the webui settings page; a subsystem switched off in ~/.nanopi/extra/settings.json now starts deactivated in every interface.

  • Changed the interactive editor paste handling to Codex semantics: only pastes above 1000 characters collapse into a [paste #N] marker (full text preserved and expanded on submit); multi-line markdown documents under the threshold insert verbatim, the editor viewport caps at 20% of terminal rows (min 5) and scrolls to the pasted end, and a combined ↑ N · ↓ M hidden-line label sits above the composer.

  • Changed the webui server to bridge the extra module: /approval_mode and the new /extra/* endpoints expose run modes (plan/minimal/standard) and 404 when the build excludes the module, /chat streams permission_request SSE events answered by POST /chat/permission, and nanopi webui prints a short one-time pairing code plus URL (exchanged at the unauthenticated POST /extra/pair) instead of the long token-in-URL (stubbed builds keep the token URL). Extensions now bind with mode: "webui" in webui sessions, and ExtensionMode gained "webui".

  • Changed the webui model selection to a single source of truth: /config's default_provider and /models' is_default reflect the settings default model (shared with the CLI), and a model picked in the webui persists via setModel({ persist: true }) instead of changing only the current session.

  • Changed the showHardwareCursor setting to use only the terminal cursor instead of also drawing Pi's reverse-video cursor

  • Changed photon.ts wasm resolution to prefer the agent bin sidecar path over the executable directory, and made image resizing wait for the photon sidecar download on first use in single-file distributions

  • Changed the release workflow to build and smoke-test nanopi.js on Linux/macOS/Windows runners instead of extracting and running per-platform binaries

  • Changed the interactive welcome header to a Codex-style box (π NanoPi vx.x.x, model <id> with a matching provider/ prefix stripped, provider … thinking …, directory …) with a Tip: Use /status … line truncated to the terminal width, and the footer to a single used xk/yk · / for more details line; the pi-ui extra ships no custom editor (the default composer stays, menu above) and keeps the same single-line footer

  • Changed single-file sidecars to buildconfig-gated builtins: flavors enabling sidecar/tui-native / sidecar/photon-wasm (both on in full) embed the files in nanopi.js and install the platform-matching ones to the agent bin directory offline with sha256 verification; disabled components keep the on-demand download fallback

  • Changed the interactive editor to a Codex-style borderless composer: a › prompt prefix on the first line (colored by thinking level), continuation lines aligned under the prefix, and blank padding rows instead of horizontal rules; the embedded working status and scroll indicators share those blank rows, and the slash-command autocomplete menu opens above the composer. Shell mode swaps the prompt glyph to $, hides the typed ! (submission still receives !command), keeps the composer gray, and marks the mode with a yellow right-aligned shell label on the footer line; the bashMode theme color is now that yellow shell accent instead of the old editor border green

  • Changed the pi-fake-codex apply_patch alias to be mutually exclusive with edit: while apply_patch is declared, its prepareLoadout hook hides edit's declaration, so requests and the system-prompt tool list and rules carry exactly one editing tool on Codex-impersonated APIs. edit stays registered, active, and callable, and its declaration returns automatically whenever apply_patch is undeclared

  • Trimmed the model-facing prompt surface: the docs section now points at the README, the docs index, and the examples directory with path-resolution rules instead of inlining the topic-to-file map, and the edit tool keeps its full usage contract in its declaration with a two-bullet rules summary (the apply_patch alias mirrors both)

Fixed

  • Fixed the embedded working/retry/compaction spinner sitting directly on top of the composer input in the interactive TUI: a blank row is now kept between the status line and the input (mouse hit-testing accounts for the extra row)

  • Fixed single-file runs never refreshing bundled extras after a same-version rebuild: the extras install marker and the extracted-asset cache directory were keyed by version only, so rebuilt content (e.g. a modified vendored pi-ui) kept loading the stale copy from ~/.nanopi/packages and the version-keyed cache. Both now carry a content hash (BUNDLED_EXTRA_MARKER gained a second line; the cache gained a .assets-sha256 marker) and refresh when it changes; user-owned directories without a marker are still never touched

  • Fixed the startup welcome tip overflowing on terminals narrower than 92 columns: the fixed-width line now truncates to the terminal width instead of crashing the TUI renderer

  • Fixed pi-ecosystem extension packages failing to load: package manifests now accept the upstream "pi" field as a fallback to "nanopi", and extensions importing @earendil-works/pi-* (the fork's upstream module names) resolve in source checkouts, unbundled dist, and bundles via loader aliases, bundle virtual modules, and tsconfig paths.

  • Fixed Mistral streams being aborted mid-generation (e.g. during long thinking) after the request timeout; the timeout now applies only to waiting for response headers (#10609)

  • Fixed a symlinked AGENTS.md in a git worktree nested inside its main repo causing no project context file to load (#10681)

  • Fixed runs started by pi.sendMessage(..., { triggerTurn: true }) removing system prompt sections added in before_agent_start after their first tool call, which changed the prompt mid-run and broke the provider prompt cache twice per run (#10267)

  • Fixed the build failing after the clankolas.png and Radius removals: leftover assets/*.png copy steps in copy-assets/copy-binary-assets and a leftover Radius OAuth lazy bundle entry in the bundle script

  • Fixed the startup [Extension issues] diagnostics warning that the built-in /status command "conflicts with built-in interactive command": commands from built-in inline extensions (source: "builtin") are intentionally listed in BUILTIN_SLASH_COMMANDS and no longer count as conflicts

  • Fixed print mode (-p) exiting 0 without a warning when the final response was cut off at the model's output token limit; it now prints the partial text, writes a warning to stderr, and exits 1 (#10799)

  • Fixed ~ not being expanded in !pattern, +path, and -path entries of the skills and prompts settings, so entries like !~/skills/pdf matched nothing (#10765)

  • Fixed reading or writing auth.json on Windows failing with EPERM when the previous lock folder was still being deleted; nanopi now retries briefly before reporting the error (#10801)

  • Fixed serializeConversation() (compaction, branch summaries, bug reports) including thinking blocks; replayed thinking is often not in the live context, so including it could make a summarization request larger than the context it summarizes and fail. Visible text, tool calls, and tool results record what happened

Removed

  • Removed the extra/pi-extra-cmd and extra/pi-codex-compact build flavor components and their vendored sources; their functionality is built in (bundled extras drop from eleven to nine).
  • Removed the Earendil announcement component, the hidden /dementedelves command, and the Earendil attribution from the Radius login intro and docs.
  • Removed the nanopi update command, self-update planning, the managed-install updater, install telemetry, the startup version check, and package update notifications; nanopi no longer connects to pi.dev.
  • Removed the Radius provider and the "oauth": "radius" custom-provider configuration; /share now publishes a private GitHub gist and /bug exports a zip archive instead of uploading to a Radius gateway.
  • Remote model catalog overlays and OpenRouter per-key personalization now run only when a catalog base URL is explicitly configured; bundled model data is used otherwise.
  • Removed the unused getInteractiveAssetsDir() and getBundledInteractiveAssetPath() helpers from src/config.ts, left over from the clankolas.png removal.
  • Removed the chat-viewport.ts fullscreen layout module and the fullscreen-only 3D easter-egg components (/arminsayshi keeps the 2D component).