@songsid/agend 2.2.0-alpha.1 → 2.2.0-alpha.3

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 (317) hide show
  1. package/README.md +6 -4
  2. package/README.zh-TW.md +6 -4
  3. package/dist/agent-cli.js +6 -1
  4. package/dist/agent-cli.js.map +1 -1
  5. package/dist/agent-endpoint.d.ts +4 -1
  6. package/dist/agent-endpoint.js +82 -14
  7. package/dist/agent-endpoint.js.map +1 -1
  8. package/dist/agent-token-header.d.ts +13 -0
  9. package/dist/agent-token-header.js +16 -0
  10. package/dist/agent-token-header.js.map +1 -0
  11. package/dist/atomic-write.d.ts +21 -0
  12. package/dist/atomic-write.js +65 -0
  13. package/dist/atomic-write.js.map +1 -0
  14. package/dist/auth-api.js +2 -0
  15. package/dist/auth-api.js.map +1 -1
  16. package/dist/backend/antigravity.js +4 -3
  17. package/dist/backend/antigravity.js.map +1 -1
  18. package/dist/backend/codex.d.ts +7 -0
  19. package/dist/backend/codex.js +7 -0
  20. package/dist/backend/codex.js.map +1 -1
  21. package/dist/backend/grok.js +1 -1
  22. package/dist/backend/grok.js.map +1 -1
  23. package/dist/backend/kiro.d.ts +7 -0
  24. package/dist/backend/kiro.js +82 -33
  25. package/dist/backend/kiro.js.map +1 -1
  26. package/dist/backend/muse.d.ts +7 -0
  27. package/dist/backend/muse.js +8 -1
  28. package/dist/backend/muse.js.map +1 -1
  29. package/dist/backend/types.d.ts +12 -0
  30. package/dist/backend/types.js.map +1 -1
  31. package/dist/binary-probe.d.ts +80 -0
  32. package/dist/binary-probe.js +182 -0
  33. package/dist/binary-probe.js.map +1 -0
  34. package/dist/cache-analysis.d.ts +92 -0
  35. package/dist/cache-analysis.js +147 -0
  36. package/dist/cache-analysis.js.map +1 -0
  37. package/dist/cache-ledger.d.ts +108 -0
  38. package/dist/cache-ledger.js +230 -0
  39. package/dist/cache-ledger.js.map +1 -0
  40. package/dist/cache-prices.d.ts +32 -0
  41. package/dist/cache-prices.js +73 -0
  42. package/dist/cache-prices.js.map +1 -0
  43. package/dist/cache-scan.d.ts +39 -0
  44. package/dist/cache-scan.js +115 -0
  45. package/dist/cache-scan.js.map +1 -0
  46. package/dist/cache-service.d.ts +131 -0
  47. package/dist/cache-service.js +452 -0
  48. package/dist/cache-service.js.map +1 -0
  49. package/dist/channel/adapters/discord.d.ts +5 -1
  50. package/dist/channel/adapters/discord.js +56 -11
  51. package/dist/channel/adapters/discord.js.map +1 -1
  52. package/dist/channel/adapters/telegram.d.ts +38 -1
  53. package/dist/channel/adapters/telegram.js +82 -0
  54. package/dist/channel/adapters/telegram.js.map +1 -1
  55. package/dist/channel/mcp-tools.js +1 -1
  56. package/dist/channel/mcp-tools.js.map +1 -1
  57. package/dist/channel/tool-router.d.ts +8 -1
  58. package/dist/channel/tool-router.js +4 -2
  59. package/dist/channel/tool-router.js.map +1 -1
  60. package/dist/channel/types.d.ts +21 -0
  61. package/dist/cli-entry.d.ts +19 -0
  62. package/dist/cli-entry.js +36 -0
  63. package/dist/cli-entry.js.map +1 -0
  64. package/dist/cli.js +376 -54
  65. package/dist/cli.js.map +1 -1
  66. package/dist/connection-secrets.d.ts +5 -0
  67. package/dist/connection-secrets.js.map +1 -1
  68. package/dist/cpu-profile.js +50 -0
  69. package/dist/cpu-profile.js.map +1 -1
  70. package/dist/daemon.d.ts +18 -0
  71. package/dist/daemon.js +256 -63
  72. package/dist/daemon.js.map +1 -1
  73. package/dist/delivery-outbox.d.ts +1 -0
  74. package/dist/delivery-outbox.js +12 -0
  75. package/dist/delivery-outbox.js.map +1 -1
  76. package/dist/discord-permissions.d.ts +33 -0
  77. package/dist/discord-permissions.js +42 -0
  78. package/dist/discord-permissions.js.map +1 -0
  79. package/dist/env-file.d.ts +11 -0
  80. package/dist/env-file.js +27 -0
  81. package/dist/env-file.js.map +1 -0
  82. package/dist/event-log.d.ts +4 -1
  83. package/dist/event-log.js +6 -3
  84. package/dist/event-log.js.map +1 -1
  85. package/dist/fleet-context.d.ts +5 -0
  86. package/dist/fleet-context.js.map +1 -1
  87. package/dist/fleet-control-audit.d.ts +5 -0
  88. package/dist/fleet-control-audit.js +7 -0
  89. package/dist/fleet-control-audit.js.map +1 -1
  90. package/dist/fleet-level-config.d.ts +8 -1
  91. package/dist/fleet-level-config.js +53 -0
  92. package/dist/fleet-level-config.js.map +1 -1
  93. package/dist/fleet-manager.d.ts +122 -7
  94. package/dist/fleet-manager.js +871 -152
  95. package/dist/fleet-manager.js.map +1 -1
  96. package/dist/fleet-stop-budget.d.ts +22 -0
  97. package/dist/fleet-stop-budget.js +95 -0
  98. package/dist/fleet-stop-budget.js.map +1 -0
  99. package/dist/full-restart.js +2 -3
  100. package/dist/full-restart.js.map +1 -1
  101. package/dist/general-knowledge/skills/persona-emoji/SKILL.md +3 -1
  102. package/dist/install-lock.d.ts +49 -0
  103. package/dist/install-lock.js +200 -0
  104. package/dist/install-lock.js.map +1 -0
  105. package/dist/instance-config-impact.js +3 -2
  106. package/dist/instance-config-impact.js.map +1 -1
  107. package/dist/kiro-transcript-lane.d.ts +8 -4
  108. package/dist/kiro-transcript-lane.js +66 -44
  109. package/dist/kiro-transcript-lane.js.map +1 -1
  110. package/dist/locale.js +96 -0
  111. package/dist/locale.js.map +1 -1
  112. package/dist/next-steps.d.ts +5 -0
  113. package/dist/next-steps.js +26 -0
  114. package/dist/next-steps.js.map +1 -0
  115. package/dist/outbound-handlers.js +8 -0
  116. package/dist/outbound-handlers.js.map +1 -1
  117. package/dist/outbound-schemas.d.ts +4 -0
  118. package/dist/outbound-schemas.js +7 -2
  119. package/dist/outbound-schemas.js.map +1 -1
  120. package/dist/outbox-open-error.d.ts +7 -0
  121. package/dist/outbox-open-error.js +15 -0
  122. package/dist/outbox-open-error.js.map +1 -0
  123. package/dist/package-preimage.d.ts +26 -0
  124. package/dist/package-preimage.js +96 -0
  125. package/dist/package-preimage.js.map +1 -0
  126. package/dist/pane-context-cache.d.ts +25 -0
  127. package/dist/pane-context-cache.js +73 -0
  128. package/dist/pane-context-cache.js.map +1 -0
  129. package/dist/paths.d.ts +0 -7
  130. package/dist/paths.js +8 -2
  131. package/dist/paths.js.map +1 -1
  132. package/dist/provider-probe.d.ts +15 -0
  133. package/dist/provider-probe.js +20 -0
  134. package/dist/provider-probe.js.map +1 -1
  135. package/dist/public-link-progress.d.ts +73 -0
  136. package/dist/public-link-progress.js +190 -0
  137. package/dist/public-link-progress.js.map +1 -0
  138. package/dist/public-web-gateway.js +2 -2
  139. package/dist/public-web-gateway.js.map +1 -1
  140. package/dist/public-web-link.d.ts +6 -1
  141. package/dist/public-web-link.js +87 -15
  142. package/dist/public-web-link.js.map +1 -1
  143. package/dist/quickstart-api.d.ts +93 -20
  144. package/dist/quickstart-api.js +194 -62
  145. package/dist/quickstart-api.js.map +1 -1
  146. package/dist/quickstart.d.ts +15 -0
  147. package/dist/quickstart.js +110 -33
  148. package/dist/quickstart.js.map +1 -1
  149. package/dist/reply-buttons-controller.d.ts +98 -0
  150. package/dist/reply-buttons-controller.js +174 -0
  151. package/dist/reply-buttons-controller.js.map +1 -0
  152. package/dist/reply-buttons.d.ts +113 -0
  153. package/dist/reply-buttons.js +208 -0
  154. package/dist/reply-buttons.js.map +1 -0
  155. package/dist/reply-dedup.js +3 -1
  156. package/dist/reply-dedup.js.map +1 -1
  157. package/dist/restart-guard.d.ts +53 -0
  158. package/dist/restart-guard.js +114 -0
  159. package/dist/restart-guard.js.map +1 -0
  160. package/dist/scheduler/db.js +6 -2
  161. package/dist/scheduler/db.js.map +1 -1
  162. package/dist/service-activation.d.ts +62 -7
  163. package/dist/service-activation.js +237 -55
  164. package/dist/service-activation.js.map +1 -1
  165. package/dist/service-installer.d.ts +56 -1
  166. package/dist/service-installer.js +152 -12
  167. package/dist/service-installer.js.map +1 -1
  168. package/dist/service-plan.d.ts +65 -0
  169. package/dist/service-plan.js +108 -0
  170. package/dist/service-plan.js.map +1 -0
  171. package/dist/settings-api.js +92 -10
  172. package/dist/settings-api.js.map +1 -1
  173. package/dist/settings-authority.d.ts +11 -0
  174. package/dist/settings-authority.js +128 -0
  175. package/dist/settings-authority.js.map +1 -0
  176. package/dist/settings-change.d.ts +5 -0
  177. package/dist/settings-change.js +37 -8
  178. package/dist/settings-change.js.map +1 -1
  179. package/dist/settings-confirmation.d.ts +3 -0
  180. package/dist/settings-confirmation.js +7 -1
  181. package/dist/settings-confirmation.js.map +1 -1
  182. package/dist/settings-effect.js +19 -7
  183. package/dist/settings-effect.js.map +1 -1
  184. package/dist/settings-http-confirmation.js +1 -1
  185. package/dist/settings-http-confirmation.js.map +1 -1
  186. package/dist/settings-redaction.d.ts +18 -0
  187. package/dist/settings-redaction.js +58 -0
  188. package/dist/settings-redaction.js.map +1 -0
  189. package/dist/setup-form.d.ts +9 -1
  190. package/dist/setup-form.js +25 -1
  191. package/dist/setup-form.js.map +1 -1
  192. package/dist/setup-host.js +15 -6
  193. package/dist/setup-host.js.map +1 -1
  194. package/dist/setup-wizard.js +27 -19
  195. package/dist/setup-wizard.js.map +1 -1
  196. package/dist/sqlite-open-errors.d.ts +12 -0
  197. package/dist/sqlite-open-errors.js +13 -0
  198. package/dist/sqlite-open-errors.js.map +1 -0
  199. package/dist/systemd-runtime.d.ts +15 -0
  200. package/dist/systemd-runtime.js +41 -0
  201. package/dist/systemd-runtime.js.map +1 -0
  202. package/dist/tmux-control.d.ts +44 -0
  203. package/dist/tmux-control.js +170 -21
  204. package/dist/tmux-control.js.map +1 -1
  205. package/dist/token-env-name.d.ts +37 -0
  206. package/dist/token-env-name.js +93 -0
  207. package/dist/token-env-name.js.map +1 -0
  208. package/dist/tool-permissions.js +5 -3
  209. package/dist/tool-permissions.js.map +1 -1
  210. package/dist/topic-commands.d.ts +7 -16
  211. package/dist/topic-commands.js +56 -85
  212. package/dist/topic-commands.js.map +1 -1
  213. package/dist/transcript-monitor.js +3 -0
  214. package/dist/transcript-monitor.js.map +1 -1
  215. package/dist/transcript-sources.d.ts +68 -0
  216. package/dist/transcript-sources.js +336 -29
  217. package/dist/transcript-sources.js.map +1 -1
  218. package/dist/transcript-turns.d.ts +39 -0
  219. package/dist/transcript-turns.js +58 -0
  220. package/dist/transcript-turns.js.map +1 -0
  221. package/dist/tunnel/cloudflared-install.d.ts +18 -0
  222. package/dist/tunnel/cloudflared-install.js +15 -1
  223. package/dist/tunnel/cloudflared-install.js.map +1 -1
  224. package/dist/turn-reply-guard.d.ts +3 -0
  225. package/dist/turn-reply-guard.js.map +1 -1
  226. package/dist/ui/chat-commands.js +43 -0
  227. package/dist/ui/chat-render.js +34 -8
  228. package/dist/ui/chat-store.js +51 -2
  229. package/dist/ui/chat-strings.js +30 -2
  230. package/dist/ui/chat-thread.js +141 -47
  231. package/dist/ui/first-run.js +64 -0
  232. package/dist/ui/fleet-cache.js +168 -0
  233. package/dist/ui/html-attachment.js +26 -0
  234. package/dist/ui/panel-chat.js +117 -23
  235. package/dist/ui/panel-fleet.js +31 -17
  236. package/dist/ui/panel-settings.js +29 -15
  237. package/dist/ui/preview-panel.js +237 -0
  238. package/dist/ui/preview.js +7 -3
  239. package/dist/ui/settings-apply.js +3 -1
  240. package/dist/ui/settings-dialogs.js +95 -25
  241. package/dist/ui/settings-discord.js +130 -0
  242. package/dist/ui/settings-model.js +21 -0
  243. package/dist/ui/settings-strings.js +50 -8
  244. package/dist/ui/settings-token.js +54 -0
  245. package/dist/ui/settings-wizard.js +63 -29
  246. package/dist/ui/shared/app-route.js +1 -1
  247. package/dist/ui/shared/app-shell.js +25 -37
  248. package/dist/ui/shared/app-store.js +5 -3
  249. package/dist/ui/shared/app-stream.js +2 -1
  250. package/dist/ui/shared/app.css +181 -5
  251. package/dist/ui/shared/app.js +2 -1
  252. package/dist/ui/shared/instance-nav.js +310 -0
  253. package/dist/ui/shared/panel-view.js +12 -190
  254. package/dist/ui/shared/signin.js +13 -1
  255. package/dist/ui/shared/ui-icons.js +2 -0
  256. package/dist/ui/shared/view-roster-store.js +5 -0
  257. package/dist/ui/shared/view-strings.js +12 -0
  258. package/dist/ui/signin.html +2 -1
  259. package/dist/update-dispatch.d.ts +28 -0
  260. package/dist/update-dispatch.js +73 -0
  261. package/dist/update-dispatch.js.map +1 -0
  262. package/dist/update-install.d.ts +78 -8
  263. package/dist/update-install.js +158 -30
  264. package/dist/update-install.js.map +1 -1
  265. package/dist/update-launch.d.ts +22 -0
  266. package/dist/update-launch.js +106 -0
  267. package/dist/update-launch.js.map +1 -0
  268. package/dist/update-marker.js +3 -8
  269. package/dist/update-marker.js.map +1 -1
  270. package/dist/usage/format-rich.js +7 -1
  271. package/dist/usage/format-rich.js.map +1 -1
  272. package/dist/usage/i18n-keys.d.ts +1 -1
  273. package/dist/usage/i18n-keys.js +1 -1
  274. package/dist/usage/i18n-keys.js.map +1 -1
  275. package/dist/usage/providers.d.ts +4 -0
  276. package/dist/usage/providers.js +2 -1
  277. package/dist/usage/providers.js.map +1 -1
  278. package/dist/usage/usage-api.js +48 -2
  279. package/dist/usage/usage-api.js.map +1 -1
  280. package/dist/view-api.d.ts +40 -0
  281. package/dist/view-api.js +28 -10
  282. package/dist/view-api.js.map +1 -1
  283. package/dist/web-api.d.ts +22 -0
  284. package/dist/web-api.js +115 -16
  285. package/dist/web-api.js.map +1 -1
  286. package/dist/web-auth.d.ts +8 -0
  287. package/dist/web-auth.js +34 -8
  288. package/dist/web-auth.js.map +1 -1
  289. package/dist/web-chat-history.d.ts +21 -0
  290. package/dist/web-chat-history.js +44 -0
  291. package/dist/web-chat-history.js.map +1 -1
  292. package/dist/web-commands.d.ts +77 -0
  293. package/dist/web-commands.js +81 -0
  294. package/dist/web-commands.js.map +1 -0
  295. package/dist/web-host-guard.d.ts +18 -2
  296. package/dist/web-host-guard.js +30 -5
  297. package/dist/web-host-guard.js.map +1 -1
  298. package/dist/web-session.d.ts +7 -1
  299. package/dist/web-session.js +23 -2
  300. package/dist/web-session.js.map +1 -1
  301. package/dist/web-shell-routes.d.ts +1 -1
  302. package/dist/web-shell-routes.js +1 -1
  303. package/dist/web-shell-routes.js.map +1 -1
  304. package/launcher/agend +110 -0
  305. package/launcher/agend-agent +110 -0
  306. package/launcher/agend-agent.cjs +4 -0
  307. package/launcher/agend.cjs +4 -0
  308. package/launcher/install-admission.cjs +105 -0
  309. package/launcher/launch.cjs +64 -0
  310. package/launcher/postinstall.cjs +118 -0
  311. package/launcher/run-in-process.cjs +13 -0
  312. package/launcher/runtime-platform.cjs +86 -0
  313. package/launcher/runtime-select.cjs +217 -0
  314. package/package.json +12 -4
  315. package/scripts/preinstall-guard.cjs +40 -21
  316. package/templates/launchd.plist.ejs +2 -2
  317. package/templates/systemd.service.ejs +4 -4
