@fitchmultz/pi-subagents 0.52.13 → 0.52.15

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/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## 0.52.15 - 2026-11-02
6
+
7
+ <!-- npm-release:unreleased:start -->
8
+ <!-- npm-release:unreleased:end -->
9
+
10
+ - Recheck unreported Cursor reviews in automatic releases (#333) ([1b388fc](https://github.com/fitchmultz/pi-subagents/commit/1b388fc6f86904b32af6c479374f1a2a529f941f))
11
+
12
+ ### What's Changed
13
+
14
+ - Recheck unreported Cursor reviews in automatic releases by @fitchmultz in https://github.com/fitchmultz/pi-subagents/pull/333
15
+
16
+ **Full Changelog**: https://github.com/fitchmultz/pi-subagents/compare/v0.52.14...v0.52.15
17
+
18
+ ## 0.52.14 - 2026-11-02
19
+
20
+ <!-- npm-release:unreleased:start -->
21
+ <!-- npm-release:unreleased:end -->
22
+
23
+ - perf: parallelize independent hot-path awaits in intercom and observer (#331) ([af45187](https://github.com/fitchmultz/pi-subagents/commit/af4518766064dc55969ca331d655611b2690f687))
24
+
25
+ ### What's Changed
26
+
27
+ - perf: parallelize independent hot-path awaits in intercom and observer by @fitchmultz in https://github.com/fitchmultz/pi-subagents/pull/331
28
+
29
+ **Full Changelog**: https://github.com/fitchmultz/pi-subagents/compare/v0.52.13...v0.52.14
30
+
5
31
  ## 0.52.13 - 2026-11-02
6
32
 
7
33
  <!-- npm-release:unreleased:start -->
@@ -20,12 +20,17 @@ if (manifest === undefined) {
20
20
  }
21
21
  const root = pathToFileURL(path.join(path.dirname(manifest), "dist/index.js"));
22
22
  // oxlint-disable-next-line typescript/no-unsafe-assignment
23
- const tui = await import(__rewriteRelativeImportExtension(root.href));
23
+ const tuiPromise = import(__rewriteRelativeImportExtension(root.href));
24
24
  // oxlint-disable-next-line typescript/no-unsafe-assignment
25
- const layout = await import(__rewriteRelativeImportExtension(new URL("./layout.js", root).href));
25
+ const layoutPromise = import(__rewriteRelativeImportExtension(new URL("./layout.js", root).href));
26
26
  // oxlint-disable-next-line typescript/no-unsafe-assignment
27
- const dispatch = await import(__rewriteRelativeImportExtension(new URL("./tui.js", root).href));
28
- const sdk = await loadSDK(sdkRoot);
27
+ const dispatchPromise = import(__rewriteRelativeImportExtension(new URL("./tui.js", root).href));
28
+ const [tui, layout, dispatch, sdk] = await Promise.all([
29
+ tuiPromise,
30
+ layoutPromise,
31
+ dispatchPromise,
32
+ loadSDK(sdkRoot),
33
+ ]);
29
34
  export const { Container, HStack, ScrollView, Text, TruncatedText, VStack } = tui;
30
35
  export const { AssistantMessageComponent, ToolExecutionComponent, createBashToolDefinition, createEditToolDefinition, createFindToolDefinition, createGrepToolDefinition, createLsToolDefinition, createPowerShellToolDefinition, createReadToolDefinition, createWriteToolDefinition, rawKeyHint, } = sdk;
31
36
  export const { renderLayoutFrame, getLayoutBoxesAt, getScrollViewsAt } = layout;
@@ -170,13 +170,16 @@ export class ObserverTranscript extends Container {
170
170
  }
171
171
  const { entry, card, request, controller } = job;
172
172
  const options = { signal: controller.signal, hideThinking: this.display.hideThinking };
173
- let page = await this.journal.page(entry, Math.max(0, request.requested), options);
174
- if (request.requested < 0 && page.pages > 1) {
175
- page = await this.journal.page(entry, page.pages - 1, options);
176
- }
177
- const call = typeof page.message.toolCallId === "string" && !card.tool
178
- ? await this.journal.call(page.message.toolCallId, card.id, controller.signal)
179
- : undefined;
173
+ const toolCallId = recordAt(entry.value, "message")?.toolCallId;
174
+ const [firstPage, call] = await Promise.all([
175
+ this.journal.page(entry, Math.max(0, request.requested), options),
176
+ typeof toolCallId === "string" && !card.tool
177
+ ? this.journal.call(toolCallId, card.id, controller.signal)
178
+ : undefined,
179
+ ]);
180
+ const page = request.requested < 0 && firstPage.pages > 1
181
+ ? await this.journal.page(entry, firstPage.pages - 1, options)
182
+ : firstPage;
180
183
  if (!this.current(job)) {
181
184
  return;
182
185
  }
@@ -14,12 +14,13 @@ import { isChild, packageRoot } from "./host.js";
14
14
  // Only the detached runner needs absolute imports from the selected host package.
15
15
  const require = isChild() ? createRequire(path.join(packageRoot(), "dist/index.js")) : undefined;
16
16
  // oxlint-disable-next-line typescript/no-unsafe-assignment
17
- const typebox = require === undefined
18
- ? await import("typebox")
19
- : await import(__rewriteRelativeImportExtension(pathToFileURL(require.resolve("typebox")).href));
17
+ const typeboxPromise = require === undefined
18
+ ? import("typebox")
19
+ : import(__rewriteRelativeImportExtension(pathToFileURL(require.resolve("typebox")).href));
20
20
  // oxlint-disable-next-line typescript/no-unsafe-assignment
21
- const value = require === undefined
22
- ? await import("typebox/value")
23
- : await import(__rewriteRelativeImportExtension(pathToFileURL(require.resolve("typebox/value")).href));
21
+ const valuePromise = require === undefined
22
+ ? import("typebox/value")
23
+ : import(__rewriteRelativeImportExtension(pathToFileURL(require.resolve("typebox/value")).href));
24
+ const [typebox, value] = await Promise.all([typeboxPromise, valuePromise]);
24
25
  export const { Type } = typebox;
25
26
  export const Assert = value.Assert;
@@ -1 +1 @@
1
- export const EXTENSION_BUILD = Object.freeze({"version":"0.52.13","sha256":"239fe0f6aa0caf99a00fff7fe7a1031b902d697eab9a95f5dae05c3458b58cf0"});
1
+ export const EXTENSION_BUILD = Object.freeze({"version":"0.52.15","sha256":"ec0886af93d91687cfae1ed692e1e2e31127d3fbf98abadf192034a044e44d51"});
@@ -250,15 +250,18 @@ export class IntercomConnection {
250
250
  async connect(ctx, generation, sessionId) {
251
251
  const next = this.createClient();
252
252
  try {
253
- await spawnBrokerIfNeeded(this.config.brokerCommand, this.config.brokerArgs, (message) => {
254
- if (message === undefined) {
255
- this.reporter.recover("older-broker");
256
- }
257
- else {
258
- this.reporter.report("older-broker", message, "warning");
259
- }
260
- });
261
- await next.connect(await this.lifecycle.registration(this.hooks.pendingAsks()), nativePeerId(sessionId));
253
+ const [, registration] = await Promise.all([
254
+ spawnBrokerIfNeeded(this.config.brokerCommand, this.config.brokerArgs, (message) => {
255
+ if (message === undefined) {
256
+ this.reporter.recover("older-broker");
257
+ }
258
+ else {
259
+ this.reporter.report("older-broker", message, "warning");
260
+ }
261
+ }),
262
+ this.lifecycle.registration(this.hooks.pendingAsks()),
263
+ ]);
264
+ await next.connect(registration, nativePeerId(sessionId));
262
265
  if (!this.lifecycle.live(ctx, generation)) {
263
266
  await next.disconnect();
264
267
  throw new Error("Intercom runtime no longer active");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fitchmultz/pi-subagents",
3
- "version": "0.52.13",
3
+ "version": "0.52.15",
4
4
  "description": "Pi extension for subagent orchestration and local session coordination",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -16,12 +16,17 @@ if (manifest === undefined) {
16
16
  }
17
17
  const root = pathToFileURL(path.join(path.dirname(manifest), "dist/index.js"));
18
18
  // oxlint-disable-next-line typescript/no-unsafe-assignment
19
- const tui: typeof Tui = await import(root.href);
19
+ const tuiPromise: Promise<typeof Tui> = import(root.href);
20
20
  // oxlint-disable-next-line typescript/no-unsafe-assignment
21
- const layout: typeof Layout = await import(new URL("./layout.js", root).href);
21
+ const layoutPromise: Promise<typeof Layout> = import(new URL("./layout.js", root).href);
22
22
  // oxlint-disable-next-line typescript/no-unsafe-assignment
23
- const dispatch: typeof Dispatch = await import(new URL("./tui.js", root).href);
24
- const sdk = await loadSDK(sdkRoot);
23
+ const dispatchPromise: Promise<typeof Dispatch> = import(new URL("./tui.js", root).href);
24
+ const [tui, layout, dispatch, sdk] = await Promise.all([
25
+ tuiPromise,
26
+ layoutPromise,
27
+ dispatchPromise,
28
+ loadSDK(sdkRoot),
29
+ ]);
25
30
  export const { Container, HStack, ScrollView, Text, TruncatedText, VStack } = tui;
26
31
  export const {
27
32
  AssistantMessageComponent,
@@ -211,14 +211,17 @@ export class ObserverTranscript extends Container {
211
211
  }
212
212
  const { entry, card, request, controller } = job;
213
213
  const options = { signal: controller.signal, hideThinking: this.display.hideThinking };
214
- let page = await this.journal.page(entry, Math.max(0, request.requested), options);
215
- if (request.requested < 0 && page.pages > 1) {
216
- page = await this.journal.page(entry, page.pages - 1, options);
217
- }
218
- const call =
219
- typeof page.message.toolCallId === "string" && !card.tool
220
- ? await this.journal.call(page.message.toolCallId, card.id, controller.signal)
221
- : undefined;
214
+ const toolCallId = recordAt(entry.value, "message")?.toolCallId;
215
+ const [firstPage, call] = await Promise.all([
216
+ this.journal.page(entry, Math.max(0, request.requested), options),
217
+ typeof toolCallId === "string" && !card.tool
218
+ ? this.journal.call(toolCallId, card.id, controller.signal)
219
+ : undefined,
220
+ ]);
221
+ const page =
222
+ request.requested < 0 && firstPage.pages > 1
223
+ ? await this.journal.page(entry, firstPage.pages - 1, options)
224
+ : firstPage;
222
225
  if (!this.current(job)) {
223
226
  return;
224
227
  }
@@ -9,14 +9,15 @@ import { isChild, packageRoot } from "./host.ts";
9
9
  // Only the detached runner needs absolute imports from the selected host package.
10
10
  const require = isChild() ? createRequire(path.join(packageRoot(), "dist/index.js")) : undefined;
11
11
  // oxlint-disable-next-line typescript/no-unsafe-assignment
12
- const typebox: typeof NativeTypebox =
12
+ const typeboxPromise: Promise<typeof NativeTypebox> =
13
13
  require === undefined
14
- ? await import("typebox")
15
- : await import(pathToFileURL(require.resolve("typebox")).href);
14
+ ? import("typebox")
15
+ : import(pathToFileURL(require.resolve("typebox")).href);
16
16
  // oxlint-disable-next-line typescript/no-unsafe-assignment
17
- const value: typeof NativeValue =
17
+ const valuePromise: Promise<typeof NativeValue> =
18
18
  require === undefined
19
- ? await import("typebox/value")
20
- : await import(pathToFileURL(require.resolve("typebox/value")).href);
19
+ ? import("typebox/value")
20
+ : import(pathToFileURL(require.resolve("typebox/value")).href);
21
+ const [typebox, value] = await Promise.all([typeboxPromise, valuePromise]);
21
22
  export const { Type } = typebox;
22
23
  export const Assert: typeof NativeValue.Assert = value.Assert;
@@ -307,17 +307,17 @@ export class IntercomConnection {
307
307
  ): Promise<IntercomTransport> {
308
308
  const next = this.createClient();
309
309
  try {
310
- await spawnBrokerIfNeeded(this.config.brokerCommand, this.config.brokerArgs, (message) => {
311
- if (message === undefined) {
312
- this.reporter.recover("older-broker");
313
- } else {
314
- this.reporter.report("older-broker", message, "warning");
315
- }
316
- });
317
- await next.connect(
318
- await this.lifecycle.registration(this.hooks.pendingAsks()),
319
- nativePeerId(sessionId),
320
- );
310
+ const [, registration] = await Promise.all([
311
+ spawnBrokerIfNeeded(this.config.brokerCommand, this.config.brokerArgs, (message) => {
312
+ if (message === undefined) {
313
+ this.reporter.recover("older-broker");
314
+ } else {
315
+ this.reporter.report("older-broker", message, "warning");
316
+ }
317
+ }),
318
+ this.lifecycle.registration(this.hooks.pendingAsks()),
319
+ ]);
320
+ await next.connect(registration, nativePeerId(sessionId));
321
321
  if (!this.lifecycle.live(ctx, generation)) {
322
322
  await next.disconnect();
323
323
  throw new Error("Intercom runtime no longer active");