@diegopetrucci/pi-extensions 0.1.13 → 0.1.14

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,6 +1,6 @@
1
1
  # pi-extensions
2
2
 
3
- A collection of [pi](https://github.com/badlogic/pi-mono) agent extensions I made:
3
+ A collection of [pi](https://github.com/earendil-works/pi-mono) agent extensions I made:
4
4
 
5
5
  - [`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.
6
6
  - [`oracle`](./extensions/oracle): Adds an Amp-style read-only oracle tool that auto-selects the strongest reasoning model on the current provider/subscription, covers pi’s built-in providers with hardcoded rankings, sets reasoning to xhigh by default, and shows live status while running.
@@ -21,7 +21,7 @@ pi install npm:@diegopetrucci/pi-extensions
21
21
  Or pin the GitHub package to this release:
22
22
 
23
23
  ```bash
24
- pi install git:github.com/diegopetrucci/pi-extensions@v0.1.13
24
+ pi install git:github.com/diegopetrucci/pi-extensions@v0.1.14
25
25
  ```
26
26
 
27
27
  Or a specific extension:
@@ -2,7 +2,7 @@
2
2
 
3
3
  A small pi extension that asks for confirmation before destructive session actions.
4
4
 
5
- This is adapted from the original `confirm-destructive.ts` example in [`badlogic/pi-mono`](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/examples/extensions/confirm-destructive.ts) and kept basically the same.
5
+ This is adapted from the original `confirm-destructive.ts` example in [`earendil-works/pi-mono`](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/examples/extensions/confirm-destructive.ts) and kept basically the same.
6
6
 
7
7
  ## What it checks
8
8
 
@@ -5,7 +5,7 @@
5
5
  * Demonstrates how to cancel session events using the before_* events.
6
6
  */
7
7
 
8
- import type { ExtensionAPI, SessionBeforeSwitchEvent, SessionMessageEntry } from "@mariozechner/pi-coding-agent";
8
+ import type { ExtensionAPI, SessionBeforeSwitchEvent, SessionMessageEntry } from "@earendil-works/pi-coding-agent";
9
9
 
10
10
  export default function (pi: ExtensionAPI) {
11
11
  pi.on("session_before_switch", async (event: SessionBeforeSwitchEvent, ctx) => {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegopetrucci/pi-confirm-destructive",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A pi extension that confirms destructive session actions.",
5
5
  "keywords": ["pi-package", "pi", "session", "safety"],
6
6
  "license": "MIT",
@@ -22,6 +22,6 @@
22
22
  ]
23
23
  },
24
24
  "peerDependencies": {
25
- "@mariozechner/pi-coding-agent": "*"
25
+ "@earendil-works/pi-coding-agent": "*"
26
26
  }
27
27
  }
@@ -5,8 +5,8 @@ import {
5
5
  getAgentDir,
6
6
  type ExtensionAPI,
7
7
  type ExtensionContext,
8
- } from "@mariozechner/pi-coding-agent";
9
- import { truncateToWidth, visibleWidth } from "@mariozechner/pi-tui";
8
+ } from "@earendil-works/pi-coding-agent";
9
+ import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
10
10
  import {
11
11
  fetchOpenAICodexUsage,
12
12
  formatUsageSummary,
@@ -1,4 +1,4 @@
1
- import { AuthStorage } from "@mariozechner/pi-coding-agent";
1
+ import { AuthStorage } from "@earendil-works/pi-coding-agent";
2
2
 
3
3
  const PROVIDER_ID = "openai-codex";
4
4
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegopetrucci/pi-minimal-footer",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "A minimal custom footer for pi.",
5
5
  "keywords": ["pi-package", "pi", "terminal", "footer"],
6
6
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  "image": "https://raw.githubusercontent.com/diegopetrucci/pi-extensions/main/assets/minimal-footer-preview.png"
26
26
  },
27
27
  "peerDependencies": {
28
- "@mariozechner/pi-coding-agent": "*",
29
- "@mariozechner/pi-tui": "*"
28
+ "@earendil-works/pi-coding-agent": "*",
29
+ "@earendil-works/pi-tui": "*"
30
30
  }
31
31
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  A pi extension that sends notifications when the agent finishes and is waiting for input.
4
4
 
5
- This started from the original `notify.ts` example in [`badlogic/pi-mono`](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/examples/extensions/notify.ts), but now supports multiple notification channels and JSON configuration.
5
+ This started from the original `notify.ts` example in [`earendil-works/pi-mono`](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/examples/extensions/notify.ts), but now supports multiple notification channels and JSON configuration.
6
6
 
7
7
  ## Supported notification channels
8
8
 
@@ -16,8 +16,8 @@
16
16
  import { execFile } from "node:child_process";
17
17
  import { existsSync, readFileSync } from "node:fs";
18
18
  import { join } from "node:path";
19
- import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
20
- import { getAgentDir } from "@mariozechner/pi-coding-agent";
19
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
20
+ import { getAgentDir } from "@earendil-works/pi-coding-agent";
21
21
 
22
22
  type TerminalBackend = "auto" | "osc777" | "osc99" | "none";
23
23
  type DesktopBackend = "auto" | "macos" | "linux" | "windows-toast" | "none";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegopetrucci/pi-notify",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A pi extension that sends a notification when the agent is ready for input.",
5
5
  "keywords": ["pi-package", "pi", "notification", "terminal"],
6
6
  "license": "MIT",
@@ -23,6 +23,6 @@
23
23
  ]
24
24
  },
25
25
  "peerDependencies": {
26
- "@mariozechner/pi-coding-agent": "*"
26
+ "@earendil-works/pi-coding-agent": "*"
27
27
  }
28
28
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  ![oracle preview](https://raw.githubusercontent.com/diegopetrucci/pi-extensions/main/assets/oracle-preview.svg)
4
4
 
5
- An Amp-style oracle for [pi](https://github.com/badlogic/pi-mono).
5
+ An Amp-style oracle for [pi](https://github.com/earendil-works/pi-mono).
6
6
 
7
7
  It adds an `oracle` tool that spins up a separate read-only pi subprocess and sends it to the strongest reasoning model available on the **same provider/subscription** the user is currently using.
8
8
 
@@ -1,10 +1,10 @@
1
1
  import { spawn } from "node:child_process";
2
2
  import { existsSync } from "node:fs";
3
3
  import { basename } from "node:path";
4
- import { StringEnum } from "@mariozechner/pi-ai";
5
- import { getMarkdownTheme, type ExtensionAPI } from "@mariozechner/pi-coding-agent";
6
- import { Container, Markdown, Spacer, Text } from "@mariozechner/pi-tui";
7
- import { Type } from "@sinclair/typebox";
4
+ import { StringEnum } from "@earendil-works/pi-ai";
5
+ import { getMarkdownTheme, type ExtensionAPI } from "@earendil-works/pi-coding-agent";
6
+ import { Container, Markdown, Spacer, Text } from "@earendil-works/pi-tui";
7
+ import { Type } from "typebox";
8
8
 
9
9
  type ThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
10
10
 
@@ -171,14 +171,6 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
171
171
  "gemini-2.5-flash-lite-preview",
172
172
  "gemini-2.5-flash-lite",
173
173
  ],
174
- "google-antigravity": [
175
- "claude-opus-4-6-thinking",
176
- "claude-sonnet-4-5-thinking",
177
- "gemini-3.1-pro-low",
178
- "gemini-3-flash",
179
- "gemini-2.0-flash",
180
- ],
181
- "google-gemini-cli": ["gemini-3-pro-preview", "gemini-2.5-pro", "gemini-1.5-flash"],
182
174
  "google-vertex": [
183
175
  "gemini-3.1-pro-preview-customtools",
184
176
  "gemini-3.1-pro-preview",
@@ -335,6 +327,28 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
335
327
  "grok-3-mini-fast",
336
328
  "grok-3-latest",
337
329
  ],
330
+ xiaomi: ["mimo-v2.5-pro", "mimo-v2.5", "mimo-v2-pro", "mimo-v2-omni", "mimo-v2-flash"],
331
+ "xiaomi-token-plan-ams": [
332
+ "mimo-v2.5-pro",
333
+ "mimo-v2.5",
334
+ "mimo-v2-pro",
335
+ "mimo-v2-omni",
336
+ "mimo-v2-flash",
337
+ ],
338
+ "xiaomi-token-plan-cn": [
339
+ "mimo-v2.5-pro",
340
+ "mimo-v2.5",
341
+ "mimo-v2-pro",
342
+ "mimo-v2-omni",
343
+ "mimo-v2-flash",
344
+ ],
345
+ "xiaomi-token-plan-sgp": [
346
+ "mimo-v2.5-pro",
347
+ "mimo-v2.5",
348
+ "mimo-v2-pro",
349
+ "mimo-v2-omni",
350
+ "mimo-v2-flash",
351
+ ],
338
352
  zai: [
339
353
  "glm-5.1",
340
354
  "glm-5-turbo",
@@ -348,7 +362,6 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
348
362
  ],
349
363
  moonshotai: ["kimi-k2.6", "kimi-k2-thinking-turbo", "kimi-k2-thinking", "kimi-k2.5"],
350
364
  "moonshotai-cn": ["kimi-k2.6", "kimi-k2-thinking-turbo", "kimi-k2-thinking", "kimi-k2.5"],
351
- "gemini-cli": ["gemini-3-pro-preview", "gemini-2.5-pro", "gemini-1.5-flash"],
352
365
  };
353
366
 
354
367
  const ORACLE_SYSTEM_PROMPT = [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegopetrucci/pi-oracle",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "An Amp-style oracle extension for pi that consults the strongest reasoning model on your current provider.",
5
5
  "keywords": ["pi-package", "pi", "oracle", "reasoning", "subagent"],
6
6
  "license": "MIT",
@@ -23,7 +23,9 @@
23
23
  "image": "https://raw.githubusercontent.com/diegopetrucci/pi-extensions/main/assets/oracle-preview.svg"
24
24
  },
25
25
  "peerDependencies": {
26
- "@mariozechner/pi-coding-agent": "*",
27
- "@mariozechner/pi-tui": "*"
26
+ "@earendil-works/pi-ai": "*",
27
+ "@earendil-works/pi-coding-agent": "*",
28
+ "@earendil-works/pi-tui": "*",
29
+ "typebox": "*"
28
30
  }
29
31
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  A small pi extension that prompts for confirmation before running potentially dangerous bash commands.
4
4
 
5
- This is adapted from the original `permission-gate.ts` example in [`badlogic/pi-mono`](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/examples/extensions/permission-gate.ts) and kept basically the same.
5
+ This is adapted from the original `permission-gate.ts` example in [`earendil-works/pi-mono`](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/examples/extensions/permission-gate.ts) and kept basically the same.
6
6
 
7
7
  ## What it checks
8
8
 
@@ -5,7 +5,7 @@
5
5
  * Patterns checked: rm -rf, sudo, chmod/chown 777
6
6
  */
7
7
 
8
- import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
8
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
9
9
 
10
10
  export default function (pi: ExtensionAPI) {
11
11
  const dangerousPatterns = [/\brm\s+(-rf?|--recursive)/i, /\bsudo\b/i, /\b(chmod|chown)\b.*777/i];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegopetrucci/pi-permission-gate",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A pi extension that prompts before dangerous bash commands.",
5
5
  "keywords": ["pi-package", "pi", "security", "bash"],
6
6
  "license": "MIT",
@@ -22,6 +22,6 @@
22
22
  ]
23
23
  },
24
24
  "peerDependencies": {
25
- "@mariozechner/pi-coding-agent": "*"
25
+ "@earendil-works/pi-coding-agent": "*"
26
26
  }
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegopetrucci/pi-extensions",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "A collection of pi extensions, including a minimal custom footer, an Amp-style oracle, a permission gate for dangerous bash commands, confirm-before-destructive session actions, and terminal notifications when pi is ready for input.",
5
5
  "keywords": ["pi-package", "pi", "terminal", "agent"],
6
6
  "license": "MIT",
@@ -21,8 +21,10 @@
21
21
  "access": "public"
22
22
  },
23
23
  "peerDependencies": {
24
- "@mariozechner/pi-coding-agent": "*",
25
- "@mariozechner/pi-tui": "*"
24
+ "@earendil-works/pi-ai": "*",
25
+ "@earendil-works/pi-coding-agent": "*",
26
+ "@earendil-works/pi-tui": "*",
27
+ "typebox": "*"
26
28
  },
27
29
  "pi": {
28
30
  "extensions": [