@songsid/agend 2.1.4-beta.2 → 2.1.4-beta.20
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/agent-endpoint.js +1 -1
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/backend/antigravity.d.ts +1 -0
- package/dist/backend/antigravity.js +4 -0
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.js +23 -2
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex.d.ts +17 -0
- package/dist/backend/codex.js +122 -7
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/kiro.d.ts +1 -0
- package/dist/backend/kiro.js +14 -0
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/opencode.d.ts +27 -11
- package/dist/backend/opencode.js +48 -37
- package/dist/backend/opencode.js.map +1 -1
- package/dist/backend/types.d.ts +14 -0
- package/dist/backend/types.js +7 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/channel/adapters/discord.js +72 -25
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.js +5 -3
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-server.js +6 -20
- package/dist/channel/mcp-server.js.map +1 -1
- package/dist/channel/mcp-tools.js +4 -2
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/types.d.ts +1 -1
- package/dist/classic-channel-manager.d.ts +40 -3
- package/dist/classic-channel-manager.js +218 -31
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli.js +159 -36
- package/dist/cli.js.map +1 -1
- package/dist/completion-install.d.ts +70 -0
- package/dist/completion-install.js +152 -0
- package/dist/completion-install.js.map +1 -0
- package/dist/completion.d.ts +7 -1
- package/dist/completion.js +14 -4
- package/dist/completion.js.map +1 -1
- package/dist/config-validator.js +38 -7
- package/dist/config-validator.js.map +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.js +10 -1
- package/dist/config.js.map +1 -1
- package/dist/daemon.d.ts +171 -5
- package/dist/daemon.js +696 -82
- package/dist/daemon.js.map +1 -1
- package/dist/doctor.d.ts +26 -0
- package/dist/doctor.js +216 -0
- package/dist/doctor.js.map +1 -0
- package/dist/fleet-context.d.ts +14 -0
- package/dist/fleet-manager.d.ts +231 -10
- package/dist/fleet-manager.js +1798 -493
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-yaml-slim.d.ts +10 -0
- package/dist/fleet-yaml-slim.js +59 -0
- package/dist/fleet-yaml-slim.js.map +1 -0
- package/dist/general-knowledge/skills/backend-providers/SKILL.md +114 -0
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +3 -1
- package/dist/general-knowledge/skills/delegation-playbook/SKILL.md +52 -0
- package/dist/general-knowledge/skills/development-workflow/SKILL.md +28 -0
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +1 -0
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +1 -0
- package/dist/general-knowledge/skills/fleet-restart/SKILL.md +1 -0
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +1 -0
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +64 -16
- package/dist/general-knowledge/skills/multi-channel/SKILL.md +1 -0
- package/dist/general-knowledge/skills/scheduling/SKILL.md +1 -0
- package/dist/general-knowledge/skills/session-management/SKILL.md +1 -0
- package/dist/general-knowledge/skills/tui-effort/SKILL.md +1 -0
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +30 -0
- package/dist/instance-lifecycle.d.ts +8 -0
- package/dist/instance-lifecycle.js +46 -25
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +12 -0
- package/dist/instructions.js +33 -0
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +656 -220
- package/dist/locale.js.map +1 -1
- package/dist/outbound-handlers.d.ts +8 -0
- package/dist/outbound-handlers.js +44 -5
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +5 -0
- package/dist/outbound-schemas.js +7 -0
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/quickstart.js +25 -0
- package/dist/quickstart.js.map +1 -1
- package/dist/restart-progress.d.ts +9 -1
- package/dist/restart-progress.js +30 -6
- package/dist/restart-progress.js.map +1 -1
- package/dist/scheduler/db.d.ts +5 -0
- package/dist/scheduler/db.js +35 -0
- package/dist/scheduler/db.js.map +1 -1
- package/dist/service-installer.d.ts +11 -0
- package/dist/service-installer.js +84 -18
- package/dist/service-installer.js.map +1 -1
- package/dist/settings-api.js +1 -1
- package/dist/settings-api.js.map +1 -1
- package/dist/tips.d.ts +39 -0
- package/dist/tips.js +351 -0
- package/dist/tips.js.map +1 -0
- package/dist/tool-progress.d.ts +40 -0
- package/dist/tool-progress.js +289 -0
- package/dist/tool-progress.js.map +1 -0
- package/dist/topic-commands.d.ts +28 -4
- package/dist/topic-commands.js +217 -65
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-monitor.d.ts +15 -2
- package/dist/transcript-monitor.js +63 -17
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-sources.d.ts +106 -0
- package/dist/transcript-sources.js +428 -0
- package/dist/transcript-sources.js.map +1 -0
- package/dist/types.d.ts +11 -0
- package/dist/ui/dashboard.html +55 -32
- package/dist/ui/settings.html +120 -51
- package/dist/ui/view.html +23 -15
- 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/dist/usage/usage-api.d.ts +8 -2
- package/dist/usage/usage-api.js +24 -3
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/workflow-templates/default.md +2 -1
- package/package.json +1 -1
package/dist/fleet-manager.d.ts
CHANGED
|
@@ -36,6 +36,25 @@ export declare function selectLruEvictions(warm: string[], cap: number, opts: {
|
|
|
36
36
|
isIdle: (name: string) => boolean;
|
|
37
37
|
lastInboundAt: (name: string) => number;
|
|
38
38
|
}): string[];
|
|
39
|
+
/**
|
|
40
|
+
* Answer shape for `list_models`. `scope` reports where the LIST came from —
|
|
41
|
+
* "instance" only when it was read through that instance's own backend config,
|
|
42
|
+
* "global" for the account/CLI catalog — so a caller can tell an authoritative
|
|
43
|
+
* per-instance list from a best-effort account-wide one.
|
|
44
|
+
*/
|
|
45
|
+
export interface ModelCatalog {
|
|
46
|
+
backend: string;
|
|
47
|
+
scope: "instance" | "global";
|
|
48
|
+
/** Set whenever an instance was asked about, even if the list is global. */
|
|
49
|
+
instance?: string;
|
|
50
|
+
current_model: string | null;
|
|
51
|
+
models: import("./backend/types.js").ModelOption[];
|
|
52
|
+
/** "cache" = startup probe cache, "live" = probed now, "fallback" = none available. */
|
|
53
|
+
source: "cache" | "live" | "fallback";
|
|
54
|
+
probed_at?: string;
|
|
55
|
+
/** Caveat the caller should read before trusting the list. */
|
|
56
|
+
note?: string;
|
|
57
|
+
}
|
|
39
58
|
export interface DeliveryOptions {
|
|
40
59
|
/** Explicitly identify agent-to-agent delivery when metadata is unavailable. */
|
|
41
60
|
isCrossInstance?: boolean;
|
|
@@ -83,6 +102,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
83
102
|
costGuard: CostGuard | null;
|
|
84
103
|
private statuslineWatcher;
|
|
85
104
|
private dailySummary;
|
|
105
|
+
private dailyTipScheduler;
|
|
86
106
|
private webhookEmitter;
|
|
87
107
|
private topicIcons;
|
|
88
108
|
private lastActivity;
|
|
@@ -94,6 +114,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
94
114
|
private warmCapEvicting;
|
|
95
115
|
/** Per-instance tail keeps cross-instance and scheduled deliveries FIFO. */
|
|
96
116
|
private idleGatedDeliveryTails;
|
|
117
|
+
/**
|
|
118
|
+
* Per-instance cancellation epoch for deliveries which have not reached the
|
|
119
|
+
* daemon yet. A cancel advances the epoch; queued work captures the old value
|
|
120
|
+
* and becomes a no-op, while messages arriving after the click capture the new
|
|
121
|
+
* value and remain deliverable.
|
|
122
|
+
*/
|
|
123
|
+
private deliveryEpochs;
|
|
97
124
|
/** Non-user work must observe a fresh idle snapshot after the latest delivery. */
|
|
98
125
|
private lastDeliveryAt;
|
|
99
126
|
/** State-cache updates wake event-driven idle waiters without busy polling. */
|
|
@@ -106,6 +133,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
106
133
|
readonly replyDeduper: ReplyDeduper;
|
|
107
134
|
/** instanceName → what it is doing right now, when the backend can tell us. */
|
|
108
135
|
private instanceActivity;
|
|
136
|
+
/** instanceName → this turn's tool list (multi-line), for the bubble. */
|
|
137
|
+
private instanceProgress;
|
|
109
138
|
/** instanceName → tail of deliveries waiting for its IPC to come back. */
|
|
110
139
|
private ipcWaitTails;
|
|
111
140
|
/** instanceName → restart currently executing; concurrent callers join it. */
|
|
@@ -119,8 +148,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
119
148
|
/** In-flight /effort selections, same coordinator shape as pendingModelSelects. */
|
|
120
149
|
private pendingEffortSelects;
|
|
121
150
|
private pendingModelSelects;
|
|
122
|
-
/**
|
|
123
|
-
private
|
|
151
|
+
/** nonce → pending button prompt (hang restart, interactive assist, clean-exit restart). */
|
|
152
|
+
private pendingNonceButtons;
|
|
124
153
|
private failoverActive;
|
|
125
154
|
/** instance → when a click with no live button entry last fired a cancel. */
|
|
126
155
|
private staleCancelClickAt;
|
|
@@ -137,6 +166,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
137
166
|
private healthServer;
|
|
138
167
|
private healthPortRetried;
|
|
139
168
|
private updateCheckTimer;
|
|
169
|
+
private updateProgressTimer;
|
|
170
|
+
private updateProgressEditRunning;
|
|
171
|
+
private lastUpdateProgressText;
|
|
172
|
+
private updateCompletionTipText;
|
|
140
173
|
private eventLogPruneTimer;
|
|
141
174
|
private logRotateTimer;
|
|
142
175
|
/** Days of event/activity history to keep. */
|
|
@@ -218,6 +251,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
218
251
|
*/
|
|
219
252
|
private isModelAdmin;
|
|
220
253
|
private handlePauseWakeSlash;
|
|
254
|
+
private handleUpdateSlash;
|
|
255
|
+
private handleTipsSlash;
|
|
221
256
|
/** Admin-only full conversation reset for fleet-topic and Classic instances. */
|
|
222
257
|
private handleClearSlash;
|
|
223
258
|
/** Get the adapter bound to an instance, falling back to primary adapter */
|
|
@@ -248,6 +283,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
248
283
|
bindInstanceAdapter(name: string, adapterId: string, fromInbound?: boolean): void;
|
|
249
284
|
getInstanceStatus(name: string): "running" | "paused" | "stopped" | "crashed";
|
|
250
285
|
getInstanceExecutionState(name: string): InstanceState | null;
|
|
286
|
+
/**
|
|
287
|
+
* Subscription providers currently relevant to this fleet. Stopped/crashed
|
|
288
|
+
* rows do not keep a usage card alive, while persisted paused instances do.
|
|
289
|
+
* Classic channels use their effective backend merge chain, not the raw row.
|
|
290
|
+
*/
|
|
291
|
+
getActiveUsageProviderIds(): ReadonlySet<string>;
|
|
251
292
|
isClassicInstance(name: string): boolean;
|
|
252
293
|
private cacheInstanceExecutionState;
|
|
253
294
|
private cancelIdleButtonRetirement;
|
|
@@ -264,6 +305,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
264
305
|
*/
|
|
265
306
|
private enforceWarmCap;
|
|
266
307
|
private waitForInstanceIdle;
|
|
308
|
+
/**
|
|
309
|
+
* Ask the daemon to capture the pane before answering, then wait for any state
|
|
310
|
+
* report produced after this request. The ordinary query is intentionally
|
|
311
|
+
* cache-only (idle gates call it frequently); this opt-in refresh is reserved
|
|
312
|
+
* for lifecycle decisions where a stale state would strand UI.
|
|
313
|
+
*/
|
|
314
|
+
private refreshInstanceExecutionState;
|
|
267
315
|
private deliverWithIdleGate;
|
|
268
316
|
/**
|
|
269
317
|
* Hand a payload to an instance's IPC, waiting out a *transient* disconnect.
|
|
@@ -331,6 +379,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
331
379
|
ready: boolean;
|
|
332
380
|
token: string | null;
|
|
333
381
|
};
|
|
382
|
+
beginUpdateProgress(adapter: ChannelAdapter, chatId: string, threadId: string | undefined, messageId: string): void;
|
|
383
|
+
failUpdateProgress(message: string): void;
|
|
384
|
+
/** The old fleet edits CLI install stages; the new fleet adopts the same message below. */
|
|
385
|
+
private startUpdateProgressMonitor;
|
|
334
386
|
/** Start all instances from fleet config */
|
|
335
387
|
startAll(configPath: string): Promise<void>;
|
|
336
388
|
/**
|
|
@@ -437,6 +489,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
437
489
|
private handleDecisionCrud;
|
|
438
490
|
/** Resolve display name for an instance, fallback to instance name. */
|
|
439
491
|
resolveDisplayName(instanceName: string): string;
|
|
492
|
+
/** Persist identity to the instance's actual config store. Classic instances
|
|
493
|
+
* are registry rows in classicBot.yaml, not fleet.yaml instance entries. */
|
|
494
|
+
private setInstanceDisplayName;
|
|
495
|
+
private setInstanceDescription;
|
|
440
496
|
private handleSetDisplayName;
|
|
441
497
|
private handleSetDescription;
|
|
442
498
|
handleScheduleCrudHttp(instance: string, op: string, args: Record<string, unknown>): Promise<unknown>;
|
|
@@ -457,9 +513,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
457
513
|
private startTopicCleanupPoller;
|
|
458
514
|
/**
|
|
459
515
|
* Patch only values changed in the effective config into the original YAML
|
|
460
|
-
* document. Unknown keys
|
|
516
|
+
* document. Unknown keys and comments remain untouched; redundant
|
|
517
|
+
* non-identity instance leaves are canonicalized to inheritance afterward.
|
|
461
518
|
*/
|
|
462
519
|
saveFleetConfig(explicitPatches?: RawConfigPatch[]): void;
|
|
520
|
+
/** One-time upgrade migration; invalid YAML is never rewritten. */
|
|
521
|
+
private slimFleetConfigAtStartup;
|
|
522
|
+
private writeFleetConfigBackup;
|
|
463
523
|
private patchFleetDocument;
|
|
464
524
|
removeInstance(name: string): Promise<void>;
|
|
465
525
|
startStatuslineWatcher(name: string): void;
|
|
@@ -532,6 +592,57 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
532
592
|
private static readonly FLEET_ERROR_THROTTLE_MS;
|
|
533
593
|
private fleetErrorNotices;
|
|
534
594
|
notifyInstanceTopic(instanceName: string, text: string, extraOpts?: import("./channel/types.js").SendOpts): void;
|
|
595
|
+
/**
|
|
596
|
+
* Post decision buttons whose callback ids are `<prefix><nonce>:<action>`.
|
|
597
|
+
* The entry is registered before the send and rolled back if the send
|
|
598
|
+
* fails, so a nonce in the map always refers to a message that exists (or
|
|
599
|
+
* is about to). Returns the nonce, or null when the alert could not be sent.
|
|
600
|
+
*/
|
|
601
|
+
private postNonceButtonPrompt;
|
|
602
|
+
/**
|
|
603
|
+
* Claim a nonce-armed callback exactly once.
|
|
604
|
+
*
|
|
605
|
+
* Returns:
|
|
606
|
+
* - null — the callback is not for this prefix; try the next handler
|
|
607
|
+
* - "consumed" — for this prefix but stale/denied/malformed; stop dispatch
|
|
608
|
+
* - the entry+action — the click is authorized and now claimed (removed
|
|
609
|
+
* from the map before any await, so double clicks cannot act twice)
|
|
610
|
+
*
|
|
611
|
+
* A stale click (expired nonce, or a pre-upgrade button whose payload no
|
|
612
|
+
* longer parses) collapses the clicked message so the dead button stops
|
|
613
|
+
* inviting clicks — the same courtesy the cancel button extends.
|
|
614
|
+
*/
|
|
615
|
+
private consumeNonceCallback;
|
|
616
|
+
/** Collapse a consumed prompt's buttons into a final status line. */
|
|
617
|
+
private retireNonceButtons;
|
|
618
|
+
private tipsEnabled;
|
|
619
|
+
private readTipState;
|
|
620
|
+
private pickAvailableTip;
|
|
621
|
+
private tipText;
|
|
622
|
+
private formatTip;
|
|
623
|
+
/** Post one fresh nonce-armed tip in a known General channel. */
|
|
624
|
+
promptTip(generalName: string, adapter: ChannelAdapter, chatId: string, threadId?: string): Promise<"posted" | "empty" | "unavailable">;
|
|
625
|
+
private promptAdvancedTipUnlock;
|
|
626
|
+
private sendTipToGeneral;
|
|
627
|
+
private handleTipDismiss;
|
|
628
|
+
private handleTipUnlock;
|
|
629
|
+
/** Post the destructive `/clear` confirmation in the invoking channel. */
|
|
630
|
+
promptClearConfirmation(instanceName: string, channelId: string, adapter: ChannelAdapter, chatId: string, threadId?: string): Promise<string | null>;
|
|
631
|
+
/** Consume `/clear` Confirm/Cancel exactly once; only Confirm reaches IPC. */
|
|
632
|
+
private handleClearConfirmation;
|
|
633
|
+
/**
|
|
634
|
+
* Drop every pending prompt that refers to an instance being stopped or
|
|
635
|
+
* restarted — a restart offer for an instance the operator just restarted
|
|
636
|
+
* (or an assist for one they stopped) must not stay clickable for the rest
|
|
637
|
+
* of its 15 minutes.
|
|
638
|
+
*/
|
|
639
|
+
clearNoncePromptsForInstance(instanceName: string): void;
|
|
640
|
+
/** A clean exit is intentional from the CLI's perspective, but often not from
|
|
641
|
+
* the operator's. Keep the instance notice passive and put the action in the
|
|
642
|
+
* same-world General topic where an administrator can make the choice. */
|
|
643
|
+
notifyNormalExit(instanceName: string): Promise<void>;
|
|
644
|
+
/** Consume a clean-exit Restart/Ignore button exactly once. */
|
|
645
|
+
private handleExitRestartPrompt;
|
|
535
646
|
private interactivePromptLabel;
|
|
536
647
|
/**
|
|
537
648
|
* Surface a stable terminal prompt in both places that matter:
|
|
@@ -542,7 +653,6 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
542
653
|
* contain usernames or secret-adjacent text and stays in daemon.log.
|
|
543
654
|
*/
|
|
544
655
|
notifyInteractivePrompt(instanceName: string, kind: string): Promise<void>;
|
|
545
|
-
private retireInteractivePromptButtons;
|
|
546
656
|
/** Consume a General assist button exactly once. */
|
|
547
657
|
private handleInteractivePromptAssist;
|
|
548
658
|
/** Send a "🛑 Cancel" button to the instance's topic/channel after delivery. */
|
|
@@ -570,7 +680,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
570
680
|
*/
|
|
571
681
|
private handleCancelClick;
|
|
572
682
|
private hasCancelButton;
|
|
573
|
-
sendCancelButton(instanceName: string, correlationId?: string): Promise<void>;
|
|
683
|
+
sendCancelButton(instanceName: string, correlationId?: string, preserveProgress?: boolean): Promise<void>;
|
|
574
684
|
/**
|
|
575
685
|
* The cancel button's text for a given elapsed time.
|
|
576
686
|
*
|
|
@@ -580,6 +690,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
580
690
|
* and once the agent had replied once there was no sign it was still going.
|
|
581
691
|
*/
|
|
582
692
|
static progressText(elapsedMs: number, activity?: string | null, minElapsedMs?: number): string;
|
|
693
|
+
/** Render elapsed time consistently in live and retained progress bubbles. */
|
|
694
|
+
private static formatProgressElapsed;
|
|
695
|
+
/** Final read-only form of a bubble that contains semantic tool history.
|
|
696
|
+
* Neutral wording is intentional: the same retirement primitive is used for
|
|
697
|
+
* normal completion, a mid-turn bubble replacement, and user cancellation,
|
|
698
|
+
* so claiming every retained checkpoint is "completed" would be false. */
|
|
699
|
+
private composeRetiredBubbleText;
|
|
583
700
|
/**
|
|
584
701
|
* Make a tool summary safe to paste into a channel message.
|
|
585
702
|
*
|
|
@@ -597,6 +714,26 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
597
714
|
* never used to decide anything — purely what the user is shown.
|
|
598
715
|
*/
|
|
599
716
|
private cacheInstanceActivity;
|
|
717
|
+
/**
|
|
718
|
+
* Cache the turn's tool-progress list and push it into the instance's live
|
|
719
|
+
* bubble, coalesced so a burst of tool events cannot flood the Bot API
|
|
720
|
+
* (Telegram's flood limit is per-chat across ALL forum topics, so edits are
|
|
721
|
+
* rate-limited per bubble AND ride behind the daemon-side 3s coalescer).
|
|
722
|
+
*/
|
|
723
|
+
private cacheInstanceProgress;
|
|
724
|
+
/** At most one progress-driven edit per bubble per TOOL_PROGRESS_EDIT_MIN_MS. */
|
|
725
|
+
private scheduleProgressEdit;
|
|
726
|
+
/**
|
|
727
|
+
* The ONE composer for the bubble text. Both writers — the elapsed-time
|
|
728
|
+
* ticker and the tool-progress push — go through here; two independent
|
|
729
|
+
* renderers editing the same message is how the progress list used to get
|
|
730
|
+
* wiped by the next elapsed tick (#528 trap 2).
|
|
731
|
+
*/
|
|
732
|
+
private composeBubbleText;
|
|
733
|
+
/** Pure composition of header + tool list, exposed for tests. */
|
|
734
|
+
static bubbleText(elapsedMs: number, activity: string | undefined, minElapsedMs: number, progress: string | undefined): string;
|
|
735
|
+
/** Recompose and edit the bubble in place; skips when nothing changed. */
|
|
736
|
+
private refreshBubble;
|
|
600
737
|
/**
|
|
601
738
|
* Refresh the button's text in place while the instance keeps working.
|
|
602
739
|
*
|
|
@@ -609,10 +746,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
609
746
|
private startProgressTicker;
|
|
610
747
|
/**
|
|
611
748
|
* After a reply: give the instance REPLY_RETIRE_GRACE_MS to resume working; if
|
|
612
|
-
* it has not, retire its button.
|
|
613
|
-
*
|
|
749
|
+
* it has not, retire its button. The daemon is asked for a fresh pane capture
|
|
750
|
+
* before deciding. Reading only the transition cache stranded the first
|
|
751
|
+
* post-restart bubble when its startup "working" report never got a matching
|
|
752
|
+
* idle edge. Re-arming replaces the previous timer, so a burst of replies ends
|
|
753
|
+
* with exactly one pending check.
|
|
614
754
|
*/
|
|
615
755
|
private armReplyGrace;
|
|
756
|
+
private finishReplyGrace;
|
|
616
757
|
/** Retire (delete) every cancel button belonging to an instance. */
|
|
617
758
|
private retireInstanceButtons;
|
|
618
759
|
/** Begin retiring one button (delete + bounded retry on failure). Idempotent:
|
|
@@ -637,7 +778,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
637
778
|
private sweepOrphanedCancelButtons;
|
|
638
779
|
/** Re-attempt a failed button delete up to CANCEL_BTN_MAX_RETRIES times. */
|
|
639
780
|
private scheduleButtonRetry;
|
|
640
|
-
/**
|
|
781
|
+
/** Retire one cancel bubble via its own adapter. A bubble that accumulated
|
|
782
|
+
* tool progress is kept as a read-only history message; a plain bubble keeps
|
|
783
|
+
* the legacy delete/edit-to-checkmark behavior. Resolves on success and
|
|
641
784
|
* rejects on failure so the caller can retry. */
|
|
642
785
|
private deleteButtonMessage;
|
|
643
786
|
/** Retire all cancel buttons for an instance — on reply or cancel. */
|
|
@@ -661,6 +804,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
661
804
|
private reactDone;
|
|
662
805
|
/** Interrupt an instance's current generation (cancel button / /cancel). */
|
|
663
806
|
cancelInstance(instanceName: string): boolean;
|
|
807
|
+
getDeliveryEpoch(instanceName: string): number;
|
|
808
|
+
private isDeliveryEpochCurrent;
|
|
809
|
+
/** Invalidate work queued before a user cancel and wake idle-gate waiters. */
|
|
810
|
+
private cancelPendingDeliveries;
|
|
664
811
|
queueMirrorMessage(text: string): void;
|
|
665
812
|
/** Push an SSE event to all connected Web UI clients. */
|
|
666
813
|
emitSseEvent(event: string, data: unknown): void;
|
|
@@ -669,12 +816,57 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
669
816
|
title: string;
|
|
670
817
|
}>;
|
|
671
818
|
sendHangNotification(instanceName: string, unchangedForMs?: number): Promise<void>;
|
|
819
|
+
/**
|
|
820
|
+
* Consume a hang Force-restart / Keep-waiting button exactly once. Restart
|
|
821
|
+
* goes through restartSingleInstance — serialized against concurrent restart
|
|
822
|
+
* sources, and with a Classic-instance fallback (the previous hand-rolled
|
|
823
|
+
* stop+start silently left Classic instances stopped while reporting
|
|
824
|
+
* "restarted").
|
|
825
|
+
*/
|
|
826
|
+
private handleHangPrompt;
|
|
672
827
|
private static INSTRUCTIONS_FILENAME;
|
|
673
828
|
private static GENERAL_INSTRUCTIONS;
|
|
674
829
|
/** Ensure the general instance has its project instructions file + knowledge */
|
|
675
830
|
private ensureGeneralInstructions;
|
|
676
|
-
/**
|
|
831
|
+
/** Resolve the workspace path a backend actually uses before publishing knowledge. */
|
|
832
|
+
private resolveKnowledgeWorkDir;
|
|
833
|
+
/**
|
|
834
|
+
* Where each backend natively loads on-demand skills from, relative to the
|
|
835
|
+
* workspace. Backends without a native skill mechanism (opencode, grok,
|
|
836
|
+
* antigravity, gemini-cli) are deliberately absent: dropping files a CLI
|
|
837
|
+
* never reads is clutter, not capability. Unknown directories are ignored
|
|
838
|
+
* by older CLI versions, so publishing is fail-open across upgrades.
|
|
839
|
+
*/
|
|
840
|
+
private static SKILLS_DIR_SEGMENTS;
|
|
841
|
+
/** Copy general-knowledge steering + all role-eligible skills to General. */
|
|
677
842
|
private syncGeneralKnowledge;
|
|
843
|
+
/** Publish only the bundled skills eligible for an instance role. */
|
|
844
|
+
private syncRoleSkills;
|
|
845
|
+
/**
|
|
846
|
+
* Steering (always-on rules like core-rules.md). Kiro loads a native
|
|
847
|
+
* steering directory; every other backend gets the content embedded into
|
|
848
|
+
* its instructions file (CLAUDE.md / AGENTS.md / …) inside a managed marker
|
|
849
|
+
* block — the previous behavior dropped bare .md files in the workspace
|
|
850
|
+
* root, which no CLI ever read. The block is replaced in place on every
|
|
851
|
+
* sync, so rule updates reach EXISTING workspaces; everything the user
|
|
852
|
+
* wrote outside the markers is preserved byte-for-byte.
|
|
853
|
+
*/
|
|
854
|
+
private syncGeneralSteering;
|
|
855
|
+
private static STEERING_BLOCK_BEGIN;
|
|
856
|
+
private static STEERING_BLOCK_END;
|
|
857
|
+
/**
|
|
858
|
+
* Publish AgEnD's bundled skills into a CLI's native skills directory,
|
|
859
|
+
* owning ONLY what we published. A manifest records which skill names AgEnD
|
|
860
|
+
* wrote; a bundled rename/removal deletes the stale managed copy, while a
|
|
861
|
+
* skill the user created by hand is never listed and therefore never
|
|
862
|
+
* touched — even if a future bundle happens to reuse its name (the sync
|
|
863
|
+
* then skips it and logs, rather than overwrite the user's work). The sole
|
|
864
|
+
* migration exception is the pre-manifest Kiro General layout explicitly
|
|
865
|
+
* selected by adoptLegacyUnmanaged.
|
|
866
|
+
*/
|
|
867
|
+
private syncManagedSkills;
|
|
868
|
+
/** Read AgEnD's roles extension from SKILL.md YAML frontmatter. */
|
|
869
|
+
private readManagedSkillRoles;
|
|
678
870
|
/** Fetch forum topic icon stickers and pick emoji IDs for each state */
|
|
679
871
|
private resolveTopicIcons;
|
|
680
872
|
/** Set topic icon based on instance state */
|
|
@@ -717,6 +909,34 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
717
909
|
private probeCliEnvs;
|
|
718
910
|
/** Best-effort model list for `/model`: cached CLI env first, else live probe. Never throws. */
|
|
719
911
|
private getModelOptions;
|
|
912
|
+
/**
|
|
913
|
+
* Model catalog behind the `list_models` tool.
|
|
914
|
+
*
|
|
915
|
+
* The two scopes are not cosmetic. "global" is the account/CLI catalog served
|
|
916
|
+
* from the startup probe cache; "instance" is resolved through that instance's
|
|
917
|
+
* OWN backend config, and for a Codex instance on a custom provider that is a
|
|
918
|
+
* different catalog entirely — `listModels()` reads models_cache.json out of
|
|
919
|
+
* the instance's private CODEX_HOME. Answering such an instance with the
|
|
920
|
+
* account list would name models its CLI rejects, which is exactly the
|
|
921
|
+
* mistake this tool exists to prevent.
|
|
922
|
+
*
|
|
923
|
+
* `scope` always describes where the returned LIST came from, not what was
|
|
924
|
+
* asked for: an instance query that falls back to the account catalog reports
|
|
925
|
+
* scope "global" and says so in `note`, rather than implying instance-level
|
|
926
|
+
* accuracy it does not have.
|
|
927
|
+
*
|
|
928
|
+
* Never throws — a model listing is an aid, and failing it must not fail a turn.
|
|
929
|
+
*/
|
|
930
|
+
listModelCatalog(opts?: {
|
|
931
|
+
backend?: string;
|
|
932
|
+
instanceName?: string;
|
|
933
|
+
}): Promise<ModelCatalog>;
|
|
934
|
+
/** The custom provider an instance overrides its backend with, if any. */
|
|
935
|
+
private customProviderFor;
|
|
936
|
+
/** Ask a backend for its catalog using ONE instance's real config. Never throws. */
|
|
937
|
+
private instanceScopedModels;
|
|
938
|
+
/** Account-wide catalog: probe cache first, live probe on miss. */
|
|
939
|
+
private globalModelCatalog;
|
|
720
940
|
/** `/model` slash handler (admin only). No arg → DC menu; `/model <name>` → apply directly. */
|
|
721
941
|
/** Label an effort choice, marking the one currently configured. */
|
|
722
942
|
private effortChoiceLabel;
|
|
@@ -821,7 +1041,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
821
1041
|
/**
|
|
822
1042
|
* Hot-reload: re-read fleet.yaml and reconcile running instances.
|
|
823
1043
|
* Starts new, stops removed, restarts modified instances.
|
|
824
|
-
*
|
|
1044
|
+
* Whitelisted runtime fields are pushed into live daemons; all other instance
|
|
1045
|
+
* fields, plus cold fleet-level settings, retain restart semantics.
|
|
825
1046
|
*/
|
|
826
1047
|
private reconcileInstances;
|
|
827
1048
|
restartInstances(): Promise<void>;
|