@songsid/agend 2.1.4-beta.1 → 2.1.4-beta.3

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 (56) hide show
  1. package/dist/backend/antigravity.d.ts +1 -0
  2. package/dist/backend/antigravity.js +1 -0
  3. package/dist/backend/antigravity.js.map +1 -1
  4. package/dist/backend/claude-code.d.ts +1 -0
  5. package/dist/backend/claude-code.js +1 -0
  6. package/dist/backend/claude-code.js.map +1 -1
  7. package/dist/backend/codex.d.ts +1 -0
  8. package/dist/backend/codex.js +1 -0
  9. package/dist/backend/codex.js.map +1 -1
  10. package/dist/backend/gemini-cli.d.ts +1 -0
  11. package/dist/backend/gemini-cli.js +1 -0
  12. package/dist/backend/gemini-cli.js.map +1 -1
  13. package/dist/backend/grok.d.ts +1 -0
  14. package/dist/backend/grok.js +1 -0
  15. package/dist/backend/grok.js.map +1 -1
  16. package/dist/backend/kiro.d.ts +1 -0
  17. package/dist/backend/kiro.js +1 -0
  18. package/dist/backend/kiro.js.map +1 -1
  19. package/dist/backend/mock.d.ts +1 -0
  20. package/dist/backend/mock.js +1 -0
  21. package/dist/backend/mock.js.map +1 -1
  22. package/dist/backend/opencode.d.ts +24 -0
  23. package/dist/backend/opencode.js +70 -1
  24. package/dist/backend/opencode.js.map +1 -1
  25. package/dist/backend/types.d.ts +6 -0
  26. package/dist/backend/types.js.map +1 -1
  27. package/dist/channel/adapters/discord.js +17 -7
  28. package/dist/channel/adapters/discord.js.map +1 -1
  29. package/dist/channel/types.d.ts +1 -1
  30. package/dist/cli.js +11 -3
  31. package/dist/cli.js.map +1 -1
  32. package/dist/daemon.js +8 -3
  33. package/dist/daemon.js.map +1 -1
  34. package/dist/fleet-context.d.ts +3 -0
  35. package/dist/fleet-manager.d.ts +68 -0
  36. package/dist/fleet-manager.js +568 -76
  37. package/dist/fleet-manager.js.map +1 -1
  38. package/dist/instance-lifecycle.d.ts +8 -0
  39. package/dist/instance-lifecycle.js +49 -33
  40. package/dist/instance-lifecycle.js.map +1 -1
  41. package/dist/locale.js +98 -0
  42. package/dist/locale.js.map +1 -1
  43. package/dist/outbound-schemas.d.ts +1 -1
  44. package/dist/restart-progress.d.ts +7 -1
  45. package/dist/restart-progress.js +27 -6
  46. package/dist/restart-progress.js.map +1 -1
  47. package/dist/topic-commands.d.ts +9 -0
  48. package/dist/topic-commands.js +52 -1
  49. package/dist/topic-commands.js.map +1 -1
  50. package/dist/update-marker.d.ts +30 -0
  51. package/dist/update-marker.js +71 -20
  52. package/dist/update-marker.js.map +1 -1
  53. package/dist/update-progress.d.ts +6 -0
  54. package/dist/update-progress.js +29 -0
  55. package/dist/update-progress.js.map +1 -0
  56. package/package.json +2 -2
@@ -80,6 +80,9 @@ export interface FleetContext {
80
80
  ready: boolean;
81
81
  token: string | null;
82
82
  };
83
+ /** Persist and edit one `/update` message across the fleet process restart. */
84
+ beginUpdateProgress?(adapter: import("./channel/types.js").ChannelAdapter, chatId: string, threadId: string | undefined, messageId: string): void;
85
+ failUpdateProgress?(message: string): void;
83
86
  /** Human-readable effective model for an instance (resolves inherited defaults). */
84
87
  modelDisplayForInstance?(name: string): string;
85
88
  /**
@@ -119,6 +119,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
119
119
  /** In-flight /effort selections, same coordinator shape as pendingModelSelects. */
120
120
  private pendingEffortSelects;
121
121
  private pendingModelSelects;
122
+ /** nonce → pending button prompt (hang restart, interactive assist, clean-exit restart). */
123
+ private pendingNonceButtons;
122
124
  private failoverActive;
123
125
  /** instance → when a click with no live button entry last fired a cancel. */
124
126
  private staleCancelClickAt;
@@ -135,6 +137,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
135
137
  private healthServer;
136
138
  private healthPortRetried;
137
139
  private updateCheckTimer;
140
+ private updateProgressTimer;
141
+ private updateProgressEditRunning;
142
+ private lastUpdateProgressText;
138
143
  private eventLogPruneTimer;
139
144
  private logRotateTimer;
140
145
  /** Days of event/activity history to keep. */
