@songsid/agend 2.1.10 → 2.1.11-beta.2

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 (154) hide show
  1. package/dist/backend/antigravity.js +3 -2
  2. package/dist/backend/antigravity.js.map +1 -1
  3. package/dist/backend/claude-code.d.ts +7 -0
  4. package/dist/backend/claude-code.js +107 -3
  5. package/dist/backend/claude-code.js.map +1 -1
  6. package/dist/backend/cli-env-probe-worker.js +2 -10
  7. package/dist/backend/cli-env-probe-worker.js.map +1 -1
  8. package/dist/backend/cli-env-probe.d.ts +14 -0
  9. package/dist/backend/cli-env-probe.js +13 -0
  10. package/dist/backend/cli-env-probe.js.map +1 -0
  11. package/dist/backend/codex-metadata.d.ts +14 -0
  12. package/dist/backend/codex-metadata.js +70 -0
  13. package/dist/backend/codex-metadata.js.map +1 -0
  14. package/dist/backend/codex.d.ts +1 -2
  15. package/dist/backend/codex.js +112 -65
  16. package/dist/backend/codex.js.map +1 -1
  17. package/dist/backend/effort-metadata.d.ts +32 -0
  18. package/dist/backend/effort-metadata.js +21 -0
  19. package/dist/backend/effort-metadata.js.map +1 -0
  20. package/dist/backend/grok.js +3 -2
  21. package/dist/backend/grok.js.map +1 -1
  22. package/dist/backend/kiro-engine-ledger.d.ts +36 -0
  23. package/dist/backend/kiro-engine-ledger.js +113 -0
  24. package/dist/backend/kiro-engine-ledger.js.map +1 -0
  25. package/dist/backend/kiro-kas-store.d.ts +11 -0
  26. package/dist/backend/kiro-kas-store.js +67 -0
  27. package/dist/backend/kiro-kas-store.js.map +1 -0
  28. package/dist/backend/kiro-v3-identity.d.ts +28 -0
  29. package/dist/backend/kiro-v3-identity.js +213 -0
  30. package/dist/backend/kiro-v3-identity.js.map +1 -0
  31. package/dist/backend/kiro.d.ts +10 -0
  32. package/dist/backend/kiro.js +53 -5
  33. package/dist/backend/kiro.js.map +1 -1
  34. package/dist/backend/muse.js +3 -2
  35. package/dist/backend/muse.js.map +1 -1
  36. package/dist/backend/opencode-permission.d.ts +49 -0
  37. package/dist/backend/opencode-permission.js +181 -0
  38. package/dist/backend/opencode-permission.js.map +1 -0
  39. package/dist/backend/opencode.d.ts +37 -4
  40. package/dist/backend/opencode.js +112 -25
  41. package/dist/backend/opencode.js.map +1 -1
  42. package/dist/backend/types.d.ts +29 -1
  43. package/dist/backend/types.js.map +1 -1
  44. package/dist/channel/adapters/discord.js +35 -26
  45. package/dist/channel/adapters/discord.js.map +1 -1
  46. package/dist/channel/ipc-bridge.d.ts +1 -0
  47. package/dist/channel/ipc-bridge.js +1 -1
  48. package/dist/channel/ipc-bridge.js.map +1 -1
  49. package/dist/channel/mcp-tools.js +2 -0
  50. package/dist/channel/mcp-tools.js.map +1 -1
  51. package/dist/cli.js +48 -6
  52. package/dist/cli.js.map +1 -1
  53. package/dist/command-table.d.ts +99 -0
  54. package/dist/command-table.js +125 -0
  55. package/dist/command-table.js.map +1 -0
  56. package/dist/config.js +1 -0
  57. package/dist/config.js.map +1 -1
  58. package/dist/daemon.d.ts +60 -0
  59. package/dist/daemon.js +274 -14
  60. package/dist/daemon.js.map +1 -1
  61. package/dist/delivery-outbox.d.ts +16 -0
  62. package/dist/delivery-outbox.js +55 -6
  63. package/dist/delivery-outbox.js.map +1 -1
  64. package/dist/doctor.d.ts +3 -1
  65. package/dist/doctor.js +11 -0
  66. package/dist/doctor.js.map +1 -1
  67. package/dist/e2e-isolation.d.ts +122 -0
  68. package/dist/e2e-isolation.js +386 -0
  69. package/dist/e2e-isolation.js.map +1 -0
  70. package/dist/fleet-context.d.ts +2 -2
  71. package/dist/fleet-control-audit.d.ts +83 -0
  72. package/dist/fleet-control-audit.js +195 -0
  73. package/dist/fleet-control-audit.js.map +1 -0
  74. package/dist/fleet-manager.d.ts +69 -35
  75. package/dist/fleet-manager.js +596 -845
  76. package/dist/fleet-manager.js.map +1 -1
  77. package/dist/full-restart.js +2 -1
  78. package/dist/full-restart.js.map +1 -1
  79. package/dist/general-knowledge/skills/fleet-config/SKILL.md +3 -2
  80. package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +56 -0
  81. package/dist/host-memory.d.ts +16 -0
  82. package/dist/host-memory.js +32 -0
  83. package/dist/host-memory.js.map +1 -0
  84. package/dist/instance-lifecycle.d.ts +2 -0
  85. package/dist/instance-lifecycle.js +18 -1
  86. package/dist/instance-lifecycle.js.map +1 -1
  87. package/dist/kiro-engine-status.d.ts +71 -0
  88. package/dist/kiro-engine-status.js +68 -0
  89. package/dist/kiro-engine-status.js.map +1 -0
  90. package/dist/locale.js +72 -16
  91. package/dist/locale.js.map +1 -1
  92. package/dist/log-tail.d.ts +34 -0
  93. package/dist/log-tail.js +66 -0
  94. package/dist/log-tail.js.map +1 -0
  95. package/dist/logger.d.ts +15 -0
  96. package/dist/logger.js +89 -1
  97. package/dist/logger.js.map +1 -1
  98. package/dist/login-controller.d.ts +1 -3
  99. package/dist/login-controller.js +2 -6
  100. package/dist/login-controller.js.map +1 -1
  101. package/dist/login-flows.d.ts +0 -8
  102. package/dist/login-flows.js +11 -11
  103. package/dist/login-flows.js.map +1 -1
  104. package/dist/login-manager.d.ts +5 -20
  105. package/dist/login-manager.js +0 -53
  106. package/dist/login-manager.js.map +1 -1
  107. package/dist/login-window-lock.d.ts +1 -1
  108. package/dist/login-window-lock.js +1 -1
  109. package/dist/memory-pressure.d.ts +41 -0
  110. package/dist/memory-pressure.js +117 -0
  111. package/dist/memory-pressure.js.map +1 -0
  112. package/dist/outbound-handlers.js +16 -1
  113. package/dist/outbound-handlers.js.map +1 -1
  114. package/dist/outbound-schemas.d.ts +3 -0
  115. package/dist/outbound-schemas.js +3 -0
  116. package/dist/outbound-schemas.js.map +1 -1
  117. package/dist/paths.d.ts +19 -0
  118. package/dist/paths.js +18 -5
  119. package/dist/paths.js.map +1 -1
  120. package/dist/probe-worker-pool.d.ts +28 -0
  121. package/dist/probe-worker-pool.js +129 -0
  122. package/dist/probe-worker-pool.js.map +1 -0
  123. package/dist/resource-report.d.ts +31 -0
  124. package/dist/resource-report.js +209 -0
  125. package/dist/resource-report.js.map +1 -0
  126. package/dist/rollout-index.d.ts +66 -0
  127. package/dist/rollout-index.js +124 -0
  128. package/dist/rollout-index.js.map +1 -0
  129. package/dist/slash-authz.d.ts +50 -0
  130. package/dist/slash-authz.js +19 -0
  131. package/dist/slash-authz.js.map +1 -0
  132. package/dist/spawn-gate.d.ts +13 -1
  133. package/dist/spawn-gate.js +108 -39
  134. package/dist/spawn-gate.js.map +1 -1
  135. package/dist/storm-window.d.ts +42 -0
  136. package/dist/storm-window.js +84 -1
  137. package/dist/storm-window.js.map +1 -1
  138. package/dist/tool-permissions.js +4 -2
  139. package/dist/tool-permissions.js.map +1 -1
  140. package/dist/topic-commands.d.ts +29 -2
  141. package/dist/topic-commands.js +77 -21
  142. package/dist/topic-commands.js.map +1 -1
  143. package/dist/transcript-sources.d.ts +21 -4
  144. package/dist/transcript-sources.js +55 -41
  145. package/dist/transcript-sources.js.map +1 -1
  146. package/dist/types.d.ts +5 -1
  147. package/dist/ui/settings.html +14 -13
  148. package/dist/ui/web-terminal/terminal-input.js +69 -0
  149. package/dist/ui/web-terminal/terminal.css +6 -0
  150. package/dist/ui/web-terminal/terminal.html +9 -1
  151. package/dist/ui/web-terminal/terminal.js +31 -2
  152. package/dist/web-terminal-http.js +1 -0
  153. package/dist/web-terminal-http.js.map +1 -1
  154. package/package.json +1 -1
