@songsid/agend 2.2.0-beta.5 → 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 +16 -0
- package/dist/backend/claude-code.js +92 -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 +25 -10
- package/dist/cli.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 +82 -5
- package/dist/fleet-manager.js +355 -60
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +44 -9
- package/dist/locale.js +14 -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/restart-progress.d.ts +4 -0
- package/dist/restart-progress.js +7 -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/ui/shared/app-stream.js +21 -4
- package/dist/ui/shared/app.css +5 -2
- package/dist/ui/shared/usage-dialog.js +10 -1
- package/dist/update-install.d.ts +6 -2
- package/dist/update-install.js +8 -2
- package/dist/update-install.js.map +1 -1
- package/dist/update-marker.d.ts +11 -0
- package/dist/update-marker.js +12 -0
- package/dist/update-marker.js.map +1 -1
- package/dist/web-api.d.ts +3 -1
- 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
|
@@ -75,6 +75,7 @@ import { type PreviewAvailability } from "./web-preview.js";
|
|
|
75
75
|
import { type ConnectionMetadata, type ConnectionBinding, type BindingProbe, type SecretApplyJob, type ProviderSecretApplyJob } from "./connection-secrets.js";
|
|
76
76
|
import { type ProviderSecretStatus } from "./provider-secret-registry.js";
|
|
77
77
|
import { ApplyJobStore, type ApplyJob, type ApplyTargetKind, type SelfRestartResult } from "./apply-job.js";
|
|
78
|
+
import { type CarryResult } from "./backend/claude-carry.js";
|
|
78
79
|
import { StormWindow } from "./storm-window.js";
|
|
79
80
|
import { SpawnGate } from "./spawn-gate.js";
|
|
80
81
|
import { BackendOutageTracker } from "./backend-outage.js";
|
|
@@ -102,6 +103,17 @@ export declare function selectLruEvictions(warm: string[], cap: number, opts: {
|
|
|
102
103
|
* must match here, or a deleted instance's CLI is left running (#1305 P2-3).
|
|
103
104
|
*/
|
|
104
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
|
+
}
|
|
105
117
|
/**
|
|
106
118
|
* Answer shape for `list_models`. `scope` reports where the LIST came from —
|
|
107
119
|
* "instance" only when it was read through that instance's own backend config,
|
|
@@ -305,6 +317,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
305
317
|
private webChannelEchoGuards;
|
|
306
318
|
/** instanceName → restart currently executing; concurrent callers join it. */
|
|
307
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;
|
|
308
325
|
/**
|
|
309
326
|
* Delayed automatic retries for instances whose startup failed. Before this a
|
|
310
327
|
* failed start was logged once and the instance stayed `stopped` until an
|
|
@@ -403,6 +420,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
403
420
|
private connectionBindingInFlight;
|
|
404
421
|
private collabInstances;
|
|
405
422
|
private healthServer;
|
|
423
|
+
private healthServerDrain;
|
|
406
424
|
/** #1306: the preview listener (health_port + 1 by default), and whether it is listening. */
|
|
407
425
|
private previewListener;
|
|
408
426
|
private previewListening;
|
|
@@ -610,6 +628,18 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
610
628
|
*/
|
|
611
629
|
isPlannedRestart(): boolean;
|
|
612
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;
|
|
613
643
|
lastActivityMs(name: string): number;
|
|
614
644
|
/** Capture the current daemon and delivery owner for a background context read. */
|
|
615
645
|
getPaneContextSource(name: string): import("./pane-context-cache.js").PaneContextSource | null;
|
|
@@ -1105,12 +1135,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1105
1135
|
/** Last-resort completion after RestartProgress could not deliver to its
|
|
1106
1136
|
* adopted target. It stays bounded and never wakes a not-ready gateway. */
|
|
1107
1137
|
private sendFleetStartCompletionFallback;
|
|
1108
|
-
stopInstance(name: string, transition?: TransitionHandle): Promise<
|
|
1138
|
+
stopInstance(name: string, transition?: TransitionHandle): Promise<{
|
|
1139
|
+
backgroundWorkEnded: boolean;
|
|
1140
|
+
}>;
|
|
1109
1141
|
/** Restart a single instance, reloading fleet.yaml first to pick up config changes. */
|
|
1110
|
-
restartSingleInstance(name: string, opts?:
|
|
1111
|
-
freshStart?: boolean;
|
|
1112
|
-
explicit?: boolean;
|
|
1113
|
-
}): Promise<void>;
|
|
1142
|
+
restartSingleInstance(name: string, opts?: RestartOpts): Promise<void>;
|
|
1114
1143
|
isInstanceRestarting(name: string): boolean;
|
|
1115
1144
|
/** InstanceLifecycleContext: an explicit wake joins the restart in flight. */
|
|
1116
1145
|
restartInFlight(name: string): Promise<void> | undefined;
|
|
@@ -1131,6 +1160,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1131
1160
|
* One-shot: the daemon deletes it on startup.
|
|
1132
1161
|
*/
|
|
1133
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;
|
|
1134
1169
|
/** Load .env file from data dir into process.env */
|
|
1135
1170
|
private loadEnvFile;
|
|
1136
1171
|
/** Initialize auth before any adapter can answer /dashboard. */
|
|
@@ -1154,6 +1189,23 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1154
1189
|
private publicOwnerCurrent;
|
|
1155
1190
|
/** Exact owning General. No primary-adapter or name fallback participates in authorization. */
|
|
1156
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;
|
|
1157
1209
|
private getPublicWebLink;
|
|
1158
1210
|
getPublicWebStatus(): {
|
|
1159
1211
|
state: string;
|
|
@@ -1191,6 +1243,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1191
1243
|
/** Why the DM did not go, for the log only (Discord 50007 = the user does not accept DMs from this server's members). */
|
|
1192
1244
|
private logDashboardDmFailure;
|
|
1193
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
|
+
*/
|
|
1194
1250
|
private showDashboardMenu;
|
|
1195
1251
|
private handleDashboardCallback;
|
|
1196
1252
|
/** `/dashboard revoke`: sign out every browser and withdraw any unused code. */
|
|
@@ -1249,6 +1305,22 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1249
1305
|
* starts this timer on that path (Prism a) — without this, the owed
|
|
1250
1306
|
* outcome would sit in the marker unwatched. READY never waits for it.
|
|
1251
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;
|
|
1252
1324
|
private armCleanupWatch;
|
|
1253
1325
|
/**
|
|
1254
1326
|
* #1660: append a recorded cleanup outcome to the adopted update message,
|
|
@@ -1461,6 +1533,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1461
1533
|
*/
|
|
1462
1534
|
private resolveInboundTarget;
|
|
1463
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;
|
|
1464
1541
|
private handleInboundMessageCore;
|
|
1465
1542
|
/** Handle outbound tool calls from a daemon instance */
|
|
1466
1543
|
/** Warn (but don't block) when rate limits are high. 30-min debounce per instance. */
|