pi-charm_hyper-provider
Charm Hyper model provider extension for Pi.
Package details
Install pi-charm_hyper-provider from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-charm_hyper-provider- Package
pi-charm_hyper-provider- Version
1.0.8- Published
- Jul 28, 2026
- Downloads
- 494/mo · 45/wk
- Author
- huanghui-dev
- License
- unknown
- Types
- extension
- Size
- 25 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Pi Charm Hyper Provider
Charm Hyper model provider extension for Pi.
Features
- Deterministic Async Model Registration: Pi awaits bounded model discovery during extension startup, so interactive startup and
pi --list-modelsobserve the same catalog. A fallback catalog is used when discovery is unavailable. - Dynamic Pin Protection: Sync parses
settings.jsonduring early startup to dynamically append user-pinned models. This strictly prevents the Pi host from pruning custom or future models (such asglm-4-plus,glm-5.2etc.) from your/modelpin list. - Compact Second-Line Credits Status: Fetches credits on session/model/turn events and every 35 seconds while Charm Hyper is active, caches results for 30 seconds, and merges the balance into Pi's second footer line through the custom compact footer.
Project Structure
pi-charm_hyper-provider/
├── index.ts # Pi extension entry point, provider registration, and compact footer
├── CONTEXT.md # Domain terminology and credits health color thresholds
├── docs/
│ └── adr/
│ └── 0001-merged-provider-with-custom-credits-usage.md # Architectural decision log
├── test/
│ ├── provider.test.ts # Model registration and overrides test suite
│ └── usage.test.ts # Credits monitoring, cache, and layout integration test suite
├── package.json # Extension package configuration with peerDependencies
├── tsconfig.json # TypeScript compiler settings
└── biome.json # Code formatting and lint configuration
Installation
To install the extension globally:
pi install npm:pi-charm_hyper-provider
Testing
Run the native TypeScript unit test suite (Node.js native test runner):
npm run test
Development
We align with the code quality and security standards of the primary pi-main workspace:
- Linter & Formatter: Biome is configured to auto-format and check codebase. We use
tabindentation with a width of3characters. - Commands:
- Check format and Lint:
npm run check - Run tests:
npm test
- Check format and Lint:
License
MIT