@@ -0,0 +1,195 @@
1
+ import { appendFileSync, existsSync, readFileSync, renameSync, statSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import { readProcessCommandLine } from "./fleet-lock.js";
4
+ /**
5
+ * Who stopped / restarted / updated the fleet (#1120).
6
+ *
7
+ * 2026-10-03 01:19 an unplanned `agend restart` ran from inside an agent's shell
8
+ * (a backtick in a `gh --body "..."` was command-substituted) and the only way
9
+ * to find the source was journal timing plus a kiro transcript: the fleet.log
10
+ * that would have said so is truncated by the restart itself. So the CLI writes
11
+ * one line to its OWN file before it acts, and a fleet-wide stop / restart /
12
+ * update started from a fleet agent's session — or from a test runner — has to
13
+ * be confirmed or is refused.
14
+ *
15
+ * Observability and a guard rail only: this changes nothing about delivery,
16
+ * authorisation or what a confirmed command does.
17
+ */
18
+ export const AUDIT_FILE = "restart-audit.log";
19
+ const AUDIT_MAX_BYTES = 512 * 1024;
20
+ /** Set by the fleet's own spawn sites: an internal, already-authorised call. */
21
+ export const ORIGIN_ENV = "AGEND_RESTART_ORIGIN";
22
+ /** The environment for a child the fleet spawns to stop / restart / update itself. */
23
+ export function withOrigin(origin, env = process.env) {
24
+ return { ...env, [ORIGIN_ENV]: origin };
25
+ }
26
+ /** Escape hatch for a test that really means to run the CLI against a scratch fleet (exactly "1"). */
27
+ export const ALLOW_TEST_ENV = "AGEND_ALLOW_TEST_FLEET_CONTROL";
28
+ /** Pure: may this call go ahead? `yes` is the explicit `--yes`. */
29
+ export function judgeFleetControl(env, yes) {
30
+ // First, and even for the fleet's own spawn sites: a handler a test drives for real
31
+ // must not reach the live fleet just because it set its origin (fleet decision bd0c88aa).
32
+ const underTestRunner = !!env.VITEST || env.NODE_ENV === "test";
33
+ if (underTestRunner && env[ALLOW_TEST_ENV] !== "1")
34
+ return { ok: false, reason: "test-runner" };
35
+ const origin = (env[ORIGIN_ENV] ?? "").trim();
36
+ if (origin)
37
+ return { ok: true, via: "origin" };
38
+ if ((env.AGEND_INSTANCE_NAME ?? "").trim() && !yes)
39
+ return { ok: false, reason: "agent-session" };
40
+ return { ok: true, via: yes ? "yes" : "interactive" };
41
+ }
42
+ function parentPid(pid) {
43
+ try {
44
+ // "pid (comm) S ppid ..." — comm may contain spaces and parentheses.
45
+ const stat = readFileSync(`/proc/${pid}/stat`, "utf8");
46
+ const rest = stat.slice(stat.lastIndexOf(")") + 2).split(" ");
47
+ const ppid = Number.parseInt(rest[1] ?? "", 10);
48
+ return Number.isInteger(ppid) ? ppid : 0;
49
+ }
50
+ catch {
51
+ return 0;
52
+ }
53
+ }
54
+ export function describeCaller(env = process.env, maxDepth = 6) {
55
+ const chain = [];
56
+ let pid = process.pid;
57
+ for (let depth = 0; depth < maxDepth && pid > 0; depth++) {
58
+ chain.push({ pid, command: readProcessCommandLine(pid).slice(0, 300) });
59
+ const next = parentPid(pid);
60
+ if (next <= 1 || next === pid)
61
+ break;
62
+ pid = next;
63
+ }
64
+ let user = "";
65
+ try {
66
+ user = env.USER ?? env.LOGNAME ?? "";
67
+ }
68
+ catch { /* ignore */ }
69
+ return {
70
+ pid: process.pid,
71
+ chain,
72
+ cwd: (() => { try {
73
+ return process.cwd();
74
+ }
75
+ catch {
76
+ return "";
77
+ } })(),
78
+ user,
79
+ tty: !!process.stdin.isTTY,
80
+ instance: (env.AGEND_INSTANCE_NAME ?? "").trim() || null,
81
+ origin: (env[ORIGIN_ENV] ?? "").trim() || null,
82
+ ssh: !!(env.SSH_CONNECTION || env.SSH_TTY),
83
+ };
84
+ }
85
+ /** Best effort: an audit line must never be the reason a restart fails. */
86
+ export function appendAudit(dataDir, entry) {
87
+ try {
88
+ const path = join(dataDir, AUDIT_FILE);
89
+ try {
90
+ if (existsSync(path) && statSync(path).size > AUDIT_MAX_BYTES)
91
+ renameSync(path, `${path}.1`);
92
+ }
93
+ catch { /* rotation is a nicety */ }
94
+ appendFileSync(path, `${JSON.stringify(entry)}\n`, { mode: 0o600 });
95
+ }
96
+ catch { /* unwritable data dir */ }
97
+ }
98
+ /** The newest entry written within `withinMs`, for the fleet to name in its own log. */
99
+ export function readRecentAudit(dataDir, withinMs, now = Date.now()) {
100
+ try {
101
+ const lines = readFileSync(join(dataDir, AUDIT_FILE), "utf8").trimEnd().split("\n");
102
+ for (let i = lines.length - 1; i >= 0 && i >= lines.length - 20; i--) {
103
+ try {
104
+ const entry = JSON.parse(lines[i]);
105
+ if (entry.outcome !== "allowed")
106
+ continue;
107
+ // A routine instance stop/restart sends no signal to the fleet process: naming it
108
+ // would blame the wrong request for a SIGUSR1/SIGTERM it did not cause.
109
+ if (entry.action === "instance-stop" || entry.action === "instance-restart")
110
+ continue;
111
+ const age = now - Date.parse(entry.ts);
112
+ if (age >= 0 && age <= withinMs)
113
+ return entry;
114
+ }
115
+ catch { /* a torn line */ }
116
+ }
117
+ }
118
+ catch { /* no audit file yet */ }
119
+ return null;
120
+ }
121
+ /** What the fleet writes into its own log when a signal arrives: who asked, if the CLI said so lately. */
122
+ export function describeSignalSource(dataDir, signal, now = Date.now()) {
123
+ const entry = readRecentAudit(dataDir, 2 * 60_000, now);
124
+ return entry
125
+ ? `${signal}: requested by ${summariseCaller(entry)} at ${entry.ts}`
126
+ : `${signal}: no fleet-control request recorded in the last 2 minutes (a service manager, \`kill\`, or a program that signals the process directly)`;
127
+ }
128
+ /** One-line form for a log message. */
129
+ export function summariseCaller(entry) {
130
+ const parent = entry.caller.chain[1];
131
+ return [
132
+ `${entry.action}${entry.target ? ` ${entry.target}` : ""}`,
133
+ entry.caller.instance ? `from agent session ${entry.caller.instance}` : null,
134
+ entry.caller.origin ? `origin ${entry.caller.origin}` : null,
135
+ parent ? `parent pid ${parent.pid} (${parent.command.slice(0, 120)})` : null,
136
+ ].filter(Boolean).join(", ");
137
+ }
138
+ export function refusalMessage(action, reason, instance) {
139
+ if (reason === "test-runner") {
140
+ return `Refusing \`agend ${commandOf(action)}\`: it was started from a test runner and would act on the real fleet. `
141
+ + `Stub the call, or set ${ALLOW_TEST_ENV}=1 if this really targets a scratch fleet.`;
142
+ }
143
+ return `Refusing \`agend ${commandOf(action)}\`: it was started from the fleet agent session "${instance}", and this stops the whole fleet and every instance in it.\n`
144
+ + `If that is what you mean, run it again with --yes. If you did not mean to run it at all, a backtick or $(...) inside a quoted shell argument may have executed it.`;
145
+ }
146
+ function commandOf(action) {
147
+ switch (action) {
148
+ case "fleet-stop": return "fleet stop";
149
+ case "fleet-restart": return "fleet restart";
150
+ case "fleet-restart-reload": return "fleet restart --reload";
151
+ default: return action.replace("instance-", "fleet ");
152
+ }
153
+ }
154
+ /**
155
+ * The CLI's gate: record the call, then let it through or refuse it. Returns
156
+ * whether to go ahead; the caller prints nothing and exits on `false`.
157
+ */
158
+ export function gateFleetControl(dataDir, action, opts, env = process.env, report = message => console.error(message)) {
159
+ const caller = describeCaller(env);
160
+ const verdict = judgeFleetControl(env, !!opts.yes);
161
+ appendAudit(dataDir, {
162
+ ts: new Date().toISOString(),
163
+ action,
164
+ ...(opts.target ? { target: opts.target } : {}),
165
+ outcome: verdict.ok ? "allowed" : "refused",
166
+ ...(verdict.ok ? { detail: verdict.via } : { detail: verdict.reason }),
167
+ caller,
168
+ });
169
+ // The origin marker authorises THIS command only. Left in the environment it would be
170
+ // inherited by the replacement fleet the command starts, and by every agent that fleet
171
+ // runs: a permanent exemption from the confirmation (#1158 review).
172
+ delete env[ORIGIN_ENV];
173
+ if (verdict.ok)
174
+ return true;
175
+ report(refusalMessage(action, verdict.reason, caller.instance));
176
+ return false;
177
+ }
178
+ /** Instance-level stop/restart: recorded for the trail, never blocked (agents do this routinely). */
179
+ export function recordInstanceControl(dataDir, action, target, env = process.env) {
180
+ appendAudit(dataDir, {
181
+ ts: new Date().toISOString(), action, target, outcome: "allowed", caller: describeCaller(env),
182
+ });
183
+ }
184
+ /**
185
+ * The fleet's own entry points (a /restart or /update slash command, the full-restart
186
+ * helper): written by the fleet process, so the signal or child it sends next can be
187
+ * traced to the person who asked, not just to "the fleet itself".
188
+ */
189
+ export function recordInternalRequest(dataDir, action, origin, env = process.env) {
190
+ appendAudit(dataDir, {
191
+ ts: new Date().toISOString(), action, outcome: "allowed", detail: "origin",
192
+ caller: describeCaller(withOrigin(origin, env)),
193
+ });
194
+ }
195
+ //# sourceMappingURL=fleet-control-audit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fleet-control-audit.js","sourceRoot":"","sources":["../src/fleet-control-audit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE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,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;QACtE,MAAM;KACP,CAAC,CAAC;IACH,sFAAsF;IACtF,uFAAuF;IACvF,oEAAoE;IACpE,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC;IACvB,IAAI,OAAO,CAAC,EAAE;QAAE,OAAO,IAAI,CAAC;IAC5B,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChE,OAAO,KAAK,CAAC;AACf,CAAC;AAED,qGAAqG;AACrG,MAAM,UAAU,qBAAqB,CAAC,OAAe,EAAE,MAA4C,EAAE,MAAc,EAAE,MAAyB,OAAO,CAAC,GAAG;IACvJ,WAAW,CAAC,OAAO,EAAE;QACnB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,CAAC,GAAG,CAAC;KAC9F,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAe,EAAE,MAA0B,EAAE,MAAc,EAAE,MAAyB,OAAO,CAAC,GAAG;IACrI,WAAW,CAAC,OAAO,EAAE;QACnB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ;QAC1E,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAChD,CAAC,CAAC;AACL,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { type FleetMemory } from "./process-memory.js";
2
+ import { MemoryPressure, type MemoryPressureSnapshot } from "./memory-pressure.js";
2
3
  import { ReplyDeduper } from "./reply-dedup.js";
3
4
  import type { FleetConfig, RawFleetConfig, InstanceConfig } from "./types.js";
4
5
  import { type DeliveryStatus, type GuildEmoji, type GuildEmojiGroup, type ResolvedStatusEmojis } from "./status-emojis.js";
@@ -123,6 +124,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
123
124
  readonly lifecycle: InstanceLifecycle;
124
125
  readonly stormWindow: StormWindow;
125
126
  readonly spawnGate: SpawnGate;
127
+ readonly memoryPressure: MemoryPressure;
126
128
  /** Fleet-level backend reachability memory (fed by pty_error / startup panes). */
127
129
  readonly backendOutage: BackendOutageTracker;
128
130
  /** Stable for this FleetManager OS-process lifetime; Daemon objects have their own boot IDs. */
@@ -252,6 +254,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
252
254
  private startupRetryNotices;
253
255
  /** Unsupported-CLI refusals waiting to go out, grouped by reason (#1109). */
254
256
  private unsupportedCliNotices;
257
+ private kiroIncompatNotices;
255
258
  /** Backoff between automatic startup retries; the last step repeats while the backend is down. */
256
259
  static readonly STARTUP_RETRY_BACKOFF_MS: number[];
257
260
  /** Hard cap on automatic startup retries (3 backoff steps + up to 3 more during a backend outage). */
@@ -338,6 +341,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
338
341
  private watchdogTimer;
339
342
  private startedAt;
340
343
  private stormOpenNotifyTimer;
344
+ private memoryLogAt;
345
+ private memoryDebugAt;
346
+ private memoryLogLevel;
347
+ private memoryNoticeAt;
348
+ private memoryNoticeLevel;
341
349
  private mirrorBuffer;
342
350
  private mirrorTimer;
343
351
  private sseClients;
@@ -410,8 +418,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
410
418
  private dispatchDurableDelivery;
411
419
  private waitForDurableLaneRelease;
412
420
  private spawnConcurrency;
421
+ /** Separate cooldown: changing measurements must not create new text-throttle keys. */
422
+ private reportMemoryPressure;
413
423
  /** Wire the one fleet-wide storm into notification and recovery surfaces. */
414
424
  private bindStormWindowEvents;
425
+ /** What the gate allows while any storm window is open (see SpawnGate.pump). */
426
+ private stormWindowLossRecoveryConcurrency;
415
427
  private formatStormDelay;
416
428
  stormSuppressed(kind: string): boolean;
417
429
  private handleSighup;
@@ -464,6 +476,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
464
476
  getSysInfo(): import("./fleet-context.js").SysInfo;
465
477
  /** Load fleet.yaml and build routing table */
466
478
  loadConfig(configPath: string): FleetConfig;
479
+ private relayLoginModeWarned;
480
+ /** `login.mode: relay` was removed (#1139). Still accepted so an upgrade cannot stop a fleet from starting. */
481
+ private warnAboutRemovedLoginMode;
467
482
  /**
468
483
  * A channel's configurable bot_token_env is an env-key writer too. Refuse
469
484
  * an overlap with a registry API key (or a process-reserved key) before the
@@ -508,6 +523,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
508
523
  */
509
524
  private isModelAdmin;
510
525
  private handlePauseWakeSlash;
526
+ /** SIGUSR2: restart the instances inside this process. Names who asked (#1120). */
527
+ private onGracefulRestartSignal;
528
+ /** SIGUSR1: full process reload. Names who asked (#1120). */
529
+ private onFullRestartSignal;
511
530
  private handleUpdateSlash;
512
531
  private handleRestartSlash;
513
532
  private handleTipsSlash;
@@ -624,6 +643,30 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
624
643
  deliverToInstance(instanceName: string, payload: Record<string, unknown>, options?: DeliveryOptions): Promise<boolean | void>;
625
644
  /** Fleet admin is an explicit config allowlist entry, not merely an open/paired user. */
626
645
  isFleetAdmin(userId: string, adapterId?: string): boolean;
646
+ /** Whether this adapter has any fleet admin at all (an empty allowlist means the admin commands are off). */
647
+ hasFleetAdmins(adapterId?: string): boolean;
648
+ /**
649
+ * The one question the privileged commands (/update, /doctor, /dashboard, /collab) ask: may THIS caller,
650
+ * through THIS adapter, run it. `disabled` is "nobody can" — an empty list — and is told apart from
651
+ * `denied` only so the reply can say so. An empty list never means "everyone": these commands used to read
652
+ * the primary channel's list and treat empty as open, so on a fleet that had not set one anyone who could
653
+ * type a slash command could `/update` the host.
654
+ */
655
+ fleetAdminGate(userId: string, adapterId?: string): "ok" | "disabled" | "denied";
656
+ /**
657
+ * Every Discord slash command, for every adapter, in one place (it used to be two copies that could drift).
658
+ *
659
+ * Two checks before any command's own code runs, and the order matters: the DOOR (src/slash-authz.ts — may
660
+ * this caller speak here at all) and then the COMMAND TABLE (src/command-table.ts — does this command apply
661
+ * in this kind of channel, and which kind of admin does it need). The table can only narrow what the door
662
+ * let through. A command nobody registered is answered, not left to time out.
663
+ */
664
+ private dispatchSlash;
665
+ /**
666
+ * The door every Discord slash command goes through (src/slash-authz.ts has the rule and the reasoning).
667
+ * Answers the caller itself when it refuses, so a refused command costs one reply and does nothing else.
668
+ */
669
+ private authorizeSlash;
627
670
  /** Phase 2: delivery_worker for a target (instance override → fleet default → wake_only). */
628
671
  deliveryWorkerMode(target: string): ReturnType<typeof resolveDeliveryWorkerMode>;
629
672
  /** Active instances mid-restart: they keep their warm slot through the stop → replacement gap. */
@@ -765,6 +808,20 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
765
808
  * first unattended start and every scheduled retry.
766
809
  */
767
810
  private stopOnUnsupportedCli;
811
+ /**
812
+ * LifecycleContext: a kiro instance the installed kiro-cli cannot run as
813
+ * configured (#1109) — at start, or at a respawn after kiro-cli replaced
814
+ * itself. The operator already gets the plain notice; this tells every
815
+ * General, as an agent, so it can explain the kiro engine move when asked.
816
+ * One notice per refusal reason, like the operator's.
817
+ */
818
+ queueKiroIncompatNotice(name: string, reason: string): void;
819
+ /**
820
+ * Held in the delivery outbox until each General takes it: the same kiro-cli
821
+ * may have stopped the General too, and it should still hear once it is back.
822
+ * Admitted once per day per refusal (reason + names) and General.
823
+ */
824
+ private sendKiroIncompatToGenerals;
768
825
  /**
769
826
  * One notice per refusal reason: a kiro-cli that dropped the legacy UI
770
827
  * refuses every kiro instance at once, and that is one message, not ten.
@@ -893,6 +950,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
893
950
  * reported separately because they differ by ~60x and only one of them can
894
951
  * show a fleet-manager leak. */
895
952
  memory: FleetMemory;
953
+ hostMemory: MemoryPressureSnapshot;
896
954
  problems: string[];
897
955
  };
