@songsid/agend 2.3.3 → 2.3.4-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/README.md +3 -3
  2. package/README.zh-TW.md +3 -3
  3. package/THIRD_PARTY_NOTICES.md +37 -0
  4. package/dist/agend-home.d.ts +13 -0
  5. package/dist/agend-home.js +42 -0
  6. package/dist/agend-home.js.map +1 -1
  7. package/dist/agent-cli-instructions.md +2 -2
  8. package/dist/agent-credentials.d.ts +24 -0
  9. package/dist/agent-credentials.js +66 -0
  10. package/dist/agent-credentials.js.map +1 -0
  11. package/dist/agent-endpoint.d.ts +3 -1
  12. package/dist/agent-endpoint.js +13 -0
  13. package/dist/agent-endpoint.js.map +1 -1
  14. package/dist/auth-api.d.ts +16 -3
  15. package/dist/auth-api.js +32 -8
  16. package/dist/auth-api.js.map +1 -1
  17. package/dist/authority/session-authorizations.d.ts +28 -4
  18. package/dist/authority/session-authorizations.js +63 -17
  19. package/dist/authority/session-authorizations.js.map +1 -1
  20. package/dist/authority/web-authority.d.ts +15 -1
  21. package/dist/authority/web-authority.js +27 -10
  22. package/dist/authority/web-authority.js.map +1 -1
  23. package/dist/backend/antigravity.js +3 -1
  24. package/dist/backend/antigravity.js.map +1 -1
  25. package/dist/backend/claude-code.d.ts +3 -0
  26. package/dist/backend/claude-code.js +100 -5
  27. package/dist/backend/claude-code.js.map +1 -1
  28. package/dist/backend/codex-footer-hints.d.ts +4 -0
  29. package/dist/backend/codex-footer-hints.js +27 -0
  30. package/dist/backend/codex-footer-hints.js.map +1 -0
  31. package/dist/backend/codex-session-lookup.d.ts +35 -0
  32. package/dist/backend/codex-session-lookup.js +93 -0
  33. package/dist/backend/codex-session-lookup.js.map +1 -1
  34. package/dist/backend/codex.d.ts +27 -0
  35. package/dist/backend/codex.js +136 -23
  36. package/dist/backend/codex.js.map +1 -1
  37. package/dist/backend/kiro-identity.d.ts +2 -0
  38. package/dist/backend/kiro-identity.js +13 -6
  39. package/dist/backend/kiro-identity.js.map +1 -1
  40. package/dist/backend/kiro.d.ts +3 -0
  41. package/dist/backend/kiro.js +68 -5
  42. package/dist/backend/kiro.js.map +1 -1
  43. package/dist/backend/muse.js +5 -3
  44. package/dist/backend/muse.js.map +1 -1
  45. package/dist/backend/types.d.ts +13 -1
  46. package/dist/backend/types.js +3 -0
  47. package/dist/backend/types.js.map +1 -1
  48. package/dist/backend-availability.d.ts +6 -0
  49. package/dist/backend-availability.js +13 -5
  50. package/dist/backend-availability.js.map +1 -1
  51. package/dist/cache-ledger.d.ts +85 -0
  52. package/dist/cache-ledger.js +236 -1
  53. package/dist/cache-ledger.js.map +1 -1
  54. package/dist/cache-service.d.ts +5 -0
  55. package/dist/cache-service.js +16 -4
  56. package/dist/cache-service.js.map +1 -1
  57. package/dist/channel/adapters/discord.js +27 -4
  58. package/dist/channel/adapters/discord.js.map +1 -1
  59. package/dist/channel/adapters/telegram.d.ts +51 -0
  60. package/dist/channel/adapters/telegram.js +238 -18
  61. package/dist/channel/adapters/telegram.js.map +1 -1
  62. package/dist/channel/inbox-temp-name.d.ts +9 -0
  63. package/dist/channel/inbox-temp-name.js +13 -0
  64. package/dist/channel/inbox-temp-name.js.map +1 -0
  65. package/dist/channel/mcp-tools.js +3 -3
  66. package/dist/channel/mcp-tools.js.map +1 -1
  67. package/dist/channel/types.d.ts +2 -0
  68. package/dist/chat-log-ids.d.ts +48 -0
  69. package/dist/chat-log-ids.js +182 -0
  70. package/dist/chat-log-ids.js.map +1 -0
  71. package/dist/classic-channel-manager.d.ts +8 -1
  72. package/dist/classic-channel-manager.js +24 -2
  73. package/dist/classic-channel-manager.js.map +1 -1
  74. package/dist/cli.js +4 -6
  75. package/dist/cli.js.map +1 -1
  76. package/dist/config-validator.js +18 -1
  77. package/dist/config-validator.js.map +1 -1
  78. package/dist/cross-instance-notice.d.ts +10 -0
  79. package/dist/cross-instance-notice.js +67 -5
  80. package/dist/cross-instance-notice.js.map +1 -1
  81. package/dist/daemon.d.ts +52 -0
  82. package/dist/daemon.js +538 -35
  83. package/dist/daemon.js.map +1 -1
  84. package/dist/delivery-consumed-watch.d.ts +23 -1
  85. package/dist/delivery-consumed-watch.js +30 -3
  86. package/dist/delivery-consumed-watch.js.map +1 -1
  87. package/dist/delivery-reconciliation.d.ts +7 -0
  88. package/dist/delivery-reconciliation.js +9 -1
  89. package/dist/delivery-reconciliation.js.map +1 -1
  90. package/dist/dialog-screen-text.d.ts +16 -0
  91. package/dist/dialog-screen-text.js +51 -0
  92. package/dist/dialog-screen-text.js.map +1 -0
  93. package/dist/env-file.d.ts +2 -0
  94. package/dist/env-file.js +13 -8
  95. package/dist/env-file.js.map +1 -1
  96. package/dist/export-import.d.ts +7 -0
  97. package/dist/export-import.js +44 -10
  98. package/dist/export-import.js.map +1 -1
  99. package/dist/fleet-context.d.ts +2 -0
  100. package/dist/fleet-manager.d.ts +172 -12
  101. package/dist/fleet-manager.js +897 -139
  102. package/dist/fleet-manager.js.map +1 -1
  103. package/dist/fleet-yaml-patch.d.ts +3 -0
  104. package/dist/fleet-yaml-patch.js +103 -0
  105. package/dist/fleet-yaml-patch.js.map +1 -0
  106. package/dist/general-knowledge/skills/concepts/SKILL.md +393 -0
  107. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +2 -1
  108. package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +3 -1
  109. package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +41 -4
  110. package/dist/general-knowledge/skills/model-discovery/SKILL.md +2 -0
  111. package/dist/general-knowledge/skills/web-appearance/SKILL.md +1 -1
  112. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +14 -4
  113. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
  114. package/dist/install-stream.d.ts +53 -0
  115. package/dist/install-stream.js +134 -0
  116. package/dist/install-stream.js.map +1 -0
  117. package/dist/instance-config-impact.js +1 -0
  118. package/dist/instance-config-impact.js.map +1 -1
  119. package/dist/instance-lifecycle.d.ts +22 -2
  120. package/dist/instance-lifecycle.js +103 -19
  121. package/dist/instance-lifecycle.js.map +1 -1
  122. package/dist/instance-topic-delete.d.ts +77 -0
  123. package/dist/instance-topic-delete.js +123 -0
  124. package/dist/instance-topic-delete.js.map +1 -0
  125. package/dist/instructions.d.ts +2 -2
  126. package/dist/instructions.js +2 -2
  127. package/dist/instructions.js.map +1 -1
  128. package/dist/interaction-observation.d.ts +1 -0
  129. package/dist/interaction-observation.js +1 -1
  130. package/dist/interaction-observation.js.map +1 -1
  131. package/dist/kiro-engine-status.d.ts +11 -0
  132. package/dist/kiro-engine-status.js +6 -0
  133. package/dist/kiro-engine-status.js.map +1 -1
  134. package/dist/kiro-resume-summary.d.ts +37 -0
  135. package/dist/kiro-resume-summary.js +85 -0
  136. package/dist/kiro-resume-summary.js.map +1 -0
  137. package/dist/locale.js +130 -6
  138. package/dist/locale.js.map +1 -1
  139. package/dist/log-service.d.ts +30 -0
  140. package/dist/log-service.js +36 -3
  141. package/dist/log-service.js.map +1 -1
  142. package/dist/log-steps.d.ts +4 -3
  143. package/dist/log-steps.js +32 -7
  144. package/dist/log-steps.js.map +1 -1
  145. package/dist/logger.d.ts +12 -0
  146. package/dist/logger.js +43 -1
  147. package/dist/logger.js.map +1 -1
  148. package/dist/login-controller.js +9 -1
  149. package/dist/login-controller.js.map +1 -1
  150. package/dist/login-flows.d.ts +2 -0
  151. package/dist/login-flows.js +5 -2
  152. package/dist/login-flows.js.map +1 -1
  153. package/dist/login-manager.d.ts +6 -0
  154. package/dist/login-manager.js +10 -1
  155. package/dist/login-manager.js.map +1 -1
  156. package/dist/missed-offline.d.ts +25 -0
  157. package/dist/missed-offline.js +79 -0
  158. package/dist/missed-offline.js.map +1 -0
  159. package/dist/needs-you-hub.d.ts +6 -1
  160. package/dist/needs-you-hub.js +31 -8
  161. package/dist/needs-you-hub.js.map +1 -1
  162. package/dist/needs-you.d.ts +22 -2
  163. package/dist/needs-you.js +17 -3
  164. package/dist/needs-you.js.map +1 -1
  165. package/dist/next-steps.d.ts +12 -2
  166. package/dist/next-steps.js +19 -3
  167. package/dist/next-steps.js.map +1 -1
  168. package/dist/office-share-page.d.ts +1 -1
  169. package/dist/office-share-page.js +6 -2
  170. package/dist/office-share-page.js.map +1 -1
  171. package/dist/office-share-service.d.ts +57 -0
  172. package/dist/office-share-service.js +76 -11
  173. package/dist/office-share-service.js.map +1 -1
  174. package/dist/office-share.d.ts +8 -0
  175. package/dist/office-share.js +34 -0
  176. package/dist/office-share.js.map +1 -1
  177. package/dist/outbound-handlers.js +59 -3
  178. package/dist/outbound-handlers.js.map +1 -1
  179. package/dist/outbound-schemas.d.ts +1 -0
  180. package/dist/outbound-schemas.js +10 -4
  181. package/dist/outbound-schemas.js.map +1 -1
  182. package/dist/package-preimage.js +27 -2
  183. package/dist/package-preimage.js.map +1 -1
  184. package/dist/page-share.d.ts +122 -0
  185. package/dist/page-share.js +199 -0
  186. package/dist/page-share.js.map +1 -0
  187. package/dist/public-preview.d.ts +4 -0
  188. package/dist/public-preview.js +5 -4
  189. package/dist/public-preview.js.map +1 -1
  190. package/dist/public-web-gateway.js +5 -0
  191. package/dist/public-web-gateway.js.map +1 -1
  192. package/dist/queued-handoffs.d.ts +33 -0
  193. package/dist/queued-handoffs.js +75 -0
  194. package/dist/queued-handoffs.js.map +1 -0
  195. package/dist/quickstart-api.d.ts +5 -0
  196. package/dist/quickstart-api.js +1 -1
  197. package/dist/quickstart-api.js.map +1 -1
  198. package/dist/quickstart.d.ts +40 -0
  199. package/dist/quickstart.js +174 -28
  200. package/dist/quickstart.js.map +1 -1
  201. package/dist/remote-card-answer.js +2 -0
  202. package/dist/remote-card-answer.js.map +1 -1
  203. package/dist/remote-card-prompt.js +4 -2
  204. package/dist/remote-card-prompt.js.map +1 -1
  205. package/dist/reply-buttons-controller.js +10 -0
  206. package/dist/reply-buttons-controller.js.map +1 -1
  207. package/dist/scheduler/db.d.ts +2 -1
  208. package/dist/scheduler/db.js +23 -9
  209. package/dist/scheduler/db.js.map +1 -1
  210. package/dist/selection-card.d.ts +20 -0
  211. package/dist/selection-card.js +202 -0
  212. package/dist/selection-card.js.map +1 -0
  213. package/dist/settings-api.d.ts +13 -0
  214. package/dist/settings-api.js +16 -1
  215. package/dist/settings-api.js.map +1 -1
  216. package/dist/settings-change.js +5 -0
  217. package/dist/settings-change.js.map +1 -1
  218. package/dist/settings-effect.js +2 -0
  219. package/dist/settings-effect.js.map +1 -1
  220. package/dist/setup-host.js +2 -2
  221. package/dist/setup-host.js.map +1 -1
  222. package/dist/setup-wizard.js +2 -2
  223. package/dist/setup-wizard.js.map +1 -1
  224. package/dist/stall-reporter.d.ts +21 -0
  225. package/dist/stall-reporter.js +82 -0
  226. package/dist/stall-reporter.js.map +1 -0
  227. package/dist/tmux-control.d.ts +2 -2
  228. package/dist/tmux-control.js +4 -2
  229. package/dist/tmux-control.js.map +1 -1
  230. package/dist/tmux-exec-helper.d.ts +6 -3
  231. package/dist/tmux-exec-helper.js +115 -53
  232. package/dist/tmux-exec-helper.js.map +1 -1
  233. package/dist/tmux-manager.d.ts +6 -0
  234. package/dist/tmux-manager.js +17 -0
  235. package/dist/tmux-manager.js.map +1 -1
  236. package/dist/tool-permissions.d.ts +5 -2
  237. package/dist/tool-permissions.js +6 -5
  238. package/dist/tool-permissions.js.map +1 -1
  239. package/dist/tool-progress.d.ts +2 -0
  240. package/dist/tool-progress.js +19 -3
  241. package/dist/tool-progress.js.map +1 -1
  242. package/dist/topic-commands.js +4 -0
  243. package/dist/topic-commands.js.map +1 -1
  244. package/dist/tunnel/cloudflared-install.d.ts +4 -0
  245. package/dist/tunnel/cloudflared-install.js +20 -1
  246. package/dist/tunnel/cloudflared-install.js.map +1 -1
  247. package/dist/tunnel/cloudflared.d.ts +8 -1
  248. package/dist/tunnel/cloudflared.js +34 -6
  249. package/dist/tunnel/cloudflared.js.map +1 -1
  250. package/dist/tunnel/lease.d.ts +3 -3
  251. package/dist/tunnel/lease.js +23 -19
  252. package/dist/tunnel/lease.js.map +1 -1
  253. package/dist/tunnel/manager.js +6 -7
  254. package/dist/tunnel/manager.js.map +1 -1
  255. package/dist/types.d.ts +10 -0
  256. package/dist/ui/chat-store.js +28 -4
  257. package/dist/ui/chat-strings.js +40 -4
  258. package/dist/ui/chat-thread.js +52 -10
  259. package/dist/ui/fleet-canvas.js +4 -3
  260. package/dist/ui/fleet-office-model.js +55 -22
  261. package/dist/ui/fleet-office-overview.js +6 -38
  262. package/dist/ui/fleet-office-pack.js +4 -3
  263. package/dist/ui/fleet-office-skin.js +114 -21
  264. package/dist/ui/fleet-office-store.js +5 -0
  265. package/dist/ui/fleet-office-zones.js +2 -2
  266. package/dist/ui/fleet-office.js +41 -9
  267. package/dist/ui/fleet-usage.js +90 -27
  268. package/dist/ui/page-share-dialog.js +191 -0
  269. package/dist/ui/panel-chat.js +16 -0
  270. package/dist/ui/panel-log.js +7 -1
  271. package/dist/ui/panel-needs.js +17 -8
  272. package/dist/ui/panel-notices.js +98 -0
  273. package/dist/ui/panel-settings.js +9 -2
  274. package/dist/ui/preview-pages.js +41 -0
  275. package/dist/ui/preview-panel-actions.js +161 -0
  276. package/dist/ui/preview-panel.js +209 -28
  277. package/dist/ui/preview-versions.js +155 -0
  278. package/dist/ui/preview.js +88 -3
  279. package/dist/ui/settings-registry.js +1 -0
  280. package/dist/ui/settings-strings.js +6 -2
  281. package/dist/ui/shared/app-i18n.js +6 -6
  282. package/dist/ui/shared/app-needs.js +1 -1
  283. package/dist/ui/shared/app-route.js +4 -0
  284. package/dist/ui/shared/app-shell.js +9 -5
  285. package/dist/ui/shared/app-store.js +71 -1
  286. package/dist/ui/shared/app-stream.js +27 -1
  287. package/dist/ui/shared/app.css +94 -4
  288. package/dist/ui/shared/app.js +22 -1
  289. package/dist/ui/shared/office/guild.png +0 -0
  290. package/dist/ui/shared/office/school.png +0 -0
  291. package/dist/ui/shared/panel-view.js +339 -17
  292. package/dist/ui/shared/signin.js +12 -1
  293. package/dist/ui/shared/ui-icons.js +3 -0
  294. package/dist/ui/shared/usage-dialog.js +18 -1
  295. package/dist/ui/shared/view-history.css +17 -0
  296. package/dist/ui/shared/view-history.js +438 -0
  297. package/dist/ui/shared/view-strings.js +42 -0
  298. package/dist/ui/shared/web-authorize.js +3 -1
  299. package/dist/unattended-install.d.ts +6 -0
  300. package/dist/unattended-install.js +79 -0
  301. package/dist/unattended-install.js.map +1 -0
  302. package/dist/usage/capacity.d.ts +69 -0
  303. package/dist/usage/capacity.js +119 -0
  304. package/dist/usage/capacity.js.map +1 -0
  305. package/dist/usage/i18n-keys.d.ts +1 -1
  306. package/dist/usage/i18n-keys.js +3 -0
  307. package/dist/usage/i18n-keys.js.map +1 -1
  308. package/dist/usage/profile-timeline.d.ts +16 -0
  309. package/dist/usage/profile-timeline.js +58 -0
  310. package/dist/usage/profile-timeline.js.map +1 -0
  311. package/dist/usage/quota-history.d.ts +43 -0
  312. package/dist/usage/quota-history.js +168 -0
  313. package/dist/usage/quota-history.js.map +1 -0
  314. package/dist/usage/usage-api.d.ts +31 -0
  315. package/dist/usage/usage-api.js +80 -1
  316. package/dist/usage/usage-api.js.map +1 -1
  317. package/dist/usage-report.d.ts +25 -1
  318. package/dist/usage-report.js +55 -4
  319. package/dist/usage-report.js.map +1 -1
  320. package/dist/usage-rollup.d.ts +4 -1
  321. package/dist/usage-rollup.js +12 -3
  322. package/dist/usage-rollup.js.map +1 -1
  323. package/dist/view-api.d.ts +31 -0
  324. package/dist/view-api.js +186 -41
  325. package/dist/view-api.js.map +1 -1
  326. package/dist/view-history.d.ts +84 -0
  327. package/dist/view-history.js +116 -0
  328. package/dist/view-history.js.map +1 -0
  329. package/dist/web-api.d.ts +32 -0
  330. package/dist/web-api.js +195 -5
  331. package/dist/web-api.js.map +1 -1
  332. package/dist/web-auth.js +7 -1
  333. package/dist/web-auth.js.map +1 -1
  334. package/dist/web-chat-history.d.ts +20 -0
  335. package/dist/web-chat-history.js +21 -0
  336. package/dist/web-chat-history.js.map +1 -1
  337. package/dist/web-guest-access.js +5 -1
  338. package/dist/web-guest-access.js.map +1 -1
  339. package/dist/web-login.d.ts +6 -3
  340. package/dist/web-login.js +26 -15
  341. package/dist/web-login.js.map +1 -1
  342. package/dist/web-notices.d.ts +51 -0
  343. package/dist/web-notices.js +118 -0
  344. package/dist/web-notices.js.map +1 -0
  345. package/dist/web-office-pack-tools.d.ts +1 -1
  346. package/dist/web-office-pack-tools.js +1 -1
  347. package/dist/web-office-pack-tools.js.map +1 -1
  348. package/dist/web-only-fleet.d.ts +22 -0
  349. package/dist/web-only-fleet.js +13 -0
  350. package/dist/web-only-fleet.js.map +1 -0
  351. package/dist/web-preview.d.ts +32 -3
  352. package/dist/web-preview.js +52 -19
  353. package/dist/web-preview.js.map +1 -1
  354. package/dist/web-session-authorization.d.ts +13 -2
  355. package/dist/web-session-authorization.js +10 -3
  356. package/dist/web-session-authorization.js.map +1 -1
  357. package/dist/web-session.d.ts +12 -0
  358. package/dist/web-session.js +22 -8
  359. package/dist/web-session.js.map +1 -1
  360. package/dist/web-settings-patch.d.ts +3 -1
  361. package/dist/web-settings-patch.js +4 -1
  362. package/dist/web-settings-patch.js.map +1 -1
  363. package/dist/web-shell-routes.d.ts +2 -0
  364. package/dist/web-shell-routes.js +3 -0
  365. package/dist/web-shell-routes.js.map +1 -1
  366. package/launcher/agend-install.cjs +16 -2
  367. package/launcher/private-home.cjs +1 -1
  368. package/package.json +1 -1
