@songsid/agend 2.2.0-beta.9 → 2.3.0-beta.1

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 (422) hide show
  1. package/README.md +40 -24
  2. package/README.zh-TW.md +40 -24
  3. package/dist/agent-cli.js +248 -2
  4. package/dist/agent-cli.js.map +1 -1
  5. package/dist/agent-endpoint.d.ts +2 -0
  6. package/dist/agent-endpoint.js +28 -0
  7. package/dist/agent-endpoint.js.map +1 -1
  8. package/dist/agent-file-read.d.ts +30 -0
  9. package/dist/agent-file-read.js +129 -0
  10. package/dist/agent-file-read.js.map +1 -0
  11. package/dist/agent-whats-new.js +20 -1
  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 +3 -1
  16. package/dist/auth-api.js +32 -1
  17. package/dist/auth-api.js.map +1 -1
  18. package/dist/backend/antigravity.d.ts +33 -0
  19. package/dist/backend/antigravity.js +129 -21
  20. package/dist/backend/antigravity.js.map +1 -1
  21. package/dist/backend/claude-code.d.ts +3 -0
  22. package/dist/backend/claude-code.js +9 -0
  23. package/dist/backend/claude-code.js.map +1 -1
  24. package/dist/backend/codex-metadata.d.ts +33 -0
  25. package/dist/backend/codex-metadata.js +122 -18
  26. package/dist/backend/codex-metadata.js.map +1 -1
  27. package/dist/backend/codex.d.ts +3 -0
  28. package/dist/backend/codex.js +17 -1
  29. package/dist/backend/codex.js.map +1 -1
  30. package/dist/backend/effort-metadata.d.ts +37 -1
  31. package/dist/backend/effort-metadata.js +86 -15
  32. package/dist/backend/effort-metadata.js.map +1 -1
  33. package/dist/backend/grok.d.ts +3 -0
  34. package/dist/backend/grok.js +9 -0
  35. package/dist/backend/grok.js.map +1 -1
  36. package/dist/backend/kiro.d.ts +3 -1
  37. package/dist/backend/kiro.js +7 -3
  38. package/dist/backend/kiro.js.map +1 -1
  39. package/dist/backend/launch-effort.d.ts +61 -0
  40. package/dist/backend/launch-effort.js +170 -0
  41. package/dist/backend/launch-effort.js.map +1 -0
  42. package/dist/backend/muse.js +10 -2
  43. package/dist/backend/muse.js.map +1 -1
  44. package/dist/backend/types.d.ts +24 -0
  45. package/dist/backend/types.js +12 -1
  46. package/dist/backend/types.js.map +1 -1
  47. package/dist/backend-command.d.ts +91 -0
  48. package/dist/backend-command.js +122 -0
  49. package/dist/backend-command.js.map +1 -0
  50. package/dist/channel/adapters/discord.d.ts +14 -0
  51. package/dist/channel/adapters/discord.js +66 -4
  52. package/dist/channel/adapters/discord.js.map +1 -1
  53. package/dist/channel/adapters/telegram.d.ts +26 -1
  54. package/dist/channel/adapters/telegram.js +98 -7
  55. package/dist/channel/adapters/telegram.js.map +1 -1
  56. package/dist/channel/mcp-tools.js +36 -0
  57. package/dist/channel/mcp-tools.js.map +1 -1
  58. package/dist/channel/tool-router.d.ts +2 -0
  59. package/dist/channel/tool-router.js +1 -1
  60. package/dist/channel/tool-router.js.map +1 -1
  61. package/dist/channel/types.d.ts +31 -0
  62. package/dist/cli.js +124 -24
  63. package/dist/cli.js.map +1 -1
  64. package/dist/command-table.d.ts +2 -2
  65. package/dist/command-table.js +5 -2
  66. package/dist/command-table.js.map +1 -1
  67. package/dist/compact-watch.d.ts +86 -0
  68. package/dist/compact-watch.js +288 -0
  69. package/dist/compact-watch.js.map +1 -0
  70. package/dist/config-validator.js +55 -0
  71. package/dist/config-validator.js.map +1 -1
  72. package/dist/config.d.ts +1 -0
  73. package/dist/config.js +2 -1
  74. package/dist/config.js.map +1 -1
  75. package/dist/daemon.d.ts +9 -0
  76. package/dist/daemon.js +394 -29
  77. package/dist/daemon.js.map +1 -1
  78. package/dist/delivery-outbox.d.ts +8 -1
  79. package/dist/delivery-outbox.js +6 -2
  80. package/dist/delivery-outbox.js.map +1 -1
  81. package/dist/doctor.js +7 -0
  82. package/dist/doctor.js.map +1 -1
  83. package/dist/fleet-context.d.ts +12 -0
  84. package/dist/fleet-manager.d.ts +247 -9
  85. package/dist/fleet-manager.js +1227 -142
  86. package/dist/fleet-manager.js.map +1 -1
  87. package/dist/forged-envelope-scan.d.ts +4 -3
  88. package/dist/forged-envelope-scan.js +4 -3
  89. package/dist/forged-envelope-scan.js.map +1 -1
  90. package/dist/general-knowledge/skills/model-discovery/SKILL.md +4 -1
  91. package/dist/general-knowledge/skills/web-appearance/SKILL.md +258 -0
  92. package/dist/install-lock.d.ts +18 -1
  93. package/dist/install-lock.js +30 -3
  94. package/dist/install-lock.js.map +1 -1
  95. package/dist/instance-avatar.d.ts +5 -4
  96. package/dist/instance-avatar.js +15 -8
  97. package/dist/instance-avatar.js.map +1 -1
  98. package/dist/instance-config-impact.js +3 -0
  99. package/dist/instance-config-impact.js.map +1 -1
  100. package/dist/instance-lifecycle.js +9 -4
  101. package/dist/instance-lifecycle.js.map +1 -1
  102. package/dist/instructions.js +2 -2
  103. package/dist/instructions.js.map +1 -1
  104. package/dist/kiro-compact-pane.d.ts +38 -0
  105. package/dist/kiro-compact-pane.js +57 -0
  106. package/dist/kiro-compact-pane.js.map +1 -0
  107. package/dist/launchd-handoff.d.ts +43 -0
  108. package/dist/launchd-handoff.js +56 -0
  109. package/dist/launchd-handoff.js.map +1 -0
  110. package/dist/locale.js +202 -30
  111. package/dist/locale.js.map +1 -1
  112. package/dist/log-service.js +10 -2
  113. package/dist/log-service.js.map +1 -1
  114. package/dist/login-shell.d.ts +21 -0
  115. package/dist/login-shell.js +98 -0
  116. package/dist/login-shell.js.map +1 -0
  117. package/dist/needs-you-hub.d.ts +4 -0
  118. package/dist/needs-you-hub.js +31 -6
  119. package/dist/needs-you-hub.js.map +1 -1
  120. package/dist/needs-you.d.ts +1 -13
  121. package/dist/needs-you.js +3 -37
  122. package/dist/needs-you.js.map +1 -1
  123. package/dist/outbound-handlers.d.ts +32 -0
  124. package/dist/outbound-handlers.js +150 -45
  125. package/dist/outbound-handlers.js.map +1 -1
  126. package/dist/outbound-schemas.d.ts +76 -0
  127. package/dist/outbound-schemas.js +65 -4
  128. package/dist/outbound-schemas.js.map +1 -1
  129. package/dist/provider-probe.d.ts +29 -0
  130. package/dist/provider-probe.js +198 -2
  131. package/dist/provider-probe.js.map +1 -1
  132. package/dist/public-web-gateway.d.ts +2 -0
  133. package/dist/public-web-gateway.js +25 -1
  134. package/dist/public-web-gateway.js.map +1 -1
  135. package/dist/quickstart-api.d.ts +1 -1
  136. package/dist/quickstart-api.js +8 -6
  137. package/dist/quickstart-api.js.map +1 -1
  138. package/dist/quickstart.d.ts +12 -0
  139. package/dist/quickstart.js +36 -6
  140. package/dist/quickstart.js.map +1 -1
  141. package/dist/reply-buttons-controller.d.ts +86 -5
  142. package/dist/reply-buttons-controller.js +271 -7
  143. package/dist/reply-buttons-controller.js.map +1 -1
  144. package/dist/reply-buttons.d.ts +48 -3
  145. package/dist/reply-buttons.js +105 -10
  146. package/dist/reply-buttons.js.map +1 -1
  147. package/dist/reply-polls.d.ts +85 -0
  148. package/dist/reply-polls.js +154 -0
  149. package/dist/reply-polls.js.map +1 -0
  150. package/dist/repo-worktree-guard.d.ts +36 -0
  151. package/dist/repo-worktree-guard.js +143 -0
  152. package/dist/repo-worktree-guard.js.map +1 -0
  153. package/dist/restart-guard.d.ts +6 -3
  154. package/dist/restart-guard.js +6 -3
  155. package/dist/restart-guard.js.map +1 -1
  156. package/dist/restart-progress.d.ts +0 -2
  157. package/dist/restart-progress.js +0 -2
  158. package/dist/restart-progress.js.map +1 -1
  159. package/dist/scheduler/scheduler.d.ts +58 -1
  160. package/dist/scheduler/scheduler.js +176 -10
  161. package/dist/scheduler/scheduler.js.map +1 -1
  162. package/dist/sd-notify.d.ts +22 -1
  163. package/dist/sd-notify.js +63 -10
  164. package/dist/sd-notify.js.map +1 -1
  165. package/dist/service-activation.d.ts +15 -7
  166. package/dist/service-activation.js +42 -26
  167. package/dist/service-activation.js.map +1 -1
  168. package/dist/service-installer.d.ts +24 -0
  169. package/dist/service-installer.js +49 -1
  170. package/dist/service-installer.js.map +1 -1
  171. package/dist/service-plan.d.ts +11 -0
  172. package/dist/service-plan.js +23 -0
  173. package/dist/service-plan.js.map +1 -1
  174. package/dist/settings-api.js +74 -1
  175. package/dist/settings-api.js.map +1 -1
  176. package/dist/settings-change.js +8 -0
  177. package/dist/settings-change.js.map +1 -1
  178. package/dist/settings-effect.js +16 -2
  179. package/dist/settings-effect.js.map +1 -1
  180. package/dist/settings-http-confirmation.js +5 -0
  181. package/dist/settings-http-confirmation.js.map +1 -1
  182. package/dist/systemd-peer-bus.d.ts +95 -0
  183. package/dist/systemd-peer-bus.js +430 -0
  184. package/dist/systemd-peer-bus.js.map +1 -0
  185. package/dist/systemd-runtime.d.ts +27 -1
  186. package/dist/systemd-runtime.js +69 -7
  187. package/dist/systemd-runtime.js.map +1 -1
  188. package/dist/tool-permissions.js +53 -3
  189. package/dist/tool-permissions.js.map +1 -1
  190. package/dist/topic-commands.d.ts +72 -2
  191. package/dist/topic-commands.js +156 -38
  192. package/dist/topic-commands.js.map +1 -1
  193. package/dist/topic-link.d.ts +128 -0
  194. package/dist/topic-link.js +269 -0
  195. package/dist/topic-link.js.map +1 -0
  196. package/dist/transcript-jsonl.d.ts +7 -2
  197. package/dist/transcript-jsonl.js +13 -7
  198. package/dist/transcript-jsonl.js.map +1 -1
  199. package/dist/transcript-sources.js +6 -1
  200. package/dist/transcript-sources.js.map +1 -1
  201. package/dist/types.d.ts +21 -0
  202. package/dist/ui/app-effects.js +187 -0
  203. package/dist/ui/chat-commands.js +1 -0
  204. package/dist/ui/chat-effect-posters.js +42 -0
  205. package/dist/ui/chat-effects.js +72 -0
  206. package/dist/ui/chat-live-replies.js +58 -0
  207. package/dist/ui/chat-render.js +59 -14
  208. package/dist/ui/chat-store.js +78 -8
  209. package/dist/ui/chat-strings.js +43 -16
  210. package/dist/ui/chat-thread.js +175 -31
  211. package/dist/ui/chat-tour.js +18 -15
  212. package/dist/ui/effect-trial-controller.js +119 -0
  213. package/dist/ui/effect-trial-offer.js +31 -0
  214. package/dist/ui/effect-trial-panel.js +37 -0
  215. package/dist/ui/image-lightbox.js +1 -1
  216. package/dist/ui/panel-chat.js +101 -27
  217. package/dist/ui/panel-details.js +18 -5
  218. package/dist/ui/panel-fleet.js +18 -5
  219. package/dist/ui/panel-log.js +10 -10
  220. package/dist/ui/panel-needs.js +13 -10
  221. package/dist/ui/panel-settings.js +66 -12
  222. package/dist/ui/preview-panel.js +25 -9
  223. package/dist/ui/settings-appearance.js +325 -0
  224. package/dist/ui/settings-dialogs.js +11 -6
  225. package/dist/ui/settings-effects.js +201 -0
  226. package/dist/ui/settings-model.js +3 -1
  227. package/dist/ui/settings-mods.js +257 -0
  228. package/dist/ui/settings-owner-effects.js +80 -0
  229. package/dist/ui/settings-strings.js +269 -10
  230. package/dist/ui/settings-token.js +7 -0
  231. package/dist/ui/settings-wizard.js +5 -3
  232. package/dist/ui/shared/agend-auth.js +27 -3
  233. package/dist/ui/shared/agent-widget.js +248 -0
  234. package/dist/ui/shared/app-i18n.js +3 -1
  235. package/dist/ui/shared/app-prefs.js +30 -10
  236. package/dist/ui/shared/app-route.js +23 -1
  237. package/dist/ui/shared/app-session.js +1 -1
  238. package/dist/ui/shared/app-shell.js +29 -16
  239. package/dist/ui/shared/app-store.js +2 -0
  240. package/dist/ui/shared/app-stream.js +15 -7
  241. package/dist/ui/shared/app-themes.js +188 -0
  242. package/dist/ui/shared/app.css +266 -11
  243. package/dist/ui/shared/app.js +6 -0
  244. package/dist/ui/shared/card-strings.js +28 -0
  245. package/dist/ui/shared/effect-app-runtime.js +248 -0
  246. package/dist/ui/shared/effect-baseline.js +64 -0
  247. package/dist/ui/shared/effect-chat-runtime.js +154 -0
  248. package/dist/ui/shared/effect-cursor.js +125 -0
  249. package/dist/ui/shared/effect-frame.js +127 -0
  250. package/dist/ui/shared/effect-geometry.js +122 -0
  251. package/dist/ui/shared/effect-host-style.js +10 -0
  252. package/dist/ui/shared/effect-owner-regions.js +74 -0
  253. package/dist/ui/shared/effect-owner-source.js +115 -0
  254. package/dist/ui/shared/effect-policy.js +137 -0
  255. package/dist/ui/shared/effect-poster-reader.js +98 -0
  256. package/dist/ui/shared/effect-posters.js +117 -0
  257. package/dist/ui/shared/effect-profiler.js +162 -0
  258. package/dist/ui/shared/effect-profiles.js +65 -0
  259. package/dist/ui/shared/effect-registry.js +496 -0
  260. package/dist/ui/shared/effect-runtime-loader.js +234 -0
  261. package/dist/ui/shared/effect-safety.js +153 -0
  262. package/dist/ui/shared/effect-stock-snapshot.js +34 -0
  263. package/dist/ui/shared/effect-stock-trust.js +165 -0
  264. package/dist/ui/shared/effect-trial-source.js +103 -0
  265. package/dist/ui/shared/effect-trial-stage.js +147 -0
  266. package/dist/ui/shared/header-tools.js +35 -15
  267. package/dist/ui/shared/identity-card.js +202 -0
  268. package/dist/ui/shared/identity-color.js +261 -0
  269. package/dist/ui/shared/instance-nav.js +22 -14
  270. package/dist/ui/shared/instance-switch.js +5 -2
  271. package/dist/ui/shared/owner-css.js +221 -0
  272. package/dist/ui/shared/owner-effect-prefs.js +117 -0
  273. package/dist/ui/shared/panel-view.js +96 -12
  274. package/dist/ui/shared/signin.js +17 -9
  275. package/dist/ui/shared/ui-dialog.js +1 -1
  276. package/dist/ui/shared/ui-icons.js +3 -0
  277. package/dist/ui/shared/ui-menu.js +1 -1
  278. package/dist/ui/shared/ui-toast.js +1 -1
  279. package/dist/ui/shared/view-strings.js +40 -2
  280. package/dist/ui/signin.html +9 -3
  281. package/dist/update-check.d.ts +31 -0
  282. package/dist/update-check.js +47 -0
  283. package/dist/update-check.js.map +1 -1
  284. package/dist/update-launch.d.ts +48 -1
  285. package/dist/update-launch.js +159 -5
  286. package/dist/update-launch.js.map +1 -1
  287. package/dist/usage/providers.d.ts +28 -8
  288. package/dist/usage/providers.js +96 -41
  289. package/dist/usage/providers.js.map +1 -1
  290. package/dist/view-api.d.ts +29 -0
  291. package/dist/view-api.js +214 -17
  292. package/dist/view-api.js.map +1 -1
  293. package/dist/web-api.d.ts +86 -2
  294. package/dist/web-api.js +1160 -92
  295. package/dist/web-api.js.map +1 -1
  296. package/dist/web-appearance-limits.d.ts +82 -0
  297. package/dist/web-appearance-limits.js +83 -0
  298. package/dist/web-appearance-limits.js.map +1 -0
  299. package/dist/web-appearance-policy.d.ts +66 -0
  300. package/dist/web-appearance-policy.js +94 -0
  301. package/dist/web-appearance-policy.js.map +1 -0
  302. package/dist/web-appearance-tools.d.ts +50 -0
  303. package/dist/web-appearance-tools.js +105 -0
  304. package/dist/web-appearance-tools.js.map +1 -0
  305. package/dist/web-appearance-view.d.ts +99 -0
  306. package/dist/web-appearance-view.js +163 -0
  307. package/dist/web-appearance-view.js.map +1 -0
  308. package/dist/web-appearance.d.ts +79 -0
  309. package/dist/web-appearance.js +298 -0
  310. package/dist/web-appearance.js.map +1 -0
  311. package/dist/web-asset-parts.d.ts +98 -0
  312. package/dist/web-asset-parts.js +133 -0
  313. package/dist/web-asset-parts.js.map +1 -0
  314. package/dist/web-auth.js +17 -1
  315. package/dist/web-auth.js.map +1 -1
  316. package/dist/web-card.d.ts +96 -0
  317. package/dist/web-card.js +232 -0
  318. package/dist/web-card.js.map +1 -0
  319. package/dist/web-chat-history.d.ts +39 -1
  320. package/dist/web-chat-history.js +69 -9
  321. package/dist/web-chat-history.js.map +1 -1
  322. package/dist/web-commands.d.ts +39 -3
  323. package/dist/web-commands.js +22 -5
  324. package/dist/web-commands.js.map +1 -1
  325. package/dist/web-effect-bundle.d.ts +28 -0
  326. package/dist/web-effect-bundle.js +126 -0
  327. package/dist/web-effect-bundle.js.map +1 -0
  328. package/dist/web-effect-canonical.d.ts +8 -0
  329. package/dist/web-effect-canonical.js +27 -0
  330. package/dist/web-effect-canonical.js.map +1 -0
  331. package/dist/web-effect-library.d.ts +114 -0
  332. package/dist/web-effect-library.js +530 -0
  333. package/dist/web-effect-library.js.map +1 -0
  334. package/dist/web-effect-poster.d.ts +8 -0
  335. package/dist/web-effect-poster.js +52 -0
  336. package/dist/web-effect-poster.js.map +1 -0
  337. package/dist/web-effect-profiles.d.ts +118 -0
  338. package/dist/web-effect-profiles.js +180 -0
  339. package/dist/web-effect-profiles.js.map +1 -0
  340. package/dist/web-effect-service.d.ts +86 -0
  341. package/dist/web-effect-service.js +312 -0
  342. package/dist/web-effect-service.js.map +1 -0
  343. package/dist/web-effect-tools.d.ts +47 -0
  344. package/dist/web-effect-tools.js +126 -0
  345. package/dist/web-effect-tools.js.map +1 -0
  346. package/dist/web-effect-trials.d.ts +86 -0
  347. package/dist/web-effect-trials.js +204 -0
  348. package/dist/web-effect-trials.js.map +1 -0
  349. package/dist/web-effect-upload.d.ts +29 -0
  350. package/dist/web-effect-upload.js +190 -0
  351. package/dist/web-effect-upload.js.map +1 -0
  352. package/dist/web-effect-worker.d.ts +8 -0
  353. package/dist/web-effect-worker.js +170 -0
  354. package/dist/web-effect-worker.js.map +1 -0
  355. package/dist/web-effect.d.ts +89 -0
  356. package/dist/web-effect.js +132 -0
  357. package/dist/web-effect.js.map +1 -0
  358. package/dist/web-identity-color.d.ts +87 -0
  359. package/dist/web-identity-color.js +209 -0
  360. package/dist/web-identity-color.js.map +1 -0
  361. package/dist/web-identity-palette.d.ts +113 -0
  362. package/dist/web-identity-palette.js +84 -0
  363. package/dist/web-identity-palette.js.map +1 -0
  364. package/dist/web-image-meta.d.ts +25 -0
  365. package/dist/web-image-meta.js +200 -0
  366. package/dist/web-image-meta.js.map +1 -0
  367. package/dist/web-login.d.ts +14 -0
  368. package/dist/web-login.js +4 -2
  369. package/dist/web-login.js.map +1 -1
  370. package/dist/web-mod-agent.d.ts +50 -0
  371. package/dist/web-mod-agent.js +203 -0
  372. package/dist/web-mod-agent.js.map +1 -0
  373. package/dist/web-mod-bundle.d.ts +144 -0
  374. package/dist/web-mod-bundle.js +464 -0
  375. package/dist/web-mod-bundle.js.map +1 -0
  376. package/dist/web-mod-export.d.ts +59 -0
  377. package/dist/web-mod-export.js +79 -0
  378. package/dist/web-mod-export.js.map +1 -0
  379. package/dist/web-mod-store.d.ts +283 -0
  380. package/dist/web-mod-store.js +624 -0
  381. package/dist/web-mod-store.js.map +1 -0
  382. package/dist/web-org.d.ts +3 -3
  383. package/dist/web-org.js +11 -17
  384. package/dist/web-org.js.map +1 -1
  385. package/dist/web-owner-css-store.d.ts +180 -0
  386. package/dist/web-owner-css-store.js +384 -0
  387. package/dist/web-owner-css-store.js.map +1 -0
  388. package/dist/web-owner-css.d.ts +58 -0
  389. package/dist/web-owner-css.js +552 -0
  390. package/dist/web-owner-css.js.map +1 -0
  391. package/dist/web-prefs.d.ts +66 -0
  392. package/dist/web-prefs.js +243 -35
  393. package/dist/web-prefs.js.map +1 -1
  394. package/dist/web-preview.d.ts +9 -1
  395. package/dist/web-preview.js +24 -7
  396. package/dist/web-preview.js.map +1 -1
  397. package/dist/web-profile.d.ts +32 -0
  398. package/dist/web-profile.js +132 -0
  399. package/dist/web-profile.js.map +1 -0
  400. package/dist/web-session.d.ts +14 -0
  401. package/dist/web-session.js +10 -0
  402. package/dist/web-session.js.map +1 -1
  403. package/dist/web-settings-patch.d.ts +18 -0
  404. package/dist/web-settings-patch.js +51 -0
  405. package/dist/web-settings-patch.js.map +1 -1
  406. package/dist/web-shell-routes.d.ts +1 -1
  407. package/dist/web-shell-routes.js +1 -1
  408. package/dist/web-shell-routes.js.map +1 -1
  409. package/dist/web-theme-store.d.ts +218 -0
  410. package/dist/web-theme-store.js +516 -0
  411. package/dist/web-theme-store.js.map +1 -0
  412. package/dist/web-theme.d.ts +121 -0
  413. package/dist/web-theme.js +407 -0
  414. package/dist/web-theme.js.map +1 -0
  415. package/dist/web-upload.d.ts +119 -4
  416. package/dist/web-upload.js +252 -39
  417. package/dist/web-upload.js.map +1 -1
  418. package/dist/web-widget.d.ts +72 -0
  419. package/dist/web-widget.js +245 -0
  420. package/dist/web-widget.js.map +1 -0
  421. package/launcher/install-admission.cjs +61 -6
  422. package/package.json +3 -3
