aft icon indicating copy to clipboard operation
aft copied to clipboard

aft-pi cannot load on OMP 19.2.0: legacy @earendil-works/pi-tui import (0.67.1 also affected)

Open timothyclin opened this issue 1 week ago • 3 comments

Summary

@cortexkit/aft-pi fails to load under OMP 19.2.0 because it still imports the removed @earendil-works/pi-tui package. OMP rejects the extension at startup, so AFT tools are unavailable. The current npm release, 0.67.1, is also affected.

Environment

  • OMP: 19.2.0 at failure time; 19.2.1 is now installed
  • OS: macOS 27.2.1, arm64
  • Installed plugin: @cortexkit/[email protected]
  • Current npm latest: @cortexkit/[email protected]
  • Plugin path: ~/.omp/profiles/<profile>/plugins

What happened

After OMP updated from 19.1.1 to 19.2.0, OMP logged the following on every startup. It occurs before any model turn:

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

Disabling the plugin removes the error, but AFT tools are then unavailable.

Expected behavior

The extension loads on OMP 19.2.x and registers its tools.

Actual behavior

OMP rejects the extension before its factory runs.

Reproduction

  1. Install @cortexkit/[email protected] (or 0.67.1) into an OMP profile.
  2. Start OMP 19.2.0, for example: omp --profile <profile> -p --no-session --no-lsp --no-pty --tools read "x"
  3. Observe the Failed to load extension error during startup.

The same behavior appears in two independent profiles.

Latest release is also affected

@cortexkit/[email protected] still contains static imports from @earendil-works/pi-tui in package/dist/index.js at lines 26586, 34706, 34712, 35167, and 36423. The imports come from status-dialog.ts, omp-internal-urls.ts, tools/render-helpers.ts, and tools/bash.ts. The package still declares @earendil-works/pi-tui as a peer dependency and the build still externalizes it. Upgrading from 0.66.0 does not resolve the load failure.

Upstream context

OMP 19.2.0 lists the extension UI migration as a breaking change: https://github.com/can1357/oh-my-pi/releases/tag/v19.2.0

OMP issue #20517 confirms that the legacy package is no longer supported: https://github.com/can1357/oh-my-pi/issues/20517

Migration guide: https://github.com/can1357/oh-my-pi/blob/main/docs/extensions.md#migrating-from-pi-tui

Sanitized logs

Only the loader-error records are included. User name, home path, profile name, PID, and unrelated fields are removed.

{"timestamp": "2026-11-25T12:53:42.966-05:00", "level": "error", "message": "Failed to load extension", "path": "~/.omp/profiles/<profile-a>/plugins/node_modules/@cortexkit/aft-pi/dist/index.js", "error": "Failed to load extension: ~/.omp/profiles/<profile-a>/plugins/node_modules/@cortexkit/aft-pi/dist/index.js 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."}
{"timestamp": "2026-11-25T13:02:27.983-05:00", "level": "error", "message": "Failed to load extension", "path": "~/.omp/profiles/<profile-b>/plugins/node_modules/@cortexkit/aft-pi/dist/index.js", "error": "Failed to load extension: ~/.omp/profiles/<profile-b>/plugins/node_modules/@cortexkit/aft-pi/dist/index.js 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."}

Workaround

Disable the extension with omp --profile <profile> plugin disable @cortexkit/aft-pi, or stay on OMP 19.1.1 until a compatible release is available.

Diagnostics

I did not run npx @cortexkit/aft@latest doctor --issue because the failure occurs in OMP's extension loader before AFT starts. I can provide that output from an environment with the extension enabled if it would help.

timothyclin avatar Nov 25 '26 18:11 timothyclin

Thanks for the clear report and the links, @timothyclin. Confirmed: @cortexkit/aft-pi still imports @earendil-works/pi-tui, which OMP 19.2 no longer provides, so OMP refuses to load it. 0.67.1 and the 0.68.0 release going out now both have the same problem.

We're fixing it so one aft-pi build loads on both OMP 19.2 and upstream Pi. We'll check it on both hosts before it ships, and we'll post here when the fixed release is out. Until then, your workaround is right: stay on OMP 19.1.1, or disable the extension.

aft-alfonso[bot] avatar Nov 25 '26 18:11 aft-alfonso[bot]

Confirming this on Linux x64 as well, not just macOS: OMP 19.2.1, installed @cortexkit/[email protected]. Running omp plugin upgrade @cortexkit/aft-pi installs 0.68.0 and then fails extension validation with the same @earendil-works/pi-tui import; the upgrade rolls back and leaves 0.66.0 installed.

Verified the 0.68.0 tarball still imports @earendil-works/pi-tui from dist/index.js (lines 26605, 34735, 34741, 35196, 36452) and still declares it as a peer dependency, so the failure is not platform-specific.

Qiiks avatar Nov 26 '26 04:11 Qiiks

@cortexkit/aft-pi 0.68.1 is out with the fix. It no longer imports @earendil-works/pi-tui, so it loads on oh-my-pi 19.2, and it still loads on upstream Pi. Before release we checked on both hosts that all AFT tools register and the status dialog opens and closes.

To update, run omp plugin upgrade @cortexkit/aft-pi, then start a new oh-my-pi session.

One difference remains. oh-my-pi 19.2 also stopped exporting the diff renderer, so on oh-my-pi AFT's diffs are colored and numbered by line. Upstream Pi keeps word-level highlighting.

Thanks, @timothyclin, for the report and the links, and @Qiiks for confirming it on Linux. I'm closing this now. If 0.68.1 still fails to load for you, comment here and we'll reopen it.

aft-alfonso[bot] avatar Nov 26 '26 18:11 aft-alfonso[bot]