@@ -216,6 +221,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
216
221
  */
217
222
  private isModelAdmin;
218
223
  private handlePauseWakeSlash;
224
+ private handleUpdateSlash;
225
+ /** Admin-only full conversation reset for fleet-topic and Classic instances. */
226
+ private handleClearSlash;
219
227
  /** Get the adapter bound to an instance, falling back to primary adapter */
220
228
  getAdapterForInstance(name: string): ChannelAdapter | null;
221
229
  /** Get the world for an instance */
@@ -327,6 +335,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
327
335
  ready: boolean;
328
336
  token: string | null;
329
337
  };
338
+ beginUpdateProgress(adapter: ChannelAdapter, chatId: string, threadId: string | undefined, messageId: string): void;
339
+ failUpdateProgress(message: string): void;
340
+ /** The old fleet edits CLI install stages; the new fleet adopts the same message below. */
341
+ private startUpdateProgressMonitor;
330
342
  /** Start all instances from fleet config */
331
343
  startAll(configPath: string): Promise<void>;
332
344
  /**
@@ -528,6 +540,54 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
528
540
  private static readonly FLEET_ERROR_THROTTLE_MS;
529
541
  private fleetErrorNotices;
530
542
  notifyInstanceTopic(instanceName: string, text: string, extraOpts?: import("./channel/types.js").SendOpts): void;
543
+ /**
544
+ * Post decision buttons whose callback ids are `<prefix><nonce>:<action>`.
545
+ * The entry is registered before the send and rolled back if the send
546
+ * fails, so a nonce in the map always refers to a message that exists (or
547
+ * is about to). Returns the nonce, or null when the alert could not be sent.
548
+ */
549
+ private postNonceButtonPrompt;
550
+ /**
551
+ * Claim a nonce-armed callback exactly once.
552
+ *
553
+ * Returns:
554
+ * - null — the callback is not for this prefix; try the next handler
555
+ * - "consumed" — for this prefix but stale/denied/malformed; stop dispatch
556
+ * - the entry+action — the click is authorized and now claimed (removed
557
+ * from the map before any await, so double clicks cannot act twice)
558
+ *
559
+ * A stale click (expired nonce, or a pre-upgrade button whose payload no
560
+ * longer parses) collapses the clicked message so the dead button stops
561
+ * inviting clicks — the same courtesy the cancel button extends.
562
+ */
563
+ private consumeNonceCallback;
564
+ /** Collapse a consumed prompt's buttons into a final status line. */
565
+ private retireNonceButtons;
566
+ /**
567
+ * Drop every pending prompt that refers to an instance being stopped or
568
+ * restarted — a restart offer for an instance the operator just restarted
569
+ * (or an assist for one they stopped) must not stay clickable for the rest
570
+ * of its 15 minutes.
571
+ */
572
+ clearNoncePromptsForInstance(instanceName: string): void;
573
+ /** A clean exit is intentional from the CLI's perspective, but often not from
574
+ * the operator's. Keep the instance notice passive and put the action in the
575
+ * same-world General topic where an administrator can make the choice. */
576
+ notifyNormalExit(instanceName: string): Promise<void>;
577
+ /** Consume a clean-exit Restart/Ignore button exactly once. */
578
+ private handleExitRestartPrompt;
579
+ private interactivePromptLabel;
580
+ /**
581
+ * Surface a stable terminal prompt in both places that matter:
582
+ * - the blocked instance gets a plain pointer to General;
583
+ * - General gets one-shot Confirm/Cancel controls on its own bound adapter.
584
+ *
585
+ * Only the prompt category crosses channels. The captured terminal line can
586
+ * contain usernames or secret-adjacent text and stays in daemon.log.
587
+ */
588
+ notifyInteractivePrompt(instanceName: string, kind: string): Promise<void>;
589
+ /** Consume a General assist button exactly once. */
590
+ private handleInteractivePromptAssist;
531
591
  /** Send a "🛑 Cancel" button to the instance's topic/channel after delivery. */
532
592
  /**
533
593
  * Handle the DC `/save` slash command for both classic AND fleet-topic targets.
@@ -652,6 +712,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
652
712
  title: string;
653
713
  }>;
654
714
  sendHangNotification(instanceName: string, unchangedForMs?: number): Promise<void>;
715
+ /**
716
+ * Consume a hang Force-restart / Keep-waiting button exactly once. Restart
717
+ * goes through restartSingleInstance — serialized against concurrent restart
718
+ * sources, and with a Classic-instance fallback (the previous hand-rolled
719
+ * stop+start silently left Classic instances stopped while reporting
720
+ * "restarted").
721
+ */
722
+ private handleHangPrompt;
655
723
  private static INSTRUCTIONS_FILENAME;
656
724
  private static GENERAL_INSTRUCTIONS;
657
725
  /** Ensure the general instance has its project instructions file + knowledge */