@songsid/agend 2.2.1 → 2.3.0-beta.10

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 (437) hide show
  1. package/dist/agent-cli-instructions.md +5 -2
  2. package/dist/agent-cli.js +284 -2
  3. package/dist/agent-cli.js.map +1 -1
  4. package/dist/agent-endpoint.d.ts +2 -0
  5. package/dist/agent-endpoint.js +29 -0
  6. package/dist/agent-endpoint.js.map +1 -1
  7. package/dist/agent-file-read.d.ts +38 -0
  8. package/dist/agent-file-read.js +317 -0
  9. package/dist/agent-file-read.js.map +1 -0
  10. package/dist/agent-whats-new.d.ts +11 -0
  11. package/dist/agent-whats-new.js +29 -2
  12. package/dist/agent-whats-new.js.map +1 -1
  13. package/dist/atomic-write.js +9 -1
  14. package/dist/atomic-write.js.map +1 -1
  15. package/dist/auth-api.d.ts +30 -1
  16. package/dist/auth-api.js +61 -12
  17. package/dist/auth-api.js.map +1 -1
  18. package/dist/authority/authority-state.d.ts +38 -0
  19. package/dist/authority/authority-state.js +114 -0
  20. package/dist/authority/authority-state.js.map +1 -0
  21. package/dist/authority/session-authorizations.d.ts +43 -0
  22. package/dist/authority/session-authorizations.js +102 -0
  23. package/dist/authority/session-authorizations.js.map +1 -0
  24. package/dist/authority/web-authority.d.ts +120 -0
  25. package/dist/authority/web-authority.js +157 -0
  26. package/dist/authority/web-authority.js.map +1 -0
  27. package/dist/backend/antigravity.js +3 -3
  28. package/dist/backend/antigravity.js.map +1 -1
  29. package/dist/backend/claude-code.d.ts +2 -2
  30. package/dist/backend/claude-code.js +10 -5
  31. package/dist/backend/claude-code.js.map +1 -1
  32. package/dist/backend/launch-effort.js +1 -1
  33. package/dist/backend/launch-effort.js.map +1 -1
  34. package/dist/backend/muse.js +10 -2
  35. package/dist/backend/muse.js.map +1 -1
  36. package/dist/backend/types.d.ts +14 -0
  37. package/dist/backend/types.js +25 -0
  38. package/dist/backend/types.js.map +1 -1
  39. package/dist/backend-availability.d.ts +120 -0
  40. package/dist/backend-availability.js +396 -0
  41. package/dist/backend-availability.js.map +1 -0
  42. package/dist/backend-command.d.ts +21 -3
  43. package/dist/backend-command.js +23 -4
  44. package/dist/backend-command.js.map +1 -1
  45. package/dist/bundled-skills.d.ts +14 -0
  46. package/dist/bundled-skills.js +29 -0
  47. package/dist/bundled-skills.js.map +1 -0
  48. package/dist/cache-analysis.d.ts +47 -1
  49. package/dist/cache-analysis.js +68 -8
  50. package/dist/cache-analysis.js.map +1 -1
  51. package/dist/cache-ledger.d.ts +16 -3
  52. package/dist/cache-ledger.js +33 -13
  53. package/dist/cache-ledger.js.map +1 -1
  54. package/dist/cache-report-tool.d.ts +17 -0
  55. package/dist/cache-report-tool.js +40 -0
  56. package/dist/cache-report-tool.js.map +1 -0
  57. package/dist/cache-service.d.ts +70 -3
  58. package/dist/cache-service.js +178 -17
  59. package/dist/cache-service.js.map +1 -1
  60. package/dist/channel/adapters/discord.d.ts +9 -0
  61. package/dist/channel/adapters/discord.js +52 -2
  62. package/dist/channel/adapters/discord.js.map +1 -1
  63. package/dist/channel/adapters/telegram.d.ts +8 -1
  64. package/dist/channel/adapters/telegram.js +74 -4
  65. package/dist/channel/adapters/telegram.js.map +1 -1
  66. package/dist/channel/mcp-tools.js +48 -2
  67. package/dist/channel/mcp-tools.js.map +1 -1
  68. package/dist/channel/types.d.ts +21 -0
  69. package/dist/classic-channel-manager.d.ts +10 -5
  70. package/dist/classic-channel-manager.js +12 -9
  71. package/dist/classic-channel-manager.js.map +1 -1
  72. package/dist/cli.js +130 -31
  73. package/dist/cli.js.map +1 -1
  74. package/dist/config-validator.js +119 -4
  75. package/dist/config-validator.js.map +1 -1
  76. package/dist/daemon.d.ts +5 -0
  77. package/dist/daemon.js +273 -22
  78. package/dist/daemon.js.map +1 -1
  79. package/dist/decision-list.d.ts +25 -0
  80. package/dist/decision-list.js +30 -0
  81. package/dist/decision-list.js.map +1 -0
  82. package/dist/delivery-outbox.d.ts +10 -0
  83. package/dist/delivery-outbox.js +12 -1
  84. package/dist/delivery-outbox.js.map +1 -1
  85. package/dist/fleet-context.d.ts +15 -0
  86. package/dist/fleet-manager.d.ts +506 -11
  87. package/dist/fleet-manager.js +1784 -130
  88. package/dist/fleet-manager.js.map +1 -1
  89. package/dist/fleet-traffic.d.ts +74 -0
  90. package/dist/fleet-traffic.js +196 -0
  91. package/dist/fleet-traffic.js.map +1 -0
  92. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +20 -5
  93. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +6 -1
  94. package/dist/general-knowledge/skills/multi-channel/SKILL.md +3 -2
  95. package/dist/general-knowledge/skills/persona-emoji/SKILL.md +1 -1
  96. package/dist/general-knowledge/skills/web-appearance/SKILL.md +492 -0
  97. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +476 -0
  98. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
  99. package/dist/human-delivery-receipts.d.ts +24 -1
  100. package/dist/human-delivery-receipts.js +64 -11
  101. package/dist/human-delivery-receipts.js.map +1 -1
  102. package/dist/instance-avatar.js +3 -0
  103. package/dist/instance-avatar.js.map +1 -1
  104. package/dist/instance-config-impact.js +6 -1
  105. package/dist/instance-config-impact.js.map +1 -1
  106. package/dist/instance-lifecycle.js +9 -4
  107. package/dist/instance-lifecycle.js.map +1 -1
  108. package/dist/instance-names.d.ts +4 -0
  109. package/dist/instance-names.js +12 -0
  110. package/dist/instance-names.js.map +1 -0
  111. package/dist/instructions.d.ts +12 -1
  112. package/dist/instructions.js +13 -2
  113. package/dist/instructions.js.map +1 -1
  114. package/dist/locale.js +100 -8
  115. package/dist/locale.js.map +1 -1
  116. package/dist/ls-attach-resolve.d.ts +95 -0
  117. package/dist/ls-attach-resolve.js +174 -0
  118. package/dist/ls-attach-resolve.js.map +1 -0
  119. package/dist/memory-hogs.d.ts +27 -0
  120. package/dist/memory-hogs.js +124 -0
  121. package/dist/memory-hogs.js.map +1 -0
  122. package/dist/needs-you-hub.d.ts +4 -0
  123. package/dist/needs-you-hub.js +31 -6
  124. package/dist/needs-you-hub.js.map +1 -1
  125. package/dist/needs-you.d.ts +1 -13
  126. package/dist/needs-you.js +3 -37
  127. package/dist/needs-you.js.map +1 -1
  128. package/dist/outbound-handlers.d.ts +15 -0
  129. package/dist/outbound-handlers.js +152 -11
  130. package/dist/outbound-handlers.js.map +1 -1
  131. package/dist/outbound-schemas.d.ts +228 -4
  132. package/dist/outbound-schemas.js +147 -1
  133. package/dist/outbound-schemas.js.map +1 -1
  134. package/dist/public-web-gateway.js +21 -1
  135. package/dist/public-web-gateway.js.map +1 -1
  136. package/dist/public-web-link.d.ts +9 -0
  137. package/dist/public-web-link.js +8 -0
  138. package/dist/public-web-link.js.map +1 -1
  139. package/dist/quickstart-api.d.ts +10 -1
  140. package/dist/quickstart-api.js +12 -4
  141. package/dist/quickstart-api.js.map +1 -1
  142. package/dist/reply-buttons-controller.d.ts +4 -0
  143. package/dist/reply-buttons-controller.js +2 -2
  144. package/dist/reply-buttons-controller.js.map +1 -1
  145. package/dist/repo-worktree-guard.d.ts +36 -0
  146. package/dist/repo-worktree-guard.js +143 -0
  147. package/dist/repo-worktree-guard.js.map +1 -0
  148. package/dist/restart-progress.d.ts +65 -1
  149. package/dist/restart-progress.js +236 -10
  150. package/dist/restart-progress.js.map +1 -1
  151. package/dist/rollout-index.d.ts +5 -0
  152. package/dist/rollout-index.js +26 -5
  153. package/dist/rollout-index.js.map +1 -1
  154. package/dist/scheduler/scheduler.d.ts +70 -1
  155. package/dist/scheduler/scheduler.js +256 -17
  156. package/dist/scheduler/scheduler.js.map +1 -1
  157. package/dist/service-installer.d.ts +2 -1
  158. package/dist/service-installer.js +18 -3
  159. package/dist/service-installer.js.map +1 -1
  160. package/dist/settings-api.d.ts +19 -0
  161. package/dist/settings-api.js +210 -2
  162. package/dist/settings-api.js.map +1 -1
  163. package/dist/settings-change.js +112 -0
  164. package/dist/settings-change.js.map +1 -1
  165. package/dist/settings-effect.js +32 -2
  166. package/dist/settings-effect.js.map +1 -1
  167. package/dist/settings-http-confirmation.js +5 -0
  168. package/dist/settings-http-confirmation.js.map +1 -1
  169. package/dist/tmux-manager.d.ts +5 -0
  170. package/dist/tmux-manager.js +16 -0
  171. package/dist/tmux-manager.js.map +1 -1
  172. package/dist/tool-permissions.d.ts +4 -6
  173. package/dist/tool-permissions.js +100 -2
  174. package/dist/tool-permissions.js.map +1 -1
  175. package/dist/topic-commands.d.ts +17 -7
  176. package/dist/topic-commands.js +39 -21
  177. package/dist/topic-commands.js.map +1 -1
  178. package/dist/topic-link.d.ts +128 -0
  179. package/dist/topic-link.js +269 -0
  180. package/dist/topic-link.js.map +1 -0
  181. package/dist/types.d.ts +61 -1
  182. package/dist/ui/app-effects.js +233 -0
  183. package/dist/ui/chat-ambient.js +307 -0
  184. package/dist/ui/chat-effect-posters.js +42 -0
  185. package/dist/ui/chat-effects.js +160 -0
  186. package/dist/ui/chat-live-replies.js +58 -0
  187. package/dist/ui/chat-render.js +9 -6
  188. package/dist/ui/chat-store.js +9 -3
  189. package/dist/ui/chat-strings.js +70 -2
  190. package/dist/ui/chat-thread.js +191 -37
  191. package/dist/ui/chat-tour.js +1 -1
  192. package/dist/ui/effect-trial-controller.js +124 -0
  193. package/dist/ui/effect-trial-offer.js +31 -0
  194. package/dist/ui/effect-trial-panel.js +40 -0
  195. package/dist/ui/fleet-cache.js +23 -1
  196. package/dist/ui/fleet-canvas-layout.js +111 -0
  197. package/dist/ui/fleet-canvas.js +525 -0
  198. package/dist/ui/fleet-org.js +27 -12
  199. package/dist/ui/fleet-traffic.js +343 -0
  200. package/dist/ui/fleet-usage.js +401 -0
  201. package/dist/ui/image-lightbox.js +1 -1
  202. package/dist/ui/panel-chat.js +203 -57
  203. package/dist/ui/panel-details.js +20 -6
  204. package/dist/ui/panel-fleet.js +43 -18
  205. package/dist/ui/panel-log.js +6 -6
  206. package/dist/ui/panel-needs.js +3 -3
  207. package/dist/ui/panel-settings.js +34 -13
  208. package/dist/ui/preview-panel.js +25 -9
  209. package/dist/ui/preview.js +3 -2
  210. package/dist/ui/settings-appearance.js +349 -0
  211. package/dist/ui/settings-catalog.js +92 -0
  212. package/dist/ui/settings-dialogs.js +40 -12
  213. package/dist/ui/settings-effects.js +202 -0
  214. package/dist/ui/settings-guests.js +117 -0
  215. package/dist/ui/settings-learn.js +25 -0
  216. package/dist/ui/settings-model.js +15 -6
  217. package/dist/ui/settings-mods.js +271 -0
  218. package/dist/ui/settings-owner-effects.js +80 -0
  219. package/dist/ui/settings-strings.js +333 -10
  220. package/dist/ui/settings-web-authority.js +91 -0
  221. package/dist/ui/shared/agend-auth.js +28 -4
  222. package/dist/ui/shared/agent-widget.js +248 -0
  223. package/dist/ui/shared/app-i18n.js +6 -2
  224. package/dist/ui/shared/app-prefs.js +34 -13
  225. package/dist/ui/shared/app-route.js +24 -2
  226. package/dist/ui/shared/app-session.js +3 -1
  227. package/dist/ui/shared/app-shell.js +102 -23
  228. package/dist/ui/shared/app-store.js +28 -1
  229. package/dist/ui/shared/app-stream.js +14 -7
  230. package/dist/ui/shared/app-themes.js +206 -0
  231. package/dist/ui/shared/app.css +565 -4
  232. package/dist/ui/shared/app.js +23 -10
  233. package/dist/ui/shared/card-strings.js +32 -0
  234. package/dist/ui/shared/effect-app-runtime.js +297 -0
  235. package/dist/ui/shared/effect-baseline.js +64 -0
  236. package/dist/ui/shared/effect-chat-runtime.js +167 -0
  237. package/dist/ui/shared/effect-cursor.js +125 -0
  238. package/dist/ui/shared/effect-frame.js +146 -0
  239. package/dist/ui/shared/effect-geometry.js +137 -0
  240. package/dist/ui/shared/effect-host-style.js +10 -0
  241. package/dist/ui/shared/effect-owner-regions.js +74 -0
  242. package/dist/ui/shared/effect-owner-source.js +115 -0
  243. package/dist/ui/shared/effect-policy.js +151 -0
  244. package/dist/ui/shared/effect-poster-reader.js +98 -0
  245. package/dist/ui/shared/effect-posters.js +117 -0
  246. package/dist/ui/shared/effect-profiler.js +184 -0
  247. package/dist/ui/shared/effect-profiles.js +65 -0
  248. package/dist/ui/shared/effect-registry.js +535 -0
  249. package/dist/ui/shared/effect-runtime-loader.js +234 -0
  250. package/dist/ui/shared/effect-safety.js +153 -0
  251. package/dist/ui/shared/effect-stock-snapshot.js +43 -0
  252. package/dist/ui/shared/effect-stock-trust.js +217 -0
  253. package/dist/ui/shared/effect-trial-shadow.js +62 -0
  254. package/dist/ui/shared/effect-trial-source.js +103 -0
  255. package/dist/ui/shared/effect-trial-stage.js +170 -0
  256. package/dist/ui/shared/effect-trial.css +40 -0
  257. package/dist/ui/shared/fx-motion.js +67 -0
  258. package/dist/ui/shared/header-tools.js +1 -1
  259. package/dist/ui/shared/identity-card.js +273 -0
  260. package/dist/ui/shared/identity-color.js +261 -0
  261. package/dist/ui/shared/instance-nav.js +215 -41
  262. package/dist/ui/shared/owner-css.js +221 -0
  263. package/dist/ui/shared/owner-effect-prefs.js +117 -0
  264. package/dist/ui/shared/panel-view.js +103 -10
  265. package/dist/ui/shared/signin.js +2 -0
  266. package/dist/ui/shared/tokens.css +9 -3
  267. package/dist/ui/shared/ui-dialog.js +1 -1
  268. package/dist/ui/shared/ui-icons.js +3 -0
  269. package/dist/ui/shared/ui-menu.js +1 -1
  270. package/dist/ui/shared/ui-toast.js +1 -1
  271. package/dist/ui/shared/usage-dialog.js +22 -2
  272. package/dist/ui/shared/view-strings.js +98 -2
  273. package/dist/ui/shared/web-authorize.js +151 -0
  274. package/dist/ui/signin.html +1 -0
  275. package/dist/ui/web-terminal/terminal.css +4 -4
  276. package/dist/usage/providers.d.ts +28 -0
  277. package/dist/usage/providers.js +126 -36
  278. package/dist/usage/providers.js.map +1 -1
  279. package/dist/usage-report.d.ts +158 -0
  280. package/dist/usage-report.js +226 -0
  281. package/dist/usage-report.js.map +1 -0
  282. package/dist/usage-rollup.d.ts +51 -0
  283. package/dist/usage-rollup.js +168 -0
  284. package/dist/usage-rollup.js.map +1 -0
  285. package/dist/view-api.d.ts +68 -0
  286. package/dist/view-api.js +249 -8
  287. package/dist/view-api.js.map +1 -1
  288. package/dist/web-ambient.d.ts +72 -0
  289. package/dist/web-ambient.js +161 -0
  290. package/dist/web-ambient.js.map +1 -0
  291. package/dist/web-api.d.ts +111 -5
  292. package/dist/web-api.js +1235 -58
  293. package/dist/web-api.js.map +1 -1
  294. package/dist/web-appearance-limits.d.ts +82 -0
  295. package/dist/web-appearance-limits.js +83 -0
  296. package/dist/web-appearance-limits.js.map +1 -0
  297. package/dist/web-appearance-policy.d.ts +64 -0
  298. package/dist/web-appearance-policy.js +87 -0
  299. package/dist/web-appearance-policy.js.map +1 -0
  300. package/dist/web-appearance-tools.d.ts +53 -0
  301. package/dist/web-appearance-tools.js +124 -0
  302. package/dist/web-appearance-tools.js.map +1 -0
  303. package/dist/web-appearance-view.d.ts +124 -0
  304. package/dist/web-appearance-view.js +278 -0
  305. package/dist/web-appearance-view.js.map +1 -0
  306. package/dist/web-appearance.d.ts +93 -0
  307. package/dist/web-appearance.js +373 -0
  308. package/dist/web-appearance.js.map +1 -0
  309. package/dist/web-asset-parts.d.ts +93 -0
  310. package/dist/web-asset-parts.js +133 -0
  311. package/dist/web-asset-parts.js.map +1 -0
  312. package/dist/web-auth.js +20 -2
  313. package/dist/web-auth.js.map +1 -1
  314. package/dist/web-card.d.ts +110 -0
  315. package/dist/web-card.js +266 -0
  316. package/dist/web-card.js.map +1 -0
  317. package/dist/web-channel-echo.d.ts +7 -1
  318. package/dist/web-channel-echo.js +6 -2
  319. package/dist/web-channel-echo.js.map +1 -1
  320. package/dist/web-chat-history.d.ts +59 -0
  321. package/dist/web-chat-history.js +102 -4
  322. package/dist/web-chat-history.js.map +1 -1
  323. package/dist/web-commands.d.ts +1 -0
  324. package/dist/web-effect-bootstrap.d.ts +12 -0
  325. package/dist/web-effect-bootstrap.js +49 -0
  326. package/dist/web-effect-bootstrap.js.map +1 -0
  327. package/dist/web-effect-bundle.d.ts +28 -0
  328. package/dist/web-effect-bundle.js +171 -0
  329. package/dist/web-effect-bundle.js.map +1 -0
  330. package/dist/web-effect-canonical.d.ts +8 -0
  331. package/dist/web-effect-canonical.js +27 -0
  332. package/dist/web-effect-canonical.js.map +1 -0
  333. package/dist/web-effect-library.d.ts +114 -0
  334. package/dist/web-effect-library.js +530 -0
  335. package/dist/web-effect-library.js.map +1 -0
  336. package/dist/web-effect-playback.d.ts +30 -0
  337. package/dist/web-effect-playback.js +71 -0
  338. package/dist/web-effect-playback.js.map +1 -0
  339. package/dist/web-effect-poster.d.ts +8 -0
  340. package/dist/web-effect-poster.js +52 -0
  341. package/dist/web-effect-poster.js.map +1 -0
  342. package/dist/web-effect-profiles.d.ts +118 -0
  343. package/dist/web-effect-profiles.js +180 -0
  344. package/dist/web-effect-profiles.js.map +1 -0
  345. package/dist/web-effect-service.d.ts +93 -0
  346. package/dist/web-effect-service.js +335 -0
  347. package/dist/web-effect-service.js.map +1 -0
  348. package/dist/web-effect-tools.d.ts +48 -0
  349. package/dist/web-effect-tools.js +129 -0
  350. package/dist/web-effect-tools.js.map +1 -0
  351. package/dist/web-effect-trials.d.ts +86 -0
  352. package/dist/web-effect-trials.js +204 -0
  353. package/dist/web-effect-trials.js.map +1 -0
  354. package/dist/web-effect-upload.d.ts +27 -0
  355. package/dist/web-effect-upload.js +185 -0
  356. package/dist/web-effect-upload.js.map +1 -0
  357. package/dist/web-effect-worker.d.ts +8 -0
  358. package/dist/web-effect-worker.js +170 -0
  359. package/dist/web-effect-worker.js.map +1 -0
  360. package/dist/web-effect.d.ts +103 -0
  361. package/dist/web-effect.js +153 -0
  362. package/dist/web-effect.js.map +1 -0
  363. package/dist/web-guest-access.d.ts +125 -0
  364. package/dist/web-guest-access.js +234 -0
  365. package/dist/web-guest-access.js.map +1 -0
  366. package/dist/web-guest-rooms.d.ts +82 -0
  367. package/dist/web-guest-rooms.js +135 -0
  368. package/dist/web-guest-rooms.js.map +1 -0
  369. package/dist/web-identity-color.d.ts +87 -0
  370. package/dist/web-identity-color.js +209 -0
  371. package/dist/web-identity-color.js.map +1 -0
  372. package/dist/web-identity-palette.d.ts +113 -0
  373. package/dist/web-identity-palette.js +84 -0
  374. package/dist/web-identity-palette.js.map +1 -0
  375. package/dist/web-image-meta.d.ts +25 -0
  376. package/dist/web-image-meta.js +200 -0
  377. package/dist/web-image-meta.js.map +1 -0
  378. package/dist/web-login.d.ts +47 -0
  379. package/dist/web-login.js +115 -0
  380. package/dist/web-login.js.map +1 -1
  381. package/dist/web-mod-agent.d.ts +50 -0
  382. package/dist/web-mod-agent.js +207 -0
  383. package/dist/web-mod-agent.js.map +1 -0
  384. package/dist/web-mod-bundle.d.ts +157 -0
  385. package/dist/web-mod-bundle.js +529 -0
  386. package/dist/web-mod-bundle.js.map +1 -0
  387. package/dist/web-mod-export.d.ts +68 -0
  388. package/dist/web-mod-export.js +100 -0
  389. package/dist/web-mod-export.js.map +1 -0
  390. package/dist/web-mod-store.d.ts +289 -0
  391. package/dist/web-mod-store.js +638 -0
  392. package/dist/web-mod-store.js.map +1 -0
  393. package/dist/web-org.d.ts +3 -3
  394. package/dist/web-org.js +11 -17
  395. package/dist/web-org.js.map +1 -1
  396. package/dist/web-owner-css-store.d.ts +180 -0
  397. package/dist/web-owner-css-store.js +384 -0
  398. package/dist/web-owner-css-store.js.map +1 -0
  399. package/dist/web-owner-css.d.ts +58 -0
  400. package/dist/web-owner-css.js +552 -0
  401. package/dist/web-owner-css.js.map +1 -0
  402. package/dist/web-prefs.d.ts +62 -0
  403. package/dist/web-prefs.js +232 -36
  404. package/dist/web-prefs.js.map +1 -1
  405. package/dist/web-preview.d.ts +15 -3
  406. package/dist/web-preview.js +28 -9
  407. package/dist/web-preview.js.map +1 -1
  408. package/dist/web-returning-device.d.ts +41 -0
  409. package/dist/web-returning-device.js +57 -5
  410. package/dist/web-returning-device.js.map +1 -1
  411. package/dist/web-session-authorization.d.ts +132 -0
  412. package/dist/web-session-authorization.js +193 -0
  413. package/dist/web-session-authorization.js.map +1 -0
  414. package/dist/web-session.d.ts +70 -10
  415. package/dist/web-session.js +137 -22
  416. package/dist/web-session.js.map +1 -1
  417. package/dist/web-settings-patch.d.ts +67 -2
  418. package/dist/web-settings-patch.js +196 -1
  419. package/dist/web-settings-patch.js.map +1 -1
  420. package/dist/web-settings-tools.d.ts +89 -0
  421. package/dist/web-settings-tools.js +270 -0
  422. package/dist/web-settings-tools.js.map +1 -0
  423. package/dist/web-shell-routes.d.ts +2 -2
  424. package/dist/web-shell-routes.js +2 -2
  425. package/dist/web-shell-routes.js.map +1 -1
  426. package/dist/web-theme-store.d.ts +257 -0
  427. package/dist/web-theme-store.js +627 -0
  428. package/dist/web-theme-store.js.map +1 -0
  429. package/dist/web-theme.d.ts +123 -0
  430. package/dist/web-theme.js +416 -0
  431. package/dist/web-theme.js.map +1 -0
  432. package/dist/web-widget.d.ts +72 -0
  433. package/dist/web-widget.js +245 -0
  434. package/dist/web-widget.js.map +1 -0
  435. package/dist/workflow-templates/default.md +1 -1
  436. package/package.json +1 -1
  437. 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";
