@songsid/agend 2.4.0-beta.21 → 2.4.0-beta.23

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 (276) hide show
  1. package/dist/agent-whats-new.js +6 -0
  2. package/dist/agent-whats-new.js.map +1 -1
  3. package/dist/auth-api.d.ts +2 -0
  4. package/dist/auth-api.js +5 -2
  5. package/dist/auth-api.js.map +1 -1
  6. package/dist/authority/web-authority.d.ts +17 -3
  7. package/dist/authority/web-authority.js +56 -3
  8. package/dist/authority/web-authority.js.map +1 -1
  9. package/dist/backend/claude-code.js +3 -0
  10. package/dist/backend/claude-code.js.map +1 -1
  11. package/dist/build-provenance.json +1 -1
  12. package/dist/cache-ledger.d.ts +23 -21
  13. package/dist/cache-ledger.js +70 -6
  14. package/dist/cache-ledger.js.map +1 -1
  15. package/dist/cache-prices.d.ts +8 -6
  16. package/dist/cache-prices.js +12 -5
  17. package/dist/cache-prices.js.map +1 -1
  18. package/dist/cache-service.d.ts +9 -5
  19. package/dist/cache-service.js +202 -50
  20. package/dist/cache-service.js.map +1 -1
  21. package/dist/channel/mcp-tools.js +8 -1
  22. package/dist/channel/mcp-tools.js.map +1 -1
  23. package/dist/classic-channel-manager.d.ts +1 -1
  24. package/dist/classic-channel-manager.js +2 -2
  25. package/dist/classic-channel-manager.js.map +1 -1
  26. package/dist/cli-audited.js +2 -1
  27. package/dist/cli-audited.js.map +1 -1
  28. package/dist/cli.js +4 -1
  29. package/dist/cli.js.map +1 -1
  30. package/dist/contact-auth-api.js +3 -1
  31. package/dist/contact-auth-api.js.map +1 -1
  32. package/dist/contact-auth-policy.js +1 -1
  33. package/dist/contact-auth-policy.js.map +1 -1
  34. package/dist/contact-auth-service.js +8 -2
  35. package/dist/contact-auth-service.js.map +1 -1
  36. package/dist/contact-auth-store.d.ts +31 -2
  37. package/dist/contact-auth-store.js +106 -12
  38. package/dist/contact-auth-store.js.map +1 -1
  39. package/dist/contact-auth-types.d.ts +3 -2
  40. package/dist/contact-auth-types.js.map +1 -1
  41. package/dist/contact-change-proposals.d.ts +18 -1
  42. package/dist/contact-change-proposals.js +41 -6
  43. package/dist/contact-change-proposals.js.map +1 -1
  44. package/dist/contact-state-view.d.ts +103 -0
  45. package/dist/contact-state-view.js +80 -0
  46. package/dist/contact-state-view.js.map +1 -0
  47. package/dist/daemon.d.ts +31 -0
  48. package/dist/daemon.js +149 -2
  49. package/dist/daemon.js.map +1 -1
  50. package/dist/delivery-outbox.d.ts +10 -0
  51. package/dist/delivery-outbox.js +21 -0
  52. package/dist/delivery-outbox.js.map +1 -1
  53. package/dist/fleet-manager.d.ts +183 -15
  54. package/dist/fleet-manager.js +628 -96
  55. package/dist/fleet-manager.js.map +1 -1
  56. package/dist/general-knowledge/skills/admin/SKILL.md +52 -0
  57. package/dist/general-knowledge/skills/concepts/SKILL.md +14 -17
  58. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +6 -3
  59. package/dist/general-knowledge/skills/hub/SKILL.md +12 -4
  60. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +54 -9
  61. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
  62. package/dist/general-role.d.ts +1 -1
  63. package/dist/general-role.js +1 -0
  64. package/dist/general-role.js.map +1 -1
  65. package/dist/hub/agent-pictures-model.d.ts +128 -0
  66. package/dist/hub/agent-pictures-model.js +43 -4
  67. package/dist/hub/agent-pictures-model.js.map +1 -1
  68. package/dist/hub/agent-pictures.d.ts +14 -2
  69. package/dist/hub/agent-pictures.js +65 -12
  70. package/dist/hub/agent-pictures.js.map +1 -1
  71. package/dist/hub/client.d.ts +2 -0
  72. package/dist/hub/client.js +14 -2
  73. package/dist/hub/client.js.map +1 -1
  74. package/dist/hub/compose/member.d.ts +6 -2
  75. package/dist/hub/compose/member.js +19 -6
  76. package/dist/hub/compose/member.js.map +1 -1
  77. package/dist/hub/compose/server.d.ts +5 -5
  78. package/dist/hub/compose/server.js +6 -3
  79. package/dist/hub/compose/server.js.map +1 -1
  80. package/dist/hub/group-policy/resources.d.ts +1 -1
  81. package/dist/hub/http/compose.d.ts +3 -0
  82. package/dist/hub/http/compose.js +14 -7
  83. package/dist/hub/http/compose.js.map +1 -1
  84. package/dist/hub/http/deps.d.ts +1 -0
  85. package/dist/hub/http/schema.js +2 -1
  86. package/dist/hub/http/schema.js.map +1 -1
  87. package/dist/hub/init/text.js +1 -1
  88. package/dist/hub/mcp/policy.d.ts +1 -1
  89. package/dist/hub/member/agent-pictures.d.ts +34 -1
  90. package/dist/hub/member/agent-pictures.js +80 -9
  91. package/dist/hub/member/agent-pictures.js.map +1 -1
  92. package/dist/hub/member/room-ask.d.ts +22 -1
  93. package/dist/hub/member/room-ask.js +99 -5
  94. package/dist/hub/member/room-ask.js.map +1 -1
  95. package/dist/hub/member/room-asker-store.d.ts +48 -0
  96. package/dist/hub/member/room-asker-store.js +181 -0
  97. package/dist/hub/member/room-asker-store.js.map +1 -0
  98. package/dist/hub/protocol.d.ts +152 -0
  99. package/dist/hub/protocol.js +6 -1
  100. package/dist/hub/protocol.js.map +1 -1
  101. package/dist/hub/question-close-model.d.ts +17 -0
  102. package/dist/hub/question-close-model.js +7 -0
  103. package/dist/hub/question-close-model.js.map +1 -0
  104. package/dist/hub/representative.d.ts +15 -0
  105. package/dist/hub/representative.js +64 -1
  106. package/dist/hub/representative.js.map +1 -1
  107. package/dist/hub/room-asker-identity-model.d.ts +53 -0
  108. package/dist/hub/room-asker-identity-model.js +14 -0
  109. package/dist/hub/room-asker-identity-model.js.map +1 -0
  110. package/dist/hub/room-asker-identity.d.ts +22 -0
  111. package/dist/hub/room-asker-identity.js +43 -0
  112. package/dist/hub/room-asker-identity.js.map +1 -0
  113. package/dist/hub/rooms/agents.js +16 -0
  114. package/dist/hub/rooms/agents.js.map +1 -1
  115. package/dist/hub/rooms/asker-identity.d.ts +21 -0
  116. package/dist/hub/rooms/asker-identity.js +86 -0
  117. package/dist/hub/rooms/asker-identity.js.map +1 -0
  118. package/dist/hub/rooms/direct-view.js +1 -0
  119. package/dist/hub/rooms/direct-view.js.map +1 -1
  120. package/dist/hub/rooms/office.d.ts +18 -0
  121. package/dist/hub/rooms/office.js +3 -1
  122. package/dist/hub/rooms/office.js.map +1 -1
  123. package/dist/hub/rooms/service.d.ts +6 -0
  124. package/dist/hub/rooms/service.js +19 -0
  125. package/dist/hub/rooms/service.js.map +1 -1
  126. package/dist/hub/rooms/types.d.ts +1 -1
  127. package/dist/hub/rooms.d.ts +3 -0
  128. package/dist/hub/rooms.js +27 -1
  129. package/dist/hub/rooms.js.map +1 -1
  130. package/dist/hub/server.js +12 -2
  131. package/dist/hub/server.js.map +1 -1
  132. package/dist/hub/types.d.ts +3 -2
  133. package/dist/hub-character-plan.d.ts +47 -0
  134. package/dist/hub-character-plan.js +70 -0
  135. package/dist/hub-character-plan.js.map +1 -0
  136. package/dist/hub-contact-windows.d.ts +13 -1
  137. package/dist/hub-contact-windows.js +35 -2
  138. package/dist/hub-contact-windows.js.map +1 -1
  139. package/dist/hub-picture-reduce.d.ts +21 -1
  140. package/dist/hub-picture-reduce.js +65 -13
  141. package/dist/hub-picture-reduce.js.map +1 -1
  142. package/dist/hub-picture-worker.js +12 -4
  143. package/dist/hub-picture-worker.js.map +1 -1
  144. package/dist/human-delivery-receipts.d.ts +12 -2
  145. package/dist/human-delivery-receipts.js +19 -4
  146. package/dist/human-delivery-receipts.js.map +1 -1
  147. package/dist/instructions.d.ts +1 -1
  148. package/dist/instructions.js +1 -1
  149. package/dist/instructions.js.map +1 -1
  150. package/dist/locale.js +367 -275
  151. package/dist/locale.js.map +1 -1
  152. package/dist/ls-rows.d.ts +2 -0
  153. package/dist/ls-rows.js.map +1 -1
  154. package/dist/needs-you.d.ts +4 -0
  155. package/dist/needs-you.js +3 -2
  156. package/dist/needs-you.js.map +1 -1
  157. package/dist/office-share-page.js +1 -1
  158. package/dist/office-share-page.js.map +1 -1
  159. package/dist/outbound-handlers.d.ts +8 -0
  160. package/dist/outbound-handlers.js +56 -7
  161. package/dist/outbound-handlers.js.map +1 -1
  162. package/dist/outbound-schemas.d.ts +2 -1
  163. package/dist/outbound-schemas.js +3 -2
  164. package/dist/outbound-schemas.js.map +1 -1
  165. package/dist/public-web-gateway.js +18 -0
  166. package/dist/public-web-gateway.js.map +1 -1
  167. package/dist/reply-buttons-controller.d.ts +2 -1
  168. package/dist/reply-buttons-controller.js +1 -1
  169. package/dist/reply-buttons-controller.js.map +1 -1
  170. package/dist/runtime-cli-install.js +4 -4
  171. package/dist/runtime-cli-install.js.map +1 -1
  172. package/dist/tips.js +3 -3
  173. package/dist/tool-permissions.js +1 -1
  174. package/dist/tool-permissions.js.map +1 -1
  175. package/dist/ui/accounts-keepalive.js +2 -1
  176. package/dist/ui/agent-export-strings.js +1 -1
  177. package/dist/ui/agent-page-strings.js +5 -5
  178. package/dist/ui/chat-activity.js +2 -1
  179. package/dist/ui/chat-pins.js +2 -1
  180. package/dist/ui/claude-credentials.js +2 -1
  181. package/dist/ui/contact-auth-client.js +2 -2
  182. package/dist/ui/contact-auth-strings.js +28 -17
  183. package/dist/ui/contact-authorizations.js +6 -4
  184. package/dist/ui/contact-needs.js +6 -1
  185. package/dist/ui/contact-permissions.js +6 -4
  186. package/dist/ui/contact-tool-groups.js +1 -1
  187. package/dist/ui/contact-verify-need.js +46 -0
  188. package/dist/ui/fleet-cache.js +7 -6
  189. package/dist/ui/fleet-canvas.js +1 -1
  190. package/dist/ui/fleet-office-card.js +26 -2
  191. package/dist/ui/fleet-office-layout.js +2 -2
  192. package/dist/ui/fleet-office-skin.js +26 -6
  193. package/dist/ui/fleet-office-view.js +32 -0
  194. package/dist/ui/fleet-office-zones.js +22 -9
  195. package/dist/ui/fleet-office.js +92 -29
  196. package/dist/ui/fleet-org.js +9 -4
  197. package/dist/ui/fleet-tab-icons.js +19 -0
  198. package/dist/ui/fleet-task-activity.js +2 -1
  199. package/dist/ui/fleet-task-common.js +2 -2
  200. package/dist/ui/fleet-task-view.js +2 -1
  201. package/dist/ui/fleet-usage.js +8 -7
  202. package/dist/ui/hub-admin-overview.js +3 -2
  203. package/dist/ui/hub-agent-intro.js +2 -1
  204. package/dist/ui/hub-assistant-admin.js +2 -1
  205. package/dist/ui/hub-chat-strings.js +1 -1
  206. package/dist/ui/hub-directory-notices.js +2 -1
  207. package/dist/ui/hub-enrolment-code.js +2 -1
  208. package/dist/ui/hub-my-agents-strings.js +2 -2
  209. package/dist/ui/hub-my-agents.js +3 -2
  210. package/dist/ui/hub-quick-pairing.js +2 -1
  211. package/dist/ui/hub-role-audit.js +2 -1
  212. package/dist/ui/hub-role-forms.js +3 -2
  213. package/dist/ui/hub-role-view.js +3 -2
  214. package/dist/ui/hub-roles.js +2 -1
  215. package/dist/ui/hub-room-agent-strings.js +2 -1
  216. package/dist/ui/hub-room-list.js +2 -1
  217. package/dist/ui/hub-room-office.js +70 -2
  218. package/dist/ui/hub-room-owner-requests.js +2 -1
  219. package/dist/ui/hub-room-pins.js +2 -1
  220. package/dist/ui/hub-room-presence.js +5 -0
  221. package/dist/ui/hub-room-strings.js +2 -2
  222. package/dist/ui/hub-room-thread.js +1 -1
  223. package/dist/ui/log-row.js +4 -3
  224. package/dist/ui/office-share-dialog.js +2 -1
  225. package/dist/ui/office-share-page.js +2 -1
  226. package/dist/ui/page-share-dialog.js +3 -2
  227. package/dist/ui/panel-chat.js +2 -1
  228. package/dist/ui/panel-details.js +2 -1
  229. package/dist/ui/panel-fleet.js +15 -10
  230. package/dist/ui/panel-hub.js +2 -1
  231. package/dist/ui/panel-log.js +3 -3
  232. package/dist/ui/panel-needs.js +31 -3
  233. package/dist/ui/panel-notices.js +2 -1
  234. package/dist/ui/panel-runtimes.js +4 -3
  235. package/dist/ui/panel-windows-cli.js +3 -2
  236. package/dist/ui/runtime-cli-install.js +3 -2
  237. package/dist/ui/runtime-update-status.js +1 -1
  238. package/dist/ui/settings-access-strings.js +1 -1
  239. package/dist/ui/settings-appearance.js +2 -1
  240. package/dist/ui/settings-guests.js +4 -3
  241. package/dist/ui/settings-hub-member-address.js +2 -1
  242. package/dist/ui/settings-hub-setup-strings.js +1 -1
  243. package/dist/ui/settings-hub-setup.js +2 -1
  244. package/dist/ui/settings-hub-web-address.js +2 -1
  245. package/dist/ui/settings-hub.js +2 -1
  246. package/dist/ui/settings-layout.js +2 -2
  247. package/dist/ui/settings-named-test.js +16 -16
  248. package/dist/ui/settings-public-session-strings.js +2 -2
  249. package/dist/ui/settings-revoke-strings.js +1 -1
  250. package/dist/ui/settings-shared-strings.js +2 -2
  251. package/dist/ui/settings-strings.js +40 -40
  252. package/dist/ui/settings-update.js +2 -1
  253. package/dist/ui/settings-web-authority.js +2 -1
  254. package/dist/ui/shared/agent-sheet.js +2 -1
  255. package/dist/ui/shared/app-session.js +4 -3
  256. package/dist/ui/shared/app-shell.js +7 -3
  257. package/dist/ui/shared/app.css +60 -11
  258. package/dist/ui/shared/chat-strings.js +8 -8
  259. package/dist/ui/shared/chat-time.js +7 -4
  260. package/dist/ui/shared/clock-text.js +57 -0
  261. package/dist/ui/shared/device-roles.js +6 -5
  262. package/dist/ui/shared/instance-nav.js +31 -2
  263. package/dist/ui/shared/usage-dialog.js +2 -1
  264. package/dist/ui/shared/view-strings.js +13 -9
  265. package/dist/ui/shared/web-authorize.js +3 -2
  266. package/dist/ui/subagent-row.js +2 -1
  267. package/dist/web-api.d.ts +15 -2
  268. package/dist/web-api.js +62 -13
  269. package/dist/web-api.js.map +1 -1
  270. package/dist/web-login.d.ts +6 -1
  271. package/dist/web-login.js +8 -3
  272. package/dist/web-login.js.map +1 -1
  273. package/dist/web-session-authorization.d.ts +3 -0
  274. package/dist/web-session-authorization.js +1 -1
  275. package/dist/web-session-authorization.js.map +1 -1
  276. package/package.json +1 -1
