@vicary/pi-subagents 0.88.0 → 0.88.1

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/bundle/child-tool-plan.js +2 -2
  3. package/bundle/{chunk-AOSILI5R.js → chunk-2HKPEANZ.js} +75 -40
  4. package/bundle/{chunk-SVIXQDIV.js → chunk-4ZQBZDF3.js} +2 -2
  5. package/bundle/{chunk-YZPVALSQ.js → chunk-5EMPFFO4.js} +3 -3
  6. package/bundle/{chunk-CKLZ5FGU.js → chunk-6CG2VAG4.js} +1 -1
  7. package/bundle/{chunk-6EUQPQY7.js → chunk-7OX6O7DQ.js} +3 -3
  8. package/bundle/{chunk-TDJKY2NE.js → chunk-AZPP3G4N.js} +3 -3
  9. package/bundle/{chunk-BW5JLKIU.js → chunk-BKISQ5CJ.js} +21 -16
  10. package/bundle/{chunk-XZXYPZUT.js → chunk-CGWNA6EJ.js} +46 -28
  11. package/bundle/{chunk-3DT5X2QC.js → chunk-CPSUJHZE.js} +11 -8
  12. package/bundle/{chunk-3MFYKBKI.js → chunk-D32H53HM.js} +3 -3
  13. package/bundle/{chunk-PJSOS2Q4.js → chunk-DSHQWGHO.js} +1 -1
  14. package/bundle/{chunk-JYHTDTOZ.js → chunk-IYT7X46U.js} +2 -2
  15. package/bundle/{chunk-NVGQE2H2.js → chunk-JQTHG2ID.js} +7 -7
  16. package/bundle/{chunk-RHYVKQQL.js → chunk-LV3CPYXJ.js} +2 -2
  17. package/bundle/{chunk-IZEKQEY4.js → chunk-PYKBTBY6.js} +23 -6
  18. package/bundle/{chunk-6PR44R7E.js → chunk-RMZAAXIR.js} +1 -1
  19. package/bundle/{chunk-CTPAE36Y.js → chunk-YARY7JWU.js} +22 -0
  20. package/bundle/index.js +1 -1
  21. package/bundle/preflight.js +4 -4
  22. package/bundle/required-child-extensions.js +1 -1
  23. package/docs/agents.md +4 -2
  24. package/docs/workflows.md +3 -1
  25. package/package.json +2 -2
  26. package/src/extension/index.d.ts +1 -1
  27. package/src/extension/index.js +43 -20
  28. package/src/extension/subagent-launch-tool.d.ts +6 -2
  29. package/src/extension/subagent-launch-tool.js +13 -9
  30. package/src/runs/background/stale-run-reconciler.js +17 -8
  31. package/src/runs/foreground/subagent-executor.js +11 -6
  32. package/src/runs/shared/child-launch.js +6 -3
  33. package/src/runs/shared/child-session.d.ts +1 -1
  34. package/src/runs/shared/child-session.js +3 -27
  35. package/src/runs/shared/mcp-direct-tool-allowlist.d.ts +5 -3
  36. package/src/runs/shared/mcp-direct-tool-allowlist.js +5 -4
  37. package/src/shared/compaction-interruption.d.ts +9 -0
  38. package/src/shared/compaction-interruption.js +47 -0
  39. package/src/shared/parent-wake.d.ts +3 -2
  40. package/src/shared/parent-wake.js +14 -3
  41. package/src/shared/required-child-extensions.d.ts +2 -0
  42. package/src/shared/required-child-extensions.js +27 -0
  43. package/src/tui/fleet.d.ts +7 -2
  44. package/src/tui/fleet.js +22 -0
package/src/tui/fleet.js CHANGED
@@ -770,6 +770,10 @@ export class SubagentFleetComponent {
770
770
  actionBusy = false;
771
771
  transcriptCache;
772
772
  disposed = false;
773
+ // Undefined until a TUI first focuses the overlay, so a fleet rendered outside one still draws.
774
+ hasFocus;
775
+ // The component focused when the fleet opened (the overlay's preFocus).
776
+ openedOver;
773
777
  refreshTimer;
774
778
  refreshMs;
775
779
  tui;
@@ -781,6 +785,7 @@ export class SubagentFleetComponent {
781
785
  keybindings;
782
786
  constructor(tui, theme, state, done, options = {}) {
783
787
  this.tui = tui;
788
+ this.openedOver = tui.getFocusedComponent?.();
784
789
  this.viewport = new FleetViewport(() => this.tui.requestRender());
785
790
  this.theme = theme;
786
791
  this.markdownTheme = options.markdownTheme ?? getMarkdownTheme();
@@ -984,6 +989,15 @@ export class SubagentFleetComponent {
984
989
  scrollDetail(delta) {
985
990
  this.viewport.scroll.scrollBy(delta);
986
991
  }
992
+ get focused() {
993
+ return this.hasFocus === true;
994
+ }
995
+ set focused(value) {
996
+ if (value === this.hasFocus)
997
+ return;
998
+ this.hasFocus = value;
999
+ this.tui.requestRender();
1000
+ }
987
1001
  handleMouse(event) {
988
1002
  // Block pointer fallback as well as inspector actions while a text/confirmation modal owns input.
989
1003
  if (this.steerDraft !== undefined || this.redoGuidanceDraft !== undefined || this.stopConfirming || this.actionBusy) {
@@ -1339,6 +1353,14 @@ export class SubagentFleetComponent {
1339
1353
  return { header: [], body: this.withActionLines(lines) };
1340
1354
  }
1341
1355
  render(width) {
1356
+ // An inline dialog that took focus (a permission prompt, select, confirm) sits under this overlay and
1357
+ // would be covered while it owns the keys. Hiding the overlay through its handle would cancel the
1358
+ // TUI's focus restore, so draw nothing until the TUI gives focus back. Focus moving to the component the
1359
+ // fleet opened over (a fullscreen click on the editor) shows no dialog, and the next key returns to the fleet.
1360
+ if (this.hasFocus === false && this.tui.getFocusedComponent?.() !== this.openedOver) {
1361
+ this.renderedLayout = undefined;
1362
+ return [];
1363
+ }
1342
1364
  const layout = fleetLayout(width, this.tui.terminal?.rows ?? 32, this.selected, this.snapshot.items);
1343
1365
  this.renderedLayout = layout;
1344
1366
  if (!layout)