@bastani/atomic 0.8.19 → 0.8.20-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.
Files changed (103) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/builtin/intercom/package.json +1 -1
  3. package/dist/builtin/mcp/CHANGELOG.md +5 -0
  4. package/dist/builtin/mcp/package.json +2 -2
  5. package/dist/builtin/subagents/CHANGELOG.md +12 -2
  6. package/dist/builtin/subagents/agents/code-simplifier.md +1 -1
  7. package/dist/builtin/subagents/agents/codebase-analyzer.md +1 -1
  8. package/dist/builtin/subagents/agents/codebase-online-researcher.md +1 -1
  9. package/dist/builtin/subagents/agents/codebase-research-analyzer.md +1 -1
  10. package/dist/builtin/subagents/agents/debugger.md +1 -1
  11. package/dist/builtin/subagents/package.json +1 -1
  12. package/dist/builtin/subagents/skills/subagent/SKILL.md +12 -12
  13. package/dist/builtin/subagents/src/agents/agent-management.ts +16 -11
  14. package/dist/builtin/subagents/src/agents/skills.ts +13 -1
  15. package/dist/builtin/subagents/src/extension/index.ts +14 -3
  16. package/dist/builtin/subagents/src/runs/background/async-execution.ts +8 -0
  17. package/dist/builtin/subagents/src/runs/background/run-status.ts +2 -3
  18. package/dist/builtin/subagents/src/runs/background/subagent-runner.ts +11 -1
  19. package/dist/builtin/subagents/src/runs/foreground/chain-clarify.ts +2 -2
  20. package/dist/builtin/subagents/src/runs/foreground/chain-execution.ts +31 -23
  21. package/dist/builtin/subagents/src/runs/foreground/execution.ts +13 -7
  22. package/dist/builtin/subagents/src/runs/foreground/subagent-executor.ts +160 -93
  23. package/dist/builtin/subagents/src/runs/shared/parallel-utils.ts +1 -0
  24. package/dist/builtin/subagents/src/runs/shared/run-history.ts +1 -1
  25. package/dist/builtin/subagents/src/shared/settings.ts +1 -0
  26. package/dist/builtin/subagents/src/shared/types.ts +78 -4
  27. package/dist/builtin/subagents/src/tui/render.ts +203 -19
  28. package/dist/builtin/web-access/CHANGELOG.md +5 -0
  29. package/dist/builtin/web-access/package.json +2 -2
  30. package/dist/builtin/workflows/CHANGELOG.md +19 -0
  31. package/dist/builtin/workflows/README.md +22 -3
  32. package/dist/builtin/workflows/builtin/deep-research-codebase.ts +1 -1
  33. package/dist/builtin/workflows/builtin/open-claude-design.ts +12 -4
  34. package/dist/builtin/workflows/builtin/ralph.ts +2 -2
  35. package/dist/builtin/workflows/package.json +1 -1
  36. package/dist/builtin/workflows/src/extension/config-loader.ts +68 -0
  37. package/dist/builtin/workflows/src/extension/index.ts +246 -55
  38. package/dist/builtin/workflows/src/extension/lifecycle-notifications.ts +372 -0
  39. package/dist/builtin/workflows/src/extension/render-call.ts +1 -1
  40. package/dist/builtin/workflows/src/extension/wiring.ts +32 -3
  41. package/dist/builtin/workflows/src/runs/background/status.ts +14 -74
  42. package/dist/builtin/workflows/src/shared/persistence-restore.ts +5 -3
  43. package/dist/builtin/workflows/src/tui/chat-surface-message.ts +3 -13
  44. package/dist/builtin/workflows/src/tui/inline-form-overlay.ts +2 -10
  45. package/dist/builtin/workflows/src/tui/overlay-adapter.ts +5 -5
  46. package/dist/builtin/workflows/src/tui/session-confirm.ts +6 -7
  47. package/dist/builtin/workflows/src/tui/session-picker.ts +18 -14
  48. package/dist/builtin/workflows/src/tui/status-list.ts +2 -2
  49. package/dist/builtin/workflows/src/tui/store-widget-installer.ts +125 -30
  50. package/dist/config.d.ts +1 -0
  51. package/dist/config.d.ts.map +1 -1
  52. package/dist/config.js +1 -0
  53. package/dist/config.js.map +1 -1
  54. package/dist/core/agent-session.d.ts +4 -1
  55. package/dist/core/agent-session.d.ts.map +1 -1
  56. package/dist/core/agent-session.js +2 -1
  57. package/dist/core/agent-session.js.map +1 -1
  58. package/dist/core/atomic-guide-command.d.ts.map +1 -1
  59. package/dist/core/atomic-guide-command.js +3 -2
  60. package/dist/core/atomic-guide-command.js.map +1 -1
  61. package/dist/core/extensions/index.d.ts +1 -1
  62. package/dist/core/extensions/index.d.ts.map +1 -1
  63. package/dist/core/extensions/index.js.map +1 -1
  64. package/dist/core/extensions/runner.d.ts +3 -2
  65. package/dist/core/extensions/runner.d.ts.map +1 -1
  66. package/dist/core/extensions/runner.js +6 -1
  67. package/dist/core/extensions/runner.js.map +1 -1
  68. package/dist/core/extensions/types.d.ts +13 -0
  69. package/dist/core/extensions/types.d.ts.map +1 -1
  70. package/dist/core/extensions/types.js.map +1 -1
  71. package/dist/core/model-resolver.d.ts.map +1 -1
  72. package/dist/core/model-resolver.js +63 -17
  73. package/dist/core/model-resolver.js.map +1 -1
  74. package/dist/core/output-guard.d.ts.map +1 -1
  75. package/dist/core/output-guard.js +29 -0
  76. package/dist/core/output-guard.js.map +1 -1
  77. package/dist/core/sdk.d.ts +3 -1
  78. package/dist/core/sdk.d.ts.map +1 -1
  79. package/dist/core/sdk.js +1 -0
  80. package/dist/core/sdk.js.map +1 -1
  81. package/dist/core/system-prompt.d.ts.map +1 -1
  82. package/dist/core/system-prompt.js +1 -1
  83. package/dist/core/system-prompt.js.map +1 -1
  84. package/dist/index.d.ts +2 -2
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +1 -1
  87. package/dist/index.js.map +1 -1
  88. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  89. package/dist/modes/interactive/interactive-mode.js +46 -13
  90. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  91. package/dist/utils/pi-user-agent.d.ts.map +1 -1
  92. package/dist/utils/pi-user-agent.js +2 -1
  93. package/dist/utils/pi-user-agent.js.map +1 -1
  94. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  95. package/dist/utils/syntax-highlight.js +1 -1
  96. package/dist/utils/syntax-highlight.js.map +1 -1
  97. package/dist/utils/tools-manager.d.ts.map +1 -1
  98. package/dist/utils/tools-manager.js +3 -5
  99. package/dist/utils/tools-manager.js.map +1 -1
  100. package/docs/models.md +52 -52
  101. package/docs/quickstart.md +2 -2
  102. package/docs/workflows.md +22 -5
  103. package/package.json +9 -9