@@ -57,11 +58,24 @@ import { type LogAnswer, type LogQuery } from "./log-service.js";
57
58
  import { WebChatHistory } from "./web-chat-history.js";
58
59
  import { SeenUsers, type MentionNames, type MentionQuery } from "./web-mentions.js";
59
60
  import { WebPrefsStore } from "./web-prefs.js";
61
+ import { OwnerCssStore } from "./web-owner-css-store.js";
62
+ import { ThemeStore } from "./web-theme-store.js";
63
+ import { WebAppearance } from "./web-appearance.js";
64
+ import { WebEffectLibrary } from "./web-effect-library.js";
65
+ import { WebEffectTrials } from "./web-effect-trials.js";
66
+ import { WebEffectService } from "./web-effect-service.js";
67
+ import { WebEffectProfiles } from "./web-effect-profiles.js";
68
+ import { WebEffectTools } from "./web-effect-tools.js";
60
69
  import { type WebAccount } from "./web-profile.js";
61
70
  import type { WebPerson as WebPersonView } from "./web-api.js";
62
71
  import { ReplyButtonsController } from "./reply-buttons-controller.js";
63
72
  import { WebFileLedger } from "./web-upload.js";
73
+ import { AppearanceTools } from "./web-appearance-tools.js";
74
+ import { ModStore } from "./web-mod-store.js";
75
+ import { AgentMods } from "./web-mod-agent.js";
64
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";
65
79
  import { type RawConfigPatch } from "./settings-api.js";
