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

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 (176) hide show
  1. package/dist/agent-cli-instructions.md +1 -1
  2. package/dist/backend/claude-carry.d.ts +11 -0
  3. package/dist/backend/claude-carry.js +88 -6
  4. package/dist/backend/claude-carry.js.map +1 -1
  5. package/dist/build-provenance.json +1 -1
  6. package/dist/channel/mcp-tools.js +6 -4
  7. package/dist/channel/mcp-tools.js.map +1 -1
  8. package/dist/contact-change-proposals.d.ts +47 -0
  9. package/dist/contact-change-proposals.js +131 -0
  10. package/dist/contact-change-proposals.js.map +1 -0
  11. package/dist/fleet-manager.d.ts +25 -1
  12. package/dist/fleet-manager.js +166 -3
  13. package/dist/fleet-manager.js.map +1 -1
  14. package/dist/general-knowledge/skills/concepts/SKILL.md +2 -1
  15. package/dist/general-knowledge/skills/hub/SKILL.md +39 -2
  16. package/dist/general-knowledge/skills/task-board/SKILL.md +4 -0
  17. package/dist/general-knowledge/skills/web-appearance/SKILL.md +1 -1
  18. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +16 -6
  19. package/dist/hub/agent-pictures-model.d.ts +147 -0
  20. package/dist/hub/agent-pictures-model.js +64 -0
  21. package/dist/hub/agent-pictures-model.js.map +1 -0
  22. package/dist/hub/agent-pictures.d.ts +52 -0
  23. package/dist/hub/agent-pictures.js +202 -0
  24. package/dist/hub/agent-pictures.js.map +1 -0
  25. package/dist/hub/client.d.ts +2 -0
  26. package/dist/hub/client.js +16 -2
  27. package/dist/hub/client.js.map +1 -1
  28. package/dist/hub/compose/member.d.ts +10 -2
  29. package/dist/hub/compose/member.js +32 -8
  30. package/dist/hub/compose/member.js.map +1 -1
  31. package/dist/hub/compose/server.d.ts +1 -0
  32. package/dist/hub/compose/server.js +4 -2
  33. package/dist/hub/compose/server.js.map +1 -1
  34. package/dist/hub/direct-posts-model.d.ts +1 -0
  35. package/dist/hub/direct-posts-model.js +2 -0
  36. package/dist/hub/direct-posts-model.js.map +1 -0
  37. package/dist/hub/direct-posts.d.ts +36 -0
  38. package/dist/hub/direct-posts.js +145 -0
  39. package/dist/hub/direct-posts.js.map +1 -0
  40. package/dist/hub/http/compose.d.ts +2 -0
  41. package/dist/hub/http/compose.js +155 -19
  42. package/dist/hub/http/compose.js.map +1 -1
  43. package/dist/hub/http/core.d.ts +9 -1
  44. package/dist/hub/http/core.js +21 -1
  45. package/dist/hub/http/core.js.map +1 -1
  46. package/dist/hub/http/schema.js +6 -0
  47. package/dist/hub/http/schema.js.map +1 -1
  48. package/dist/hub/join/service.d.ts +2 -0
  49. package/dist/hub/join/service.js +7 -3
  50. package/dist/hub/join/service.js.map +1 -1
  51. package/dist/hub/mcp/policy.d.ts +1 -1
  52. package/dist/hub/member/agent-pictures.d.ts +43 -0
  53. package/dist/hub/member/agent-pictures.js +125 -0
  54. package/dist/hub/member/agent-pictures.js.map +1 -0
  55. package/dist/hub/member/direct-rooms.d.ts +9 -0
  56. package/dist/hub/member/direct-rooms.js +14 -0
  57. package/dist/hub/member/direct-rooms.js.map +1 -0
  58. package/dist/hub/member/room-post.d.ts +11 -10
  59. package/dist/hub/member/room-post.js +51 -7
  60. package/dist/hub/member/room-post.js.map +1 -1
  61. package/dist/hub/policy.d.ts +11 -2
  62. package/dist/hub/policy.js +60 -7
  63. package/dist/hub/policy.js.map +1 -1
  64. package/dist/hub/protocol.d.ts +123 -1
  65. package/dist/hub/protocol.js +17 -7
  66. package/dist/hub/protocol.js.map +1 -1
  67. package/dist/hub/representative.d.ts +28 -0
  68. package/dist/hub/representative.js +127 -12
  69. package/dist/hub/representative.js.map +1 -1
  70. package/dist/hub/rooms/agents.d.ts +2 -0
  71. package/dist/hub/rooms/agents.js +14 -3
  72. package/dist/hub/rooms/agents.js.map +1 -1
  73. package/dist/hub/rooms/direct-view.d.ts +3 -2
  74. package/dist/hub/rooms/direct-view.js +23 -8
  75. package/dist/hub/rooms/direct-view.js.map +1 -1
  76. package/dist/hub/rooms/office.d.ts +9 -0
  77. package/dist/hub/rooms/office.js +10 -2
  78. package/dist/hub/rooms/office.js.map +1 -1
  79. package/dist/hub/rooms/service.d.ts +32 -1
  80. package/dist/hub/rooms/service.js +37 -3
  81. package/dist/hub/rooms/service.js.map +1 -1
  82. package/dist/hub/rooms/types.d.ts +5 -2
  83. package/dist/hub/rooms.d.ts +9 -0
  84. package/dist/hub/rooms.js +97 -26
  85. package/dist/hub/rooms.js.map +1 -1
  86. package/dist/hub/runtime.d.ts +1 -1
  87. package/dist/hub/server.js +19 -2
  88. package/dist/hub/server.js.map +1 -1
  89. package/dist/hub/session-directory-transition.d.ts +1 -0
  90. package/dist/hub/session-directory-transition.js +15 -9
  91. package/dist/hub/session-directory-transition.js.map +1 -1
  92. package/dist/hub/session-limits.d.ts +58 -0
  93. package/dist/hub/session-limits.js +121 -0
  94. package/dist/hub/session-limits.js.map +1 -0
  95. package/dist/hub/sessions.d.ts +1 -1
  96. package/dist/hub/sessions.js +13 -7
  97. package/dist/hub/sessions.js.map +1 -1
  98. package/dist/hub/settings-directory-decision.js +1 -1
  99. package/dist/hub/settings-directory-decision.js.map +1 -1
  100. package/dist/hub/types.d.ts +8 -2
  101. package/dist/hub-picture-reduce.d.ts +14 -0
  102. package/dist/hub-picture-reduce.js +49 -0
  103. package/dist/hub-picture-reduce.js.map +1 -0
  104. package/dist/hub-picture-worker.d.ts +1 -0
  105. package/dist/hub-picture-worker.js +11 -0
  106. package/dist/hub-picture-worker.js.map +1 -0
  107. package/dist/hub-report-target.d.ts +6 -0
  108. package/dist/hub-report-target.js +6 -0
  109. package/dist/hub-report-target.js.map +1 -1
  110. package/dist/locale.js +90 -2
  111. package/dist/locale.js.map +1 -1
  112. package/dist/needs-you.d.ts +4 -0
  113. package/dist/needs-you.js +2 -0
  114. package/dist/needs-you.js.map +1 -1
  115. package/dist/outbound-handlers.d.ts +4 -0
  116. package/dist/outbound-handlers.js +37 -4
  117. package/dist/outbound-handlers.js.map +1 -1
  118. package/dist/outbound-schemas.d.ts +2 -0
  119. package/dist/outbound-schemas.js +6 -4
  120. package/dist/outbound-schemas.js.map +1 -1
  121. package/dist/task-board-tool.d.ts +17 -0
  122. package/dist/task-board-tool.js +58 -6
  123. package/dist/task-board-tool.js.map +1 -1
  124. package/dist/tool-permissions.js +2 -2
  125. package/dist/tool-permissions.js.map +1 -1
  126. package/dist/ui/contact-tool-groups.js +1 -1
  127. package/dist/ui/fleet-canvas.js +2 -1
  128. package/dist/ui/fleet-office-card.js +20 -5
  129. package/dist/ui/fleet-office-dialogue.d.ts +6 -3
  130. package/dist/ui/fleet-office-dialogue.js +13 -3
  131. package/dist/ui/fleet-office-layout.js +13 -13
  132. package/dist/ui/fleet-office-model.js +3 -2
  133. package/dist/ui/fleet-office-overview.js +1 -1
  134. package/dist/ui/fleet-office-pack.d.ts +17 -7
  135. package/dist/ui/fleet-office-pack.js +106 -38
  136. package/dist/ui/fleet-office-play.js +11 -4
  137. package/dist/ui/fleet-office-skin.js +25 -11
  138. package/dist/ui/fleet-office-store.js +10 -1
  139. package/dist/ui/fleet-office-talk.js +423 -0
  140. package/dist/ui/fleet-office-view.js +26 -17
  141. package/dist/ui/fleet-office-zones.js +20 -12
  142. package/dist/ui/fleet-office.js +173 -44
  143. package/dist/ui/fleet-task-common.js +1 -1
  144. package/dist/ui/fleet-task-sort.js +88 -0
  145. package/dist/ui/fleet-task-view.js +38 -9
  146. package/dist/ui/fleet-tasks.js +47 -15
  147. package/dist/ui/hub-chat-store.js +4 -3
  148. package/dist/ui/hub-chat-strings.js +2 -0
  149. package/dist/ui/hub-client.js +3 -0
  150. package/dist/ui/hub-my-agents-strings.js +2 -2
  151. package/dist/ui/hub-my-agents.js +3 -0
  152. package/dist/ui/hub-room-composer.js +24 -4
  153. package/dist/ui/hub-room-members.js +7 -3
  154. package/dist/ui/hub-room-office.js +2 -1
  155. package/dist/ui/hub-room-presence.js +9 -0
  156. package/dist/ui/hub-room-strings.js +18 -2
  157. package/dist/ui/hub-room-thread.js +82 -13
  158. package/dist/ui/hub-room-working.js +37 -0
  159. package/dist/ui/hub-session-limits.js +79 -0
  160. package/dist/ui/panel-hub.js +41 -6
  161. package/dist/ui/panel-needs.js +28 -2
  162. package/dist/ui/shared/app.css +84 -3
  163. package/dist/ui/shared/chat-strings.js +1 -1
  164. package/dist/ui/shared/hub-owner.css +5 -0
  165. package/dist/ui/shared/hub-rooms-u2.css +3 -0
  166. package/dist/ui/shared/office-dialogue.css +110 -0
  167. package/dist/ui/shared/task-board.css +103 -7
  168. package/dist/web-api.d.ts +5 -0
  169. package/dist/web-api.js +29 -0
  170. package/dist/web-api.js.map +1 -1
  171. package/dist/web-office-skins.d.ts +8 -2
  172. package/dist/web-office-skins.js +33 -14
  173. package/dist/web-office-skins.js.map +1 -1
  174. package/dist/web-office-store.js +5 -3
  175. package/dist/web-office-store.js.map +1 -1
  176. package/package.json +1 -1
