@astrofoundry/pi-astro 0.6.6 → 0.7.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
@@ -62,6 +62,9 @@ pi # launch; confirm [Extensions] lists astro-agents, claude-glob
62
62
  - `multi-edit` — registers the enhanced `edit` tool
63
63
  - `gemini-image` — registers `gemini_image` tool (requires a Gemini API key; prompts and saves on first use)
64
64
  - `security-guard` — blocks/prompts destructive bash commands and sensitive file access; configure at `~/.pi/agent/security-guard.json` (example written on first run); `/security-guard status|reload|test`
65
+ - `notify-on-stop` — runs a shell command when the agent finishes a turn (sound, voice, desktop notification). macOS default: plays the Glass system sound **and** speaks "Agent done" via `say` using the **`Samantha (Enhanced)`** voice. Linux default: `notify-send "pi" "Agent done"`. Override the voice with `PI_STOP_NOTIFY_VOICE=<voice-name>` (macOS only; e.g. `Alex`, `Karen`, `Daniel (Enhanced)`). Replace the full command with `PI_STOP_NOTIFY='afplay /System/Library/Sounds/Glass.aiff && say "Done"'`. Disable everything with `PI_STOP_NOTIFY_OFF=1`. `/notify status|test|off`.
66
+ - **macOS voice install (required once for the default):** open **System Settings → Accessibility → Spoken Content → System Voice → Manage Voices…**, expand **English**, check **Samantha (Enhanced)**, click **Done** to download (~500 MB – 1 GB). Verify with `say -v "Samantha (Enhanced)" hi`. If the voice is missing, `say` errors silently and you'll only hear the Glass sound.
67
+ - `vscode-image` — only active inside VS Code's integrated terminal (`TERM_PROGRAM=vscode`). Switches pi-tui's image output to the **Kitty graphics protocol** so images returned by tools like `gemini_image` render as real pixels instead of the `[Image: …]` text fallback. **Requires enabling `Terminal › Integrated: Enable Images` in VS Code settings** (off by default); restart the integrated terminal after flipping it. Disable with `PI_VSCODE_IMAGE_OFF=1`. `/vscode-image` prints current status.
65
68
  - `claude-globals` — auto-injects `~/.claude/CLAUDE.md` into every pi session's system prompt
66
69
 
67
70
  **Bundled subagents** (callable via `astro_agent`):