66
80
  import { type AgentEndpointContext } from "./agent-endpoint.js";
67
81
  import { ClassicChannelManager } from "./classic-channel-manager.js";
@@ -73,8 +87,14 @@ import { TargetQueueWorker } from "./target-queue-worker.js";
73
87
  import { resolveDeliveryWorkerMode } from "./types.js";
74
88
  import { type WebNeedsItem } from "./needs-you-hub.js";
75
89
  import { type OrgChart } from "./web-org.js";
90
+ import { type MemoryHog } from "./memory-hogs.js";
76
91
  import { type CacheReport } from "./cache-service.js";
77
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";
78
98
  import { type ReturningDevice } from "./web-returning-device.js";
79
99
  import { type PreviewAvailability } from "./web-preview.js";
80
100
  import { type ConnectionMetadata, type ConnectionBinding, type BindingProbe, type SecretApplyJob, type ProviderSecretApplyJob } from "./connection-secrets.js";
@@ -101,12 +121,10 @@ export declare function selectLruEvictions(warm: string[], cap: number, opts: {
101
121
  lastInboundAt: (name: string) => number;
102
122
  }): string[];
103
123
  /**
104
- * Window-name shape this fleet recognises as an instance window: the
105
- * `-t<digits>` form every allocator emits, plus legacy `classic-` windows.
106
- * Startup cleanup reaps windows matching this that are no longer in
107
- * fleet.yaml. Keep in sync with `uniqueInstanceName` — every name it emits
108
- * 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.
109
126
  */