@@ -1,12 +1,13 @@
1
+ type HubHeldCloseOutcome = import("./hub/question-close-model.js").HubHeldCloseOutcome;
1
2
  import { type HostAlertSettings } from './host-monitoring-alert-settings.js';
2
3
  import { type SetupTokenOwner, type SetupTokenRequest } from "./claude-setup-token.js";
3
4
  import { type ClaudeCredentialKind, type ClaudeCredentialMetadata, type CredentialActor } from "./claude-credential-vault.js";
4
5
  import { type ContactFileLease } from "./contact-auth-files.js";
5
- import { type ContactOriginClear, type ContactPerson, type ContactPermissions, type ContactPermissionsWrite, type ContactTicketDecision } from "./contact-auth-types.js";
6
+ import { type ContactOriginClear, type ContactPerson, type ContactPermissions, type ContactPermissionsWrite, type ContactTicket, type ContactTicketDecision } from "./contact-auth-types.js";
6
7
  import { type HubSharingController } from "./hub-sharing-notice.js";
7
8
  import { type SettingsSummaryPresentation } from "./settings-summary.js";
8
9
  import { AgentRuntimeChanges } from "./agent-runtime-change.js";
9
- import { type HumanOrigin } from "./human-delivery-receipts.js";
10
+ import { type WebSessionIdentity, type HumanOrigin } from "./human-delivery-receipts.js";
10
11
  import { SettingsConfirmationStore, type SettingsPendingView } from "./settings-confirmation.js";