@@ -57,8 +57,21 @@ import { type LogAnswer, type LogQuery } from "./log-service.js";
57
57
  import { WebChatHistory } from "./web-chat-history.js";
58
58
  import { SeenUsers, type MentionNames, type MentionQuery } from "./web-mentions.js";
59
59
  import { WebPrefsStore } from "./web-prefs.js";
60
+ import { OwnerCssStore } from "./web-owner-css-store.js";
61
+ import { ThemeStore } from "./web-theme-store.js";
62
+ import { WebAppearance } from "./web-appearance.js";
63
+ import { WebEffectLibrary } from "./web-effect-library.js";
64
+ import { WebEffectTrials } from "./web-effect-trials.js";
65
+ import { WebEffectService } from "./web-effect-service.js";
66
+ import { WebEffectProfiles } from "./web-effect-profiles.js";
67
+ import { WebEffectTools } from "./web-effect-tools.js";
68
+ import { type WebAccount } from "./web-profile.js";
69
+ import type { WebPerson as WebPersonView } from "./web-api.js";
60
70
  import { ReplyButtonsController } from "./reply-buttons-controller.js";
61
71
  import { WebFileLedger } from "./web-upload.js";
72
+ import { AppearanceTools } from "./web-appearance-tools.js";
73
+ import { ModStore } from "./web-mod-store.js";
74
+ import { AgentMods } from "./web-mod-agent.js";
62
75
  import { type CachedImage } from "./web-images.js";