898
956
  /** Start the primary adapter (backward-compatible, sets this.adapter) */
@@ -1205,6 +1263,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1205
1263
  private pendingCliEnvProbes;
1206
1264
  /** Forced vendor catalog refreshes are separate flights, but sysinfo joins either flight. */
1207
1265
  private pendingVendorCliEnvProbes;
1266
+ private pendingInstanceModelProbes;
1267
+ private readonly cliEnvProbePool;
1268
+ private cliEnvProbeEpoch;
1208
1269
  /**
1209
1270
  * The status emojis for an instance (#1005): its own `status_emojis`, then
1210
1271
  * its channel's `options.status_emojis`, then the platform built-in. An
@@ -1472,7 +1533,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1472
1533
  private receiveAdapterCallback;
1473
1534
  /**
1474
1535
  * A button from a prompt kind that no longer exists (#1131: `/install-cli`'s
1475
- * picker and its "sign in now?" prompt). Still on screen after an upgrade;
1536
+ * picker and its "sign in now?" prompt; #1139: the relay login's provider picker). Still on screen after an upgrade;
1476
1537
  * a click gets the expired-prompt treatment — a private notice, the buttons
1477
1538
  * collapsed — instead of nothing.
1478
1539
  */
@@ -1698,16 +1759,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1698
1759
  private isDeliveryEpochCurrent;