@@ -416,8 +416,16 @@ export class InteractiveMode {
416
416
  this.ui.addChild(this.widgetContainerAbove);
417
417
  this.ui.addChild(this.usageMeter);
418
418
  this.ui.addChild(this.editorContainer);
419
- this.ui.addChild(this.widgetContainerBelow);
419
+ // Footer (persistent model + cwd identity) stays pinned directly under the
420
+ // editor; below-editor widgets render after it, at the very bottom. This
421
+ // keeps the session identity line attached to the input and places
422
+ // transient run status (e.g. the workflow companion counter) beneath it.
423
+ // Rendering below-editor widgets last also keeps a live widget at the
424
+ // absolute bottom of the buffer (always within the viewport), so its
425
+ // per-tick updates never sit above the fold — preserving the #1109
426
+ // resize-flicker fix.
420
427
  this.ui.addChild(this.footer);
428
+ this.ui.addChild(this.widgetContainerBelow);
421
429
  this.ui.setFocus(this.editor);
422
430
  this.setupKeyHandlers();
423
431
  this.setupEditorSubmitHandler();
@@ -1509,7 +1517,12 @@ export class InteractiveMode {
1509
1517
  if (!this.widgetContainerAbove || !this.widgetContainerBelow)
1510
1518
  return;
1511
1519
  this.renderWidgetContainer(this.widgetContainerAbove, this.extensionWidgetsAbove, true, true);
1512
- this.renderWidgetContainer(this.widgetContainerBelow, this.extensionWidgetsBelow, false, false);
1520
+ this.renderWidgetContainer(this.widgetContainerBelow, this.extensionWidgetsBelow, false,
1521
+ // leadingSpacer: blank line between the footer (model + cwd identity) and
1522
+ // below-editor widgets such as the workflow companion counter, so the
1523
+ // transient run status is visually separated from the session identity
1524
+ // line. Only emitted when a below-editor widget is actually present.
1525
+ true);
1513
1526
  this.ui.requestRender();
1514
1527
  }
1515
1528
  renderWidgetContainer(container, widgets, spacerWhenEmpty, leadingSpacer) {
@@ -1523,8 +1536,16 @@ export class InteractiveMode {
1523
1536
  if (leadingSpacer) {
1524
1537
  container.addChild(new Spacer(1));
1525
1538
  }
1539
+ let firstWidget = true;
1526
1540
  for (const component of widgets.values()) {
1541
+ // Separate stacked widgets (e.g. the async-subagent widget and the
1542
+ // workflow run counter, both belowEditor) with a blank line so each
1543
+ // panel reads as its own block.
1544
+ if (!firstWidget) {
1545
+ container.addChild(new Spacer(1));
1546
+ }
1527
1547
  container.addChild(component);
1548
+ firstWidget = false;
1528
1549
  }
1529
1550
  }
1530
1551
  /**
@@ -1535,22 +1556,34 @@ export class InteractiveMode {
1535
1556
  if (this.customFooter?.dispose) {
1536
1557
  this.customFooter.dispose();
1537
1558
  }
1538
- // Remove current footer from UI
1539
- if (this.customFooter) {
1540
- this.ui.removeChild(this.customFooter);
1559
+ // Swap the footer IN PLACE so it keeps its slot directly above
1560
+ // `widgetContainerBelow`. Using removeChild + addChild would append the new
1561
+ // footer to the very end of the UI (after the below-editor widgets), which
1562
+ // breaks the ordering invariant established for #1109: the footer must stay
1563
+ // pinned under the editor, and the below-editor widget container must remain
1564
+ // the last UI child so a live widget's per-tick line stays within the bottom
1565
+ // viewport (above-fold ticks trigger pi-tui's full-screen/scrollback clear).
1566
+ const currentFooter = this.customFooter ?? this.footer;
1567
+ const footerIndex = this.ui.children.indexOf(currentFooter);
1568
+ let nextFooter;
1569
+ if (factory) {
1570
+ const created = factory(this.ui, theme, this.footerDataProvider);
1571
+ this.customFooter = created;
1572
+ nextFooter = created;
1541
1573
  }
1542
1574
  else {
1543
- this.ui.removeChild(this.footer);
1575
+ this.customFooter = undefined;
1576
+ nextFooter = this.footer;
1544
1577
  }
1545
- if (factory) {
1546
- // Create and add custom footer, passing the data provider
1547
- this.customFooter = factory(this.ui, theme, this.footerDataProvider);
1548
- this.ui.addChild(this.customFooter);
1578
+ if (footerIndex !== -1) {
1579
+ this.ui.children[footerIndex] = nextFooter;
1549
1580
  }
1550
1581
  else {
1551
- // Restore built-in footer
1552
- this.customFooter = undefined;
1553
- this.ui.addChild(this.footer);
1582
+ // Footer slot not found (e.g. swapped before init attached it): append the
1583
+ // footer, then re-attach the below-editor container so it stays last.
1584
+ this.ui.addChild(nextFooter);
1585
+ this.ui.removeChild(this.widgetContainerBelow);
1586
+ this.ui.addChild(this.widgetContainerBelow);
1554
1587
  }
1555
1588
  this.ui.requestRender();
1556
1589
  }