63
76
  import { type RawConfigPatch } from "./settings-api.js";
64
77
  import { type AgentEndpointContext } from "./agent-endpoint.js";
@@ -359,6 +372,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
359
372
  /** In-flight /effort selections, same coordinator shape as pendingModelSelects. */
360
373
  private pendingEffortSelects;
361
374
  private pendingModelSelects;
375
+ /** #1806: in-flight /backend steps, keyed by nonce (see handleBackendSelection). */
376
+ private pendingBackendSelects;
362
377
  /** nonce → pending button prompt (hang restart, interactive assist, clean-exit restart). */
363
378
  private pendingNonceButtons;
364
379
  /** #1386 "Needs you": the list, its live chat messages and Acknowledge. Started with the fleet (finishStartup). */
@@ -435,7 +450,6 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
435
450
  private updateProgressTimer;
436
451
  private updateProgressEditRunning;
437
452
  private lastUpdateProgressText;
438
- private updateCompletionTipText;
439
453
  /**
440
454
  * #1660: an adopted update whose retire outcome is still owed. The
441
455
  * completion summary was (or will be) posted; this watch appends the
@@ -481,6 +495,85 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
481
495
  readonly seenUsers: SeenUsers;
482
496
  private webPrefsStore?;
483
497
  /** #1665: the web preferences kept on the host (<home>/web-prefs.json), read on first use. */
