@songsid/agend 2.3.0-beta.1 → 2.3.0-beta.11

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 (357) hide show
  1. package/dist/agent-cli-instructions.md +5 -2
  2. package/dist/agent-cli.js +43 -7
  3. package/dist/agent-cli.js.map +1 -1
  4. package/dist/agent-endpoint.js +4 -0
  5. package/dist/agent-endpoint.js.map +1 -1
  6. package/dist/agent-file-read.d.ts +14 -6
  7. package/dist/agent-file-read.js +207 -19
  8. package/dist/agent-file-read.js.map +1 -1
  9. package/dist/agent-whats-new.d.ts +11 -0
  10. package/dist/agent-whats-new.js +29 -15
  11. package/dist/agent-whats-new.js.map +1 -1
  12. package/dist/auth-api.d.ts +30 -1
  13. package/dist/auth-api.js +45 -13
  14. package/dist/auth-api.js.map +1 -1
  15. package/dist/authority/authority-state.d.ts +38 -0
  16. package/dist/authority/authority-state.js +114 -0
  17. package/dist/authority/authority-state.js.map +1 -0
  18. package/dist/authority/session-authorizations.d.ts +43 -0
  19. package/dist/authority/session-authorizations.js +102 -0
  20. package/dist/authority/session-authorizations.js.map +1 -0
  21. package/dist/authority/web-authority.d.ts +120 -0
  22. package/dist/authority/web-authority.js +157 -0
  23. package/dist/authority/web-authority.js.map +1 -0
  24. package/dist/backend/claude-code.d.ts +2 -2
  25. package/dist/backend/claude-code.js +10 -5
  26. package/dist/backend/claude-code.js.map +1 -1
  27. package/dist/backend/types.d.ts +14 -0
  28. package/dist/backend/types.js +25 -0
  29. package/dist/backend/types.js.map +1 -1
  30. package/dist/backend-availability.d.ts +120 -0
  31. package/dist/backend-availability.js +396 -0
  32. package/dist/backend-availability.js.map +1 -0
  33. package/dist/backend-command.d.ts +21 -3
  34. package/dist/backend-command.js +23 -4
  35. package/dist/backend-command.js.map +1 -1
  36. package/dist/bundled-skills.d.ts +14 -0
  37. package/dist/bundled-skills.js +29 -0
  38. package/dist/bundled-skills.js.map +1 -0
  39. package/dist/cache-analysis.d.ts +47 -1
  40. package/dist/cache-analysis.js +68 -8
  41. package/dist/cache-analysis.js.map +1 -1
  42. package/dist/cache-ledger.d.ts +16 -3
  43. package/dist/cache-ledger.js +33 -13
  44. package/dist/cache-ledger.js.map +1 -1
  45. package/dist/cache-report-tool.d.ts +17 -0
  46. package/dist/cache-report-tool.js +40 -0
  47. package/dist/cache-report-tool.js.map +1 -0
  48. package/dist/cache-service.d.ts +70 -3
  49. package/dist/cache-service.js +178 -17
  50. package/dist/cache-service.js.map +1 -1
  51. package/dist/channel/adapters/discord.d.ts +7 -0
  52. package/dist/channel/adapters/discord.js +35 -0
  53. package/dist/channel/adapters/discord.js.map +1 -1
  54. package/dist/channel/mcp-tools.js +22 -10
  55. package/dist/channel/mcp-tools.js.map +1 -1
  56. package/dist/channel/types.d.ts +6 -0
  57. package/dist/classic-channel-manager.d.ts +10 -5
  58. package/dist/classic-channel-manager.js +12 -9
  59. package/dist/classic-channel-manager.js.map +1 -1
  60. package/dist/cli.js +130 -31
  61. package/dist/cli.js.map +1 -1
  62. package/dist/config-validator.js +103 -4
  63. package/dist/config-validator.js.map +1 -1
  64. package/dist/daemon.d.ts +7 -0
  65. package/dist/daemon.js +63 -16
  66. package/dist/daemon.js.map +1 -1
  67. package/dist/decision-list.d.ts +25 -0
  68. package/dist/decision-list.js +30 -0
  69. package/dist/decision-list.js.map +1 -0
  70. package/dist/delivery-outbox.d.ts +10 -0
  71. package/dist/delivery-outbox.js +12 -1
  72. package/dist/delivery-outbox.js.map +1 -1
  73. package/dist/fleet-context.d.ts +10 -0
  74. package/dist/fleet-manager.d.ts +417 -11
  75. package/dist/fleet-manager.js +1387 -109
  76. package/dist/fleet-manager.js.map +1 -1
  77. package/dist/fleet-traffic.d.ts +74 -0
  78. package/dist/fleet-traffic.js +196 -0
  79. package/dist/fleet-traffic.js.map +1 -0
  80. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +20 -5
  81. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +6 -1
  82. package/dist/general-knowledge/skills/multi-channel/SKILL.md +3 -2
  83. package/dist/general-knowledge/skills/persona-emoji/SKILL.md +1 -1
  84. package/dist/general-knowledge/skills/web-appearance/SKILL.md +257 -23
  85. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +478 -0
  86. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
  87. package/dist/human-delivery-receipts.d.ts +24 -1
  88. package/dist/human-delivery-receipts.js +64 -11
  89. package/dist/human-delivery-receipts.js.map +1 -1
  90. package/dist/instance-config-impact.js +3 -1
  91. package/dist/instance-config-impact.js.map +1 -1
  92. package/dist/instance-names.d.ts +4 -0
  93. package/dist/instance-names.js +12 -0
  94. package/dist/instance-names.js.map +1 -0
  95. package/dist/instructions.d.ts +12 -1
  96. package/dist/instructions.js +13 -2
  97. package/dist/instructions.js.map +1 -1
  98. package/dist/locale.js +100 -8
  99. package/dist/locale.js.map +1 -1
  100. package/dist/ls-attach-resolve.d.ts +95 -0
  101. package/dist/ls-attach-resolve.js +174 -0
  102. package/dist/ls-attach-resolve.js.map +1 -0
  103. package/dist/memory-hogs.d.ts +27 -0
  104. package/dist/memory-hogs.js +124 -0
  105. package/dist/memory-hogs.js.map +1 -0
  106. package/dist/outbound-handlers.d.ts +10 -0
  107. package/dist/outbound-handlers.js +122 -2
  108. package/dist/outbound-handlers.js.map +1 -1
  109. package/dist/outbound-schemas.d.ts +164 -4
  110. package/dist/outbound-schemas.js +99 -3
  111. package/dist/outbound-schemas.js.map +1 -1
  112. package/dist/public-web-gateway.js +8 -2
  113. package/dist/public-web-gateway.js.map +1 -1
  114. package/dist/public-web-link.d.ts +9 -0
  115. package/dist/public-web-link.js +8 -0
  116. package/dist/public-web-link.js.map +1 -1
  117. package/dist/quickstart-api.d.ts +10 -1
  118. package/dist/quickstart-api.js +12 -4
  119. package/dist/quickstart-api.js.map +1 -1
  120. package/dist/reply-buttons-controller.d.ts +4 -0
  121. package/dist/reply-buttons-controller.js +2 -2
  122. package/dist/reply-buttons-controller.js.map +1 -1
  123. package/dist/restart-progress.d.ts +65 -1
  124. package/dist/restart-progress.js +236 -10
  125. package/dist/restart-progress.js.map +1 -1
  126. package/dist/rollout-index.d.ts +5 -0
  127. package/dist/rollout-index.js +26 -5
  128. package/dist/rollout-index.js.map +1 -1
  129. package/dist/scheduler/scheduler.d.ts +12 -0
  130. package/dist/scheduler/scheduler.js +83 -10
  131. package/dist/scheduler/scheduler.js.map +1 -1
  132. package/dist/service-installer.d.ts +2 -1
  133. package/dist/service-installer.js +18 -3
  134. package/dist/service-installer.js.map +1 -1
  135. package/dist/settings-api.d.ts +19 -0
  136. package/dist/settings-api.js +137 -2
  137. package/dist/settings-api.js.map +1 -1
  138. package/dist/settings-change.js +104 -0
  139. package/dist/settings-change.js.map +1 -1
  140. package/dist/settings-effect.js +17 -1
  141. package/dist/settings-effect.js.map +1 -1
  142. package/dist/tmux-manager.d.ts +5 -0
  143. package/dist/tmux-manager.js +16 -0
  144. package/dist/tmux-manager.js.map +1 -1
  145. package/dist/tool-permissions.d.ts +4 -6
  146. package/dist/tool-permissions.js +53 -5
  147. package/dist/tool-permissions.js.map +1 -1
  148. package/dist/topic-commands.d.ts +7 -1
  149. package/dist/topic-commands.js +18 -4
  150. package/dist/topic-commands.js.map +1 -1
  151. package/dist/types.d.ts +48 -1
  152. package/dist/ui/app-effects.js +77 -31
  153. package/dist/ui/chat-ambient.js +307 -0
  154. package/dist/ui/chat-effect-posters.js +8 -8
  155. package/dist/ui/chat-effects.js +101 -13
  156. package/dist/ui/chat-render.js +21 -3
  157. package/dist/ui/chat-strings.js +59 -6
  158. package/dist/ui/chat-thread.js +159 -21
  159. package/dist/ui/effect-trial-controller.js +13 -8
  160. package/dist/ui/effect-trial-panel.js +19 -16
  161. package/dist/ui/fleet-cache.js +23 -1
  162. package/dist/ui/fleet-canvas-layout.js +111 -0
  163. package/dist/ui/fleet-canvas.js +525 -0
  164. package/dist/ui/fleet-org.js +27 -12
  165. package/dist/ui/fleet-traffic.js +343 -0
  166. package/dist/ui/fleet-usage.js +401 -0
  167. package/dist/ui/panel-chat.js +154 -49
  168. package/dist/ui/panel-details.js +2 -1
  169. package/dist/ui/panel-fleet.js +43 -17
  170. package/dist/ui/panel-settings.js +26 -8
  171. package/dist/ui/preview.js +3 -2
  172. package/dist/ui/settings-appearance.js +42 -18
  173. package/dist/ui/settings-catalog.js +92 -0
  174. package/dist/ui/settings-dialogs.js +40 -12
  175. package/dist/ui/settings-effects.js +4 -3
  176. package/dist/ui/settings-guests.js +117 -0
  177. package/dist/ui/settings-learn.js +25 -0
  178. package/dist/ui/settings-model.js +15 -6
  179. package/dist/ui/settings-mods.js +23 -9
  180. package/dist/ui/settings-owner-effects.js +9 -9
  181. package/dist/ui/settings-strings.js +120 -42
  182. package/dist/ui/settings-web-authority.js +91 -0
  183. package/dist/ui/shared/agend-auth.js +1 -1
  184. package/dist/ui/shared/app-i18n.js +4 -2
  185. package/dist/ui/shared/app-prefs.js +5 -4
  186. package/dist/ui/shared/app-route.js +19 -1
  187. package/dist/ui/shared/app-session.js +2 -0
  188. package/dist/ui/shared/app-shell.js +92 -27
  189. package/dist/ui/shared/app-store.js +26 -1
  190. package/dist/ui/shared/app-stream.js +3 -1
  191. package/dist/ui/shared/app-themes.js +24 -6
  192. package/dist/ui/shared/app.css +365 -17
  193. package/dist/ui/shared/app.js +21 -14
  194. package/dist/ui/shared/card-strings.js +4 -0
  195. package/dist/ui/shared/effect-app-runtime.js +68 -19
  196. package/dist/ui/shared/effect-chat-runtime.js +16 -3
  197. package/dist/ui/shared/effect-frame.js +26 -7
  198. package/dist/ui/shared/effect-geometry.js +24 -9
  199. package/dist/ui/shared/effect-policy.js +21 -7
  200. package/dist/ui/shared/effect-profiler.js +31 -9
  201. package/dist/ui/shared/effect-registry.js +87 -48
  202. package/dist/ui/shared/effect-stock-snapshot.js +9 -0
  203. package/dist/ui/shared/effect-stock-trust.js +62 -10
  204. package/dist/ui/shared/effect-trial-shadow.js +62 -0
  205. package/dist/ui/shared/effect-trial-source.js +1 -1
  206. package/dist/ui/shared/effect-trial-stage.js +54 -31
  207. package/dist/ui/shared/effect-trial.css +40 -0
  208. package/dist/ui/shared/fx-motion.js +67 -0
  209. package/dist/ui/shared/identity-card.js +75 -4
  210. package/dist/ui/shared/identity-color.js +3 -3
  211. package/dist/ui/shared/instance-nav.js +194 -28
  212. package/dist/ui/shared/panel-view.js +24 -4
  213. package/dist/ui/shared/tokens.css +9 -3
  214. package/dist/ui/shared/ui-icons.js +1 -0
  215. package/dist/ui/shared/usage-dialog.js +22 -2
  216. package/dist/ui/shared/view-strings.js +68 -2
  217. package/dist/ui/shared/web-authorize.js +151 -0
  218. package/dist/ui/signin.html +1 -1
  219. package/dist/ui/web-terminal/terminal.css +4 -4
  220. package/dist/usage/providers.d.ts +28 -0
  221. package/dist/usage/providers.js +126 -36
  222. package/dist/usage/providers.js.map +1 -1
  223. package/dist/usage-report.d.ts +158 -0
  224. package/dist/usage-report.js +226 -0
  225. package/dist/usage-report.js.map +1 -0
  226. package/dist/usage-rollup.d.ts +51 -0
  227. package/dist/usage-rollup.js +168 -0
  228. package/dist/usage-rollup.js.map +1 -0
  229. package/dist/view-api.d.ts +39 -0
  230. package/dist/view-api.js +65 -4
  231. package/dist/view-api.js.map +1 -1
  232. package/dist/web-ambient.d.ts +72 -0
  233. package/dist/web-ambient.js +161 -0
  234. package/dist/web-ambient.js.map +1 -0
  235. package/dist/web-api.d.ts +69 -5
  236. package/dist/web-api.js +362 -45
  237. package/dist/web-api.js.map +1 -1
  238. package/dist/web-appearance-policy.d.ts +4 -6
  239. package/dist/web-appearance-policy.js +5 -12
  240. package/dist/web-appearance-policy.js.map +1 -1
  241. package/dist/web-appearance-tools.d.ts +3 -0
  242. package/dist/web-appearance-tools.js +22 -3
  243. package/dist/web-appearance-tools.js.map +1 -1
  244. package/dist/web-appearance-view.d.ts +27 -2
  245. package/dist/web-appearance-view.js +129 -14
  246. package/dist/web-appearance-view.js.map +1 -1
  247. package/dist/web-appearance.d.ts +17 -3
  248. package/dist/web-appearance.js +82 -7
  249. package/dist/web-appearance.js.map +1 -1
  250. package/dist/web-asset-parts.d.ts +5 -10
  251. package/dist/web-asset-parts.js +3 -3
  252. package/dist/web-asset-parts.js.map +1 -1
  253. package/dist/web-auth.js +3 -1
  254. package/dist/web-auth.js.map +1 -1
  255. package/dist/web-card.d.ts +14 -0
  256. package/dist/web-card.js +40 -6
  257. package/dist/web-card.js.map +1 -1
  258. package/dist/web-channel-echo.d.ts +7 -1
  259. package/dist/web-channel-echo.js +6 -2
  260. package/dist/web-channel-echo.js.map +1 -1
  261. package/dist/web-chat-history.d.ts +50 -0
  262. package/dist/web-chat-history.js +87 -5
  263. package/dist/web-chat-history.js.map +1 -1
  264. package/dist/web-commands.d.ts +1 -0
  265. package/dist/web-effect-bootstrap.d.ts +12 -0
  266. package/dist/web-effect-bootstrap.js +49 -0
  267. package/dist/web-effect-bootstrap.js.map +1 -0
  268. package/dist/web-effect-bundle.js +46 -1
  269. package/dist/web-effect-bundle.js.map +1 -1
  270. package/dist/web-effect-playback.d.ts +30 -0
  271. package/dist/web-effect-playback.js +71 -0
  272. package/dist/web-effect-playback.js.map +1 -0
  273. package/dist/web-effect-profiles.d.ts +4 -4
  274. package/dist/web-effect-service.d.ts +11 -4
  275. package/dist/web-effect-service.js +28 -5
  276. package/dist/web-effect-service.js.map +1 -1
  277. package/dist/web-effect-tools.d.ts +1 -0
  278. package/dist/web-effect-tools.js +8 -5
  279. package/dist/web-effect-tools.js.map +1 -1
  280. package/dist/web-effect-trials.d.ts +4 -4
  281. package/dist/web-effect-trials.js +6 -6
  282. package/dist/web-effect-trials.js.map +1 -1
  283. package/dist/web-effect-upload.d.ts +2 -4
  284. package/dist/web-effect-upload.js +3 -8
  285. package/dist/web-effect-upload.js.map +1 -1
  286. package/dist/web-effect-worker.d.ts +1 -1
  287. package/dist/web-effect-worker.js +2 -2
  288. package/dist/web-effect-worker.js.map +1 -1
  289. package/dist/web-effect.d.ts +14 -0
  290. package/dist/web-effect.js +21 -0
  291. package/dist/web-effect.js.map +1 -1
  292. package/dist/web-guest-access.d.ts +125 -0
  293. package/dist/web-guest-access.js +234 -0
  294. package/dist/web-guest-access.js.map +1 -0
  295. package/dist/web-guest-rooms.d.ts +82 -0
  296. package/dist/web-guest-rooms.js +135 -0
  297. package/dist/web-guest-rooms.js.map +1 -0
  298. package/dist/web-identity-color.d.ts +1 -1
  299. package/dist/web-identity-color.js +2 -2
  300. package/dist/web-identity-color.js.map +1 -1
  301. package/dist/web-identity-palette.d.ts +1 -1
  302. package/dist/web-identity-palette.js +2 -2
  303. package/dist/web-identity-palette.js.map +1 -1
  304. package/dist/web-image-meta.d.ts +13 -0
  305. package/dist/web-image-meta.js +62 -0
  306. package/dist/web-image-meta.js.map +1 -1
  307. package/dist/web-login.d.ts +47 -0
  308. package/dist/web-login.js +115 -0
  309. package/dist/web-login.js.map +1 -1
  310. package/dist/web-mod-agent.d.ts +1 -1
  311. package/dist/web-mod-agent.js +12 -8
  312. package/dist/web-mod-agent.js.map +1 -1
  313. package/dist/web-mod-bundle.d.ts +14 -1
  314. package/dist/web-mod-bundle.js +68 -3
  315. package/dist/web-mod-bundle.js.map +1 -1
  316. package/dist/web-mod-export.d.ts +9 -0
  317. package/dist/web-mod-export.js +21 -0
  318. package/dist/web-mod-export.js.map +1 -1
  319. package/dist/web-mod-store.d.ts +7 -1
  320. package/dist/web-mod-store.js +21 -7
  321. package/dist/web-mod-store.js.map +1 -1
  322. package/dist/web-prefs.d.ts +14 -0
  323. package/dist/web-prefs.js +24 -4
  324. package/dist/web-prefs.js.map +1 -1
  325. package/dist/web-preview.d.ts +6 -2
  326. package/dist/web-preview.js +4 -2
  327. package/dist/web-preview.js.map +1 -1
  328. package/dist/web-returning-device.d.ts +41 -0
  329. package/dist/web-returning-device.js +57 -5
  330. package/dist/web-returning-device.js.map +1 -1
  331. package/dist/web-session-authorization.d.ts +132 -0
  332. package/dist/web-session-authorization.js +193 -0
  333. package/dist/web-session-authorization.js.map +1 -0
  334. package/dist/web-session.d.ts +70 -10
  335. package/dist/web-session.js +137 -22
  336. package/dist/web-session.js.map +1 -1
  337. package/dist/web-settings-patch.d.ts +49 -2
  338. package/dist/web-settings-patch.js +145 -1
  339. package/dist/web-settings-patch.js.map +1 -1
  340. package/dist/web-settings-tools.d.ts +89 -0
  341. package/dist/web-settings-tools.js +270 -0
  342. package/dist/web-settings-tools.js.map +1 -0
  343. package/dist/web-shell-routes.d.ts +1 -1
  344. package/dist/web-shell-routes.js +1 -1
  345. package/dist/web-shell-routes.js.map +1 -1
  346. package/dist/web-theme-store.d.ts +39 -0
  347. package/dist/web-theme-store.js +122 -11
  348. package/dist/web-theme-store.js.map +1 -1
  349. package/dist/web-theme.d.ts +2 -0
  350. package/dist/web-theme.js +10 -1
  351. package/dist/web-theme.js.map +1 -1
  352. package/dist/web-upload.d.ts +13 -0
  353. package/dist/web-upload.js +39 -3
  354. package/dist/web-upload.js.map +1 -1
  355. package/dist/workflow-templates/default.md +1 -1
  356. package/package.json +1 -1
  357. package/templates/systemd.service.ejs +8 -0