11
12
  import { type GeneralSwitchInput } from "./general-binding.js";
12
13
  import { SettingsExecution } from "./settings-transaction.js";
@@ -614,6 +615,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
614
615
  * else the agent's own). Cheap keys only: the bytes are read when a key changes (hub/member/agent-pictures.ts).
615
616
  */
616
617
  private hubPictureSources;
618
+ /**
619
+ * M-3533 R2c: the agent's own character (hub-character-plan.ts ownCharacter): the set its owner gave it by name in
620
+ * the first of these offices (their own order) holding it, else in the "All" office's pack. The key is that pack's version
621
+ * and the set's name: a changed pack, set or office changes it; the pictures are read and cut only then.
622
+ */
623
+ private hubCharacterSource;
617
624
  /** The actual launch target, including Classic's own effective backend/folder; never aliases a room to a Fleet topic. */
618
625
  private hubAgentConfig;
619
626
  private hubClassicPrivacy;
@@ -675,7 +682,35 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
675
682
  private forgetHubAgentIncarnation;
676
683
  private hubContactWindows;
677
684
  private contactWindows;
685
+ /**
686
+ * M-3660: each agent's running Hub answer turn as its daemon tells it (re-told on every connect): a correlation id, or
687
+ * null for "confirmed none". An agent missing here is unknown (this fleet has not heard from its daemon since it
688
+ * started): nothing settled lifts its windows then — they hold until the daemon says (Prism #4420 P2-1).
689
+ */
690
+ private readonly hubAnswerTurns;
691
+ /**
692
+ * M-3660: the agent's daemon is about to write a Hub question into its idle pane: the answer turn's window opens (none for
693
+ * a share that opted out). A window that cannot be saved still holds in memory: fail closed.
694
+ */
695
+ private hubQuestionInput;
696
+ /** M-3660: that answer turn is over (its idle edge, or the next turn's write): the window closes, whatever came of it. */
697
+ private hubQuestionTurnEnded;
698
+ /**
699
+ * M-3660: what the daemon says on (re)connect — the turn it is answering now, or none. A lost hub_question_input or
700
+ * hub_question_turn_ended (a stale connection, a fleet or daemon restart) is made good here: with no turn running every
701
+ * window of the agent ends; with one, that one holds and the rest end.
702
+ */
703
+ private hubQuestionTurnState;
704
+ /** M-3660: a daemon's Hub turn signal (from its current connection). "unknown" (an unreadable turn record) changes nothing. */
705
+ private hubTurnSignal;
706
+ /** M-3660: the agent's daemon has told this fleet its current turn, and it is not this question (unknown is never "none"). */
707
+ private hubAnswerTurnKnownNone;
708
+ /** M-3660: a settled question lifts its window only outside its own running answer turn; inside it, the turn's end does. */
709
+ private hubSettledOutsideTurn;
710
+ /** M-3660: the member side's "this question is no longer being answered" reader (null: no member service attached). */
711
+ private hubQuestionSettled;
678
712
  hubContactRestricted(agent: string): boolean;