498
+ /**
499
+ * #1827: a web person as agents and chats see them. Signed in as an account (a sign-in code DMed to it): that
500
+ * account's user id — still `via web`, and only for recognition — and the name they chose, else their account's name
501
+ * at sign-in (made safe). Otherwise (an `agend web` session): "web-user", as before, under a name the operator may set.
502
+ * Names are checked again now: one an instance or bot has taken since reads as the next choice down.
503
+ */
504
+ webPerson(owner?: WebAccount): WebPersonView;
505
+ /** #1827: set (null: clear — back to their account's name) a web person's own name; validated in full. */
506
+ setWebPersonName(owner: WebAccount | undefined, raw: unknown): {
507
+ ok: true;
508
+ person: WebPersonView;
509
+ } | {
510
+ ok: false;
511
+ status: number;
512
+ error: string;
513
+ };
514
+ /** #1827 (auth-api): a sign-in as this account — its display name then is the web name it starts with. */
515
+ noteWebSignIn(account: {
516
+ adapterId: string;
517
+ userId: string;
518
+ username?: string;
519
+ }): void;
520
+ /**
521
+ * #1827: a name that belongs to something here — an instance (or ClassicBot room), its display name, a bot. On the web
522
+ * send path: it never throws (a lookup that fails reserves nothing; the name was checked in full when it was set).
523
+ */
524
+ private webNameReserved;
525
+ private webNameTaken;
526
+ private themeStoreInstance?;
527
+ private webAppearanceService?;
528
+ /** #1629: every instance's theme, placements, assets and lock (web-themes.json). */
529
+ get themeStore(): ThemeStore;
530
+ /** #1629: the theme tools, a person's reset and lock, and the one appearance rate limiter (shared with effects). */
531
+ get webAppearance(): WebAppearance;
532
+ private effectLibraryInstance?;
533
+ private effectTrialsInstance?;
534
+ /** Lazy, single-owner storage. Register every host reference source before any operation can collect. */
535
+ get effectLibrary(): WebEffectLibrary;
536
+ /** Volatile Try offers and session-bound runs share this library. */
537
+ get effectTrials(): WebEffectTrials;
538
+ private effectProfilesInstance?;
539
+ get effectProfiles(): WebEffectProfiles;
540
+ private effectServiceInstance?;
541
+ get effectService(): WebEffectService;
542
+ private effectToolsService?;
543
+ /** Caller identity is supplied only by the owned IPC connection / verified agent endpoint token. */
544
+ get effectTools(): WebEffectTools;
545
+ private appearanceToolsService?;
546
+ /** #1629 r4 §1: get_web_appearance / preview_web_appearance — the caller's own look, resolved as the page resolves it. */
547
+ get appearanceTools(): AppearanceTools;
548
+ /** #1958: a profile, card or colour write (view-api.ts) landed: every open page gets a fresh status frame. */
549
+ identityChanged(): void;
550
+ /** A fleet.yaml instance (own key) or a ClassicBot room, now (#1629: a person's reset/lock names one). */
551
+ isKnownInstance(name: string): boolean;
552
+ private modStore?;
553
+ /**
554
+ * #1629 r4-5 / B2: installed mods use the same validated library and scoped holder claims as direct uploads.
555
+ */
556
+ get mods(): ModStore;
557
+ private agentModsService?;
558
+ /** #1629 r4-5b: export_web_mod / propose_web_mod — the caller's own look as a file, and a proposal for a person. */
559
+ get agentMods(): AgentMods;
560
+ /**
561
+ * #1629 r4-5c: an effect as this person may carry it away in an export — their own claim, or one a person shared —
562
+ * read with their principal (Sol's ACL). Being able to view or run a placed effect never grants packaging someone
563
+ * else's private claim: the library's reference read is runtime access, not an export path. Null: not theirs.
564
+ */
565
+ modPlacedEffect(person: string, id: string): {
566
+ name: string;
567
+ files: ReadonlyMap<string, Uint8Array>;
568
+ } | null;
569
+ /** #1629 r4-5: an instance's card text as every viewer sees it (a person's fields over the agent's). */
570
+ modCardText(name: string): {
571
+ tagline?: string;
572
+ bio?: string;
573
+ };
574
+ private ownerCssStore?;
575
+ /** #1629 r4 §3: each person's own CSS; which version is in force is their `css.active` in the web preferences. */
576
+ get ownerCss(): OwnerCssStore;
484
577
  get webPrefs(): WebPrefsStore;
