@songsid/agend 2.0.8-beta.9 → 2.0.8

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 (46) hide show
  1. package/README.md +8 -3
  2. package/dist/adapter-world.d.ts +1 -1
  3. package/dist/adapter-world.js +2 -2
  4. package/dist/adapter-world.js.map +1 -1
  5. package/dist/agent-endpoint.js +6 -0
  6. package/dist/agent-endpoint.js.map +1 -1
  7. package/dist/backend/codex.js +10 -3
  8. package/dist/backend/codex.js.map +1 -1
  9. package/dist/channel/adapters/discord.d.ts +4 -4
  10. package/dist/channel/adapters/discord.js +162 -111
  11. package/dist/channel/adapters/discord.js.map +1 -1
  12. package/dist/channel/adapters/telegram.d.ts +1 -1
  13. package/dist/channel/adapters/telegram.js +3 -1
  14. package/dist/channel/adapters/telegram.js.map +1 -1
  15. package/dist/channel/tool-router.js +4 -2
  16. package/dist/channel/tool-router.js.map +1 -1
  17. package/dist/channel/tool-tracker.js +2 -2
  18. package/dist/channel/tool-tracker.js.map +1 -1
  19. package/dist/channel/types.d.ts +14 -6
  20. package/dist/cli.js +150 -95
  21. package/dist/cli.js.map +1 -1
  22. package/dist/daemon.d.ts +25 -1
  23. package/dist/daemon.js +149 -43
  24. package/dist/daemon.js.map +1 -1
  25. package/dist/fleet-manager.d.ts +47 -5
  26. package/dist/fleet-manager.js +362 -139
  27. package/dist/fleet-manager.js.map +1 -1
  28. package/dist/instance-lifecycle.js +9 -0
  29. package/dist/instance-lifecycle.js.map +1 -1
  30. package/dist/logger.d.ts +9 -1
  31. package/dist/logger.js +17 -7
  32. package/dist/logger.js.map +1 -1
  33. package/dist/outbound-handlers.d.ts +3 -0
  34. package/dist/outbound-handlers.js +17 -0
  35. package/dist/outbound-handlers.js.map +1 -1
  36. package/dist/outbound-schemas.d.ts +1 -1
  37. package/dist/tmux-control.d.ts +10 -0
  38. package/dist/tmux-control.js +29 -0
  39. package/dist/tmux-control.js.map +1 -1
  40. package/dist/tmux-manager.d.ts +6 -0
  41. package/dist/tmux-manager.js +17 -0
  42. package/dist/tmux-manager.js.map +1 -1
  43. package/dist/topic-commands.d.ts +21 -0
  44. package/dist/topic-commands.js +73 -6
  45. package/dist/topic-commands.js.map +1 -1
  46. package/package.json +3 -1
@@ -48,7 +48,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
48
48
  private topicIcons;
49
49
  private lastActivity;
50
50
  private lastInboundUser;
51
- private pendingCancelMessages;
51
+ private cancelButtons;
52
52
  private lastInboundMsg;
53
53
  private topicArchiver;
54
54
  controlClient: TmuxControlClient | null;
@@ -104,6 +104,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
104
104
  private loadEnvFile;
105
105
  /** Start all instances from fleet config */
106
106
  startAll(configPath: string): Promise<void>;
107
+ /**
108
+ * Delete inbox files older than retentionDays (by mtime). Cleans the shared
109
+ * inbox (`<dataDir>/inbox`) and every workspace inbox
110
+ * (`<agendHome>/workspaces/*\/inbox`). Piggybacks on the daily summary timer,
111
+ * mirroring classic chat-log rotation (same 7-day retention).
112
+ */
113
+ private rotateInboxes;
107
114
  /** Start the shared channel adapter(s) for topic mode */
108
115
  private startSharedAdapter;
109
116
  /** Start the primary adapter (backward-compatible, sets this.adapter) */
@@ -163,9 +170,35 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
163
170
  toggleFleetCollab(instanceName: string): boolean;
164
171
  notifyInstanceTopic(instanceName: string, text: string): void;
165
172
  /** Send a "🛑 Cancel" button to the instance's topic/channel after delivery. */
166
- private sendCancelButton;
167
- /** Retire (delete) the pending cancel button on reply, cancel, or timeout. */
168
- private clearCancelButton;
173
+ /**
174
+ * Handle the DC `/save` slash command for both classic AND fleet-topic targets.
175
+ * Picks the backend-appropriate command (kiro → /chat save, claude → /export);
176
+ * unsupported backends get a clear error. Routes via classic paste or fleet IPC.
177
+ */
178
+ private handleSlashSave;
179
+ /** Whether the instance currently has at least one live cancel button. */
180
+ private hasCancelButton;
181
+ sendCancelButton(instanceName: string, correlationId?: string): Promise<void>;
182
+ /** Retire (delete) every cancel button belonging to an instance. */
183
+ private retireInstanceButtons;
184
+ /** Begin retiring one button (delete + bounded retry on failure). Idempotent:
185
+ * a button already in a retire cycle is left to its own timer, so a second
186
+ * retire request (e.g. a new send + the post-await sweep) won't double-delete. */
187
+ private retireButton;
188
+ private attemptButtonDelete;
189
+ /** Clear an entry's timers (retry + idle-check) and drop it from the map. */
190
+ private discardButton;
191
+ /** Re-attempt a failed button delete up to CANCEL_BTN_MAX_RETRIES times. */
192
+ private scheduleButtonRetry;
193
+ /** Delete one button's message via its own adapter. Resolves on success,
194
+ * rejects on failure so the caller can retry. */
195
+ private deleteButtonMessage;
196
+ /** Retire all cancel buttons for an instance — on reply or cancel. */
197
+ clearCancelButton(instanceName: string): void;
198
+ /** Retire the cross-instance button matching a delegate→report correlation id.
199
+ * Used by report_result, where the sender's self-derived name may not match
200
+ * the target-address name the button was registered under. */
201
+ clearCancelButtonByCorrelation(correlationId: string): void;
169
202
  /**
170
203
  * Reaction target chat id. Telegram reactions key on the supergroup chat_id
171
204
  * (the topic thread is NOT a chat_id), so a forum-topic message must react on
@@ -175,7 +208,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
175
208
  private reactTarget;
176
209
  /** Remember the user message just delivered, so we can react ✅ when done. */
177
210
  private trackInboundMsg;
178
- /** React on the last user message after the agent replies. */
211
+ /** Clear the tracked last-inbound message after the agent replies. The ✅
212
+ * reaction is already applied by delivery confirmation (message_confirmed), so
213
+ * reacting again here would be a duplicate API call — we only drop the entry. */
179
214
  private reactDone;
180
215
  /** Interrupt an instance's current generation (cancel button / /cancel). */
181
216
  cancelInstance(instanceName: string): boolean;
@@ -239,6 +274,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
239
274
  private reconcileInstances;
240
275
  restartInstances(): Promise<void>;
241
276
  private checkForUpdates;
277
+ /**
278
+ * Semver "a > b". Compares major.minor.patch numerically; a version without a
279
+ * prerelease outranks the same core with one (2.0.8 > 2.0.8-beta.16); two
280
+ * prereleases compare identifier-by-identifier (numeric < alphanumeric, numeric
281
+ * fields compared as numbers). Sufficient for our X.Y.Z[-beta.N] scheme.
282
+ */
283
+ private semverGt;
242
284
  private startHealthServer;
243
285
  getUiStatus(): unknown;
244
286
  }