@mystilleef/pi-subagent 0.4.0 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mystilleef/pi-subagent",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Pi subagent for the SPAE Framework",
5
5
  "author": "Lateef Alabi-Oki <mystilleef@gmail.com>",
6
6
  "license": "MIT",
@@ -64,12 +64,12 @@
64
64
  },
65
65
  "devDependencies": {
66
66
  "@biomejs/biome": "^2.4.15",
67
- "@earendil-works/pi-agent-core": "^0.74.1",
68
- "@earendil-works/pi-ai": "^0.74.1",
69
- "@earendil-works/pi-coding-agent": "^0.74.1",
70
- "@earendil-works/pi-tui": "^0.74.1",
67
+ "@earendil-works/pi-agent-core": "^0.75.4",
68
+ "@earendil-works/pi-ai": "^0.75.4",
69
+ "@earendil-works/pi-coding-agent": "^0.75.4",
70
+ "@earendil-works/pi-tui": "^0.75.4",
71
71
  "@types/bun": "^1.3.14",
72
- "@types/node": "^25.8.0",
72
+ "@types/node": "^25.9.1",
73
73
  "typebox": "^1.1.38",
74
74
  "typescript": "^6.0.3"
75
75
  }
@@ -18,7 +18,6 @@ import {
18
18
  createProgressState,
19
19
  failProgressState,
20
20
  finalizeProgressState,
21
- formatElapsed,
22
21
  getProgressState,
23
22
  } from "./progress.js";
24
23
  import {
@@ -175,30 +174,14 @@ function sendSubagentResultMessage(
175
174
  });
176
175
  }
177
176
 
178
- export function emitCompletionNotification(
179
- ctx: ExtensionContext,
177
+ export function emitCompletionAlert(
180
178
  state: ReturnType<typeof getProgressState>,
181
179
  ): void {
182
180
  if (!state) return;
183
181
  if (state.status === "cancelled") return;
184
- if (!ctx.ui?.notify) return;
185
182
  const tty = (process.stdout as { isTTY?: boolean }).isTTY;
186
183
  if (!tty) return;
187
- const icon = state.status === "error" ? "✗" : "✓";
188
- const severity =
189
- state.status === "error" ? ("error" as const) : ("info" as const);
190
- const elapsed = formatElapsed(
191
- state.durationMs ?? Date.now() - state.startTime,
192
- );
193
- const raw = state.errorText ?? state.finalOutput ?? "";
194
- const preview = raw.trim().slice(0, 80);
195
- const namePart = state.instanceName
196
- ? `${state.agent} ${state.instanceName}`
197
- : state.agent;
198
- const toast = `${namePart} ${icon} ${elapsed} — "${preview}"`;
199
- // Terminal bell to draw attention when all jobs complete
200
184
  process.stdout.write("\x07");
201
- ctx.ui.notify(toast, severity);
202
185
  }
203
186
 
204
187
  async function runSubagentWorker(
@@ -289,7 +272,7 @@ async function runSubagentWorker(
289
272
  if (listRunJobs().length === 0) {
290
273
  const state = getProgressState(requestId);
291
274
  if (state) {
292
- emitCompletionNotification(ctx, state);
275
+ emitCompletionAlert(state);
293
276
  }
294
277
  }
295
278
  }