@@ -6,10 +6,11 @@ import type { CpuProfile } from "./cpu-profile.js";
6
6
  import { type FleetMemory } from "./process-memory.js";
7
7
  import { MemoryPressure, type MemoryPressureSnapshot } from "./memory-pressure.js";
8
8
  import { ReplyDeduper } from "./reply-dedup.js";
9
- import type { FleetConfig, RawFleetConfig, InstanceConfig } from "./types.js";
9
+ import type { FleetConfig, RawFleetConfig, InstanceConfig, WebVerifiedAuthorityConfig } from "./types.js";
10
10
  import { type DeliveryStatus, type GuildEmoji, type GuildEmojiGroup, type ResolvedStatusEmojis } from "./status-emojis.js";
11
11
  import { type RouteTarget } from "./fleet-context.js";
12
12
  import { EventLog } from "./event-log.js";
13
+ import { BackendAvailabilityStore, type AvailabilityProbes, type BackendAvailability } from "./backend-availability.js";
13
14
  import { AdapterWorld } from "./adapter-world.js";
14
15
  import { CostGuard } from "./cost-guard.js";
15
16
  import { IpcClient } from "./channel/ipc-bridge.js";
@@ -73,6 +74,8 @@ import { AppearanceTools } from "./web-appearance-tools.js";
73
74
  import { ModStore } from "./web-mod-store.js";
