pi-sprite-keepalive
v0.1.1
Published
A pi extension that keeps a Sprite awake while the agent is working.
Maintainers
Readme
pi-sprite-keepalive
A pi extension that prevents a Sprite from going to sleep while pi is actively working.
The extension creates a short-lived Sprite task when an agent run starts, refreshes it once per minute, and removes it after the agent settles. Each pi process uses a unique task name, so concurrent sessions do not release one another's keepalive tasks.
Outside a Sprite, where /.sprite/api.sock is absent, the extension does
nothing.
Install
pi install npm:pi-sprite-keepaliveTo try it for one invocation without installing it:
pi -e npm:pi-sprite-keepaliveBehavior
- Starts a task with a five-minute expiry on
agent_start. - Refreshes the task every minute while pi is working.
- Deletes the task on
agent_settledorsession_shutdown. - Shows
sprite: awakein pi's status line while active. - Warns once if heartbeats fail; failed cleanup is left to expire naturally.
The extension communicates only with the local Sprite Tasks API through
/.sprite/api.sock.
Development
npm install
npm run check
npm pack --dry-runThe package ships its TypeScript entry point directly; pi loads TypeScript extensions without a build step.
Publishing
- Confirm that the package name and metadata in
package.jsonare correct. - Authenticate with npm using
npm login. - Run
npm publish.
License
MIT