@@ -3,6 +3,7 @@ name: concepts
3
3
  description: AgEnD product concepts and definitions — fleet, instances, General, tool sets, delivery, schedules, and the rest; the agents' built-in role reference
4
4
  roles: [general, worker]
5
5
  ---
6
+
6
7
  # AgEnD concepts and definitions
7
8
 
8
9
  Draft. Each term states what the code on main does today, verified against the
@@ -150,7 +151,7 @@ WebFetch refuses explicit non-public URL forms. DNS and redirects are not pinned
150
151
  selected MCP tools keep their own access, and old conversation memory is not erased.
151
152
  When it delegates work for a person in the room, it keeps the requester with the worker and correlation, then summarizes the matching result in its bound channel and mentions that requester. Unrelated peer reports, chatter and FYI stay quiet.
152
153
 
153
- New rooms start in restricted mode. Non-admin peer relays are held for a target's Fleet administrator to approve; existing rooms stay legacy until an administrator switches them. Contact approval authorizes dispatch only, not the worker's later actions. Native tool coverage is reported separately.
154
+ New rooms start in restricted mode. Non-admin peer relays are held for a target's Fleet administrator to approve; existing rooms stay legacy until an administrator switches them. Contact approval authorizes dispatch only, not the worker's later actions. Native tool coverage is reported separately. General may use `propose_contact_change` to propose room mode, contact-ticket or existing-rule changes. The daemon posts a bound confirmation to the target connection’s General; only a currently authorized Discord/Telegram person may confirm. General never confirms or applies its own proposal. Host-only targets use the web.
154
155
 
