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

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 (65) hide show
  1. package/CHANGELOG.md +44 -1
  2. package/dist/cli.js +2990 -2991
  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/modes/components/cache-invalidation-marker.d.ts +23 -10
  9. package/dist/types/modes/components/status-line/component.d.ts +2 -3
  10. package/dist/types/sdk.d.ts +12 -0
  11. package/dist/types/session/agent-session.d.ts +2 -0
  12. package/dist/types/session/agent-storage.d.ts +2 -0
  13. package/dist/types/session/auth-broker-config.d.ts +3 -2
  14. package/dist/types/session/history-storage.d.ts +1 -1
  15. package/dist/types/session/tool-choice-queue.d.ts +2 -0
  16. package/dist/types/tools/image-gen.d.ts +2 -2
  17. package/dist/types/tools/index.d.ts +2 -0
  18. package/dist/types/tui/hyperlink.d.ts +3 -2
  19. package/dist/types/utils/image-loading.d.ts +1 -1
  20. package/dist/types/utils/ipc.d.ts +22 -0
  21. package/dist/types/web/search/providers/perplexity-auth.d.ts +37 -0
  22. package/package.json +12 -12
  23. package/src/cli/bench-cli.ts +33 -2
  24. package/src/cli/dry-balance-cli.ts +4 -2
  25. package/src/cli.ts +8 -0
  26. package/src/commands/token.ts +52 -33
  27. package/src/config/append-only-context-mode.ts +45 -0
  28. package/src/config/model-discovery.ts +3 -0
  29. package/src/config/model-registry.ts +21 -3
  30. package/src/config/model-resolver.ts +31 -8
  31. package/src/discovery/builtin-rules/ts-no-return-type.md +0 -1
  32. package/src/extensibility/plugins/manager.ts +82 -22
  33. package/src/lsp/client.ts +24 -0
  34. package/src/mnemopi/backend.ts +49 -3
  35. package/src/mnemopi/embed-client.ts +401 -0
  36. package/src/mnemopi/embed-protocol.ts +35 -0
  37. package/src/mnemopi/embed-worker.ts +113 -0
  38. package/src/mnemopi/state.ts +29 -1
  39. package/src/modes/components/cache-invalidation-marker.ts +31 -15
  40. package/src/modes/components/custom-editor.test.ts +4 -3
  41. package/src/modes/components/custom-editor.ts +1 -1
  42. package/src/modes/components/model-selector.ts +2 -2
  43. package/src/modes/components/status-line/component.ts +64 -18
  44. package/src/modes/components/welcome.ts +1 -1
  45. package/src/modes/controllers/event-controller.ts +8 -0
  46. package/src/modes/controllers/selector-controller.ts +2 -2
  47. package/src/modes/theme/theme.ts +69 -0
  48. package/src/sdk.ts +37 -0
  49. package/src/session/agent-session.ts +13 -0
  50. package/src/session/agent-storage.ts +14 -0
  51. package/src/session/auth-broker-config.ts +2 -1
  52. package/src/session/history-storage.ts +13 -1
  53. package/src/session/tool-choice-queue.ts +6 -0
  54. package/src/stt/asr-client.ts +2 -7
  55. package/src/tiny/title-client.ts +2 -7
  56. package/src/tools/image-gen.ts +4 -8
  57. package/src/tools/index.ts +2 -0
  58. package/src/tools/render-utils.ts +4 -1
  59. package/src/tools/resolve.ts +1 -0
  60. package/src/tts/tts-client.ts +2 -7
  61. package/src/tui/hyperlink.ts +6 -3
  62. package/src/utils/image-loading.ts +12 -2
  63. package/src/utils/ipc.ts +38 -0
  64. package/src/web/search/providers/perplexity-auth.ts +133 -0
  65. package/src/web/search/providers/perplexity.ts +2 -125
