pine-of-glass
Observability extensions for the Pi coding agent
Package details
Install pine-of-glass from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pine-of-glass- Package
pine-of-glass- Version
0.3.0- Published
- Jun 9, 2026
- Downloads
- not available
- Author
- tmustier
- License
- MIT
- Types
- extension
- Size
- 313.2 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions/pi-contextimate",
"./extensions/pi-traceline"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pine-of-glass
Small observability and context management tools for Pi in the terminal.
contextimatebreaks down what is filling your context window: sysprompt, AGENTS.md, Skill frontmatter, Tool schemas, and session material. Toggle with ctrl+o on start and /reload.tracelinecollapses tool calls to one trace line each, so you can see the full arc of what Pi did (path taken, context read, bloated tool results). Toggle with ctrl+t (expands/collapses both thinking blocks and tools so you can see everything your agent did since your last message).cachemirecoming soon.
See each extension's own README.md for details, and docs/ for deeper reference.
Installation
- From GitHub:
pi install git:github.com/tmustier/pine-of-glass - From npm (installs both
contextimateandtraceline):pi install npm:pine-of-glass
Screenshots
Contextimate
Traceline
Development
npm run link-pi # symlink the installed pi runtime into node_modules (types + contract tests)
npm run typecheck # tsc against the real installed pi
npm test # unit + golden + pi contract tests (zero deps, node:test)
npm run test:smoke # launches real pi in tmux with an isolated HOME (local-only)
The contract suite pins every structural assumption about pi internals, so after pi update a quick npm test says exactly which seam (if any) drifted. Test design notes live in docs/testing.md. Goldens regenerate with UPDATE_GOLDENS=1 npm test — review the diff like code.
Plans
- The current goal is to provide an interface that makes tool and agent behaviour more legible for humans using pi in their terminal interactively.
- Once that's solid, we can help both humans and agents to more easily analyse previous sessions and traces, including when pi is running in RPC mode, remotely, or there is a large number of agent sessions we need to read to get insights from.
Note: A nice side benefit of 1. is that tools like traceline can help agents running interactive pi subagents in tmux to monitor them without risking context bloat from tool outputs.
Status: There are several things left to do in 1., including
- making the agent loop/cache behaviour more transparent (
cachemire- e.g. am I using too many agent turns? am I past TTL? if I am mutating the prefix, is the cache miss worth it?), - UI improvements for
traceline(filepath/multi-read UI, tool result size) - making
contextimatemore useful beyond upfront context (for example, are my MCP servers and skills efficient when loaded?) - and other refinements tracked in issues.