@songsid/agend 2.2.0-beta.9 → 2.2.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 (226) hide show
  1. package/README.md +40 -24
  2. package/README.zh-TW.md +40 -24
  3. package/dist/agent-endpoint.js +3 -0
  4. package/dist/agent-endpoint.js.map +1 -1
  5. package/dist/agent-whats-new.js +7 -1
  6. package/dist/agent-whats-new.js.map +1 -1
  7. package/dist/auth-api.d.ts +3 -1
  8. package/dist/auth-api.js +15 -1
  9. package/dist/auth-api.js.map +1 -1
  10. package/dist/backend/antigravity.d.ts +33 -0
  11. package/dist/backend/antigravity.js +126 -18
  12. package/dist/backend/antigravity.js.map +1 -1
  13. package/dist/backend/claude-code.d.ts +3 -0
  14. package/dist/backend/claude-code.js +9 -0
  15. package/dist/backend/claude-code.js.map +1 -1
  16. package/dist/backend/codex-metadata.d.ts +33 -0
  17. package/dist/backend/codex-metadata.js +122 -18
  18. package/dist/backend/codex-metadata.js.map +1 -1
  19. package/dist/backend/codex.d.ts +3 -0
  20. package/dist/backend/codex.js +17 -1
  21. package/dist/backend/codex.js.map +1 -1
  22. package/dist/backend/effort-metadata.d.ts +37 -1
  23. package/dist/backend/effort-metadata.js +86 -15
  24. package/dist/backend/effort-metadata.js.map +1 -1
  25. package/dist/backend/grok.d.ts +3 -0
  26. package/dist/backend/grok.js +9 -0
  27. package/dist/backend/grok.js.map +1 -1
  28. package/dist/backend/kiro.d.ts +3 -1
  29. package/dist/backend/kiro.js +7 -3
  30. package/dist/backend/kiro.js.map +1 -1
  31. package/dist/backend/launch-effort.d.ts +61 -0
  32. package/dist/backend/launch-effort.js +170 -0
  33. package/dist/backend/launch-effort.js.map +1 -0
  34. package/dist/backend/types.d.ts +24 -0
  35. package/dist/backend/types.js +12 -1
  36. package/dist/backend/types.js.map +1 -1
  37. package/dist/backend-command.d.ts +91 -0
  38. package/dist/backend-command.js +122 -0
  39. package/dist/backend-command.js.map +1 -0
  40. package/dist/channel/adapters/discord.d.ts +12 -0
  41. package/dist/channel/adapters/discord.js +49 -2
  42. package/dist/channel/adapters/discord.js.map +1 -1
  43. package/dist/channel/adapters/telegram.d.ts +18 -0
  44. package/dist/channel/adapters/telegram.js +24 -3
  45. package/dist/channel/adapters/telegram.js.map +1 -1
  46. package/dist/channel/mcp-tools.js +2 -0
  47. package/dist/channel/mcp-tools.js.map +1 -1
  48. package/dist/channel/tool-router.d.ts +2 -0
  49. package/dist/channel/tool-router.js +1 -1
  50. package/dist/channel/tool-router.js.map +1 -1
  51. package/dist/channel/types.d.ts +16 -0
  52. package/dist/cli.js +124 -24
  53. package/dist/cli.js.map +1 -1
  54. package/dist/command-table.d.ts +2 -2
  55. package/dist/command-table.js +5 -2
  56. package/dist/command-table.js.map +1 -1
  57. package/dist/compact-watch.d.ts +86 -0
  58. package/dist/compact-watch.js +288 -0
  59. package/dist/compact-watch.js.map +1 -0
  60. package/dist/config-validator.js +39 -0
  61. package/dist/config-validator.js.map +1 -1
  62. package/dist/config.d.ts +1 -0
  63. package/dist/config.js +2 -1
  64. package/dist/config.js.map +1 -1
  65. package/dist/daemon.d.ts +11 -0
  66. package/dist/daemon.js +179 -18
  67. package/dist/daemon.js.map +1 -1
  68. package/dist/delivery-outbox.d.ts +8 -1
  69. package/dist/delivery-outbox.js +6 -2
  70. package/dist/delivery-outbox.js.map +1 -1
  71. package/dist/doctor.js +7 -0
  72. package/dist/doctor.js.map +1 -1
  73. package/dist/fleet-context.d.ts +7 -0
  74. package/dist/fleet-manager.d.ts +158 -9
  75. package/dist/fleet-manager.js +827 -118
  76. package/dist/fleet-manager.js.map +1 -1
  77. package/dist/forged-envelope-scan.d.ts +4 -3
  78. package/dist/forged-envelope-scan.js +4 -3
  79. package/dist/forged-envelope-scan.js.map +1 -1
  80. package/dist/general-knowledge/skills/model-discovery/SKILL.md +4 -1
  81. package/dist/install-lock.d.ts +18 -1
  82. package/dist/install-lock.js +30 -3
  83. package/dist/install-lock.js.map +1 -1
  84. package/dist/instance-avatar.d.ts +5 -4
  85. package/dist/instance-avatar.js +12 -8
  86. package/dist/instance-avatar.js.map +1 -1
  87. package/dist/instructions.js +2 -2
  88. package/dist/instructions.js.map +1 -1
  89. package/dist/kiro-compact-pane.d.ts +38 -0
  90. package/dist/kiro-compact-pane.js +57 -0
  91. package/dist/kiro-compact-pane.js.map +1 -0
  92. package/dist/launchd-handoff.d.ts +43 -0
  93. package/dist/launchd-handoff.js +56 -0
  94. package/dist/launchd-handoff.js.map +1 -0
  95. package/dist/locale.js +202 -30
  96. package/dist/locale.js.map +1 -1
  97. package/dist/log-service.js +10 -2
  98. package/dist/log-service.js.map +1 -1
  99. package/dist/login-shell.d.ts +21 -0
  100. package/dist/login-shell.js +98 -0
  101. package/dist/login-shell.js.map +1 -0
  102. package/dist/outbound-handlers.d.ts +27 -0
  103. package/dist/outbound-handlers.js +120 -36
  104. package/dist/outbound-handlers.js.map +1 -1
  105. package/dist/outbound-schemas.d.ts +12 -0
  106. package/dist/outbound-schemas.js +15 -4
  107. package/dist/outbound-schemas.js.map +1 -1
  108. package/dist/provider-probe.d.ts +29 -0
  109. package/dist/provider-probe.js +198 -2
  110. package/dist/provider-probe.js.map +1 -1
  111. package/dist/public-web-gateway.d.ts +2 -0
  112. package/dist/public-web-gateway.js +11 -1
  113. package/dist/public-web-gateway.js.map +1 -1
  114. package/dist/quickstart-api.d.ts +1 -1
  115. package/dist/quickstart-api.js +8 -6
  116. package/dist/quickstart-api.js.map +1 -1
  117. package/dist/quickstart.d.ts +12 -0
  118. package/dist/quickstart.js +36 -6
  119. package/dist/quickstart.js.map +1 -1
  120. package/dist/reply-buttons-controller.d.ts +86 -5
  121. package/dist/reply-buttons-controller.js +271 -7
  122. package/dist/reply-buttons-controller.js.map +1 -1
  123. package/dist/reply-buttons.d.ts +48 -3
  124. package/dist/reply-buttons.js +105 -10
  125. package/dist/reply-buttons.js.map +1 -1
  126. package/dist/reply-polls.d.ts +85 -0
  127. package/dist/reply-polls.js +154 -0
  128. package/dist/reply-polls.js.map +1 -0
  129. package/dist/restart-guard.d.ts +6 -3
  130. package/dist/restart-guard.js +6 -3
  131. package/dist/restart-guard.js.map +1 -1
  132. package/dist/restart-progress.d.ts +0 -2
  133. package/dist/restart-progress.js +0 -2
  134. package/dist/restart-progress.js.map +1 -1
  135. package/dist/sd-notify.d.ts +22 -1
  136. package/dist/sd-notify.js +63 -10
  137. package/dist/sd-notify.js.map +1 -1
  138. package/dist/service-activation.d.ts +15 -7
  139. package/dist/service-activation.js +42 -26
  140. package/dist/service-activation.js.map +1 -1
  141. package/dist/service-installer.d.ts +24 -0
  142. package/dist/service-installer.js +49 -1
  143. package/dist/service-installer.js.map +1 -1
  144. package/dist/service-plan.d.ts +11 -0
  145. package/dist/service-plan.js +23 -0
  146. package/dist/service-plan.js.map +1 -1
  147. package/dist/systemd-peer-bus.d.ts +95 -0
  148. package/dist/systemd-peer-bus.js +430 -0
  149. package/dist/systemd-peer-bus.js.map +1 -0
  150. package/dist/systemd-runtime.d.ts +27 -1
  151. package/dist/systemd-runtime.js +69 -7
  152. package/dist/systemd-runtime.js.map +1 -1
  153. package/dist/tool-permissions.js +3 -3
  154. package/dist/tool-permissions.js.map +1 -1
  155. package/dist/topic-commands.d.ts +68 -2
  156. package/dist/topic-commands.js +141 -27
  157. package/dist/topic-commands.js.map +1 -1
  158. package/dist/transcript-jsonl.d.ts +7 -2
  159. package/dist/transcript-jsonl.js +13 -7
  160. package/dist/transcript-jsonl.js.map +1 -1
  161. package/dist/transcript-sources.js +6 -1
  162. package/dist/transcript-sources.js.map +1 -1
  163. package/dist/types.d.ts +8 -0
  164. package/dist/ui/chat-commands.js +1 -0
  165. package/dist/ui/chat-render.js +55 -10
  166. package/dist/ui/chat-store.js +69 -5
  167. package/dist/ui/chat-strings.js +28 -16
  168. package/dist/ui/chat-thread.js +132 -14
  169. package/dist/ui/chat-tour.js +17 -14
  170. package/dist/ui/panel-chat.js +16 -10
  171. package/dist/ui/panel-fleet.js +15 -2
  172. package/dist/ui/panel-log.js +4 -4
  173. package/dist/ui/panel-needs.js +10 -7
  174. package/dist/ui/panel-settings.js +58 -7
  175. package/dist/ui/settings-dialogs.js +11 -6
  176. package/dist/ui/settings-model.js +3 -1
  177. package/dist/ui/settings-strings.js +24 -10
  178. package/dist/ui/settings-token.js +7 -0
  179. package/dist/ui/settings-wizard.js +5 -3
  180. package/dist/ui/shared/app-i18n.js +1 -1
  181. package/dist/ui/shared/app-stream.js +4 -1
  182. package/dist/ui/shared/app.css +52 -10
  183. package/dist/ui/shared/header-tools.js +34 -14
  184. package/dist/ui/shared/instance-switch.js +5 -2
  185. package/dist/ui/shared/panel-view.js +15 -4
  186. package/dist/ui/shared/signin.js +15 -9
  187. package/dist/ui/shared/ui-icons.js +1 -0
  188. package/dist/ui/shared/view-strings.js +10 -2
  189. package/dist/ui/signin.html +8 -3
  190. package/dist/update-check.d.ts +31 -0
  191. package/dist/update-check.js +47 -0
  192. package/dist/update-check.js.map +1 -1
  193. package/dist/update-launch.d.ts +48 -1
  194. package/dist/update-launch.js +159 -5
  195. package/dist/update-launch.js.map +1 -1
  196. package/dist/usage/providers.d.ts +28 -8
  197. package/dist/usage/providers.js +96 -41
  198. package/dist/usage/providers.js.map +1 -1
  199. package/dist/view-api.js +26 -9
  200. package/dist/view-api.js.map +1 -1
  201. package/dist/web-api.d.ts +44 -2
  202. package/dist/web-api.js +265 -57
  203. package/dist/web-api.js.map +1 -1
  204. package/dist/web-chat-history.d.ts +26 -1
  205. package/dist/web-chat-history.js +47 -8
  206. package/dist/web-chat-history.js.map +1 -1
  207. package/dist/web-commands.d.ts +39 -3
  208. package/dist/web-commands.js +22 -5
  209. package/dist/web-commands.js.map +1 -1
  210. package/dist/web-login.d.ts +14 -0
  211. package/dist/web-login.js +4 -2
  212. package/dist/web-login.js.map +1 -1
  213. package/dist/web-prefs.d.ts +18 -0
  214. package/dist/web-prefs.js +36 -4
  215. package/dist/web-prefs.js.map +1 -1
  216. package/dist/web-profile.d.ts +32 -0
  217. package/dist/web-profile.js +132 -0
  218. package/dist/web-profile.js.map +1 -0
  219. package/dist/web-session.d.ts +14 -0
  220. package/dist/web-session.js +10 -0
  221. package/dist/web-session.js.map +1 -1
  222. package/dist/web-upload.d.ts +119 -4
  223. package/dist/web-upload.js +252 -39
  224. package/dist/web-upload.js.map +1 -1
  225. package/launcher/install-admission.cjs +61 -6
  226. package/package.json +3 -3
