@mrclrchtr/supi-context 1.1.2 → 1.2.0

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
@@ -1,49 +1,43 @@
1
1
  # @mrclrchtr/supi-context
2
2
 
3
- Detailed context-usage reporting for the [pi coding agent](https://github.com/earendil-works/pi).
3
+ Context diagnostics for PI — see exactly what's eating your context window, down to the file.
4
4
 
5
- ## Install
5
+ Run `/supi-context` in any session. You get a visual dashboard, not just a number: a color-coded grid of your context budget, per-category breakdowns, per-file token counts for every injected context file, skill token usage, and compaction info.
6
6
 
7
- ```bash
8
- pi install npm:@mrclrchtr/supi-context
9
- ```
7
+ ## What you get
10
8
 
11
- ## What it adds
9
+ ### Visual budget
12
10
 
13
- This extension registers `/supi-context`, which analyzes the current session prompt and reports how context is being spent across:
11
+ A 20-column grid shows your context window at a glance — which categories fill it, how much free space remains, and where the autocompact buffer sits. Color-coded: system prompt, conversation, tools, free space.
14
12
 
15
- - system prompt
16
- - conversation messages
17
- - tools
18
- - extension-injected context
13
+ ### Per-category breakdown
19
14
 
20
- The result is rendered as a custom `supi-context` message with a concise visible summary and structured details for the renderer.
15
+ System prompt, user messages, assistant messages, tool calls, tool results each with token counts and percentage of the total.
21
16
 
22
- ## Architecture
17
+ ### System prompt deep dive
23
18
 
24
- ```text
25
- src/
26
- ├── context.ts /supi-context command registration
27
- ├── analysis.ts token breakdown calculations
28
- ├── format.ts formatting and bar-chart helpers
29
- ├── prompt-inference.ts model-specific context-window detection
30
- ├── renderer.ts custom message renderer
31
- └── utils.ts shared formatting helpers
32
- ```
19
+ What's inside the system prompt: context files (per-file tokens), skills (per-skill tokens), guidelines, tool definitions, and custom append text. Find the exact file or skill that's bloating your context.
20
+
21
+ ### Injected context tracking
22
+
23
+ Every file injected by supi-claude-md, with turn number and token cost. See what subdirectory context is costing you.
33
24
 
34
- ## Requirements
25
+ ### Compaction awareness
35
26
 
36
- - `@earendil-works/pi-coding-agent`
37
- - `@earendil-works/pi-tui`
27
+ How many older turns were summarized. Know when your conversation history was compacted.
38
28
 
39
- ## Development
29
+ ### Extension data
30
+
31
+ Registered context providers (like supi-cache) contribute their own sections — see cache hit rates, forensics data, or whatever other extensions want to surface.
32
+
33
+ ## Install
40
34
 
41
35
  ```bash
42
- pnpm vitest run packages/supi-context/
43
- pnpm exec tsc --noEmit -p packages/supi-context/tsconfig.json
44
- pnpm exec biome check packages/supi-context/
36
+ pi install npm:@mrclrchtr/supi-context
45
37
  ```
46
38
 
47
- ## License
39
+ ## Usage
48
40
 
49
- MIT
41
+ ```bash
42
+ /supi-context
43
+ ```
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-core",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -22,5 +22,13 @@
22
22
  "@earendil-works/pi-coding-agent": "*",
23
23
  "@earendil-works/pi-tui": "*"
24
24
  },
25
+ "peerDependenciesMeta": {
26
+ "@earendil-works/pi-coding-agent": {
27
+ "optional": true
28
+ },
29
+ "@earendil-works/pi-tui": {
30
+ "optional": true
31
+ }
32
+ },
25
33
  "main": "src/index.ts"
26
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-context",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "SuPi Context extension — detailed context usage report via /supi-context command",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,7 +20,7 @@
20
20
  "README.md"
21
21
  ],
22
22
  "dependencies": {
23
- "@mrclrchtr/supi-core": "1.1.2"
23
+ "@mrclrchtr/supi-core": "1.2.0"
24
24
  },
25
25
  "bundledDependencies": [
26
26
  "@mrclrchtr/supi-core"
@@ -29,6 +29,14 @@
29
29
  "@earendil-works/pi-coding-agent": "*",
30
30
  "@earendil-works/pi-tui": "*"
31
31
  },
32
+ "peerDependenciesMeta": {
33
+ "@earendil-works/pi-coding-agent": {
34
+ "optional": true
35
+ },
36
+ "@earendil-works/pi-tui": {
37
+ "optional": true
38
+ }
39
+ },
32
40
  "pi": {
33
41
  "extensions": [
34
42
  "./src/context.ts"