485
578
  /**
486
579
  * Read from disk on every access rather than cached at startup: `agend
@@ -543,6 +636,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
543
636
  */
544
637
  replyButtons(): ReplyButtonsController | null;
545
638
  private replyButtonsStore;
639
+ /**
640
+ * #1823: a closed poll's results go to its instance through the delivery outbox, as a system notice keyed by the
641
+ * poll: durable (held until the instance can take it) and admitted once, however often this is asked. Addressed to
642
+ * the poll's chat, so the instance's answer (the right option, the scores) goes there.
643
+ */
644
+ private admitPollResults;
546
645
  /**
547
646
  * #1266: who may answer a reply's buttons on a platform — whoever may message that instance there: in a ClassicBot
548
647
  * room anyone there (as a typed message), elsewhere someone the sending connection lets speak (#754/#1148), never a
@@ -818,6 +917,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
818
917
  /** #1218: the Log tab's on-demand service — made on first use; with `web.log_tab` off it answers off and does nothing. */
819
918
  private logService;
820
919
  private get log();
920
+ /** Board 003648ac: a web /compact followed to its end, from the transcript the Log reads (none: nothing to follow). */
921
+ private compactWatchService;
922
+ private get compactWatch();
821
923
  /** #1218: GET /ui/steps — an instance's steps, read on demand (null: no such instance). */