1699
1760
  /** Invalidate work queued before a user cancel and wake idle-gate waiters. */
1700
1761
  private cancelPendingDeliveries;
1701
- private activeLogin;
1702
- /**
1703
- * Web-terminal login (v2.1.5 default, `login.mode: web`). The relay code
1704
- * below (activeLogin/LoginSession) is `login.mode: relay`, kept for one
1705
- * release as the rollback lever and removed in 2.1.6.
1706
- */
1762
+ /** Web-terminal login: the only sign-in path (the chat-relay mode was removed, #1139). */
1707
1763
  private loginController;
1708
1764
  /**
1709
1765
  * One login/install window fleet-wide. Claimed synchronously before the
1710
- * first await by web login, relay login and install alike (sol B1).
1766
+ * first await by web login and install alike (sol B1).
1711
1767
  */
1712
1768
  private readonly loginWindow;
1713
1769
  private get webLogin();
@@ -1771,23 +1827,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1771
1827
  }): Promise<string | null>;
1772
1828
  /** Which way a `/login` went (#1131) — so the event log shows what users actually need. */
1773
1829
  private recordLoginFlow;
1774
- /** The sign-in itself (web, or the legacy relay) for a CLI that is installed. */
1830
+ /** The sign-in itself, in the web terminal, for a CLI that is installed. */
1775
1831
  private launchSignIn;
