@diegopetrucci/pi-extensions 0.1.47 → 0.1.48

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
@@ -16,7 +16,7 @@ A collection of [pi](https://github.com/earendil-works/pi-mono) agent extensions
16
16
  - [`inline-bash`](./extensions/inline-bash): Expands `!{command}` snippets in user prompts by running them through bash before the prompt reaches the agent.
17
17
  - [`illustrations-to-explain-things`](./extensions/illustrations-to-explain-things): Adds a skill for generating clean, absurd Xiaohei-style article illustrations, shot lists, image edits, and visual metaphors.
18
18
  - [`librarian`](./extensions/librarian): Adds a GitHub research scout with a local repo checkout cache disabled by default under the OS user cache directory, toggleable with `/librarian-cache`, configurable subagent model/thinking defaults via `/librarian-config`, and cached repos expiring after 7 days of non-use.
19
- - [`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.
19
+ - [`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`, optional `xp` marker, plus OpenAI Codex 5-hour and 7-day usage when available.
20
20
  - [`notify`](./extensions/notify): Sends configurable terminal, desktop, bell, and sound notifications when pi finishes and is ready for input.
21
21
  - [`openai-fast`](./extensions/openai-fast): Adds `/fast` to enable OpenAI Codex Fast mode for ChatGPT-auth GPT-5.4 and GPT-5.5 by injecting the priority service tier.
22
22
  - [`oracle`](./extensions/oracle): Adds an Amp-style read-only oracle tool that auto-selects the strongest reasoning model on the current provider/subscription, supports persisted `/oracle` model/thinking defaults, requests xhigh reasoning by default and clamps to model capabilities, and shows live status while running.
@@ -12,6 +12,7 @@ It replaces pi's built-in footer with a cleaner two-line layout that focuses on
12
12
  - red `DUMB ZONE` indicator when context usage is above 200k tokens
13
13
  - current model and thinking level
14
14
  - OpenAI Codex 5-hour and 7-day usage when available
15
+ - `xp` marker when Pi experimental features are enabled
15
16
 
16
17
  ## Layout
17
18
 
@@ -41,6 +42,12 @@ When using `openai-codex`, the bottom-left line also includes subscription usage
41
42
  44.1% · 5h 12% · 7d 38%
42
43
  ```
43
44
 
45
+ When `PI_EXPERIMENTAL=1`, the bottom-left line also includes an experimental marker:
46
+
47
+ ```text
48
+ 44.1% · xp
49
+ ```
50
+
44
51
  On narrow terminals it falls back to one item per line.
45
52
 
46
53
  ## Install
@@ -107,6 +114,11 @@ Example:
107
114
  "label": "7d"
108
115
  }
109
116
  }
117
+ },
118
+ "experimentalMarker": {
119
+ "enabled": true,
120
+ "label": "xp",
121
+ "color": "warning"
110
122
  }
111
123
  }
112
124
  ```
@@ -147,6 +159,16 @@ Disable one session-limit window:
147
159
  }
148
160
  ```
149
161
 
162
+ Disable the experimental-features marker:
163
+
164
+ ```json
165
+ {
166
+ "experimentalMarker": {
167
+ "enabled": false
168
+ }
169
+ }
170
+ ```
171
+
150
172
  ### Config fields
151
173
 
152
174
  - `context.showPercent`: show the context percentage
@@ -161,6 +183,9 @@ Disable one session-limit window:
161
183
  - `codexUsage.windows.primary.label`: label for the primary usage window
162
184
  - `codexUsage.windows.secondary.enabled`: show the secondary usage window
163
185
  - `codexUsage.windows.secondary.label`: label for the secondary usage window
186
+ - `experimentalMarker.enabled`: show the marker when `PI_EXPERIMENTAL=1`
187
+ - `experimentalMarker.label`: marker text
188
+ - `experimentalMarker.color`: theme color for the marker (`error`, `warning`, `accent`, `text`, or `dim`)
164
189
 
165
190
  ## What it shows
166
191
 
@@ -168,6 +193,7 @@ Disable one session-limit window:
168
193
  - **Top right:** current repo directory name
169
194
  - **Bottom left:** current context usage percentage, plus red `DUMB ZONE` above 200k context tokens
170
195
  - **Bottom left on `openai-codex`:** current context usage percentage plus 5-hour and 7-day Codex usage
196
+ - **Bottom left with `PI_EXPERIMENTAL=1`:** current context usage percentage plus `xp`
171
197
  - **Bottom right:** model id and thinking level
172
198
 
173
199
  ## Publishing notes