822
924
  logSteps(name: string, q: LogQuery): Promise<LogAnswer | null>;
823
925
  /**
@@ -901,7 +1003,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
901
1003
  * or a rebound adapter is never posted through a stale route. A copy
902
1004
  * already in flight may still land late — the contract permits that.
903
1005
  */
904
- sendClassicWebEcho(instance: string, text: string): Promise<number>;
1006
+ /** `sender` (#1827): the web person's name, as the room log records them ("web-user" when none). */
1007
+ sendClassicWebEcho(instance: string, text: string, sender?: string): Promise<number>;
905
1008
  /**
906
1009
  * #1666: a delivered web chat message starts the same cancel/progress lifecycle in the instance's topic as a platform
907
1010
  * inbound (afterUserInboundDelivered): the same bubble, ticker and retire rules. Not its ✅ tracking — the web message
@@ -954,6 +1057,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
954
1057
  isFleetAdmin(userId: string, adapterId?: string): boolean;
955
1058
  /** Whether this adapter has any fleet admin at all (an empty allowlist means the admin commands are off). */
956
1059
  hasFleetAdmins(adapterId?: string): boolean;
1060
+ /**
1061
+ * Where this adapter's fleet-admin list is in fleet.yaml, as the operator wrote it, for the "disabled" replies:
1062
+ * `channel.access.allowed_users` (the single-channel form), else the `channels:` entry — by its `id:`, or its
1063
+ * `type:` when it has none. Read from the raw file: loading turns `channel:` into `channels` and fills in ids.
1064
+ */
1065
+ adminListKey(adapterId?: string): string;
957
1066
  /**
958
1067
  * The one question the privileged commands (/update, /doctor, /dashboard, /collab) ask: may THIS caller,
959
1068
  * through THIS adapter, run it. `disabled` is "nobody can" — an empty list — and is told apart from
@@ -1459,6 +1568,22 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1459
1568
  private disposeSettingsAdapter;
1460
1569
  /** Restart a channel adapter after fatal error with infinite retry + 60s cap */
1461
1570
  private restartAdapter;
1571
+ /**
1572
+ * #1990: how a reader in world `worldId`'s group reaches a place token's target — undefined (plain text) for another
1573
+ * world's instance, an instance without a fleet topic (a ClassicBot room may be anywhere), or an id no link is built
1574
+ * from. Discord: the channel mention; Telegram: the topic URL (General's topic included).
1575
+ */
1576
+ private placeLink;
1577
+ /** #1990: a message for world `worldId`'s group with its place tokens rendered (links as text or Telegram entities). */
1578
+ renderPlaces(worldId: string | undefined, text: string, opts?: import("./channel/types.js").SendOpts): {
1579
+ text: string;
1580
+ opts?: import("./channel/types.js").SendOpts;
1581
+ };
1582
+ /** #1990: renderPlaces for the world that owns `instanceName`'s topic. */
1583
+ renderPlacesFor(instanceName: string, text: string, opts?: import("./channel/types.js").SendOpts): {
1584
+ text: string;
1585
+ opts?: import("./channel/types.js").SendOpts;
1586
+ };
1462
1587
  /** Handle inbound message — transcribe voice if present, then route */
1463
1588
  private findGeneralInstance;
1464
1589
  /**
@@ -1677,6 +1802,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1677
1802
  */
1678
1803
  private refuseTypedIpc;
1679
1804
  private dispatchTypedIpc;
1805
+ /**
1806
+ * #1629: the caller's own web theme over IPC (the agent endpoint calls the same service). `name` is the instance this
1807
+ * IPC connection belongs to — never anything the message says. A refusal is a result the agent reads (its `error`
1808
+ * and what to do), not a transport error.
1809
+ */
1810
+ private handleWebTheme;
1680
1811
  /** `list_emojis` / `set_persona_emoji` / `preview_emojis` / `list_stickers` / `preview_stickers` over IPC; the agent endpoint calls the same methods. */
1681
1812
  private handlePersonaEmoji;
1682
1813
  private handleScheduleCrud;
@@ -1712,6 +1843,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1712
1843
  handleListStickersHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
1713
1844
  handlePreviewStickersHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
1714
1845
  handleSetPersonaEmojiHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
1846
+ /** #1629: `agend-agent theme …` — the same service as the tools; `instance` is the token's. */
1847
+ handleWebThemeHttp(instance: string, tool: string, args: Record<string, unknown>): Promise<unknown>;
1715
1848
  handlePreviewEmojisHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
1716
1849
  handleSetDescriptionHttp(instance: string, description: string): Promise<unknown>;