@@ -4,6 +4,7 @@ import { AppIconStore } from "./web-app-icon.js";
4
4
  import { type NamedTestResult } from "./tunnel/named-link-test.js";
5
5
  import { OfficeShareService } from "./office-share-service.js";
6
6
  import { type OfficeShare } from "./office-share.js";
7
+ import type { PageShare } from "./page-share.js";
7
8
  import type { LoginCodeOwner } from "./web-login.js";
8
9
  import { type ProfileTicket } from "./runtime-cpu-profile.js";
9
10
  import type { CpuProfile } from "./cpu-profile.js";
@@ -14,6 +15,7 @@ import type { FleetConfig, RawFleetConfig, InstanceConfig, WebVerifiedAuthorityC
14
15
  import { type DeliveryStatus, type GuildEmoji, type GuildEmojiGroup, type ResolvedStatusEmojis } from "./status-emojis.js";
15
16
  import { type RouteTarget } from "./fleet-context.js";
16
17
  import { EventLog } from "./event-log.js";
18
+ import { type TopicDeleteOutcome } from "./instance-topic-delete.js";
17
19
  import { BackendAvailabilityStore, type AvailabilityProbes, type BackendAvailability } from "./backend-availability.js";
18
20
  import { AdapterWorld } from "./adapter-world.js";
19
21
  import { CostGuard } from "./cost-guard.js";
@@ -60,6 +62,7 @@ export declare function applyTaskListCap<T extends {
60
62
  } | T[];
61
63
  import { type PublicPreviewForUi } from "./web-api.js";
62
64
  import { type LogAnswer, type LogQuery } from "./log-service.js";
65
+ import { type ViewHistoryAnswer, type ViewHistoryQuery } from "./view-history.js";
63
66
  import { WebChatHistory, type WebChatPost } from "./web-chat-history.js";
64
67
  import { type WebEchoCopy } from "./web-reactions.js";
65
68
  import { SeenUsers, type MentionNames, type MentionQuery } from "./web-mentions.js";
@@ -86,6 +89,7 @@ import { WebBackendLogins, type SignInTarget } from "./web-backend-login.js";
86
89
  import { BrowserBackendSignIns } from "./browser-backend-signins.js";
87
90
  import { type RawConfigPatch } from "./settings-api.js";
88
91
  import { type AgentEndpointContext } from "./agent-endpoint.js";
92
+ import { AgentCredentials } from "./agent-credentials.js";
89
93
  import { ClassicChannelManager } from "./classic-channel-manager.js";
90
94
  import { type ExplicitInstanceRemoval } from "./instance-removal.js";
91
95
  import { type SessionOomRetry } from "./session-oom-stop.js";
@@ -100,6 +104,7 @@ import { type MemoryHog } from "./memory-hogs.js";
100
104
  import { type CacheReport } from "./cache-service.js";
101
105
  import { type WebCommandResult } from "./web-commands.js";
102
106
  import { type SessionRecord } from "./web-session.js";
107
+ import { WebNotices } from "./web-notices.js";
103
108
  import { VERIFIED_SESSION_HOURS, type HumanAuthority, type WebAuthorityRefusal, type WebAuthorityResult, type WebPeer } from "./authority/web-authority.js";
104
109
  import { type AuthorityState } from "./authority/authority-state.js";
105
110
  import { type SessionAuthorization } from "./authority/session-authorizations.js";
@@ -113,6 +118,7 @@ import { type CarryResult } from "./backend/claude-carry.js";
113
118
  import { StormWindow } from "./storm-window.js";
114
119
  import { SpawnGate } from "./spawn-gate.js";
115
120
  import { BackendOutageTracker } from "./backend-outage.js";
121
+ import { OwnStatusMessages } from "./chat-log-ids.js";
116
122
  /** #2348: how a guest sign-in code's issuance ended (issueGuestCode), for Settings → Guests' Send sign-in code. */
117
123
  export type GuestCodeOutcome = {
118
124
  kind: "sent";
@@ -164,6 +170,11 @@ export interface RestartOpts {
164
170
  sessionOomRetry?: SessionOomRetry;
165
171
  /** Internal pre-invalidation owner fence for an unclear-OOM action. */
166
172
  recoveryCurrent?: () => boolean;
173
+ /**
174
+ * #1490 row 27: the lifecycle the caller acts for (lifecyclePin), asked before anything is invalidated. A button or
175
+ * menu offered for one instance never restarts a later one of the same name, or one restarted since.
176
+ */
177
+ ownerCurrent?: () => boolean;
167
178
  carry?: {
168
179
  backend: string;
169
180
  from: string | null;
@@ -268,6 +279,11 @@ export type GuestAuditEntry = {
268
279
  name: string;
269
280
  outcome: string;
270
281
  };
282
+ /** #1490 row 27: a restart asked for one lifecycle of an instance after it was stopped, restarted or replaced. */
283
+ export declare class RestartSupersededError extends Error {
284
+ /** `shown`: the instance as the chat list names it (shownInstanceName). */
285
+ constructor(shown: string);
286
+ }
271
287
  export declare class FleetManager implements FleetContext, LifecycleContext, ArchiverContext, StatuslineWatcherContext, OutboundContext, AgentEndpointContext {
272
288
  dataDir: string;
273
289
  private static signalTarget;
@@ -435,6 +451,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
435
451
  private startupRetryNotices;
436
452
  /** Unsupported-CLI refusals waiting to go out, grouped by reason (#1109). */
437
453
  private unsupportedCliNotices;
454
+ private kiroCompatibilityHolds;
438
455
  private kiroIncompatNotices;
439
456
  /** Backoff between automatic startup retries; the last step repeats while the backend is down. */
440
457
  static readonly STARTUP_RETRY_BACKOFF_MS: number[];
@@ -462,6 +479,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
462
479
  private kiroMigrationRuns;
463
480
  /** #1386 "Needs you": the list, its live chat messages and Acknowledge. Started with the fleet (finishStartup). */
464
481
  private needsYou;
482
+ private missedOfflineStore;
465
483
  private configHistory;
466
484
  private configHistoryTimer;
467
485
  private loadedFleetSource;
@@ -570,11 +588,15 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
570
588
  private discordPresenceEagerPending;
571
589
  private discordPresenceInFlight;
572
590
  private static readonly DISCORD_PRESENCE_REFRESH_MS;
591
+ /** #3066 §1d: how often a fleet with no Discord bot reads the quota for its history (the user's choice: 30 min). */
592
+ static readonly QUOTA_BACKGROUND_READ_MS: number;
593
+ private quotaReadTimer;
573
594
  /** Days of event/activity history to keep. */
574
595
  private static readonly EVENT_LOG_RETENTION_DAYS;
575
596
  private watchdogTimer;
576
597
  private startupMemoryDeadline;
577
598
  private eventLoopWatch;
599
+ private stallReporter;
578
600
  private startedAt;
579
601
  private stormOpenNotifyTimer;
580
602
  private memoryLogAt;
@@ -615,6 +637,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
615
637
  private readonly webChatRemovals;
616
638
  /** #1774: a removal under way — its replies' fate waits for its outcome (success: theirs no more; failure: theirs). */
617
639
  private readonly webChatRemovalsPending;
640
+ /**
641
+ * #1490 row 27: "still the same lifecycle of `name`" — its lifecycle epoch, moved on synchronously by every stop,
642
+ * restart and removal (the map is never pruned, so a same-name replacement has a later one). Taken when a button
643
+ * or menu is claimed or offered, asked after every await before acting by name.
644
+ */
645
+ /** #1490 row 27: an instance as the chat list names it — its display name where it has one, else its name. */
646
+ private shownInstanceName;
647
+ private lifecyclePin;
618
648
  private webChatGeneration;
619
649
  /** #1774: who an instance's reply is from, taken when it is sent: the name's generation and its daemon then. */
620
650
  private webChatIdentity;
@@ -687,6 +717,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
687
717
  * `share` null with `count`: "Revoke all".
688
718
  */
689
719
  officeShareNotice(event: "created" | "revoked", who: string, share: OfficeShare | null, count: number): void;
720
+ /** #2911: the open page shares changed — the page hears it; each one handed out that ended is said in its channel. */
721
+ pageSharesChanged(_list: PageShare[], ended: PageShare[]): void;
722
+ /** #2911: a page share was made — said in the channel of the instance whose chat it came from (never its URL). */
723
+ pageShareNotice(who: string, share: PageShare): void;
690
724
  /** A share's owner: a person (`person:<adapter>:<user>`) still a fleet admin there; the host's own admin session stays. */
691
725
  private officeShareOwnerCurrent;
692
726
  private officeActsInstance?;
@@ -857,6 +891,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
857
891
  * startup-only key at startup. See checkStartupSignatureConsistency(). */
858
892
  private fleetSignatureMismatch;
859
893
  private healthServerListening;
894
+ private agentCredentialsCache?;
895
+ get agentCredentials(): AgentCredentials;
860
896
  constructor(dataDir: string);
861
897
  /** #1266: a reply's buttons — the store (reply-buttons.db) and what a click does. Created on first use. */
862
898
  private replyButtonsCtl;
@@ -1187,6 +1223,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1187
1223
  /** Board 003648ac: a web /compact followed to its end, from the transcript the Log reads (none: nothing to follow). */
1188
1224
  private compactWatchService;
1189
1225
  private get compactWatch();
1226
+ /**
1227
+ * Claude history in the View: an instance's earlier conversation for its View, from the transcript the Log reads —
1228
+ * the View's route applied its own access rules first (view-api.ts); the Log's switch plays no part.
1229
+ */
1230
+ viewHistory(name: string, q: ViewHistoryQuery): Promise<ViewHistoryAnswer | null>;
1190
1231
  /** #1218: GET /ui/steps — an instance's steps, read on demand (null: no such instance). */
1191
1232
  logSteps(name: string, q: LogQuery): Promise<LogAnswer | null>;
1192
1233
  /**
@@ -1560,6 +1601,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1560
1601
  * first unattended start and every scheduled retry.
1561
1602
  */
1562
1603
  private stopOnUnsupportedCli;
1604
+ /** No pane is needed for a compatibility refusal to remain in Needs you. */
1605
+ setKiroCompatibilityHold(name: string, message: string | null): void;
1563
1606
  /**
1564
1607
  * LifecycleContext: a kiro instance the installed kiro-cli cannot run as
1565
1608
  * configured (#1109) — at start, or at a respawn after kiro-cli replaced
@@ -2017,6 +2060,35 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2017
2060
  /** Start all instances from fleet config */
2018
2061
  startAll(configPath: string): Promise<void>;
2019
2062
  private startAllWithinDeadline;
2063
+ /**
2064
+ * #3066 §1d (the user: yes, every 30 min): the quota history (usage/quota-history.ts) records only the readings AgEnD
2065
+ * makes. A Discord bot's presence refresh reads every 15 min; without one, nothing reads while nobody looks. So, with no
2066
+ * Discord bot and while some account has a running agent, read every 30 min — the same cached read (its 5-minute TTL
2067
+ * still bounds the vendor calls), recorded like any other.
2068
+ */
2069
+ private startQuotaBackgroundReads;
2070
+ /** #3066 §1: the latest estimates, by `provider\0metric` (what usage-api's lookup reads, synchronously). */
2071
+ private capacityEstimates;
2072
+ private capacityTimer;
2073
+ static readonly CAPACITY_REFRESH_MS: number;
2074
+ /**
2075
+ * #3066 §1: estimate each account's weekly 100% from the quota history (§1d) and the usage ledger's hours — both read
2076
+ * asynchronously, the arithmetic small (usage/capacity.ts). An account is its usage provider id ("claude",
2077
+ * "claude:hsinlin", "codex:yanxianchen"): its hours are the ledger sources of that backend under that credential profile
2078
+ * (Codex's "unrecorded" hours are no account's). A per-model weekly ("Sonnet (weekly)") counts only that model's tokens.
2079
+ *
2080
+ * Prism #3073: no estimate rather than a wrong one —
2081
+ * - a window is measured only where the ledger has its hours: kept (31 days) and scanned (`days.coverage`) for every
2082
+ * instance of the account's backend, and every instance whose hours count for it; the quota history goes back 12 weeks;
2083
+ * - a profile literally named "default", "unknown" or "unrecorded" (configured, on disk, or in the quota history) makes
2084
+ * those hours ambiguous: neither the host
2085
+ * account nor the named one is estimated (each would be credited the other's use, or lose its own);
2086
+ * - only a metric the vendor marks per-model (`scope: "model"`) is filtered by model; another named weekly pool
2087
+ * ("Luna Reserve (weekly)", Antigravity pools) is no model name and is not estimated.
2088
+ */
2089
+ refreshCapacity(): Promise<number>;
2090
+ /** One background quota read, when nothing else reads (no Discord bot) and an account has a running agent. */
2091
+ backgroundQuotaRead(): Promise<boolean>;
2020
2092
  /** Keep Discord profile activity aligned with the same cached usage source as /usage. */
2021
2093
  private startDiscordUsagePresence;
2022
2094
  /**
@@ -2242,6 +2314,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2242
2314
  * copies retain their permissive handling when that identity is unknown.
2243
2315
  */
2244
2316
  private isOwnerCommandCopy;
2317
+ /** File a Telegram update that was too old to inject; Needs you lists it until Acknowledge. */
2318
+ private recordMissedOffline;
2245
2319
  /**
2246
2320
  * #1085: coincident topic numbers must not route across Telegram groups.
2247
2321
  */
@@ -2289,7 +2363,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2289
2363
  private handleOutboundFromInstance;
2290
2364
  /** Side effects of a routed reply: cancel-button lifecycle, logs, SSE, chat log. */
2291
2365
  /** No chat platform is configured at all: the web dashboard is the fleet's only surface. */
2292
- private isWebOnlyFleet;
2366
+ /** #2910: no Discord or Telegram connection at all (src/web-only-fleet.ts). */
2367
+ isWebOnlyFleet(): boolean;
2293
2368
  /** On a fleet with no chat platform, the dashboard is where an instance-health prompt is posted (#1307 item 6). */
2294
2369
  private webOnlyPromptPlace;
2295
2370
  /** Resolves when the reply is in the web chat (#1770: after its files are copied); the caller need not wait. */
@@ -2398,6 +2473,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2398
2473
  * of the schedule response on IPC.
2399
2474
  */
2400
2475
  private performScheduleOp;
2476
+ /**
2477
+ * `post_decision` with `supersedes` changes a decision someone else may have recorded (it stops being active): the
2478
+ * same permission as `update_decision`, asked through the same live check (tool set + dashboard switches), on both
2479
+ * create paths. An empty or absent value supersedes nothing and needs nothing; anything else must be an id.
2480
+ */
2481
+ private decisionSupersedes;
2401
2482
  handleDecisionCrudHttp(instance: string, op: string, args: Record<string, unknown>): Promise<unknown>;
2402
2483
  handleTaskCrudHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
2403
2484
  handleSetDisplayNameHttp(instance: string, name: string): Promise<unknown>;
@@ -2413,7 +2494,41 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2413
2494
  private handleTaskCrud;
2414
2495
  /** Create a forum topic via the adapter. Returns the message_thread_id. */
2415
2496
  createForumTopic(topicName: string, adapterId?: string): Promise<number | string>;
2416
- deleteForumTopic(topicId: number | string, adapterId?: string): Promise<void>;
2497
+ /**
2498
+ * Delete an agent and, unless asked not to, its own chat topic (user decision: by default). The topic is planned
2499
+ * before the removal (its id and bot go with the fleet.yaml entry) and deleted through the agent's OWN bot after it;
2500
+ * the outcome is the platform's answer (instance-topic-delete.ts). A topic that cannot go never fails the removal.
2501
+ */
2502
+ removeInstanceAndTopic(name: string, authorization: ExplicitInstanceRemoval, opts: {
2503
+ deleteTopic: boolean;
2504
+ execution?: SettingsExecution;
2505
+ }): Promise<TopicDeleteOutcome>;
2506
+ /** #3055: destinations whose platform deletion is running now; a binding to one waits until it is over. */
2507
+ private readonly topicDeletionsInFlight;
2508
+ /** True while a topic with this id is being deleted on any connection (a new binding of it is refused meanwhile). */
2509
+ isTopicDeletionInFlight(topicId: number | string): boolean;
2510
+ /**
2511
+ * #3055 review r2 (Prism P1-3): would this instance config bind a topic whose deletion is running now? Compared by
2512
+ * physical destination, so the same thread number in another Telegram group is not held. Settings asks it at commit.
2513
+ */
2514
+ topicBindingInFlight(inst: {
2515
+ channel_id?: unknown;
2516
+ topic_id?: unknown;
2517
+ }): boolean;
2518
+ /** Any topic deletion running now (a connection's group or General may not be re-pointed meanwhile). */
2519
+ topicDeletionPending(): boolean;
2520
+ /** The physical destination of `topicId` on the bot `adapterId`. */
2521
+ private destinationFor;
2522
+ /** The adapter of the bot `adapterId` names — never a substitute for a bot that is not there. */
2523
+ private instanceTopicAdapter;
2524
+ /**
2525
+ * Topic ownership by physical destination (#3055 review, Prism P1): an instance's topic is where its bot's platform
2526
+ * puts it (a Telegram group + thread, a Discord channel), so two bots in one group, or two instances on one
2527
+ * channel, are seen to share it; and every connection's own General is protected, with or without a General agent.
2528
+ */
2529
+ private topicOwnership;
2530
+ /** What deleting `name`'s topic would act on: its own bot only — a bot that is not there is never substituted. */
2531
+ private planInstanceTopicDelete;
2417
2532
  getForumTopicDeleter(adapterId?: string): ((topicId: number | string) => Promise<void>) | null;
2418
2533
  private topicCleanupTimer;
2419
2534
  private sessionPruneTimer;
@@ -2852,6 +2967,16 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2852
2967
  notifyFleetError(text: string, opts?: {
2853
2968
  throttle?: boolean;
2854
2969
  }): boolean;
2970
+ private webNotices;
2971
+ /** #2910 D2 (web-api): the Notices on a web-only fleet; null on any other (its General says them). */
2972
+ webNoticesFeed(): WebNotices | null;
2973
+ /** #2910 D2: the web-only fleet's Notices (web-notices.json), read on first use. */
2974
+ webNoticeStore(): WebNotices | null;
2975
+ /**
2976
+ * #2910 D2: on a web-only fleet (no chat connection at all), keep what General or an agent's topic would have been
2977
+ * told as a Notice, and push it to the dashboard. False on any other fleet (its chat says it; nothing is kept).
2978
+ */
2979
+ private recordWebNotice;
2855
2980
  private static readonly FLEET_ERROR_THROTTLE_MS;
2856
2981
  private fleetErrorNotices;
2857
2982
  /**
@@ -3144,6 +3269,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3144
3269
  ok: false;
3145
3270
  refusal: WebAuthorityRefusal;
3146
3271
  };
3272
+ /**
3273
+ * #2910 D1 (auth-api, at sign-in): a web-only fleet's host session — signed in with the host's own code (`agend web
3274
+ * --code`) on this computer — is the host operator, authorized from now for max_session_hours (as an account's
3275
+ * Confirm would be), under the current epoch: a revocation ends it, and only a new sign-in on this computer gives it
3276
+ * again. A fleet with a chat connection, another session, or another peer: nothing (§3 as before).
3277
+ */
3278
+ authorizeHostSession(session: SessionRecord, peer: WebPeer): void;
3147
3279
  private authorityStateStore;
3148
3280
  /**
3149
3281
  * #1939 §10: the switch, "Only this computer can authorize" and the revocation epoch in force for the configuration as
@@ -3382,9 +3514,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3382
3514
  * Make a tool summary safe to paste into a channel message.
3383
3515
  *
3384
3516
  * The text is agent-controlled (it is built from tool inputs — file paths,
3385
- * shell commands), so it gets flattened to one line, capped, and stripped of
3386
- * the two Discord mass-mention triggers. Neither channel renders it with a
3387
- * parse mode, so no markup escaping is needed beyond that.
3517
+ * shell commands), so it gets flattened to one line, secrets masked, capped,
3518
+ * and stripped of the two Discord mass-mention triggers. Masking comes BEFORE
3519
+ * the cap: a cap can cut a mask's context but must never be what hides (or
3520
+ * fails to hide) a secret. Neither channel renders it with a parse mode, so no
3521
+ * markup escaping is needed beyond that.
3388
3522
  */
3389
3523
  private static sanitizeActivity;
3390
3524
  /**
@@ -3424,6 +3558,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3424
3558
  */
3425
3559
  /** Configured threshold before elapsed time appears, in ms. */
3426
3560
  progressMinElapsedMs(): number;
3561
+ /** M-2391: when the instance's live (not retiring) bubble started — the current turn's start — or undefined. */
3562
+ private liveButtonStart;
3427
3563
  private startProgressTicker;
3428
3564
  /**
3429
3565
  * After a reply: give the instance REPLY_RETIRE_GRACE_MS to resume working; if
@@ -3614,6 +3750,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3614
3750
  /** "Resend token" button (web login): only the requester may press it; the token never enters the channel. */
3615
3751
  private handleLoginTokenResend;
3616
3752
  private activeInstall;
3753
+ /** M-2281: how long `/login`'s install window may run (a field so a smoke can shorten it). */
3754
+ installTimeoutMs: number;
3617
3755
  /** An install that succeeded, between its success line and the sign-in it hands over to (#1131). */
3618
3756
  private installHandoff;
3619
3757
  /** Start a CLI install session. Caller enforces admin. */
@@ -3628,6 +3766,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3628
3766
  }): Promise<string>;
3629
3767
  /** Whether this backend's CLI is on the fleet's PATH (what `/login` installs when it is not). */
3630
3768
  isCliInstalled(backend: string): boolean;
3769
+ /** M-2281: isCliInstalled without holding the fleet loop (a chat click's path: `which` on a slow PATH can take seconds). */
3770
+ isCliInstalledOffLoop(backend: string): Promise<boolean>;
3631
3771
  /** Abort the active install (`/login cancel`) and remove its window. */
3632
3772
  cancelInstallSession(): Promise<string>;
3633
3773
  /** `command -v` on a login shell, so PATH additions from rc files count. */
@@ -3639,12 +3779,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3639
3779
  */
3640
3780
  private locateBinaryOnLoginShell;
3641
3781
  /**
3642
- * #1092: the binary in one of the directories its own installer installs to,
3643
- * when no login shell can see it (the installer recorded its PATH in an
3644
- * interactive-only rc file). The same executable-file check as the login
3645
- * shell lookup; a symlink to an executable counts, as codex's launcher is one.
3782
+ * #1092: the binary in one of the directories its own installer installs to, when no login shell can see it (the
3783
+ * installer recorded its PATH in an interactive-only rc file) — only those directories (#1092). #3009: through
3784
+ * backend-availability's install-directory check (the one resolveBackendBinary uses): one killable child, never
3785
+ * accessSync/statSync on the fleet's thread. An executable file counts, a symlink to one too (codex's launcher is one).
3646
3786
  */
3647
- private locateInInstallerBinDirs;
3787
+ private locateInstalledBackend;
3648
3788
  /** Put an installed binary's directory on the fleet's PATH (#1059), once. */
3649
3789
  private adoptBinaryDirectory;
3650
3790
  /** Discord native `/login` slash — shared by every adapter dispatch block. */
@@ -3759,6 +3899,22 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3759
3899
  * text is its command path — and other sources pass through untouched.
3760
3900
  */
3761
3901
  private replyDiscordNotACommand;
3902
+ /** #2940: this fleet's own status bubbles and the messages the platform said were deleted (ids, never text). */
3903
+ readonly ownStatusMessages: OwnStatusMessages;
3904
+ /**
3905
+ * #2940: a status bubble of ours was posted: never logged, and a line already logged for it (by a sibling bot) goes.
3906
+ * Discord only (#2943 review: the only platform where our bots see each other's posts), keyed by channel and id.
3907
+ */
3908
+ private noteOwnStatusMessage;
3909
+ /** #2940: Discord says a message was deleted — its chat-log line goes, and it is never logged after this. */
3910
+ onPlatformMessageDeleted(e: {
3911
+ messageId?: string;
3912
+ channelId?: string;
3913
+ } | undefined): void;
3914
+ /** #2940: the key a Discord message's chat-log line is kept under (none for another platform: nothing is tracked). */
3915
+ private chatLogKey;
3916
+ /** #2940: whether `msg` must not enter the chat log (only its key is looked at; the debug trail names keys, not text). */
3917
+ private chatLogExcludes;
3762
3918
  /** Handle a message in a classic channel: log it, forward only /chat messages */
3763
3919
  private handleClassicChannelMessage;
3764
3920
  /** Download photo or document attachment to classic instance workspace inbox. Returns { path, kind } or undefined. */
@@ -3961,8 +4117,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3961
4117
  * restart backends only read it at launch, so it is persisted and the
3962
4118
  * instance respawns.
3963
4119
  */
3964
- applyEffort(instanceName: string, requested: string): Promise<string>;
3965
- applyModel(instanceName: string, model: string): Promise<string>;
4120
+ applyEffort(instanceName: string, requested: string, opts?: {
4121
+ current?: () => boolean;
4122
+ }): Promise<string>;
4123
+ applyModel(instanceName: string, model: string, opts?: {
4124
+ current?: () => boolean;
4125
+ }): Promise<string>;
3966
4126
  /** Save an instance's model (fleet.yaml, or its ClassicBot channel). False when neither holds it. */
3967
4127
  private persistInstanceModel;
3968
4128
  /**