74
75
  import { AgentMods } from "./web-mod-agent.js";
75
76
  import { type CachedImage } from "./web-images.js";
77
+ import { WebSettingsTools } from "./web-settings-tools.js";
78
+ import { type Delegation, type TrafficItem } from "./fleet-traffic.js";
76
79
  import { type RawConfigPatch } from "./settings-api.js";
77
80
  import { type AgentEndpointContext } from "./agent-endpoint.js";
78
81
  import { ClassicChannelManager } from "./classic-channel-manager.js";
@@ -84,8 +87,14 @@ import { TargetQueueWorker } from "./target-queue-worker.js";
84
87
  import { resolveDeliveryWorkerMode } from "./types.js";
85
88
  import { type WebNeedsItem } from "./needs-you-hub.js";
86
89
  import { type OrgChart } from "./web-org.js";
90
+ import { type MemoryHog } from "./memory-hogs.js";
87
91
  import { type CacheReport } from "./cache-service.js";
88
92
  import { type WebCommandResult } from "./web-commands.js";
93
+ import { type SessionRecord } from "./web-session.js";
94
+ import { VERIFIED_SESSION_HOURS, type HumanAuthority, type WebAuthorityRefusal, type WebAuthorityResult, type WebPeer } from "./authority/web-authority.js";
95
+ import { type AuthorityState } from "./authority/authority-state.js";
96
+ import { type SessionAuthorization } from "./authority/session-authorizations.js";
97
+ import { SessionAuthorizationRequests, type AuthorizationAskRefusal } from "./web-session-authorization.js";
89
98
  import { type ReturningDevice } from "./web-returning-device.js";