1717
1850
  private summarizeToolCall;
@@ -1782,6 +1915,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1782
1915
  saveFleetConfig(explicitPatches?: RawConfigPatch[]): void;
1783
1916
  /** Why the config written to `candidate` must not replace fleet.yaml, or null: it does not load, or it adds errors. */
1784
1917
  private savedFleetConfigProblem;
1918
+ /**
1919
+ * #1874 follow-up: the validator's warnings, once per start, in daemon.log — a setting fleet.yaml has that AgEnD
1920
+ * ignores (e.g. `web.access`) is otherwise silent unless someone runs `agend validate`.
1921
+ */
1922
+ private logConfigWarningsAtStartup;
1785
1923
  /** One-time upgrade migration; invalid YAML is never rewritten. */
1786
1924
  private slimFleetConfigAtStartup;
1787
1925
  private writeFleetConfigBackup;
@@ -1865,9 +2003,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1865
2003
  private webImageCaches;
1866
2004
  private webImageCache;
1867
2005
  /**
1868
- * instance → the connection that is its own bot: configured now (a connection removed from fleet.yaml is nobody's,
1869
- * whatever an instance still names — #1635 review), not the primary, and answering for it alone.
2006
+ * The bots instances and ClassicBot rooms speak through, by connections configured now (a connection removed from
2007
+ * fleet.yaml is nobody's, whatever an instance still names — #1635 review). `own`: instance → its own bot (answering
2008
+ * for it alone; the primary too, when it serves one instance only). `speaking` (#1867): instance → the bot it speaks through — its own, a shared one,
2009
+ * or, with none configured for it, the primary.
1870
2010
  */
2011
+ private webBots;
2012
+ /** instance → the connection that is its own bot (see webBots). */
1871
2013
  private ownBots;
1872
2014
  /**
1873
2015
  * The bot a connection is now: its running adapter and that bot's own user id. Everything cached for an own bot is
@@ -1883,9 +2025,15 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1883
2025
  private webAccent;
1884
2026
  /** The cache key of an own bot's avatar, and its loader (which refuses an answer from a bot no longer there). */
1885
2027
  private botAvatarSource;
1886
- /** One instance's avatar and ring for the status frame. Synchronous: what is cached now; fetches run behind. */
2028
+ /**
2029
+ * One instance's avatar and ring for the status frame. Synchronous: what is cached now; fetches run behind. The bot
2030
+ * is its own, else the one it speaks through (#1867) — one cache entry per bot, so a shared bot is fetched once.
2031
+ */
1887
2032
  private webIdentityImage;
1888
- /** GET /ui/img/bot|avatar/<key>: what is cached, never a fetch. Only an own-bot connection, or a known instance's upload. */
2033
+ /**
2034
+ * GET /ui/img/bot|avatar/<key>: what is cached, never a fetch. Only a connection some instance or room speaks
2035
+ * through (#1867), or a known instance's upload.
2036
+ */
1889
2037
  webImage(kind: "bot" | "avatar", key: string): CachedImage | null;
1890
2038
  /**
1891
2039
  * #1682 GET /ui/mentions: names for the mention ids a page found in what it rendered — never a Discord request; in order:
@@ -2247,6 +2395,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2247
2395
  label: string;
2248
2396
  }>;
2249
2397
  expiresAt: number;
2398
+ links?: import("./topic-link.js").TextLink[];
2250
2399
  }>;
2251
2400
  /**
2252
2401
  * A click on a prompt in the web dashboard (web track C4). It is the platform click, made by the
@@ -2256,10 +2405,26 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2256
2405
  * The caller has passed the /ui gate (session, same origin, CSRF). Here: the prompt must be one offered
2257
2406
  * on the dashboard, about the instance the page named, and the action one of its own buttons.
2258
2407
  */
2259
- /** #1266: a click on a reply's button in the web chat (the /ui gate is passed: a session, or the public link). */
2260
- clickWebReplyButton(instance: string, id: string, index: number): Promise<{
2408
+ /** #1823: close_poll — `instance` closes one of its own polls before the deadline. */
2409
+ closePollEarly(instance: string, id: string): Promise<{
2410
+ ok: true;
2411
+ voted: number;
2412
+ } | {
2413
+ ok: false;
2414
+ error: string;
2415
+ }>;
2416
+ /**
2417
+ * #1266: a click on a reply's button in the web chat (the /ui gate is passed: a session, or the public link). On a
2418
+ * poll (#1823) it is `voter`'s vote: the page's session.
2419
+ */
2420
+ clickWebReplyButton(instance: string, id: string, index: number, voter?: {
2421
+ key: string;
2422
+ userId: string;
2423
+ name: string;
2424
+ }): Promise<{
2261
2425
  status: 200 | 400 | 403 | 409;
2262
2426
  error?: string;
2427
+ options?: number[];
2263
2428
  }>;
2264
2429
  clickWebPrompt(instance: string, nonce: string, action: string): Promise<{
2265
2430
  status: 200 | 400 | 403 | 409;
@@ -2289,6 +2454,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2289
2454
  * synchronous; they never probe the pane.
2290
2455
  */
2291
2456
  private clearTargetFence;
2457
+ /** #1806: the web's /backend confirmations — one per question, used once, for the arguments and backend asked about. */
2458
+ private readonly webBackendTokens;
2292
2459
  /** #1269: the web's /clear confirmations — one token per question, used once, for the instance as it was asked about. */
2293
2460
  private readonly webClearTokens;
2294
2461
  /** #1269: an instance's chat command from the web chat (web-commands.ts); `publicLink`: a gateway request. */
@@ -2299,6 +2466,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2299
2466
  confirm?: string;
2300
2467
  }, opts: {
2301
2468
  publicLink: boolean;
2469
+ person?: Pick<WebPersonView, "userId" | "name">;
2302
2470
  }): Promise<WebCommandResult>;
2303
2471
  /** Consume `/clear` Confirm/Cancel exactly once; only Confirm reaches IPC. */
2304
2472
  private handleClearConfirmation;
@@ -2641,9 +2809,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2641
2809
  * The absolute path a fresh login shell resolves `binary` to, or null. Only
2642
2810
  * a real executable file counts: `command -v` also answers with an alias
2643
2811
  * definition or a function name, neither of which a spawn could run.