@@ -50,6 +50,24 @@ export const RUNTIME_READ_FLEET_KEYS = [
50
50
  // #1386: read on every "Needs you" recompute.
51
51
  "needs_you",
52
52
  ];
53
+ /**
54
+ * #1056: inside a connection, `options.status_emojis` is read at the point of use (every stamp resolves it from the
55
+ * live config, fleet-manager resolveStatusEmojisFor), so a change to it alone is not a pending restart. The rest of
56
+ * the connection — binding, access, token, other options — is still what createAdapter() took at startup.
57
+ */
58
+ const RUNTIME_READ_CHANNEL_OPTIONS = ["status_emojis"];
59
+ function withoutRuntimeOptions(channel) {
60
+ if (!channel || typeof channel !== "object" || Array.isArray(channel))
61
+ return channel;
62
+ const options = channel.options;
63
+ if (!options || typeof options !== "object" || Array.isArray(options))
64
+ return channel;
65
+ const kept = { ...options };
66
+ for (const key of RUNTIME_READ_CHANNEL_OPTIONS)
67
+ delete kept[key];
68
+ const { options: _options, ...rest } = channel;
69
+ return Object.keys(kept).length ? { ...rest, options: kept } : rest;
70
+ }
53
71
  function pick(source, path) {
54
72
  let value = source;
55
73
  for (const segment of path.split(".")) {
@@ -57,6 +75,10 @@ function pick(source, path) {
57
75
  return undefined;
58
76
  value = value[segment];
59
77
  }
78
+ if (path === "channel")
79
+ return withoutRuntimeOptions(value);
80
+ if (path === "channels" && Array.isArray(value))
81
+ return value.map(withoutRuntimeOptions);
60
82
  return value;
61
83
  }
62
84
  /**
@@ -80,4 +102,35 @@ export function fleetLevelSignature(config) {
80
102
  export function fleetLevelDifferences(a, b) {
81
103
  return STARTUP_ONLY_FLEET_KEYS.filter(path => JSON.stringify(pick(a, path) ?? null) !== JSON.stringify(pick(b, path) ?? null));
82
104
  }
105
+ /**
106
+ * #1519 P6: the connections a running fleet can start without a restart — those appended to it, and only when nothing
107
+ * else at startup level changed: every other startup-only key equal, the connections it started with still there, the
108
+ * same and in the same order (so the first, the primary, is untouched), and at least one of them (a web-only fleet's
109
+ * first connection becomes the primary, which only a fresh process sets up). Anything else: null — a restart.
110
+ */
111
+ export function appendedConnections(before, after) {
112
+ for (const path of STARTUP_ONLY_FLEET_KEYS) {
113
+ if (path === "channel" || path === "channels")
114
+ continue;
115
+ if (JSON.stringify(pick(before, path) ?? null) !== JSON.stringify(pick(after, path) ?? null))
116
+ return null;
117
+ }
118
+ const list = (cfg) => (cfg?.channels ?? (cfg?.channel ? [cfg.channel] : []));
119
+ const was = list(before), now = list(after);
120
+ if (!was.length || now.length <= was.length)
121
+ return null;
122
+ const same = (a, b) => JSON.stringify(withoutRuntimeOptions(a)) === JSON.stringify(withoutRuntimeOptions(b));
123
+ for (let i = 0; i < was.length; i++)
124
+ if (!same(was[i], now[i]))
125
+ return null;
126
+ const added = now.slice(was.length);
127
+ const ids = new Set(was.map(c => c.id ?? c.type));
128
+ for (const c of added) {
129
+ const id = c.id ?? c.type;
130
+ if (!id || ids.has(id))
131
+ return null;
132
+ ids.add(id);
133
+ }
134
+ return added;
135
+ }
83
136
  //# sourceMappingURL=fleet-level-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fleet-level-config.js","sourceRoot":"","sources":["../src/fleet-level-config.ts"],"names":[],"mappings":"AAiBA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,SAAS,EAA+B,6BAA6B;IACrE,UAAU,EAA8B,6BAA6B;IACrE,aAAa,EAA2B,4BAA4B;IACpE,iBAAiB,EAAuB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,OAAO,IAAI,CAAC;QAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC;IACvG,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -52,6 +52,7 @@ export declare function applyTaskListCap<T extends {
52
52
  hint: string;
53
53
  } | T[];
