@mrclrchtr/supi-insights 1.3.1 → 1.4.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 +67 -194
- package/node_modules/@mrclrchtr/supi-core/README.md +52 -41
- package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-core/src/api.ts +13 -13
- package/node_modules/@mrclrchtr/supi-core/src/{config-settings.ts → config/config-settings.ts} +2 -2
- package/node_modules/@mrclrchtr/supi-core/src/{context-provider-registry.ts → context/context-provider-registry.ts} +1 -1
- package/node_modules/@mrclrchtr/supi-core/src/extension.ts +1 -1
- package/node_modules/@mrclrchtr/supi-core/src/index.ts +13 -13
- package/node_modules/@mrclrchtr/supi-core/src/{settings-registry.ts → settings/settings-registry.ts} +1 -1
- package/package.json +3 -3
- /package/node_modules/@mrclrchtr/supi-core/src/{config.ts → config/config.ts} +0 -0
- /package/node_modules/@mrclrchtr/supi-core/src/{context-messages.ts → context/context-messages.ts} +0 -0
- /package/node_modules/@mrclrchtr/supi-core/src/{context-tag.ts → context/context-tag.ts} +0 -0
- /package/node_modules/@mrclrchtr/supi-core/src/{settings-command.ts → settings/settings-command.ts} +0 -0
- /package/node_modules/@mrclrchtr/supi-core/src/{settings-ui.ts → settings/settings-ui.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,234 +1,107 @@
|
|
|
1
1
|
# @mrclrchtr/supi-insights
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Adds a `/supi-insights` command to the [pi coding agent](https://github.com/earendil-works/pi) that analyzes your historical pi sessions and writes a shareable HTML report.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## What you get
|
|
8
|
-
|
|
9
|
-
Running `/supi-insights` produces a report with:
|
|
10
|
-
|
|
11
|
-
- **At a Glance** — high-level summary of what's working, what's hindering you, quick wins, and ambitious workflows for future models
|
|
12
|
-
- **What You Work On** — project areas with session counts and descriptions
|
|
13
|
-
- **How You Use PI** — narrative analysis of your interaction style and key patterns
|
|
14
|
-
- **Impressive Things You Did** — notable workflows and accomplishments
|
|
15
|
-
- **Where Things Go Wrong** — friction categories with concrete examples
|
|
16
|
-
- **Charts & Stats** — tool usage, languages, session types, outcomes, satisfaction, response times, time-of-day patterns, tool errors, multi-session usage
|
|
17
|
-
- **Suggestions** — CLAUDE.md additions, features to try, new usage patterns
|
|
18
|
-
- **On the Horizon** — ambitious workflows to prepare for as models improve
|
|
19
|
-
|
|
20
|
-
Reports are saved as self-contained HTML files you can open in any browser.
|
|
21
|
-
|
|
22
|
-
## Installation
|
|
5
|
+
## Install
|
|
23
6
|
|
|
24
7
|
```bash
|
|
25
8
|
pi install npm:@mrclrchtr/supi-insights
|
|
26
9
|
```
|
|
27
10
|
|
|
28
|
-
|
|
29
|
-
> Install directly when you need session analytics.
|
|
11
|
+
This is a **beta** package. It is not bundled in `@mrclrchtr/supi`.
|
|
30
12
|
|
|
31
|
-
|
|
13
|
+
For local development:
|
|
32
14
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Type `/supi-insights` in the pi editor and press Enter.
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
/supi-insights
|
|
15
|
+
```bash
|
|
16
|
+
pi install ./packages/supi-insights
|
|
39
17
|
```
|
|
40
18
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
1. **Scan** all historical pi sessions across projects
|
|
44
|
-
2. **Extract metadata** — tool counts, languages, git activity, lines changed, response times, errors (cached for future runs)
|
|
45
|
-
3. **Extract qualitative facets** — goals, outcomes, satisfaction, friction via LLM analysis (cached)
|
|
46
|
-
4. **Generate narrative insights** — coaching-style analysis in 7 parallel sections
|
|
47
|
-
5. **Render an HTML report** — saved to `~/.pi/agent/supi/insights/report-{timestamp}.html`
|
|
48
|
-
6. **Show a summary** — in the PI chat with a link to the full report
|
|
19
|
+
After editing the source, run `/reload`.
|
|
49
20
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
The first run may take a minute or two if you have many sessions, because it:
|
|
53
|
-
- Parses all session JSONL files
|
|
54
|
-
- Extracts metadata for each session
|
|
55
|
-
- Runs ~50 LLM facet extractions (batched, 50 concurrent)
|
|
56
|
-
- Generates ~8 LLM insight sections
|
|
57
|
-
|
|
58
|
-
Subsequent runs are fast — cached metadata and facets are reused.
|
|
21
|
+
## What you get
|
|
59
22
|
|
|
60
|
-
|
|
23
|
+
After install, pi gets one command:
|
|
61
24
|
|
|
62
|
-
|
|
25
|
+
- `/supi-insights` — scan session history, generate metrics and narrative insights, and save an HTML report
|
|
63
26
|
|
|
64
|
-
|
|
65
|
-
|---------|-------------|---------|
|
|
66
|
-
| `enabled` | Enable or disable insights generation | `on` |
|
|
67
|
-
| `maxSessions` | Maximum sessions to fully parse and analyze | `200` |
|
|
68
|
-
| `maxFacets` | Maximum per-session LLM facet extractions | `50` |
|
|
27
|
+
The command pipeline is:
|
|
69
28
|
|
|
70
|
-
|
|
29
|
+
1. list historical sessions with `SessionManager.listAll()`
|
|
30
|
+
2. parse session files and extract metadata such as message counts, tools, languages, git activity, lines changed, response times, and tool errors
|
|
31
|
+
3. run LLM-based facet extraction on a bounded set of sessions
|
|
32
|
+
4. aggregate the results across sessions
|
|
33
|
+
5. generate an HTML report and post a short in-chat summary with the saved file path
|
|
71
34
|
|
|
72
|
-
|
|
73
|
-
{
|
|
74
|
-
"insights": {
|
|
75
|
-
"enabled": true,
|
|
76
|
-
"maxSessions": 200,
|
|
77
|
-
"maxFacets": 50
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
```
|
|
35
|
+
## What the report covers
|
|
81
36
|
|
|
82
|
-
|
|
37
|
+
The generated report can include:
|
|
83
38
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
├── html.ts # HTML report renderer with CSS bar charts
|
|
93
|
-
├── cache.ts # Facet and metadata caching
|
|
94
|
-
├── utils.ts # Chart helpers, label mappings, text utilities
|
|
95
|
-
└── types.ts # Shared TypeScript types
|
|
96
|
-
```
|
|
39
|
+
- at-a-glance summary
|
|
40
|
+
- project areas
|
|
41
|
+
- interaction style
|
|
42
|
+
- what works well
|
|
43
|
+
- friction analysis
|
|
44
|
+
- suggestions
|
|
45
|
+
- future opportunities
|
|
46
|
+
- charts and aggregate stats for tools, languages, outcomes, satisfaction, response times, time of day, and multi-session overlap
|
|
97
47
|
|
|
98
|
-
|
|
48
|
+
## Output and caching
|
|
99
49
|
|
|
100
|
-
|
|
101
|
-
SessionManager.listAll()
|
|
102
|
-
│
|
|
103
|
-
▼
|
|
104
|
-
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
|
105
|
-
│ scanner │────▶│ parser │────▶│ cache │
|
|
106
|
-
└─────────────┘ └─────────────┘ └─────────────┘
|
|
107
|
-
│ │
|
|
108
|
-
│ ┌─────────────┐ │
|
|
109
|
-
└────────▶│ extractor │◀───────────┘
|
|
110
|
-
│ (LLM facets)│
|
|
111
|
-
└─────────────┘
|
|
112
|
-
│
|
|
113
|
-
▼
|
|
114
|
-
┌─────────────┐
|
|
115
|
-
│ aggregator │
|
|
116
|
-
└─────────────┘
|
|
117
|
-
│
|
|
118
|
-
▼
|
|
119
|
-
┌─────────────┐
|
|
120
|
-
│ generator │
|
|
121
|
-
│ (insights) │
|
|
122
|
-
└─────────────┘
|
|
123
|
-
│
|
|
124
|
-
▼
|
|
125
|
-
┌─────────────┐
|
|
126
|
-
│ html │
|
|
127
|
-
│ report │
|
|
128
|
-
└─────────────┘
|
|
129
|
-
```
|
|
50
|
+
Reports are written under pi's agent directory (typically `~/.pi/agent/`):
|
|
130
51
|
|
|
131
|
-
|
|
52
|
+
- reports: `~/.pi/agent/supi/insights/report-*.html`
|
|
53
|
+
- metadata cache: `~/.pi/agent/supi/insights/meta/*.json`
|
|
54
|
+
- facet cache: `~/.pi/agent/supi/insights/facets/*.json`
|
|
132
55
|
|
|
133
|
-
|
|
56
|
+
The cache key includes:
|
|
134
57
|
|
|
135
|
-
|
|
58
|
+
- session id
|
|
59
|
+
- session file path hash
|
|
60
|
+
- modified timestamp hash
|
|
136
61
|
|
|
137
|
-
|
|
62
|
+
That keeps branched or resumed session files from colliding.
|
|
138
63
|
|
|
139
|
-
|
|
64
|
+
## Important limits
|
|
140
65
|
|
|
141
|
-
|
|
66
|
+
Built-in defaults:
|
|
142
67
|
|
|
143
|
-
|
|
68
|
+
- `maxSessions`: `200`
|
|
69
|
+
- `maxFacets`: `50`
|
|
144
70
|
|
|
145
|
-
|
|
71
|
+
Filtering in the current implementation:
|
|
146
72
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
│ ├── {session-id}_{path-hash}_{modified-hash}.json # Extracted metadata
|
|
151
|
-
│ └── ...
|
|
152
|
-
├── facets/
|
|
153
|
-
│ ├── {session-id}_{path-hash}_{modified-hash}.json # LLM-extracted facets
|
|
154
|
-
│ └── ...
|
|
155
|
-
└── report-{timestamp}.html # Generated HTML reports
|
|
156
|
-
```
|
|
73
|
+
- sessions with fewer than 2 user messages are skipped from the final analysis set
|
|
74
|
+
- sessions shorter than 1 minute are skipped from the final analysis set
|
|
75
|
+
- sessions whose only facet category is `warmup_minimal` are dropped after facet extraction
|
|
157
76
|
|
|
158
|
-
|
|
159
|
-
- **Facet cache** includes: goals, outcomes, satisfaction, friction, success factors, brief summaries
|
|
77
|
+
## Settings
|
|
160
78
|
|
|
161
|
-
|
|
79
|
+
This package registers an **Insights** section in `/supi-settings`.
|
|
162
80
|
|
|
163
|
-
|
|
164
|
-
rm -rf ~/.pi/agent/supi/insights/meta ~/.pi/agent/supi/insights/facets
|
|
165
|
-
```
|
|
81
|
+
Available settings:
|
|
166
82
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
- Collects all user message timestamps across sessions
|
|
172
|
-
- Looks for the pattern `sessionA → sessionB → sessionA` within a 30-minute window
|
|
173
|
-
- Reports overlap events, sessions involved, and percentage of messages during overlaps
|
|
174
|
-
|
|
175
|
-
## Statistics tracked
|
|
176
|
-
|
|
177
|
-
### Per-session
|
|
178
|
-
- Tool usage counts
|
|
179
|
-
- Programming languages used (from file paths in edit/write tool calls)
|
|
180
|
-
- Git commits and pushes
|
|
181
|
-
- Input/output tokens
|
|
182
|
-
- Lines added/removed (via diff)
|
|
183
|
-
- Files modified
|
|
184
|
-
- User response times (time between assistant message and next user message)
|
|
185
|
-
- Tool errors with categorization (Command Failed, Edit Failed, User Rejected, etc.)
|
|
186
|
-
- User interruptions
|
|
187
|
-
- Feature usage (task agents, MCP, web search, web fetch)
|
|
188
|
-
- Message timestamps for time-of-day analysis
|
|
189
|
-
|
|
190
|
-
### Aggregated
|
|
191
|
-
- Total sessions, messages, duration, tokens
|
|
192
|
-
- Days active, messages per day
|
|
193
|
-
- Top tools, languages, goals, outcomes
|
|
194
|
-
- Satisfaction and helpfulness distributions
|
|
195
|
-
- Friction types and success factors
|
|
196
|
-
- Response time histograms
|
|
197
|
-
- Time-of-day patterns
|
|
198
|
-
- Multi-session overlap events
|
|
199
|
-
|
|
200
|
-
## Compared to Claude Code `/insights`
|
|
201
|
-
|
|
202
|
-
| Feature | Claude Code | /supi-insights |
|
|
203
|
-
|---------|-------------|---------------|
|
|
204
|
-
| Session discovery | Manual filesystem scan | `SessionManager.listAll()` |
|
|
205
|
-
| LLM access | Internal `queryWithModel()` | `@earendil-works/pi-ai/complete()` |
|
|
206
|
-
| Output | HTML report + browser | HTML report + browser |
|
|
207
|
-
| Caching | Custom `~/.claude/usage-data/` | `~/.pi/agent/supi/insights/` |
|
|
208
|
-
| Multi-clauding | ✅ | ✅ |
|
|
209
|
-
| Remote host collection | ✅ (ant-only, SCP) | ❌ (not applicable) |
|
|
210
|
-
| Team feedback (ant-only) | ✅ | ❌ |
|
|
211
|
-
| TUI dashboard | ❌ | Planned |
|
|
212
|
-
| Live tracking | ❌ | Planned |
|
|
213
|
-
|
|
214
|
-
## Development
|
|
83
|
+
- `enabled` — turn the command on or off
|
|
84
|
+
- `maxSessions` — maximum sessions to fully analyze
|
|
85
|
+
- `maxFacets` — maximum LLM facet extractions
|
|
215
86
|
|
|
216
|
-
|
|
217
|
-
# Typecheck
|
|
218
|
-
pnpm exec tsc --noEmit -p packages/supi-insights/tsconfig.json
|
|
87
|
+
Defaults:
|
|
219
88
|
|
|
220
|
-
|
|
221
|
-
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"insights": {
|
|
92
|
+
"enabled": true,
|
|
93
|
+
"maxSessions": 200,
|
|
94
|
+
"maxFacets": 50
|
|
95
|
+
}
|
|
96
|
+
}
|
|
222
97
|
```
|
|
223
98
|
|
|
224
|
-
##
|
|
225
|
-
|
|
226
|
-
- [ ] **Live tracking** — accumulate stats via `tool_call`, `turn_end`, `model_select` events instead of only scanning historical sessions
|
|
227
|
-
- [ ] **TUI overlay dashboard** — native PI terminal UI with ASCII bar charts, keyboard-navigable sections
|
|
228
|
-
- [ ] **Export formats** — Markdown, JSON, CSV
|
|
229
|
-
- [ ] **Trend comparison** — compare current report with previous reports
|
|
230
|
-
- [ ] **Session drill-down** — `/supi-insights --session <id>` to analyze a specific session
|
|
231
|
-
|
|
232
|
-
## License
|
|
99
|
+
## Source
|
|
233
100
|
|
|
234
|
-
|
|
101
|
+
- `src/insights.ts` — command, settings, and end-to-end report generation
|
|
102
|
+
- `src/scanner.ts` — session discovery
|
|
103
|
+
- `src/parser.ts` — session parsing and metadata extraction
|
|
104
|
+
- `src/aggregator.ts` — aggregated statistics and multi-session overlap detection
|
|
105
|
+
- `src/generator.ts` — narrative insight generation
|
|
106
|
+
- `src/html.ts` — HTML report output
|
|
107
|
+
- `src/cache.ts` — metadata and facet caching
|
|
@@ -1,65 +1,78 @@
|
|
|
1
1
|
# @mrclrchtr/supi-core
|
|
2
2
|
|
|
3
|
-
Shared infrastructure for SuPi
|
|
3
|
+
Shared infrastructure for SuPi extensions.
|
|
4
|
+
|
|
5
|
+
This package is mainly for extension authors. It gives you a common config system, settings plumbing, context helpers, registries, and a small extension surface that registers `/supi-settings`.
|
|
4
6
|
|
|
5
7
|
## Install
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
### As a dependency for another extension
|
|
8
10
|
|
|
9
11
|
```bash
|
|
10
12
|
pnpm add @mrclrchtr/supi-core
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`@mrclrchtr/supi-core` now has two explicit surfaces:
|
|
15
|
+
### As a pi package
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
`pi.extensions` still points at the real file path `./src/extension.ts` inside the package. The `/api` and `/extension` paths are consumer-facing package exports, not manifest aliases.
|
|
17
|
+
```bash
|
|
18
|
+
pi install npm:@mrclrchtr/supi-core
|
|
19
|
+
```
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
Installing it as a pi package adds the minimal `/supi-settings` extension surface.
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
## Package surfaces
|
|
25
24
|
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- the shared settings registry, overlay UI, and `registerSettingsCommand()` helper
|
|
29
|
-
- XML `<extension-context>` wrapping plus context-message utilities
|
|
30
|
-
- context-provider and debug-event registries reused across SuPi packages
|
|
31
|
-
- project root and path helpers reused by packages such as `supi-lsp`
|
|
25
|
+
- `@mrclrchtr/supi-core/api` — reusable helpers for other packages and extensions
|
|
26
|
+
- `@mrclrchtr/supi-core/extension` — minimal pi extension that registers `/supi-settings`
|
|
32
27
|
|
|
33
|
-
##
|
|
28
|
+
## What you get from the API
|
|
34
29
|
|
|
35
|
-
Config
|
|
30
|
+
### Config helpers
|
|
36
31
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
- `loadSupiConfig()` — merged config with resolution order `defaults <- global <- project`
|
|
33
|
+
- `loadSupiConfigForScope()` — load one scope at a time for settings UIs
|
|
34
|
+
- `writeSupiConfig()` — persist values
|
|
35
|
+
- `removeSupiConfigKey()` — remove a key or override
|
|
40
36
|
|
|
41
37
|
Config file locations:
|
|
42
38
|
|
|
43
39
|
- global: `~/.pi/agent/supi/config.json`
|
|
44
40
|
- project: `.pi/supi/config.json`
|
|
45
41
|
|
|
46
|
-
|
|
42
|
+
### Settings helpers
|
|
43
|
+
|
|
44
|
+
- `registerSettings()` — register an arbitrary settings section
|
|
45
|
+
- `registerConfigSettings()` — register a config-backed settings section with scoped persistence helpers
|
|
46
|
+
- `registerSettingsCommand()` — register `/supi-settings`
|
|
47
|
+
- `openSettingsOverlay()` — open the shared settings UI directly
|
|
48
|
+
- `createInputSubmenu()` — helper for simple text-entry submenus
|
|
49
|
+
|
|
50
|
+
The built-in settings UI supports:
|
|
47
51
|
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
- `removeSupiConfigKey()`
|
|
52
|
-
- `registerConfigSettings()`
|
|
52
|
+
- project/global scope toggle
|
|
53
|
+
- grouped extension sections
|
|
54
|
+
- searchable setting lists
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
### Context helpers
|
|
55
57
|
|
|
56
|
-
- `wrapExtensionContext()`
|
|
58
|
+
- `wrapExtensionContext()` — wrap injected text in SuPi's `<extension-context>` tag
|
|
57
59
|
- `findLastUserMessageIndex()`
|
|
58
60
|
- `getContextToken()`
|
|
61
|
+
- `getPromptContent()`
|
|
59
62
|
- `pruneAndReorderContextMessages()`
|
|
60
|
-
- `
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
- `restorePromptContent()`
|
|
64
|
+
|
|
65
|
+
### Shared registries
|
|
66
|
+
|
|
67
|
+
- context-provider registry for `/supi-context`
|
|
68
|
+
- debug-event registry for producers that want shared debug capture
|
|
69
|
+
- settings registry used by `/supi-settings`
|
|
70
|
+
|
|
71
|
+
### Project and session helpers
|
|
72
|
+
|
|
73
|
+
- project-root detection and directory walking helpers such as `findProjectRoot()` and `walkProject()`
|
|
74
|
+
- active-branch session helper: `getActiveBranchEntries()`
|
|
75
|
+
- terminal helpers such as `formatTitle()`, `signalWaiting()`, and `signalDone()`
|
|
63
76
|
|
|
64
77
|
## Example
|
|
65
78
|
|
|
@@ -80,17 +93,15 @@ registerConfigSettings({
|
|
|
80
93
|
});
|
|
81
94
|
|
|
82
95
|
const message = wrapExtensionContext("my-extension", "hello", {
|
|
83
|
-
turn: 1,
|
|
84
96
|
file: "CLAUDE.md",
|
|
97
|
+
turn: 1,
|
|
85
98
|
});
|
|
86
99
|
```
|
|
87
100
|
|
|
88
|
-
## Requirements
|
|
89
|
-
|
|
90
|
-
- `@earendil-works/pi-coding-agent`
|
|
91
|
-
- `@earendil-works/pi-tui`
|
|
92
|
-
|
|
93
101
|
## Source
|
|
94
102
|
|
|
95
|
-
-
|
|
96
|
-
-
|
|
103
|
+
- `src/api.ts` — exported library surface
|
|
104
|
+
- `src/extension.ts` — minimal `/supi-settings` entrypoint
|
|
105
|
+
- `src/config.ts` — shared config loading and writing
|
|
106
|
+
- `src/config-settings.ts` — config-backed settings registration helper
|
|
107
|
+
- `src/settings-ui.ts` — shared settings overlay
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
// Provides XML context tag wrapping, unified config system, context-message utilities,
|
|
3
3
|
// and settings registry for supi-wide TUI settings.
|
|
4
4
|
|
|
5
|
-
export type { SupiConfigLocation, SupiConfigOptions } from "./config.ts";
|
|
5
|
+
export type { SupiConfigLocation, SupiConfigOptions } from "./config/config.ts";
|
|
6
6
|
export {
|
|
7
7
|
loadSupiConfig,
|
|
8
8
|
loadSupiConfigForScope,
|
|
9
9
|
removeSupiConfigKey,
|
|
10
10
|
writeSupiConfig,
|
|
11
|
-
} from "./config.ts";
|
|
12
|
-
export type { ConfigSettingsHelpers, ConfigSettingsOptions } from "./config-settings.ts";
|
|
13
|
-
export { registerConfigSettings } from "./config-settings.ts";
|
|
14
|
-
export type { ContextMessageLike } from "./context-messages.ts";
|
|
11
|
+
} from "./config/config.ts";
|
|
12
|
+
export type { ConfigSettingsHelpers, ConfigSettingsOptions } from "./config/config-settings.ts";
|
|
13
|
+
export { registerConfigSettings } from "./config/config-settings.ts";
|
|
14
|
+
export type { ContextMessageLike } from "./context/context-messages.ts";
|
|
15
15
|
export {
|
|
16
16
|
findLastUserMessageIndex,
|
|
17
17
|
getContextToken,
|
|
18
18
|
getPromptContent,
|
|
19
19
|
pruneAndReorderContextMessages,
|
|
20
20
|
restorePromptContent,
|
|
21
|
-
} from "./context-messages.ts";
|
|
22
|
-
export type { ContextProvider } from "./context-provider-registry.ts";
|
|
21
|
+
} from "./context/context-messages.ts";
|
|
22
|
+
export type { ContextProvider } from "./context/context-provider-registry.ts";
|
|
23
23
|
export {
|
|
24
24
|
clearRegisteredContextProviders,
|
|
25
25
|
getRegisteredContextProviders,
|
|
26
26
|
registerContextProvider,
|
|
27
|
-
} from "./context-provider-registry.ts";
|
|
28
|
-
export { wrapExtensionContext } from "./context-tag.ts";
|
|
27
|
+
} from "./context/context-provider-registry.ts";
|
|
28
|
+
export { wrapExtensionContext } from "./context/context-tag.ts";
|
|
29
29
|
export type {
|
|
30
30
|
DebugAgentAccess,
|
|
31
31
|
DebugEvent,
|
|
@@ -64,14 +64,14 @@ export {
|
|
|
64
64
|
walkProject,
|
|
65
65
|
} from "./project-roots.ts";
|
|
66
66
|
export { getActiveBranchEntries } from "./session-utils.ts";
|
|
67
|
-
export { registerSettingsCommand } from "./settings-command.ts";
|
|
68
|
-
export type { SettingsScope, SettingsSection } from "./settings-registry.ts";
|
|
67
|
+
export { registerSettingsCommand } from "./settings/settings-command.ts";
|
|
68
|
+
export type { SettingsScope, SettingsSection } from "./settings/settings-registry.ts";
|
|
69
69
|
export {
|
|
70
70
|
clearRegisteredSettings,
|
|
71
71
|
getRegisteredSettings,
|
|
72
72
|
registerSettings,
|
|
73
|
-
} from "./settings-registry.ts";
|
|
74
|
-
export { createInputSubmenu, openSettingsOverlay } from "./settings-ui.ts";
|
|
73
|
+
} from "./settings/settings-registry.ts";
|
|
74
|
+
export { createInputSubmenu, openSettingsOverlay } from "./settings/settings-ui.ts";
|
|
75
75
|
export type { TitleTarget } from "./terminal.ts";
|
|
76
76
|
export {
|
|
77
77
|
DONE_SYMBOL,
|
package/node_modules/@mrclrchtr/supi-core/src/{config-settings.ts → config/config-settings.ts}
RENAMED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Wraps registerSettings() and centralizes selected-scope loading + scoped persistence.
|
|
3
3
|
|
|
4
4
|
import type { SettingItem } from "@earendil-works/pi-tui";
|
|
5
|
+
import type { SettingsScope } from "../settings/settings-registry.ts";
|
|
6
|
+
import { registerSettings } from "../settings/settings-registry.ts";
|
|
5
7
|
import { loadSupiConfigForScope, removeSupiConfigKey, writeSupiConfig } from "./config.ts";
|
|
6
|
-
import type { SettingsScope } from "./settings-registry.ts";
|
|
7
|
-
import { registerSettings } from "./settings-registry.ts";
|
|
8
8
|
|
|
9
9
|
export interface ConfigSettingsHelpers {
|
|
10
10
|
/** Write a key to the selected scope's config section. */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Extensions declare context data providers via `registerContextProvider()` during their
|
|
4
4
|
// factory function. The `/supi-context` command reads them via `getRegisteredContextProviders()`.
|
|
5
5
|
|
|
6
|
-
import { createRegistry } from "
|
|
6
|
+
import { createRegistry } from "../registry-utils.ts";
|
|
7
7
|
|
|
8
8
|
export interface ContextProvider {
|
|
9
9
|
/** Unique identifier — e.g. "rtk" */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { registerSettingsCommand as default } from "./settings-command.ts";
|
|
1
|
+
export { registerSettingsCommand as default } from "./settings/settings-command.ts";
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
// Provides XML context tag wrapping, unified config system, context-message utilities,
|
|
3
3
|
// and settings registry for supi-wide TUI settings.
|
|
4
4
|
|
|
5
|
-
export type { SupiConfigLocation, SupiConfigOptions } from "./config.ts";
|
|
5
|
+
export type { SupiConfigLocation, SupiConfigOptions } from "./config/config.ts";
|
|
6
6
|
export {
|
|
7
7
|
loadSupiConfig,
|
|
8
8
|
loadSupiConfigForScope,
|
|
9
9
|
removeSupiConfigKey,
|
|
10
10
|
writeSupiConfig,
|
|
11
|
-
} from "./config.ts";
|
|
12
|
-
export type { ConfigSettingsHelpers, ConfigSettingsOptions } from "./config-settings.ts";
|
|
13
|
-
export { registerConfigSettings } from "./config-settings.ts";
|
|
14
|
-
export type { ContextMessageLike } from "./context-messages.ts";
|
|
11
|
+
} from "./config/config.ts";
|
|
12
|
+
export type { ConfigSettingsHelpers, ConfigSettingsOptions } from "./config/config-settings.ts";
|
|
13
|
+
export { registerConfigSettings } from "./config/config-settings.ts";
|
|
14
|
+
export type { ContextMessageLike } from "./context/context-messages.ts";
|
|
15
15
|
export {
|
|
16
16
|
findLastUserMessageIndex,
|
|
17
17
|
getContextToken,
|
|
18
18
|
getPromptContent,
|
|
19
19
|
pruneAndReorderContextMessages,
|
|
20
20
|
restorePromptContent,
|
|
21
|
-
} from "./context-messages.ts";
|
|
22
|
-
export type { ContextProvider } from "./context-provider-registry.ts";
|
|
21
|
+
} from "./context/context-messages.ts";
|
|
22
|
+
export type { ContextProvider } from "./context/context-provider-registry.ts";
|
|
23
23
|
export {
|
|
24
24
|
clearRegisteredContextProviders,
|
|
25
25
|
getRegisteredContextProviders,
|
|
26
26
|
registerContextProvider,
|
|
27
|
-
} from "./context-provider-registry.ts";
|
|
28
|
-
export { wrapExtensionContext } from "./context-tag.ts";
|
|
27
|
+
} from "./context/context-provider-registry.ts";
|
|
28
|
+
export { wrapExtensionContext } from "./context/context-tag.ts";
|
|
29
29
|
export type {
|
|
30
30
|
DebugAgentAccess,
|
|
31
31
|
DebugEvent,
|
|
@@ -64,14 +64,14 @@ export {
|
|
|
64
64
|
walkProject,
|
|
65
65
|
} from "./project-roots.ts";
|
|
66
66
|
export { getActiveBranchEntries } from "./session-utils.ts";
|
|
67
|
-
export { registerSettingsCommand } from "./settings-command.ts";
|
|
68
|
-
export type { SettingsScope, SettingsSection } from "./settings-registry.ts";
|
|
67
|
+
export { registerSettingsCommand } from "./settings/settings-command.ts";
|
|
68
|
+
export type { SettingsScope, SettingsSection } from "./settings/settings-registry.ts";
|
|
69
69
|
export {
|
|
70
70
|
clearRegisteredSettings,
|
|
71
71
|
getRegisteredSettings,
|
|
72
72
|
registerSettings,
|
|
73
|
-
} from "./settings-registry.ts";
|
|
74
|
-
export { createInputSubmenu, openSettingsOverlay } from "./settings-ui.ts";
|
|
73
|
+
} from "./settings/settings-registry.ts";
|
|
74
|
+
export { createInputSubmenu, openSettingsOverlay } from "./settings/settings-ui.ts";
|
|
75
75
|
export type { TitleTarget } from "./terminal.ts";
|
|
76
76
|
export {
|
|
77
77
|
DONE_SYMBOL,
|
package/node_modules/@mrclrchtr/supi-core/src/{settings-registry.ts → settings/settings-registry.ts}
RENAMED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// factory function. The generic settings UI reads them via `getRegisteredSettings()`.
|
|
5
5
|
|
|
6
6
|
import type { SettingItem } from "@earendil-works/pi-tui";
|
|
7
|
-
import { createRegistry } from "
|
|
7
|
+
import { createRegistry } from "../registry-utils.ts";
|
|
8
8
|
|
|
9
9
|
export type SettingsScope = "project" | "global";
|
|
10
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-insights",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "SuPi Insights extension — generate usage reports analyzing your PI sessions",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
],
|
|
18
18
|
"files": [
|
|
19
19
|
"src/**/*.ts",
|
|
20
|
-
"!
|
|
20
|
+
"!__tests__/**",
|
|
21
21
|
"src/report.css",
|
|
22
22
|
"src/report.js",
|
|
23
23
|
"README.md"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"diff": "^9.0.0",
|
|
27
|
-
"@mrclrchtr/supi-core": "1.
|
|
27
|
+
"@mrclrchtr/supi-core": "1.4.0"
|
|
28
28
|
},
|
|
29
29
|
"bundledDependencies": [
|
|
30
30
|
"@mrclrchtr/supi-core"
|
|
File without changes
|
/package/node_modules/@mrclrchtr/supi-core/src/{context-messages.ts → context/context-messages.ts}
RENAMED
|
File without changes
|
|
File without changes
|
/package/node_modules/@mrclrchtr/supi-core/src/{settings-command.ts → settings/settings-command.ts}
RENAMED
|
File without changes
|
|
File without changes
|