@@ -57,6 +57,8 @@ 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 { type WebAccount } from "./web-profile.js";
61
+ import type { WebPerson as WebPersonView } from "./web-api.js";
60
62
  import { ReplyButtonsController } from "./reply-buttons-controller.js";
61
63
  import { WebFileLedger } from "./web-upload.js";
62
64
  import { type CachedImage } from "./web-images.js";
@@ -359,6 +361,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
359
361
  /** In-flight /effort selections, same coordinator shape as pendingModelSelects. */
360
362
  private pendingEffortSelects;
361
363
  private pendingModelSelects;
364
+ /** #1806: in-flight /backend steps, keyed by nonce (see handleBackendSelection). */
365
+ private pendingBackendSelects;
362
366
  /** nonce → pending button prompt (hang restart, interactive assist, clean-exit restart). */
363
367
  private pendingNonceButtons;
364
368
  /** #1386 "Needs you": the list, its live chat messages and Acknowledge. Started with the fleet (finishStartup). */
@@ -435,7 +439,6 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
435
439
  private updateProgressTimer;
436
440
  private updateProgressEditRunning;
437
441
  private lastUpdateProgressText;
438
- private updateCompletionTipText;
439
442
  /**
440
443
  * #1660: an adopted update whose retire outcome is still owed. The
441
444
  * completion summary was (or will be) posted; this watch appends the
@@ -481,6 +484,34 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
481
484
  readonly seenUsers: SeenUsers;
482
485
  private webPrefsStore?;
483
486
  /** #1665: the web preferences kept on the host (<home>/web-prefs.json), read on first use. */