713
+ hubContactQuestion(agent: string): string | null;
679
714
  /**
680
715
  * M-3313 (#4145 for the Hub): what a Hub question or room notification hands the agent, with this fleet's sign-in
681
716
  * access token hidden (exact match, as a chat's). The live one is taken back and replaced, and the sign-in's chat told.
@@ -982,6 +1017,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
982
1017
  private signInKeepAlive;
983
1018
  private hubExecutionAttention;
984
1019
  /** M-3632: the member's "Try again" for a held Hub question (null while no member runs). */
1020
+ private hubHeldClose;
985
1021
  private hubHeldRetry;
986
1022
  private missedOfflineStore;
987
1023
  private configHistory;
@@ -1417,7 +1453,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1417
1453
  retryAfterMs?: number;
1418
1454
  };
1419
1455
  /**
1420
- * alpha.2 (M-2300; #2973's agent requests, junsion's §6): on a fleet with no chat connection there is no General to
1456
+ * alpha.2 (M-2300; #2973's agent requests, a colleague's §6): on a fleet with no chat connection there is no General to
1421
1457
  * post an agent's Windows request in — it waited for `agend settings confirm` on the host. Its owner (decision
1422
1458
  * 28c2d3a3: the `agend web --code` session on this computer, web-verified) now sees and decides it from the web's
1423
1459
  * Needs you. The authority is asked from the request each time, and again at execution by the store (`current`):
@@ -1716,6 +1752,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1716
1752
  downloadRoomAttachment(instance: string, fileId: string): Promise<string>;
1717
1753
  configureClassicRestriction(name: string, daemon: Daemon): void;
1718
1754
  private contactGeneration;
1755
+ /** Eligible connections share a platform; the current Fleet-admin gate still decides each user's role. */
1756
+ private contactAdminAdapterIds;
1757
+ /** Contact permissions identify a person by platform/user; sibling bot connections do not create new people. */
1758
+ private contactDefaultApprovers;
1719
1759
  contactAdminOf(name: string, actor: ContactPerson): boolean;