155
156
  - Code: `src/classic-channel-manager.ts`.
156
157
  - Refs: `docs/permissions.md`.
@@ -133,6 +133,10 @@ is never kept." Fields **Account** and **Password**, button **Sign in**.
133
133
  again later." → the Hub cannot reach the company directory; nothing the user typed is wrong.
134
134
  - When the page was opened from a Fleet that is connecting, the button reads **Sign in and connect Fleet**: that one
135
135
  press signs in and approves the connection.
136
+ - **How long a sign-in lasts** is the administrator's choice (Administration → **Sign-in** / 登入時間). By default a
137
+ sign-in ends 8 hours after signing in, or after 1 hour with no Hub page open. An open Hub page, even in a
138
+ background tab, counts as using the Hub, so only closing every Hub page starts the idle clock. When it ends, the page
139
+ asks the person to sign in again.
136
140
 
137
141
  ## Connecting your own AI app
138
142
 
@@ -362,6 +366,13 @@ Sharing lets nobody ask yet. The owner allows a person, an AD security group, or
362
366
 
363
367
  ## Asking an agent
364
368
 
369
+ If the agent's backend, working folder or runtime changes after sharing, its old sharing consent stops applying.
370
+ The owner gets **Needs you** and **Share again** on the sharing row. The agent's room tools explain
371
+ `share_needs_reshare`. On an updated Hub, direct and room questions say the agent is unavailable until its owner
372
+ shares it again, rather than waiting for an answer. Share again requires the owner's action and keeps who may ask
373
+ and their original expiry. Old refused questions stay refused; ask again after the owner re-shares. A catalog lapse
374
+ report can only refuse work: it cannot grant consent to a new incarnation.
375
+
365
376
  On the Hub: **Chats** → **New chat** lists only the agents someone allowed you to ask ("Answers for *owner* · you can
366
377
  ask until *date*"). Pick one and **Ask**.
367
378
 
@@ -370,6 +381,9 @@ agent's avatar, its name and its owner below it; a question still waiting shows
370
381
  answer**, and a closed chat says **Closed**. Ctrl K (⌘K on a Mac) filters it by an agent's name or its owner. On a Hub
371
382
  that has rooms, the list has two groups: **Rooms** (房間: a square avatar, "3 people · 12 agents", unread count, an @
372
383
  mark when someone mentioned you) and **Agents** (one-to-one chats, the agent's status dot, **Hub assistant** last).
384
+ In a one-to-one chat, the bar above the box says what your own question is doing (M-3596): "Notes is working on it" with
385
+ the elapsed time, or "Waiting: …" and why (another question first, busy, paused, offline, or just sent). The waiting count
386
+ never says whose questions they are, and the answer replaces the bar.
373
387
  Unread chats come first, then the most recent.
374
388
 
375
389
  Favorites work as in AgEnD's own sidebar: a row's **⋯** menu has **Add to favorites** (加入最愛) and **Remove from
@@ -427,8 +441,17 @@ one-to-one chat. The separate **Who may ask** list still controls private chats.
427
441
 
428
442
  ### Agents posting to a room
429
443
 
444
+ On updated Hubs, `hub_room_list` also returns existing one-to-one chats as `kind: direct`, named by the person.
445
+ Use their id with `hub_room_post` to send text and files without a new question. The person must still be allowed
446
+ to ask this agent; current sharing/consent, an active grant/person, an open chat and the person's mute are checked
447
+ on each send. The person may turn off these messages in the one-to-one's ⋯ menu; answers to their questions still
448
+ arrive. Identical text and file contents within a minute are refused as duplicates; there is no hourly cap.
449
+ A refused message is never queued for later. An uncertain result may already be delivered: keep the same operation,
450
+ never resend as a fresh call. Older Hubs do not support one-to-one posts. `report_result` still answers each question
451
+ exactly once; it does not send follow-up messages.
452
+
430
453
  The MCP connector lists `hub_room_list`, `hub_room_members({room})`, `hub_people_search({q})` and
431
- `hub_room_post({room,text,receipt_id?})` within the agent's configured tool permissions. These tools work on a Fleet
454
+ `hub_room_post({room,text,files?,receipt_id?})` within the agent's configured tool permissions. These tools work on a Fleet
432
455
  connected to a compatible Hub. Without that connection, a call says “This Fleet isn't connected to a Hub.” The ordinary
433
456
  reply/report tools still load when the Hub is slow or unreachable.
434
457
  List returns only the invoking agent's current room IDs/names, without history. Post uses a room ID or an exact unique
@@ -669,6 +692,14 @@ are separate UI work; do not claim those screens or a remote-update switch from
669
692
  listed there too and need **Acknowledge**.
670
693
  - **This Hub** shows the Hub's name (**Hub name**, up to 64 characters) and what identifies it; **Edit AD connection**
671
694
  opens the directory settings.
695
+ - **Sign-in** (登入時間) sets how long a sign-in lasts.
696
+ - **Sign people out after** (登入多久後要重新登入): from 1 hour to 7 days, default 8 hours.
697
+ - **Or after this long without using the Hub** (或多久沒使用 Hub 就登出): from 15 minutes to 24 hours, default 1 hour.
698
+ It can't be longer than the first.
699
+ - A longer sign-in time applies to new sign-ins only. A shorter one also signs out anyone already signed in longer
700
+ than it, counted from when they signed in. The time without use applies to everyone at once.
701
+ - An open Hub page counts as using it, so the second limit applies only when no Hub page is open.
702
+ - Saving is recorded in the audit log.
672
703
  - **Tabs** (M-3162): Administration opens on **Overview** (總覽) where the Hub serves it. The tabs are **Overview**,
673
704
  **Manage** (管理項目, everything above on one page), **Teams**, **Groups** and **This Hub** (這個 Hub); a tab whose
674
705
  feature is off isn't shown. Overview has **Today** / **7 days**, refreshes every minute, and its line under the
@@ -809,6 +840,12 @@ Say plainly that these are not in the product yet:
809
840
 
810
841
  - **Does a disconnected Hub hold up the Fleet?** Fleet startup and ordinary local message delivery do not wait for the Hub connection. Tool discovery stays local within configured permissions, including native agents; an unavailable Hub tool explains the refusal when called. Hub Settings can temporarily say unavailable while a mount changes—retry afterward. Individual Hub network operations have deadlines; this does not promise zero background CPU/I/O overhead.
811
842
 
843
+ - **Needs you shows "Hub work held: review locally" (「Hub 工作已暫停:請在本機檢視」).** A shared agent's question was
844
+ stopped before it reached the agent. When the Hub only could not answer for a moment, the Fleet asks it again by itself
845
+ (after 2 s, 10 s and 30 s) before holding the question. A held question that never reached the agent shows
846
+ **Try again** (再試一次): it goes back through the Hub's checks and is delivered only when the Hub allows it. A question the Hub
847
+ refused, or one that may already have reached the agent, has no Try again; the person who asked can send it again.
848
+
812
849
  - **"That is not a Hub address."** Enter just the address (`hub.example.com`), or the address, a space and the join
813
850
  code. **"A Hub address must use https."** Drop `http://`.
814
851
  - **"*host* cannot be reached."** Check the address, and that this computer is on the company network.
@@ -854,7 +891,7 @@ are unsupported. An uncertain tool result may already have been applied: check t
854
891
  a new call.
855
892
 
856
893
 
857
- On a Hub with bounded room lookup, `hub_room_members` starts with the room purpose and counts, then returns 20 rows by default (up to 50), under 8 KiB of result text. Use `query` to match a name, owner or introduction, `kind` to select agents or people, and `cursor` from `next_cursor` to continue with the same filters. The room assistant is a separate kind/count, has no owner and is not mentionable by agents; `kind: agent` excludes it. Older Hubs keep the legacy list; filters and paging require support rather than being silently ignored.
894
+ On a Hub with bounded room lookup, `hub_room_members` starts with the room purpose and counts, then returns 20 rows by default (up to 50), under 8 KiB of result text. Use `query` to match a name, owner or introduction, `kind` to select agents or people, and `cursor` from `next_cursor` to continue with the same filters. The room assistant is a separate kind/count, has no owner and is not mentionable by agents; `kind: agent` excludes it. Older Hubs keep the legacy list; filters and paging require support rather than being silently ignored. On updated Hubs, a person's `id` is their stable Hub id (`realm/objectId`), the same id a one-to-one question names as its asker; on compatible Hubs that question's first line also quotes the asker's display name from the Hub directory (`Asker "Name", id realm/objectId`). Use the id, not the name, to tell people apart. An older Hub, or queued work resumed after the Fleet restarts, may have no display name in the header; the stable asker id remains. Display names are labels, never local approval or authority.
858
895
 
859
896
 
860
897
  To answer a Hub room question, use `report_result` with `target_instance="agend-hub"` and the question's `correlation_id`; put the whole answer in `summary`. `reply` goes to your own Fleet chat, not that room. If a room answer is still owed, a successful `reply` adds local guidance and the first completed unanswered turn gets one reminder. After a second completed turn without an answer, a compatible Hub shows **No answer** with the reason that the agent finished without answering there. A later valid answer replaces the notice. Older Hubs get no empty answer or marker and keep their existing wait. ClassicBot's private-Hub output block stays in force.
@@ -7,6 +7,10 @@ roles: [general, worker]
7
7
  ## Actions
8
8
 
9
9
  - **create** — a new task. Naming a board field (project, parent, acceptance, scope, size, …) makes it a board card.
10
+ A main task with no `project`: the board's only project, else the one you lead; with several and none yours, `create` is
11
+ refused and lists them — ask the person which one (do not guess), then create again. `project: "none"` only when nobody
12
+ can answer (a scheduled or automated run) or the person says no project: tell them, ask which project it belongs to, move it
13
+ once they say and keep the rule in your soul.md. Tell the person the card as `#M-n` and its project (the answer says it).
10
14
  - **list** — paged compact rows by default; follow `next_cursor` with the same filters. `filter_status` includes done/cancelled;
11
15
  `verbose: true` returns full records; `detail: true` the legacy full answer. Only the legacy detail/verbose lists cap an
12
16
  unfiltered result at 100; filters lift that cap. `stale: true`: claimed cards whose assignee stopped.
@@ -343,7 +343,7 @@ tools are not in your list), you can publish them yourself instead of asking a p
343
343
  The skin-pack manifest format — every key, its ranges, multi-sheet (`src: [...]`, up to 32 sheets / 600 frames) and
344
344
  frame-list (`frames: [{ src, ms? }]`) long animations with `durations`, `once` and `loopFrom`, optional custom `snacks`
345
345
  (1–12 items) and `characters.<set>.eat` strips (#4255), a minimal example — and
346
- the limits (including the 64 Mpx decoded-pixel cap) are in the Office guide:
346
+ the limits (220 files, 42 MiB, a 64 Mpx decoded-pixel cap), `row`/`col` sheet cells, a pack's own `canvas: [w, h]` size (640×360 to 5120×2880; default 1280×720), the `pat`, `stand` and `walkLeft` strips and the card's `gap` and `motion` are in the Office guide:
347
347
  [docs/office.md → Make a skin pack](https://github.com/songsid/AgEnD/blob/main/docs/office.md#make-a-skin-pack). Point people there too when they ask how the Office works.
348
348
 
349
349
  ## Limits
@@ -444,7 +444,7 @@ pack tools, and rolling back. Point people there for more than the summary below
444
444
 
445
445
  **Office** (the third view, remembered per device; M-3556: its bar is one row — Office, Show, People on the left; Edit
446
446
  offices, Share… and **⚙ Display options** on the right, a dropdown holding Style, Hide paused and stopped, Drag and pat,
447
- Bedtime, Lobby tile, Dialogue and Key; a phone's ⋯ sheet lists the same in that order; a Hub room's gear opens the same
447
+ Bedtime, Lobby tile, Dialogue, Talk and Key; a phone's ⋯ sheet lists the same in that order; a Hub room's gear opens the same
448
448
  dropdown) draws the same fleet as a pixel office: a room per team, a desk
449
449
  per instance with a name tag, General and "Not in a team" in the **Lobby**. Each little person is its state: typing
450
450
  with the lamp on (working), tea break (idle), asleep behind a **Closed** sign (paused/stopped), a hand up under a
@@ -468,9 +468,9 @@ someone onto another valid seat in their area (#4266) to seat them there immedia
468
468
  **Tell <agent> (with their next message)** is ticked (per agent, off) — then one `[Office] … patted your head ×N` line rides
469
469
  its next real message's `[Recent reactions: …]` (never a wake; capped); a pack's `bubbles.<lang>.pat` / `.feed` give the words; (#4255) packs with optional `snacks` (1–12 items, `sprite`, optional `eat` overlay, `radius`) and `characters.<set>.eat` show a floating snack tray (bottom-left; above zone pills on phone) for drag-to-feed, tap-to-arm, and placed snacks (up to 6 on floor, 30 s TTL, up to 4 nearest idle racers honoring `stayInArea`, first eats and others scatter; packs without `snacks` stay unchanged), and upload or delete **skin packs** (an
470
470
  artist's pictures: `manifest.json` plus PNGs, format v1, kept in `web-office-skins/` in the AgEnD home; the host
471
- checks every rule — PNG only, each strip sheet exactly frames·w × h, a 16:9 background, size and 64 Mpx decoded-pixel caps — and never changes a
471
+ checks every rule — PNG only, each strip sheet exactly frames·w × h (or, cut with `row`/`col`, at least (col+frames)·w × (row+1)·h), a 16:9 background (or the shape of the pack's own `canvas: [w, h]`, 640×360 to 5120×2880), 220 files, 42 MiB and 64 Mpx decoded-pixel caps — and never changes a
472
472
  pack; a strip may give its displayed size, `dw`/`dh`, apart from its pictures' size, a character may walk four
473
- ways with `walkDown`, `walkUp` and `walkSide` (the side one mirrored for left), and (#4231) any strip may chain
473
+ ways with `walkDown`, `walkUp` and `walkSide` (the side one mirrored for left unless the set gives `walkLeft`), a set may give `pat` (played in full when patted) and `stand` (the card's still avatar), and (#4231) any strip may chain
474
474
  multiple sheets (`src: [...]`, up to 32 sheets / 600 frames) or list individual frames with per-frame `ms`
475
475
  (`frames: [{ src, ms? }]`) or `durations`, plus `once: true` or `loopFrom` (intro then loop), holding frame 0 under
476
476
  reduced motion). #2692: an agent with **Office skin
@@ -484,7 +484,7 @@ restyle it; the default for a browser that has not picked a style and for a new
484
484
  own), **Guild** and **School** (#2947: two more pictures on the Cozy's arrangement — an adventurers' guild hall and a
485
485
  classroom) or an uploaded pack; one the page cannot load is drawn as Desks with a note. On a stored office in Studio,
486
486
  Cozy, Guild, School or a pack,
487
- **Edit layout** (admin only) shows a 1280×720 coordinate grid and lets you drag seats, furniture, the door, the mail drop
487
+ **Edit layout** (admin only) shows the pack's coordinate grid (1280×720, or its `canvas`) and lets you drag seats, furniture, the door, the mail drop
488
488
  (an envelope: where letters from other offices land; dashed on a pack without a `mailDrop`, #2736) and
489
489
  waypoints (or Tab to one and use the arrow keys, Shift for 10), add or remove waypoints and join or unjoin
490
490
  corridors; an item that sleeps at bedtime (a pack's `night`) has a night handle too ("Item {id} (night)": its night
@@ -505,8 +505,14 @@ a tile on one canvas, each exactly as its own view (its style, members, seats, b
505
505
  name and head count, each as large as its office's content, packed to fill the panel; **Lobby tile** (on by
506
506
  default; disabled when everyone is in an office) adds the instances in no office. Below 75% name tags show on hover
507
507
  only. Hover and click work across
508
- tiles; a tile's label, or a double-click on it, opens that office; traffic between offices flies straight across.
509
- Edit offices and Edit layout wait for a single office.
508
+ tiles; it is where the Office opens until another office is picked in the switcher; a tile's label, or a click on the
509
+ tile (off its people), opens that office for this visit and **← All offices** goes back; traffic between offices flies
510
+ straight across. Edit offices and Edit layout wait for a single office.
511
+ **Talk** (in ⚙ Display options, per browser, dashboard only): what **Chat** does in the Office — **Pop-up window**
512
+ (default), **Side panel** (a bottom sheet on a phone), **Dialogue box** (a visual-novel box over the foot of the scene:
513
+ the reply typed two lines a page, click for the rest / next page / close, **History** for both sides) or **Over their
514
+ head** (the reply over the agent, styled by a pack's `dialogBox.bubble`); reading **Click** / **Auto** / **Fast**,
515
+ **Skip** closes every reply. Same conversation as the chat (`/ui/history`, `/ui/send`); never on a share link.
510
516
  **Share…** (#2636; an admin session, on the dashboard reached directly or over the public link — never read-only or a guest; the URL shows only to its maker, in the dialog) makes an Office share
511
517
  link: anyone who opens it watches **Whole fleet** (#2716, in the fleet's style), one office or **All offices** live, in the link's **Look** (#2715: Light, Dark or the viewer's device; default what the maker's dashboard shows now), read-only, with no sign-in — names, identity
512
518
  colours and states, every 5 s; no chat, no settings (a click shows a card with name, title, state, office and level only); agents' `office_set` lines only when
@@ -1044,3 +1050,7 @@ fleet.yaml (Advanced, or the file) and `agend reload`.
1044
1050
 
1045
1051
 
1046
1052
  For the Hub's **My shared agents → Who may ask** person/name search, AD group grants, expiry and revoke controls, load the `hub` skill. Those controls use the Hub's company-account session, not this Fleet dashboard's guest grants.
1053
+
1054
+ ## General contact-change proposals
1055
+
1056
+ General can call `propose_contact_change` with a structured `change`: room `mode` (`restricted` or `legacy`), `ticket-decision` (full ticket ID, approve-once/decline, optionally exact originating-person keys and expiry/uses), `grant-adjust` (expiry/uses only), or `grant-revoke`. The daemon freezes the current revision and identities and posts its own confirmation in the target connection’s Discord/Telegram General. An authorized person must press Confirm; the tool call, a quoted approval, or General's own buttons never apply it. The card expires after five minutes; a changed revision, route or incarnation requires a new proposal. Unknown origins remain approve-once only. Host-only targets and unavailable platform routes use web Permissions/Authorizations. Contact approval never restricts what the receiving agent does afterward.
@@ -0,0 +1,147 @@
1
+ /**
2
+ * M-3533 R2b: a shared agent's pictures in room offices (hub-office-visit.md "Decided while building": each place shows what the
3
+ * Fleet shows in the same kind of place). The disc is what the owner's sidebar shows for the agent (a profile picture, its theme
4
+ * avatar when the owner shows agents' themes, its bot's avatar, a Discord custom emoji); the card is its identity-card portrait.
5
+ *
6
+ * The member reports which pictures each published exposure has (`agent.pictures`); the Hub answers with the content hashes it
7
+ * does not hold yet, and the member sends those in chunks (`agent.picture`). The Hub keeps one copy per hash, only while some
8
+ * shared agent's report names it. Nothing else of the Fleet crosses: no file names or paths, no other agents, no settings.
9
+ * Over the caps the member sends the agent's entry without that picture and says so (`tooLarge`): only its owner is told.
10
+ */
11
+ import { z } from "zod";
12
+ export declare const HUB_AGENT_PICTURES_CAPABILITY = "agent-pictures-v1";
13
+ /** The disc, whatever its source: a PNG is reduced to 64×64; a JPEG, webp or GIF goes as it is, up to this. */
14
+ export declare const HUB_PICTURE_DISC_MAX: number;
15
+ /** Everything one agent's pictures may take on the Hub (the design's 512 KB): the disc first, the portrait in what is left. */
16
+ export declare const HUB_PICTURE_AGENT_MAX: number;
17
+ /** Raw bytes per chunk: base64 (4/3) plus the frame envelope stays under HUB_LIMITS.frame (256 KiB), as attachments. */
18
+ export declare const HUB_PICTURE_CHUNK: number;
19
+ export declare const HUB_PICTURE_AGENTS_MAX = 128;
20
+ /** The sides a PNG is reduced to (the member's web-png.ts resampler). */
21
+ export declare const HUB_PICTURE_DISC_SIDE = 64;
22
+ export declare const HUB_PICTURE_PORTRAIT_SIDE = 256;
23
+ export declare const pictureMimeSchema: z.ZodEnum<{
24
+ "image/gif": "image/gif";
25
+ "image/jpeg": "image/jpeg";
26
+ "image/png": "image/png";
27
+ "image/webp": "image/webp";
28
+ }>;
29
+ export type HubPictureMime = z.infer<typeof pictureMimeSchema>;
30
+ export declare const pictureSlotSchema: z.ZodEnum<{
31
+ disc: "disc";
32
+ portrait: "portrait";
33
+ }>;
34
+ export type HubPictureSlot = z.infer<typeof pictureSlotSchema>;
35
+ export declare const pictureRefSchema: z.ZodObject<{
36
+ sha256: z.ZodString;
37
+ mime: z.ZodEnum<{
38
+ "image/gif": "image/gif";
39
+ "image/jpeg": "image/jpeg";
40
+ "image/png": "image/png";
41
+ "image/webp": "image/webp";
42
+ }>;
43
+ size: z.ZodNumber;
44
+ }, z.core.$strict>;
45
+ export type HubPictureRef = z.infer<typeof pictureRefSchema>;
46
+ export declare const agentPicturesRowSchema: z.ZodObject<{
47
+ exposureId: z.ZodString;
48
+ disc: z.ZodNullable<z.ZodObject<{
49
+ sha256: z.ZodString;
50
+ mime: z.ZodEnum<{
51
+ "image/gif": "image/gif";
52
+ "image/jpeg": "image/jpeg";
53
+ "image/png": "image/png";
54
+ "image/webp": "image/webp";
55
+ }>;
56
+ size: z.ZodNumber;
57
+ }, z.core.$strict>>;
58
+ portrait: z.ZodNullable<z.ZodObject<{
59
+ sha256: z.ZodString;
60
+ mime: z.ZodEnum<{
61
+ "image/gif": "image/gif";
62
+ "image/jpeg": "image/jpeg";
63
+ "image/png": "image/png";
64
+ "image/webp": "image/webp";
65
+ }>;
66
+ size: z.ZodNumber;
67
+ }, z.core.$strict>>;
68
+ tooLarge: z.ZodOptional<z.ZodArray<z.ZodEnum<{
69
+ disc: "disc";
70
+ portrait: "portrait";
71
+ }>>>;
72
+ }, z.core.$strict>;
73
+ export type HubAgentPicturesRow = z.infer<typeof agentPicturesRowSchema>;
74
+ export declare const agentPicturesSchema: z.ZodObject<{
75
+ revision: z.ZodString;
76
+ agents: z.ZodArray<z.ZodObject<{
77
+ exposureId: z.ZodString;
78
+ disc: z.ZodNullable<z.ZodObject<{
79
+ sha256: z.ZodString;
80
+ mime: z.ZodEnum<{
81
+ "image/gif": "image/gif";
82
+ "image/jpeg": "image/jpeg";
83
+ "image/png": "image/png";
84
+ "image/webp": "image/webp";
85
+ }>;
86
+ size: z.ZodNumber;
87
+ }, z.core.$strict>>;
88
+ portrait: z.ZodNullable<z.ZodObject<{
89
+ sha256: z.ZodString;
90
+ mime: z.ZodEnum<{
91
+ "image/gif": "image/gif";
92
+ "image/jpeg": "image/jpeg";
93
+ "image/png": "image/png";
94
+ "image/webp": "image/webp";
95
+ }>;
96
+ size: z.ZodNumber;
97
+ }, z.core.$strict>>;
98
+ tooLarge: z.ZodOptional<z.ZodArray<z.ZodEnum<{
99
+ disc: "disc";
100
+ portrait: "portrait";
101
+ }>>>;
102
+ }, z.core.$strict>>;
103
+ }, z.core.$strict>;
104
+ export type HubAgentPictures = z.infer<typeof agentPicturesSchema>;
105
+ /** The Hub's answer to a report: the hashes it wants (each named by the report, none it holds). */
106
+ export declare const agentPicturesResultSchema: z.ZodUnion<readonly [z.ZodObject<{
107
+ ok: z.ZodLiteral<true>;
108
+ need: z.ZodArray<z.ZodString>;
109
+ }, z.core.$strict>, z.ZodObject<{
110
+ ok: z.ZodLiteral<false>;
111
+ code: z.ZodEnum<{
112
+ revoked: "revoked";
113
+ stale: "stale";
114
+ unavailable: "unavailable";
115
+ }>;
116
+ }, z.core.$strict>]>;
117
+ export type HubAgentPicturesResult = z.infer<typeof agentPicturesResultSchema>;
118
+ export declare const agentPictureChunkSchema: z.ZodObject<{
119
+ sha256: z.ZodString;
120
+ mime: z.ZodEnum<{
121
+ "image/gif": "image/gif";
122
+ "image/jpeg": "image/jpeg";
123
+ "image/png": "image/png";
124
+ "image/webp": "image/webp";
125
+ }>;
126
+ size: z.ZodNumber;
127
+ index: z.ZodNumber;
128
+ count: z.ZodNumber;
129
+ data: z.ZodString;
130
+ }, z.core.$strict>;
131
+ export type HubAgentPictureChunk = z.infer<typeof agentPictureChunkSchema>;
132
+ export declare const agentPictureResultSchema: z.ZodUnion<readonly [z.ZodObject<{
133
+ ok: z.ZodLiteral<true>;
134
+ stored: z.ZodBoolean;
135
+ }, z.core.$strict>, z.ZodObject<{
136
+ ok: z.ZodLiteral<false>;
137
+ code: z.ZodEnum<{
138
+ invalid: "invalid";
139
+ "not-wanted": "not-wanted";
140
+ revoked: "revoked";
141
+ stale: "stale";
142
+ unavailable: "unavailable";
143
+ }>;
144
+ }, z.core.$strict>]>;
145
+ export type HubAgentPictureResult = z.infer<typeof agentPictureResultSchema>;
146
+ /** The picture's type from its first bytes, or null: the Hub stores and serves only what these say it is. */
147
+ export declare function sniffPicture(bytes: Uint8Array): HubPictureMime | null;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * M-3533 R2b: a shared agent's pictures in room offices (hub-office-visit.md "Decided while building": each place shows what the
3
+ * Fleet shows in the same kind of place). The disc is what the owner's sidebar shows for the agent (a profile picture, its theme
4
+ * avatar when the owner shows agents' themes, its bot's avatar, a Discord custom emoji); the card is its identity-card portrait.
5
+ *
6
+ * The member reports which pictures each published exposure has (`agent.pictures`); the Hub answers with the content hashes it
7
+ * does not hold yet, and the member sends those in chunks (`agent.picture`). The Hub keeps one copy per hash, only while some
8
+ * shared agent's report names it. Nothing else of the Fleet crosses: no file names or paths, no other agents, no settings.
9
+ * Over the caps the member sends the agent's entry without that picture and says so (`tooLarge`): only its owner is told.
10
+ */
11
+ import { z } from "zod";
12
+ import { hash, uuid } from "./validation.js";
13
+ export const HUB_AGENT_PICTURES_CAPABILITY = "agent-pictures-v1";
14
+ /** The disc, whatever its source: a PNG is reduced to 64×64; a JPEG, webp or GIF goes as it is, up to this. */
15
+ export const HUB_PICTURE_DISC_MAX = 64 * 1024;
16
+ /** Everything one agent's pictures may take on the Hub (the design's 512 KB): the disc first, the portrait in what is left. */
17
+ export const HUB_PICTURE_AGENT_MAX = 512 * 1024;
18
+ /** Raw bytes per chunk: base64 (4/3) plus the frame envelope stays under HUB_LIMITS.frame (256 KiB), as attachments. */
19
+ export const HUB_PICTURE_CHUNK = 180 * 1024;
20
+ export const HUB_PICTURE_AGENTS_MAX = 128;
21
+ /** The sides a PNG is reduced to (the member's web-png.ts resampler). */
22
+ export const HUB_PICTURE_DISC_SIDE = 64;
23
+ export const HUB_PICTURE_PORTRAIT_SIDE = 256;
24
+ export const pictureMimeSchema = z.enum(["image/png", "image/jpeg", "image/webp", "image/gif"]);
25
+ export const pictureSlotSchema = z.enum(["disc", "portrait"]);
26
+ export const pictureRefSchema = z.strictObject({ sha256: hash, mime: pictureMimeSchema, size: z.number().int().min(1).max(HUB_PICTURE_AGENT_MAX) });
27
+ export const agentPicturesRowSchema = z.strictObject({
28
+ exposureId: uuid, disc: pictureRefSchema.nullable(), portrait: pictureRefSchema.nullable(),
29
+ /** A picture the agent has, left out because it is over its cap; its owner's My agents row says so. */
30
+ tooLarge: z.array(pictureSlotSchema).min(1).max(2).optional(),
31
+ }).refine(r => !r.disc || r.disc.size <= HUB_PICTURE_DISC_MAX, "Disc too large")
32
+ .refine(r => (r.disc?.size ?? 0) + (r.portrait?.size ?? 0) <= HUB_PICTURE_AGENT_MAX, "Pictures too large")
33
+ .refine(r => !r.tooLarge || (new Set(r.tooLarge).size === r.tooLarge.length && r.tooLarge.every(slot => r[slot] === null)), "Invalid tooLarge");
34
+ export const agentPicturesSchema = z.strictObject({ revision: hash, agents: z.array(agentPicturesRowSchema).max(HUB_PICTURE_AGENTS_MAX) })
35
+ .refine(v => new Set(v.agents.map(a => a.exposureId)).size === v.agents.length, "Duplicate agent");
36
+ /** The Hub's answer to a report: the hashes it wants (each named by the report, none it holds). */
37
+ export const agentPicturesResultSchema = z.union([
38
+ z.strictObject({ ok: z.literal(true), need: z.array(hash).max(HUB_PICTURE_AGENTS_MAX * 2) }),
39
+ z.strictObject({ ok: z.literal(false), code: z.enum(["stale", "revoked", "unavailable"]) }),
40
+ ]);
41
+ const MAX_CHUNKS = Math.ceil(HUB_PICTURE_AGENT_MAX / HUB_PICTURE_CHUNK);
42
+ export const agentPictureChunkSchema = z.strictObject({
43
+ sha256: hash, mime: pictureMimeSchema, size: z.number().int().min(1).max(HUB_PICTURE_AGENT_MAX),
44
+ index: z.number().int().min(0).max(MAX_CHUNKS - 1), count: z.number().int().min(1).max(MAX_CHUNKS),
45
+ data: z.string().regex(/^[A-Za-z0-9+/]*={0,2}$/).max(Math.ceil(HUB_PICTURE_CHUNK / 3) * 4),
46
+ }).refine(c => c.count === Math.ceil(c.size / HUB_PICTURE_CHUNK) && c.index < c.count, "Invalid chunk");
47
+ export const agentPictureResultSchema = z.union([
48
+ z.strictObject({ ok: z.literal(true), stored: z.boolean() }),
49
+ z.strictObject({ ok: z.literal(false), code: z.enum(["invalid", "not-wanted", "stale", "revoked", "unavailable"]) }),
50
+ ]);
51
+ /** The picture's type from its first bytes, or null: the Hub stores and serves only what these say it is. */
52
+ export function sniffPicture(bytes) {
53
+ const b = bytes;
54
+ if (b.length >= 8 && b[0] === 0x89 && b[1] === 0x50 && b[2] === 0x4e && b[3] === 0x47 && b[4] === 0x0d && b[5] === 0x0a && b[6] === 0x1a && b[7] === 0x0a)
55
+ return "image/png";
56
+ if (b.length >= 3 && b[0] === 0xff && b[1] === 0xd8 && b[2] === 0xff)
57
+ return "image/jpeg";
58
+ if (b.length >= 12 && b[0] === 0x52 && b[1] === 0x49 && b[2] === 0x46 && b[3] === 0x46 && b[8] === 0x57 && b[9] === 0x45 && b[10] === 0x42 && b[11] === 0x50)
59
+ return "image/webp";
60
+ if (b.length >= 6 && b[0] === 0x47 && b[1] === 0x49 && b[2] === 0x46 && b[3] === 0x38 && (b[4] === 0x37 || b[4] === 0x39) && b[5] === 0x61)
61
+ return "image/gif";
62
+ return null;
63
+ }
64
+ //# sourceMappingURL=agent-pictures-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-pictures-model.js","sourceRoot":"","sources":["../../src/hub/agent-pictures-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,MAAM,6BAA6B,GAAG,mBAAmB,CAAC;AACjE,+GAA+G;AAC/G,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,GAAG,IAAI,CAAC;AAC9C,+HAA+H;AAC/H,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,GAAG,IAAI,CAAC;AAChD,wHAAwH;AACxH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,GAAG,IAAI,CAAC;AAC5C,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAC1C,yEAAyE;AACzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAE7C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC;AAEhG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAE9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,IA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AACd,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * M-3533 R2b: the Hub's copy of shared agents' pictures (agent-pictures-model.ts). One stored file per content hash, kept only
3
+ * while some published agent's latest report names it; a report replaces its Fleet's rows. Read only after the caller's own
4
+ * authorization (a room member's, through the room service). Nothing here is served by itself.
5
+ */
6
+ import type Database from "better-sqlite3";
7
+ import type { HubCore } from "./http/core.js";
8
+ import type { HubLinkContext } from "./server.js";
9
+ import { type HubAgentPictureResult, type HubAgentPicturesResult, type HubPictureMime, type HubPictureSlot } from "./agent-pictures-model.js";
10
+ export declare const HUB_AGENT_PICTURES_MIGRATION: Readonly<{
11
+ component: "s3-agent-pictures";
12
+ version: 1;
13
+ up(db: Database.Database): void;
14
+ }>;
15
+ /** How long a retired row or file may outlive a revocation that sent no report (withdrawals sweep at once). */
16
+ export declare const HUB_PICTURES_SWEEP_MS = 60000;
17
+ /** An agent's pictures as a room may show them: only pictures the Hub holds; `tooLarge` is for its owner alone. */
18
+ export interface HubAgentPictureLook {
19
+ disc?: string;
20
+ portrait?: string;
21
+ tooLarge?: HubPictureSlot[];
22
+ }
23
+ export declare class HubAgentPictures {
24
+ private readonly core;
25
+ private readonly links;
26
+ private readonly assembling;
27
+ /** Called with the exposures whose shown pictures changed (rooms tell their open pages). */
28
+ changed: ((exposureIds: string[]) => void) | null;
29
+ constructor(core: HubCore);
30
+ private fleetOf;
31
+ private shown;
32
+ /** Drop rows whose agent is no longer a published share of a current Fleet, then files no row names. */
33
+ private sweep;
34
+ prune(): void;
35
+ /** `agent.pictures`: this Fleet's agents and their pictures now; the answer names the hashes the Hub still needs. */
36
+ report(value: unknown, link: HubLinkContext): HubAgentPicturesResult;
37
+ /** `agent.picture`: one chunk of a picture this Fleet's report named and the Hub does not hold. */
38
+ chunk(value: unknown, link: HubLinkContext): HubAgentPictureResult;
39
+ private notify;
40
+ /** A Fleet's published agents' pictures the Hub holds (exposure id → hashes). Call after the caller's authorization. */
41
+ looksOf(fleetId: string): Map<string, HubAgentPictureLook>;
42
+ /** A held picture's bytes. Call only after the caller's authorization names this hash. */
43
+ file(sha256: string): {
44
+ mime: HubPictureMime;
45
+ bytes: Buffer;
46
+ } | null;
47
+ disconnected(fleetId: string): void;
48
+ private timer;
49
+ /** Sweep retired rows and unnamed files every HUB_PICTURES_SWEEP_MS (a revoked Fleet sends no report); reads hide them at once. */
50
+ start(): void;
51
+ close(): void;
52
+ }