487
+ /**
488
+ * #1827: a web person as agents and chats see them. Signed in as an account (a sign-in code DMed to it): that
489
+ * account's user id — still `via web`, and only for recognition — and the name they chose, else their account's name
490
+ * at sign-in (made safe). Otherwise (an `agend web` session): "web-user", as before, under a name the operator may set.
491
+ * Names are checked again now: one an instance or bot has taken since reads as the next choice down.
492
+ */
493
+ webPerson(owner?: WebAccount): WebPersonView;
494
+ /** #1827: set (null: clear — back to their account's name) a web person's own name; validated in full. */
495
+ setWebPersonName(owner: WebAccount | undefined, raw: unknown): {
496
+ ok: true;
497
+ person: WebPersonView;
498
+ } | {
499
+ ok: false;
500
+ status: number;
501
+ error: string;
502
+ };
503
+ /** #1827 (auth-api): a sign-in as this account — its display name then is the web name it starts with. */
504
+ noteWebSignIn(account: {
505
+ adapterId: string;
506
+ userId: string;
507
+ username?: string;
508
+ }): void;
509
+ /**
510
+ * #1827: a name that belongs to something here — an instance (or ClassicBot room), its display name, a bot. On the web
511
+ * send path: it never throws (a lookup that fails reserves nothing; the name was checked in full when it was set).
512
+ */
513
+ private webNameReserved;
514
+ private webNameTaken;
484
515
  get webPrefs(): WebPrefsStore;