54
54
  import { WebChatHistory } from "./web-chat-history.js";
55
+ import { ReplyButtonsController } from "./reply-buttons-controller.js";
55
56
  import { WebFileLedger } from "./web-upload.js";
56
57
  import { type RawConfigPatch } from "./settings-api.js";
57
58
  import { type AgentEndpointContext } from "./agent-endpoint.js";
@@ -63,6 +64,8 @@ import { TargetQueueWorker } from "./target-queue-worker.js";
63
64
  import { resolveDeliveryWorkerMode } from "./types.js";
64
65
  import { type WebNeedsItem } from "./needs-you-hub.js";
65
66
  import { type OrgChart } from "./web-org.js";
67
+ import { type CacheReport } from "./cache-service.js";
68
+ import { type WebCommandResult } from "./web-commands.js";
66
69
  import { type PreviewAvailability } from "./web-preview.js";
67
70
  import { type ConnectionMetadata, type ConnectionBinding, type BindingProbe, type SecretApplyJob, type ProviderSecretApplyJob } from "./connection-secrets.js";
68
71
  import { type ProviderSecretStatus } from "./provider-secret-registry.js";
@@ -168,6 +171,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
168
171
  dataDir: string;
169
172
  private static signalTarget;
170
173
  private static sighupHandlerInstalled;