1720
1760
  private contactService;
1721
1761
  private contactDeliveryCurrent;
@@ -1724,11 +1764,93 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1724
1764
  writeContactPermissions(name: string, raw: ContactPermissionsWrite, actor: ContactPerson): ContactPermissions;
1725
1765
  clearContactOrigin(name: string, raw: ContactOriginClear, actor: ContactPerson): ContactPermissions;
1726
1766
  /** General can propose only. The platform callback supplies the human actor. */
1767
+ /** M-3693: what contact permissions hold now, for General (read-only; no write, no identity computed here). */
1768
+ contactState(agent?: string): {
1769
+ held: Record<string, unknown>[];
1770
+ held_truncated?: string | undefined;
1771
+ grants: {
1772
+ grant_id: string;
1773
+ target: string;
1774
+ revision: number;
1775
+ person: string;
1776
+ from: string;
1777
+ verbs: import("./contact-auth-types.js").ContactVerb[];
1778
+ expires_at: string;
1779
+ remaining_uses: number | null;
1780
+ current: boolean;
1781
+ }[];
1782
+ rooms: {
1783
+ room: string;
1784
+ mode: string;
1785
+ stored_as: "legacy" | "restricted";
1786
+ revision: number;
1787
+ }[];
1788
+ retained_origins: {
1789
+ agent: string;
1790
+ kind: "mixed" | "unknown";
1791
+ people: string[];
1792
+ chain: string[];
1793
+ }[];
1794
+ how_to: string[];
1795
+ };
1796
+ /** M-3716: the caller's OWN held requests (delivery_status { held_requests: true }); the caller is the authenticated agent. */
1797
+ ownContactRequests(agent: string): {
1798
+ requests: ({
1799
+ short_id: string;
1800
+ ticket_id: string;
1801
+ to: string;
1802
+ verb: import("./contact-auth-types.js").ContactVerb;
1803
+ state: string;
1804
+ asked_at: string;
1805
+ decided_at?: string | undefined;
1806
+ approved_by_rule: boolean;
1807
+ expires_at?: string | undefined;
1808
+ delivery_id?: string | undefined;
1809
+ next: string;
1810
+ } | {
1811
+ short_id: string;
1812
+ ticket_id: string;
1813
+ to: string;
1814
+ verb: import("./contact-auth-types.js").ContactVerb;
1815
+ state: string;
1816
+ asked_at: string;
1817
+ decided_at?: string | undefined;
1818
+ decided_by: string | undefined;
1819
+ expires_at?: string | undefined;
1820
+ delivery_id?: string | undefined;
1821
+ next: string;
1822
+ } | {
1823
+ short_id: string;
1824
+ ticket_id: string;
1825
+ to: string;
1826
+ verb: import("./contact-auth-types.js").ContactVerb;
1827
+ state: string;
1828
+ asked_at: string;
1829
+ decided_at?: string | undefined;
1830
+ expires_at?: string | undefined;
1831
+ delivery_id?: string | undefined;
1832
+ next: string;
1833
+ })[];
1834
+ note?: string | undefined;
1835
+ };
1727
1836
  requestContactChange(requester: string, raw: unknown, callerCurrent: () => boolean): Promise<{
1728
1837
  status: string;
1729
1838
  }>;
