@songsid/agend 2.1.4-beta.2 → 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.
- package/dist/channel/adapters/discord.js +12 -6
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/types.d.ts +1 -1
- package/dist/cli.js +11 -3
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +8 -3
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-context.d.ts +3 -0
- package/dist/fleet-manager.d.ts +54 -3
- package/dist/fleet-manager.js +444 -162
- package/dist/fleet-manager.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +6 -0
- package/dist/instance-lifecycle.js +45 -25
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/locale.js +68 -0
- package/dist/locale.js.map +1 -1
- package/dist/restart-progress.d.ts +7 -1
- package/dist/restart-progress.js +27 -6
- package/dist/restart-progress.js.map +1 -1
- package/dist/topic-commands.js +3 -1
- package/dist/topic-commands.js.map +1 -1
- package/dist/update-marker.d.ts +30 -0
- package/dist/update-marker.js +71 -20
- package/dist/update-marker.js.map +1 -1
- package/dist/update-progress.d.ts +6 -0
- package/dist/update-progress.js +29 -0
- package/dist/update-progress.js.map +1 -0
- package/package.json +1 -1
package/dist/fleet-context.d.ts
CHANGED
|
@@ -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
|
/**
|
package/dist/fleet-manager.d.ts
CHANGED
|
@@ -119,8 +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
|
-
/**
|
|
123
|
-
private
|
|
122
|
+
/** nonce → pending button prompt (hang restart, interactive assist, clean-exit restart). */
|
|
123
|
+
private pendingNonceButtons;
|
|
124
124
|
private failoverActive;
|
|
125
125
|
/** instance → when a click with no live button entry last fired a cancel. */
|
|
126
126
|
private staleCancelClickAt;
|
|
@@ -137,6 +137,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
137
137
|
private healthServer;
|
|
138
138
|
private healthPortRetried;
|
|
139
139
|
private updateCheckTimer;
|
|
140
|
+
private updateProgressTimer;
|
|
141
|
+
private updateProgressEditRunning;
|
|
142
|
+
private lastUpdateProgressText;
|
|
140
143
|
private eventLogPruneTimer;
|
|
141
144
|
private logRotateTimer;
|
|
142
145
|
/** Days of event/activity history to keep. */
|
|
@@ -218,6 +221,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
218
221
|
*/
|
|
219
222
|
private isModelAdmin;
|
|
220
223
|
private handlePauseWakeSlash;
|
|
224
|
+
private handleUpdateSlash;
|
|
221
225
|
/** Admin-only full conversation reset for fleet-topic and Classic instances. */
|
|
222
226
|
private handleClearSlash;
|
|
223
227
|
/** Get the adapter bound to an instance, falling back to primary adapter */
|
|
@@ -331,6 +335,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
331
335
|
ready: boolean;
|
|
332
336
|
token: string | null;
|
|
333
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;
|
|
334
342
|
/** Start all instances from fleet config */
|
|
335
343
|
startAll(configPath: string): Promise<void>;
|
|
336
344
|
/**
|
|
@@ -532,6 +540,42 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
532
540
|
private static readonly FLEET_ERROR_THROTTLE_MS;
|
|
533
541
|
private fleetErrorNotices;
|
|
534
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;
|
|
535
579
|
private interactivePromptLabel;
|
|
536
580
|
/**
|
|
537
581
|
* Surface a stable terminal prompt in both places that matter:
|
|
@@ -542,7 +586,6 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
542
586
|
* contain usernames or secret-adjacent text and stays in daemon.log.
|
|
543
587
|
*/
|
|
544
588
|
notifyInteractivePrompt(instanceName: string, kind: string): Promise<void>;
|
|
545
|
-
private retireInteractivePromptButtons;
|
|
546
589
|
/** Consume a General assist button exactly once. */
|
|
547
590
|
private handleInteractivePromptAssist;
|
|
548
591
|
/** Send a "🛑 Cancel" button to the instance's topic/channel after delivery. */
|
|
@@ -669,6 +712,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
669
712
|
title: string;
|
|
670
713
|
}>;
|
|
671
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;
|
|
672
723
|
private static INSTRUCTIONS_FILENAME;
|
|
673
724
|
private static GENERAL_INSTRUCTIONS;
|
|
674
725
|
/** Ensure the general instance has its project instructions file + knowledge */
|