127
+ export declare function insideManagedWorkspaces(dir: string, agendHome?: string): boolean;
110
128
  export declare function isOrphanInstanceWindowName(name: string): boolean;
111
129
  /** restartSingleInstance's options. `carry` (#1753): a credential-profile switch; its outcome is written into `result`. */
112
130
  export interface RestartOpts {
@@ -390,6 +408,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
390
408
  /** At most one reconnect/backoff loop may exist per instance. */
391
409
  private ipcReconnectInFlight;
392
410
  private adapterRestarting;
411
+ /** #2175: this boot's progress message, whose completion may still be owed by its background retry. */
412
+ private startupProgress;
393
413
  private adapterState;
394
414
  /** Web Settings secret rotation is deliberately separate from reconnect
395
415
  * recovery: a rotation must build a fresh provider client with the new token,
@@ -427,10 +447,16 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
427
447
  private connectionBindingInFlight;
428
448
  private collabInstances;
429
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;
430
454
  private healthServerDrain;
431
455
  /** #1306: the preview listener (health_port + 1 by default), and whether it is listening. */
432
456
  private previewListener;
433
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;
434
460
  /** The ports the preview listener was started for, and the inputs it was built from (a reload compares them). */
435
461
  private previewPorts;
436
462
  private previewInputs;
@@ -449,6 +475,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
449
475
  /** Injectable only to keep the chat→CLI reload hand-off deterministic in tests. */
450
476
  private fullRestartLauncher;
451
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;
452
481
  private outboxPruneTimer;
453
482
  private logRotateTimer;
454
483
  private discordPresenceTimer;
@@ -463,6 +492,17 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
463
492
  private startedAt;
464
493
  private stormOpenNotifyTimer;
465
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;
466
506
  private memoryDebugAt;
467
507
  private memoryLogLevel;
468
508
  /** #1685: the host_memory value the last status frame carried, so a change re-sends the frame. */
@@ -512,6 +552,63 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
512
552
  */
513
553
  private webNameReserved;
514
554
  private webNameTaken;
555
+ private themeStoreInstance?;
556
+ private webAppearanceService?;
557
+ /** #1629: every instance's theme, placements, assets and lock (web-themes.json). */
558
+ get themeStore(): ThemeStore;
559
+ /** #1629: the theme tools, a person's reset and lock, and the one appearance rate limiter (shared with effects). */
560
+ get webAppearance(): WebAppearance;
561
+ private effectLibraryInstance?;
562
+ private effectTrialsInstance?;
563
+ /** Lazy, single-owner storage. Register every host reference source before any operation can collect. */
564
+ get effectLibrary(): WebEffectLibrary;
565
+ /** Volatile Try offers and session-bound runs share this library. */
566
+ get effectTrials(): WebEffectTrials;
567
+ private effectProfilesInstance?;
568
+ get effectProfiles(): WebEffectProfiles;
569
+ private effectServiceInstance?;
570
+ get effectService(): WebEffectService;
571
+ private effectToolsService?;
572
+ /** Caller identity is supplied only by the owned IPC connection / verified agent endpoint token. */
573
+ get effectTools(): WebEffectTools;
574
+ private appearanceToolsService?;
575
+ /** #1629 r4 §1: get_web_appearance / preview_web_appearance — the caller's own look, resolved as the page resolves it. */
576
+ get appearanceTools(): AppearanceTools;
577
+ /** #1958: a profile, card or colour write (view-api.ts) landed: every open page gets a fresh status frame. */
578
+ identityChanged(): void;
579
+ /** A fleet.yaml instance (own key) or a ClassicBot room, now (#1629: a person's reset/lock names one). */
580
+ isKnownInstance(name: string): boolean;
581
+ private modStore?;
582
+ /**
583
+ * #1629 r4-5 / B2: installed mods use the same validated library and scoped holder claims as direct uploads.
584
+ */
585
+ get mods(): ModStore;
586
+ private agentModsService?;
587
+ /** #1629 r4-5b: export_web_mod / propose_web_mod — the caller's own look as a file, and a proposal for a person. */
588
+ get agentMods(): AgentMods;
589
+ /**
590
+ * #1629 r4-5c: an effect as this person may carry it away in an export — their own claim, or one a person shared —
591
+ * read with their principal (Sol's ACL). Being able to view or run a placed effect never grants packaging someone
592
+ * else's private claim: the library's reference read is runtime access, not an export path. Null: not theirs.
593
+ */
594
+ modPlacedEffect(person: string, id: string): {
595
+ name: string;
596
+ files: ReadonlyMap<string, Uint8Array>;
597
+ } | null;
598
+ /** #1629 r4-5: an instance's card text as every viewer sees it (a person's fields over the agent's). */
599
+ modCardText(name: string): {
600
+ tagline?: string;
601
+ bio?: string;
602
+ };
603
+ private ownerCssStore?;
604
+ /** #1629 r4 §3: each person's own CSS; which version is in force is their `css.active` in the web preferences. */
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;
515
612
  get webPrefs(): WebPrefsStore;
516
613
  /**
517
614
  * Read from disk on every access rather than cached at startup: `agend
@@ -541,9 +638,26 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
541
638
  sseHeartbeatMs: number;
542
639
  /** The dashboard's login codes. Memory only: a code that outlives the process is a code nobody can prove was not copied. */
543
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;
544
656
  /** #1570: browsers that may ask the sign-in page for a fresh code, and how often they may. */
545
657
  private returningDevices;
546
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;
547
661
  /**
548
662
  * Set while a Settings apply job is driving the reconcile. The reconcile
549
663
  * stays the single doer; it just says out loud what it is doing to whom, so
@@ -589,6 +703,25 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
589
703
  /** #1266: the choice, delivered as an ordinary inbound message from whoever made it, and shown in the web chat. */
590
704
  private deliverReplyButtonChoice;
591
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
+ };
592
725
  /** Synchronous SQLite admission; the caller may acknowledge only after this returns. */