485
516
  /**
486
517
  * Read from disk on every access rather than cached at startup: `agend
@@ -543,6 +574,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
543
574
  */
544
575
  replyButtons(): ReplyButtonsController | null;
545
576
  private replyButtonsStore;
577
+ /**
578
+ * #1823: a closed poll's results go to its instance through the delivery outbox, as a system notice keyed by the
579
+ * poll: durable (held until the instance can take it) and admitted once, however often this is asked. Addressed to
580
+ * the poll's chat, so the instance's answer (the right option, the scores) goes there.
581
+ */
582
+ private admitPollResults;
546
583
  /**
547
584
  * #1266: who may answer a reply's buttons on a platform — whoever may message that instance there: in a ClassicBot
548
585
  * room anyone there (as a typed message), elsewhere someone the sending connection lets speak (#754/#1148), never a
@@ -818,6 +855,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
818
855
  /** #1218: the Log tab's on-demand service — made on first use; with `web.log_tab` off it answers off and does nothing. */
819
856
  private logService;
820
857
  private get log();
858
+ /** Board 003648ac: a web /compact followed to its end, from the transcript the Log reads (none: nothing to follow). */
859
+ private compactWatchService;
860
+ private get compactWatch();
821
861
  /** #1218: GET /ui/steps — an instance's steps, read on demand (null: no such instance). */