package/CHANGELOG.md CHANGED
@@ -2,6 +2,49 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [16.1.4] - 2026-06-19
6
+
7
+ ### Fixed
8
+
9
+ - Fixed `omp bench` and `omp dry-balance` failing to resolve models from extension providers
10
+ - Improved error reporting for `omp bench` runs that return no output or tokens
11
+ - Cache-miss marker no longer fires on a cold turn whose predecessor only *wrote* the prompt cache (never read it back). The session's opening request always writes the prefix with `cacheRead 0`, so a long-running first tool call (e.g. `gh run watch`) that outlived the provider's cache TTL surfaced a spurious `⊘ cache miss` divider right under the opening message. The marker now requires the previous turn to have actually read a warm prefix, so it flags only a demonstrably working cache going cold — and collapses a run of consecutive cold turns to a single marker at the moment the cache broke.
12
+ - Fixed `omp bench` and `omp dry-balance` failing to resolve models from extension-registered providers (`pi.registerProvider(...)`). Both commands build a one-shot `ModelRegistry` that previously only knew built-in catalog providers, so a `provider/model` selector for a provider contributed by an extension under `~/.omp/agent/extensions/` errored with "Model not found". A new `loadCliExtensionProviders` helper loads the session's extensions, drains their provider registrations into the registry, and discovers dynamic provider catalogs before resolving selectors — mirroring the interactive session and `omp models` paths.
13
+ - `omp bench` now reports a run that streamed no content and measured no output tokens as a failure ("provider returned no output") instead of a misleading green check with `tokens 0 / TPS 0.0`.
14
+ - Cleared stale pending-preview gates when `resolve` finds no runnable handler, and forwarded the missing `peekPendingInvoker` and `clearPendingInvokers` hooks on the production session so staged previews actually reach the resolve tool and the gate drains on dispatch failure. ([#3061](https://github.com/can1357/oh-my-pi/issues/3061))
15
+ - Deferred status-line usage refreshes off the render path and timeboxed the startup fetch so slow Anthropic quota lookups no longer block interactive startup. ([#3057](https://github.com/can1357/oh-my-pi/issues/3057))
16
+ - Fixed image paste placeholders falling through to terminal hyperlink settings before `Settings.init()`, so early editor rendering falls back to plain text instead of crashing. ([#3064](https://github.com/can1357/oh-my-pi/issues/3064))
17
+ - Fixed `omp plugin install github:owner/repo` silently keeping the user on a stale commit when re-run on an already-installed GitHub plugin. `bun install <spec>` respects the existing `bun.lock` pin when the spec is unchanged and never re-resolves the remote ref, so the manager now follows a git re-install with `bun update <name>` to refresh the lockfile pin against the upstream. The install transaction also snapshots `bun.lock` up front and routes feature validation, extension validation, and runtime-config save through one rollback path so a failed install can never leave the rejected commit pinned in the active tree or lockfile. First-time installs are unaffected. ([#3063](https://github.com/can1357/oh-my-pi/issues/3063))
18
+
19
+ ## [16.1.3] - 2026-06-19
20
+
21
+ ### Changed
22
+
23
+ - Refactored Perplexity authentication logic to prioritize cookies over OAuth in search operations
24
+ - Updated `token` command to correctly display active Perplexity OAuth tokens when present
25
+
26
+ ### Fixed
27
+
28
+ - Enabled auto-retry for AI "thinking loop" errors encountered during model inference
29
+ - Cleared stale error banners automatically when triggered by an auto-retry recovery phase
30
+ - 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))
31
+ - 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))
32
+ - 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)).
33
+ - 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)).
34
+ - 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)).
35
+ - 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)).
36
+ - 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)).
37
+ - 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))
38
+ - 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))
39
+ - 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
40
+ - 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
41
+ - Fixed `createAgentSession` leaking the internally-created `AuthStorage` when session construction fails before the session takes ownership, causing EBUSY on Windows temp dir cleanup
42
+ - 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)
43
+ - 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
44
+ - Fixed `TempDir` prefix convention: non-`@` prefixes created temp dirs relative to cwd instead of `os.tmpdir()`, causing module resolution failures on Windows
45
+ - Fixed git line-ending mismatches in autoresearch tests by setting `core.autocrlf false` in test repo initialization
46
+ - 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))
47
+
5
48
  ## [16.1.2] - 2026-06-19
6
49
 
7
50
  ### Added
@@ -12099,4 +12142,4 @@ Initial public release.
12099
12142
 
12100
12143
  ## [0.7.6] - 2025-11-13
12101
12144
 
12102
- Previous releases did not maintain a changelog.
12145
+ Previous releases did not maintain a changelog.