593
726
  admitDurableDelivery(input: {
594
727
  operationId: string;
@@ -642,6 +775,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
642
775
  private hostMemoryIndicator;
643
776
  /** Separate cooldown: changing measurements must not create new text-throttle keys. */
644
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;
645
783
  /** Wire the one fleet-wide storm into notification and recovery surfaces. */
646
784
  private bindStormWindowEvents;
647
785
  /** What the gate allows while any storm window is open (see SpawnGate.pump). */
@@ -931,7 +1069,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
931
1069
  * for `instance` (#1320 part B). Per entry: the channel's own adapter, no
932
1070
  * thread, mention suppression on. Returns the number of channels posted
933
1071
  * to. Failures are per-entry warn-and-continue — a failed echo never fails
934
- * 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).
935
1074
  *
936
1075
  * Every copy is fenced at start time: an entry whose explicit world is
937
1076
  * gone is skipped (only legacy adapterId-less entries fall back to the
@@ -942,6 +1081,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
942
1081
  * already in flight may still land late — the contract permits that.
943
1082
  */
944
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;
945
1089
  sendClassicWebEcho(instance: string, text: string, sender?: string): Promise<number>;
946
1090
  /**
947
1091
  * #1666: a delivered web chat message starts the same cancel/progress lifecycle in the instance's topic as a platform
@@ -1297,6 +1441,20 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1297
1441
  handle: string;
1298
1442
  owner: LoginCodeOwner;
1299
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>;
1300
1458
  /** Telegram's typed command enters through the same strict owner and nonce path as Discord. */
1301
1459
  dashboardMenu(msg: InboundMessage): Promise<void>;
1302
1460
  /**
@@ -1334,6 +1492,77 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1334
1492
  count: number;
1335
1493
  durable: boolean;
1336
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;
1337
1566
  /** #1570 (auth-api): this browser becomes a returning device of the code's owner. The cookie value, or null. */
1338
1567
  rememberReturningDevice(owner: LoginCodeOwner, input: {
1339
1568
  surface: "local" | "gateway";
@@ -1359,12 +1588,31 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1359
1588
  } | {
1360
1589
  kind: "refused";
1361
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;
1362
1606
  /** Called by the sign-in endpoint: a login the operator did not make should be visible to them. */
1363
1607
  onWebLogin(info: {
1364
1608
  label: string;
1365
1609
  surface: "local" | "gateway";
1366
1610
  tier: string;
1367
1611
  handle: string;
1612
+ owner?: {
1613
+ adapterId: string;
1614
+ userId: string;
1615
+ };
1368
1616
  }): void;
1369
1617
  getDashboardAccess(): {
1370
1618
  ready: boolean;
@@ -1483,7 +1731,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1483
1731
  * reported separately because they differ by ~60x and only one of them can
1484
1732
  * show a fleet-manager leak. */
1485
1733
  memory: FleetMemory;
1486
- hostMemory: MemoryPressureSnapshot;
1734
+ hostMemory: MemoryPressureSnapshot & {
1735
+ topProcesses?: MemoryHog[];
1736
+ topProcessesAt?: string;
1737
+ };
1487
1738
  problems: string[];
1488
1739
  };
1489
1740
  /** Start the primary adapter (backward-compatible, sets this.adapter) */
@@ -1506,6 +1757,22 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1506
1757
  private disposeSettingsAdapter;
1507
1758
  /** Restart a channel adapter after fatal error with infinite retry + 60s cap */
1508
1759
  private restartAdapter;
1760
+ /**
1761
+ * #1990: how a reader in world `worldId`'s group reaches a place token's target — undefined (plain text) for another
1762
+ * world's instance, an instance without a fleet topic (a ClassicBot room may be anywhere), or an id no link is built
1763
+ * from. Discord: the channel mention; Telegram: the topic URL (General's topic included).
1764
+ */
1765
+ private placeLink;
1766
+ /** #1990: a message for world `worldId`'s group with its place tokens rendered (links as text or Telegram entities). */
1767
+ renderPlaces(worldId: string | undefined, text: string, opts?: import("./channel/types.js").SendOpts): {
1768
+ text: string;
1769
+ opts?: import("./channel/types.js").SendOpts;
1770
+ };
1771
+ /** #1990: renderPlaces for the world that owns `instanceName`'s topic. */
1772
+ renderPlacesFor(instanceName: string, text: string, opts?: import("./channel/types.js").SendOpts): {
1773
+ text: string;
1774
+ opts?: import("./channel/types.js").SendOpts;
1775
+ };
1509
1776
  /** Handle inbound message — transcribe voice if present, then route */
1510
1777
  private findGeneralInstance;
1511
1778
  /**
@@ -1619,6 +1886,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1619
1886
  */
1620
1887
  private inboundNoticeAdapter;
1621
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;
1622
1894
  /** Handle outbound tool calls from a daemon instance */
1623
1895
  /** Warn (but don't block) when rate limits are high. 30-min debounce per instance. */
1624
1896
  private rateLimitWarnedAt;
@@ -1661,6 +1933,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1661
1933
  /** On a fleet with no chat platform, the dashboard is where an instance-health prompt is posted (#1307 item 6). */
1662
1934
  private webOnlyPromptPlace;
1663
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;
1664
1944
  private afterReplyRouted;
1665
1945
  /**
1666
1946
  * #1770: a reply's files as the web chat shows them. Each is copied into the instance's web-files/ and served from
@@ -1724,6 +2004,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1724
2004
  */
1725
2005
  private refuseTypedIpc;
1726
2006
  private dispatchTypedIpc;
2007
+ /**
2008
+ * #1629: the caller's own web theme over IPC (the agent endpoint calls the same service). `name` is the instance this
2009
+ * IPC connection belongs to — never anything the message says. A refusal is a result the agent reads (its `error`
2010
+ * and what to do), not a transport error.
2011
+ */
2012
+ private handleWebTheme;
1727
2013
  /** `list_emojis` / `set_persona_emoji` / `preview_emojis` / `list_stickers` / `preview_stickers` over IPC; the agent endpoint calls the same methods. */
1728
2014
  private handlePersonaEmoji;
1729
2015
  private handleScheduleCrud;
@@ -1759,6 +2045,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1759
2045
  handleListStickersHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
1760
2046
  handlePreviewStickersHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
1761
2047
  handleSetPersonaEmojiHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
2048
+ /** #1629: `agend-agent theme …` — the same service as the tools; `instance` is the token's. */
2049
+ handleWebThemeHttp(instance: string, tool: string, args: Record<string, unknown>): Promise<unknown>;
1762
2050
  handlePreviewEmojisHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
1763
2051
  handleSetDescriptionHttp(instance: string, description: string): Promise<unknown>;
1764
2052
  private summarizeToolCall;
@@ -1915,6 +2203,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1915
2203
  private guildEmojiCache;
1916
2204
  private guildEmojiFetches;
1917
2205
  private webImageCaches;
2206
+ /** Server emoji whose picture fetch failure was already logged at warn (once each; bounded). */
2207
+ private readonly webEmojiFailures;
1918
2208
  private webImageCache;
1919
2209
  /**
1920
2210
  * The bots instances and ClassicBot rooms speak through, by connections configured now (a connection removed from
@@ -2285,6 +2575,25 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2285
2575
  * (cache-service.ts) — never a vendor call, never a synchronous transcript read.
2286
2576
  */
2287
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;
2288
2597
  /** The web's Acknowledge (any item; a signed-in session is fleet-admin level). */
2289
2598
  acknowledgeNeedsItem(id: string, principal: string): {
2290
2599
  status: 200 | 400 | 404 | 409 | 500;
@@ -2309,6 +2618,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2309
2618
  label: string;
2310
2619
  }>;
2311
2620
  expiresAt: number;
2621
+ links?: import("./topic-link.js").TextLink[];
2312
2622
  }>;
2313
2623
  /**
2314
2624
  * A click on a prompt in the web dashboard (web track C4). It is the platform click, made by the
@@ -2334,6 +2644,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2334
2644
  key: string;
2335
2645
  userId: string;
2336
2646
  name: string;
2647
+ guest?: true;
2648
+ authority?: HumanAuthority;
2337
2649
  }): Promise<{
2338
2650
  status: 200 | 400 | 403 | 409;
2339
2651
  error?: string;
@@ -2371,6 +2683,100 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2371
2683
  private readonly webBackendTokens;
2372
2684
  /** #1269: the web's /clear confirmations — one token per question, used once, for the instance as it was asked about. */
2373
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
+ };
2374
2780
  /** #1269: an instance's chat command from the web chat (web-commands.ts); `publicLink`: a gateway request. */
2375
2781
  webCommand(input: {
2376
2782
  instance: string;
@@ -2380,6 +2786,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2380
2786
  }, opts: {
2381
2787
  publicLink: boolean;
2382
2788
  person?: Pick<WebPersonView, "userId" | "name">;
2789
+ authority?: HumanAuthority;
2383
2790
  }): Promise<WebCommandResult>;
2384
2791
  /** Consume `/clear` Confirm/Cancel exactly once; only Confirm reaches IPC. */
2385
2792
  private handleClearConfirmation;
@@ -2744,6 +3151,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2744
3151
  private restoreWebChat;
2745
3152
  /** #1565: who an instance is, for its web chat file: its working directory, or its ClassicBot room; null if neither. */
2746
3153
  private webChatOwner;
3154
+ /** The only Try-card publisher: no arbitrary SSE sender/role can manufacture this metadata. */
3155
+ private publishEffectTrial;
2747
3156
  /** Push an SSE event to all connected Web UI clients. */
2748
3157
  emitSseEvent(event: string, data: unknown): void;
2749
3158
  listClaimedTasks(assignee: string): Array<{
@@ -2845,8 +3254,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2845
3254
  private pasteRawToClassicInstance;
2846
3255
  /** Resolve the backend name configured for an instance (fleet or classic). */
2847
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;
2848
3263
  private cliEnvPath;
2849
- /** 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. */
2850
3265
  private readCliEnv;
2851
3266
  /** Return cached CLI versions immediately. Refresh is started after /sysinfo is sent. */
2852
3267
  getBackendCliVersionSnapshot(): BackendCliVersionSnapshot;
@@ -2877,6 +3292,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2877
3292
  };
2878
3293
  /** Human-readable effective model, e.g. `auto (default)`. Used by /ctx. */
2879
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;
2880
3300
  private modelChoiceLabel;
2881
3301
  /** Preserve the existing cache merge rules for worker probes. */
2882
3302
  private persistCliEnvProbeResult;
@@ -3050,8 +3470,31 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3050
3470
  private prospectiveCodexModel;
3051
3471
  /** #1811: whether a launch of `backend` here would pass a level: the same gate its builder applies. */
3052
3472
  private launchEffortGate;
3053
- /** Installed the way the launch finds a CLI (resolveBinary): on PATH or in a known install directory. */
3054
- 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;
3055
3498
  /** The models `/model` would offer on a backend: the cached CLI env, else (live) a bounded probe. Never throws. */
3056
3499
  private backendModelOptions;
3057
3500
  /**
@@ -3096,6 +3539,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3096
3539
  private findClassicApprovalGeneral;
3097
3540
  /** Return a user-facing blocker without mutating ClassicBot state. */
3098
3541
  private validateClassicStart;
3542
+ /** #2072: from the published snapshot (no `which` on the loop); not checked yet counts as installed (no false alarm). */
3099
3543
  private isBackendInstalled;
3100
3544
  private getMissingBackendWarning;
3101
3545
  /** Handle Discord's required static slash choice, warning before a likely startup failure. */
@@ -3391,6 +3835,56 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3391
3835
  * Only the parsed host name is logged, never the raw header.
3392
3836
  */
3393
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;
3394
3888
  /** Shared handler dispatcher; gateway admission is enforced by its separate listener. */
3395
3889
  private dispatchWebHttp;
3396
3890
  private startHealthServer;
@@ -3412,6 +3906,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3412
3906
  previewForUi(hostHeader: string | undefined, secure: boolean): PreviewAvailability & {
3413
3907
  boot: string | null;
3414
3908
  };
3909
+ private previewNotListening;
3415
3910
  /**
3416
3911
  * #1723: for one page of the public link (exposure `exposureId`, at `dashboardOrigin`): its own preview tunnel's
3417
3912
  * origin once up, "starting" until then, why it failed if it did — or a configured web.preview_origin, used instead.