@songsid/agend 2.3.1 → 2.3.2-beta.2

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 (160) hide show
  1. package/dist/authority/authority-state.d.ts +4 -0
  2. package/dist/authority/authority-state.js +16 -10
  3. package/dist/authority/authority-state.js.map +1 -1
  4. package/dist/authority/session-authorizations.d.ts +7 -1
  5. package/dist/authority/session-authorizations.js +6 -4
  6. package/dist/authority/session-authorizations.js.map +1 -1
  7. package/dist/authority/web-authority.d.ts +19 -6
  8. package/dist/authority/web-authority.js +22 -8
  9. package/dist/authority/web-authority.js.map +1 -1
  10. package/dist/channel/adapters/discord.d.ts +2 -0
  11. package/dist/channel/adapters/discord.js +33 -3
  12. package/dist/channel/adapters/discord.js.map +1 -1
  13. package/dist/channel/mcp-tools.js +5 -5
  14. package/dist/channel/mcp-tools.js.map +1 -1
  15. package/dist/channel/types.d.ts +11 -0
  16. package/dist/config-validator.js +40 -3
  17. package/dist/config-validator.js.map +1 -1
  18. package/dist/daemon.d.ts +34 -3
  19. package/dist/daemon.js +227 -46
  20. package/dist/daemon.js.map +1 -1
  21. package/dist/delivery-outbox.d.ts +12 -1
  22. package/dist/delivery-outbox.js +67 -15
  23. package/dist/delivery-outbox.js.map +1 -1
  24. package/dist/doctor.d.ts +3 -0
  25. package/dist/doctor.js +9 -0
  26. package/dist/doctor.js.map +1 -1
  27. package/dist/event-log.d.ts +5 -0
  28. package/dist/event-log.js +13 -0
  29. package/dist/event-log.js.map +1 -1
  30. package/dist/fleet-manager.d.ts +140 -0
  31. package/dist/fleet-manager.js +414 -29
  32. package/dist/fleet-manager.js.map +1 -1
  33. package/dist/fleet-process-handlers.d.ts +1 -0
  34. package/dist/fleet-process-handlers.js +9 -1
  35. package/dist/fleet-process-handlers.js.map +1 -1
  36. package/dist/general-knowledge/skills/web-appearance/SKILL.canvas-worker-off.md +4 -4
  37. package/dist/general-knowledge/skills/web-appearance/SKILL.md +7 -7
  38. package/dist/general-knowledge/skills/web-dashboard/SKILL.canvas-worker-off.md +113 -55
  39. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +114 -56
  40. package/dist/guest-seen-people.d.ts +38 -0
  41. package/dist/guest-seen-people.js +78 -0
  42. package/dist/guest-seen-people.js.map +1 -0
  43. package/dist/instance-config-impact.js +4 -1
  44. package/dist/instance-config-impact.js.map +1 -1
  45. package/dist/instance-lifecycle.d.ts +1 -0
  46. package/dist/instance-lifecycle.js +16 -1
  47. package/dist/instance-lifecycle.js.map +1 -1
  48. package/dist/locale.js +38 -10
  49. package/dist/locale.js.map +1 -1
  50. package/dist/mac-auto-restore.d.ts +117 -0
  51. package/dist/mac-auto-restore.js +294 -0
  52. package/dist/mac-auto-restore.js.map +1 -0
  53. package/dist/outbound-schemas.d.ts +2 -0
  54. package/dist/outbound-schemas.js +2 -0
  55. package/dist/outbound-schemas.js.map +1 -1
  56. package/dist/public-web-gateway.js +9 -1
  57. package/dist/public-web-gateway.js.map +1 -1
  58. package/dist/settings-api.d.ts +26 -0
  59. package/dist/settings-api.js +107 -1
  60. package/dist/settings-api.js.map +1 -1
  61. package/dist/settings-change.js +37 -3
  62. package/dist/settings-change.js.map +1 -1
  63. package/dist/settings-effect.js +5 -2
  64. package/dist/settings-effect.js.map +1 -1
  65. package/dist/start-attempt.d.ts +9 -5
  66. package/dist/start-attempt.js +27 -8
  67. package/dist/start-attempt.js.map +1 -1
  68. package/dist/start-failure-chat.d.ts +4 -0
  69. package/dist/start-failure-chat.js +23 -6
  70. package/dist/start-failure-chat.js.map +1 -1
  71. package/dist/start-failure-notice.d.ts +4 -0
  72. package/dist/start-failure-notice.js +8 -0
  73. package/dist/start-failure-notice.js.map +1 -1
  74. package/dist/start-failure.d.ts +25 -0
  75. package/dist/start-failure.js +75 -2
  76. package/dist/start-failure.js.map +1 -1
  77. package/dist/turn-reply-guard.d.ts +25 -0
  78. package/dist/turn-reply-guard.js +111 -12
  79. package/dist/turn-reply-guard.js.map +1 -1
  80. package/dist/types.d.ts +18 -1
  81. package/dist/ui/backend-signin.js +5 -2
  82. package/dist/ui/chat-ambient.js +1 -1
  83. package/dist/ui/chat-effects.js +4 -4
  84. package/dist/ui/chat-render.js +5 -2
  85. package/dist/ui/chat-strings.js +2 -2
  86. package/dist/ui/chat-thread.js +2 -2
  87. package/dist/ui/first-run.js +2 -2
  88. package/dist/ui/fleet-canvas-view.js +114 -0
  89. package/dist/ui/fleet-canvas.js +15 -77
  90. package/dist/ui/fleet-office-editor.js +80 -5
  91. package/dist/ui/fleet-office-layout.js +197 -0
  92. package/dist/ui/fleet-office-model.js +6 -3
  93. package/dist/ui/fleet-office-overview.js +167 -0
  94. package/dist/ui/fleet-office-pack.d.ts +39 -0
  95. package/dist/ui/fleet-office-pack.js +240 -29
  96. package/dist/ui/fleet-office-skin.js +140 -29
  97. package/dist/ui/fleet-office-store.js +84 -5
  98. package/dist/ui/fleet-office-view.js +154 -0
  99. package/dist/ui/fleet-office-zones.js +95 -33
  100. package/dist/ui/fleet-office.js +779 -140
  101. package/dist/ui/fleet-usage.js +7 -6
  102. package/dist/ui/panel-chat.js +1 -1
  103. package/dist/ui/panel-details.js +2 -2
  104. package/dist/ui/panel-fleet.js +11 -77
  105. package/dist/ui/panel-log.js +2 -2
  106. package/dist/ui/panel-settings.js +578 -163
  107. package/dist/ui/search-dialog.js +26 -7
  108. package/dist/ui/settings-appearance.js +82 -29
  109. package/dist/ui/settings-apply.js +42 -7
  110. package/dist/ui/settings-dialogs.js +68 -22
  111. package/dist/ui/settings-draft.js +51 -0
  112. package/dist/ui/settings-guests.js +244 -78
  113. package/dist/ui/settings-learn.js +2 -2
  114. package/dist/ui/settings-model.js +2 -0
  115. package/dist/ui/settings-registry.js +142 -0
  116. package/dist/ui/settings-strings.js +102 -44
  117. package/dist/ui/settings-web-authority.js +34 -23
  118. package/dist/ui/shared/app-i18n.js +14 -0
  119. package/dist/ui/shared/app-nav.js +10 -5
  120. package/dist/ui/shared/app-prefs.js +80 -2
  121. package/dist/ui/shared/app-route.js +39 -5
  122. package/dist/ui/shared/app-shell.js +59 -4
  123. package/dist/ui/shared/app-stream.js +2 -1
  124. package/dist/ui/shared/app.css +254 -17
  125. package/dist/ui/shared/app.js +3 -0
  126. package/dist/ui/shared/effect-stock-trust.js +1 -1
  127. package/dist/ui/shared/identity-color.js +4 -4
  128. package/dist/ui/shared/signin.js +2 -2
  129. package/dist/ui/shared/ui-dialog.js +6 -1
  130. package/dist/ui/shared/ui-icons.js +2 -0
  131. package/dist/ui/shared/web-authorize.js +13 -12
  132. package/dist/web-api.d.ts +8 -2
  133. package/dist/web-api.js +160 -5
  134. package/dist/web-api.js.map +1 -1
  135. package/dist/web-auth.js +7 -1
  136. package/dist/web-auth.js.map +1 -1
  137. package/dist/web-experimental.d.ts +1 -1
  138. package/dist/web-experimental.js +1 -1
  139. package/dist/web-experimental.js.map +1 -1
  140. package/dist/web-mod-agent.js +2 -2
  141. package/dist/web-mod-agent.js.map +1 -1
  142. package/dist/web-office-skins.d.ts +108 -0
  143. package/dist/web-office-skins.js +298 -0
  144. package/dist/web-office-skins.js.map +1 -0
  145. package/dist/web-office-store.d.ts +8 -2
  146. package/dist/web-office-store.js +37 -7
  147. package/dist/web-office-store.js.map +1 -1
  148. package/dist/web-settings-patch.d.ts +6 -0
  149. package/dist/web-settings-patch.js +61 -4
  150. package/dist/web-settings-patch.js.map +1 -1
  151. package/dist/web-shell-routes.d.ts +4 -2
  152. package/dist/web-shell-routes.js +17 -7
  153. package/dist/web-shell-routes.js.map +1 -1
  154. package/dist/working-recovery.d.ts +104 -0
  155. package/dist/working-recovery.js +263 -0
  156. package/dist/working-recovery.js.map +1 -0
  157. package/dist/working-state-journal.d.ts +3 -1
  158. package/dist/working-state-journal.js +15 -2
  159. package/dist/working-state-journal.js.map +1 -1
  160. package/package.json +1 -1