90
99
  import { type PreviewAvailability } from "./web-preview.js";
91
100
  import { type ConnectionMetadata, type ConnectionBinding, type BindingProbe, type SecretApplyJob, type ProviderSecretApplyJob } from "./connection-secrets.js";
@@ -112,12 +121,10 @@ export declare function selectLruEvictions(warm: string[], cap: number, opts: {
112
121
  lastInboundAt: (name: string) => number;
113
122
  }): string[];
114
123
  /**
115
- * Window-name shape this fleet recognises as an instance window: the
116
- * `-t<digits>` form every allocator emits, plus legacy `classic-` windows.
117
- * Startup cleanup reaps windows matching this that are no longer in
118
- * fleet.yaml. Keep in sync with `uniqueInstanceName` — every name it emits
119
- * must match here, or a deleted instance's CLI is left running (#1305 P2-3).
124
+ * #2163: whether `dir` is inside AgEnD's own workspaces (<AGEND_HOME>/workspaces/<name>/…), compared after resolving
125
+ * symlinks on both sides — including a missing folder's existing ancestors — so a link elsewhere is not inside, nor is a broken link.
120
126
  */
127
+ export declare function insideManagedWorkspaces(dir: string, agendHome?: string): boolean;
121
128
  export declare function isOrphanInstanceWindowName(name: string): boolean;
122
129
  /** restartSingleInstance's options. `carry` (#1753): a credential-profile switch; its outcome is written into `result`. */
