@songsid/agend 2.3.4-beta.5 → 2.3.4-beta.7

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 (79) hide show
  1. package/dist/agend-home.d.ts +13 -0
  2. package/dist/agend-home.js +42 -0
  3. package/dist/agend-home.js.map +1 -1
  4. package/dist/auth-api.js +2 -2
  5. package/dist/auth-api.js.map +1 -1
  6. package/dist/backend/claude-code.d.ts +3 -0
  7. package/dist/backend/claude-code.js +88 -3
  8. package/dist/backend/claude-code.js.map +1 -1
  9. package/dist/backend/kiro-identity.d.ts +2 -0
  10. package/dist/backend/kiro-identity.js +13 -6
  11. package/dist/backend/kiro-identity.js.map +1 -1
  12. package/dist/backend/kiro.js +18 -3
  13. package/dist/backend/kiro.js.map +1 -1
  14. package/dist/backend-availability.d.ts +6 -0
  15. package/dist/backend-availability.js +13 -5
  16. package/dist/backend-availability.js.map +1 -1
  17. package/dist/channel/mcp-tools.js +1 -1
  18. package/dist/channel/mcp-tools.js.map +1 -1
  19. package/dist/cli.js +4 -6
  20. package/dist/cli.js.map +1 -1
  21. package/dist/daemon.js +48 -8
  22. package/dist/daemon.js.map +1 -1
  23. package/dist/fleet-manager.d.ts +30 -7
  24. package/dist/fleet-manager.js +182 -66
  25. package/dist/fleet-manager.js.map +1 -1
  26. package/dist/fleet-yaml-patch.d.ts +3 -0
  27. package/dist/fleet-yaml-patch.js +103 -0
  28. package/dist/fleet-yaml-patch.js.map +1 -0
  29. package/dist/general-knowledge/skills/model-discovery/SKILL.md +2 -0
  30. package/dist/instance-lifecycle.js +12 -4
  31. package/dist/instance-lifecycle.js.map +1 -1
  32. package/dist/kiro-resume-summary.d.ts +37 -0
  33. package/dist/kiro-resume-summary.js +85 -0
  34. package/dist/kiro-resume-summary.js.map +1 -0
  35. package/dist/locale.js +8 -0
  36. package/dist/locale.js.map +1 -1
  37. package/dist/login-controller.js +9 -1
  38. package/dist/login-controller.js.map +1 -1
  39. package/dist/package-preimage.js +27 -2
  40. package/dist/package-preimage.js.map +1 -1
  41. package/dist/reply-buttons-controller.js +10 -0
  42. package/dist/reply-buttons-controller.js.map +1 -1
  43. package/dist/stall-reporter.d.ts +21 -0
  44. package/dist/stall-reporter.js +82 -0
  45. package/dist/stall-reporter.js.map +1 -0
  46. package/dist/tmux-control.d.ts +2 -2
  47. package/dist/tmux-control.js +4 -2
  48. package/dist/tmux-control.js.map +1 -1
  49. package/dist/tmux-exec-helper.d.ts +6 -3
  50. package/dist/tmux-exec-helper.js +115 -53
  51. package/dist/tmux-exec-helper.js.map +1 -1
  52. package/dist/tunnel/cloudflared-install.d.ts +4 -0
  53. package/dist/tunnel/cloudflared-install.js +20 -1
  54. package/dist/tunnel/cloudflared-install.js.map +1 -1
  55. package/dist/tunnel/cloudflared.d.ts +8 -1
  56. package/dist/tunnel/cloudflared.js +34 -6
  57. package/dist/tunnel/cloudflared.js.map +1 -1
  58. package/dist/tunnel/lease.d.ts +3 -3
  59. package/dist/tunnel/lease.js +23 -19
  60. package/dist/tunnel/lease.js.map +1 -1
  61. package/dist/tunnel/manager.js +6 -7
  62. package/dist/tunnel/manager.js.map +1 -1
  63. package/dist/ui/shared/app.css +16 -1
  64. package/dist/ui/shared/panel-view.js +266 -17
  65. package/dist/ui/shared/view-strings.js +26 -0
  66. package/dist/unattended-install.d.ts +1 -1
  67. package/dist/unattended-install.js +19 -5
  68. package/dist/unattended-install.js.map +1 -1
  69. package/dist/view-api.d.ts +15 -0
  70. package/dist/view-api.js +94 -33
  71. package/dist/view-api.js.map +1 -1
  72. package/dist/web-login.d.ts +4 -3
  73. package/dist/web-login.js +23 -14
  74. package/dist/web-login.js.map +1 -1
  75. package/dist/web-session.d.ts +5 -0
  76. package/dist/web-session.js +20 -8
  77. package/dist/web-session.js.map +1 -1
  78. package/launcher/agend-install.cjs +16 -2
  79. package/package.json +1 -1