1730
1839
  private handleContactChangeCallback;
1731
- contactAuthorization(id: string, actor: ContactPerson): import("./contact-auth-types.js").ContactTicket;
1840
+ /**
1841
+ * M-3680 (the user, 11-25): a fleet agent's send held for approval reaches an administrator in General on the target's
1842
+ * Discord or Telegram, as a card with Approve once / Decline — until then a held request had no chat path (the live
1843
+ * Needs you message lists it without buttons). One card per request. Whoever clicks must be one who may decide it
1844
+ * (ContactAuthService.view(...).canDecide, read at the click); the decision is theirs, never the bot's. A request decided
1845
+ * anywhere else (the web, another card) retires its card. #4448 (R21079937): a ClassicBot room's request to a fleet agent
1846
+ * gets the same card, in the General of the target's connection; a room's request to anything else gets none.
1847
+ */
1848
+ /** Requests whose card was posted or tried: forgotten when the request is decided, and at most HELD_CARDS_KEPT. */
1849
+ private heldTicketCards?;
1850
+ private syncHeldTicketCard;
1851
+ private postHeldTicketCard;
1852
+ private handleContactTicketCallback;
1853
+ contactAuthorization(id: string, actor: ContactPerson): ContactTicket;
1732
1854
  contactAuthorizations(actor: ContactPerson, filter: {
1733
1855
  agent?: string;
1734
1856
  status?: string;
@@ -1736,11 +1858,19 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1736
1858
  cursor?: string;
1737
1859
  }): {
1738
1860
  nextCursor: string | null;
1739
- items: import("./contact-auth-types.js").ContactTicket[];
1861
+ items: ContactTicket[];
1740
1862
  };
1741
- decideContactAuthorization(id: string, decision: ContactTicketDecision, actor: ContactPerson): import("./contact-auth-types.js").ContactTicket;
1863
+ decideContactAuthorization(id: string, decision: ContactTicketDecision, actor: ContactPerson): ContactTicket;
1742
1864
  /** Status only: no human receipt, approval capability or original correlation is attached. */
