@astralyn/pi 0.82.0 → 0.82.2

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 (62) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/LICENSE +21 -0
  3. package/README.md +14 -3
  4. package/dist/core/agent-session.d.ts +4 -0
  5. package/dist/core/agent-session.d.ts.map +1 -1
  6. package/dist/core/agent-session.js +193 -43
  7. package/dist/core/agent-session.js.map +1 -1
  8. package/dist/core/bash-executor.d.ts.map +1 -1
  9. package/dist/core/bash-executor.js +22 -4
  10. package/dist/core/bash-executor.js.map +1 -1
  11. package/dist/core/extensions/loader.d.ts.map +1 -1
  12. package/dist/core/extensions/loader.js +6 -13
  13. package/dist/core/extensions/loader.js.map +1 -1
  14. package/dist/core/tools/bash.d.ts.map +1 -1
  15. package/dist/core/tools/bash.js +4 -3
  16. package/dist/core/tools/bash.js.map +1 -1
  17. package/dist/core/tools/output-accumulator.d.ts +13 -3
  18. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  19. package/dist/core/tools/output-accumulator.js +36 -6
  20. package/dist/core/tools/output-accumulator.js.map +1 -1
  21. package/dist/core/tools/tool-definition-wrapper.d.ts +7 -2
  22. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  23. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  24. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  25. package/dist/modes/interactive/interactive-mode.js +25 -12
  26. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  27. package/dist/utils/output-decoder.d.ts +52 -0
  28. package/dist/utils/output-decoder.d.ts.map +1 -0
  29. package/dist/utils/output-decoder.js +134 -0
  30. package/dist/utils/output-decoder.js.map +1 -0
  31. package/dist/utils/shell.d.ts +1 -0
  32. package/dist/utils/shell.d.ts.map +1 -1
  33. package/dist/utils/shell.js +21 -0
  34. package/dist/utils/shell.js.map +1 -1
  35. package/docs/compaction.md +8 -2
  36. package/docs/containerization.md +1 -1
  37. package/docs/development.md +32 -35
  38. package/docs/distribution/README.md +34 -0
  39. package/docs/distribution/architecture.md +102 -0
  40. package/docs/distribution/extensions/README.md +17 -0
  41. package/docs/distribution/extensions/deepwiki.md +62 -0
  42. package/docs/distribution/extensions/question.md +59 -0
  43. package/docs/distribution/extensions/rewind.md +85 -0
  44. package/docs/distribution/extensions/router.md +139 -0
  45. package/docs/distribution/extensions/statusline.md +110 -0
  46. package/docs/distribution/extensions/subagent.md +102 -0
  47. package/docs/distribution/maintenance.md +121 -0
  48. package/docs/distribution/release.md +85 -0
  49. package/docs/distribution/themes.md +58 -0
  50. package/docs/distribution/tool-presentation.md +91 -0
  51. package/docs/extensions.md +4 -2
  52. package/docs/index.md +1 -1
  53. package/docs/rpc.md +2 -2
  54. package/docs/themes.md +1 -1
  55. package/examples/extensions/custom-provider-anthropic/package-lock.json +3 -3
  56. package/examples/extensions/custom-provider-gitlab-duo/test.ts +1 -1
  57. package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
  58. package/examples/extensions/doom-overlay/doom/build.sh +0 -0
  59. package/examples/extensions/sandbox/package-lock.json +1 -1
  60. package/examples/extensions/with-deps/package-lock.json +2 -2
  61. package/npm-shrinkwrap.json +3481 -640
  62. package/package.json +30 -18
@@ -2315,6 +2315,17 @@ export class InteractiveMode {
2315
2315
  }
2316
2316
  this.ui.requestRender();
2317
2317
  break;
2318
+ case "turn_start":
2319
+ // A mid-run compaction replaces the working indicator. Restore it before the
2320
+ // next provider request without waiting for another agent_start event.
2321
+ if (this.settingsManager.getShowTerminalProgress()) {
2322
+ this.ui.terminal.setProgress(true);
2323
+ }
2324
+ if (this.workingVisible && this.activeStatusIndicator?.kind !== "working") {
2325
+ this.showStatusIndicator(new WorkingStatusIndicator(this.ui, this.workingMessage ?? this.defaultWorkingMessage, this.workingIndicatorOptions));
2326
+ }
2327
+ this.ui.requestRender();
2328
+ break;
2318
2329
  case "queue_update":
2319
2330
  this.updatePendingMessagesDisplay();
2320
2331
  this.ui.requestRender();
@@ -2491,19 +2502,21 @@ export class InteractiveMode {
2491
2502
  this.showStatus("Auto-compaction cancelled");
2492
2503
  }
2493
2504
  }
2494
- else if (event.result) {
2495
- this.chatContainer.clear();
2496
- this.rebuildChatFromMessages();
2497
- this.addMessageToChat(createCompactionSummaryMessage(event.result.summary, event.result.tokensBefore, new Date().toISOString()));
2498
- this.footer.invalidate();
2499
- }
2500
- else if (event.errorMessage) {
2501
- if (event.reason === "manual") {
2502
- this.showError(event.errorMessage);
2505
+ else {
2506
+ if (event.result) {
2507
+ this.chatContainer.clear();
2508
+ this.rebuildChatFromMessages();
2509
+ this.addMessageToChat(createCompactionSummaryMessage(event.result.summary, event.result.tokensBefore, new Date().toISOString()));
2510
+ this.footer.invalidate();
2503
2511
  }
2504
- else {
2505
- this.chatContainer.addChild(new Spacer(1));
2506
- this.chatContainer.addChild(new Text(theme.fg("error", event.errorMessage), 1, 0));
2512
+ if (event.errorMessage) {
2513
+ if (event.reason === "manual") {
2514
+ this.showError(event.errorMessage);
2515
+ }
2516
+ else {
2517
+ this.chatContainer.addChild(new Spacer(1));
2518
+ this.chatContainer.addChild(new Text(theme.fg("error", event.errorMessage), 1, 0));
2519
+ }
2507
2520
  }
2508
2521
  }
2509
2522
  void this.flushCompactionQueue({ willRetry: event.willRetry });