@songsid/agend 2.3.0-beta.22 → 2.3.0-beta.24

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 (298) hide show
  1. package/README.md +2 -2
  2. package/README.zh-TW.md +2 -2
  3. package/dist/agent-cli.js +4 -2
  4. package/dist/agent-cli.js.map +1 -1
  5. package/dist/agent-endpoint.d.ts +1 -0
  6. package/dist/agent-endpoint.js +4 -0
  7. package/dist/agent-endpoint.js.map +1 -1
  8. package/dist/agent-whats-new.d.ts +5 -0
  9. package/dist/agent-whats-new.js +16 -1
  10. package/dist/agent-whats-new.js.map +1 -1
  11. package/dist/auth-api.d.ts +7 -0
  12. package/dist/auth-api.js +54 -21
  13. package/dist/auth-api.js.map +1 -1
  14. package/dist/backend/codex-package.d.ts +30 -0
  15. package/dist/backend/codex-package.js +133 -0
  16. package/dist/backend/codex-package.js.map +1 -0
  17. package/dist/backend/codex.d.ts +2 -0
  18. package/dist/backend/codex.js +9 -2
  19. package/dist/backend/codex.js.map +1 -1
  20. package/dist/backend/grok.js +3 -1
  21. package/dist/backend/grok.js.map +1 -1
  22. package/dist/backend/kiro.d.ts +9 -1
  23. package/dist/backend/kiro.js +102 -1
  24. package/dist/backend/kiro.js.map +1 -1
  25. package/dist/backend/opencode-permission.js +1 -1
  26. package/dist/backend/opencode-permission.js.map +1 -1
  27. package/dist/backend/opencode.js +2 -1
  28. package/dist/backend/opencode.js.map +1 -1
  29. package/dist/binary-probe.js +1 -1
  30. package/dist/bug-report-cli.js +11 -10
  31. package/dist/bug-report-cli.js.map +1 -1
  32. package/dist/bug-report.js +11 -10
  33. package/dist/bug-report.js.map +1 -1
  34. package/dist/bundled-skills.d.ts +7 -3
  35. package/dist/bundled-skills.js +16 -7
  36. package/dist/bundled-skills.js.map +1 -1
  37. package/dist/channel/adapters/discord.js +3 -3
  38. package/dist/channel/adapters/discord.js.map +1 -1
  39. package/dist/channel/mcp-server.js +12 -4
  40. package/dist/channel/mcp-server.js.map +1 -1
  41. package/dist/channel/mcp-tools.d.ts +3 -1
  42. package/dist/channel/mcp-tools.js +36 -0
  43. package/dist/channel/mcp-tools.js.map +1 -1
  44. package/dist/child-process.d.ts +21 -0
  45. package/dist/child-process.js +54 -0
  46. package/dist/child-process.js.map +1 -0
  47. package/dist/cli.js +188 -204
  48. package/dist/cli.js.map +1 -1
  49. package/dist/command-table.d.ts +1 -1
  50. package/dist/command-table.js +1 -1
  51. package/dist/command-table.js.map +1 -1
  52. package/dist/config-validator.js +20 -1
  53. package/dist/config-validator.js.map +1 -1
  54. package/dist/config.js +3 -1
  55. package/dist/config.js.map +1 -1
  56. package/dist/daemon.d.ts +8 -0
  57. package/dist/daemon.js +31 -8
  58. package/dist/daemon.js.map +1 -1
  59. package/dist/darwin-memory.js +1 -1
  60. package/dist/doctor.d.ts +5 -0
  61. package/dist/doctor.js +42 -0
  62. package/dist/doctor.js.map +1 -1
  63. package/dist/export-import.js +4 -3
  64. package/dist/export-import.js.map +1 -1
  65. package/dist/fleet-level-config.d.ts +1 -1
  66. package/dist/fleet-level-config.js +2 -0
  67. package/dist/fleet-level-config.js.map +1 -1
  68. package/dist/fleet-manager.d.ts +45 -0
  69. package/dist/fleet-manager.js +324 -36
  70. package/dist/fleet-manager.js.map +1 -1
  71. package/dist/full-restart.d.ts +5 -5
  72. package/dist/full-restart.js +5 -5
  73. package/dist/full-restart.js.map +1 -1
  74. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +48 -10
  75. package/dist/general-knowledge/skills/fleet-config/SKILL.md +1 -1
  76. package/dist/general-knowledge/skills/fleet-restart/SKILL.md +7 -8
  77. package/dist/general-knowledge/skills/multi-channel/SKILL.md +1 -1
  78. package/dist/general-knowledge/skills/web-appearance/SKILL.canvas-worker-off.md +319 -0
  79. package/dist/general-knowledge/skills/web-dashboard/SKILL.canvas-worker-off.md +529 -0
  80. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +17 -4
  81. package/dist/general-knowledge/steering/core-rules.md +1 -1
  82. package/dist/instance-config-impact.js +10 -3
  83. package/dist/instance-config-impact.js.map +1 -1
  84. package/dist/instance-lifecycle.js +4 -4
  85. package/dist/locale.js +296 -4
  86. package/dist/locale.js.map +1 -1
  87. package/dist/login-flows.js +1 -1
  88. package/dist/login-shell.js +3 -1
  89. package/dist/login-shell.js.map +1 -1
  90. package/dist/ls-rows.js +1 -1
  91. package/dist/needs-you-hub.d.ts +98 -1
  92. package/dist/needs-you-hub.js +313 -44
  93. package/dist/needs-you-hub.js.map +1 -1
  94. package/dist/needs-you-live.d.ts +5 -2
  95. package/dist/needs-you-live.js +6 -3
  96. package/dist/needs-you-live.js.map +1 -1
  97. package/dist/needs-you.d.ts +58 -3
  98. package/dist/needs-you.js +36 -3
  99. package/dist/needs-you.js.map +1 -1
  100. package/dist/outbound-schemas.d.ts +3 -3
  101. package/dist/public-link-progress.d.ts +12 -1
  102. package/dist/public-link-progress.js +5 -10
  103. package/dist/public-link-progress.js.map +1 -1
  104. package/dist/public-tunnel-config.d.ts +5 -0
  105. package/dist/public-tunnel-config.js +45 -1
  106. package/dist/public-tunnel-config.js.map +1 -1
  107. package/dist/public-web-link.js +6 -5
  108. package/dist/public-web-link.js.map +1 -1
  109. package/dist/quickstart.js +15 -9
  110. package/dist/quickstart.js.map +1 -1
  111. package/dist/resource-report.js +1 -1
  112. package/dist/scheduler/task-board.d.ts +41 -1
  113. package/dist/scheduler/task-board.js +152 -5
  114. package/dist/scheduler/task-board.js.map +1 -1
  115. package/dist/sd-notify.js +2 -1
  116. package/dist/sd-notify.js.map +1 -1
  117. package/dist/service-installer.d.ts +69 -0
  118. package/dist/service-installer.js +182 -0
  119. package/dist/service-installer.js.map +1 -1
  120. package/dist/service-owner.d.ts +44 -0
  121. package/dist/service-owner.js +48 -0
  122. package/dist/service-owner.js.map +1 -0
  123. package/dist/service-plan.d.ts +8 -0
  124. package/dist/service-plan.js +13 -0
  125. package/dist/service-plan.js.map +1 -1
  126. package/dist/settings-api.d.ts +4 -0
  127. package/dist/settings-api.js +21 -3
  128. package/dist/settings-api.js.map +1 -1
  129. package/dist/settings-change.js +88 -4
  130. package/dist/settings-change.js.map +1 -1
  131. package/dist/settings-confirmation.d.ts +2 -0
  132. package/dist/settings-confirmation.js +14 -8
  133. package/dist/settings-confirmation.js.map +1 -1
  134. package/dist/settings-control.js +2 -1
  135. package/dist/settings-control.js.map +1 -1
  136. package/dist/settings-effect.js +2 -0
  137. package/dist/settings-effect.js.map +1 -1
  138. package/dist/settings-http-confirmation.d.ts +2 -0
  139. package/dist/settings-http-confirmation.js +3 -2
  140. package/dist/settings-http-confirmation.js.map +1 -1
  141. package/dist/settings-request-capability.d.ts +4 -1
  142. package/dist/settings-request-capability.js +11 -3
  143. package/dist/settings-request-capability.js.map +1 -1
  144. package/dist/setup-auth.d.ts +1 -0
  145. package/dist/setup-auth.js +2 -1
  146. package/dist/setup-auth.js.map +1 -1
  147. package/dist/setup-host.d.ts +1 -0
  148. package/dist/setup-host.js +7 -3
  149. package/dist/setup-host.js.map +1 -1
  150. package/dist/setup-wizard.js +1 -1
  151. package/dist/setup-wizard.js.map +1 -1
  152. package/dist/task-board-summary.d.ts +101 -0
  153. package/dist/task-board-summary.js +177 -0
  154. package/dist/task-board-summary.js.map +1 -0
  155. package/dist/task-board-waker.d.ts +8 -1
  156. package/dist/task-board-waker.js +15 -6
  157. package/dist/task-board-waker.js.map +1 -1
  158. package/dist/tmux-control.js +1 -1
  159. package/dist/tmux-control.js.map +1 -1
  160. package/dist/tmux-exec-helper.d.ts +13 -3
  161. package/dist/tmux-exec-helper.js +34 -29
  162. package/dist/tmux-exec-helper.js.map +1 -1
  163. package/dist/tmux-manager.js +1 -1
  164. package/dist/tmux-read.js +1 -1
  165. package/dist/tmux-read.js.map +1 -1
  166. package/dist/topic-commands.d.ts +3 -0
  167. package/dist/topic-commands.js +29 -18
  168. package/dist/topic-commands.js.map +1 -1
  169. package/dist/transcript-monitor.js +5 -0
  170. package/dist/transcript-monitor.js.map +1 -1
  171. package/dist/transcript-sources.d.ts +2 -0
  172. package/dist/transcript-sources.js +4 -0
  173. package/dist/transcript-sources.js.map +1 -1
  174. package/dist/tunnel/cloudflared-install.js +3 -1
  175. package/dist/tunnel/cloudflared-install.js.map +1 -1
  176. package/dist/tunnel/cloudflared.d.ts +1 -1
  177. package/dist/tunnel/cloudflared.js +51 -10
  178. package/dist/tunnel/cloudflared.js.map +1 -1
  179. package/dist/tunnel/named-diagnostics.d.ts +13 -0
  180. package/dist/tunnel/named-diagnostics.js +52 -0
  181. package/dist/tunnel/named-diagnostics.js.map +1 -0
  182. package/dist/tunnel/types.d.ts +2 -1
  183. package/dist/tunnel/types.js.map +1 -1
  184. package/dist/types.d.ts +9 -0
  185. package/dist/ui/app-effects.js +10 -4
  186. package/dist/ui/chat-strings.js +3 -0
  187. package/dist/ui/chat-thread.js +14 -7
  188. package/dist/ui/effect-trial-offer.js +2 -31
  189. package/dist/ui/effects-waker.js +2 -70
  190. package/dist/ui/fleet-task-card.js +5 -5
  191. package/dist/ui/fleet-task-common.js +43 -9
  192. package/dist/ui/fleet-task-work.js +107 -0
  193. package/dist/ui/fleet-tasks.js +46 -12
  194. package/dist/ui/image-lightbox.js +39 -1
  195. package/dist/ui/image-zoom.js +242 -0
  196. package/dist/ui/panel-chat.js +24 -13
  197. package/dist/ui/panel-details.js +2 -0
  198. package/dist/ui/panel-fleet.js +6 -2
  199. package/dist/ui/panel-needs.js +21 -6
  200. package/dist/ui/panel-settings.js +35 -13
  201. package/dist/ui/preview-panel.js +2 -1
  202. package/dist/ui/search-dialog.js +2 -1
  203. package/dist/ui/settings-appearance.js +44 -10
  204. package/dist/ui/settings-dialogs.js +33 -17
  205. package/dist/ui/settings-discord.js +6 -2
  206. package/dist/ui/settings-guests.js +2 -1
  207. package/dist/ui/settings-model.js +2 -11
  208. package/dist/ui/settings-mods.js +8 -3
  209. package/dist/ui/settings-strings.js +32 -0
  210. package/dist/ui/settings-token.js +3 -1
  211. package/dist/ui/settings-web-authority.js +6 -3
  212. package/dist/ui/settings-wizard.js +13 -7
  213. package/dist/ui/shared/app-i18n.js +2 -2
  214. package/dist/ui/shared/app-needs.js +2 -2
  215. package/dist/ui/shared/app-store.js +2 -2
  216. package/dist/ui/shared/app.css +93 -32
  217. package/dist/ui/shared/app.js +5 -1
  218. package/dist/ui/shared/effect-app-runtime.js +7 -5
  219. package/dist/ui/shared/effect-chat-runtime.js +2 -7
  220. package/dist/ui/shared/effect-cursor.js +3 -2
  221. package/dist/ui/shared/effect-display-metadata.js +39 -0
  222. package/dist/ui/shared/effect-registry.js +4 -2
  223. package/dist/ui/shared/effect-runtime-loader.js +3 -1
  224. package/dist/ui/shared/effect-stock-trust.js +5 -5
  225. package/dist/ui/shared/feature-flags.js +127 -0
  226. package/dist/ui/shared/identity-color.js +6 -3
  227. package/dist/ui/shared/instance-nav.js +3 -2
  228. package/dist/ui/shared/panel-view.js +14 -29
  229. package/dist/ui/shared/text-undo.js +210 -0
  230. package/dist/ui/shared/ui-dialog.js +4 -3
  231. package/dist/ui/shared/ui-icons.js +2 -0
  232. package/dist/ui/shared/usage-dialog.js +29 -8
  233. package/dist/ui/shared/view-strings.js +2 -4
  234. package/dist/ui/web-terminal/terminal.html +10 -10
  235. package/dist/ui/web-terminal/terminal.js +58 -12
  236. package/dist/update-dispatch.js +1 -1
  237. package/dist/update-launch.d.ts +1 -1
  238. package/dist/update-launch.js +1 -2
  239. package/dist/update-launch.js.map +1 -1
  240. package/dist/update-preflight.js +1 -1
  241. package/dist/usage/providers.js +1 -1
  242. package/dist/usage/providers.js.map +1 -1
  243. package/dist/view-api.js +1 -1
  244. package/dist/web-api.d.ts +6 -0
  245. package/dist/web-api.js +163 -21
  246. package/dist/web-api.js.map +1 -1
  247. package/dist/web-app-icon-worker.js +2 -1
  248. package/dist/web-app-icon-worker.js.map +1 -1
  249. package/dist/web-app-icon.d.ts +10 -8
  250. package/dist/web-app-icon.js +14 -13
  251. package/dist/web-app-icon.js.map +1 -1
  252. package/dist/web-appearance-tools.d.ts +1 -0
  253. package/dist/web-appearance-tools.js +7 -3
  254. package/dist/web-appearance-tools.js.map +1 -1
  255. package/dist/web-appearance.d.ts +4 -10
  256. package/dist/web-appearance.js +4 -3
  257. package/dist/web-appearance.js.map +1 -1
  258. package/dist/web-auth.d.ts +8 -4
  259. package/dist/web-auth.js +28 -17
  260. package/dist/web-auth.js.map +1 -1
  261. package/dist/web-chat-history.d.ts +14 -0
  262. package/dist/web-chat-history.js +26 -1
  263. package/dist/web-chat-history.js.map +1 -1
  264. package/dist/web-cookie-names.d.ts +5 -0
  265. package/dist/web-cookie-names.js +12 -0
  266. package/dist/web-cookie-names.js.map +1 -0
  267. package/dist/web-experimental-http.d.ts +2 -0
  268. package/dist/web-experimental-http.js +12 -0
  269. package/dist/web-experimental-http.js.map +1 -0
  270. package/dist/web-experimental.d.ts +11 -0
  271. package/dist/web-experimental.js +49 -0
  272. package/dist/web-experimental.js.map +1 -0
  273. package/dist/web-guest-access.d.ts +1 -0
  274. package/dist/web-guest-access.js +4 -2
  275. package/dist/web-guest-access.js.map +1 -1
  276. package/dist/web-mod-store.d.ts +2 -0
  277. package/dist/web-mod-store.js +10 -0
  278. package/dist/web-mod-store.js.map +1 -1
  279. package/dist/web-png.d.ts +4 -0
  280. package/dist/web-png.js +10 -2
  281. package/dist/web-png.js.map +1 -1
  282. package/dist/web-preview.d.ts +2 -0
  283. package/dist/web-preview.js +2 -0
  284. package/dist/web-preview.js.map +1 -1
  285. package/dist/web-returning-device.d.ts +4 -2
  286. package/dist/web-returning-device.js +12 -5
  287. package/dist/web-returning-device.js.map +1 -1
  288. package/dist/web-settings-patch.d.ts +2 -1
  289. package/dist/web-settings-patch.js +5 -1
  290. package/dist/web-settings-patch.js.map +1 -1
  291. package/dist/web-settings-tools.d.ts +1 -0
  292. package/dist/web-settings-tools.js +14 -10
  293. package/dist/web-settings-tools.js.map +1 -1
  294. package/dist/web-terminal.js +1 -1
  295. package/dist/web-theme-store.d.ts +2 -2
  296. package/dist/web-theme-store.js +6 -3
  297. package/dist/web-theme-store.js.map +1 -1
  298. package/package.json +11 -11