822
862
  logSteps(name: string, q: LogQuery): Promise<LogAnswer | null>;
823
863
  /**
@@ -901,7 +941,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
901
941
  * or a rebound adapter is never posted through a stale route. A copy
902
942
  * already in flight may still land late — the contract permits that.
903
943
  */
904
- sendClassicWebEcho(instance: string, text: string): Promise<number>;
944
+ /** `sender` (#1827): the web person's name, as the room log records them ("web-user" when none). */
945
+ sendClassicWebEcho(instance: string, text: string, sender?: string): Promise<number>;
905
946
  /**
906
947
  * #1666: a delivered web chat message starts the same cancel/progress lifecycle in the instance's topic as a platform
907
948
  * inbound (afterUserInboundDelivered): the same bubble, ticker and retire rules. Not its ✅ tracking — the web message
@@ -954,6 +995,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
954
995
  isFleetAdmin(userId: string, adapterId?: string): boolean;
955
996
  /** Whether this adapter has any fleet admin at all (an empty allowlist means the admin commands are off). */
956
997
  hasFleetAdmins(adapterId?: string): boolean;
998
+ /**
999
+ * Where this adapter's fleet-admin list is in fleet.yaml, as the operator wrote it, for the "disabled" replies:
1000
+ * `channel.access.allowed_users` (the single-channel form), else the `channels:` entry — by its `id:`, or its
1001
+ * `type:` when it has none. Read from the raw file: loading turns `channel:` into `channels` and fills in ids.
1002
+ */
1003
+ adminListKey(adapterId?: string): string;
957
1004
  /**
958
1005
  * The one question the privileged commands (/update, /doctor, /dashboard, /collab) ask: may THIS caller,
959
1006
  * through THIS adapter, run it. `disabled` is "nobody can" — an empty list — and is told apart from
@@ -1782,6 +1829,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1782
1829
  saveFleetConfig(explicitPatches?: RawConfigPatch[]): void;
1783
1830
  /** Why the config written to `candidate` must not replace fleet.yaml, or null: it does not load, or it adds errors. */
1784
1831
  private savedFleetConfigProblem;
1832
+ /**
1833
+ * #1874 follow-up: the validator's warnings, once per start, in daemon.log — a setting fleet.yaml has that AgEnD
1834
+ * ignores (e.g. `web.access`) is otherwise silent unless someone runs `agend validate`.
1835
+ */
1836
+ private logConfigWarningsAtStartup;
1785
1837
  /** One-time upgrade migration; invalid YAML is never rewritten. */
1786
1838
  private slimFleetConfigAtStartup;
1787
1839
  private writeFleetConfigBackup;
@@ -1865,9 +1917,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1865
1917
  private webImageCaches;
1866
1918
  private webImageCache;
1867
1919
  /**
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.
1920
+ * The bots instances and ClassicBot rooms speak through, by connections configured now (a connection removed from
1921
+ * fleet.yaml is nobody's, whatever an instance still names — #1635 review). `own`: instance → its own bot (answering
1922
+ * 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,
1923
+ * or, with none configured for it, the primary.
1870
1924
  */
1925
+ private webBots;
1926
+ /** instance → the connection that is its own bot (see webBots). */
1871
1927
  private ownBots;
1872
1928
  /**
1873
1929
  * 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 +1939,15 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1883
1939
  private webAccent;
1884
1940
  /** The cache key of an own bot's avatar, and its loader (which refuses an answer from a bot no longer there). */
1885
1941
  private botAvatarSource;
1886
- /** One instance's avatar and ring for the status frame. Synchronous: what is cached now; fetches run behind. */
1942
+ /**
1943
+ * One instance's avatar and ring for the status frame. Synchronous: what is cached now; fetches run behind. The bot
1944
+ * is its own, else the one it speaks through (#1867) — one cache entry per bot, so a shared bot is fetched once.
1945
+ */
1887
1946
  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. */
1947
+ /**
1948
+ * GET /ui/img/bot|avatar/<key>: what is cached, never a fetch. Only a connection some instance or room speaks
1949
+ * through (#1867), or a known instance's upload.
1950
+ */
1889
1951
  webImage(kind: "bot" | "avatar", key: string): CachedImage | null;
