← Catalog

@leo-alvarenga/pi-ext-core

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

Extension

Install

Install with PiG

pig install npm:@leo-alvarenga/pi-ext-core

Install with Pi

pi install npm:@leo-alvarenga/pi-ext-core
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

README

Written by the package's publisher, shown as published in version 0.8.0 (README.md). PiG does not review it.

@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

ExportDescription
typesStatusUi, PANEL_STATE_ICON, TokenUsage
utils/stringscapitalize, truncateChars, truncateBytes, formatTokens, formatDuration
session/storecreateSessionStore<T>
tui/panelcreatePanelWidget<T>

License

MIT