omp packages

@leo-alvarenga/pi-ext-core0.8.0

Shared building blocks for pi extensions: types, utils, session store, and panel widget

leo-alvarenga Published 7 days ago MIT ~722 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

@leo-alvarenga/pi-ext-core

Shared building blocks for pi extensions: types, utilities, session store, and TUI panel widget.

Installation

pnpm add @leo-alvarenga/pi-ext-core

Peer dependencies (all bundled in every pi installation):

pnpm add -D @earendil-works/pi-coding-agent @earendil-works/pi-tui

Usage

import {
  createSessionStore,
  createPanelWidget,
} from "@leo-alvarenga/pi-ext-core";

const store = createSessionStore<MyState>(pi, "my.entry", defaultState);
const panel = createPanelWidget(pi, store, panelSpec);

Surface note

This lib ships .ts sources and is designed for pi's jiti loader: no compile step required for pi consumers. It is not importable by plain Node without a loader.

Modules

Export Description
types StatusUi, PANEL_STATE_ICON, TokenUsage
utils/strings capitalize, truncateChars, truncateBytes, formatTokens, formatDuration
session/store createSessionStore<T>
tui/panel createPanelWidget<T>

License

MIT