1890
1952
  /**
1891
1953
  * #1682 GET /ui/mentions: names for the mention ids a page found in what it rendered — never a Discord request; in order:
@@ -2256,10 +2318,26 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2256
2318
  * The caller has passed the /ui gate (session, same origin, CSRF). Here: the prompt must be one offered
2257
2319
  * on the dashboard, about the instance the page named, and the action one of its own buttons.
2258
2320
  */
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<{
2321
+ /** #1823: close_poll — `instance` closes one of its own polls before the deadline. */
2322
+ closePollEarly(instance: string, id: string): Promise<{
2323
+ ok: true;
2324
+ voted: number;
2325
+ } | {
2326
+ ok: false;
2327
+ error: string;
2328
+ }>;
2329
+ /**
2330
+ * #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
2331
+ * poll (#1823) it is `voter`'s vote: the page's session.
2332
+ */
2333
+ clickWebReplyButton(instance: string, id: string, index: number, voter?: {
2334
+ key: string;
2335
+ userId: string;
2336
+ name: string;
2337
+ }): Promise<{
2261
2338
  status: 200 | 400 | 403 | 409;
2262
2339
  error?: string;
2340
+ options?: number[];
2263
2341
  }>;
2264
2342
  clickWebPrompt(instance: string, nonce: string, action: string): Promise<{
2265
2343
  status: 200 | 400 | 403 | 409;
@@ -2289,6 +2367,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2289
2367
  * synchronous; they never probe the pane.
2290
2368
  */
2291
2369
  private clearTargetFence;
2370
+ /** #1806: the web's /backend confirmations — one per question, used once, for the arguments and backend asked about. */
2371
+ private readonly webBackendTokens;
2292
2372
  /** #1269: the web's /clear confirmations — one token per question, used once, for the instance as it was asked about. */
2293
2373
  private readonly webClearTokens;
2294
2374
  /** #1269: an instance's chat command from the web chat (web-commands.ts); `publicLink`: a gateway request. */
@@ -2299,6 +2379,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2299
2379
  confirm?: string;
2300
2380
  }, opts: {
2301
2381
  publicLink: boolean;
2382
+ person?: Pick<WebPersonView, "userId" | "name">;
2302
2383
  }): Promise<WebCommandResult>;
2303
2384
  /** Consume `/clear` Confirm/Cancel exactly once; only Confirm reaches IPC. */
2304
2385
  private handleClearConfirmation;
@@ -2641,9 +2722,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2641
2722
  * The absolute path a fresh login shell resolves `binary` to, or null. Only
2642
2723
  * a real executable file counts: `command -v` also answers with an alias
2643
2724
  * definition or a function name, neither of which a spawn could run.
2725
+ * Async (runOnLoginShell): a login file that backgrounds a process holding the shell's output once froze the fleet loop here.
2644
2726
  */
2645
2727
  private locateBinaryOnLoginShell;
2646
- private locateBinaryOnLoginShellSync;
2647
2728
  /**
2648
2729
  * #1092: the binary in one of the directories its own installer installs to,
2649
2730
  * when no login shell can see it (the installer recorded its PATH in an
@@ -2903,6 +2984,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2903
2984
  effortStrategyFor(instanceName: string): "runtime" | "restart" | "unsupported";
2904
2985
  /** Effort levels this instance's backend actually accepts (empty = unsupported). */
2905
2986
  effortLevelsFor(instanceName: string): string[];
2987
+ /** The instance's backend's effort metadata; agy's levels are its model's (#1825), the one the instance runs. */
2988
+ private instanceEffortMetadata;
2906
2989
  /** Configured effort for an instance: per-instance, else fleet default, else none. */
