pi-sprite-keepalive
A pi extension that keeps a Sprite awake while the agent is working.
Package details
Install pi-sprite-keepalive from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-sprite-keepalive- Package
pi-sprite-keepalive- Version
0.1.1- Published
- Aug 17, 2026
- Downloads
- 204/mo · 17/wk
- Author
- denniseijpe
- License
- MIT
- Types
- extension
- Size
- 8 KB
- Dependencies
- 0 dependencies · 1 peer
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-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-keepalive
To try it for one invocation without installing it:
pi -e npm:pi-sprite-keepalive
Behavior
- 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-run
The 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