package/dist/daemon.js CHANGED
@@ -9624,13 +9624,19 @@ export class Daemon extends EventEmitter {
9624
9624
  async sendDeliveryEnterAfterAvailability(phase, stillCurrent, durableAttempt, onInputHeld) {
9625
9625
  // A recovery Enter may have waited for a transient while cancel or spawn replaced the delivery: check here, and
9626
9626
  // again after every wait below, at the last point before the tmux write.
9627
+ // M-2290 (#2985 review, Fable): the mode wait can last up to 10 minutes, and a respawn or relaunch reuses the same
9628
+ // tmux object and window — so the spawn generation and launch fence are part of the fence too: an Enter meant for
9629
+ // the CLI this paste went to is never sent to its successor.
9627
9630
  const tmux = this.tmux;
9628
- const current = () => this.tmux === tmux && !this.deliveryWritesStopping && (!stillCurrent || stillCurrent());
9631
+ const generation = this.spawnGeneration;
9632
+ const fence = this.launchFenceEpoch;
9633
+ const current = () => this.tmux === tmux && this.spawnGeneration === generation && this.launchFenceEpoch === fence
9634
+ && !this.deliveryWritesStopping && (!stillCurrent || stillCurrent());
9629
9635
  if (!current())
9630
9636
  return false;
9631
9637
  // The pasted text may still be in the box: the caller keeps it uncertain (no false failure, no second paste).
9632
9638
  const hold = () => {
9633
- onInputHeld?.();
9639
+ onInputHeld?.("pane-in-mode");
9634
9640
  this.logger.warn({ phase }, "The pane stayed in a tmux mode; Enter withheld");
9635
9641
  return false;
9636
9642
  };
@@ -9659,6 +9665,37 @@ export class Daemon extends EventEmitter {
9659
9665
  return false;
9660
9666
  break;
9661
9667
  }
9668
+ // M-2290 (the simple half of the #2957 redesign, leader xmsg-1793712561468): a dialog the backend RECOGNISES
9669
+ // (runtimeDialogs: a permission card, the dangerous-command card, …) that painted between the paste and this Enter
9670
+ // would take the key as its answer. Read the pane once more: such a dialog withholds the Enter, the caller keeps the
9671
+ // delivery uncertain (Needs-you), and the dialog scanner parks the dialog for a person. Nothing else is judged here
9672
+ // — an unknown or unreadable screen sends, exactly as before: #2958's composer proof (decision f57474aa) is NOT back.
9673
+ // Only a caller that can hold (onInputHeld: the delivery's initial submit, settled uncertain → Needs-you) asks: one
9674
+ // that cannot would read `false` as a failure and paste again. Only the backend's OWN dialogs count — not AgEnD's
9675
+ // unrecognised-prompt guess — so an unknown screen still sends.
9676
+ if (onInputHeld) {
9677
+ let finalPane = null;
9678
+ try {
9679
+ finalPane = await tmux.capturePane();
9680
+ }
9681
+ catch {
9682
+ finalPane = null;
9683
+ }
9684
+ if (!current())
9685
+ return false;
9686
+ let dialog;
9687
+ try {
9688
+ dialog = finalPane === null ? undefined : (this.backend?.getRuntimeDialogs?.() ?? []).find(d => Daemon.dialogMatches(d, finalPane))?.description;
9689
+ }
9690
+ catch {
9691
+ dialog = undefined;
9692
+ }
9693
+ if (dialog !== undefined) {
9694
+ onInputHeld?.("dialog");
9695
+ this.logger.warn({ phase, dialog }, "A dialog is on the pane; the delivery's Enter is withheld (it would answer it)");
9696
+ return false;
9697
+ }
9698
+ }
9662
9699
  // W1: persist the "Enter may have happened" boundary before tmux receives
9663
9700
  // the key. A crash after this commit is never auto-replayed without a
9664
9701
  // positive transcript marker, even if the stale pane still shows composer.
@@ -9930,12 +9967,13 @@ export class Daemon extends EventEmitter {
9930
9967
  let enterAt = Date.now();
9931
9968
  const enterMono = performance.now();
9932
9969
  const steerEnterCurrent = () => steerCurrent() && performance.now() <= steerEnterDeadline;
9933
- let inputHeld = false;
9934
- if (!(await this.sendDeliveryEnter("initial-submit", steerComposerProof ? steerEnterCurrent : undefined, durableAttempt, () => { inputHeld = true; }))) {
9970
+ let inputHeld = null;
9971
+ if (!(await this.sendDeliveryEnter("initial-submit", steerComposerProof ? steerEnterCurrent : undefined, durableAttempt, (why) => { inputHeld = why; }))) {
9935
9972
  if (inputHeld) {
9936
- // #2971: held in a tmux mode past the bound. The paste may still be in the CLI: keep it uncertain, never re-paste.
9973
+ // #2971: held in a tmux mode past the bound; M-2290: a recognised dialog on the pane. The paste may still be in
9974
+ // the CLI: keep it uncertain (Needs-you), never re-paste, never answer the dialog.
9937
9975
  verdict.phase = "submit-enter";
9938
- verdict.proof = "pane-in-mode-held";
9976
+ verdict.proof = inputHeld === "dialog" ? "dialog-on-pane" : "pane-in-mode-held";
9939
9977
  return false;
9940
9978
  }
9941
9979
  if (steerComposerProof && !steerCurrent()) {
@@ -10077,8 +10115,10 @@ export class Daemon extends EventEmitter {
10077
10115
  // confirmation ladder. "stranded" is the case that used to be a silent
10078
10116
  // ✅ — the text was visible, so the old check called it delivered.
10079
10117
  this.logger.warn({ proof }, "Native-queue paste not confirmed as submitted — retrying via idle-gated delivery");
10080
- if (windowId && this.controlClient) {
10081
- await this.controlClient.waitUntilIdle(windowId);
10118
+ if (windowId && this.controlClient && !(await this.controlClient.waitUntilIdle(windowId))) {
10119
+ verdict.phase = "native-queue-idle-wait";
10120
+ verdict.proof = "idle-wait-failed";
10121
+ return false;
10082
10122
  }
10083
10123
  // Re-read before doing anything: the CLI had a whole turn to flush its
10084
10124
  // queue while we waited, and the right recovery differs per outcome.