@@ -0,0 +1,244 @@
1
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
2
+
3
+ const execMock = vi.fn();
4
+
5
+ vi.mock("node:child_process", () => ({
6
+ exec: (cmd: string, opts: unknown, cb?: unknown) => {
7
+ execMock(cmd, opts, cb);
8
+ // Return a chainable fake child with on/stdout/stderr
9
+ const fake = {
10
+ on: vi.fn(),
11
+ stdout: { on: vi.fn() },
12
+ stderr: { on: vi.fn() },
13
+ };
14
+ return fake;
15
+ },
16
+ }));
17
+
18
+ type Handler = (event: unknown, ctx: unknown) => void | Promise<void>;
19
+ type CommandHandler = (args: string, ctx: unknown) => Promise<void> | void;
20
+
21
+ function makePi(): {
22
+ handlers: Record<string, Handler>;
23
+ commands: Map<string, { handler: CommandHandler }>;
24
+ on: (event: string, h: Handler) => void;
25
+ registerCommand: (name: string, opts: { description?: string; handler: CommandHandler }) => void;
26
+ } {
27
+ const handlers: Record<string, Handler> = {};
28
+ const commands = new Map();
29
+ return {
30
+ handlers,
31
+ commands,
32
+ on: (event, h) => {
33
+ handlers[event] = h;
34
+ },
35
+ registerCommand: (name, opts) => {
36
+ commands.set(name, { handler: opts.handler });
37
+ },
38
+ };
39
+ }
40
+
41
+ function makeCtx(): { ui: { notify: ReturnType<typeof vi.fn> } } {
42
+ return { ui: { notify: vi.fn() } };
43
+ }
44
+
45
+ const origPlatform = Object.getOwnPropertyDescriptor(process, "platform")!;
46
+
47
+ function setPlatform(p: NodeJS.Platform): void {
48
+ Object.defineProperty(process, "platform", { value: p, configurable: true });
49
+ }
50
+
51
+ describe("notify-on-stop", () => {
52
+ const origCmd = process.env.PI_STOP_NOTIFY;
53
+ const origOff = process.env.PI_STOP_NOTIFY_OFF;
54
+ const origVoice = process.env.PI_STOP_NOTIFY_VOICE;
55
+
56
+ beforeEach(() => {
57
+ vi.resetModules();
58
+ execMock.mockReset();
59
+ delete process.env.PI_STOP_NOTIFY;
60
+ delete process.env.PI_STOP_NOTIFY_OFF;
61
+ delete process.env.PI_STOP_NOTIFY_VOICE;
62
+ });
63
+
64
+ afterEach(() => {
65
+ Object.defineProperty(process, "platform", origPlatform);
66
+ if (origCmd === undefined) delete process.env.PI_STOP_NOTIFY;
67
+ else process.env.PI_STOP_NOTIFY = origCmd;
68
+ if (origOff === undefined) delete process.env.PI_STOP_NOTIFY_OFF;
69
+ else process.env.PI_STOP_NOTIFY_OFF = origOff;
70
+ if (origVoice === undefined) delete process.env.PI_STOP_NOTIFY_VOICE;
71
+ else process.env.PI_STOP_NOTIFY_VOICE = origVoice;
72
+ });
73
+
74
+ it("runs default command on agent_end (macOS): afplay + say with Samantha (Enhanced)", async () => {
75
+ setPlatform("darwin");
76
+ const mod = await import("./index.ts");
77
+ const pi = makePi();
78
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
79
+ pi.handlers.agent_end({}, makeCtx());
80
+ expect(execMock).toHaveBeenCalled();
81
+ const cmd = execMock.mock.calls[0][0] as string;
82
+ expect(cmd).toMatch(/^afplay \/System\/Library\/Sounds\/Glass\.aiff && say -v /);
83
+ expect(cmd).toContain("'Samantha (Enhanced)'");
84
+ expect(cmd).toContain("'Agent done'");
85
+ });
86
+
87
+ it("PI_STOP_NOTIFY_VOICE overrides the default voice (macOS)", async () => {
88
+ setPlatform("darwin");
89
+ process.env.PI_STOP_NOTIFY_VOICE = "Alex";
90
+ const mod = await import("./index.ts");
91
+ const pi = makePi();
92
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
93
+ pi.handlers.agent_end({}, makeCtx());
94
+ const cmd = execMock.mock.calls[0][0] as string;
95
+ expect(cmd).toContain("say -v 'Alex'");
96
+ expect(cmd).not.toContain("Samantha");
97
+ });
98
+
99
+ it("PI_STOP_NOTIFY_VOICE with apostrophes is POSIX-safely quoted", async () => {
100
+ setPlatform("darwin");
101
+ process.env.PI_STOP_NOTIFY_VOICE = "O'Neill";
102
+ const mod = await import("./index.ts");
103
+ const pi = makePi();
104
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
105
+ pi.handlers.agent_end({}, makeCtx());
106
+ const cmd = execMock.mock.calls[0][0] as string;
107
+ expect(cmd).toContain("say -v 'O'\\''Neill'");
108
+ });
109
+
110
+ it("PI_STOP_NOTIFY_VOICE with only whitespace falls back to default voice (macOS)", async () => {
111
+ setPlatform("darwin");
112
+ process.env.PI_STOP_NOTIFY_VOICE = " ";
113
+ const mod = await import("./index.ts");
114
+ const pi = makePi();
115
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
116
+ pi.handlers.agent_end({}, makeCtx());
117
+ const cmd = execMock.mock.calls[0][0] as string;
118
+ expect(cmd).toContain("'Samantha (Enhanced)'");
119
+ });
120
+
121
+ it("PI_STOP_NOTIFY_VOICE is ignored when PI_STOP_NOTIFY overrides the full command", async () => {
122
+ setPlatform("darwin");
123
+ process.env.PI_STOP_NOTIFY = "my custom --cmd";
124
+ process.env.PI_STOP_NOTIFY_VOICE = "Alex";
125
+ const mod = await import("./index.ts");
126
+ const pi = makePi();
127
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
128
+ pi.handlers.agent_end({}, makeCtx());
129
+ expect(execMock.mock.calls[0][0]).toBe("my custom --cmd");
130
+ });
131
+
132
+ it("PI_STOP_NOTIFY_VOICE has no effect on Linux default", async () => {
133
+ setPlatform("linux");
134
+ process.env.PI_STOP_NOTIFY_VOICE = "Alex";
135
+ const mod = await import("./index.ts");
136
+ const pi = makePi();
137
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
138
+ pi.handlers.agent_end({}, makeCtx());
139
+ const cmd = execMock.mock.calls[0][0] as string;
140
+ expect(cmd).toMatch(/notify-send/);
141
+ expect(cmd).not.toContain("say");
142
+ expect(cmd).not.toContain("Alex");
143
+ });
144
+
145
+ it("runs custom PI_STOP_NOTIFY over default", async () => {
146
+ setPlatform("darwin");
147
+ process.env.PI_STOP_NOTIFY = "my custom --cmd";
148
+ const mod = await import("./index.ts");
149
+ const pi = makePi();
150
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
151
+ pi.handlers.agent_end({}, makeCtx());
152
+ expect(execMock.mock.calls[0][0]).toBe("my custom --cmd");
153
+ });
154
+
155
+ it("does NOT run anything when PI_STOP_NOTIFY_OFF=1", async () => {
156
+ setPlatform("darwin");
157
+ process.env.PI_STOP_NOTIFY_OFF = "1";
158
+ const mod = await import("./index.ts");
159
+ const pi = makePi();
160
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
161
+ pi.handlers.agent_end({}, makeCtx());
162
+ expect(execMock).not.toHaveBeenCalled();
163
+ });
164
+
165
+ it("does nothing on an unsupported platform with no env", async () => {
166
+ setPlatform("win32");
167
+ const mod = await import("./index.ts");
168
+ const pi = makePi();
169
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
170
+ pi.handlers.agent_end({}, makeCtx());
171
+ expect(execMock).not.toHaveBeenCalled();
172
+ });
173
+
174
+ it("Linux default uses notify-send", async () => {
175
+ setPlatform("linux");
176
+ const mod = await import("./index.ts");
177
+ const pi = makePi();
178
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
179
+ pi.handlers.agent_end({}, makeCtx());
180
+ expect(execMock.mock.calls[0][0]).toMatch(/notify-send/);
181
+ });
182
+
183
+ it("trims whitespace on PI_STOP_NOTIFY and ignores empty strings", async () => {
184
+ setPlatform("darwin");
185
+ process.env.PI_STOP_NOTIFY = " ";
186
+ const mod = await import("./index.ts");
187
+ const pi = makePi();
188
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
189
+ pi.handlers.agent_end({}, makeCtx());
190
+ expect(execMock.mock.calls[0][0]).toMatch(/afplay/);
191
+ });
192
+
193
+ it("/notify status reports current command", async () => {
194
+ setPlatform("darwin");
195
+ const mod = await import("./index.ts");
196
+ const pi = makePi();
197
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
198
+ const ctx = makeCtx();
199
+ await pi.commands.get("notify")!.handler("status", ctx);
200
+ expect(ctx.ui.notify).toHaveBeenCalledWith(expect.stringMatching(/afplay/), "info");
201
+ });
202
+
203
+ it("/notify status reports disabled when PI_STOP_NOTIFY_OFF", async () => {
204
+ setPlatform("darwin");
205
+ process.env.PI_STOP_NOTIFY_OFF = "1";
206
+ const mod = await import("./index.ts");
207
+ const pi = makePi();
208
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
209
+ const ctx = makeCtx();
210
+ await pi.commands.get("notify")!.handler("", ctx);
211
+ expect(ctx.ui.notify).toHaveBeenCalledWith(expect.stringMatching(/disabled/), "info");
212
+ });
213
+
214
+ it("/notify test runs the command immediately", async () => {
215
+ setPlatform("darwin");
216
+ process.env.PI_STOP_NOTIFY = "test-cmd";
217
+ const mod = await import("./index.ts");
218
+ const pi = makePi();
219
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
220
+ const ctx = makeCtx();
221
+ await pi.commands.get("notify")!.handler("test", ctx);
222
+ expect(execMock.mock.calls[0][0]).toBe("test-cmd");
223
+ });
224
+
225
+ it("/notify test warns when nothing configured", async () => {
226
+ setPlatform("win32");
227
+ const mod = await import("./index.ts");
228
+ const pi = makePi();
229
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
230
+ const ctx = makeCtx();
231
+ await pi.commands.get("notify")!.handler("test", ctx);
232
+ expect(ctx.ui.notify).toHaveBeenCalledWith(expect.stringMatching(/nothing configured/), "warning");
233
+ });
234
+
235
+ it("/notify off gives persistence guidance", async () => {
236
+ setPlatform("darwin");
237
+ const mod = await import("./index.ts");
238
+ const pi = makePi();
239
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
240
+ const ctx = makeCtx();
241
+ await pi.commands.get("notify")!.handler("off", ctx);
242
+ expect(ctx.ui.notify).toHaveBeenCalledWith(expect.stringMatching(/PI_STOP_NOTIFY_OFF/), "info");
243
+ });
244
+ });
@@ -0,0 +1,81 @@
1
+ import { exec } from "node:child_process";
2
+ import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
3
+
4
+ const ENV_CMD = "PI_STOP_NOTIFY";
5
+ const ENV_OFF = "PI_STOP_NOTIFY_OFF";
6
+ const ENV_VOICE = "PI_STOP_NOTIFY_VOICE";
7
+ const TIMEOUT_MS = 10_000;
8
+ const DEFAULT_VOICE = "Samantha (Enhanced)";
9
+ const MACOS_SPOKEN_MESSAGE = "Agent done";
10
+
11
+ function shellQuote(value: string): string {
12
+ return `'${value.replace(/'/g, "'\\''")}'`;
13
+ }
14
+
15
+ function defaultCommand(): string | undefined {
16
+ if (process.platform === "darwin") {
17
+ const voice = process.env[ENV_VOICE]?.trim() || DEFAULT_VOICE;
18
+ const sound = "afplay /System/Library/Sounds/Glass.aiff";
19
+ const speak = `say -v ${shellQuote(voice)} ${shellQuote(MACOS_SPOKEN_MESSAGE)}`;
20
+ return `${sound} && ${speak}`;
21
+ }
22
+ if (process.platform === "linux") {
23
+ return 'command -v notify-send >/dev/null 2>&1 && notify-send "pi" "Agent done"';
24
+ }
25
+ return undefined;
26
+ }
27
+
28
+ function resolveCommand(): string | undefined {
29
+ if (process.env[ENV_OFF] === "1") return undefined;
30
+ const custom = process.env[ENV_CMD]?.trim();
31
+ if (custom) return custom;
32
+ return defaultCommand();
33
+ }
34
+
35
+ function runNotify(cmd: string): void {
36
+ const child = exec(cmd, { shell: "/bin/sh", timeout: TIMEOUT_MS });
37
+ // Swallow errors so a broken notify command never surfaces into pi output.
38
+ child.on("error", () => {});
39
+ child.stderr?.on("data", () => {});
40
+ child.stdout?.on("data", () => {});
41
+ }
42
+
43
+ export default function notifyOnStopExtension(pi: ExtensionAPI): void {
44
+ pi.on("agent_end", () => {
45
+ const cmd = resolveCommand();
46
+ if (!cmd) return;
47
+ runNotify(cmd);
48
+ });
49
+
50
+ pi.registerCommand("notify", {
51
+ description:
52
+ "Stop-notify status/test. Usage: /notify [status|test|off]. Configure via env PI_STOP_NOTIFY (full override) or PI_STOP_NOTIFY_VOICE (macOS default voice); disable with PI_STOP_NOTIFY_OFF=1.",
53
+ handler: async (args, ctx) => {
54
+ const sub = args.trim().toLowerCase() || "status";
55
+ if (sub === "test") {
56
+ const cmd = resolveCommand();
57
+ if (!cmd) {
58
+ ctx.ui.notify("notify: nothing configured / disabled", "warning");
59
+ return;
60
+ }
61
+ runNotify(cmd);
62
+ ctx.ui.notify(`notify: ran "${cmd}"`, "info");
63
+ return;
64
+ }
65
+ if (sub === "off") {
66
+ ctx.ui.notify(
67
+ `notify: to disable persistently, set ${ENV_OFF}=1 in your shell rc; this session's behavior is driven by env at startup.`,
68
+ "info",
69
+ );
70
+ return;
71
+ }
72
+ const cmd = resolveCommand();
73
+ ctx.ui.notify(
74
+ cmd
75
+ ? `notify: will run "${cmd}" on agent_end`
76
+ : `notify: disabled (no default for this platform or ${ENV_OFF}=1)`,
77
+ "info",
78
+ );
79
+ },
80
+ });
81
+ }
@@ -0,0 +1,114 @@
1
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
2
+
3
+ const setCapabilitiesMock = vi.fn();
4
+
5
+ vi.mock("@mariozechner/pi-tui", () => ({
6
+ setCapabilities: setCapabilitiesMock,
7
+ }));
8
+
9
+ type CommandHandler = (args: string, ctx: unknown) => Promise<void> | void;
10
+
11
+ function makePi(): {
12
+ commands: Map<string, { handler: CommandHandler }>;
13
+ registerCommand: (name: string, opts: { description?: string; handler: CommandHandler }) => void;
14
+ } {
15
+ const commands = new Map<string, { handler: CommandHandler }>();
16
+ return {
17
+ commands,
18
+ registerCommand: (name, opts) => {
19
+ commands.set(name, { handler: opts.handler });
20
+ },
21
+ };
22
+ }
23
+
24
+ function makeCtx(): { ui: { notify: ReturnType<typeof vi.fn> } } {
25
+ return { ui: { notify: vi.fn() } };
26
+ }
27
+
28
+ describe("vscode-image", () => {
29
+ const origTerm = process.env.TERM_PROGRAM;
30
+ const origOff = process.env.PI_VSCODE_IMAGE_OFF;
31
+
32
+ beforeEach(() => {
33
+ vi.resetModules();
34
+ setCapabilitiesMock.mockReset();
35
+ delete process.env.TERM_PROGRAM;
36
+ delete process.env.PI_VSCODE_IMAGE_OFF;
37
+ });
38
+
39
+ afterEach(() => {
40
+ if (origTerm === undefined) delete process.env.TERM_PROGRAM;
41
+ else process.env.TERM_PROGRAM = origTerm;
42
+ if (origOff === undefined) delete process.env.PI_VSCODE_IMAGE_OFF;
43
+ else process.env.PI_VSCODE_IMAGE_OFF = origOff;
44
+ });
45
+
46
+ it("does nothing when TERM_PROGRAM is unset", async () => {
47
+ const mod = await import("./index.ts");
48
+ const pi = makePi();
49
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
50
+ expect(setCapabilitiesMock).not.toHaveBeenCalled();
51
+ expect(pi.commands.has("vscode-image")).toBe(false);
52
+ });
53
+
54
+ it("does nothing when TERM_PROGRAM is not vscode", async () => {
55
+ process.env.TERM_PROGRAM = "iterm.app";
56
+ const mod = await import("./index.ts");
57
+ const pi = makePi();
58
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
59
+ expect(setCapabilitiesMock).not.toHaveBeenCalled();
60
+ expect(pi.commands.has("vscode-image")).toBe(false);
61
+ });
62
+
63
+ it("enables Kitty protocol when TERM_PROGRAM=vscode", async () => {
64
+ process.env.TERM_PROGRAM = "vscode";
65
+ const mod = await import("./index.ts");
66
+ const pi = makePi();
67
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
68
+ expect(setCapabilitiesMock).toHaveBeenCalledWith({
69
+ images: "kitty",
70
+ trueColor: true,
71
+ hyperlinks: true,
72
+ });
73
+ expect(pi.commands.has("vscode-image")).toBe(true);
74
+ });
75
+
76
+ it("matches TERM_PROGRAM case-insensitively", async () => {
77
+ process.env.TERM_PROGRAM = "VSCode";
78
+ const mod = await import("./index.ts");
79
+ const pi = makePi();
80
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
81
+ expect(setCapabilitiesMock).toHaveBeenCalled();
82
+ });
83
+
84
+ it("skips setCapabilities when PI_VSCODE_IMAGE_OFF=1 but still registers command", async () => {
85
+ process.env.TERM_PROGRAM = "vscode";
86
+ process.env.PI_VSCODE_IMAGE_OFF = "1";
87
+ const mod = await import("./index.ts");
88
+ const pi = makePi();
89
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
90
+ expect(setCapabilitiesMock).not.toHaveBeenCalled();
91
+ expect(pi.commands.has("vscode-image")).toBe(true);
92
+ });
93
+
94
+ it("/vscode-image reports enabled state", async () => {
95
+ process.env.TERM_PROGRAM = "vscode";
96
+ const mod = await import("./index.ts");
97
+ const pi = makePi();
98
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
99
+ const ctx = makeCtx();
100
+ await pi.commands.get("vscode-image")!.handler("", ctx);
101
+ expect(ctx.ui.notify).toHaveBeenCalledWith(expect.stringMatching(/Kitty/), "info");
102
+ });
103
+
104
+ it("/vscode-image reports disabled when PI_VSCODE_IMAGE_OFF=1", async () => {
105
+ process.env.TERM_PROGRAM = "vscode";
106
+ process.env.PI_VSCODE_IMAGE_OFF = "1";
107
+ const mod = await import("./index.ts");
108
+ const pi = makePi();
109
+ mod.default(pi as unknown as Parameters<typeof mod.default>[0]);
110
+ const ctx = makeCtx();
111
+ await pi.commands.get("vscode-image")!.handler("", ctx);
112
+ expect(ctx.ui.notify).toHaveBeenCalledWith(expect.stringMatching(/disabled/), "info");
113
+ });
114
+ });
@@ -0,0 +1,42 @@
1
+ import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
2
+ import { setCapabilities } from "@mariozechner/pi-tui";
3
+
4
+ const ENV_OFF = "PI_VSCODE_IMAGE_OFF";
5
+
6
+ function inVSCode(): boolean {
7
+ return process.env.TERM_PROGRAM?.toLowerCase() === "vscode";
8
+ }
9
+
10
+ function isDisabled(): boolean {
11
+ return process.env[ENV_OFF] === "1";
12
+ }
13
+
14
+ export default function vscodeImageExtension(pi: ExtensionAPI): void {
15
+ if (!inVSCode()) return;
16
+
17
+ if (!isDisabled()) {
18
+ setCapabilities({
19
+ images: "kitty",
20
+ trueColor: true,
21
+ hyperlinks: true,
22
+ });
23
+ }
24
+
25
+ pi.registerCommand("vscode-image", {
26
+ description:
27
+ "VSCode image-protocol status. Usage: /vscode-image. Disable with PI_VSCODE_IMAGE_OFF=1 (requires pi restart).",
28
+ handler: async (_args, ctx) => {
29
+ if (isDisabled()) {
30
+ ctx.ui.notify(
31
+ `vscode-image: disabled (${ENV_OFF}=1). Unset the env var and restart pi to re-enable.`,
32
+ "info",
33
+ );
34
+ return;
35
+ }
36
+ ctx.ui.notify(
37
+ "vscode-image: Kitty graphics protocol enabled. Ensure \"Terminal > Integrated: Enable Images\" is ON in VS Code settings.",
38
+ "info",
39
+ );
40
+ },
41
+ });
42
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrofoundry/pi-astro",
3
- "version": "0.6.6",
3
+ "version": "0.7.0",
4
4
  "description": "Personal pi customizations (extensions, skills, prompts, themes) for the pi coding agent.",
5
5
  "keywords": [
6
6
  "pi-package"