@oh-my-pi/pi-coding-agent 16.1.2 → 16.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/dist/cli.js +3046 -3047
  3. package/dist/types/config/model-resolver.d.ts +3 -3
  4. package/dist/types/mnemopi/embed-client.d.ts +70 -0
  5. package/dist/types/mnemopi/embed-protocol.d.ts +52 -0
  6. package/dist/types/mnemopi/embed-worker.d.ts +12 -0
  7. package/dist/types/mnemopi/state.d.ts +9 -1
  8. package/dist/types/session/agent-storage.d.ts +2 -0
  9. package/dist/types/session/auth-broker-config.d.ts +3 -2
  10. package/dist/types/session/history-storage.d.ts +1 -1
  11. package/dist/types/tools/image-gen.d.ts +2 -2
  12. package/dist/types/utils/image-loading.d.ts +1 -1
  13. package/dist/types/utils/ipc.d.ts +22 -0
  14. package/dist/types/web/search/providers/perplexity-auth.d.ts +37 -0
  15. package/package.json +12 -12
  16. package/src/cli.ts +8 -0
  17. package/src/commands/token.ts +52 -33
  18. package/src/config/append-only-context-mode.ts +45 -0
  19. package/src/config/model-discovery.ts +3 -0
  20. package/src/config/model-registry.ts +21 -3
  21. package/src/config/model-resolver.ts +31 -8
  22. package/src/discovery/builtin-rules/ts-no-return-type.md +0 -1
  23. package/src/lsp/client.ts +24 -0
  24. package/src/mnemopi/backend.ts +49 -3
  25. package/src/mnemopi/embed-client.ts +401 -0
  26. package/src/mnemopi/embed-protocol.ts +35 -0
  27. package/src/mnemopi/embed-worker.ts +113 -0
  28. package/src/mnemopi/state.ts +29 -1
  29. package/src/modes/components/custom-editor.ts +1 -1
  30. package/src/modes/components/model-selector.ts +2 -2
  31. package/src/modes/components/welcome.ts +1 -1
  32. package/src/modes/controllers/event-controller.ts +8 -0
  33. package/src/modes/controllers/selector-controller.ts +2 -2
  34. package/src/modes/theme/theme.ts +69 -0
  35. package/src/sdk.ts +4 -0
  36. package/src/session/agent-session.ts +8 -0
  37. package/src/session/agent-storage.ts +14 -0
  38. package/src/session/auth-broker-config.ts +2 -1
  39. package/src/session/history-storage.ts +13 -1
  40. package/src/stt/asr-client.ts +2 -7
  41. package/src/tiny/title-client.ts +2 -7
  42. package/src/tools/image-gen.ts +4 -8
  43. package/src/tools/render-utils.ts +4 -1
  44. package/src/tts/tts-client.ts +2 -7
  45. package/src/utils/image-loading.ts +12 -2
  46. package/src/utils/ipc.ts +38 -0
  47. package/src/web/search/providers/perplexity-auth.ts +133 -0
  48. package/src/web/search/providers/perplexity.ts +2 -125
