Repository navigation
v20261013
Breaking Changes
-
Removed the extension plugin system in favor of programmatic modules: the jiti file loader, extension discovery (
~/.nanopi/agent/extensions,.nanopi/extensions), theextensionsandpackagessettings keys,--extension/-e/--no-extensions,builtin:<name>resolution, theinstall/remove/uninstall/list/configsubcommands, the npm/git package manager, bundled-extrasdist/extrasshipping, and runtime module reload are gone. Extensions are nowSessionModuleobjects ({ name, factory }, factory receives aModuleApi) composed in code viaDefaultResourceLoader({ modules })orcreateAgentSession({ modules }); the bundled extras, the run-mode module, llama.cpp, the built-in commands, and codex compaction are compiled in asBUILTIN_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),ExtensionRuntimereload/invalidation machinery was deleted (/reloadnow only refreshes settings, skills, prompts, and themes), and allExtension*API types were renamed toModule*(ModuleApi,ModuleContext,ModuleUIContext,ModuleRegistry,bindModules(),session.moduleRegistry). -
Removed the built-in MCP support and the
@earendil-works/pi-mcppackage: thepi mcpcommand,mcp.jsondiscovery,--no-mcp, MCP OAuth continuations (pi auth --continue), themcp/codemode/tool-searchbuilt-in extensions,pi.registerMcpServer()/pi.getMcpServers()/mcp_servers_change, theMcpServersChangeEventexport, andlist_mcp_resources/list_mcp_resource_templates/read_mcp_resourceare gone. -
Removed codemode scripting (the
@earendil-works/pi-codemodepackage, the QuickJS runtime,createCodemodeExtension,createToolSearchExtension, and thecodemodesettings section) and the"codemode"and"deferred"tool exposures;ToolExposureis now"direct" | "model-only" | "hidden". -
Changed
before_agent_startto also fire for runs started bypi.sendMessage(..., { triggerTurn: true })while idle.BeforeAgentStartEventis now a union onmessageType:"user"events carrypromptandimages, and"custom"events carry the startingmessageand noprompt. Messages returned by handlers are added to both kinds of run, and pendingdeliverAs: "nextTurn"messages are delivered with the custom-message run. Handlers that should act only on user prompts must checkevent.messageType === "user"(#10267, #5581) -
Changed the session to count as busy while a run starts, including during
before_agent_starthandlers: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()requiresdeliverAs, 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 inscripts/local-release.mjs. Node >= 22.19 is the only supported runtime. -
Renamed the built-in
/quitcommand to/exit, and the built-in/thinkingcommand to/effort. -
Removed the full screen TUI mode: the
tuiMode,fullscreenExitOutput,fullscreenScrollbar,fullscreenCopyOnSelect, andfullscreenWheelScrollLinessettings, the--tui-modeflag, the fullscreen transcript layout with its search/selection, the fullscreen-only 3D easter egg, and the now-unusedscrollbar*/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
/reloadcommand. 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-indark/lightthemes and their JSON files, custom theme discovery (~/.nanopi/agent/themes,.nanopi/themes), thethemeandthemessettings,--theme/--use-theme/--no-themes, the/settingsTheme submenu andThemeSelectorComponent, the theme file watcher,schemas/theme.schema.json, andSettingsManager.getThemeSetting()/getTheme()/setTheme()/getThemePaths()are gone;.nanopi/themesno longer requires project trust, and first-time setup is analytics-only. The SDK keeps the rendering layer (Themeclass,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 losegetAllThemes()/getTheme()/setTheme(),ResourceLoaderlosesgetThemes(), andexportToHtml()loses itsthemeNameoption. The interactive/reloadslash 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
xhighandmaxto thethinkingBudgetssettings schema, matching the newThinkingBudgetsfields and their 24576/32768-token default budgets. - Added the
@nanopi/pi-extrarun-mode and permission module (newpackages/extraworkspace package,modesbuild flavor component): registered as a hidden inline extension it providesplan/minimal/standardrun modes viatool_callinterception,--yolo,/planand/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 disablemodesalias the module to an inert stub (seescripts/pi-extra-disabled-stub.mjs), leaving no flags, commands, badges, prompts, or bridge endpoints. - Added the
mcp-litebundled 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.jsonconfig layering,/mcpstatus). Its tools register asmcp__*withdefaultActive: false; pi-subagent-mini forwards the extension to children and addsmcp__*to their default tool list when the extra module's mcp switch is on, and the extra module blocksmcp__*calls in main-agent sessions — MCP is subagent-only. Registers theextra/mcp-litebuild 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 asBUILTIN_MODULES(noextra/<name>build flavor components, nodist/extrasshipping, no runtime registration; see the breaking changes above). - Added the
pi-lsp-minibundled extra: zero-dependency LSP integration withlsp_diagnostics,lsp_references,lsp_callgraph,lsp_rename(workspace rename, dry-run by default), andlsp_deletetools plus a/lspserver listing; diagnostics are appended after everywrite/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'slspsubsystem switch. - Added build flavors controlled by the root
buildconfig.json:--flavor <name>/NANOPI_BUILD_FLAVORselects a flavor forscripts/build-coding-agent-bundle.mjs,scripts/build-coding-agent-single-file.mjs, and the coding-agentcopy-assetsstep (nowpackages/coding-agent/scripts/copy-assets.mjs). Flavors toggle peripheral components (webui,export-html,docs,examples, thegoalplaceholder,oauth/*flows) in bundle and single-file builds; the npm packages always publish thefullflavor, 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/webuibrowser UI (ported from AtomCode, MIT) and bridges its/chatSSE transport, models, projects, sessions, skills, and filesystem browsing onto a headlessAgentSession. nanopi runs tools without per-call approval, so the webui approval mode is alwaysbypass - Added webui provider accounts mapped onto
models.json:/configreturns the vendor-preset and protocol catalogs plus the current accounts, and the provider-account CRUD, per-account model, and model-discovery endpoints write through tomodels.jsonand refresh the model runtime, so the settings' add-provider dialog (preset vendors, custom protocols) works. - Added the single-file distribution:
pnpm run build:single-fileproduces a zero-dependencynanopi.js(all JS bundled by esbuild, package assets gzip-embedded and extracted to the user cache directory, lazy OAuth/Bedrock modules statically registered bysrc/standalone/). GitHub releases shipnanopi.jsplus ananopi-sidecars-<version>.tgzasset. - 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/statusresource sections. - Added a
Ctrl+C again to quitfooter 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
/statuscommand 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=1to 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
nextPromptSuggestionssetting (default on, toggle in/settings), generated viaAgentSession.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.jsonnow 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 · ↓ Mhidden-line label sits above the composer. -
Changed the webui server to bridge the extra module:
/approval_modeand the new/extra/*endpoints expose run modes (plan/minimal/standard) and 404 when the build excludes the module,/chatstreamspermission_requestSSE events answered byPOST /chat/permission, andnanopi webuiprints a short one-time pairing code plus URL (exchanged at the unauthenticatedPOST /extra/pair) instead of the long token-in-URL (stubbed builds keep the token URL). Extensions now bind withmode: "webui"in webui sessions, andExtensionModegained"webui". -
Changed the webui model selection to a single source of truth:
/config'sdefault_providerand/models'is_defaultreflect the settings default model (shared with the CLI), and a model picked in the webui persists viasetModel({ persist: true })instead of changing only the current session. -
Changed the
showHardwareCursorsetting to use only the terminal cursor instead of also drawing Pi's reverse-video cursor -
Changed
photon.tswasm 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.json 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 matchingprovider/prefix stripped,provider … thinking …,directory …) with aTip: Use /status …line truncated to the terminal width, and the footer to a singleused xk/yk · / for more detailsline; 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 infull) embed the files innanopi.jsand 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-alignedshelllabel on the footer line; thebashModetheme color is now that yellow shell accent instead of the old editor border green -
Changed the pi-fake-codex
apply_patchalias to be mutually exclusive withedit: whileapply_patchis declared, itsprepareLoadouthook hidesedit's declaration, so requests and the system-prompt tool list and rules carry exactly one editing tool on Codex-impersonated APIs.editstays registered, active, and callable, and its declaration returns automatically wheneverapply_patchis 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
edittool keeps its full usage contract in its declaration with a two-bullet rules summary (theapply_patchalias 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/packagesand the version-keyed cache. Both now carry a content hash (BUNDLED_EXTRA_MARKERgained a second line; the cache gained a.assets-sha256marker) 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.mdin 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 inbefore_agent_startafter 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/*.pngcopy steps incopy-assets/copy-binary-assetsand a leftover Radius OAuth lazy bundle entry in the bundle script -
Fixed the startup
[Extension issues]diagnostics warning that the built-in/statuscommand "conflicts with built-in interactive command": commands from built-in inline extensions (source: "builtin") are intentionally listed inBUILTIN_SLASH_COMMANDSand 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-pathentries of theskillsandpromptssettings, so entries like!~/skills/pdfmatched nothing (#10765) -
Fixed reading or writing
auth.jsonon Windows failing withEPERMwhen 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-cmdandextra/pi-codex-compactbuild 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
/dementedelvescommand, and the Earendil attribution from the Radius login intro and docs. - Removed the
nanopi updatecommand, 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;/sharenow publishes a private GitHub gist and/bugexports 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()andgetBundledInteractiveAssetPath()helpers fromsrc/config.ts, left over from the clankolas.png removal. - Removed the
chat-viewport.tsfullscreen layout module and the fullscreen-only 3D easter-egg components (/arminsayshikeeps the 2D component).