← Catalog

pi-digest

Pi extension that speaks a short digest of every turn through the platform speech engine or a custom command template

Package

Install

Install with PiG

pig install npm:pi-digest

Install with Pi

pi install npm:pi-digest
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.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./src/extension.ts"
  ]
}

README

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

pi-digest

Pi extension that speaks a short digest of every turn. The root agent calls the voice tool with one to three sentences; the extension queues the text and plays it after the turn ends. Each host uses its own speech engine by default, and a command template replaces it with any program.

Install

pi install npm:pi-digest

Or straight from the repository:

pi install git:github.com/aristocr2t/pi-digest

Or load it without saving:

pi -e git:github.com/aristocr2t/pi-digest

Use

CommandWhat it does
/digestShow the current state and command template
/digest onEnable speech summaries
/digest offDisable speech summaries
/digest testSpeak a test phrase through the current backend
/digest commandPrint the command and arguments that would run
/digest command <template>Save a custom command template to settings.json
/digest initWrite the Voice rules for the voice tool into APPEND_SYSTEM.md

/digest init adds this section to ~/.pi/agent/APPEND_SYSTEM.md, replacing a previous ## Voice section instead of duplicating it:

## Voice

When `voice(text)` is available, the root agent calls it last before finishing: on success, on failure, and before reporting a blocker, asking a question, or requesting user action. Use 1–3 plain-text sentences in the user's language with the outcome or blocker and the next step. Subagents skip voice.

The rule is a normal file change, so it applies to the next session or after /reload.

Command template

The template is a normal command line. %s marks where the spoken text goes, and quotes keep an option value in one argument:

/digest command ~/.local/bin/voice --speaker xenia "%s"

The template is saved under the pi-digest key of ~/.pi/agent/settings.json; every other setting is left untouched. A template without %s gets the text appended as the final argument. Without a template, each host uses its own engine:

PlatformDefault
macOSsay %s
WindowsPowerShell System.Speech
Linuxspd-say %s

~ at the start of the executable expands to the home directory. An unclosed quote is rejected when the template is saved and when the speaker starts.

Text handling

Markdown, code fences, and links are stripped before speaking, and the text is cut at a sentence boundary above 2000 characters. Spoken text is never logged; the extension logs only the backend, length, and exit code.

Sessions without a session file and sessions under subagents/ never speak: automated turns such as prompt suggestions call the same tools as a chat turn, and their summaries would play over the real answer.

Development

npm install
npm run typecheck
npm test

src/extension.ts registers the tool and commands, src/backend.ts owns the template and the process, src/text.ts cleans the spoken text, src/prompt.ts maintains APPEND_SYSTEM.md, and src/config.ts reads and writes settings.json. Tests run with the Node.js test runner on Node.js 22.9 or newer.