@@ -181,5 +207,6 @@ This extension also lives inside the broader [`pi-extensions`](../../README.md)
181
207
  - Shows only context percentage, not context window size.
182
208
  - Shows `DUMB ZONE` only while context usage is above 200k tokens.
183
209
  - Shows the model id rather than a provider-specific display label.
210
+ - Shows `xp` when `PI_EXPERIMENTAL=1`.
184
211
  - For `openai-codex`, reads pi's stored OAuth login and fetches usage from ChatGPT's backend usage endpoint.
185
212
  - Usage is cached briefly in memory and refreshed after turns.
@@ -41,6 +41,11 @@ const DEFAULT_CONFIG: MinimalFooterConfig = {
41
41
  },
42
42
  },
43
43
  },
44
+ experimentalMarker: {
45
+ enabled: true,
46
+ label: "xp",
47
+ color: "warning",
48
+ },
44
49
  };
45
50
 
46
51
  const DUMB_ZONE_COLORS = new Set<DumbZoneColor>([
@@ -82,6 +87,11 @@ interface MinimalFooterConfig {
82
87
  };
83
88
  };
84
89
  };
90
+ experimentalMarker: {
91
+ enabled: boolean;
92
+ label: string;
93
+ color: DumbZoneColor;
94
+ };
85
95
  }
86
96
 
87
97
  type UsageSessionState = {
@@ -120,6 +130,7 @@ function mergeConfig(
120
130
  const codexUsage = overrides.codexUsage;
121
131
  const primaryWindow = codexUsage?.windows?.primary;
122
132
  const secondaryWindow = codexUsage?.windows?.secondary;
133
+ const experimentalMarker = overrides.experimentalMarker;
123
134
 
124
135
  return {
125
136
  context: {
@@ -161,6 +172,17 @@ function mergeConfig(
161
172
  },
162
173
  },
163
174
  },
175
+ experimentalMarker: {
176
+ enabled: normalizeBoolean(
177
+ experimentalMarker?.enabled,
178
+ base.experimentalMarker.enabled,
179
+ ),
180
+ label: normalizeLabel(experimentalMarker?.label, base.experimentalMarker.label),
181
+ color: normalizeDumbZoneColor(
182
+ experimentalMarker?.color,
183
+ base.experimentalMarker.color,
184
+ ),
185
+ },
164
186
  };
165
187
  }
166
188
 
@@ -213,6 +235,10 @@ function shouldShowCodexUsage(config: MinimalFooterConfig): boolean {
213
235
  );
214
236
  }
215
237
 
238
+ function shouldShowExperimentalMarker(config: MinimalFooterConfig): boolean {
239
+ return config.experimentalMarker.enabled && process.env.PI_EXPERIMENTAL === "1";
240
+ }
241
+
216
242
  function clearUsageState(state: UsageSessionState): void {
217
243
  state.snapshot = undefined;
218
244
  state.lastFetchedAt = undefined;
@@ -317,6 +343,10 @@ export default function (pi: ExtensionAPI) {
317
343
  if (state.config.context.showPercent) contextParts.push(theme.fg("dim", context));
318
344
  if (inDumbZone) contextParts.push(theme.fg(dumbZone.color, dumbZone.label));
319
345
  if (usageSummary) contextParts.push(theme.fg("dim", usageSummary));
346
+ if (shouldShowExperimentalMarker(state.config)) {
347
+ const marker = state.config.experimentalMarker;
348
+ contextParts.push(theme.fg(marker.color, marker.label));
349
+ }
320
350
  const contextStyled = contextParts.join(theme.fg("dim", " · "));
321
351
  const modelStyled = theme.fg("dim", modelText);
322
352
 
@@ -22,5 +22,10 @@
22
22
  "label": "7d"
23
23
  }
24
24
  }
25
+ },
26
+ "experimentalMarker": {
27
+ "enabled": true,
28
+ "label": "xp",
29
+ "color": "warning"
25
30
  }
26
31
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegopetrucci/pi-minimal-footer",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "A minimal custom footer for pi.",
5
5
  "keywords": [
6
6
  "pi-package",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegopetrucci/pi-extensions",
3
- "version": "0.1.47",
3
+ "version": "0.1.48",
4
4
  "description": "A collection of pi extensions and skills for annotation UIs, context management, workflow audits, review-comment triage, notifications, brrr push alerts, safety guards, GitHub research, repo-local knowledge, todos, tool rendering, model/provider helpers, and Xiaohei-style article illustrations.",
5
5
  "keywords": [
6
6
  "pi-package",