1743
1865
  private sweepContactAuthorizationOutcomes;
1866
+ /**
1867
+ * M-3710: how many contact requests wait, and since when — no ids, people or text. Needs you tells an admin session with
1868
+ * no verified person behind it (contactActor null) that they exist, so a request is never silently missing there.
1869
+ */
1870
+ contactPendingCount(): {
1871
+ count: number;
1872
+ since: number;
1873
+ };
1744
1874
  contactNeeds(actor: ContactPerson): WebNeedsItem[];
1745
1875
  /**
1746
1876
  * The chat's contact items. M-3381 (the user, beta.14): the restricted-mode suggestions are ONE low-key line per world —
@@ -1890,6 +2020,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1890
2020
  * landing while this boot's completion was still being edited — belongs to its writer and is left alone.
1891
2021
  */
1892
2022
  private clearSettledUpdateMarker;
2023
+ /** M-3674: the last turn another agent started for `name` (the delivery outbox), ISO or null; never throws. */
2024
+ lastAgentTurnOf(name: string): string | null;
1893
2025
  lastActivityMs(name: string): number;
1894
2026
  /** Capture the current daemon and delivery owner for a background context read. */
1895
2027
  getPaneContextSource(name: string): import("./pane-context-cache.js").PaneContextSource | null;
@@ -2268,6 +2400,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2268
2400
  adminGate(userId: string, ownerAdapterId?: string): "ok" | "disabled" | "denied";
2269
2401
  /** Fleet admin is an explicit config allowlist entry, not merely an open/paired user. See adminGate. */
2270
2402
  isFleetAdmin(userId: string, adapterId?: string): boolean;
2403
+ /**
2404
+ * Free mode at /start is the fleet-admin allowlist of the adapter that owns the room (adminGate).
2405
+ * A ClassicBot admin (`classicBot.yaml` admin_users) is not enough. A stub with no fleet and no worlds
2406
+ * is not an admin: the menu offers Restricted only.
2407
+ */
2408
+ private canChooseFreeMode;
2271
2409
  /** Whether this adapter has any fleet admin at all (an empty allowlist means the admin commands are off). */
2272
2410
  hasFleetAdmins(adapterId?: string): boolean;
2273
2411
  /**
@@ -4137,12 +4275,16 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4137
4275
  onAttentionChanged(name: string): void;
4138
4276
  /** The list for the web: every world's items, and those of instances with no world (#1386 §5.0). */
4139
4277
  needsYouItems(): WebNeedsItem[];
4140
- /** Enabled member composition supplies only a local attention reader, never an approval/execution callback. */
4141
- attachHubExecutionAttention(read: (() => import("./needs-you.js").HubExecutionAttentionInput[]) | null, retry?: ((id: string) => "queued" | "not-found" | "not-retryable") | null): void;
4278
+ /** Enabled member composition supplies held-work readers and explicit owner retry/close operations. */
4279
+ attachHubExecutionAttention(read: (() => import("./needs-you.js").HubExecutionAttentionInput[]) | null, retry?: ((id: string) => "queued" | "not-found" | "not-retryable") | null, close?: ((id: string) => Promise<HubHeldCloseOutcome>) | undefined): void;
4142
4280
  /**
4143
4281
  * M-3632: Needs you → "Try again" on held Hub work (`hub:hold:<row>`). The question goes back through the member's whole
4144
4282
  * hand-off, including the Hub's begin lease; nothing is delivered without it.
4145
4283
  */
