@fractaal/pi-context-window
v0.1.1
Published
Portable per-session and per-model context-window budgets for Pi
Maintainers
Readme
@fractaal/pi-context-window
A portable Pi extension that caps the active model's resolved context window. Pi still owns reserve tokens, compaction, overflow recovery, and continuation.
Commands:
/context-windowshows the current model budget./context-window 128ksets the current session override./context-window defaultclears the session override./context-window-default 128ksets the current model's global default./context-window-default defaultclears that global default.
The session override is persisted in the Pi JSONL. Global defaults are stored
in the same profile directory as models.json, using an atomic local JSON file.
Install and embed
pi install npm:@fractaal/pi-context-windowThe package root exports the compiled extension factory; /contracts exports the public contracts. Pi discovers the shipped TypeScript entry through pi.extensions. These entrypoints and persisted state formats are unchanged by the repository move.
Development and releases
Run npm run typecheck, npm run lint, npm test, npm run build, and npm run test:installed from the monorepo root. The shared Node tests and isolated installed-package acceptance live in packages/goal-x/tests and are included in those commands.
Use the shared release guide and tag context-window-v<version>. This package has its own version and npm Trusted Publisher, even when released in a batch with its siblings.
Version 0.1.1 imports the unchanged runtime of 0.1.0 from fractaal/pi-goal-x@f74698d6a0eb9f78ff80e7adb01c6a9070010804, without private Git history. The original MIT license is retained.
