@diegopetrucci/pi-extensions 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -4,6 +4,7 @@ A collection of [pi](https://github.com/earendil-works/pi-mono) agent extensions
|
|
|
4
4
|
|
|
5
5
|
- [`confirm-destructive`](./extensions/confirm-destructive): Confirms before destructive session actions like clear, switch, and fork.
|
|
6
6
|
- [`context-cap`](./extensions/context-cap): Caps effective model context windows at 200k tokens by default so pi avoids the `dumb zone`; toggle temporarily with `/context-cap`.
|
|
7
|
+
- [`context-inspector`](./extensions/context-inspector): Adds `/context`, a local self-contained HTML dashboard that breaks down where the current session context is going, with category overview, top offenders, and drilldown search.
|
|
7
8
|
- [`librarian`](./extensions/librarian): Adds a GitHub research scout that asks whether to use an opt-in local repo checkout cache under the OS user cache directory, with cached repos expiring after 30 days of non-use.
|
|
8
9
|
- [`minimal-footer`](./extensions/minimal-footer): Replaces pi's built-in footer with a minimal configurable two-line layout: branch/repo on the first line, context/model on the second, optional `DUMB ZONE`, plus OpenAI Codex 5-hour and 7-day usage when available.
|
|
9
10
|
- [`notify`](./extensions/notify): Sends configurable terminal, desktop, bell, and sound notifications when pi finishes and is ready for input.
|
|
@@ -24,7 +25,7 @@ pi install npm:@diegopetrucci/pi-extensions
|
|
|
24
25
|
Or pin the GitHub package to this release:
|
|
25
26
|
|
|
26
27
|
```bash
|
|
27
|
-
pi install git:github.com/diegopetrucci/pi-extensions@v0.1.
|
|
28
|
+
pi install git:github.com/diegopetrucci/pi-extensions@v0.1.19
|
|
28
29
|
```
|
|
29
30
|
|
|
30
31
|
Or a specific extension:
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# context-inspector
|
|
2
|
+
|
|
3
|
+
A pi extension that adds `/context`, a local HTML dashboard for understanding where your current session context is going.
|
|
4
|
+
|
|
5
|
+
Pi's footer can tell you that the session is at 30% of the context window. `context-inspector` answers the next question: what is inside that 30%?
|
|
6
|
+
|
|
7
|
+
## What it shows
|
|
8
|
+
|
|
9
|
+
- A first-glance donut and stacked bar by context component.
|
|
10
|
+
- System prompt and active tool schema overhead.
|
|
11
|
+
- User messages, assistant responses, assistant thinking, tool calls, tool results, user bash output, custom context, images, and compaction/branch summaries.
|
|
12
|
+
- Top tools, paths/globs, turns, and individual largest context segments.
|
|
13
|
+
- Drilldown search by content, tool name, path, command, entry id, and category.
|
|
14
|
+
- Current model context vs full active branch history.
|
|
15
|
+
|
|
16
|
+
The report is self-contained HTML written locally with private file permissions. It makes no network calls and does not add anything to the model context.
|
|
17
|
+
|
|
18
|
+
## Commands
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
/context
|
|
22
|
+
/context --no-open
|
|
23
|
+
/context --keep
|
|
24
|
+
/context --redact
|
|
25
|
+
/context --full
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Options:
|
|
29
|
+
|
|
30
|
+
- `--no-open`: write the HTML report but do not open a browser.
|
|
31
|
+
- `--keep`: save under `.pi/context-reports/` instead of the OS temp directory.
|
|
32
|
+
- `--redact`: keep token attribution but hide message/tool contents plus paths, commands, session identifiers, and timestamps in the report.
|
|
33
|
+
- `--full`: open the report on the full active branch tab by default.
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
|
|
37
|
+
- Per-component token counts are estimates. Providers expose aggregate usage, not exact token attribution per message or block.
|
|
38
|
+
- The current-context chart reconciles to pi's footer-compatible context total when pi knows it.
|
|
39
|
+
- Immediately after compaction, pi may not know exact current context usage until the next model response.
|
|
40
|
+
- The full branch tab includes old pre-compaction history for inspection; that history is not necessarily sent verbatim to the model.
|
|
41
|
+
- `--keep` writes reports under `.pi/context-reports/`; avoid committing those reports because they can contain sensitive session data unless redacted.
|
|
42
|
+
|
|
43
|
+
## Install
|
|
44
|
+
|
|
45
|
+
### Standalone npm package
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pi install npm:@diegopetrucci/pi-context-inspector
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Collection package
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pi install npm:@diegopetrucci/pi-extensions
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### GitHub package
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pi install git:github.com/diegopetrucci/pi-extensions
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then reload pi:
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
/reload
|
|
67
|
+
```
|