123
130
  export interface RestartOpts {
@@ -401,6 +408,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
401
408
  /** At most one reconnect/backoff loop may exist per instance. */
402
409
  private ipcReconnectInFlight;
403
410
  private adapterRestarting;
411
+ /** #2175: this boot's progress message, whose completion may still be owed by its background retry. */
412
+ private startupProgress;
404
413
  private adapterState;
405
414
  /** Web Settings secret rotation is deliberately separate from reconnect
406
415
  * recovery: a rotation must build a fresh provider client with the new token,
@@ -438,10 +447,16 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
438
447
  private connectionBindingInFlight;
439
448
  private collabInstances;
440
449
  private healthServer;
450
+ /** #2118: independent of HTML preview availability/port; fixed bootstrap only, no effect resources. */
451
+ private readonly effectBootstrap;
452
+ /** Fixed trusted document coherence, independent of the HTML preview listener; never a resource grant. */
453
+ get effectBoot(): string;
441
454
  private healthServerDrain;
442
455
  /** #1306: the preview listener (health_port + 1 by default), and whether it is listening. */
443
456
  private previewListener;
444
457
  private previewListening;
458
+ /** The preview listener could not open its port: "<port>: <error code>", for the page (#2061 follow-up); null otherwise. */
459
+ private previewListenError;
445
460
  /** The ports the preview listener was started for, and the inputs it was built from (a reload compares them). */
446
461
  private previewPorts;
447
462
  private previewInputs;
@@ -460,6 +475,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
460
475
  /** Injectable only to keep the chat→CLI reload hand-off deterministic in tests. */
461
476
  private fullRestartLauncher;
462
477
  private eventLogPruneTimer;
478
+ /** #1920 §3.2: the background reads of guests' ClassicBot room membership (a minute's tick; reads only what is due). */
479
+ private guestRoomsTimer;
480
+ private guestRoomMembership;
463
481
  private outboxPruneTimer;
464
482
  private logRotateTimer;
465
483
  private discordPresenceTimer;
@@ -474,6 +492,17 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
474
492
  private startedAt;
475
493
  private stormOpenNotifyTimer;
476
494
  private memoryLogAt;
495
+ /**
496
+ * #2015: while host memory is elevated or critical, the processes holding the most in the fleet's service and whose
497
+ * they are (an instance, the fleet, tmux), for the pressure log, /health and the dashboard — never chat (#1712).
498
+ * Rescanned at most once a minute (async, one at a time); cleared when pressure ends.
499
+ */
500
+ private memoryTop;
501
+ private memoryTopScan;
502
+ /** The scan (a seam for tests: they give it a fake /proc). */
503
+ private memoryHogScan;
504
+ /** The fleet's own tmux session exists (only then are its panes read: a fleet that never started has none). */
505
+ private tmuxSessionEnsured;
477
506
  private memoryDebugAt;
478
507
  private memoryLogLevel;
479
508
  /** #1685: the host_memory value the last status frame carried, so a change re-sends the frame. */
@@ -574,6 +603,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
574
603
  private ownerCssStore?;
575
604
  /** #1629 r4 §3: each person's own CSS; which version is in force is their `css.active` in the web preferences. */
576
605
  get ownerCss(): OwnerCssStore;
606
+ private webSettingsToolsService?;
607
+ /**
608
+ * #2056: Settings → Web appearance for a tool (General, a coordinator, full) — the page's own stores and checks, and the
609
+ * page's announcement after a change (web-settings-tools.ts).
610
+ */
611
+ get webSettings(): WebSettingsTools;
577
612
  get webPrefs(): WebPrefsStore;
578
613
  /**
579
614
  * Read from disk on every access rather than cached at startup: `agend
@@ -603,9 +638,26 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
603
638
  sseHeartbeatMs: number;
604
639
  /** The dashboard's login codes. Memory only: a code that outlives the process is a code nobody can prove was not copied. */
605
640
  private webLoginCodes;
641
+ /**
642
+ * #1920 step 4: guests' codes, apart from the admins' — one per account, so no guest's `/web` withdraws another's or
643
+ * an admin's code (#2093 review), at most 32 at once. Local sign-in only for now (audience "local").
644
+ */
645
+ private webGuestLoginCodes;
646
+ /** #1920 step 4: when each account last got a guest code (monotonic) — one a minute, so `/web` is no DM flood. */
647
+ private readonly guestCodeAskedAt;
648
+ /** #2093 review: an account's guest /web in progress — one at a time, so two at once cannot both pass the minute. */
649
+ private readonly guestCodeInFlight;
650
+ /**
651
+ * #2093 review: revokes a guest /web in progress must see — every web session's (`/web revoke` from an admin) bumps
652
+ * the global count, an account's own bumps its entry — checked before the code is issued and while it is delivered.
653
+ */
654
+ private guestRevokes;
655
+ private readonly guestAccountRevokes;
606
656
  /** #1570: browsers that may ask the sign-in page for a fresh code, and how often they may. */
607
657
  private returningDevices;
608
658
  private readonly codeRequestLimiter;
659
+ /** #1920 step 4b: guests' device code requests, limited apart — guests never use up the admins' fleet-wide budget. */
660
+ private readonly guestCodeRequestLimiter;
609
661
  /**
610
662
  * Set while a Settings apply job is driving the reconcile. The reconcile
611
663
  * stays the single doer; it just says out loud what it is doing to whom, so
@@ -651,6 +703,25 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
651
703
  /** #1266: the choice, delivered as an ordinary inbound message from whoever made it, and shown in the web chat. */
652
704
  private deliverReplyButtonChoice;
653
705
  private ensureDeliveryOutbox;
706
+ /** #1918: cross-instance traffic, as the org canvas draws it (fleet-traffic.ts). */
707
+ private readonly trafficLog;
708
+ private readonly delegations;
709
+ private trafficMemo;
710
+ /**
711
+ * One delivery row's traffic item, kept for the snapshot and sent to the open pages when it is news; and the
712
+ * delegation it opens or closes (a task and its report), sent as "delegation".
713
+ */
714
+ private publishTraffic;
715
+ /**
716
+ * GET /ui/traffic: what is in flight now (the outbox's pending rows) and what finished in the last two minutes, at
717
+ * most TRAFFIC_SNAPSHOT_MAX items. Worked out at most once every two seconds, so the public link's polling (or any
718
+ * number of pages) costs one indexed read per two seconds. Visibility is applied as of now.
719
+ */
720
+ trafficSnapshot(): {
721
+ now: string;
722
+ items: TrafficItem[];
723
+ delegations: Delegation[];
724
+ };
654
725
  /** Synchronous SQLite admission; the caller may acknowledge only after this returns. */
655
726
  admitDurableDelivery(input: {
656
727
  operationId: string;
@@ -704,6 +775,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
704
775
  private hostMemoryIndicator;
705
776
  /** Separate cooldown: changing measurements must not create new text-throttle keys. */
706
777
  private reportMemoryPressure;
778
+ /**
779
+ * #2015: rescan the largest processes (at most once a minute, one at a time). The first result of an episode, and
780
+ * then at most every 10 minutes, is logged with the pressure; /health and the dashboard read the latest. Never chat.
781
+ */
782
+ private refreshMemoryTop;
707
783
  /** Wire the one fleet-wide storm into notification and recovery surfaces. */
708
784
  private bindStormWindowEvents;
709
785
  /** What the gate allows while any storm window is open (see SpawnGate.pump). */
@@ -993,7 +1069,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
993
1069
  * for `instance` (#1320 part B). Per entry: the channel's own adapter, no
994
1070
  * thread, mention suppression on. Returns the number of channels posted
995
1071
  * to. Failures are per-entry warn-and-continue — a failed echo never fails
996
- * the web send. Entries without `web_echo: true` are never touched.
1072
+ * the web send. Only entries classicWebEchoOn admits are touched (#2054: unset follows web.echo_to_channel; an explicit
1073
+ * `web_echo: false` never echoes).
997
1074
  *
998
1075
  * Every copy is fenced at start time: an entry whose explicit world is
999
1076
  * gone is skipped (only legacy adapterId-less entries fall back to the
@@ -1004,6 +1081,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1004
1081
  * already in flight may still land late — the contract permits that.
1005
1082
  */
1006
1083
  /** `sender` (#1827): the web person's name, as the room log records them ("web-user" when none). */
1084
+ /**
1085
+ * #1920 §5.2: a web message's channel copy was sent — it is now what the channel saw. Kept so (and on disk), and sent
1086
+ * to the guests' streams only: an admin's page already has it, and nothing about it changed for them.
1087
+ */
1088
+ webMessageInChannel(instance: string, messageId: string): void;
1007
1089
  sendClassicWebEcho(instance: string, text: string, sender?: string): Promise<number>;
1008
1090
  /**
1009
1091
  * #1666: a delivered web chat message starts the same cancel/progress lifecycle in the instance's topic as a platform
@@ -1359,6 +1441,20 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1359
1441
  handle: string;
1360
1442
  owner: LoginCodeOwner;
1361
1443
  }, current: () => boolean): Promise<void>;
1444
+ /**
1445
+ * #1920 §5.5 (step 4b): a guest signing in through the public link — said in the General of the admin who opened it
1446
+ * (who, how many agents), awaited as an admin's public sign-in is, while that link is the open one, its opener still
1447
+ * current, and the account still an admitted guest. A failure refuses the sign-in.
1448
+ */
1449
+ confirmGuestPublicWebLogin(info: {
1450
+ label: string;
1451
+ handle: string;
1452
+ account: {
1453
+ adapterId: string;
1454
+ userId: string;
1455
+ };
1456
+ exposureId: string;
1457
+ }, current: () => boolean): Promise<void>;
1362
1458
  /** Telegram's typed command enters through the same strict owner and nonce path as Discord. */
1363
1459
  dashboardMenu(msg: InboundMessage): Promise<void>;
1364
1460
  /**
@@ -1396,6 +1492,77 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1396
1492
  count: number;
1397
1493
  durable: boolean;
1398
1494
  };
1495
+ /**
1496
+ * #1920 phase 3: Settings → Web sign-ins → Guests — the switches, each connection's access mode and the agents named for
1497
+ * an open one, and every guest account (signed in, with a returning device, or narrowed): who, its platform, what it
1498
+ * reaches now, its sessions and devices, and its narrowing. Ids are the accounts' own (an admin's page).
1499
+ */
1500
+ guestOverview(): {
1501
+ enabled: boolean;
1502
+ chat: boolean;
1503
+ instances: string[];
1504
+ connections: Array<{
1505
+ id: string;
1506
+ type: string;
1507
+ mode: "open" | "allowlist";
1508
+ named: string[];
1509
+ }>;
1510
+ guests: Array<{
1511
+ adapterId: string;
1512
+ userId: string;
1513
+ name: string;
1514
+ platform: string;
1515
+ scope: string[];
1516
+ reach: string[];
1517
+ sessions: number;
1518
+ lastSeen: number | null;
1519
+ devices: number;
1520
+ narrow: string[] | null;
1521
+ }>;
1522
+ };
1523
+ /** #1920 phase 3 (the app shell): a guest's chip — its web name, and its connection's platform (discord, telegram). */
1524
+ guestBadge(owner: {
1525
+ adapterId: string;
1526
+ userId: string;
1527
+ }): {
1528
+ name: string;
1529
+ platform: string;
1530
+ };
1531
+ /** #1920 step 4: whether a `/web` is a guest's — guest sign-in on, and not from a fleet admin (theirs runs as before). */
1532
+ isGuestWebAsk(adapterId: string | undefined, userId: string): boolean;
1533
+ /** #1920 step 4 (auth-api): a guest code's account may still sign in — guests on, and something in its scope now. */
1534
+ guestSignInAllowed(account: {
1535
+ adapterId: string;
1536
+ userId: string;
1537
+ }): boolean;
1538
+ /**
1539
+ * #1920 §5.4: a guest's own `/web revoke` — its sessions and its outstanding code; nobody else's (an admin's revokes
1540
+ * everyone's, as before).
1541
+ */
1542
+ revokeGuestWebSessions(owner: {
1543
+ adapterId: string;
1544
+ userId: string;
1545
+ }): {
1546
+ count: number;
1547
+ durable: boolean;
1548
+ };
1549
+ /**
1550
+ * #1920 §2.3 (step 4): `/web` from someone who is not a fleet admin, while guest sign-in is on. `revoke` ends their
1551
+ * own guest sessions. Otherwise a guest code (tier guest, bound to this account) goes privately — a DM, else the
1552
+ * slash command's ephemeral answer (`replyPrivately`) — once a minute at most, and only when their scope (from what
1553
+ * they may already use in chat, rooms read at sign-in) holds something. The code itself is never posted where asked.
1554
+ * Callers ask isGuestWebAsk first (synchronously); false here too when it is not a guest's.
1555
+ */
1556
+ guestWebCommand(ask: {
1557
+ adapterId: string;
1558
+ userId: string;
1559
+ username?: string;
1560
+ arg: string;
1561
+ replyHere: (text: string) => Promise<unknown>;
1562
+ replyPrivately?: (text: string) => Promise<unknown>;
1563
+ }): Promise<boolean>;
1564
+ /** guestWebCommand's issuance, one per account at a time; a revoke made meanwhile (either kind) ends it unissued. */
1565
+ private issueGuestCode;
1399
1566
  /** #1570 (auth-api): this browser becomes a returning device of the code's owner. The cookie value, or null. */
1400
1567
  rememberReturningDevice(owner: LoginCodeOwner, input: {
1401
1568
  surface: "local" | "gateway";
@@ -1421,12 +1588,31 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1421
1588
  } | {
1422
1589
  kind: "refused";
1423
1590
  }>;
1591
+ /**
1592
+ * #1920 step 4b: a guest's returning device asks for a code — a guest code for that account, by DM only, under the
1593
+ * same rules as its /web (guests on, not an admin, something in scope now; one per account and the cap; one flow per
1594
+ * account at a time; a revoke meanwhile ends it), its own limiter, and the guests' breaker. Asked through the public
1595
+ * link: only while that exposure is the open one (its code then works through it alone), as an admin's device.
1596
+ */
1597
+ private requestGuestDeviceCode;
1598
+ /** #1920 step 4b (auth-api): this browser becomes a guest's returning device. The cookie value, or null. */
1599
+ rememberGuestDevice(account: {
1600
+ adapterId: string;
1601
+ userId: string;
1602
+ }, input: {
1603
+ surface: "local" | "gateway";
1604
+ label: string;
1605
+ }): string | null;
1424
1606
  /** Called by the sign-in endpoint: a login the operator did not make should be visible to them. */
1425
1607
  onWebLogin(info: {
1426
1608
  label: string;
1427
1609
  surface: "local" | "gateway";
1428
1610
  tier: string;
1429
1611
  handle: string;
1612
+ owner?: {
1613
+ adapterId: string;
1614
+ userId: string;
1615
+ };
1430
1616
  }): void;
1431
1617
  getDashboardAccess(): {
1432
1618
  ready: boolean;
@@ -1545,7 +1731,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1545
1731
  * reported separately because they differ by ~60x and only one of them can
1546
1732
  * show a fleet-manager leak. */
1547
1733
  memory: FleetMemory;
1548
- hostMemory: MemoryPressureSnapshot;
1734
+ hostMemory: MemoryPressureSnapshot & {
1735
+ topProcesses?: MemoryHog[];
1736
+ topProcessesAt?: string;
1737
+ };
1549
1738
  problems: string[];
1550
1739
  };
1551
1740
  /** Start the primary adapter (backward-compatible, sets this.adapter) */
@@ -1697,6 +1886,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1697
1886
  */
1698
1887
  private inboundNoticeAdapter;
1699
1888
  private handleInboundMessageCore;
1889
+ /**
1890
+ * A person's platform message as the web chat shows it — the user's own words, as a user (#1306), in the instance's
1891
+ * history (#1565). #1920 §5.2: said in the instance's topic, General or room, so it is that channel's, by that account.
1892
+ */
1893
+ private emitPlatformInbound;
1700
1894
  /** Handle outbound tool calls from a daemon instance */
1701
1895
  /** Warn (but don't block) when rate limits are high. 30-min debounce per instance. */
1702
1896
  private rateLimitWarnedAt;
@@ -1739,6 +1933,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1739
1933
  /** On a fleet with no chat platform, the dashboard is where an instance-health prompt is posted (#1307 item 6). */
1740
1934
  private webOnlyPromptPlace;
1741
1935
  /** Resolves when the reply is in the web chat (#1770: after its files are copied); the caller need not wait. */
1936
+ /**
1937
+ * #1920 §5.2: whether a platform send landed in the instance's own place — its ClassicBot room, or its topic in its
1938
+ * connection's group — so its channel's members saw it. Anything else (another chat, a DM, a context left from General,
1939
+ * an answer without the chat it went to) is not the channel's.
1940
+ */
1941
+ private landedInOwnChannel;
1942
+ /** #1920 §5.2 (#2085 review): a platform click's buttons are in the instance's own place — else not its channel's. */
1943
+ private clickInOwnChannel;
1742
1944
  private afterReplyRouted;
1743
1945
  /**
1744
1946
  * #1770: a reply's files as the web chat shows them. Each is copied into the instance's web-files/ and served from
@@ -2001,6 +2203,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2001
2203
  private guildEmojiCache;
2002
2204
  private guildEmojiFetches;
2003
2205
  private webImageCaches;
2206
+ /** Server emoji whose picture fetch failure was already logged at warn (once each; bounded). */
2207
+ private readonly webEmojiFailures;
2004
2208
  private webImageCache;
2005
2209
  /**
2006
2210
  * The bots instances and ClassicBot rooms speak through, by connections configured now (a connection removed from
@@ -2371,6 +2575,25 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2371
2575
  * (cache-service.ts) — never a vendor call, never a synchronous transcript read.
2372
2576
  */
2373
2577
  cacheReport(window: string): Promise<CacheReport>;
2578
+ /**
2579
+ * #2122 §5.1: the profile the usage read now is tagged with — the claude profile whose config dir is read ("default"
2580
+ * without one); codex "unrecorded" (its rollouts don't say which login wrote them).
2581
+ */
2582
+ private usageProfileOf;
2583
+ /** #2122: the fleet's day boundary zone — defaults.scheduler.default_timezone, else this host's. */
2584
+ usageZone(): string;
2585
+ /**
2586
+ * #2122: the usage report (usage-report.ts) — from the ledgers and rollups as they are now and the delivered-message
2587
+ * counts; never a transcript read. `only`: just that instance (an ordinary agent's own row).
2588
+ */
2589
+ usageReport(params: {
2590
+ range: import("./usage-report.js").UsageRange;
2591
+ group: import("./usage-report.js").UsageGroup;
2592
+ only?: string;
2593
+ }): Promise<import("./usage-report.js").UsageReport>;
2594
+ /** #2001: get_cache_report's — the same report, as last worked out (reused for a minute, until the next pass). */
2595
+ cacheReportPublished(window: string): Promise<CacheReport>;
2596
+ private cacheServiceFor;
2374
2597
  /** The web's Acknowledge (any item; a signed-in session is fleet-admin level). */
2375
2598
  acknowledgeNeedsItem(id: string, principal: string): {
2376
2599
  status: 200 | 400 | 404 | 409 | 500;
@@ -2421,6 +2644,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2421
2644
  key: string;
2422
2645
  userId: string;
2423
2646
  name: string;
2647
+ guest?: true;
2648
+ authority?: HumanAuthority;
2424
2649
  }): Promise<{
2425
2650
  status: 200 | 400 | 403 | 409;
2426
2651
  error?: string;
@@ -2458,6 +2683,100 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2458
2683
  private readonly webBackendTokens;
2459
2684
  /** #1269: the web's /clear confirmations — one token per question, used once, for the instance as it was asked about. */
2460
2685
  private readonly webClearTokens;
2686
+ /**
2687
+ * #1939 S1: the design's §3 for one web request (authority/web-authority.ts), with this fleet's admins, policy and
2688
+ * token; `instance` once the body has named it. Observe only: receipts record it, no agent acts on it yet.
2689
+ */
2690
+ webAuthority(input: {
2691
+ session: SessionRecord | null;
2692
+ gateway: boolean;
2693
+ peer: WebPeer;
2694
+ instance?: string;
2695
+ }): WebAuthorityResult;
2696
+ private sessionAuthorizations;
2697
+ private sessionAuthorizationStore;
2698
+ /**
2699
+ * #1939 §0: record that a session's account has authorized it — called only once that account has confirmed on Discord
2700
+ * or Telegram (S2b). The session must qualify now (§3, as a message from it would be judged); then every message,
2701
+ * click, /steer and /btw from it is web-verified until max_session_hours after now, the session ends, or a revocation.
2702
+ * Ones no longer worth keeping (their session gone, an old epoch, run out) are dropped on the way.
2703
+ */
2704
+ authorizeWebSession(session: SessionRecord, peer: WebPeer, gateway: boolean): {
2705
+ ok: true;
2706
+ authorization: SessionAuthorization;
2707
+ durable: boolean;
2708
+ } | {
2709
+ ok: false;
2710
+ refusal: WebAuthorityRefusal;
2711
+ };
2712
+ private authorityStateStore;
2713
+ /**
2714
+ * #1939 §10: the switch, "Only this computer can authorize" and the revocation epoch in force for the configuration as
2715
+ * it is now (a change since last seen moves the epoch first; authority-state.ts). No data directory: off.
2716
+ */
2717
+ webAuthorityState(): AuthorityState;
2718
+ /**
2719
+ * #1939 S2a: Settings → Web → Web authority — the state in force (the switch counts as off while its state cannot be
2720
+ * written), what fleet.yaml says, the hosts that make the dashboard reachable from elsewhere (the warning while
2721
+ * loopback_only is off), and the sessions authorized now (§0): each one's device, account, and when it runs out.
2722
+ */
2723
+ webAuthorityOverview(): {
2724
+ state: AuthorityState;
2725
+ configured: WebVerifiedAuthorityConfig;
2726
+ hours: typeof VERIFIED_SESSION_HOURS;
2727
+ lanHosts: string[];
2728
+ authorized: Array<{
2729
+ handle: string;
2730
+ label: string;
2731
+ account: string;
2732
+ authorizedAt: number;
2733
+ until: number;
2734
+ }>;
2735
+ };
2736
+ private authorizationRequests;
2737
+ /**
2738
+ * #1939 S2b (§0.1): "Authorize this browser" — the Confirm card in the account's DM. Confirm runs §3 again at the tap
2739
+ * (authorizeWebSession on the session read again by its handle); Not me signs the session out.
2740
+ */
2741
+ sessionAuthorizationRequests(): SessionAuthorizationRequests;
2742
+ /** #1939 S2b: the web session asks to be authorized (the request judged by §3 first — as it will be again at the tap). */
2743
+ requestSessionAuthorization(input: {
2744
+ session: SessionRecord | null;
2745
+ gateway: boolean;
2746
+ peer: WebPeer;
2747
+ }): Promise<{
2748
+ ok: true;
2749
+ expiresInMs: number;
2750
+ } | {
2751
+ ok: false;
2752
+ refusal: AuthorizationAskRefusal;
2753
+ retryAfterMs?: number;
2754
+ }>;
2755
+ /**
2756
+ * #1939 §3 without the authorization: would this request's session qualify to be authorized? null: yes; otherwise the
2757
+ * first check it fails (for the app to say why it can't be authorized here).
2758
+ */
2759
+ private webAuthorityQualifies;
2760
+ /** #1939 S2b: what the app shows for this browser — verified (until when), a card pending, or why not. */
2761
+ webSessionAuthorization(input: {
2762
+ session: SessionRecord | null;
2763
+ gateway: boolean;
2764
+ peer: WebPeer;
2765
+ }): {
2766
+ state: "verified";
2767
+ until: number;
2768
+ } | {
2769
+ state: "pending";
2770
+ expiresInMs: number;
2771
+ } | {
2772
+ state: "none";
2773
+ reason: WebAuthorityRefusal;
2774
+ };
2775
+ /** #1939 §10: revoke every web authority given so far (receipts read as none), without signing anyone out. */
2776
+ revokeWebAuthority(): {
2777
+ epoch: number;
2778
+ durable: boolean;
2779
+ };
2461
2780
  /** #1269: an instance's chat command from the web chat (web-commands.ts); `publicLink`: a gateway request. */
2462
2781
  webCommand(input: {
2463
2782
  instance: string;
@@ -2467,6 +2786,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2467
2786
  }, opts: {
2468
2787
  publicLink: boolean;
2469
2788
  person?: Pick<WebPersonView, "userId" | "name">;
2789
+ authority?: HumanAuthority;
2470
2790
  }): Promise<WebCommandResult>;
2471
2791
  /** Consume `/clear` Confirm/Cancel exactly once; only Confirm reaches IPC. */
2472
2792
  private handleClearConfirmation;
@@ -2934,8 +3254,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2934
3254
  private pasteRawToClassicInstance;
2935
3255
  /** Resolve the backend name configured for an instance (fleet or classic). */
2936
3256
  private backendNameForInstance;
3257
+ /**
3258
+ * #2072: a catalog is the account's, so a credential profile has its own. Only claude-code's probe reads an account
3259
+ * catalog through a profile's login (its `GET /v1/models` with the profile's token); other backends' probes read the
3260
+ * process environment, so their catalog stays the backend's own.
3261
+ */
3262
+ private catalogProfile;
2937
3263
  private cliEnvPath;
2938
- /** Read the cached CLI env for a backend, or null if missing/stale/unparseable. */
3264
+ /** Read the cached CLI env for a backend (a credential profile's own, when given), or null if missing/stale/unparseable. */
2939
3265
  private readCliEnv;
2940
3266
  /** Return cached CLI versions immediately. Refresh is started after /sysinfo is sent. */
2941
3267
  getBackendCliVersionSnapshot(): BackendCliVersionSnapshot;
@@ -2966,6 +3292,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2966
3292
  };
2967
3293
  /** Human-readable effective model, e.g. `auto (default)`. Used by /ctx. */
2968
3294
  modelDisplayForInstance(instanceName: string): string;
3295
+ /**
3296
+ * #2072: the model an instance runs is always among its choices — one its CLI's catalog does not list (an older
3297
+ * name, a custom provider's, a typed one) is shown first, marked, so the menu never hides what is running.
3298
+ */
3299
+ private withCurrentModel;
2969
3300
  private modelChoiceLabel;
2970
3301
  /** Preserve the existing cache merge rules for worker probes. */
2971
3302
  private persistCliEnvProbeResult;
@@ -3139,8 +3470,31 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3139
3470
  private prospectiveCodexModel;
3140
3471
  /** #1811: whether a launch of `backend` here would pass a level: the same gate its builder applies. */
3141
3472
  private launchEffortGate;
3142
- /** Installed the way the launch finds a CLI (resolveBinary): on PATH or in a known install directory. */
3143
- private backendInstalledHere;
3473
+ /**
3474
+ * #2072: what this host can run, from the published availability snapshot (backend-availability.ts). Read only: a
3475
+ * handler never starts a probe, not even in the background — launch, the timer, and /login install or sign-in do.
3476
+ */
3477
+ backendAvailabilityRows(): BackendAvailability[];
3478
+ /**
3479
+ * #2072 part 3: the models a Settings field offers for `backend` — the cached catalog (an instance's own credential
3480
+ * profile's, when it is named and has one), claude's account catalog included. Read only: never a probe.
3481
+ */
3482
+ modelCatalogFor(backend: string, instance: string | null): import("./backend/types.js").ModelOption[];
3483
+ /**
3484
+ * #2072 (#2078 review): the snapshot as THIS instance would see it. Its sign-in on a backend is its own credential
3485
+ * profile's when it has one there — the host's default login says nothing about it. A profile's login is a file check
3486
+ * (credentialProfileLogin), no process.
3487
+ */
3488
+ backendAvailabilityFor(instanceName: string): BackendAvailability[];
3489
+ /** The probes the snapshot runs (tests replace them: no CLI, no account, no network). */
3490
+ availabilityProbes: AvailabilityProbes;
3491
+ private availabilityStore;
3492
+ private availabilityTimer;
3493
+ get backendAvailability(): BackendAvailabilityStore;
3494
+ /** A launch need not look the binary up again (a synchronous `which` on the loop) when the snapshot found it. */
3495
+ private noteAvailabilityPaths;
3496
+ /** Probe now and then every AVAILABILITY_STALE_MS; a pass that finds nothing changed starts no CLI. */
3497
+ private startAvailabilityRefresh;
3144
3498
  /** The models `/model` would offer on a backend: the cached CLI env, else (live) a bounded probe. Never throws. */
3145
3499
  private backendModelOptions;
3146
3500
  /**
@@ -3185,6 +3539,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3185
3539
  private findClassicApprovalGeneral;
3186
3540
  /** Return a user-facing blocker without mutating ClassicBot state. */
3187
3541
  private validateClassicStart;
3542
+ /** #2072: from the published snapshot (no `which` on the loop); not checked yet counts as installed (no false alarm). */
3188
3543
  private isBackendInstalled;
3189
3544
  private getMissingBackendWarning;
3190
3545
  /** Handle Discord's required static slash choice, warning before a likely startup failure. */
@@ -3480,6 +3835,56 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3480
3835
  * Only the parsed host name is logged, never the raw header.
3481
3836
  */
3482
3837
  private noteRejectedHost;
3838
+ /**
3839
+ * #1920 §3: the instances a guest session may see — derived on every request from the account's chat access, never
3840
+ * stored; nothing while `web.guests.enabled` is not true.
3841
+ * - Its connection's fleet topics and General (what it may talk to in chat): when that connection's access lets the
3842
+ * account in (AccessManager.isAllowed — allowed_users or paired). An `open` connection lets everyone in, so it gives
3843
+ * only the instances an admin named for its guests (`web.guests.open_instances`; the user's decision: least
3844
+ * privilege, as an open group has no list of people).
3845
+ * - A Telegram private ClassicBot room that is the account's own (its chat id is the user id).
3846
+ * - A ClassicBot group or guild room on its connection: only while its membership is verified (§3.2 — a "member"
3847
+ * answer read in the background, at most 15 minutes old; unknown, failed or stale hides it).
3848
+ * - Then an admin's narrowing (`web.guests.narrow`), which only takes away.
3849
+ * A fleet admin is not a guest: an admin outside the connection's access gets nothing here (admins sign in as admins).
3850
+ */
3851
+ guestScope(owner: {
3852
+ readonly adapterId: string;
3853
+ readonly userId: string;
3854
+ } | undefined): ReadonlySet<string>;
3855
+ /**
3856
+ * #1920 (#2104 review): what an account reaches before an admin's narrowing — its connection's topics (an open one's
3857
+ * named agents), its own Telegram private room, its verified group rooms. Narrowing can only take from this set, so it
3858
+ * is what Settings offers to narrow to. Empty while guest sign-in is off.
3859
+ */
3860
+ private guestReach;
3861
+ /**
3862
+ * #1920 §3.5: a guest session still admitted — current, with something in scope. A scope that became empty (guest
3863
+ * sign-in off, the account removed from the connection's access, everything narrowed away) ends the session here,
3864
+ * so the next request and the open stream find it gone.
3865
+ */
3866
+ private guestStillAdmitted;
3867
+ /**
3868
+ * The same, with a third answer (§3.2): "pending" — nothing in scope now, but a room's membership is not read yet
3869
+ * (a restart, a room just created). The request is refused and the session kept; its read starts in the background.
3870
+ */
3871
+ private guestAdmission;
3872
+ /** #1920 §3.2: the membership answers; the read goes to the room's own connection, never waits past its deadline. */
3873
+ private guestRooms;
3874
+ /** #1920 §3.2: read this guest's rooms that are due (GuestRoomMembership.refresh says when each mode reads). */
3875
+ private refreshGuestRooms;
3876
+ /** Every account with a live guest session, one after another (the guest caps bound them); one pass at a time. */
3877
+ private refreshAllGuestRooms;
3878
+ private guestRoomsPass;
3879
+ /**
3880
+ * #1920 §3.5: guest sign-in turned off ends every guest session — checked when the configuration is read or saved
3881
+ * and when the sessions are opened, so turning it back on never revives one.
3882
+ */
3883
+ private enforceGuestSwitch;
3884
+ /** #1920 §5.2: whether this instance is the account's own Telegram private ClassicBot room (its chat id is the user id). */
3885
+ private guestOwnRoom;
3886
+ /** A private room's chat id is its one user's id (a group's is negative, so never equal); Telegram only. */
3887
+ private isOwnPrivateRoom;
3483
3888
  /** Shared handler dispatcher; gateway admission is enforced by its separate listener. */
3484
3889
  private dispatchWebHttp;
3485
3890
  private startHealthServer;
@@ -3501,6 +3906,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3501
3906
  previewForUi(hostHeader: string | undefined, secure: boolean): PreviewAvailability & {
3502
3907
  boot: string | null;
3503
3908
  };
3909
+ private previewNotListening;
3504
3910
  /**
3505
3911
  * #1723: for one page of the public link (exposure `exposureId`, at `dashboardOrigin`): its own preview tunnel's
3506
3912
  * origin once up, "starting" until then, why it failed if it did — or a configured web.preview_origin, used instead.