2907
2990
  resolveInstanceEffort(instanceName: string): {
2908
2991
  effort: string | null;
@@ -2936,6 +3019,72 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2936
3019
  * a switch saves the round trip of asking. Empty when the backend has none.
2937
3020
  */
2938
3021
  private effortSuffix;
3022
+ /** The steps' view of this fleet (backend-command.ts). `live`: a missing or stale model list may be probed (not on the web). */
3023
+ private backendCommandDeps;
3024
+ /**
3025
+ * `/effort`'s levels for a backend this instance may move to, for the model that will run there (codex's levels are
3026
+ * per model; null: its configured default). Empty: it has no effort setting. A file read, never a CLI.
3027
+ */
3028
+ backendEffortLevels(instanceName: string, backend: string, model?: string | null): string[];
3029
+ /**
3030
+ * #1808: whether a backend takes this model name — the one rule for /backend and update_instance_config's switch.
3031
+ * The name must be one its launch line can carry (modelNameCarried); then its offered list (the cached CLI env), and
3032
+ * claude-code's known names (without this instance's configured model, which belongs to the backend being left).
3033
+ * With no list known, the backend's usual name pattern decides.
3034
+ */
3035
+ backendModelVerdict(instanceName: string, backend: string, model: string,
3036
+ /** The provider the backend will run on (default: this instance's own, else the fleet's). */
3037
+ opts?: {
3038
+ provider: string | null;
3039
+ }): {
3040
+ ok: true;
3041
+ } | {
3042
+ ok: false;
3043
+ choices: string[];
3044
+ };
3045
+ /**
3046
+ * #1807 review r2: the model codex's next launch of this instance runs. Every launch's writeConfig copies the SHARED
3047
+ * config.toml into the instance's codex home first, so that source decides — not the home's copy from an earlier
3048
+ * launch. Read-only; a model chosen here (`-c model=…`) outranks it; a project file that could change it, unproven.
3049
+ */
3050
+ private prospectiveCodexModel;
3051
+ /** #1811: whether a launch of `backend` here would pass a level: the same gate its builder applies. */
3052
+ private launchEffortGate;
3053
+ /** Installed the way the launch finds a CLI (resolveBinary): on PATH or in a known install directory. */
3054
+ private backendInstalledHere;
3055
+ /** The models `/model` would offer on a backend: the cached CLI env, else (live) a bounded probe. Never throws. */
3056
+ private backendModelOptions;
3057
+ /**
3058
+ * #1806 review: the instance a `/backend` was asked about is still this config entry — not one deleted and created
3059
+ * again under the same name, or replaced by a Settings edit (both put a new object there), stopped or not.
3060
+ */
3061
+ private backendTargetIs;
3062
+ /** `/backend` is for fleet.yaml instances: update_instance_config does not manage a ClassicBot agent. */
3063
+ private backendCommandRefusal;
3064
+ /**
3065
+ * Apply a confirmed `/backend`: judged again first (a menu lives a minute — the backend may have moved, a CLI been
3066
+ * removed), then update_instance_config's write: backend, model and effort at once, refused and rolled back whole
3067
+ * (its credential-profile login gate included), then one fresh relaunch of a running instance.
3068
+ */
3069
+ applyBackendSwitch(instanceName: string, args: readonly string[], from: string, stillCurrent: () => boolean): Promise<string>;
3070
+ /** A step's buttons: index callbacks (a model id can be longer than Telegram's 64-byte callback data allows). */
3071
+ private backendStepButtons;
3072
+ /**
3073
+ * Show a `/backend` step (a choice, or the confirmation) where the command was given: Discord edits its interaction
3074
+ * reply; Telegram retires the previous step's keyboard and posts the next. One pending entry per step, under a fresh
3075
+ * nonce: a click on an older step finds nothing.
3076
+ */
3077
+ private presentBackendStep;
3078
+ /** Close a `/backend` menu with a last word: its buttons go (Telegram edits them away), the text stays. Returns where it was said. */
3079
+ private endBackendMenu;
3080
+ /** Start `/backend` for a fleet instance from Discord or Telegram; the caller has checked the channel admin. */
3081
+ private beginBackendCommand;
3082
+ /** `/backend` slash handler: channel admin, as `/model`. Options or typed text give the direct form. */
3083
+ private handleBackendSlash;
3084
+ /** Telegram `/backend` in a fleet topic (topic-commands) or a ClassicBot chat; the caller has checked the admin. */
3085
+ runBackendCommand(instanceName: string, text: string, userId: string, channelId: string, adapter: ChannelAdapter, chatId: string, threadId?: string, adapterId?: string): Promise<void>;
3086
+ /** Consume a `/backend` click: the next step, or on the confirmation the switch itself. True for every backend-select id. */
3087
+ private handleBackendSelection;
2939
3088
  /** Read recent chat log for agent context */
2940
3089
  private getRecentChatLog;
2941
3090
  /**