1776
- private startRelayClaimed;
1777
- /** Create the login window and session (pre-check already settled). */
1778
- private launchLoginSession;
1779
- /** Fleet shutdown: end any web/relay login or install window and wait for its confirmed teardown. */
1832
+ /** Fleet shutdown: end any web login or install window and wait for its confirmed teardown. */
1780
1833
  private shutdownLoginWindows;
1781
- /** `/login code <text>` — paste admin-supplied text into the login window. */
1782
- loginSubmitInput(text: string): Promise<string>;
1783
1834
  /** `/login cancel` — abort the active session and remove its window. */
1784
1835
  cancelLoginSession(): Promise<string>;
1785
- /**
1786
- * The URL (+ code) is a live credential: whoever completes it binds THEIR
1787
- * account to this fleet's CLI. Telegram gets an HTML spoiler (same treatment
1788
- * as the dashboard token); other adapters get plain text with the warning.
1789
- */
1790
- private sendLoginSecret;
1791
1836
  /**
1792
1837
  * After a successful login: wake the paused instances of that backend AND
1793
1838
  * restart the running ones — a live CLI holds the old token in memory and
@@ -1812,8 +1857,6 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1812
1857
  private handleLoginConfirm;
1813
1858
  /** "Resend token" button (web login): only the requester may press it; the token never enters the channel. */