174
+ /** Test seam: inject a spy to verify saveFleetConfig calls fsync. Default: fsyncSync. */
175
+ fsyncForTest: ((fd: number) => void) | undefined;
171
176
  private children;
172
177
  readonly lifecycle: InstanceLifecycle;
173
178
  readonly stormWindow: StormWindow;
@@ -444,6 +449,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
444
449
  private classicSettingsOwners;
445
450
  private queueSettingsOperation;
446
451
  private settingsGate;
452
+ /** Exact configured effect owners; this does not depend on prompt location. */
453
+ private settingsChatAuthority;
447
454
  private promptSettingsChange;
448
455
  private handleSettingsChangeCallback;
449
456
  startSettingsConfirmationControl(): Promise<void>;
@@ -476,6 +483,25 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
476
483
  private fleetSignatureMismatch;
477
484
  private healthServerListening;
478
485
  constructor(dataDir: string);
486
+ /** #1266: a reply's buttons — the store (reply-buttons.db) and what a click does. Created on first use. */
487
+ private replyButtonsCtl;
488
+ /** The store could not be opened in this process: buttons are offered as text until the next start. */
489
+ private replyButtonsUnavailable;
490
+ /**
491
+ * The controller, or null when reply-buttons.db cannot be opened (#1500 review). That file holds only open choices,
492
+ * so it never stops AgEnD: the failure is logged and posted once, replies offer their choices as text, and a click on
493
+ * an older button is answered "closed". The file is left where it is — an open error is not proof of corruption.
494
+ */
495
+ replyButtons(): ReplyButtonsController | null;
496
+ private replyButtonsStore;
497
+ /**
498
+ * #1266: who may answer a reply's buttons on a platform — whoever may message that instance there: in a ClassicBot
499
+ * room anyone there (as a typed message), elsewhere someone the sending connection lets speak (#754/#1148), never a
500
+ * fleet bot.
501
+ */
502
+ private mayAnswerReplyButtons;
503
+ /** #1266: the choice, delivered as an ordinary inbound message from whoever made it, and shown in the web chat. */
504
+ private deliverReplyButtonChoice;
479
505
  private ensureDeliveryOutbox;
