plannotator icon indicating copy to clipboard operation
plannotator copied to clipboard

Pi extension: OMP 19.2.0 rejects legacy pi-tui import (tested on 0.29.3)

Open JasonLandbridge opened this issue 1 week ago • 3 comments

Summary

@plannotator/[email protected] fails to load in Oh My Pi (OMP) after upgrading OMP from 19.1.1 to 19.2.0. The host deliberately rejects the extension's legacy Pi TUI import after its reactive UI migration.

Environment

  • Arch Linux x86_64
  • OMP binary package: oh-my-pi-bin 19.2.0-2 (previously 19.1.1-1)
  • Extension tested: @plannotator/pi-extension 0.29.3
  • npm lists 0.29.4, but that version has NOT been tested for this issue; this report does not claim it reproduces on 0.29.4.

Reproduction and actual result

Start OMP 19.2.0 with the extension installed. It reports a load failure, so the extension is unavailable. Obtain the untruncated host-loader diagnostic with:

omp models ls --json >/tmp/omp-models.json 2>/tmp/omp-extension-errors.log
cat /tmp/omp-extension-errors.log

The OMP loader reports that @plannotator/pi-extension/index.ts:

imports "@earendil-works/pi-tui", which omp no longer provides: its component API was replaced by the reactive @oh-my-pi/pi-tui.

The installed entry point imports Key from @earendil-works/pi-tui. This is the confirmed OMP load failure. A standalone Bun import also reported a missing Type export from the locally installed @earendil-works/pi-ai, but that is a different resolution path and is not presented as the cause of OMP's warning.

Expected result / requested compatibility work

Support the OMP 19.2 UI contract while preserving upstream Pi support, or document a supported OMP version range. If 0.29.4 already contains the migration, please point to that fix.

OMP's changes include new renderer/custom UI contracts, removal of editor-component APIs, and rejection of legacy TUI imports. Please check transitive imports as well as the entry point and verify loading through OMP itself, not only a standalone Bun import.

References:

Workaround

The reporter downgraded OMP to the previously working version and held updates while waiting. No extension source files were patched.

JasonLandbridge avatar Nov 25 '26 12:11 JasonLandbridge

Confirming this on the npm-installed 0.29.3 package as well.

  • package.json exposes pi.extensions: ["./"], so OMP loads index.ts.
  • index.ts imports Key from @earendil-works/pi-tui and registers Key.ctrlAlt("p").
  • The published 0.29.4 entry still imports @earendil-works/pi-tui, so upgrading to 0.29.4 does not avoid the OMP 19.2 loader rejection.
  • Calling OMP's loadExtensions() directly against the installed 0.29.3 entry reproduces the same legacy pi-tui import failure.

Temporary local workaround: remove the @earendil-works/pi-tui import and the pi.registerShortcut(Key.ctrlAlt("p"), ...) block. After that, OMP loadExtensions() binds the extension successfully (errors: [], extensions: 1) when the Ctrl+Alt+P shortcut is not needed.

This unblocks a local install, but the upstream fix likely needs to migrate the shortcut/UI usage to the current OMP API or make that registration conditional.

cuipengfei avatar Nov 25 '26 15:11 cuipengfei

Getting the same error:

> omp plugin upgrade @plannotator/pi-extension
Failed to upgrade @plannotator/pi-extension: Plugin @plannotator/pi-extension extension validation failed:
/Users/oscar/.omp/plugins/node_modules/@plannotator/pi-extension/index.ts: Failed to load extension: /Users/oscar/.omp/plugins/node_modules/@plannotator/pi-extension/index.ts imports "@earendil-works/pi-tui", which omp no longer provides: its component API was replaced by the reactive @oh-my-pi/pi-tui. Return pi-tui nodes (JSX from "@oh-my-pi/pi-tui") or a { render(width): string[] } rows object from renderers, ctx.ui.custom and ctx.ui.setWidget; replace ctx.ui.setEditorComponent with the ctx.ui.composer hooks; import Theme types from "@oh-my-pi/pi-coding-agent". See docs/extensions.md#migrating-from-pi-tui.

omederos avatar Nov 25 '26 18:11 omederos

Confirming this still reproduces with @plannotator/[email protected] on OMP 19.2.1: the published index.ts still has import { Key } from "@earendil-works/pi-tui"; (line 27), and OMP rejects it with the same "which omp no longer provides" diagnostic.

servaasvdc avatar Nov 25 '26 18:11 servaasvdc