@@ -1,4 +1,4 @@
1
- import { type ChildProcess, type SpawnOptions } from "node:child_process";
1
+ import type { ChildProcess, SpawnOptions } from "node:child_process";
2
2
  export interface FullRestartHelperCompletion {
3
3
  code: number | null;
4
4
  signal: NodeJS.Signals | null;
@@ -11,10 +11,10 @@ type SpawnProcess = (command: string, args: readonly string[], options: SpawnOpt
11
11
  /**
12
12
  * Start the canonical environment-aware service restart and wait until the OS
13
13
  * has actually spawned it. The top-level `agend restart` command selects
14
- * systemd, launchd, or the detached-process hand-off. Do not use
15
- * `fleet restart --reload` here: its SIGUSR1 path exits successfully, so a
16
- * systemd unit with Restart=on-failure would stay down and kill this helper as
17
- * part of the old service cgroup.
14
+ * systemd, launchd, or the detached-process hand-off. It is the only full
15
+ * restart (#2356): the old `fleet restart --reload` SIGUSR1 path exited 0, so a
16
+ * systemd unit with Restart=on-failure stayed down and killed its caller with
17
+ * the old service cgroup.
18
18
  */
19
19
  export declare function launchFullRestartHelper(spawnProcess?: SpawnProcess, cliEntry?: string): Promise<FullRestartHelperHandle>;
20
20
  export {};
@@ -1,13 +1,13 @@
1
- import { spawn } from "node:child_process";
1
+ import { spawn } from "./child-process.js";
2
2
  import { withOrigin } from "./fleet-control-audit.js";
3
3
  import { canonicalCliEntry } from "./cli-entry.js";
4
4
  /**
5
5
  * Start the canonical environment-aware service restart and wait until the OS
6
6
  * has actually spawned it. The top-level `agend restart` command selects
7
- * systemd, launchd, or the detached-process hand-off. Do not use
8
- * `fleet restart --reload` here: its SIGUSR1 path exits successfully, so a
9
- * systemd unit with Restart=on-failure would stay down and kill this helper as
10
- * part of the old service cgroup.
7
+ * systemd, launchd, or the detached-process hand-off. It is the only full
8
+ * restart (#2356): the old `fleet restart --reload` SIGUSR1 path exited 0, so a
9
+ * systemd unit with Restart=on-failure stayed down and killed its caller with
10
+ * the old service cgroup.
11
11
  */
12
12
  export function launchFullRestartHelper(spawnProcess = spawn, cliEntry = canonicalCliEntry()) {
13
13
  return new Promise((resolve, reject) => {
@@ -1 +1 @@
1
- {"version":3,"file":"full-restart.js","sourceRoot":"","sources":["../src/full-restart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAwC,MAAM,oBAAoB,CAAC;AAGjF,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAcnD;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CACrC,eAA6B,KAAK,EAClC,QAAQ,GAAG,iBAAiB,EAAE;IAE9B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,KAAmB,CAAC;QACxB,IAAI,CAAC;YACH,KAAK,GAAG,YAAY,CAClB,OAAO,CAAC,QAAQ,EAChB,CAAC,QAAQ,EAAE,SAAS,CAAC,EACrB,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,CAAC,qBAAqB,CAAC,EAAE,CAC5E,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,GAAG,CAAC,CAAC;YACZ,OAAO;QACT,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,OAAO,CAA8B,QAAQ,CAAC,EAAE;YACrE,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;YACjE,yEAAyE;YACzE,0EAA0E;YAC1E,wEAAwE;YACxE,oBAAoB;YACpB,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,CAAC,GAAY,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChD,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE;YACvB,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YACzC,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"full-restart.js","sourceRoot":"","sources":["../src/full-restart.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAcnD;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CACrC,eAA6B,KAAK,EAClC,QAAQ,GAAG,iBAAiB,EAAE;IAE9B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,KAAmB,CAAC;QACxB,IAAI,CAAC;YACH,KAAK,GAAG,YAAY,CAClB,OAAO,CAAC,QAAQ,EAChB,CAAC,QAAQ,EAAE,SAAS,CAAC,EACrB,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,CAAC,qBAAqB,CAAC,EAAE,CAC5E,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,GAAG,CAAC,CAAC;YACZ,OAAO;QACT,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,OAAO,CAA8B,QAAQ,CAAC,EAAE;YACrE,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;YACjE,yEAAyE;YACzE,0EAA0E;YAC1E,wEAAwE;YACxE,oBAAoB;YACpB,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,CAAC,GAAY,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChD,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE;YACvB,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YACzC,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -102,6 +102,42 @@ restarted for you** and the reply says `restarted: true`. A paused or stopped on
102
102
  is not started: the reply says `restarted: false`, and the switch applies at its
103
103
  next start.
104
104
 
105
+ Set `credential_profile` with `update_instance_config` or web Settings. Never
106
+ hand-edit `fleet.yaml`.
107
+
108
+ **What to do / what not to do, per backend**
109
+
110
+ **Codex — copy nothing.** A profile swaps only `auth.json`. Changing the profile
111
+ does not relocate or copy conversation stores (`sessions/`, `archived_sessions/`,
112
+ `state_5.sqlite` and the other thread/state DBs). They stay in the instance's
113
+ private `CODEX_HOME` (`~/.agend/cx/<hash>/`); that home links `auth.json` to the
114
+ profile's copy. An instance that already has its own `state_5.sqlite` keeps using
115
+ that file — it is not always the shared one.
116
+
117
+ Procedure: (1) the target profile has a Codex login (`auth.json` with a token) —
118
+ if the switch is refused, relay that refusal's login command; (2) set the profile
119
+ through tooling, as above. A running instance is restarted for you
120
+ (`restarted: true`); do not restart it again. A paused or stopped one applies
121
+ the switch at its next start (`restarted: false`).
122
+
123
+ The switch keeps the existing home and history and uses the normal resume path.
124
+ Relay `conversation_carried_over` and `conversation_note` from the actual
125
+ response. For Codex that flag is true because AgEnD did not force a fresh start —
126
+ it is not a check that the new process opened the same thread. If there is no
127
+ suitable session (or the DB is unreadable), Codex starts fresh as it would on any
128
+ other launch. **Never** copy `state_5.sqlite`, the `cx/` hash dirs or rollout
129
+ JSONL by hand. That can fork or corrupt the thread index.
130
+
131
+ **Claude Code — copy nothing yourself.** AgEnD copies the transcript and its
132
+ folder into the new profile and resumes it there with `--continue`. The
133
+ originals stay; the switch copies, never moves. Do not copy `.jsonl` by hand.
134
+
135
+ **Kiro — copy nothing.** Login and conversations share one database, so a
136
+ different subscription is a different set of them. Do not copy `data.sqlite3`.
137
+ A switch is always a new conversation (`conversation_carried_over: false`);
138
+ AgEnD hands the new session a summary of the work (`handover_chars`), not the
139
+ transcript.
140
+
105
141
  **For kiro**, a switch is always a **new conversation**
106
142
  (`conversation_carried_over: false`). Kiro keeps its conversations in the same
107
143
  database as its login, so a different subscription has a different set of them
@@ -140,13 +176,10 @@ left untouched; the switch copies, never moves.
140
176
  `carry_failed` from the actual response.** Do not predict the outcome.
141
177
 
142
178
  **For codex** the reply says `conversation_carried_over: true` and carries a
143
- `conversation_note`. Relay it as what it is — a statement about where the
144
- history lives, not a promise about what happens next. The accurate sentence is
145
- "codex keeps its history outside the login, so both subscriptions share it".
146
- **Do not promise the agent will pick the thread back up**: whether codex reopens
147
- a conversation recorded under a different account has not been tested yet. If it
148
- does not, the agent starts a fresh conversation and carries on — nothing breaks,
149
- it just does not continue.
179
+ `conversation_note`. Relay both as they are. The accurate sentence is "codex
180
+ keeps its history outside the login, so both subscriptions still see it". That
181
+ flag is not a check that the new process opened the same thread. There is
182
+ nothing to copy.
150
183
 
151
184
  `backend_options` merges per backend, so setting a kiro option leaves a codex
152
185
  option on the same instance alone.
@@ -221,14 +254,19 @@ and log it in, so report it as such rather than as a missing subscription.
221
254
  verbatim in the channel before switching. For claude-code, AgEnD copies the
222
255
  conversation automatically; relay `conversation_carried_over` and, if it is
223
256
  false, the `carry_failed` reason and the cold-cache note from
224
- `conversation_note` when carry succeeds.
257
+ `conversation_note` when carry succeeds. For Codex, copy nothing: the history
258
+ stays where it is and the normal resume path runs. Relay the actual
259
+ `conversation_carried_over` and `conversation_note`.
260
+
225
261
  ## Do not
226
262
 
227
263
  - Do not invent a profile that has never been logged in and report success —
228
264
  the switch is refused, and the refusal tells you what to relay.
229
265
  - Do not set `credential_profile` for a backend other than `kiro-cli`, `codex`
230
266
  or `claude-code`; it is ignored, and the config validator warns about it.
231
- - Do not tell a codex user their conversation will definitely continue across a
232
- switch. Say the history is shared; that part is verified.
267
+ - Do not copy a Codex agent's `state_5.sqlite`, `cx/` hash dirs or rollout JSONL
268
+ by hand. Set the profile through tooling; a running instance is restarted for
269
+ you. Do not tell the user the agent has resumed the same thread just because
270
+ `conversation_carried_over` is true — relay the actual reply.
233
271
  - Do not use a profile name with slashes or spaces — it becomes a directory
234
272
  name and is rejected.
@@ -95,5 +95,5 @@ Fix all errors before `agend reload`; warnings are advisory.
95
95
  **After editing config:**
96
96
  ```bash
97
97
  agend reload # hot-reload (SIGHUP) — behavior switches apply without restart
98
- agend fleet restart # if channel or other cold defaults changed
98
+ agend restart # if channel or other cold defaults changed (--yes from a fleet session)
99
99
  ```
@@ -7,19 +7,19 @@ roles: [general]
7
7
  ## Fleet Restart & Recovery
8
8
 
9
9
  **Restart types:**
10
- - `agend fleet restart` — graceful, in the same process: instances restart once idle (does **not** load new code)
11
- - `agend fleet restart --reload` — full process restart: new code and new connections take effect
12
- - `agend fleet restart <name>` — restart one instance now
10
+ - `agend restart` — the one full restart: the AgEnD service restarts through whatever runs it (systemd unit, launchd job, or a detached hand-off), so new code and new connections take effect
11
+ - `agend restart <name>` — restart one instance now; the fleet keeps running
12
+ - `/restart` in the General chat — instances restart inside the running fleet once idle (does **not** load new code); `/restart full` is `agend restart`
13
+ - `agend fleet restart` is deprecated (removed in 2.4): it only runs `agend restart`. Never use it — before 2.3 its `--reload` left a systemd fleet stopped
13
14
  - `agend reload` — SIGHUP hot-reload, reconciles instances without restarting the fleet process. **Do not run `agend reload` after `create_instance`** — the fleet reconciles automatically when the instance is created; a redundant reload will restart every instance whose config changed, including ones you did not intend to touch.
14
15
  - `restart_instance("<name>")` — single instance restart, reloads fleet.yaml first
15
- - `agend restart` — restarts the AgEnD service itself (systemd / launchd / detached), not one instance
16
16
 
17
- **From a fleet agent session**, `agend stop`, `agend restart`, `agend update`, `agend fleet stop` and `agend fleet restart` (without a name) affect every instance and are refused unless you pass `--yes`. Each is written to `restart-audit.log` first. `--force` is for an operator's own shell only.
17
+ **From a fleet agent session**, `agend stop`, `agend restart`, `agend update` and `agend fleet stop` (without a name) affect every instance and are refused unless you pass `--yes`. Each is written to `restart-audit.log` first. `--force` is for an operator's own shell only.
18
18
 
19
19
  **After tmux crash:**
20
20
  - Fleet detects the tmux server's death and opens a recovery window: spawns and deliveries are held 30 s, then 2 min and 10 min if it crashes again (losing single windows while the server lives holds nothing)
21
21
  - Some instances may fail to restart due to rate limits from simultaneous startup
22
- - Fix: manually restart failed instances, or do another `agend fleet restart`
22
+ - Fix: `restart_instance` the failed instances, or `agend restart --yes`
23
23
  - Check failed instances: `agend ls` shows "stopped" status
24
24
 
25
25
  **Rate limit recovery:**
@@ -39,8 +39,7 @@ It installs the selected release, checks the install, and restarts the fleet ser
39
39
 
40
40
  **Manual restart (if update isn't needed):**
41
41
  ```bash
42
- agend fleet restart --yes # graceful (SIGUSR2) — keeps sessions, reloads config
43
- agend fleet restart --reload --yes # full process restart — new code takes effect
42
+ agend restart --yes # full restart through systemd/launchd — new code takes effect
44
43
  ```
45
44
 
46
45
  **NEVER do:**
@@ -69,4 +69,4 @@ instance's own topic (`web.echo_to_channel: false` turns that off; a ClassicBot
69
69
  1. Change `channel:` to `channels:` array, add `id` to existing entry
70
70
  2. Add new platform entry with its own `id`
71
71
  3. Add a general instance for the new platform with `channel_id: <new-adapter-id>`
72
- 4. Restart the whole process — connections are created when it starts: `agend fleet restart --reload` (`--yes` from a fleet session)
72
+ 4. Restart the whole process — connections are created when it starts: `agend restart` (`--yes` from a fleet session)
@@ -0,0 +1,319 @@
1
+ ---
2
+ name: web-appearance
3
+ description: How you look on the AgEnD web dashboard — check it, change your own theme, identity card, identity colour and widgets, set an ambient effect (falling petals, click stars), and preview the result; and, for General, changing Settings → Web appearance for the user
4
+ roles: [general, worker, classic]
5
+ ---
6
+
7
+ ## What it is
8
+
9
+ People see you on the web dashboard: in the sidebar, at the top of your chat, on your Details page and in View. You
10
+ can shape how you look there — **only your own look, and only on the surfaces that are yours**:
11
+
12
+ | Surface | What you set | Tools |
13
+ |---|---|---|
14
+ | Your name and role line | display name, description | `set_display_name`, `set_description` |
15
+ | Your status stamp | persona emoji | `set_persona_emoji` (see the `persona-emoji` skill) |
16
+ | Your chat | theme: colours, accent, bubbles, font, background picture, working label | `set_web_theme`, `set_web_theme_asset` |
17
+ | The whole page, while your chat is open | your theme's colours on the sidebar, the header, the usage rail (a phone: the drawer, the header, the tabs) — colours only | `set_web_theme` (`page`) |
18
+ | Your face and ring | theme picture and accent | `set_web_theme`, `set_web_theme_asset` |
19
+ | Your identity card | portrait, banner, tagline, bio | `set_web_theme` (`card.*`), `set_web_theme_asset` |
20
+ | Your identity colour | the colour people find you by in the sidebar, and where it shows (name, bar, ring) | `set_web_theme` (`identity`) |
21
+ | Your chat header strip and Details page | widgets: small panels of facts the dashboard draws | `set_web_widget`, `remove_web_widget` |
22
+ | An ambient effect in your chat | falling petals, snow, rising lanterns, twinkles, stars where a person clicks — data only, drawn by the dashboard | `set_web_ambient`, `clear_web_ambient` |
23
+
24
+ None of these tools takes a target: they always act on you. You can't change another instance, the dashboard's own
25
+ chrome (beyond your colours on it while your chat is open), a person's sidebar widget, or a person's custom CSS.
26
+
27
+ ## For the user: Settings → Web appearance (General, coordinators, full)
28
+
29
+ If you are General (or a coordinator or full profile), you can change the user's **Settings → Web appearance** for
30
+ them, exactly as the page changes it: the same checks, the same refusals. Custom CSS keeps its safe rules: no remote
31
+ URLs, assets only as `url("asset:<id>")`, at most 64 KiB. Other instances can't; they shape only their own look (the rest
32
+ of this skill).
33
+
34
+ 1. **Read first:** `get_web_settings` returns a `summary` in plain words (tell the user from it), the values, and
35
+ `people`: the host operator and everyone who has signed in. Host settings are everyone's on this host. Custom CSS is one person's own: pass `person` as the entry whose id is the user's (`person:<adapter>:<their id>`),
36
+ else the host operator's are changed.
37
+ 2. **One change per call:** `set_web_settings({ person?, change })`, where `change.what` is one of:
38
+
39
+ | `what` | Changes | Example |
40
+ |---|---|---|
41
+ | `host` | `themes_shown`, `card_size` (s/m/l), `card_sizes` ({instance: s/m/l}), `page_colours` ({instance: page/chat}), `colour_places` (name/bar/ring), `colours_off`, `sidebar_widget` ({spec, data}) — null puts one back to its default | `{ what: "host", set: { colour_places: ["name","ring"] } }` |
42
+ | `agent_colour` | one agent's colour (`preset:<name>` or `#rrggbb`) and places; null resets each | `{ what: "agent_colour", instance: "atlas", colour: "preset:teal" }` |
43
+ | `page_colours` | where one agent's theme colours go: `page` (the whole page), `chat` (only its chat) or `agent` (its own `page.on`) — as ⋯ → Page colours sets it | `{ what: "page_colours", instance: "atlas", choice: "chat" }` |
44
+ | `banner_focus` | which part of one agent's cropped card banner stays in view: `focus` 0 (top) … 100 (bottom), 50 the centre; it wins over the agent's own `card.bannerFocus`; null follows the agent's again | `{ what: "banner_focus", instance: "atlas", focus: 20 }` |
45
+ | `custom_css` | `save` (with `text`): goes **on trial**. It waits until they open the dashboard (up to 10 minutes; never opened, it goes back unseen), then goes back by itself 20 s after it is on their screen unless kept (#2198). `keep` (with `trial`: the id `save` returned — a different trial on now, say one they saved on their page since, is refused with `trial_mismatch`, never kept instead; or, kept after that 20 s ran out, it is put back in force as `use` of it), `revert` (the trial), `use` (with `version`: an earlier saved one, at once), `off` | `{ what: "custom_css", action: "save", text: "…" }`; tell them to open the dashboard and look, then `keep` (with that `trial`) only when they say so — a `keep` that comes too late (`not_on_trial`) means use `use` with the version from `get_web_settings` |
46
+ | `ambient` | one agent's ambient effect, set for the user: `ambient` is the same spec as `set_web_ambient`'s (it replaces the one of its kind, and the agent can't change it after); `ambient: null` clears (`which`: `loop` or `click`, default both) | `{ what: "ambient", instance: "atlas", ambient: { preset: "fall", glyphs: ["🌸","❀","✿"] } }` |
47
+ | `restore_defaults` | the host settings back to their defaults, and the person's custom CSS off | |
48
+
49
+ 3. **Say what changed** in the user's words (read again if unsure). A refusal says why: the same words the page would
50
+ show.
51
+
52
+ **Only the person can do these, on the page:**
53
+ - choose a file from their computer: add a CSS asset or a card picture;
54
+ - this browser's own switches: custom CSS off on this device, pausing effect playback;
55
+ - the card upload limits (fleet configuration; a raise waits for an admin's confirmation).
56
+
57
+ ## Look first
58
+
59
+ - `get_web_appearance` — how you appear **now**, resolved exactly as the dashboard resolves it: your face and where it
60
+ comes from (`profile`, `theme`, `bot`, `emoji` or `initial`), your ring colour, your **identity colour**
61
+ (`identity_color`: the colour people find you by in the sidebar, its `source` — `person`, `agent` (your theme's
62
+ `identity.color`, else its `accent`), `role` (your own bot's Discord role) or `auto` — its `light` / `dark` values,
63
+ where it shows (`show`: `name`, `bar`, `ring`) and whose choice that is (`show_source`: `person`, `agent` or `host`),
64
+ and `off` when the host turned colours off), your card field by field
65
+ (each marked `human` or `agent`), your theme per light/dark mode after the defaults, whether a person locked it, and
66
+ your limits.
67
+ - `preview_web_appearance` (`modes`: `["light"]`, `["dark"]` or both) — draws that as an SVG per mode into
68
+ `.agend/appearance/<mode>.svg` in your working directory, with the pictures it shows written beside it
69
+ (`avatar.png`, `portrait.png`, …), and returns both lists of paths. Read the SVGs for exact colours, geometry and
70
+ text, and the pictures as images. Only your own pictures are there.
71
+ - `get_web_theme` — your stored theme, the token defaults it is drawn over, your uploaded pictures (`id`, `slot`), and
72
+ `limits` (changes left, each picture slot's size limits, your picture quota).
73
+
74
+ ## What wins over what
75
+
76
+ - **A person's choices win.** A picture uploaded for you in View beats your theme picture. A person's card field (from
77
+ View's Edit profile) beats yours, field by field — leave it to them. A person can **Lock** your theme (every change
78
+ you try is refused with `locked`) or **Reset** it (your theme, card and pictures go; a lock stays).
79
+ - A widget **a person placed** in one of your slots takes your values (`data`), but you can't replace or remove it
80
+ (`person_placed`).
81
+ - **Each viewer decides what they see.** Anyone can turn agents' themes and widgets off for their own screens, and
82
+ `?safe=1` loads a page without them; they then see the default look, no widgets, and your face follows the usual order without your theme
83
+ picture — a picture a person uploaded for you, else your bot's avatar, your persona emoji or your first letter.
84
+ Don't rely on your theme to say something important.
85
+ - The fleet can turn agent changes off entirely (`web.themes.agent_edit: false`): every change is refused with
86
+ `theme_editing_off`; what you stored stays.
87
+
88
+ ## Change your theme
89
+
90
+ `set_web_theme { set?, clear? }` — all or nothing; `set` merges into your current theme, `clear` removes dotted paths.
91
+ Typed values only; anything else is refused with `{ errors: [{ path, problem }] }`:
92
+
93
+ - `colors.light` / `colors.dark`: any of `bg`, `surface`, `text`, `text2`, `accent`, `userBubble`, `agentBubble` as
94
+ `#rrggbb` (or `#rgb`). **Contrast is checked per mode**: `text` at least 4.5:1 on `bg`, `surface` and both bubbles;
95
+ `text2` at least 4.5:1 on `bg` and `surface`; `accent` at least 3:1 on `bg` — a palette that fails is refused, naming
96
+ the pair.
97
+ - `accent`: `#rrggbb` for both modes (a mode's own `accent` wins). Without `identity.color`, it is also your identity
98
+ colour.
99
+ - `identity`: `{ color?, show? }`: your identity colour and where it shows.
100
+ - `color` is a preset (`red`, `orange`, `amber`, `lime`, `green`, `teal`, `cyan`, `blue`, `indigo`, `violet`, `pink`,
101
+ `slate`, each readable in light and dark) or `#rrggbb`.
102
+ - `show` is a list of `name`, `bar` and `ring` (`[]` for nowhere). Left out, the host's default applies (name, bar and ring).
103
+ - A person's choice for you in the dashboard always wins, field by field, and their Reset brings yours back.
104
+ `get_web_appearance` says which is in force.
105
+ - `page` (#2196): `{ on?: true | false, sidebar?: { light?, dark? } }` — `on: true` puts your colours (bg, surface, text,
106
+ text2, accent; the sidebar's own colour per mode in `sidebar`, else your `bg`) on **the whole page while your chat,
107
+ View, Log or Details is open**: the sidebar, the header, the usage rail; on a phone the drawer, the header and the
108
+ tabs. Colours only: never fonts, pictures or layout, and **AgEnD's status colours** (the Needs you count, the state
109
+ dots, errors, the focus ring — `get_web_theme`'s `status_colors`) are never yours to change. With `on: true` the
110
+ contrast check adds: `text` and `text2` 4.5:1 and `accent` 3:1 on the sidebar, and every status colour 3:1 on the
111
+ sidebar and on `bg`. A person's choice for you (⋯ → **Page colours**: your choice, the whole page, only your chat)
112
+ wins; viewers with agents' themes off or `?safe=1` see the page's own look.
113
+ - For a person's **custom CSS** (#2199): while an agent's Chat, View, Log or Details is open, `<body>` has
114
+ `data-agent="<instance name>"` (none elsewhere), set in the same render as the page — so a person's stylesheet can
115
+ follow the open agent: `body[data-agent="atlas"] { --bg-sidebar: … }`. It is the person's, not yours to set.
116
+ - `bubble`: `{ radius: 0..24, border: "none" | "thin" | "accent" }`.
117
+ - `font`: `"inter"`, `"system"` or `"mono"`.
118
+ - `background`: `{ image: <asset id>, fit: "cover" | "contain", opacity: 0.05..1 }`.
119
+ - `avatar`: an asset id — your face (below a person's upload).
120
+ - `workingLabel`: 1..24 characters on one line, shown while you work instead of "is working…".
121
+ - `card`: `{ portrait?, banner?, tagline?, bio?, bannerFocus? }` — see below.
122
+
123
+ Example:
124
+
125
+ ```json
126
+ { "set": { "accent": "#7c3aed", "colors": { "dark": { "bg": "#14121f" } }, "bubble": { "radius": 12, "border": "accent" },
127
+ "font": "inter", "workingLabel": "Reviewing" } }
128
+ ```
129
+
130
+ `reset_web_theme` puts your theme back to the default (it counts as a change).
131
+
132
+ ## Pictures
133
+
134
+ `set_web_theme_asset { slot, file }` — `file` is a picture in **your working directory** (no symlinks; read on your side,
135
+ never by path on the fleet). It returns `{ id }`; name that id in `set_web_theme`. Metadata such as GPS is removed, and
136
+ the id is the hash of what is kept, so the same picture is the same id.
137
+
138
+ | Slot | Types | Limits |
139
+ |---|---|---|
140
+ | `background` | png, jpeg, webp, gif | 512 KiB, 4096 px a side |
141
+ | `avatar` | png, jpeg, webp, gif | 256 KiB, 4096 px a side |
142
+ | `portrait` | png, jpeg, webp | set by the fleet (default 1024×1536, 1.5 MiB) |
143
+ | `banner` | png, jpeg, webp | set by the fleet (default 1600×600, 768 KiB) |
144
+ | `glyph` | png, webp, gif | 64 KiB, 128 px a side; at most 4 (for `set_web_ambient`'s `glyphs`) |
145
+
146
+ A picture holds one slot: upload it again for another slot only if it is a different picture. `get_web_theme`'s
147
+ `limits.asset_slots` has the limits in force and `limits.asset_quota` how many pictures you may keep. A picture your
148
+ theme stops naming is deleted.
149
+
150
+ ## Your identity card
151
+
152
+ `card.tagline` (one line, 1..60 characters), `card.bio` (1..280 characters, at most 3 line breaks), `card.portrait` and
153
+ `card.banner` (asset ids uploaded for those slots). Text is shown as text — never markup or links. A person may set
154
+ their own version of any field; theirs is shown instead of yours.
155
+
156
+ The card goes **inside `set`**: `set_web_theme({ set: { card: { tagline, bio, portrait, banner } } })` (a top-level
157
+ `card` argument is refused).
158
+
159
+ **Your banner is cropped: never drawn wider than 5 : 1** (on a wider screen it is centred over a blurred copy) **nor
160
+ narrower than 9 : 4** (which crops the sides). Make it **1600×600** (the default limit) and keep faces and text
161
+ inside the **safe area: the middle 84% of the width × 53% of the height — 1350×320** — which every card shows on every
162
+ screen and layout. `card.bannerFocus` (0 top … 100 bottom; default 50, the centre) moves that area up or down: put a face
163
+ near the top at `bannerFocus: 0`. A person's focus (Edit profile, or General's `set_web_settings { what: "banner_focus" }`)
164
+ wins over yours. `preview_web_appearance` draws the banner cropped at its focus, as the page does (an M card).
165
+
166
+ **In your chat** the card is hidden until the person shows it (the card menu in the chat header: Show card, Show picture
167
+ and bio). Shown, the banner sits right under the header and they can fold your portrait, tagline and bio away, keeping
168
+ only the banner. Their choice,
169
+ kept on their device; you cannot change it. So a banner that says who you are on its own reads well in your chat too.
170
+
171
+ ## Your identity colour
172
+
173
+ The colour people find you by in the sidebar, drawn on your name, a bar at your row's left edge and/or the ring around
174
+ your picture. Set yours with `set_web_theme({ set: { identity: { color, show } } })` (see Change your theme).
175
+
176
+ - **Which colour shows**, first match wins: a **person's** pick for you (⋯ → Colour… or View's Edit profile, also from a
177
+ temporary public link) > **yours** (`identity.color`, else your theme's `accent`; only for a viewer who shows agents'
178
+ themes) > your own bot's Discord **role** colour > an **automatic** soft colour chosen from your name (two instances
179
+ may share one).
180
+ - **Where it shows**: a person's choice for you > yours (`identity.show`; again only while themes are shown) > the
181
+ host's default (Settings → Web appearance; name, bar and ring unless changed).
182
+ - The host can **turn colours off** for everyone: nothing is drawn, and every pick, yours included, is kept for when
183
+ they come back.
184
+ - `get_web_appearance`'s `identity_color` shows what is in force: `color`, `source` (`person`, `agent`, `role`, `auto`),
185
+ `light` / `dark`, `show`, `show_source` (`person`, `agent`, `host`) and `off`.
186
+
187
+ ## Widgets
188
+
189
+ A widget is a small panel of facts the dashboard draws **with its own components**: you send what to show and the
190
+ values, never HTML, script, links or CSS. It takes your theme's colours and always carries a `✦ <title>` chip. Nothing
191
+ in it can be clicked or focused.
192
+
193
+ `set_web_widget { slot, spec?, data? }`:
194
+
195
+ - `slot`: `chat_header` (a strip under your chat header: at most **4** items, of `stat`, `progress`, `text`, `badge`)
196
+ or `details` (a card on your Details page: at most **8** items, any type). `sidebar` is a person's: `owner_slot`.
197
+ - `spec` places or replaces the widget (a change):
198
+ `{ v: 1, title: 1..24 characters, items: [item, …] }`, where each item is `{ type, label?, key | bind, … }`:
199
+
200
+ | Type | Shows | Value | Extra |
201
+ |---|---|---|---|
202
+ | `stat` | a label and a number or short word | number, or 1..24 characters | `unit` (1..8 characters) |
203
+ | `progress` | a bar and its percentage | number, 0..`max` | `max` (default 100) |
204
+ | `text` | one line | 1..120 characters | |
205
+ | `list` | a short list | 1..6 lines of 1..60 characters | |
206
+ | `badge` | a coloured word | 1..24 characters | `tone`, or `tones: { word: tone }` (`ok`, `warn`, `bad`, `info`, `muted`) |
207
+ | `spark` | a sparkline and its last number | 2..48 numbers | |
208
+
209
+ `label` (1..24 characters) is required for `stat`, `progress` and `spark`. `key` (`a-z`, `0-9`, `_`) names a value
210
+ in your `data`. `bind` shows a value the page already has: `state` (`working`, `idle`, `needs`, `stopped`,
211
+ `crashed`) on `text` or `badge`, `context_pct` on `stat` or `progress`, `cost_usd` on `stat`. Exactly one of the
212
+ two. A missing value shows `—`.
213
+ - `data` alone updates the placed widget's values: merged, `null` removes a key. Values must fit every item that shows
214
+ them; a key no item shows is refused. Data has **its own budget**, separate from theme changes: at least **10 s**
215
+ apart, at most **180 an hour**.
216
+ - The spec is at most 2048 bytes and the data at most 4096.
217
+
218
+ `remove_web_widget { slot? }` takes your widget out of one slot, or both (a change). `get_web_theme` and
219
+ `get_web_appearance` list your widgets.
220
+
221
+ ```json
222
+ { "slot": "chat_header", "spec": { "v": 1, "title": "Build", "items": [
223
+ { "type": "progress", "label": "Tests", "key": "tests" },
224
+ { "type": "badge", "label": "State", "bind": "state", "tones": { "working": "info", "needs": "warn" } },
225
+ { "type": "text", "key": "step" } ] },
226
+ "data": { "tests": 40, "step": "Running unit tests" } }
227
+ ```
228
+
229
+ Then, as you go: `set_web_widget { "slot": "chat_header", "data": { "tests": 75 } }`.
230
+
231
+ ## Ambient effects
232
+
233
+ An ambient effect is **data only**: you choose a preset and its glyphs, the dashboard draws them. No code runs, so it
234
+ needs no Try, no preview consent and no measurement — use it for petals, snow, lanterns, sparkles and stars on a click.
235
+
236
+ `set_web_ambient { preset, glyphs, colors?, count?, duration?, size?, sway?, spread?, rotate?, opacity? }`:
237
+
238
+ | `preset` | What it draws | `count` | `duration` (seconds, [min, max]) |
239
+ |---|---|---|---|
240
+ | `fall` | glyphs drifting down behind your chat, endlessly | 1..24 particles (default 12) | 4..30 (default [9, 19]) |
241
+ | `rise` | the same, drifting up | 1..24 (12) | 4..30 ([9, 19]) |
242
+ | `twinkle` | glyphs pulsing in place | 1..24 (12) | 1..10 ([2, 5]) |
243
+ | `burst-on-click` | glyphs scattering from where a person clicks or taps in your chat | 4..16 per click (10) | 0.3..2 ([0.5, 0.9]) |
244
+
245
+ - `glyphs`: 1..4, picked at random per particle — a string of 1..2 characters (an emoji, `✦`, `❀`), or `{ "asset": id }`,
246
+ a picture you uploaded with `set_web_theme_asset` to the `glyph` slot.
247
+ - `colors`: 0..5 `#rrggbb` for text glyphs (default: your accent). `size`: [min, max] px, 10..40 (default [14, 22]).
248
+ `sway`: sideways drift for fall and rise, 0..80 px (40). `spread`: how far a burst scatters, [min, max] 20..120 px
249
+ ([34, 90]). `rotate`: 0..720 degrees over a run (300). `opacity`: [start, peak, end], each 0..1 ([0, 0.85, 0.15]).
250
+ - Your chat holds **one looping ambient** (`fall`, `rise` or `twinkle`) **and one `burst-on-click`**: setting one
251
+ replaces only its own kind. `clear_web_ambient { which? }` clears `loop`, `click`, or both.
252
+ - It is drawn **behind your messages** and never takes a click (a burst shows over them for a moment, then is gone).
253
+ - Who sees it: everyone who shows agents' looks, the public link included. Not with "Show agents' themes, effects and
254
+ widgets" off, `?safe=1`, or on a device that chose to follow the system's reduced-motion setting while
255
+ the system asks for it. A hidden tab pauses it.
256
+ - Like a theme: a change for the rate limit, refused while a person locked your look; one a person set is theirs
257
+ (`person_placed`). A person's Reset of your theme clears it. `get_web_appearance` shows it, and
258
+ `preview_web_appearance` draws the looping one, still, behind the bubbles.
259
+
260
+ ```json
261
+ { "preset": "fall", "glyphs": ["🌸", "❀", "✿"], "colors": ["#f4a7b9", "#ffd1dc"], "count": 12, "duration": [9, 19] }
262
+ ```
263
+
264
+ Then stars on a click, alongside: `set_web_ambient { "preset": "burst-on-click", "glyphs": ["✦", "✧"] }`.
265
+
266
+ ## Limits
267
+
268
+ - At least **30 s** between changes, at most **10 changes an hour** — refused with `rate_limited` and
269
+ `retry_after_s`. Only an accepted change counts; a refused or invalid one costs nothing.
270
+ - Picture uploads are not counted. Each picture slot's size limits, your picture quota and
271
+ each file's own caps still apply; using a picture in your theme is a change.
272
+ - Widget values (`set_web_widget` with `data` only): at least **10 s** apart, at most **180 an hour**, apart from the
273
+ above.
274
+ - `set_web_ambient` and `clear_web_ambient` are changes.
275
+ - Plan the whole look, check it in one `set_web_theme`, then preview — don't iterate change by change.
276
+
277
+ ## A good workflow
278
+
279
+ 1. `get_web_appearance` and `get_web_theme`: see where you start, whether you are locked, what you have left.
280
+ 2. Upload the pictures you need (`set_web_theme_asset`), one per slot.
281
+ 3. One `set_web_theme` with everything; fix any `errors` it names.
282
+ 4. `preview_web_appearance` and Read the SVGs for both modes. Check contrast and that your card reads well.
283
+
284
+ From a shell: `agend-agent theme get|set key=value…|set --json '<patch>'|clear <path>…|asset <slot> <file>|reset`,
285
+ `agend-agent appearance`, `agend-agent appearance preview [light|dark]`, and
286
+ `agend-agent widget set <slot> '<spec json>' ['<data json>']|data <slot> '<data json>'|remove [slot]`,
287
+ `agend-agent ambient set '<spec json>'|clear [loop|click]`.
288
+
289
+ ## Files in your working directory
290
+
291
+ Asset uploads must be inside your working directory. For an external project,
292
+ use files there as before. For your own AgEnD-managed workspace under `~/.agend/workspaces/`, ordinary files there
293
+ also work; no staging folder is required. This includes the standard `<your-instance-name>` folder (ClassicBot and
294
+ instances without a project directory) and an exclusively configured folder with another name, such as instance
295
+ `alpha` with `working_directory: ~/.agend/workspaces/alpha-home` in `fleet.yaml`. Its canonical configured path must
296
+ not overlap another instance's configured or standard workspace, including persisted ClassicBot peers that are
297
+ stopped or paused. The `workspaces/` root itself is not a workspace.
298
+
299
+ General, adapter-specific General (such as `general-telegram`), and other configured working directories elsewhere
300
+ inside the AgEnD state directory must stage inputs under **`web-assets/`**. For example, put a banner at
301
+ `web-assets/banner.png`, relative to that working directory. Its root
302
+ and backend configuration folders are not upload areas. Generated previews use the fixed
303
+ `.agend/appearance/` directory and can be read back there.
304
+
305
+ The daemon uses its launch identity and configuration; the CLI resolves `AGEND_INSTANCE_NAME` against `fleet.yaml`.
306
+ These checks require a canonical, exclusively owned directory: the state root, shared or overlapping configured
307
+ working directories, another instance's directory, and the host's state stores never qualify. No tool argument can
308
+ select an identity or working directory. Missing or unreadable ownership evidence refuses in-state access.
309
+
310
+ Inside all admitted in-state areas, `.env`, databases and their WAL/SHM/journal files, `instances/`,
311
+ `credential-profiles/`, `inbox/`, `web-files/`, `web-chat.json`, `chat-logs/`, backend credential/session/config files,
312
+ and hidden files or folders are refused. The only hidden-directory exception is the generated `.agend/`
313
+ output directory above; their contents still undergo the sensitive-name checks. Hard-linked state files are also
314
+ refused. Copy an intended asset into staging as a new regular file; do not link a private state file there.
315
+
316
+ Paths are checked after resolving symlinks. A symlink named after General or a workspace, or in its managed parent
317
+ path, cannot widen access; uploaded files themselves must not be symlinks. Containment still applies to relative and
318
+ absolute paths and to each uploaded file. The CLI name and current directory are controlled by its shell:
319
+ these local checks prevent accidental uploads, but do not isolate shells running as the same OS user.