480
506
  /** Synchronous SQLite admission; the caller may acknowledge only after this returns. */
481
507
  admitDurableDelivery(input: {
@@ -541,6 +567,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
541
567
  * handled, so a rejection never escapes as an unhandled rejection.
542
568
  */
543
569
  private startExclusiveReconcile;
570
+ /** Pure cached admission for command continuations; no IO or update-progress lookup. */
571
+ isFleetStopping(): boolean;
544
572
  /**
545
573
  * Is the fleet going down (or coming back up) on purpose?
546
574
  *
@@ -553,6 +581,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
553
581
  isPlannedRestart(): boolean;
554
582
  private finishStartup;
555
583
  lastActivityMs(name: string): number;
584
+ /** Capture the current daemon and delivery owner for a background context read. */
585
+ getPaneContextSource(name: string): import("./pane-context-cache.js").PaneContextSource | null;
556
586
  /**
557
587
  * Is the instance between turns?
558
588
  *
@@ -964,10 +994,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
964
994
  /**
965
995
  * Probe the same executable set exposed by the web backend catalog.
966
996
  *
967
- * This deliberately has no cache: an install `/login` ran can add a
997
+ * This deliberately skips the cache: an install `/login` ran can add a
968
998
  * binary to PATH while the fleet process remains alive, and the next bare
969
999
  * `/login` must see it without requiring a restart or an explicit cache
970
- * invalidation call.
1000
+ * invalidation call. The fresh answers also refresh the shared cache that
1001
+ * `/ui/backends` reads. #1490: async and bounded, never `which` on the event loop; a probe with no answer in time
1002
+ * counts as not installed, as the old timeout did.
971
1003
  */
972
1004
  private probeInstalledBackends;
973
1005
  /**
@@ -1071,6 +1103,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1071
1103
  /** Telegram's typed command enters through the same strict owner and nonce path as Discord. */
1072
1104
  dashboardMenu(msg: InboundMessage): Promise<void>;
1073
1105
  private sendLocalDashboard;
1106
+ /** Why the DM did not go, for the log only (Discord 50007 = the user does not accept DMs from this server's members). */
1107
+ private logDashboardDmFailure;
1108
+ /** False when the menu was not shown (the caller still owes the user an answer). */
1074
1109
  private showDashboardMenu;
1075
1110
  private handleDashboardCallback;
1076
1111
  /** `/dashboard revoke`: sign out every browser and withdraw any unused code. */
@@ -1280,19 +1315,26 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1280
1315
  */
1281
1316
  private inboundRouteThreadId;
1282
1317
  /**
1283
- * #1085, defense in depth: a routed Telegram target must belong to the group
1284
- * the message came from — its own world's group_id. Two Telegram fleet
1285
- * worlds can number topics alike; a coincidence is dropped, never delivered.
1318
+ * A forum-root command has one configured General before any adapter claims
1319
+ * dedup. Bare commands prefer the primary adapter's General in this group;
1320
+ * explicit suffixes select their own bot. Runtime availability must not pick
1321
+ * another administrator, so stopped owners remain selected and every copy
1322
+ * silently refuses instead of falling back.
1323
+ * undefined = another ingress scope; null = root command with no proven target.
1286
1324
  */
1325
+ private telegramRootCommandTarget;
1287
1326
  /**
1288
1327
  * #1346: whether this copy may claim the shared dedup key for
1289
1328
  * command-like text. Fleet topics resolve an owning adapter and only its
1290
1329
  * copy proceeds. Classic targets and unknown routing keep their existing
1291
- * handling. At the receiving Telegram world's own forum root, an explicit
1292
- * suffix requires a known matching username before dedup; present-thread
1330
+ * handling. Telegram forum-root commands select a configured General before
1331
+ * dedup. An explicit suffix requires a known matching username; present-thread
1293
1332
  * copies retain their permissive handling when that identity is unknown.
1294
1333
  */
1295
1334
  private isOwnerCommandCopy;
1335
+ /**
1336
+ * #1085: coincident topic numbers must not route across Telegram groups.
1337
+ */
1296
1338
  private resolveInboundTarget;
1297
1339
  private handleInboundMessage;
1298
1340
  /** Handle outbound tool calls from a daemon instance */
@@ -1496,6 +1538,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1496
1538
  * non-identity instance leaves are canonicalized to inheritance afterward.
1497
1539
  */
1498
1540
  saveFleetConfig(explicitPatches?: RawConfigPatch[]): void;
1541
+ /** Why the config written to `candidate` must not replace fleet.yaml, or null: it does not load, or it adds errors. */
1542
+ private savedFleetConfigProblem;
1499
1543
  /** One-time upgrade migration; invalid YAML is never rewritten. */
1500
1544
  private slimFleetConfigAtStartup;
1501
1545
  private writeFleetConfigBackup;
@@ -1513,6 +1557,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1513
1557
  * to a plain add (never worse than the old behaviour).
1514
1558
  */
1515
1559
  private lastStatusEmoji;
1560
+ /**
1561
+ * #1056: every status emoji each bot really stamped, per `${adapterId}:${messageId}` (match keys). A connection's
1562
+ * status set can change while AgEnD runs, so "is this a stamp?" cannot be answered from the current set alone: a
1563
+ * bot's earlier stamp in the old emoji must still be plumbing, not an agent's reaction. Unbounded for the same
1564
+ * reason as lastStatusEmoji (a few short strings per stamped message).
1565
+ */
1566
+ private stampedStatus;
1567
+ private noteStamped;
1516
1568
  /**
1517
1569
  * One in-flight status update per bot+message: updates run strictly in call
1518
1570
  * order, so a delayed ❌ add can never land after a newer ✅'s removal —
@@ -1537,6 +1589,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1537
1589
  platform: string | undefined;
1538
1590
  };
1539
1591
  private warnedStatusEmojis;
1592
+ /**
1593
+ * The connection whose `options.status_emojis` an instance on `worldId` stamps with. #1056: read from the live config
1594
+ * first — a Settings save replaces `fleetConfig.channels`, and the running world keeps the object it started with —
1595
+ * so a change to the connection's emojis applies at the next stamp, as an instance's own override does. Only the
1596
+ * emoji options are taken from it: the platform is still the running adapter's (resolveStatusEmojisFor).
1597
+ */
1598
+ private statusEmojiChannel;
1540
1599
  /**
1541
1600
  * A Discord connection's server emojis for the Settings picker (#1005), from
1542
1601
  * every server its bot can draw on (#1021): the primary `group_id` server,
@@ -1729,6 +1788,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1729
1788
  * retention, and the caller is the original source or target (#1340 P2 🔒).
1730
1789
  */
1731
1790
  wasDeliveryIdPrunedForCaller(deliveryId: string, callerInstance: string): boolean;
1791
+ /** How long opening events.db waits for another process's lock (a field so tests need not wait 5 s). */
1792
+ private eventLogBusyTimeoutMs;
1732
1793
  private openEventLog;
1733
1794
  /**
1734
1795
  * Report a fleet-level fault (not attributable to one instance) to the General
@@ -1860,6 +1921,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1860
1921
  * fleet.yaml's teams, each instance's description and thread link. Read on demand; the live state rides the stream.
1861
1922
  */
1862
1923
  orgChart(): OrgChart;
1924
+ private cacheService;
1925
+ /**
1926
+ * #1468: the prompt-cache expiry analysis for the web, per instance, over `window`. Read from each instance's
1927
+ * ledger as it is now; the first request starts the bounded, persisted catch-up over the transcripts
1928
+ * (cache-service.ts) — never a vendor call, never a synchronous transcript read.
1929
+ */
1930
+ cacheReport(window: string): Promise<CacheReport>;
1863
1931
  /** The web's Acknowledge (any item; a signed-in session is fleet-admin level). */
1864
1932
  acknowledgeNeedsItem(id: string, principal: string): {
1865
1933
  status: 200 | 400 | 404 | 409 | 500;
@@ -1893,6 +1961,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1893
1961
  * The caller has passed the /ui gate (session, same origin, CSRF). Here: the prompt must be one offered
1894
1962
  * on the dashboard, about the instance the page named, and the action one of its own buttons.
1895
1963
  */
1964
+ /** #1266: a click on a reply's button in the web chat (the /ui gate is passed: a session, or the public link). */
1965
+ clickWebReplyButton(instance: string, id: string, index: number): Promise<{
1966
+ status: 200 | 400 | 403 | 409;
1967
+ error?: string;
1968
+ }>;
1896
1969
  clickWebPrompt(instance: string, nonce: string, action: string): Promise<{
1897
1970
  status: 200 | 400 | 403 | 409;
1898
1971
  error?: string;
@@ -1914,6 +1987,24 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1914
1987
  private handleTipUnlock;
1915
1988
  /** Post the destructive `/clear` confirmation in the invoking channel. */
1916
1989
  promptClearConfirmation(instanceName: string, channelId: string, adapter: ChannelAdapter, chatId: string, threadId?: string): Promise<string | null>;
1990
+ /**
1991
+ * What a confirmed /clear must still find when it acts — shared by the platform's Confirm button and the web
1992
+ * (#1269): the same daemon and IPC client, the same interaction owner, lifecycle epoch and delivery epoch as when the
1993
+ * fence was taken. Null when there is no owner to pin (then nothing may be cleared). The reads are cached and
1994
+ * synchronous; they never probe the pane.
1995
+ */
1996
+ private clearTargetFence;
1997
+ /** #1269: the web's /clear confirmations — one token per question, used once, for the instance as it was asked about. */
1998
+ private readonly webClearTokens;
1999
+ /** #1269: an instance's chat command from the web chat (web-commands.ts); `publicLink`: a gateway request. */
2000
+ webCommand(input: {
2001
+ instance: string;
2002
+ command: string;
2003
+ args?: string;
2004
+ confirm?: string;
2005
+ }, opts: {
2006
+ publicLink: boolean;
2007
+ }): Promise<WebCommandResult>;
1917
2008
  /** Consume `/clear` Confirm/Cancel exactly once; only Confirm reaches IPC. */
1918
2009
  private handleClearConfirmation;
1919
2010
  /**
@@ -1938,6 +2029,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1938
2029
  */
1939
2030
  private retirePendingNoncePrompts;
1940
2031
  clearNoncePromptsForInstance(instanceName: string): void;
2032
+ /** A lapsed prompt's buttons collapsed to its expired text — through its own interaction when it is private. */
2033
+ private collapseNoncePrompt;
1941
2034
  /** A clean exit is intentional from the CLI's perspective, but often not from
1942
2035
  * the operator's. Keep the instance notice passive and put the action in the
1943
2036
  * same-world General topic where an administrator can make the choice. */
@@ -2634,6 +2727,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2634
2727
  get applyJobs(): ApplyJobStore;
2635
2728
  /** The only channel metadata exposed to the Settings secret UI. */
2636
2729
  listSecureConnections(): ConnectionMetadata[];
2730
+ /**
2731
+ * #1519 P6 (#1537 review): a connection's status from evidence, never from a start call that merely resolved. No
2732
+ * adapter object: not running (or retrying / failed, as recorded) — never "connected". An adapter that has not logged
2733
+ * in yet (no `started`: no bot id; for Telegram, polling not ready) is "starting". Named problems: the Message Content
2734
+ * intent refused (4014, P3), the token refused (an explicit auth error, or Telegram's own 401 flag) — the error text
2735
+ * itself is never passed on.
2736
+ */
2737
+ private connectionStatus;
2637
2738
  private secureConnectionChannel;
2638
2739
  private secureConnectionGeneration;
2639
2740
  /** Provider API-key rows exposed to Settings (never the env key or secret). */
@@ -2765,6 +2866,20 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2765
2866
  * the reconcile reports as it works. A target the forecast missed (a Classic
2766
2867
  * instance inheriting a changed default) is added when it is first touched.
2767
2868
  */
2869
+ /**
2870
+ * #1519 P6: whether `next` differs from what this process started with only by connections appended to it, while it
2871
+ * runs connections already (a fleet's first connection becomes its primary: a fresh process sets that up).
2872
+ */
2873
+ private canHotAddConnections;
2874
+ /**
2875
+ * #1519 P6: start connections appended to a running fleet. Each token is read from .env (that key only, under the
2876
+ * file's lease — Settings wrote it there, and this process read .env once at start); a connection already running (a
2877
+ * token Replace started it) is left alone. True only when every one is running; one that failed to start is retried in
2878
+ * the background like any other, and the Apply row says a restart is still needed.
2879
+ */
2880
+ private hotAddConnections;
2881
+ /** Set the named keys of the data dir's .env into this process's environment (the file's lease held by `owner`). */
2882
+ private loadEnvKeys;
2768
2883
  planConfigApply(): Array<{
2769
2884
  target: string;
2770
2885
  kind: ApplyTargetKind;