4284
+ closeHubHeld(itemId: string, actor: ContactPerson): Promise<{
4285
+ status: number;
4286
+ code: string;
4287
+ }>;
4146
4288
  retryHubHeld(itemId: string): {
4147
4289
  status: 200 | 404 | 409;
4148
4290
  code: "queued" | "not-found" | "not-retryable";
@@ -4299,6 +4441,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4299
4441
  name: string;
4300
4442
  guest?: true;
4301
4443
  authority?: HumanAuthority;
4444
+ identity?: WebSessionIdentity;
4302
4445
  }): Promise<{
4303
4446
  status: 200 | 400 | 403 | 409;
4304
4447
  error?: string;
@@ -4341,6 +4484,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4341
4484
  * #1939 S1: the design's §3 for one web request (authority/web-authority.ts), with this fleet's admins, policy and
4342
4485
  * token; `instance` once the body has named it. Observe only: receipts record it, no agent acts on it yet.
4343
4486
  */
4487
+ /** A signed-in account is recognizable before verification; this supplies no action authority. */
4488
+ webSessionIdentity(session: SessionRecord): WebSessionIdentity | undefined;
4344
4489
  webAuthority(input: {
4345
4490
  session: SessionRecord | null;
4346
4491
  gateway: boolean;
@@ -4364,6 +4509,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4364
4509
  ok: false;
4365
4510
  refusal: WebAuthorityRefusal;
4366
4511
  };
4512
+ /** M-3651 (auth-api's /auth/session): until when this guest session is verified as its account now; null when it is not. */
4513
+ guestVerifiedUntil(req: IncomingMessage, session: SessionRecord): number | null;
4514
+ /**
4515
+ * M-3651: a guest session that signed in with a code AgEnD delivered privately to its own account — recorded as that
4516
+ * account's authorization of it, judged by evaluateGuestIdentity (the switch, the links, "Only this computer", the token):
4517
+ * its messages then carry `web-guest`, who it is and never more. Only at sign-in: a guest is never sent a Confirm card.
4518
+ */
4519
+ private authorizeGuestSession;
4367
4520
  /**
4368
4521
  * M-3277 (decision 7933bf90; auth-api, at sign-in): an admin session that signed in with a code AgEnD delivered privately
4369
4522
  * to its account (a DM, or Discord's ephemeral reply) starts verified — that code went to the very DM a Confirm card
@@ -4674,6 +4827,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4674
4827
  publicLink: boolean;
4675
4828
  person?: Pick<WebPersonView, "userId" | "name">;
4676
4829
  authority?: HumanAuthority;
4830
+ identity?: WebSessionIdentity;
4677
4831
  guest?: boolean;
4678
4832
  }): Promise<WebCommandResult>;
4679
4833
  /** Consume `/clear` Confirm/Cancel exactly once; only Confirm reaches IPC. */
@@ -5921,21 +6075,34 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
5921
6075
  /** #2072: from the published snapshot (no `which` on the loop); not checked yet counts as installed (no false alarm). */
5922
6076
  private isBackendInstalled;
5923
6077
  private getMissingBackendWarning;
5924
- /** Coverage is not proven before launch; disclose the fallback without blocking an unsupported CLI. */
5925
- private getClassicStartWarning;
5926
- /** Handle Discord's required static slash choice, warning before a likely startup failure. */
6078
+ /** Discord buttons when the interaction can draw them; otherwise the adapter's own chooser. Never the backend select. */
6079
+ private classicModePoster;
6080
+ /** Where the finished start (and a hold notice) lands: the Discord interaction, or the Telegram menu message. */
6081
+ private classicStartComplete;
6082
+ /** Handle Discord's required static slash choice. The room waits for the mode menu. */
5927
6083
  private handleClassicStartSlash;
5928
6084
  private handleClassicStartSlashCore;
5929
- /** Present platform-native backend choices, then start on selection or timeout. */
6085
+ /** Present platform-native backend choices. A choice opens the mode menu; a timeout or a failed menu creates nothing. */
5930
6086
  private beginClassicBackendSelection;
5931
- /** Consume a selection callback. Returns true for all ClassicBot callback IDs, including stale ones. */
6087
+ /** Drop a pending /start without creating a room. */
6088
+ private cancelClassicPending;
6089
+ /** Consume a backend click. Returns true for every classic-backend id, including a stale one. */
5932
6090
  private handleClassicBackendSelection;
5933
- /** Atomically claim one pending request so timeout/click races create at most one instance. */
6091
+ /** The backend is chosen. Retire that menu and ask for the mode. Nothing is registered here. */
5934
6092
  private finishClassicBackendSelection;
6093
+ /** After a backend is known (slash, `/start BACKEND`, or a backend click). The room waits for a mode click. */
6094
+ private beginClassicModeSelection;
6095
+ /** For a fleet admin, Free is first and labeled recommended. Restricted stays a button.
6096
+ * Anyone else sees only Restricted. Either way the room waits for a tap. */
6097
+ private openClassicModeMenu;
6098
+ /** Consume a mode click. A Free click from anyone else is ignored and the menu stays up. */
6099
+ private handleClassicModeSelection;
6100
+ /** Claim the mode choice and create the room. A second click or the timeout finds nothing. */
6101
+ private finishClassicModeSelection;
5935
6102
  /** Start a classic channel instance with lightweight config */
5936
6103
  private startClassicInstance;
5937
6104
  /** Handle /start slash command — register classic channel */
5938
- handleClassicStart(channelId: string, channelName: string, userId: string, guildId?: string, adapterId?: string, backend?: string): Promise<string>;
6105
+ handleClassicStart(channelId: string, channelName: string, userId: string, guildId?: string, adapterId?: string, backend?: string, restricted?: boolean): Promise<string>;
5939
6106
  /** Handle /stop slash command — unregister classic channel */
5940
6107
  handleClassicStop(channelId: string, adapterId?: string): Promise<string>;
5941
6108
  /**
@@ -6372,3 +6539,4 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
6372
6539
  }
6373
6540
  /** alpha.2 (M-2300): the agent an applied Windows request created (its name, for the page's "Open chat"), or null. */
6374
6541
  export declare function agentNameOf(view: SettingsPendingView): string | null;
6542
+ export {};