Skip to main content
5

pi-agent-extensions (dsh-autocompact)

5aaee9/pi-agent-extensions/dsh-autocompact

Set an earlier automatic-compaction threshold per model on DeepSeek Harness: /autocompact writes a session-only override keyed by exact provider/model (off falls back to the backend defaults, default clears it), a Settings → Autocompact page manages the persisted per-model thresholds every session inherits, and a composer status entry shows the current reading.

Install

dsh plugin --profile web add github:5aaee9/pi-agent-extensions

This plugin lives in the dsh-autocompact subdirectory of the repository.

README

pi-agent-extensions

A collection of extensions for the pi coding agent, and for the dsh (DeepSeek Harness) coding agent.

Packages

PackageDescription
@indexyz/pi-provider-sub2apiDynamic provider support, model metadata discovery, quota reporting, and saved request modes for Sub2API-compatible relays.
@indexyz/pi-custom-providerGeneric OpenAI Chat Compatible, Anthropic Messages, OpenAI Responses, and Ollama providers with model discovery and caching.
@indexyz/pi-continueResume an interrupted or failed turn with pi's currently selected model.
@indexyz/pi-skillCodex-style $skill-name invocation anywhere in a prompt.
@indexyz/pi-model-traceAttribute the model actually serving pi via ModelTrace numeric fingerprinting (/model-trace).
@indexyz/pi-autocompactSession-only per-model context compaction thresholds via /autocompact 300k, with optional global defaults.
@indexyz/dsh-autocompactThe same thresholds for dsh: a /autocompact command, a Settings section, and a composer status entry.
@indexyz/dsh-custom-provider-reasoning-effortsDeclare reasoningEfforts for hand-written dsh provider routes the pi-ai catalog does not describe.

Install a package from npm:

pi install npm:@indexyz/pi-provider-sub2api
pi install npm:@indexyz/pi-custom-provider
pi install npm:@indexyz/pi-continue
pi install npm:@indexyz/pi-skill
pi install npm:@indexyz/pi-model-trace
pi install npm:@indexyz/pi-autocompact

A dsh-<topic>/ package is installed into a dsh profile instead, and its command line, configuration, and behavior are documented in its own README:

dsh plugin --profile web add @indexyz/dsh-autocompact

Releases

Each package is versioned and released independently. A release of one package publishes only that package, and each published version is tagged @indexyz/<name>@<version> (for example @indexyz/pi-skill@0.1.43) with a GitHub Release carrying that version's changelog section. Every package's history is in its own CHANGELOG.md. The release procedure is docs/releases.md.

Layout

The repository root is a private npm workspace that holds shared tooling and documentation only. Each package lives in its own root-level directory with its own package.json, tsconfig.json, vitest.config.ts, tests, and changelog: pi-<topic>/ for a pi extension, dsh-<topic>/ for a dsh package, which builds its own artifacts from TypeScript because the Harness loads built files rather than sources. See docs/architecture.md.

Development

npm install
npm run format
npm run check
pi -e ./pi-provider-sub2api/index.ts

npm run check runs the format check, lint, every package's typecheck, the build step of every package that declares one, every package's tests, and the release-script tests. Try a pi package from a checkout with pi -e ./<name>/index.ts.

Contributors and coding agents start with AGENTS.md, which links the rest of docs/.

License

MIT

Related plugins