@songsid/agend 2.2.0-beta.4 → 2.2.0-beta.6
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/backend/claude-carry.d.ts +22 -0
- package/dist/backend/claude-carry.js +170 -0
- package/dist/backend/claude-carry.js.map +1 -0
- package/dist/backend/claude-code.d.ts +23 -0
- package/dist/backend/claude-code.js +102 -2
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +7 -0
- package/dist/backend/credential-profile.js +7 -1
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/kiro.js +5 -2
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/muse.d.ts +41 -0
- package/dist/backend/muse.js +239 -44
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/types.d.ts +7 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/background-work-ended.d.ts +18 -0
- package/dist/background-work-ended.js +30 -0
- package/dist/background-work-ended.js.map +1 -0
- package/dist/channel/adapters/telegram.d.ts +4 -5
- package/dist/channel/adapters/telegram.js +33 -17
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/message-edit-errors.d.ts +5 -0
- package/dist/channel/message-edit-errors.js +24 -0
- package/dist/channel/message-edit-errors.js.map +1 -0
- package/dist/cli.js +60 -10
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +3 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/daemon.js +41 -0
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-context.d.ts +4 -1
- package/dist/fleet-manager.d.ts +112 -5
- package/dist/fleet-manager.js +516 -52
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +44 -9
- package/dist/locale.js +18 -2
- package/dist/locale.js.map +1 -1
- package/dist/needs-you-hub.js +2 -0
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you-live.d.ts +6 -0
- package/dist/needs-you-live.js +23 -3
- package/dist/needs-you-live.js.map +1 -1
- package/dist/outbound-handlers.d.ts +7 -0
- package/dist/outbound-handlers.js +19 -10
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/public-preview.d.ts +100 -0
- package/dist/public-preview.js +233 -0
- package/dist/public-preview.js.map +1 -0
- package/dist/public-web-gateway.js +4 -3
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +20 -0
- package/dist/public-web-link.js +26 -1
- package/dist/public-web-link.js.map +1 -1
- package/dist/restart-progress.d.ts +33 -0
- package/dist/restart-progress.js +30 -0
- package/dist/restart-progress.js.map +1 -1
- package/dist/service-installer.d.ts +31 -0
- package/dist/service-installer.js +41 -2
- package/dist/service-installer.js.map +1 -1
- package/dist/topic-commands.js +3 -1
- package/dist/topic-commands.js.map +1 -1
- package/dist/tunnel/purpose-lane.d.ts +5 -1
- package/dist/tunnel/purpose-lane.js +14 -7
- package/dist/tunnel/purpose-lane.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/ui/chat-strings.js +14 -2
- package/dist/ui/chat-thread.js +2 -2
- package/dist/ui/panel-chat.js +9 -2
- package/dist/ui/panel-fleet.js +148 -35
- package/dist/ui/panel-needs.js +4 -3
- package/dist/ui/panel-settings.js +1 -1
- package/dist/ui/preview-status.js +28 -0
- package/dist/ui/preview.js +35 -2
- package/dist/ui/shared/app-i18n.js +4 -0
- package/dist/ui/shared/app-prefs.js +1 -0
- package/dist/ui/shared/app-shell.js +146 -2
- package/dist/ui/shared/app-stream.js +21 -4
- package/dist/ui/shared/app.css +41 -15
- package/dist/ui/shared/instance-nav.js +47 -16
- package/dist/ui/shared/usage-dialog.js +10 -1
- package/dist/ui/shared/view-strings.js +4 -0
- package/dist/update-install.d.ts +13 -1
- package/dist/update-install.js +16 -4
- package/dist/update-install.js.map +1 -1
- package/dist/update-marker.d.ts +51 -0
- package/dist/update-marker.js +61 -0
- package/dist/update-marker.js.map +1 -1
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +1 -1
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/providers.d.ts +34 -5
- package/dist/usage/providers.js +160 -27
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/statusline-usage.d.ts +6 -2
- package/dist/usage/statusline-usage.js +10 -4
- package/dist/usage/statusline-usage.js.map +1 -1
- package/dist/web-api.d.ts +20 -1
- package/dist/web-api.js +101 -13
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.js +2 -1
- package/dist/web-auth.js.map +1 -1
- package/dist/web-prefs.js +2 -0
- package/dist/web-prefs.js.map +1 -1
- package/dist/web-preview.d.ts +14 -1
- package/dist/web-preview.js +35 -13
- package/dist/web-preview.js.map +1 -1
- package/dist/web-schedules.d.ts +12 -0
- package/dist/web-schedules.js +34 -0
- package/dist/web-schedules.js.map +1 -0
- package/dist/web-server-drain.d.ts +10 -0
- package/dist/web-server-drain.js +50 -0
- package/dist/web-server-drain.js.map +1 -0
- package/package.json +1 -1
- package/templates/launchd.plist.ejs +3 -1
- package/templates/systemd.service.ejs +2 -1
package/dist/fleet-context.d.ts
CHANGED
|
@@ -105,7 +105,10 @@ export interface FleetContext {
|
|
|
105
105
|
getInstanceAdapterId?(instanceName: string): string | undefined;
|
|
106
106
|
changeInstancePauseState(name: string, action: "pause" | "wake"): Promise<"paused" | "awake" | "not_idle">;
|
|
107
107
|
startInstance(name: string, config: InstanceConfig, topicMode: boolean): Promise<void>;
|
|
108
|
-
|
|
108
|
+
/** #1716: resolves whether the stop ended background work that was running. */
|
|
109
|
+
stopInstance(name: string): Promise<{
|
|
110
|
+
backgroundWorkEnded: boolean;
|
|
111
|
+
}>;
|
|
109
112
|
connectIpcToInstance(name: string): Promise<void>;
|
|
110
113
|
saveFleetConfig(): void;
|
|
111
114
|
getInstanceDir(name: string): string;
|
package/dist/fleet-manager.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export declare function applyTaskListCap<T extends {
|
|
|
51
51
|
omitted: number;
|
|
52
52
|
hint: string;
|
|
53
53
|
} | T[];
|
|
54
|
+
import { type PublicPreviewForUi } from "./web-api.js";
|
|
54
55
|
import { WebChatHistory } from "./web-chat-history.js";
|
|
55
56
|
import { SeenUsers, type MentionNames, type MentionQuery } from "./web-mentions.js";
|
|
56
57
|
import { WebPrefsStore } from "./web-prefs.js";
|
|
@@ -74,6 +75,7 @@ import { type PreviewAvailability } from "./web-preview.js";
|
|
|
74
75
|
import { type ConnectionMetadata, type ConnectionBinding, type BindingProbe, type SecretApplyJob, type ProviderSecretApplyJob } from "./connection-secrets.js";
|
|
75
76
|
import { type ProviderSecretStatus } from "./provider-secret-registry.js";
|
|
76
77
|
import { ApplyJobStore, type ApplyJob, type ApplyTargetKind, type SelfRestartResult } from "./apply-job.js";
|
|
78
|
+
import { type CarryResult } from "./backend/claude-carry.js";
|
|
77
79
|
import { StormWindow } from "./storm-window.js";
|
|
78
80
|
import { SpawnGate } from "./spawn-gate.js";
|
|
79
81
|
import { BackendOutageTracker } from "./backend-outage.js";
|
|
@@ -101,6 +103,17 @@ export declare function selectLruEvictions(warm: string[], cap: number, opts: {
|
|
|
101
103
|
* must match here, or a deleted instance's CLI is left running (#1305 P2-3).
|
|
102
104
|
*/
|
|
103
105
|
export declare function isOrphanInstanceWindowName(name: string): boolean;
|
|
106
|
+
/** restartSingleInstance's options. `carry` (#1753): a credential-profile switch; its outcome is written into `result`. */
|
|
107
|
+
export interface RestartOpts {
|
|
108
|
+
freshStart?: boolean;
|
|
109
|
+
explicit?: boolean;
|
|
110
|
+
carry?: {
|
|
111
|
+
backend: string;
|
|
112
|
+
from: string | null;
|
|
113
|
+
to: string | null;
|
|
114
|
+
result?: CarryResult | null;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
104
117
|
/**
|
|
105
118
|
* Answer shape for `list_models`. `scope` reports where the LIST came from —
|
|
106
119
|
* "instance" only when it was read through that instance's own backend config,
|
|
@@ -304,6 +317,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
304
317
|
private webChannelEchoGuards;
|
|
305
318
|
/** instanceName → restart currently executing; concurrent callers join it. */
|
|
306
319
|
private restartsInFlight;
|
|
320
|
+
/**
|
|
321
|
+
* #1753: each in-flight restart's stop → start gap — the conversation carry it will run there (its own, or one a later
|
|
322
|
+
* caller joined with before the gap), and whether the gap has been reached.
|
|
323
|
+
*/
|
|
324
|
+
private readonly restartGaps;
|
|
307
325
|
/**
|
|
308
326
|
* Delayed automatic retries for instances whose startup failed. Before this a
|
|
309
327
|
* failed start was logged once and the instance stayed `stopped` until an
|
|
@@ -402,6 +420,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
402
420
|
private connectionBindingInFlight;
|
|
403
421
|
private collabInstances;
|
|
404
422
|
private healthServer;
|
|
423
|
+
private healthServerDrain;
|
|
405
424
|
/** #1306: the preview listener (health_port + 1 by default), and whether it is listening. */
|
|
406
425
|
private previewListener;
|
|
407
426
|
private previewListening;
|
|
@@ -414,6 +433,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
414
433
|
private updateProgressEditRunning;
|
|
415
434
|
private lastUpdateProgressText;
|
|
416
435
|
private updateCompletionTipText;
|
|
436
|
+
/**
|
|
437
|
+
* #1660: an adopted update whose retire outcome is still owed. The
|
|
438
|
+
* completion summary was (or will be) posted; this watch appends the
|
|
439
|
+
* cleanup outcome to the same receipt instead of letting stage edits
|
|
440
|
+
* clobber it — and refuses a receipt that no longer matches (checklist 3/5).
|
|
441
|
+
*/
|
|
442
|
+
private updateCleanupWatch;
|
|
417
443
|
/** Injectable only to keep the chat→CLI reload hand-off deterministic in tests. */
|
|
418
444
|
private fullRestartLauncher;
|
|
419
445
|
private eventLogPruneTimer;
|
|
@@ -602,6 +628,18 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
602
628
|
*/
|
|
603
629
|
isPlannedRestart(): boolean;
|
|
604
630
|
private finishStartup;
|
|
631
|
+
/**
|
|
632
|
+
* We are the post-update fleet: the update is over by definition. Clearing it here (rather than in the update
|
|
633
|
+
* command, which exits before the new fleet is up) is what keeps the quiet window from outliving the restart.
|
|
634
|
+
* #1660 exception: an update still owing its retire outcome keeps its receipt until the cleanup watch resolves it —
|
|
635
|
+
* deleting it here is what lost the warning. Terminal stages are still cleared unconditionally.
|
|
636
|
+
* #1735: and while the watch is armed it owns the marker — even if the outcome landed after the completion posted
|
|
637
|
+
* (a launchd kickstart or a detached restart returns at once, so it can land at any point of the boot): the watch
|
|
638
|
+
* appends it, then clears.
|
|
639
|
+
* #1737 review: and only the marker this boot adopted. One written since — a `/restart full` or a new `/update`
|
|
640
|
+
* landing while this boot's completion was still being edited — belongs to its writer and is left alone.
|
|
641
|
+
*/
|
|
642
|
+
private clearSettledUpdateMarker;
|
|
605
643
|
lastActivityMs(name: string): number;
|
|
606
644
|
/** Capture the current daemon and delivery owner for a background context read. */
|
|
607
645
|
getPaneContextSource(name: string): import("./pane-context-cache.js").PaneContextSource | null;
|
|
@@ -1097,12 +1135,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1097
1135
|
/** Last-resort completion after RestartProgress could not deliver to its
|
|
1098
1136
|
* adopted target. It stays bounded and never wakes a not-ready gateway. */
|
|
1099
1137
|
private sendFleetStartCompletionFallback;
|
|
1100
|
-
stopInstance(name: string, transition?: TransitionHandle): Promise<
|
|
1138
|
+
stopInstance(name: string, transition?: TransitionHandle): Promise<{
|
|
1139
|
+
backgroundWorkEnded: boolean;
|
|
1140
|
+
}>;
|
|
1101
1141
|
/** Restart a single instance, reloading fleet.yaml first to pick up config changes. */
|
|
1102
|
-
restartSingleInstance(name: string, opts?:
|
|
1103
|
-
freshStart?: boolean;
|
|
1104
|
-
explicit?: boolean;
|
|
1105
|
-
}): Promise<void>;
|
|
1142
|
+
restartSingleInstance(name: string, opts?: RestartOpts): Promise<void>;
|
|
1106
1143
|
isInstanceRestarting(name: string): boolean;
|
|
1107
1144
|
/** InstanceLifecycleContext: an explicit wake joins the restart in flight. */
|
|
1108
1145
|
restartInFlight(name: string): Promise<void> | undefined;
|
|
@@ -1123,6 +1160,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1123
1160
|
* One-shot: the daemon deletes it on startup.
|
|
1124
1161
|
*/
|
|
1125
1162
|
private writeFreshStartMarker;
|
|
1163
|
+
/**
|
|
1164
|
+
* #1753: a credential-profile switch, between the old CLI's stop and the new one's start. Where the backend can take
|
|
1165
|
+
* the conversation along (claude-code), copy it into the new profile and make it the one `--continue` picks; when that
|
|
1166
|
+
* cannot be done, or the backend cannot, start fresh as before. Null when nothing was tried.
|
|
1167
|
+
*/
|
|
1168
|
+
private switchConversation;
|
|
1126
1169
|
/** Load .env file from data dir into process.env */
|
|
1127
1170
|
private loadEnvFile;
|
|
1128
1171
|
/** Initialize auth before any adapter can answer /dashboard. */
|
|
@@ -1138,11 +1181,31 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1138
1181
|
ttlMinutes: number;
|
|
1139
1182
|
} | null;
|
|
1140
1183
|
private tunnelPurposeLane;
|
|
1184
|
+
private previewTunnel;
|
|
1141
1185
|
private publicWebLink;
|
|
1186
|
+
/** #1723: the public link's preview tunnel — a manager and lease of its own, never the fleet's one tunnel lane. */
|
|
1187
|
+
private getPreviewTunnel;
|
|
1142
1188
|
private getTunnelLane;
|
|
1143
1189
|
private publicOwnerCurrent;
|
|
1144
1190
|
/** Exact owning General. No primary-adapter or name fallback participates in authorization. */
|
|
1145
1191
|
private dashboardOwner;
|
|
1192
|
+
/**
|
|
1193
|
+
* #1742: the General a fleet admin's DM speaks for (`/start web`): the same owner `/web` in that General would make
|
|
1194
|
+
* — this bot's configured group and its one General topic. No address to match in a DM, so it must be unambiguous:
|
|
1195
|
+
* no General, or more than one on this bot and group, and there is no owner (nothing is guessed).
|
|
1196
|
+
*/
|
|
1197
|
+
private dmDashboardOwner;
|
|
1198
|
+
/**
|
|
1199
|
+
* #1742: a fleet admin whose Telegram `/web` could not reach them privately may next open the bot's DM and press
|
|
1200
|
+
* Telegram's START, which sends a bare `/start` — read as `/start web` (the DM menu) for 10 minutes, once, for that
|
|
1201
|
+
* admin on that bot. Monotonic: a wall-clock jump neither opens nor shuts it.
|
|
1202
|
+
*/
|
|
1203
|
+
private readonly tgWebStartWindows;
|
|
1204
|
+
private openTgWebStartWindow;
|
|
1205
|
+
/** Uses the window up: true when it was open. */
|
|
1206
|
+
private takeTgWebStartWindow;
|
|
1207
|
+
/** #1742: `/start web` from a fleet admin: the /web menu right here in the DM, for the General this bot serves. */
|
|
1208
|
+
private startWebInDm;
|
|
1146
1209
|
private getPublicWebLink;
|
|
1147
1210
|
getPublicWebStatus(): {
|
|
1148
1211
|
state: string;
|
|
@@ -1180,6 +1243,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1180
1243
|
/** Why the DM did not go, for the log only (Discord 50007 = the user does not accept DMs from this server's members). */
|
|
1181
1244
|
private logDashboardDmFailure;
|
|
1182
1245
|
/** False when the menu was not shown (the caller still owes the user an answer). */
|
|
1246
|
+
/**
|
|
1247
|
+
* `dmChatId` (#1742): show it in the owner's own private chat with the bot instead of the General — the owner, its
|
|
1248
|
+
* gates and the code's route are the same; only where the menu sits (and its clicks are good) changes.
|
|
1249
|
+
*/
|
|
1183
1250
|
private showDashboardMenu;
|
|
1184
1251
|
private handleDashboardCallback;
|
|
1185
1252
|
/** `/dashboard revoke`: sign out every browser and withdraw any unused code. */
|
|
@@ -1232,6 +1299,36 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1232
1299
|
private reportFullRestartFailure;
|
|
1233
1300
|
failUpdateProgress(message: string): void;
|
|
1234
1301
|
/** The old fleet edits CLI install stages; the new fleet adopts the same message below. */
|
|
1302
|
+
/**
|
|
1303
|
+
* #1660: arm the post-completion cleanup watch and make sure its monitor
|
|
1304
|
+
* actually runs. The new fleet adopts the receipt at boot but nothing else
|
|
1305
|
+
* starts this timer on that path (Prism a) — without this, the owed
|
|
1306
|
+
* outcome would sit in the marker unwatched. READY never waits for it.
|
|
1307
|
+
*/
|
|
1308
|
+
/**
|
|
1309
|
+
* #1735: what the completion of an adopted update does about its retire outcome, read from the marker as it is now.
|
|
1310
|
+
* Already landed with a warning (a detached restart returns before this fleet boots, so the updater retires first)
|
|
1311
|
+
* → render it in the completion. Still owed (`cleanup: "pending"` — a service restart waits for READY, which comes
|
|
1312
|
+
* after the completion) → watch for it. Anything else (no retire on this update, done silently, another receipt)
|
|
1313
|
+
* → nothing.
|
|
1314
|
+
*/
|
|
1315
|
+
/**
|
|
1316
|
+
* #1716: background work this restart/update ended, scoped to the operation
|
|
1317
|
+
* so an older stop never reports (`sinceAt` null = plain boot, report
|
|
1318
|
+
* nothing). A method — not a module function — because the #1737
|
|
1319
|
+
* extracted-completion harness runs this region verbatim with only
|
|
1320
|
+
* `this`-methods plus a fixed context.
|
|
1321
|
+
*/
|
|
1322
|
+
private collectBackgroundWorkEndedNames;
|
|
1323
|
+
private updateCleanupAtCompletion;
|
|
1324
|
+
private armCleanupWatch;
|
|
1325
|
+
/**
|
|
1326
|
+
* #1660: append a recorded cleanup outcome to the adopted update message,
|
|
1327
|
+
* then release the receipt — but only if this receipt still owns the
|
|
1328
|
+
* marker. The await yields, so a newer receipt (e.g. a full-restart that
|
|
1329
|
+
* landed mid-edit) must not be cleared or disturbed (Prism b).
|
|
1330
|
+
*/
|
|
1331
|
+
private appendCleanupWarning;
|
|
1235
1332
|
private startUpdateProgressMonitor;
|
|
1236
1333
|
/** Start all instances from fleet config */
|
|
1237
1334
|
startAll(configPath: string): Promise<void>;
|
|
@@ -1436,6 +1533,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1436
1533
|
*/
|
|
1437
1534
|
private resolveInboundTarget;
|
|
1438
1535
|
private handleInboundMessage;
|
|
1536
|
+
/**
|
|
1537
|
+
* #1752: the bot that speaks back about an inbound message — in a fleet topic the owning instance's adapter, never
|
|
1538
|
+
* the sibling that happened to win the dedup race; elsewhere (ClassicBot rooms, no routed instance) the receiver.
|
|
1539
|
+
*/
|
|
1540
|
+
private inboundNoticeAdapter;
|
|
1439
1541
|
private handleInboundMessageCore;
|
|
1440
1542
|
/** Handle outbound tool calls from a daemon instance */
|
|
1441
1543
|
/** Warn (but don't block) when rate limits are high. 30-min debounce per instance. */
|
|
@@ -3121,6 +3223,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3121
3223
|
previewForUi(hostHeader: string | undefined, secure: boolean): PreviewAvailability & {
|
|
3122
3224
|
boot: string | null;
|
|
3123
3225
|
};
|
|
3226
|
+
/**
|
|
3227
|
+
* #1723: for one page of the public link (exposure `exposureId`, at `dashboardOrigin`): its own preview tunnel's
|
|
3228
|
+
* origin once up, "starting" until then, why it failed if it did — or a configured web.preview_origin, used instead.
|
|
3229
|
+
*/
|
|
3230
|
+
publicPreviewForUi(exposureId: string, dashboardOrigin: string): PublicPreviewForUi;
|
|
3124
3231
|
getUiStatus(): unknown;
|
|
3125
3232
|
private getUiStatusSync;
|
|
3126
3233
|
}
|