Highlights
Direct transport now works with extension-registered providers (#298, thanks @Zaldaryon): review, flush, correction, and consolidation completions called pi-ai's global completeSimple, which only resolves builtin api ids. A model whose provider comes from pi.registerProvider() (for example kiro/*) failed with No API provider registered for api: kiro-api and always fell back to the subprocess. The direct call now streams through ctx.modelRegistry.streamSimple (added in Pi 0.86.0, earendil-works/pi#8964) when the host provides it, and keeps the global call as the fallback for older hosts. The peer range is unchanged.
Provider failures keep their cause (#299): Pi reports provider failures as an error message, not a throw. The direct path only re-threw auth rejections, so every other error fell through to the parser and settled as parse_error with no error text, hiding the cause in the "failed in both transports" warning. Any stopReason: "error" now settles as provider_error carrying Pi's errorMessage; auth rejections still take the rotation retry first. On a host without ModelRegistry.streamSimple (Pi before 0.86.0), No API provider registered for api: … now says the provider is registered by an extension and to upgrade Pi to 0.86.0 or later. Fallback behaviour is unchanged: both reasons already fell back to the subprocess. An error response that still carried parseable content is no longer applied, so a failed response cannot write memory.
Memory subprocess children are locked down (#280, thanks @dawidmachon, closes #275; #288): the pi -p --no-session fallback shared by background review, session flush, correction save, and consolidation ran with Pi's full default toolset inside the session's working directory. A weak llmModelOverride model could wander out of memory operations and edit project files with nothing to correlate the edits against.
- Child argv now carries
--tools memory_add,memory_replace,memory_remove, enforced by Pi's tool registry (built-in and extension tools alike) at the single argv choke point both builders share, so the retry-without-overrides path is covered too. The tool names live in one shared constant (MEMORY_WRITE_TOOL_NAMES) consumed by both tool registration and the child argv, with a drift test, because Pi silently ignores unknown--toolsnames. - Children no longer receive the injected
<memory-policy>block, which namedmemory_search,session_search, andskill_manage, all hidden by the allowlist. The watchdog marks every memory child withPI_HERMES_MEMORY_CHILD=1andbefore_agent_startskips the policy block for children in every style. Standing instructions still apply and legacy-inject mode is unchanged. - The child argv also carries
--exclude-tools mcp__*, because on Pi 1.0.4+--toolskeeps MCP tools unless an entry starts withmcp__. It is inert on older Pi.--no-mcpis not used, because Pi before 1.0.4 exits on the unknown option. - The child's working directory is unchanged, so project-scoped memory writes still bind correctly.
Fixed
- Real consolidation errors are no longer hidden behind model-scope warnings (#278, thanks @ZeR020): consolidation children use
--no-extensionsbut still resolveenabledModels, so their stderr could begin with harmlessWarning: No models match pattern …lines that filled the diagnostic excerpt. A sharedcleanChildStderrhelper strips ANSI and omits only those startup warning lines (warning-only output is preserved), and consolidation and background-review diagnostics now use it. - Ephemeral review sessions are pruned on every platform (#279, thanks @joshua-zyy, closes #266):
pruneEphemeralReviewSessions()hardcoded the Linux/tmp/pi-hermes-prompt-prefix, so on Windows and macOS (per-boot/var/folders/…temp dirs) it matched nothing. It now matches thepi-hermes-prompt-…/prompt.mdattachment wrapper separator-agnostically on user messages, and no longer depends onCOUNT(*) = 1, which missed child sessions with an indexed reply. On one real 1,506-session Windows index the old query matched 0 rows where 52 carried the marker. - Multi-line mirror entries lose their metadata comment (#283, thanks @Arteiimis, closes #282):
parseMetadataCommentin the SQLite mirror lacked thesregex flag, so an entry whose body contained a newline kept its<!-- created=…, last=…, project64=… -->comment incontentand lost its project scope. On a real 128-row store, 6 rows had the comment leaked, exactly the 6 multi-line entries.
Performance
- Memory lookups are indexed by scope and content (#293, thanks @Awlaursen, closes #292):
reconcileMarkdownMemoryScoperuns onesyncMemoryEntrylookup per Markdown entry inside a single transaction. With only single-column indexes each lookup scanned a wholetarget/categoryslice, holding the write lock past the 5,000 msbusy_timeout(6,367 ms seen during onememory_add) and making live indexing in other processes fail withdatabase is locked. New indexidx_memories_scope_content ON memories(target, project, category, content), created for new databases and added on every open for existing ones. On a 418 MB copy with 16,471 memory rows, the largest failure scope alone went from 28,193 ms to a total of 246–806 ms across all 10,444 failure lookups; building the index takes about 0.3 s.
Release engineering
- Automated publishing with npm trusted publishing (#289):
publish.ymlruns verify (tag↔package.jsonguard, prerelease guard,npm ci,tsc,npm test,npm run check:production) →npm publishvia OIDC with provenance → GitHub Release, triggered by av*tag, a published GitHub Release, or dispatch.release.yml("Prepare release") bumps the version, promotes the changelog, tags, and dispatches the publish.scripts/check-production-install.mjsno longer crashes on npm 12's changednpm pack --jsonshape. Seedocs/PUBLISHING.md.
Tests
- 59 of 59 test files pass;
tscandnpm run check:productionare clean. - New regression tests: registry streaming for an api id absent from the global registry (and
streamSimplestays bound to the registry), error-response cause and upgrade hint, child--tools/--exclude-toolsargv on every shape plus a registration drift test, a real watchdog spawn reading back the child marker,EXPLAIN QUERY PLANcoverage for all four NULL/non-NULL scope combinations, multi-line mirror metadata, cross-platform ephemeral session pruning, and model-scope warning stripping.
Contributors
- @Zaldaryon — direct transport for extension providers (#298)
- @dawidmachon — memory child tool allowlist (#280)
- @joshua-zyy — cross-platform ephemeral session pruning (#279)
- @Arteiimis — multi-line mirror metadata (#283)
- @Awlaursen — scope/content memory index (#293)
- @ZeR020 — consolidation stderr warnings (#278)
Full changelog: v0.9.10...v0.9.11