2812
+ * Async (runOnLoginShell): a login file that backgrounds a process holding the shell's output once froze the fleet loop here.
2644
2813
  */
2645
2814
  private locateBinaryOnLoginShell;
2646
- private locateBinaryOnLoginShellSync;
2647
2815
  /**
2648
2816
  * #1092: the binary in one of the directories its own installer installs to,
2649
2817
  * when no login shell can see it (the installer recorded its PATH in an
@@ -2663,6 +2831,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2663
2831
  private restoreWebChat;
2664
2832
  /** #1565: who an instance is, for its web chat file: its working directory, or its ClassicBot room; null if neither. */
2665
2833
  private webChatOwner;
2834
+ /** The only Try-card publisher: no arbitrary SSE sender/role can manufacture this metadata. */
2835
+ private publishEffectTrial;
2666
2836
  /** Push an SSE event to all connected Web UI clients. */
2667
2837
  emitSseEvent(event: string, data: unknown): void;
2668
2838
  listClaimedTasks(assignee: string): Array<{
@@ -2903,6 +3073,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2903
3073
  effortStrategyFor(instanceName: string): "runtime" | "restart" | "unsupported";
2904
3074
  /** Effort levels this instance's backend actually accepts (empty = unsupported). */
2905
3075
  effortLevelsFor(instanceName: string): string[];
3076
+ /** The instance's backend's effort metadata; agy's levels are its model's (#1825), the one the instance runs. */
3077
+ private instanceEffortMetadata;
2906
3078
  /** Configured effort for an instance: per-instance, else fleet default, else none. */
2907
3079
  resolveInstanceEffort(instanceName: string): {
2908
3080
  effort: string | null;
@@ -2936,6 +3108,72 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2936
3108
  * a switch saves the round trip of asking. Empty when the backend has none.
2937
3109
  */
2938
3110
  private effortSuffix;
3111
+ /** The steps' view of this fleet (backend-command.ts). `live`: a missing or stale model list may be probed (not on the web). */
3112
+ private backendCommandDeps;
3113
+ /**
3114
+ * `/effort`'s levels for a backend this instance may move to, for the model that will run there (codex's levels are
3115
+ * per model; null: its configured default). Empty: it has no effort setting. A file read, never a CLI.
3116
+ */
3117
+ backendEffortLevels(instanceName: string, backend: string, model?: string | null): string[];
3118
+ /**
3119
+ * #1808: whether a backend takes this model name — the one rule for /backend and update_instance_config's switch.
3120
+ * The name must be one its launch line can carry (modelNameCarried); then its offered list (the cached CLI env), and
3121
+ * claude-code's known names (without this instance's configured model, which belongs to the backend being left).
3122
+ * With no list known, the backend's usual name pattern decides.
3123
+ */
3124
+ backendModelVerdict(instanceName: string, backend: string, model: string,
3125
+ /** The provider the backend will run on (default: this instance's own, else the fleet's). */
3126
+ opts?: {
3127
+ provider: string | null;
3128
+ }): {
3129
+ ok: true;
3130
+ } | {
3131
+ ok: false;
3132
+ choices: string[];
3133
+ };
3134
+ /**
3135
+ * #1807 review r2: the model codex's next launch of this instance runs. Every launch's writeConfig copies the SHARED
3136
+ * config.toml into the instance's codex home first, so that source decides — not the home's copy from an earlier
3137
+ * launch. Read-only; a model chosen here (`-c model=…`) outranks it; a project file that could change it, unproven.
3138
+ */
3139
+ private prospectiveCodexModel;
3140
+ /** #1811: whether a launch of `backend` here would pass a level: the same gate its builder applies. */
3141
+ private launchEffortGate;
3142
+ /** Installed the way the launch finds a CLI (resolveBinary): on PATH or in a known install directory. */
3143
+ private backendInstalledHere;
3144
+ /** The models `/model` would offer on a backend: the cached CLI env, else (live) a bounded probe. Never throws. */
3145
+ private backendModelOptions;
3146
+ /**
3147
+ * #1806 review: the instance a `/backend` was asked about is still this config entry — not one deleted and created
3148
+ * again under the same name, or replaced by a Settings edit (both put a new object there), stopped or not.
3149
+ */
3150
+ private backendTargetIs;
3151
+ /** `/backend` is for fleet.yaml instances: update_instance_config does not manage a ClassicBot agent. */
3152
+ private backendCommandRefusal;
3153
+ /**
3154
+ * Apply a confirmed `/backend`: judged again first (a menu lives a minute — the backend may have moved, a CLI been
3155
+ * removed), then update_instance_config's write: backend, model and effort at once, refused and rolled back whole
3156
+ * (its credential-profile login gate included), then one fresh relaunch of a running instance.
3157
+ */
3158
+ applyBackendSwitch(instanceName: string, args: readonly string[], from: string, stillCurrent: () => boolean): Promise<string>;
3159
+ /** A step's buttons: index callbacks (a model id can be longer than Telegram's 64-byte callback data allows). */
3160
+ private backendStepButtons;
3161
+ /**
3162
+ * Show a `/backend` step (a choice, or the confirmation) where the command was given: Discord edits its interaction
3163
+ * reply; Telegram retires the previous step's keyboard and posts the next. One pending entry per step, under a fresh
3164
+ * nonce: a click on an older step finds nothing.
3165
+ */
3166
+ private presentBackendStep;
3167
+ /** Close a `/backend` menu with a last word: its buttons go (Telegram edits them away), the text stays. Returns where it was said. */
3168
+ private endBackendMenu;
3169
+ /** Start `/backend` for a fleet instance from Discord or Telegram; the caller has checked the channel admin. */
3170
+ private beginBackendCommand;
3171
+ /** `/backend` slash handler: channel admin, as `/model`. Options or typed text give the direct form. */
3172
+ private handleBackendSlash;
3173
+ /** Telegram `/backend` in a fleet topic (topic-commands) or a ClassicBot chat; the caller has checked the admin. */
3174
+ runBackendCommand(instanceName: string, text: string, userId: string, channelId: string, adapter: ChannelAdapter, chatId: string, threadId?: string, adapterId?: string): Promise<void>;
3175
+ /** Consume a `/backend` click: the next step, or on the confirmation the switch itself. True for every backend-select id. */
3176
+ private handleBackendSelection;
2939
3177
  /** Read recent chat log for agent context */
2940
3178
  private getRecentChatLog;
2941
3179
  /**