@diegopetrucci/pi-extensions 0.1.57 → 0.1.59
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/.pi-fleet-tested-version +1 -1
- package/extensions/agent-workflow-audit/.pi-fleet-tested-version +1 -1
- package/extensions/agent-workflow-audit/index.ts +8 -1
- package/extensions/agent-workflow-audit/package.json +5 -1
- package/extensions/annotate-git-diff/.pi-fleet-tested-version +1 -1
- package/extensions/annotate-git-diff/package.json +5 -2
- package/extensions/annotate-last-message/.pi-fleet-tested-version +1 -1
- package/extensions/annotate-last-message/package.json +5 -2
- package/extensions/brrr/.pi-fleet-tested-version +1 -1
- package/extensions/brrr/README.md +2 -2
- package/extensions/brrr/package.json +5 -1
- package/extensions/claude-fast/.pi-fleet-tested-version +1 -1
- package/extensions/claude-fast/package.json +5 -1
- package/extensions/code-reviewer/.pi-fleet-tested-version +1 -1
- package/extensions/code-reviewer/index.ts +129 -39
- package/extensions/code-reviewer/package.json +5 -1
- package/extensions/confirm-destructive/.pi-fleet-tested-version +1 -1
- package/extensions/confirm-destructive/README.md +1 -1
- package/extensions/confirm-destructive/index.ts +20 -5
- package/extensions/confirm-destructive/package.json +5 -1
- package/extensions/context-cap/.pi-fleet-tested-version +1 -1
- package/extensions/context-cap/package.json +5 -1
- package/extensions/context-inspector/.pi-fleet-tested-version +1 -1
- package/extensions/context-inspector/package.json +5 -1
- package/extensions/contrarian/.pi-fleet-tested-version +1 -1
- package/extensions/contrarian/README.md +1 -1
- package/extensions/contrarian/index.ts +199 -40
- package/extensions/contrarian/package.json +5 -1
- package/extensions/dirty-repo-guard/.pi-fleet-tested-version +1 -1
- package/extensions/dirty-repo-guard/README.md +1 -1
- package/extensions/dirty-repo-guard/package.json +5 -1
- package/extensions/dynamic-context-pruning/.pi-fleet-tested-version +1 -1
- package/extensions/dynamic-context-pruning/package.json +4 -1
- package/extensions/git-footer/.pi-fleet-tested-version +1 -1
- package/extensions/git-footer/package.json +5 -1
- package/extensions/gnosis/.pi-fleet-tested-version +1 -1
- package/extensions/gnosis/package.json +5 -1
- package/extensions/illustrations-to-explain-things/.pi-fleet-tested-version +1 -1
- package/extensions/illustrations-to-explain-things/package.json +4 -1
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/01-two-breakpoints.webp +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/02-minimum-loop.webp +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/03-sort-by-purpose.webp +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/04-one-fish-many-uses.webp +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/05-handoff-path.webp +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/06-three-sources.webp +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/07-three-content-jobs.webp +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/08-handoff-copy-toolbox.webp +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/09-common-pits-no-title.webp +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/10-information-well.webp +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/11-idea-press.webp +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/12-content-fermentation.webp +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/13-system-bearing.webp +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/14-trust-bridge.webp +0 -0
- package/extensions/inline-bash/.pi-fleet-tested-version +1 -1
- package/extensions/inline-bash/README.md +1 -1
- package/extensions/inline-bash/package.json +5 -1
- package/extensions/librarian/.pi-fleet-tested-version +1 -1
- package/extensions/librarian/index.ts +393 -107
- package/extensions/librarian/package.json +5 -1
- package/extensions/minimal-footer/.pi-fleet-tested-version +1 -1
- package/extensions/minimal-footer/index.ts +2 -5
- package/extensions/minimal-footer/openai-usage.ts +58 -11
- package/extensions/minimal-footer/package.json +5 -1
- package/extensions/notify/.pi-fleet-tested-version +1 -1
- package/extensions/notify/README.md +3 -3
- package/extensions/notify/package.json +5 -1
- package/extensions/openai-fast/.pi-fleet-tested-version +1 -1
- package/extensions/openai-fast/package.json +5 -1
- package/extensions/oracle/.pi-fleet-tested-version +1 -1
- package/extensions/oracle/README.md +1 -1
- package/extensions/oracle/index.ts +200 -41
- package/extensions/oracle/package.json +5 -1
- package/extensions/permission-gate/.pi-fleet-tested-version +1 -1
- package/extensions/permission-gate/README.md +1 -1
- package/extensions/permission-gate/index.ts +453 -2
- package/extensions/permission-gate/package.json +5 -1
- package/extensions/quiet-tools/.pi-fleet-tested-version +1 -1
- package/extensions/quiet-tools/package.json +5 -1
- package/extensions/review/.pi-fleet-tested-version +1 -1
- package/extensions/review/index.ts +53 -19
- package/extensions/review/package.json +5 -1
- package/extensions/todo/.pi-fleet-tested-version +1 -1
- package/extensions/todo/README.md +1 -1
- package/extensions/todo/package.json +5 -1
- package/extensions/triage-comments/.pi-fleet-tested-version +1 -1
- package/extensions/triage-comments/index.ts +115 -34
- package/extensions/triage-comments/package.json +5 -1
- package/package.json +10 -6
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/01-two-breakpoints.png +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/02-minimum-loop.png +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/03-sort-by-purpose.png +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/04-one-fish-many-uses.png +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/05-handoff-path.png +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/06-three-sources.png +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/07-three-content-jobs.png +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/08-handoff-copy-toolbox.png +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/09-common-pits-no-title.png +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/10-information-well.png +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/11-idea-press.png +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/12-content-fermentation.png +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/13-system-bearing.png +0 -0
- package/extensions/illustrations-to-explain-things/skills/illustrations-to-explain-things/assets/examples/14-trust-bridge.png +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-librarian",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "A pi GitHub research scout with a toggleable local repo checkout cache under the user's OS cache directory.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -33,5 +33,9 @@
|
|
|
33
33
|
"@earendil-works/pi-coding-agent": "*",
|
|
34
34
|
"@earendil-works/pi-tui": "*",
|
|
35
35
|
"typebox": "*"
|
|
36
|
+
},
|
|
37
|
+
"type": "module",
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=22.19.0"
|
|
36
40
|
}
|
|
37
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.81.1
|
|
@@ -2,7 +2,6 @@ import { existsSync, readFileSync } from "node:fs";
|
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
3
|
import { basename, dirname, join } from "node:path";
|
|
4
4
|
import {
|
|
5
|
-
AuthStorage,
|
|
6
5
|
CONFIG_DIR_NAME,
|
|
7
6
|
getAgentDir,
|
|
8
7
|
type ExtensionAPI,
|
|
@@ -14,7 +13,7 @@ import {
|
|
|
14
13
|
formatUsageSummary,
|
|
15
14
|
isOpenAICodexProvider,
|
|
16
15
|
type UsageSnapshot,
|
|
17
|
-
} from "./openai-usage";
|
|
16
|
+
} from "./openai-usage.ts";
|
|
18
17
|
|
|
19
18
|
|
|
20
19
|
const DEFAULT_CONFIG: MinimalFooterConfig = {
|
|
@@ -108,7 +107,6 @@ interface MinimalFooterConfig {
|
|
|
108
107
|
}
|
|
109
108
|
|
|
110
109
|
type UsageSessionState = {
|
|
111
|
-
authStorage: AuthStorage;
|
|
112
110
|
config: MinimalFooterConfig;
|
|
113
111
|
snapshot?: UsageSnapshot;
|
|
114
112
|
lastFetchedAt?: number;
|
|
@@ -857,7 +855,7 @@ async function refreshUsageIfNeeded(
|
|
|
857
855
|
state.requestRender?.();
|
|
858
856
|
state.inflight = (async () => {
|
|
859
857
|
try {
|
|
860
|
-
const snapshot = await fetchOpenAICodexUsage(
|
|
858
|
+
const snapshot = await fetchOpenAICodexUsage(ctx.modelRegistry, {
|
|
861
859
|
timeoutMs: config.codexUsage.requestTimeoutMs,
|
|
862
860
|
});
|
|
863
861
|
if (snapshot) {
|
|
@@ -908,7 +906,6 @@ export default function (pi: ExtensionAPI) {
|
|
|
908
906
|
|
|
909
907
|
pi.on("session_start", (_event, ctx) => {
|
|
910
908
|
const state: UsageSessionState = {
|
|
911
|
-
authStorage: AuthStorage.create(),
|
|
912
909
|
config: loadConfig(ctx),
|
|
913
910
|
loading: false,
|
|
914
911
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { getAgentDir } from "@earendil-works/pi-coding-agent";
|
|
2
4
|
|
|
3
5
|
const PROVIDER_ID = "openai-codex";
|
|
4
6
|
|
|
@@ -61,10 +63,58 @@ function parseUsageSnapshot(data: WhamUsageResponse): Omit<UsageSnapshot, "fetch
|
|
|
61
63
|
};
|
|
62
64
|
}
|
|
63
65
|
|
|
64
|
-
function
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
67
|
+
return typeof value === "object" && value !== null;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function readStoredProviderCredential(providerId: string): unknown {
|
|
71
|
+
try {
|
|
72
|
+
const data = JSON.parse(readFileSync(join(getAgentDir(), "auth.json"), "utf-8")) as unknown;
|
|
73
|
+
if (!isRecord(data)) return undefined;
|
|
74
|
+
return data[providerId];
|
|
75
|
+
} catch {
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async function getAccessToken(authSource: unknown): Promise<string | undefined> {
|
|
81
|
+
if (isRecord(authSource) && typeof authSource.getProviderAuth === "function") {
|
|
82
|
+
const result = await (authSource as {
|
|
83
|
+
getProviderAuth(providerId: string): Promise<unknown>;
|
|
84
|
+
}).getProviderAuth(PROVIDER_ID);
|
|
85
|
+
if (isRecord(result) && isRecord(result.auth) && typeof result.auth.apiKey === "string") {
|
|
86
|
+
return result.auth.apiKey;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (isRecord(authSource) && typeof authSource.getApiKey === "function") {
|
|
91
|
+
const token = await (authSource as {
|
|
92
|
+
getApiKey(providerId: string, options: { includeFallback: boolean }): Promise<unknown>;
|
|
93
|
+
}).getApiKey(PROVIDER_ID, { includeFallback: false });
|
|
94
|
+
return typeof token === "string" ? token : undefined;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const credential = readStoredProviderCredential(PROVIDER_ID);
|
|
98
|
+
if (!isRecord(credential) || credential.type !== "oauth") return undefined;
|
|
99
|
+
return typeof credential.access === "string" ? credential.access : undefined;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function getOAuthAccountId(authSource: unknown): string | undefined {
|
|
103
|
+
let credential: unknown;
|
|
104
|
+
|
|
105
|
+
if (
|
|
106
|
+
isRecord(authSource) &&
|
|
107
|
+
typeof authSource.getApiKey === "function" &&
|
|
108
|
+
typeof authSource.get === "function"
|
|
109
|
+
) {
|
|
110
|
+
if (typeof authSource.reload === "function") authSource.reload();
|
|
111
|
+
credential = (authSource as { get(providerId: string): unknown }).get(PROVIDER_ID);
|
|
112
|
+
} else {
|
|
113
|
+
credential = readStoredProviderCredential(PROVIDER_ID);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (!isRecord(credential) || credential.type !== "oauth") return undefined;
|
|
117
|
+
const accountId = credential.accountId;
|
|
68
118
|
return typeof accountId === "string" && accountId.trim()
|
|
69
119
|
? accountId.trim()
|
|
70
120
|
: undefined;
|
|
@@ -96,16 +146,13 @@ export function formatUsageSummary(
|
|
|
96
146
|
}
|
|
97
147
|
|
|
98
148
|
export async function fetchOpenAICodexUsage(
|
|
99
|
-
|
|
149
|
+
authSource: unknown,
|
|
100
150
|
options?: { timeoutMs?: number },
|
|
101
151
|
): Promise<UsageSnapshot | undefined> {
|
|
102
|
-
const accessToken = await
|
|
103
|
-
includeFallback: false,
|
|
104
|
-
});
|
|
152
|
+
const accessToken = await getAccessToken(authSource);
|
|
105
153
|
if (!accessToken) return undefined;
|
|
106
154
|
|
|
107
|
-
|
|
108
|
-
const accountId = getOAuthAccountId(authStorage);
|
|
155
|
+
const accountId = getOAuthAccountId(authSource);
|
|
109
156
|
const controller = new AbortController();
|
|
110
157
|
const timeoutMs = options?.timeoutMs ?? 10_000;
|
|
111
158
|
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-minimal-footer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "A minimal custom footer for pi.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -33,5 +33,9 @@
|
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@earendil-works/pi-coding-agent": "*",
|
|
35
35
|
"@earendil-works/pi-tui": "*"
|
|
36
|
+
},
|
|
37
|
+
"type": "module",
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=22.19.0"
|
|
36
40
|
}
|
|
37
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.81.1
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# notify
|
|
2
2
|
|
|
3
|
-
A pi extension that sends notifications when the agent
|
|
3
|
+
A pi extension that sends notifications when the agent has fully settled and is waiting for input.
|
|
4
4
|
|
|
5
|
-
This started from the original `notify.ts` example in [`earendil-works/pi
|
|
5
|
+
This started from the original `notify.ts` example in [`earendil-works/pi`](https://github.com/earendil-works/pi/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
|
|
|
@@ -137,7 +137,7 @@ You can also customize the sound backend and options if needed.
|
|
|
137
137
|
|
|
138
138
|
## Notes
|
|
139
139
|
|
|
140
|
-
- Hooks the `
|
|
140
|
+
- Hooks the `agent_settled` event so automatic retries, compaction retries, and queued follow-ups do not trigger intermediate notifications.
|
|
141
141
|
- Default message is `Pi` / `Ready for input`.
|
|
142
142
|
- Terminal, desktop, bell, and sound channels can be enabled independently.
|
|
143
143
|
- To opt into sound playback, set `channels.sound` to `true`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-notify",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "A pi extension that sends a notification when the agent is ready for input.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -30,5 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@earendil-works/pi-coding-agent": "*"
|
|
33
|
+
},
|
|
34
|
+
"type": "module",
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=22.19.0"
|
|
33
37
|
}
|
|
34
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.81.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-openai-fast",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "A pi extension that enables OpenAI Codex Fast mode for ChatGPT-auth GPT-5.4, GPT-5.5, and GPT-5.6 Codex variants by injecting the priority service tier.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -31,5 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@earendil-works/pi-coding-agent": "*"
|
|
34
|
+
},
|
|
35
|
+
"type": "module",
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=22.19.0"
|
|
34
38
|
}
|
|
35
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.81.1
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
An Amp-style oracle for [pi](https://github.com/earendil-works/pi
|
|
5
|
+
An Amp-style oracle for [pi](https://github.com/earendil-works/pi).
|
|
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
|
|