@@ -34,7 +34,7 @@ For how *you* look on the dashboard (theme, identity card, colour, widgets, ambi
34
34
  | subscription meters, plan badges, profiles, keep-warm, prompt cache | [Usage and the cache report](#usage-and-the-cache-report) |
35
35
  | what an agent did step by step | [The Log tab](#the-log-tab) |
36
36
  | any Settings control | [Settings](#settings) |
37
- | themes, cards, widgets, ambient effects (petals, click stars), effects, mods | [Web appearance](#web-appearance) |
37
+ | themes, cards, widgets, ambient effects (petals, click stars), effects, mods | [Look](#look) |
38
38
  | blank page, preview refused, link fails, signed out, "live" missing | [Troubleshooting](#troubleshooting) |
39
39
 
40
40
  Addresses: the dashboard is served on the host at `http://localhost:<health_port>` (default 19280), on 127.0.0.1
@@ -66,7 +66,7 @@ hostname (named tunnel, `web.public_link.hostname`) the minutes go up to 10080,
66
66
  `web.public_link.auto_open` reopens the link after AgEnD starts for the admin who last opened it (nothing posted; sign-in
67
67
  still needs a code).
68
68
  Close it with **Close public link** → **Close link (signs public browsers out)**, `/web revoke`, or let it expire.
69
- A public link is limited on purpose: no live stream (the page polls), no custom CSS, and Settings → Web, appearance,
69
+ A public link is limited on purpose: no live stream (the page polls), no custom CSS, and Settings → Access & security, Look,
70
70
  mods, effect-library/personal-selection management, schedule edits and preference writes are refused. Current in-scope
71
71
  Chat effect metadata/code reads are allowed, with session/epoch/exposure checks; the public viewer’s show switch is browser-local. HTML previews work over it through a second tunnel
72
72
  of their own (`web.preview_on_public_link`, default on).
@@ -86,14 +86,24 @@ the local address sees every instance's live terminal and the roster (status, co
86
86
  tags, name, description, avatars, cards) and the usage meters — read only; editing says "Sign in to edit". Over a
87
87
  public link `/view` always needs sign-in.
88
88
 
89
- **Guests (#1920).** Off by default: `web.guests.enabled` (or Settings → Web → Guests). Then someone who is
90
- not a fleet admin sends `/web` and gets a code privately, signing in as their own Discord or Telegram account. A guest
91
- sees only the agents they can already use in chat: their connection's fleet topics and General (an `open` connection:
92
- only `web.guests.open_instances`), their own Telegram private ClassicBot room, and ClassicBot group rooms while their
93
- membership is verified, minus any `web.guests.narrow`. They can chat there unless `web.guests.chat` is false, never send
94
- a command (text starting with `/` is refused), and the agent sees them as `via web (guest)`. A guest's app has no Fleet,
95
- View, Settings or Needs you. To invite someone: turn it on, then tell them to send `/web`. The Guests card is not in
96
- Settings over the public link.
89
+ **Guests (#1920, #2348).** Off by default: `web.guests.enabled` (or Settings → Access & security → Guests). Then someone
90
+ who is not a fleet admin gets a code privately, by sending `/web` or from an admin's **Send sign-in code**, and signs in
91
+ as their own Discord or Telegram account. What a guest sees:
92
+ - **With explicit grants** (`web.guests.grants`, set in Settings → Access & security → Guests): exactly the agents an
93
+ admin granted that person, nothing else (default deny once the key exists). The admin picks the person from people
94
+ AgEnD has seen writing to an agent, ticks their agents, saves (giving access or more agents waits for a fleet admin in
95
+ General; taking away applies at once and ends their sessions), then presses **Send sign-in code**, a DM, never a post.
96
+ Each code sent and each change to someone's access is in the event log (`guest_code_sent`, `guest_grant_changed`),
97
+ shown to admins under **Recent changes** in that section (no agent's Log tab shows them).
98
+ - **Without grants** (before an admin saves the first one): the agents they can already use in chat: their connection's
99
+ fleet topics and General (an `open` connection: only `web.guests.open_instances`), their own Telegram private
100
+ ClassicBot room, and ClassicBot group rooms while their membership is verified, minus any `web.guests.narrow`.
101
+ **Start from today's guests** turns that into grants.
102
+
103
+ They can chat there unless `web.guests.chat` is false, never send a command (text starting with `/` is refused), and the
104
+ agent sees them as `via web (guest)`. A guest's app has no Fleet, View, Settings or Needs you. To invite someone: turn it
105
+ on, grant them their agents in Settings → Access & security → Guests, and press **Send sign-in code** (or tell them to
106
+ send `/web`). The Guests section is not in Settings over the public link.
97
107
 
98
108
  **Web authority (#1939).** A signed-in fleet admin's browser can speak as their own Discord or Telegram
99
109
  account. The one row under the composer (bottom left, before the Enter hint) says **Not verified · Authorize**; the
@@ -104,14 +114,14 @@ again. Confirm within 5 minutes and the session menu says **Verified · speaks a
104
114
  just **✓ Verified**, with the until-when in its tooltip, its accessible name and a tap. That
105
115
  browser's messages then carry the account's authority in their delivery receipt for `max_session_hours` (default 48).
106
116
  Not me signs that browser out, also after Confirm, from the same card. At most one card waits per browser, and 3 an hour
107
- per account. Never for a guest or on a quick-tunnel public link. Over the admin's own named link (#2453) only with
108
- **Also over my named link** (`named_link`, off by default). That authority ends with the link, and the card says "over
109
- your named link". When a browser can't be authorized, the line says why (with a link to Settings when the switch, "Only
110
- this computer" or the named-link option is the reason). Settings → Web → **Web authority** (`web.verified_authority`, on
117
+ per account. Never for a guest. Over the admin's own named link (#2453) only with **Also over my named link**
118
+ (`named_link`, off by default); over the temporary public link `/web` opens only with **Also over the temporary public
119
+ link** (`quick_link`, off by default, §0.3). That authority ends with the link, and the card says "over your named link"
120
+ or "over the temporary public link". When a browser can't be authorized, the line says why (with a link to Settings when the switch, "Only
121
+ this computer" or the named-link option is the reason). Settings → Access & security → **Web authority** (`web.verified_authority`, on
111
122
  by default) has the switch, **Only this computer can authorize** (`loopback_only`), **Also over my named link** (shown
112
- with a fixed hostname), the hours, the authorized sessions, and **Revoke web authority** (or `/web revoke`). Every change
113
- there applies at once, except turning the named-link option on: a General or the host confirms that, never the browser
114
- asking.
123
+ with a fixed hostname), **Also over the temporary public link**, the hours, the authorized sessions, and **Revoke web authority** (or `/web revoke`). Every change
124
+ there applies at once, except turning a link's option on: a General or the host confirms that, never the browser asking.
115
125
  Agents then see that browser's messages as `via web (verified)` and check their receipt like a Discord or Telegram message.
116
126
 
117
127
  ## Chat
@@ -171,8 +181,8 @@ restored; files that can't be served again show as unavailable.
171
181
 
172
182
  **Copies in Discord/Telegram (web echo).** For a fleet topic instance, each web message is also posted to its topic as
173
183
  `🌐 web · <name>: …` (the first 500 characters plus attachment names; longer text says "(full text in web chat)").
174
- Turn it off with Settings → Web → **Web echo** (`web.echo_to_channel`). ClassicBot rooms: per room,
175
- `classicBot.yaml` `channels.<key>.web_echo` (Settings → ClassicBot → the room → **Web echo**). Since 2.2.5
184
+ Turn it off with Settings → Chat & connections → **Web echo** (`web.echo_to_channel`). ClassicBot rooms: per room,
185
+ `classicBot.yaml` `channels.<key>.web_echo` (Settings → Chat & connections → ClassicBot → the room → **Web echo**). Since 2.2.5
176
186
  (#2054) a room echoes by default: an unset room follows `web.echo_to_channel`, `web_echo: false` keeps it off and
177
187
  `web_echo: true` keeps it on. Before 2.2.5, a room echoed only with `web_echo: true`.
178
188
 
@@ -219,7 +229,8 @@ values reloaded after Save. Password fields keep the browser's behaviour.
219
229
 
220
230
  ## Fleet
221
231
 
222
- `/ui/fleet/<tab>`: **Tasks**, **Schedules**, **Teams**, **Org chart**, **Cache**, **Config**, plus a **Docs** link.
232
+ `/ui/fleet/<tab>`: **Tasks**, **Schedules**, **Teams**, **Org chart**, **Cache**, plus a **Docs** link
233
+ (`/ui/fleet/config` leads to Settings → Agent defaults: each of its settings lives in Settings, #2347).
223
234
  The sidebar's **Fleet** (zh "Fleet 概覽", at the top) and the phone's Fleet tab open the Fleet tab this device used last
224
235
  (`agend_last_fleet_tab`; the Org chart the first time). The sidebar has no separate Fleet (Details) or View row.
225
236
  - **Tasks** — the task board: Home lists **projects** (with % done) and what waits for the person (**Confirm** /
@@ -241,8 +252,6 @@ The sidebar's **Fleet** (zh "Fleet 概覽", at the top) and the phone's Fleet ta
241
252
  - **Teams** — **New team**, **Edit** (members, description; no rename), **Delete**. Read only on a public link.
242
253
  - **Org chart** — see below.
243
254
  - **Cache** — see [the cache report](#usage-and-the-cache-report).
244
- - **Config** — the main channel, access (Locked/Open, allowed users), default backend and project roots; **Save
245
- changes** rewrites fleet.yaml (its comments are lost).
246
255
 
247
256
  **Org chart (#1918).** **Canvas** or **List** (remembered per device). The canvas: General at the top, then teams in
248
257
  fleet.yaml order, then "Not in a team". Drag to pan, wheel or pinch to zoom (0.2–2.5), **Zoom in / Zoom out / Fit to
@@ -258,11 +267,49 @@ blinking light (needs you, crashed, looks stuck). With **Live** on, each message
258
267
  desk to desk along the corridors in the Key's colours; a delegation in progress is a purple folder on the worker's
259
268
  desk. Hover (or tap once) a desk for its name, state and backend; click (or tap again) opens the chat. **Find** dims
260
269
  the rest. **Show** picks a team or the Lobby and **People** pins chosen instances (both kept per browser); the
261
- **Office** switcher lists offices kept on the host (`web-offices.json`, `GET`/`PUT /ui/offices`; changing them takes
262
- an admin session, never the public link — v1 has no editor). **Style** (per browser): **Desks** (the default) or
263
- **Studio** — one scene (Work, Lounge, Help desk, Nap corner) where each instance walks to the area for its state.
264
- Now and then someone says a short line for their state in a bubble (never message content). Reduced motion: still
265
- poses, nothing in the air, bubbles shown whole.
270
+ **Office** switcher lists offices kept on the host (`web-offices.json`, `GET`/`PUT /ui/offices`). An admin session
271
+ (never a read-only one, a guest or the public link) gets **Edit offices**: add, rename and delete offices, pick who is
272
+ in each (whole teams or single instances; none = everyone) and its style, and upload or delete **skin packs** (an
273
+ artist's pictures: `manifest.json` plus PNGs, format v1, kept in `web-office-skins/` in the AgEnD home; the host
274
+ checks every rule — PNG only, each strip exactly frames·w × h, a 16:9 background, size caps — and never changes a
275
+ pack; a strip may give its displayed size, `dw`/`dh`, apart from its pictures' size, and a character may walk four
276
+ ways with `walkDown`, `walkUp` and `walkSide`, the side one mirrored for left). **Style** (per browser for the whole fleet, per office for a stored one): **Desks** (the default),
277
+ **Studio** — one scene (Work, Lounge, Help desk, Nap corner) where each instance walks to the area for its state —
278
+ or an uploaded pack; one the page cannot load is drawn as Desks with a note. On a stored office in Studio or a pack,
279
+ **Edit layout** (admin only) shows a 1280×720 coordinate grid and lets you drag seats, furniture, the door and
280
+ waypoints (or Tab to one and use the arrow keys, Shift for 10), add or remove waypoints and join or unjoin
281
+ corridors; **Save layout** keeps the moves as that office's overrides (the pack stays as uploaded), **Reset** goes
282
+ back to the pack's own. While it is open the office picker and Edit offices wait (**Cancel** closes it); if someone
283
+ saved the offices meanwhile, Save says so and keeps your layout — Save again puts it on the current list. A crowded area packs extra people into a tighter grid, then shows "+N" in its corner; there
284
+ only calls and work get bubbles (a few at most) and name tags show on hover or focus. **Hide paused and stopped**
285
+ (per browser, off by default) leaves the sleepers out. Now and then someone says a short line for their state in a
286
+ bubble (never message content). Reduced motion: still poses, nothing in the air, bubbles shown whole.
287
+ **All offices** (in the switcher once two or more offices are stored, kept per device) shows every stored office as
288
+ a tile on one canvas, each exactly as its own view (its style, members, seats, bubbles, walking), labelled with its
289
+ name and head count, each as large as its office's content, packed to fill the panel; **Lobby tile** (on by
290
+ default; disabled when everyone is in an office) adds the instances in no office. Below 75% name tags show on hover
291
+ only. Hover and click work across
292
+ tiles; a tile's label, or a double-click on it, opens that office; traffic between offices flies straight across.
293
+ Edit offices and Edit layout wait for a single office.
294
+ The Office fills the Fleet panel and moves like the Canvas (#2540): drag to pan, the wheel or a pinch to zoom,
295
+ **+** / **−** / **Fit** / **Fill** at the top right (the zoom shown as a percentage above them) or the `+ - 0` keys
296
+ (with the office focused), an overview at the bottom right to jump (not on a phone). It takes the whole panel: the
297
+ Fleet area's full width, down to the window's foot. **Fit** shows the whole scene as large as the panel allows
298
+ (any scale, so it fills the panel's width or height); **Fill** (a toggle, kept per office) fills the panel instead,
299
+ cropping what overflows — drag to see it. **+** / **−** step in pixel levels (each logical unit a whole number of
300
+ screen pixels); drawing is always unsmoothed. A resize fits a fitted view again; the scene can never be dragged off
301
+ the panel. The zoom, centre and Fit/Fill are kept per device for each office and style. Around the 16:9 scene the
302
+ whole panel is a matte: a pack's own `matte` (`#rrggbb`), else its background's edge colour, else the skin's own
303
+ (Studio's hall floor; Desks: the dashboard's background). Hover, click, name tags and Edit layout all work at any zoom: a drag on a handle moves it,
304
+ anywhere else pans; zoom and pan are never animated.
305
+ **Fullscreen** (the button under **Fit**, or `f`; Esc leaves) shows the office alone: the dashboard's header, tabs
306
+ and bars go, and the zoom buttons, the overview (not on a phone), a small office switcher and Exit float over it. It
307
+ uses the browser's fullscreen; where a page cannot have it (an iPhone) or the browser refuses, the office covers the
308
+ window instead. Opening a chat leaves it, and it is never remembered.
309
+ A pack may add a `foreground` (a 16:9 PNG over the whole scene, zones packs only): drawn above the people, furniture
310
+ and items in the air, below name tags, bubbles and "+N" — door frames, pillars, table fronts that hide whoever walks
311
+ behind them. A furniture item's `depth` may be `"y"`: drawn among the people by base y (whoever stands lower is in
312
+ front). Numeric depths keep their meaning (under 1000 under the people, 1000 and up over them).
266
313
 
267
314
  **Live traffic** (**Live** switch, on by default; **Key** in the toolbar explains it, as a strip above the canvas): a line for each message between instances.
268
315
  Colour by kind — task (delegate_task) purple, send/query/update teal, report pink, broadcast orange; between teams
@@ -355,7 +402,7 @@ they are never a $0 row, and what such an instance measured before still shows.
355
402
  by backend they go under its backend now. Coverage only says "read" for a catch-up that listed and read every source
356
403
  (an unreadable directory or transcript is not covered, never a 0). Scope as
357
404
  `get_cache_report`. The dashboard reaches it over the public link only with `web.usage_report_on_public_link: true`
358
- (Settings → Web → **Usage report over the public link**, applies at once; otherwise the page says "Not offered over
405
+ (Settings → Web dashboard → **Usage report over the public link**, applies at once; otherwise the page says "Not offered over
359
406
  the public link" and links to that switch on the dashboard reached directly); guests never. The page adds a daily trend (top 5 and
360
407
  others), a heatmap that tells a day read with nothing used from a day not collected, and **Download CSV** (the shown
361
408
  answer's daily rows, with the basis). Claude subagent (sidechain) turns aren't counted yet. A long range whose daily rows
@@ -372,38 +419,45 @@ still being designed). If the report says **Switch to 1-hour cache**, the remedy
372
419
  What an agent was asked, its replies (never its thinking), each tool call (Read, Edit, Search, Run, Web, MCP,
373
420
  Sub-agent…, with **Show output**), errors, turn ends, compactions and fleet events, on one timeline. Filters **All /
374
421
  Tools / Errors**; **Live** while it updates. Opens with the newest 200 steps; **Load older steps** adds 100 at a time
375
- (the page keeps 1000). Off by default: `web.log_tab` (Settings → Web → **Log tab: each agent's steps**; turning it on
422
+ (the page keeps 1000). Off by default: `web.log_tab` (Settings → Web dashboard → **Log tab: each agent's steps**; turning it on
376
423
  from the tab itself needs a fleet admin's confirmation). Full for Claude Code (also after it stopped) and Codex while
377
424
  running; kiro shows fleet events only; other backends say they have no readable transcript. Secrets are masked.
378
425
 
379
426
  ## Settings
380
427
 
381
- **Connections → Retry now** retries a disconnected connection without a fleet restart; a running login is reused. Startup retries continue with a five-minute cap. Local admin only, unavailable over public links. It changes no token or binding; refresh to read the later result.
428
+ **Chat & connections → Retry now** retries a disconnected connection without a fleet restart; a running login is reused. Startup retries continue with a five-minute cap. Local admin only, unavailable over public links. It changes no token or binding; refresh to read the later result.
382
429
 
383
- Tabs (`/settings/<tab>`): **Preferences**, **Web appearance**, **Agents**, **Connections**, **ClassicBot**,
384
- **General**, **Web**, **Developer**. Header: version, **Setup wizard**, **Help**.
430
+ Sections (`/settings/<section>`, #2347), in two groups. **You**: **Preferences**, **Look**. **Fleet**: **Agents**,
431
+ **Agent defaults**, **Chat & connections**, **Web dashboard**, **Access & security**, **Advanced**. Old addresses (`device`,
432
+ `appearance`, `general`, `bots`, `classic`, `web`) lead to the new sections. **Search settings** (top of the sections, **/**;
433
+ also Ctrl K → Settings) finds a setting by name, `fleet.yaml` key or synonym in either language and goes to the field.
434
+ Header: version, **Setup wizard**, **Help**.
385
435
 
386
- **How changes apply.** Agents, Connections, ClassicBot, General, Web and Developer edits are *staged*: a dialog's
387
- **Stage change** (General/Web: **Review changes**) adds it to the bar **Changes not applied yet**, which shows the
388
- cost — **Immediately**, **Restart this Agent** or **Restart AgEnD** — then **Apply changes** or **Discard**.
436
+ **How changes apply (#2347).** Every Fleet section's edits are unsaved until
437
+ **Save**: a field edit (Agent defaults, Chat & connections, Web dashboard, Access & security) is unsaved at once (a straight bar on its left); a dialog's **Done**
438
+ adds its changes. The bar **N unsaved change(s)** shows the cost — **Immediately**, **Restart this Agent** or **Restart
439
+ AgEnD** — then **Save** or **Discard**; an invalid field keeps Save waiting (**Fix 1 field(s) to save**). Over a public
440
+ link an admin can change the fleet's settings too (not the dashboard's own web settings, Guests or Web authority).
389
441
  Confirmations (e.g. opening access) are asked at Apply. A change that loosens access waits for a fleet admin to confirm
390
442
  in the General chat ("Waiting for confirmation", **Withdraw**) — unless the browser is web-verified (#2170): an
391
443
  account that is a fleet admin of every connection the change affects, on their platform, confirms it by its own Apply
392
444
  ("Confirmed by your account"; General gets a notice; every check runs again at execution). Not for a guest, the public
393
445
  link, an unverified browser or a change that needs the host CLI. After a failure, unapplied changes are staged again
394
- (secrets must be re-entered). **Restart AgEnD** restarts every agent. Preferences and Web appearance save directly.
446
+ (secrets must be re-entered). **Restart AgEnD** restarts every agent
447
+ (never automatic); until then every page shows **N saved change(s) take effect after AgEnD restarts** · **Restart now** ·
448
+ **Later**. Preferences and Look save with the same bar (**Your preferences**; device-only switches count on their own; Restore defaults saves at once).
395
449
 
396
450
  **Preferences** — follows you across devices unless marked:
397
451
  | Control | What it does | Stored |
398
452
  |---|---|---|
399
453
  | Your name (**Save**, **Use web-user** / **Use <account>**) | the name agents see on your web messages | your profile |
400
454
  | Theme: System / Light / Dark | page theme | host prefs `theme` |
401
- | Language: English / 中文 | page language (not the bots' replies — that is General → Language) | host prefs `lang` |
455
+ | Language: English / 中文 | page language (not the bots' replies — that is Agent defaults → Language) | host prefs `lang` |
402
456
  | Names: Nickname first / Real name first | sidebar names | host prefs `names.primary` |
403
457
  | Allow HTML previews | the preview opt-in | host prefs `preview.optIn` |
404
458
  | Chat tour (this device) | replays the chat tour | browser |
405
459
 
406
- **Web appearance** — see [Web appearance](#web-appearance) for the cards and what they mean.
460
+ **Look** — see [Look](#look) for the cards and what they mean.
407
461
 
408
462
  **Signing a backend in (#2233)** — local admin sessions only (never a guest or the public link): Settings → Agents →
409
463
  **Sign-ins** (each backend's login and each credential profile an agent uses: state, **Sign in** / **Sign in again**,
@@ -417,7 +471,8 @@ opencode: no dashboard sign-in. Config: `web_terminal.*` (as `/login`).
417
471
 
418
472
  **Agents** — **New agent**; per agent **Settings**, **Pause / Wake**, **Start / Stop** (direct), ⋯ **Delete agent**
419
473
  (staged; on Apply it waits for a fleet admin's confirmation in General, then the agent is stopped and removed, as
420
- `delete_instance` does — no restart). The agent dialog writes `instances.<name>.*` (an "Inherit" box removes the key):
474
+ `delete_instance` does — no restart). The agent dialog writes `instances.<name>.*` (an "Inherit" box removes the key, and the field then says what it inherits:
475
+ "Inherited: 30 min · change in Agent defaults"; a value nobody set anywhere is marked "default"):
421
476
  | Label | Key | Applies |
422
477
  |---|---|---|
423
478
  | Display name, Description | `display_name`, `description` | now |
@@ -434,7 +489,7 @@ opencode: no dashboard sign-in. Config: `web_terminal.*` (as `/login`).
434
489
  | General topic (fleet dispatcher) | `general_topic` | AgEnD |
435
490
  | Status emojis (Received, Queued, Processing, Delivered, Failed, …) | `status_emojis` | agent |
436
491
 
437
- **Connections** (the bots) — **New connection**: type, bot token (**Verify**), Discord server or Telegram group,
492
+ **Chat & connections** — connections (the bots): **New connection**: type, bot token (**Verify**), Discord server or Telegram group,
438
493
  your user ID. It starts without a restart when AgEnD already runs another connection and nothing else at fleet level
439
494
  changed; a fleet's first connection (or a change to an existing one) offers **Restart AgEnD**. Per bot: **Access mode** (locked / open / pairing) and **Allowed users** —
440
495
  `channels[i].access.*`, staged, restarts AgEnD, asks before opening access; **Guild/Group id** and General channel /
@@ -442,17 +497,18 @@ forum topic with **Verify the new binding** (applies directly after a confirmati
442
497
  **Replace** the token (saved to `~/.agend/.env`); **Delete this bot** (the token stays in `.env`). **Provider API keys**:
443
498
  **Verify & apply**, used by new processes.
444
499
 
445
- **ClassicBot** — per room **Settings**, **Pause / Wake**. The room dialog writes `classicBot.yaml`
500
+ ClassicBot (in **Chat & connections**, `/settings/chat#classicbot`) — per room **Settings**, **Pause / Wake**. The room dialog writes `classicBot.yaml`
446
501
  `channels.<key>.*`: Backend, Model, Auto-pause after, **Collaboration mode** (`collab`), **Web echo** (`web_echo`),
447
502
  Advanced **Context lines** (these restart the room's agent); Tool progress and Require a delivered reply (now).
448
503
 
449
- **General** — fleet defaults (`defaults.*`): **Language (bot replies)** (`locale`: Auto / en / zh-TW; read at startup: restart AgEnD), default
504
+ **Agent defaults** — **Project folders** (`project_roots`: where New agent may put an agent; empty = anywhere;
505
+ changing it waits for a fleet admin's OK) and the fleet defaults (`defaults.*`): **Language (bot replies)** (`locale`: Auto / en / zh-TW; read at startup: restart AgEnD), default
450
506
  backend and model, auto-pause, tool progress, bot-to-bot visibility, reply guard; Advanced: tool set, agent mode, log
451
507
  level, **Hang detector enabled** / **Stuck timeout** (`hang_detector.*`), **Startup concurrency** (1–20) and
452
- **Stagger delay** (`startup.*`, used from the next agent start, no restart). ClassicBot card (`classicBot.yaml defaults.*`): default backend, tool
508
+ **Stagger delay** (`startup.*`, used from the next agent start, no restart). ClassicBot defaults (in Chat & connections; `classicBot.yaml defaults.*`): default backend, tool
453
509
  progress, reply guard, **ClassicBot admins**, **Allowed guilds**.
454
510
 
455
- **Web** — all apply at once; loosening waits for an admin; disabled over a public link.
511
+ **Access & security** (sessions, browser terminal, public link and fixed address, guests, web authority; web echo is in Chat & connections, the Log tab and usage over the link in **Web dashboard**) — all apply at once; loosening waits for an admin; disabled over a public link.
456
512
  | Label | Key |
457
513
  |---|---|
458
514
  | Session length, hours (1–720) | `web.session.local.absolute_hours` |
@@ -470,20 +526,19 @@ Shown read-only ("Set in fleet.yaml"): `web.allowed_hosts`, `view_access`, `noti
470
526
  300,000-row cap), `provider_secrets`, `upload_max_file_mb`,
471
527
  `upload_max_total_mb`, `web_terminal.bind`, `web_terminal.tunnel`.
472
528
 
473
- **Developer** — fleet.yaml as **YAML / JSON**, **Edit / View**, **Copy**, **Download fleet.yaml**; **Apply & save**
474
- (edit mode) applies at once, without the bar.
529
+ **Advanced** — fleet.yaml as **YAML / JSON**, **Edit / View**, **Copy**, **Download fleet.yaml**; **Apply**
530
+ (edit mode) adds the edit to the bar, and Save writes it. While it waits, Agents, Agent defaults and the
531
+ connections are off (and the setup wizard); while those have unsaved changes, the editor only reads.
475
532
 
476
533
  **Setup wizard** — agent (backend, directory, name) → platform → token and server/group, your user ID → preview →
477
534
  **Create and start**.
478
535
 
479
- ## Web appearance
536
+ ## Look
480
537
 
481
538
  For an agent changing its *own* look, the `web-appearance` skill has the tools and limits. What a person sees in
482
- Settings → **Web appearance**, card by card:
539
+ Settings → **Look**, card by card (the app icon, card upload limits and Canvas Worker effects are in **Web dashboard**; following reduced motion and custom CSS off here are in **Preferences**):
483
540
  - **Agents' themes** — **Show agents' themes, effects and widgets**; off, every chat looks the same and pictures and
484
- ring colours fall back to the bots' own (all devices). **Effects: follow the system's reduced-motion setting** (this
485
- device only, off by default): on, both ambient and Canvas Worker effects stay still while the system asks for reduced
486
- motion. Otherwise both play, with one shared one-time chat note and a local action to follow the system.
541
+ ring colours fall back to the bots' own (all devices).
487
542
  - **Ambient effects** — an agent's falling petals, snow, rising lanterns, twinkles or stars on a click, drawn behind
488
543
  its chat by the dashboard (data only, no consent needed). They show by default, the public link too; the chat's ⋯
489
544
  menu says why one is not showing (choosing the line fixes it there) and offers **Clear the ambient effect** /
@@ -499,7 +554,7 @@ Settings → **Web appearance**, card by card:
499
554
  can't load from the internet (put pictures and fonts under Assets: PNG, WebP, JPEG, GIF, WOFF2, 1 MiB in total).
500
555
  **Save and try**, then **Keep** within 15 s or it reverts; **Turn off (all devices)**; earlier versions **Use
501
556
  this**. If something is hidden or broken, open the page with `?safe=1`, or tick **Turn off custom CSS on this
502
- device**.
557
+ device** (in Preferences).
503
558
  - **Mods** — one `.agendmod.json` file carrying a look; importing shows everything first and applies only what you
504
559
  tick (custom CSS is never pre-ticked); agents can propose mods (**Review** / **Dismiss**); **Export a mod** writes one.
505
560
  Uninstalling removes the mod, not what it applied.
@@ -512,14 +567,17 @@ Settings → **Web appearance**, card by card:
512
567
  click, with no extra consent. The show switch, safe mode, hidden tab, browser support and live performance guard remain.
513
568
  No startup FPS calibration; data saver does not block. Reduced motion blocks only if this device chose to follow it.
514
569
  A blocked placement keeps an exact named notice. On ordinary dashboard sessions, Show/custom-CSS actions open
515
- **Web appearance**. Public/guest Show-off has **Turn effects on here**; a guest CSS refusal offers Reload.
570
+ **Look**. Public/guest Show-off has **Turn effects on here**; a guest CSS refusal offers Reload.
516
571
  An unavailable
517
572
  isolated transport offers Reload, never an HTML-preview setup step. A motion refusal offers **Play effects anyway**;
518
573
  safe mode offers **Leave safe mode**. The dialog names loading, safety and raw unknown codes. Codes stay local; agents get only closed recent blocked reasons without viewer identifiers or counts.
519
- - **Identity card upload limits** — portrait and banner size limits and per-agent picture quota
520
- (`web.appearance.*`); lowering applies at once, raising waits for an admin.
521
574
  - **Restore defaults** — resets this host's appearance settings (it lists what it resets first).
522
575
 
576
+ Moved out of Look in 2.3.2 (#2347). **Preferences** (this device only): **Effects: follow the system's reduced-motion
577
+ setting** (off by default): on, both ambient and Canvas Worker effects stay still while the system asks for reduced motion. Otherwise both play, with one shared one-time chat note and a local action to follow the system. And **Turn off custom CSS on this device**. **Web dashboard**: the **App icon**;
578
+ **Identity card upload limits** — portrait and banner size limits and per-agent picture quota (`web.appearance.*`);
579
+ lowering applies at once, raising waits for an admin; and **Experimental: Canvas Worker effects**.
580
+
523
581
  **What an agent can change for the user.** A worker changes only its own look (the `web-appearance` tools); before
524
582
  #2064 everything on this page was the person's. Since #2064 (2.2.5) General, coordinators and
525
583
  full-profile instances get `get_web_settings` / `set_web_settings`, which go through the same checks as the page;
@@ -578,7 +636,7 @@ no instance uses that provider.
578
636
 
579
637
  **Settings won't change something.** Over a public link, Web settings and appearance are read only; a loosening
580
638
  change waits for an admin's confirmation in General chat; a value in the "Set in fleet.yaml" list must be edited in
581
- fleet.yaml (Developer tab, or the file) and `agend reload`.
639
+ fleet.yaml (Advanced, or the file) and `agend reload`.
582
640
 
583
641
  ### Canvas Worker playback diagnostics
584
642
 
@@ -0,0 +1,38 @@
1
+ /**
2
+ * #2348: the people AgEnD has seen in chat — the Settings → Guests picker's source. One row per platform account
3
+ * (`adapter_id`, `user_id`), written where a platform message is admitted as human input (a human receipt: never a bot,
4
+ * never the web), so only real senders appear. Kept 400 days since last seen (the receipts themselves are pruned at
5
+ * `retention_days`, 30 by default — too short for "pick someone who wrote last month"). Backfilled once from the
6
+ * receipts still kept. Ids leave this table only through the admin's Settings read.
7
+ */
8
+ import type Database from "better-sqlite3";
9
+ export declare const SEEN_PEOPLE_KEEP_DAYS = 400;
10
+ /** The picker reads at most this many, most recently seen first. */
11
+ export declare const SEEN_PEOPLE_LIST_MAX = 500;
12
+ export interface SeenPerson {
13
+ adapterId: string;
14
+ userId: string;
15
+ username: string | null;
16
+ firstSeen: string;
17
+ lastSeen: string;
18
+ /** The instances they wrote to, most recent first, with when. */
19
+ instances: Array<{
20
+ name: string;
21
+ at: string;
22
+ }>;
23
+ }
24
+ export declare function initializeSeenPeople(db: Database.Database): void;
25
+ /** A platform sender seen writing to `instance` at `at` (ISO). */
26
+ export declare function noteSeenPerson(db: Database.Database, p: {
27
+ adapterId: string;
28
+ userId: string;
29
+ username: string | null;
30
+ instance: string;
31
+ at: string;
32
+ }): void;
33
+ /** The picker's list: most recently seen first, at most SEEN_PEOPLE_LIST_MAX. */
34
+ export declare function listSeenPeople(db: Database.Database, limit?: number): SeenPerson[];
35
+ /** Whether an account was ever seen (and is still kept): a grant may only name one (or one already granted). */
36
+ export declare function isSeenPerson(db: Database.Database, adapterId: string, userId: string): boolean;
37
+ /** Forget whoever was last seen before `cutoffIso`. */
38
+ export declare function pruneSeenPeople(db: Database.Database, cutoffIso: string): number;
@@ -0,0 +1,78 @@
1
+ export const SEEN_PEOPLE_KEEP_DAYS = 400;
2
+ /** The picker reads at most this many, most recently seen first. */
3
+ export const SEEN_PEOPLE_LIST_MAX = 500;
4
+ /** Instances remembered per person (the most recent). */
5
+ const INSTANCES_MAX = 20;
6
+ export function initializeSeenPeople(db) {
7
+ const existed = !!db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'seen_people'").get();
8
+ db.exec(`CREATE TABLE IF NOT EXISTS seen_people (
9
+ adapter_id TEXT NOT NULL, user_id TEXT NOT NULL, username TEXT, first_seen TEXT NOT NULL, last_seen TEXT NOT NULL,
10
+ instances_json TEXT NOT NULL DEFAULT '[]', PRIMARY KEY (adapter_id, user_id));
11
+ CREATE INDEX IF NOT EXISTS idx_seen_people_last ON seen_people(last_seen);`);
12
+ if (existed)
13
+ return;
14
+ // Once, when the table is new: everyone the receipts still name (platform messages only).
15
+ const rows = db.prepare("SELECT target_instance, origin_json, created_at FROM human_delivery_receipts ORDER BY created_at").all();
16
+ const tx = db.transaction(() => {
17
+ for (const r of rows) {
18
+ let o;
19
+ try {
20
+ o = JSON.parse(r.origin_json);
21
+ }
22
+ catch {
23
+ continue;
24
+ }
25
+ if ((o.platform !== "discord" && o.platform !== "telegram") || typeof o.adapter_id !== "string" || typeof o.user_id !== "string")
26
+ continue;
27
+ noteSeenPerson(db, { adapterId: o.adapter_id, userId: o.user_id, username: typeof o.username === "string" ? o.username : null, instance: r.target_instance, at: r.created_at });
28
+ }
29
+ });
30
+ tx();
31
+ }
32
+ /** A platform sender seen writing to `instance` at `at` (ISO). */
33
+ export function noteSeenPerson(db, p) {
34
+ if (!p.adapterId || !p.userId)
35
+ return;
36
+ const row = db.prepare("SELECT first_seen, last_seen, instances_json, username FROM seen_people WHERE adapter_id = ? AND user_id = ?").get(p.adapterId, p.userId);
37
+ let instances = [];
38
+ if (row) {
39
+ try {
40
+ instances = JSON.parse(row.instances_json);
41
+ }
42
+ catch {
43
+ instances = [];
44
+ }
45
+ }
46
+ instances = [{ name: p.instance, at: p.at }, ...instances.filter((i) => i.name !== p.instance)]
47
+ .sort((a, b) => b.at.localeCompare(a.at)).slice(0, INSTANCES_MAX);
48
+ const last = row && row.last_seen > p.at ? row.last_seen : p.at;
49
+ const first = row && row.first_seen < p.at ? row.first_seen : p.at;
50
+ // The handle as last seen (a rename shows up); an older message never overwrites a newer one's.
51
+ const username = row && row.last_seen > p.at ? row.username : (p.username ?? row?.username ?? null);
52
+ db.prepare(`INSERT INTO seen_people (adapter_id, user_id, username, first_seen, last_seen, instances_json) VALUES (?, ?, ?, ?, ?, ?)
53
+ ON CONFLICT(adapter_id, user_id) DO UPDATE SET username = excluded.username, first_seen = excluded.first_seen, last_seen = excluded.last_seen, instances_json = excluded.instances_json`)
54
+ .run(p.adapterId, p.userId, username, first, last, JSON.stringify(instances));
55
+ }
56
+ /** The picker's list: most recently seen first, at most SEEN_PEOPLE_LIST_MAX. */
57
+ export function listSeenPeople(db, limit = SEEN_PEOPLE_LIST_MAX) {
58
+ const rows = db.prepare("SELECT * FROM seen_people ORDER BY last_seen DESC LIMIT ?").all(Math.max(1, Math.min(limit, SEEN_PEOPLE_LIST_MAX)));
59
+ return rows.map((r) => {
60
+ let instances = [];
61
+ try {
62
+ instances = JSON.parse(r.instances_json);
63
+ }
64
+ catch {
65
+ instances = [];
66
+ }
67
+ return { adapterId: r.adapter_id, userId: r.user_id, username: r.username, firstSeen: r.first_seen, lastSeen: r.last_seen, instances };
68
+ });
69
+ }
70
+ /** Whether an account was ever seen (and is still kept): a grant may only name one (or one already granted). */
71
+ export function isSeenPerson(db, adapterId, userId) {
72
+ return !!db.prepare("SELECT 1 FROM seen_people WHERE adapter_id = ? AND user_id = ?").get(adapterId, userId);
73
+ }
74
+ /** Forget whoever was last seen before `cutoffIso`. */
75
+ export function pruneSeenPeople(db, cutoffIso) {
76
+ return db.prepare("DELETE FROM seen_people WHERE last_seen < ?").run(cutoffIso).changes;
77
+ }
78
+ //# sourceMappingURL=guest-seen-people.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guest-seen-people.js","sourceRoot":"","sources":["../src/guest-seen-people.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AACzC,oEAAoE;AACpE,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACxC,yDAAyD;AACzD,MAAM,aAAa,GAAG,EAAE,CAAC;AAYzB,MAAM,UAAU,oBAAoB,CAAC,EAAqB;IACxD,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,8EAA8E,CAAC,CAAC,GAAG,EAAE,CAAC;IACnH,EAAE,CAAC,IAAI,CAAC;;;+EAGqE,CAAC,CAAC;IAC/E,IAAI,OAAO;QAAE,OAAO;IACpB,0FAA0F;IAC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,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC;AAC1F,CAAC"}
@@ -26,6 +26,7 @@ export const HOT_INSTANCE_CONFIG_KEYS = new Set([
26
26
  "tool_progress",
27
27
  "reply_completion_guard",
28
28
  "mcp_proxy_reply",
29
+ "resume_interrupted_work",
29
30
  "auto_pause_after",
30
31
  "warm_cap",
31
32
  "display_name",
@@ -62,7 +63,7 @@ const FLEET_SCOPED_INSTANCE_KEYS = new Set([
62
63
  /** Instance-scoped fields the settings page renders. */
63
64
  const INSTANCE_FIELDS = [
64
65
  "display_name", "description", "backend", "model", "working_directory",
65
- "auto_pause_after", "warm_cap", "topic_id", "channel_id", "general_topic",
66
+ "resume_interrupted_work", "auto_pause_after", "warm_cap", "topic_id", "channel_id", "general_topic",
66
67
  "tool_progress", "reply_completion_guard", "mcp_proxy_reply", "log_level",
67
68
  "systemPrompt", "tags", "hang_detector", "agent_mode", "tool_set",
68
69
  "lightweight", "model_failover", "effort", "pre_task_command",
@@ -121,6 +122,8 @@ const FLEET_FIELD_IMPACTS = {
121
122
  // #2346: read at each spawn by the SpawnGate (fleet-level-config.ts RUNTIME_READ_FLEET_KEYS): the next start uses it.
122
123
  "fleet.spawn_concurrency": "now",
123
124
  "fleet.spawn_stagger_ms": "now",
125
+ // #2347 §10: checked at each create (instance-lifecycle's project_roots boundary), so the next New agent uses it.
126
+ "fleet.project_roots": "now",
124
127
  "classic.admin_users": "fleet",
125
128
  "classic.allowed_guilds": "fleet",
126
129
  // #2168: a confirmed delete stops and removes the agent at once (removeInstance) — no AgEnD restart.
@@ -1 +1 @@
1
- {"version":3,"file":"instance-config-impact.js","sourceRoot":"","sources":["../src/instance-config-impact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAM9C,0EAA0E;AAC1E,MAAM,CAAC,MAAM,YAAY,GAA4B,CAAC,KAAK,EAAE,UAAU,EAAE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,EAAE,YAAY,EAAE,CAAC;AAC1C,CAAC"}
1
+ {"version":3,"file":"instance-config-impact.js","sourceRoot":"","sources":["../src/instance-config-impact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAM9C,0EAA0E;AAC1E,MAAM,CAAC,MAAM,YAAY,GAA4B,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AAElF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAsC,IAAI,GAAG,CAAuB;IACvG,eAAe;IACf,wBAAwB;IACxB,iBAAiB;IACjB,yBAAyB;IACzB,kBAAkB;IAClB,UAAU;IACV,cAAc;IACd,aAAa;IACb,MAAM;IACN,WAAW;IACX,sFAAsF;IACtF,2BAA2B;IAC3B,wFAAwF;IACxF,qBAAqB;IACrB,oGAAoG;IACpG,WAAW;CACZ,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAwB,IAAI,GAAG,CAChE,CAAC,eAAe,EAAE,wBAAwB,CAAW;KACnD,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,wBAAwB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CACpD,CAAC;AAEF;;;GAGG;AACH,MAAM,0BAA0B,GAAwB,IAAI,GAAG,CAAC;IAC9D,UAAU;IACV,YAAY;IACZ,eAAe;CAChB,CAAC,CAAC;AAEH,wDAAwD;AACxD,MAAM,eAAe,GAAG;IACtB,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,mBAAmB;IACtE,yBAAyB,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe;IACpG,eAAe,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,WAAW;IACzE,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU;IACjE,aAAa,EAAE,gBAA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,OAAO,CAAC,YAAY,GAAG,EAAE,CAAC,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAClG,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;QACjC,OAAO,CAAC,WAAW,GAAG,EAAE,CAAC,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;QACpD,OAAO,CAAC,oBAAoB,GAAG,EAAE,CAAC,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;AAC1C,CAAC"}
@@ -200,6 +200,7 @@ export interface IncidentEventSource {
200
200
  /** `nudge_continue`: arm / drop the daemon's "tell the agent to keep going" for the error just reported. */
201
201
  armCapacityNudge?(pattern: RegExp, delayMs: number): boolean;
202
202
  cancelCapacityNudge?(reason: string): void;
203
+ markCapacityNudgePromised?(target: string): void;
203
204
  prepareCapacityNudgePause?(): Promise<CapacityNudgePauseGuard | null>;
204
205
  /** Real daemons buffer `pty_error` raised by the startup scan until the lifecycle can handle it. */
205
206
  holdStartupIncidents?(): void;
@@ -583,6 +583,19 @@ export class InstanceLifecycle {
583
583
  }, this.ctx.logger, `daemon.message_failed[${name}]`));
584
584
  }
585
585
  attachIncidentHandlers(name, daemon) {
586
+ daemon.on("capacity_nudge_cancelled", safeHandler((data) => {
587
+ const reason = data.reason === "the user cancelled" ? t("inst.codex_retry_cancel_reason_user")
588
+ : data.reason === "the instance was stopped, paused or respawned" || data.reason === "the instance is not running" ? t("inst.codex_retry_cancel_reason_stopped")
589
+ : data.reason === "the instance has work of its own" ? t("inst.codex_retry_cancel_reason_work")
590
+ : data.reason === "the failed turn is no longer idle with an empty input" ? t("inst.codex_retry_cancel_reason_pane")
591
+ : t("inst.codex_retry_cancel_reason_unsent");
592
+ this.ctx.eventLog?.insert(name, "capacity_nudge_cancelled", { reason: data.reason });
593
+ // Settle an already-dispatched promise in its original channel, including
594
+ // during a planned stop. This is not a new restart/storm incident alarm.
595
+ if (this.ctx.notifyInstanceTopic(data.target, t("inst.codex_retry_cancelled", name, reason)) === false) {
596
+ this.ctx.logger.warn({ name }, "Could not dispatch retry cancellation notice");
597
+ }
598
+ }, this.ctx.logger, `daemon.capacity_nudge_cancelled[${name}]`));
586
599
  const hangDetector = daemon.getHangDetector?.();
587
600
  if (hangDetector) {
588
601
  hangDetector.on("hang", safeHandler(async (data) => {
@@ -1194,7 +1207,9 @@ export class InstanceLifecycle {
1194
1207
  budget.set(name, { count: attempts + 1, lastAt: now });
1195
1208
  this.ctx.logger.info({ name, attempt: attempts + 1 }, "Model at capacity — will tell it to keep going");
1196
1209
  if (notificationTarget) {
1197
- this.notifyIncident(notificationTarget, "pty_error", t(rateLimit ? "inst.codex_rate_retry_scheduled" : "inst.codex_capacity_nudge_scheduled", name, String(attempts + 1), String(InstanceLifecycle.CAPACITY_BACKOFF_MAX), String(Math.round(delayMs / 1000))));
1210
+ const promised = this.notifyIncident(notificationTarget, "pty_error", t(rateLimit ? "inst.codex_rate_retry_scheduled" : "inst.codex_capacity_nudge_scheduled", name, String(attempts + 1), String(InstanceLifecycle.CAPACITY_BACKOFF_MAX), String(Math.round(delayMs / 1000))));
1211
+ if (promised)
1212
+ daemon.markCapacityNudgePromised?.(notificationTarget);
1198
1213
  }
1199
1214
  }
1200
1215
  /** An exhausted error must not pause a draft, new delivery or replacement launch. */