package/CHANGELOG.md CHANGED
@@ -2,6 +2,35 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [16.1.3] - 2026-06-19
6
+
7
+ ### Changed
8
+
9
+ - Refactored Perplexity authentication logic to prioritize cookies over OAuth in search operations
10
+ - Updated `token` command to correctly display active Perplexity OAuth tokens when present
11
+
12
+ ### Fixed
13
+
14
+ - Enabled auto-retry for AI "thinking loop" errors encountered during model inference
15
+ - Cleared stale error banners automatically when triggered by an auto-retry recovery phase
16
+ - Preserved bundled `omitMaxOutputTokens` policy when fresh cached provider discovery rows replace Ollama Cloud catalog models, so stale `models.db` entries cannot re-enable context-window-sized `num_predict` values. ([#2984](https://github.com/can1357/oh-my-pi/issues/2984))
17
+ - Normalized cached-only Ollama Cloud discovery rows to omit on-the-wire output-token caps even when the cached model id has no bundled catalog entry. ([#2984](https://github.com/can1357/oh-my-pi/issues/2984))
18
+ - Fixed Ollama, LM Studio, and llama.cpp (plus loopback vLLM / sglang servers) reprocessing the full prompt on every turn because `provider.appendOnlyContext: auto` only recognized DeepSeek and Xiaomi as prefix-cache providers. The auto-detect now enables append-only mode for `ollama`, `ollama-cloud`, `lm-studio`, `llama.cpp`, and any baseUrl resolving to a loopback/RFC1918/`.local` host, so the system prompt + tool catalogue + prior-turn message bytes stay byte-stable across turns and llama.cpp's KV-cache prefix reuse can hit ([#3033](https://github.com/can1357/oh-my-pi/issues/3033)).
19
+ - Isolated mnemopi's local embedding provider in a dedicated `Bun.spawn` subprocess so `onnxruntime-node` and `fastembed` never load into the main agent process. Previously `memory.backend: mnemopi` crashed Bun on Windows — standalone binaries faulted in the NAPI `process.dlopen` constructor at session start, npm installs faulted in the NAPI finalizer at process teardown. Mirrors the tiny-model isolation pattern from [#1607](https://github.com/can1357/oh-my-pi/pull/1607); the parent SIGKILLs the child on dispose so the destructor never runs in either address space ([#3031](https://github.com/can1357/oh-my-pi/issues/3031)).
20
+ - Fixed image tool registration resolving image provider credentials during session startup, so broken or slow `google-antigravity` OAuth state no longer blocks sessions that never invoke `generate_image` ([#3036](https://github.com/can1357/oh-my-pi/issues/3036)).
21
+ - Fixed LSP client returning `-32601 Method not found` for defined server→client requests (`window/showMessageRequest`, `window/showDocument`, `workspace/{semanticTokens,inlayHint,codeLens,codeAction,diagnostic}/refresh`). Servers that stall waiting for a real reply (same failure mode as #3029) now receive the spec no-op result ([#3044](https://github.com/can1357/oh-my-pi/issues/3044)).
22
+ - Fixed WebP images being sent unchanged to `local-server` vision models, which can fail through llama.cpp/STB-backed decoders that do not support WebP ([#2922](https://github.com/can1357/oh-my-pi/issues/2922)).
23
+ - Made `getSettingsListTheme`, `getEditorTheme`, `getSelectListTheme`, and `getSymbolTheme` return a plain ASCII fallback instead of crashing with "undefined is not an object (evaluating 'theme.fg')" when the global `theme` is undefined — e.g. when a plugin calls them before `initTheme()` completes or from a separate module instance under npm-global installs. ([#2998](https://github.com/can1357/oh-my-pi/issues/2998))
24
+ - Hardened TTS, STT, and tiny-title worker IPC `send()` paths against async EPIPE rejections: `Subprocess.send()` is now wrapped so neither a synchronous "process exited" throw nor an asynchronous EPIPE rejection (when the pipe breaks between exit being observed and the next send) can escape as a fatal unhandled rejection. A dying Kokoro/TTS/STT worker can no longer crash the whole agent session mid-task. ([#2997](https://github.com/can1357/oh-my-pi/issues/2997))
25
+ - Fixed Windows test failures caused by path handling: tests now use `pathToFileURL`, `path.resolve`, and `path.join` instead of hard-coded POSIX paths; `shortenPath()` normalizes backslashes to forward slashes after `~` and respects home directory boundaries; shell-escaped interpolated paths in bash tool tests to prevent Git Bash eating backslashes
26
+ - Fixed `HistoryStorage.resetInstance()` leaking its SQLite database handle on Windows by adding a `#close()` method that finalizes all prepared statements and closes the database; `AgentStorage` gained the same `resetInstance()`/`#close()` pattern
27
+ - Fixed `createAgentSession` leaking the internally-created `AuthStorage` when session construction fails before the session takes ownership, causing EBUSY on Windows temp dir cleanup
28
+ - Fixed `MnemopiBackend.removeDbFiles()` throwing on Windows when the database handle is still being released; it is now truly best-effort (logs failures instead of silently swallowing)
29
+ - Fixed Windows EBUSY test failures by replacing raw `fs.rmSync`/`fs.rm` cleanup with `TempDir` (which retries) and best-effort `.catch(() => {})` where SQLite handles outlive the test
30
+ - Fixed `TempDir` prefix convention: non-`@` prefixes created temp dirs relative to cwd instead of `os.tmpdir()`, causing module resolution failures on Windows
31
+ - Fixed git line-ending mismatches in autoresearch tests by setting `core.autocrlf false` in test repo initialization
32
+ - Fixed Bedrock inference-profile ARN models being dropped from the allowed-model set when models were scoped via `enabledModels`, the SDK, or ACP, so an accepted ARN no longer resolves to an empty selection. ([#3006](https://github.com/can1357/oh-my-pi/pull/3006))
33
+
5
34
  ## [16.1.2] - 2026-06-19
6
35
 
7
36
  ### Added
@@ -12099,4 +12128,4 @@ Initial public release.
12099
12128
 
12100
12129
  ## [0.7.6] - 2025-11-13
12101
12130
 
12102
- Previous releases did not maintain a changelog.
12131
+ Previous releases did not maintain a changelog.