1814
1859
  private handleLoginTokenResend;
1815
- /** Kiro provider button → drive the CLI's arrow-key selector. */
1816
- private handleLoginMenuSelect;
1817
1860
  private activeInstall;
1818
1861
  /** An install that succeeded, between its success line and the sign-in it hands over to (#1131). */
1819
1862
  private installHandoff;
@@ -1939,6 +1982,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1939
1982
  * previous list, never stall the command that asked for it.
1940
1983
  */
1941
1984
  private probeBackendBounded;
1985
+ private stopCliEnvProbes;
1986
+ private runBackendProbeWorker;
1942
1987
  private startCliEnvProbeWorker;
1943
1988
  /**
1944
1989
  * Resolve the effective model for a fleet or ClassicBot instance, plus where it
@@ -1955,18 +2000,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1955
2000
  /** Human-readable effective model, e.g. `auto (default)`. Used by /ctx. */
1956
2001
  modelDisplayForInstance(instanceName: string): string;
1957
2002
  private modelChoiceLabel;
1958
- /**
1959
- * Probe one backend's CLI env and cache it. Best-effort; never throws.
1960
- *
1961
- * `refreshVendorCatalog` is the "🔄 Refresh models" path only (#886): first
1962
- * ask the CLI to refetch its own catalog, for backends whose probe merely
1963
- * reads a file the CLI maintains. Every other caller leaves it off, so the
1964
- * startup and /model probes behave exactly as before. A failed vendor
1965
- * refresh fails the probe (null), which the menu reports instead of passing
1966
- * the old list off as fresh.
1967
- */
1968
- private probeBackend;
1969
- /** Preserve the existing cache merge rules for both in-process and worker probes. */
2003
+ /** Preserve the existing cache merge rules for worker probes. */
1970
2004
  private persistCliEnvProbeResult;
1971
2005
  /** Background-probe every distinct backend in use at startup (non-blocking). */
1972
2006
  private probeCliEnvs;