Files
oh-my-pi/packages/coding-agent
can1357 efd5343388 fix(coding-agent): break circular import via lazy pi-ref
The four extension/hook/custom-tool/custom-command loaders statically
imported the package barrel `@oh-my-pi/pi-coding-agent` to expose it as
`pi` to user code. This created a self-referential cycle:

  tools/index -> task -> sdk -> custom-commands/loader
    -> @oh-my-pi/pi-coding-agent (package barrel)
    -> modes/components -> tool-execution -> renderers
    -> tools/read (TDZ on readToolRenderer)

Triggered at startup by 'omp --help' / 'omp stats --help' depending on
ESM evaluation order, manifesting as:

  ReferenceError: Cannot access 'readToolRenderer' before initialization

Introduce `extensibility/pi-ref.ts` that resolves the barrel lazily via
`require` on first call. All four loaders use `getPiRef()` instead of a
static `import * as piCodingAgent`. The barrel is fully initialized by
the time any loader function actually runs, so the lookup is safe.
2026-04-07 21:16:48 +02:00
..
2026-01-03 14:53:38 +01:00
2026-04-07 05:54:45 +02:00

@oh-my-pi/pi-coding-agent

Core implementation package for the omp coding agent in the oh-my-pi monorepo.

For installation, setup, provider configuration, model roles, slash commands, and full CLI reference, see:

Package-specific references: