aegisone 1.0.64 → 1.0.66

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 (374) hide show
  1. package/README.md +1 -1
  2. package/bin/aegis.js +1 -1
  3. package/package.json +1 -1
  4. package/scripts/bump.mjs +1 -1
  5. package/scripts/bundle.js +1 -1
  6. package/scripts/postinstall.mjs +1 -1
  7. package/scripts/predist.mjs +1 -1
  8. package/src/child.js +1 -1
  9. package/src/dispatch.js +1 -1
  10. package/src/doctor.js +1 -1
  11. package/src/probes.js +1 -1
  12. package/src/productupdate.js +1 -1
  13. package/src/protocol.js +1 -1
  14. package/src/release.js +1 -1
  15. package/src/selfhost.js +1 -1
  16. package/vendor/cli/bin/aegiscode.js +47 -5
  17. package/vendor/cli/package.json +1 -1
  18. package/vendor/cli/scripts/check.mjs +1 -1
  19. package/vendor/cli/scripts/demo.mjs +1 -1
  20. package/vendor/cli/scripts/postinstall.mjs +1 -1
  21. package/vendor/cli/scripts/predist.mjs +1 -1
  22. package/vendor/cli/scripts/runtests.mjs +1 -1
  23. package/vendor/cli/src/app.js +1 -1
  24. package/vendor/cli/src/art.js +1 -1
  25. package/vendor/cli/src/autonomous.js +574 -10
  26. package/vendor/cli/src/chatflow.js +1 -1
  27. package/vendor/cli/src/checkpoint.js +1 -1
  28. package/vendor/cli/src/clipboard.js +1 -1
  29. package/vendor/cli/src/cloudsync.js +1 -1
  30. package/vendor/cli/src/commands.js +2 -2
  31. package/vendor/cli/src/config.js +1 -1
  32. package/vendor/cli/src/connect.js +1 -1
  33. package/vendor/cli/src/devrun.js +1 -1
  34. package/vendor/cli/src/diff.js +1 -1
  35. package/vendor/cli/src/diffview.js +1 -1
  36. package/vendor/cli/src/dream-cmd.js +3 -0
  37. package/vendor/cli/src/dream.js +1 -1
  38. package/vendor/cli/src/engine.js +1 -1
  39. package/vendor/cli/src/events.js +1 -1
  40. package/vendor/cli/src/export.js +1 -1
  41. package/vendor/cli/src/fingerprint.js +1 -1
  42. package/vendor/cli/src/format.js +1 -1
  43. package/vendor/cli/src/fuzzy.js +1 -1
  44. package/vendor/cli/src/history.js +1 -1
  45. package/vendor/cli/src/init.js +1 -1
  46. package/vendor/cli/src/limits.js +1 -1
  47. package/vendor/cli/src/markdown.js +1 -1
  48. package/vendor/cli/src/models.js +1 -1
  49. package/vendor/cli/src/overlays.js +1 -1
  50. package/vendor/cli/src/panels.js +1 -1
  51. package/vendor/cli/src/ping.js +1 -1
  52. package/vendor/cli/src/presence.js +1 -1
  53. package/vendor/cli/src/provenance.lock.json +3 -3
  54. package/vendor/cli/src/render.js +1 -1
  55. package/vendor/cli/src/screen.js +1 -1
  56. package/vendor/cli/src/screens.js +1 -1
  57. package/vendor/cli/src/secret.js +1 -1
  58. package/vendor/cli/src/securefs.js +1 -1
  59. package/vendor/cli/src/settings.js +1 -1
  60. package/vendor/cli/src/signup.js +1 -1
  61. package/vendor/cli/src/summarize.js +1 -1
  62. package/vendor/cli/src/sysdiag.js +1 -1
  63. package/vendor/cli/src/theme.js +1 -1
  64. package/vendor/cli/src/title.js +1 -1
  65. package/vendor/cli/src/todos.js +1 -1
  66. package/vendor/cli/src/tokens.js +1 -1
  67. package/vendor/cli/src/topup.js +1 -1
  68. package/vendor/cli/src/update.js +1 -1
  69. package/vendor/cli/vendor/client/aegis.js +1 -1
  70. package/vendor/cli/vendor/client/attest.js +1 -1
  71. package/vendor/cli/vendor/client/authorship-key.js +1 -1
  72. package/vendor/cli/vendor/client/auto-provision.js +1 -1
  73. package/vendor/cli/vendor/client/brain-catalog.js +1 -1
  74. package/vendor/cli/vendor/client/byok-catalog.js +1 -1
  75. package/vendor/cli/vendor/client/catalog-client.js +1 -1
  76. package/vendor/cli/vendor/client/conversation-export.js +1 -1
  77. package/vendor/cli/vendor/client/credentials.js +1 -1
  78. package/vendor/cli/vendor/client/credits.js +1 -1
  79. package/vendor/cli/vendor/client/drive-connect.js +1 -1
  80. package/vendor/cli/vendor/client/env-file.js +1 -1
  81. package/vendor/cli/vendor/client/fingerprint.js +1 -1
  82. package/vendor/cli/vendor/client/foreign-memory.js +1 -1
  83. package/vendor/cli/vendor/client/foreign-sessions.js +1 -1
  84. package/vendor/cli/vendor/client/google-signin.js +1 -1
  85. package/vendor/cli/vendor/client/hooks.js +1 -1
  86. package/vendor/cli/vendor/client/model-discovery.js +1 -1
  87. package/vendor/cli/vendor/client/model-sync.js +1 -1
  88. package/vendor/cli/vendor/client/naming.js +1 -1
  89. package/vendor/cli/vendor/client/platform.js +1 -1
  90. package/vendor/cli/vendor/client/prefs.js +1 -1
  91. package/vendor/cli/vendor/client/presence.js +1 -1
  92. package/vendor/cli/vendor/client/record-vault.js +2 -2
  93. package/vendor/cli/vendor/client/session-search.js +1 -1
  94. package/vendor/cli/vendor/client/session-store.js +1 -1
  95. package/vendor/cli/vendor/client/skills.js +1 -1
  96. package/vendor/cli/vendor/client/topup.js +1 -1
  97. package/vendor/cli/vendor/client/touch.js +1 -1
  98. package/vendor/cli/vendor/client/update.js +1 -1
  99. package/vendor/cli/vendor/client/user-models.js +1 -1
  100. package/vendor/cli/vendor/desktop/lib/local/attachments.js +1 -1
  101. package/vendor/cli/vendor/desktop/lib/local/autonomous.js +1 -1
  102. package/vendor/cli/vendor/desktop/lib/local/claude-pro.js +1 -1
  103. package/vendor/cli/vendor/desktop/lib/local/context.js +1 -1
  104. package/vendor/cli/vendor/desktop/lib/local/engine.js +1 -1
  105. package/vendor/cli/vendor/desktop/lib/local/entitlement.js +1 -1
  106. package/vendor/cli/vendor/desktop/lib/local/integrity.js +1 -1
  107. package/vendor/cli/vendor/desktop/lib/local/local.js +1 -1
  108. package/vendor/cli/vendor/desktop/lib/local/perm-rules.js +5 -0
  109. package/vendor/cli/vendor/desktop/lib/local/perm-store.js +5 -0
  110. package/vendor/cli/vendor/desktop/lib/local/perm-write.js +5 -0
  111. package/vendor/cli/vendor/desktop/lib/local/pro-sessions.js +3 -1
  112. package/vendor/cli/vendor/desktop/lib/local/prompt.js +1 -1
  113. package/vendor/cli/vendor/desktop/lib/local/queue.js +1 -1
  114. package/vendor/cli/vendor/desktop/lib/local/repeat-guard.js +1 -1
  115. package/vendor/cli/vendor/desktop/lib/local/session-rounds.js +1 -1
  116. package/vendor/cli/vendor/desktop/lib/local/spill.js +1 -1
  117. package/vendor/cli/vendor/desktop/lib/local/turn-guard.js +1 -1
  118. package/vendor/cli/vendor/desktop/lib/local/verify-stop.js +1 -1
  119. package/vendor/cli/vendor/desktop/lib/local/worktree-lock.js +1 -1
  120. package/vendor/cli/vendor/desktop/lib/settings.js +1 -1
  121. package/vendor/cli/vendor/desktop/main.js +82 -1
  122. package/vendor/cli/vendor/desktop/renderer/usage.js +1 -1
  123. package/vendor/cli/vendor/hosts/install.js +1 -1
  124. package/vendor/cli/vendor/hosts/openai-shim.js +1 -1
  125. package/vendor/cli/vendor/hosts/spec.js +1 -1
  126. package/vendor/cli/vendor/hosts/targets.js +1 -1
  127. package/vendor/cli/vendor/mcp/admission.js +1 -1
  128. package/vendor/cli/vendor/mcp/server.js +1 -1
  129. package/vendor/cli/vendor/mcp/tools.js +1 -1
  130. package/vendor/cli/vendor/one/src/child.js +1 -1
  131. package/vendor/cli/vendor/one/src/protocol.js +1 -1
  132. package/vendor/cli/vendor/one/src/selfhost.js +1 -1
  133. package/vendor/desktop/bin/aegis.js +1 -1
  134. package/vendor/desktop/lib/auto.js +1 -1
  135. package/vendor/desktop/lib/avatar/companion.js +1 -1
  136. package/vendor/desktop/lib/avatar/cosmetics.js +1 -1
  137. package/vendor/desktop/lib/avatar/holder-turn.js +1 -1
  138. package/vendor/desktop/lib/avatar/holders.js +1 -1
  139. package/vendor/desktop/lib/avatar/identity.js +1 -1
  140. package/vendor/desktop/lib/avatar/level.js +1 -1
  141. package/vendor/desktop/lib/avatar/mirror.js +1 -1
  142. package/vendor/desktop/lib/avatar/persona.js +1 -1
  143. package/vendor/desktop/lib/avatar/profile.js +1 -1
  144. package/vendor/desktop/lib/avatar/register.js +1 -1
  145. package/vendor/desktop/lib/avatar/store.js +1 -1
  146. package/vendor/desktop/lib/avatar/transfer.js +1 -1
  147. package/vendor/desktop/lib/avatar/turn.js +1 -1
  148. package/vendor/desktop/lib/avatar/voice.js +1 -1
  149. package/vendor/desktop/lib/avatar/xp.js +1 -1
  150. package/vendor/desktop/lib/deep-link.js +1 -1
  151. package/vendor/desktop/lib/local/attachments.js +1 -1
  152. package/vendor/desktop/lib/local/autonomous.js +1 -1
  153. package/vendor/desktop/lib/local/claude-pro.js +1 -1
  154. package/vendor/desktop/lib/local/cli-face.js +1 -1
  155. package/vendor/desktop/lib/local/context.js +1 -1
  156. package/vendor/desktop/lib/local/engine.js +1 -1
  157. package/vendor/desktop/lib/local/entitlement.js +1 -1
  158. package/vendor/desktop/lib/local/integrity.js +1 -1
  159. package/vendor/desktop/lib/local/local.js +1 -1
  160. package/vendor/desktop/lib/local/perm-rules.js +5 -0
  161. package/vendor/desktop/lib/local/perm-store.js +5 -0
  162. package/vendor/desktop/lib/local/perm-write.js +5 -0
  163. package/vendor/desktop/lib/local/pro-sessions.js +3 -1
  164. package/vendor/desktop/lib/local/prompt.js +1 -1
  165. package/vendor/desktop/lib/local/pty-host.js +1 -1
  166. package/vendor/desktop/lib/local/queue.js +1 -1
  167. package/vendor/desktop/lib/local/repeat-guard.js +1 -1
  168. package/vendor/desktop/lib/local/session-rounds.js +1 -1
  169. package/vendor/desktop/lib/local/spill.js +1 -1
  170. package/vendor/desktop/lib/local/telemetry.js +1 -1
  171. package/vendor/desktop/lib/local/turn-guard.js +1 -1
  172. package/vendor/desktop/lib/local/verify-stop.js +1 -1
  173. package/vendor/desktop/lib/local/worktree-lock.js +1 -1
  174. package/vendor/desktop/lib/provider-key-mirror.js +1 -1
  175. package/vendor/desktop/lib/quick-launcher.js +1 -1
  176. package/vendor/desktop/lib/settings.js +1 -1
  177. package/vendor/desktop/lib/skills-host.js +1 -1
  178. package/vendor/desktop/lib/speech-host.js +1 -1
  179. package/vendor/desktop/lib/sync/memory-store.js +1 -1
  180. package/vendor/desktop/lib/sync/persist-gate.js +1 -1
  181. package/vendor/desktop/lib/window-state.js +1 -1
  182. package/vendor/desktop/main.js +82 -1
  183. package/vendor/desktop/package.json +1 -1
  184. package/vendor/desktop/preload.js +3 -1
  185. package/vendor/desktop/renderer/app.js +3 -3
  186. package/vendor/desktop/renderer/avatar/assemble.js +1 -1
  187. package/vendor/desktop/renderer/avatar/avatar.js +1 -1
  188. package/vendor/desktop/renderer/avatar/cards.js +1 -1
  189. package/vendor/desktop/renderer/avatar/hud.js +1 -1
  190. package/vendor/desktop/renderer/avatar/pane.js +1 -1
  191. package/vendor/desktop/renderer/avatar/parts.js +1 -1
  192. package/vendor/desktop/renderer/commands.js +1 -1
  193. package/vendor/desktop/renderer/companion.js +1 -1
  194. package/vendor/desktop/renderer/composer-triggers.js +1 -1
  195. package/vendor/desktop/renderer/dictation.js +1 -1
  196. package/vendor/desktop/renderer/diff.js +1 -1
  197. package/vendor/desktop/renderer/diffview.js +1 -1
  198. package/vendor/desktop/renderer/fingerprint.js +2 -2
  199. package/vendor/desktop/renderer/index.html +10 -4
  200. package/vendor/desktop/renderer/library.js +1 -1
  201. package/vendor/desktop/renderer/markdown.js +1 -1
  202. package/vendor/desktop/renderer/palette-filter.js +1 -1
  203. package/vendor/desktop/renderer/provider-toolbar.js +1 -1
  204. package/vendor/desktop/renderer/providers.js +1 -1
  205. package/vendor/desktop/renderer/pty-frame.css +35 -0
  206. package/vendor/desktop/renderer/pty-frame.html +47 -0
  207. package/vendor/desktop/renderer/pty-panel.js +1 -1
  208. package/vendor/desktop/renderer/pty-window.html +72 -0
  209. package/vendor/desktop/renderer/pty-window.js +3 -0
  210. package/vendor/desktop/renderer/quick.js +1 -1
  211. package/vendor/desktop/renderer/settings-skills.js +1 -1
  212. package/vendor/desktop/renderer/shortcuts.js +1 -1
  213. package/vendor/desktop/renderer/stream-policy.js +1 -1
  214. package/vendor/desktop/renderer/style.css +77 -3
  215. package/vendor/desktop/renderer/transcript-view.js +1 -1
  216. package/vendor/desktop/renderer/usage.js +1 -1
  217. package/vendor/desktop/renderer/welcome-rows.js +1 -1
  218. package/vendor/desktop/vendor/aegis.js +1 -1
  219. package/vendor/desktop/vendor/attest.js +1 -1
  220. package/vendor/desktop/vendor/authorship-key.js +1 -1
  221. package/vendor/desktop/vendor/auto-provision.js +1 -1
  222. package/vendor/desktop/vendor/brain-catalog.js +1 -1
  223. package/vendor/desktop/vendor/byok-catalog.js +1 -1
  224. package/vendor/desktop/vendor/catalog-client.js +1 -1
  225. package/vendor/desktop/vendor/conversation-export.js +1 -1
  226. package/vendor/desktop/vendor/credentials.js +1 -1
  227. package/vendor/desktop/vendor/credits.js +1 -1
  228. package/vendor/desktop/vendor/drive-connect.js +1 -1
  229. package/vendor/desktop/vendor/env-file.js +1 -1
  230. package/vendor/desktop/vendor/faces/cli/bin/aegiscode.js +2 -2
  231. package/vendor/desktop/vendor/faces/cli/package.json +1 -1
  232. package/vendor/desktop/vendor/faces/cli/scripts/check.mjs +1 -1
  233. package/vendor/desktop/vendor/faces/cli/scripts/demo.mjs +1 -1
  234. package/vendor/desktop/vendor/faces/cli/scripts/postinstall.mjs +1 -1
  235. package/vendor/desktop/vendor/faces/cli/scripts/predist.mjs +1 -1
  236. package/vendor/desktop/vendor/faces/cli/scripts/runtests.mjs +1 -1
  237. package/vendor/desktop/vendor/faces/cli/src/app.js +1 -1
  238. package/vendor/desktop/vendor/faces/cli/src/art.js +1 -1
  239. package/vendor/desktop/vendor/faces/cli/src/autonomous.js +1 -1
  240. package/vendor/desktop/vendor/faces/cli/src/caps.js +1 -1
  241. package/vendor/desktop/vendor/faces/cli/src/chatflow.js +1 -1
  242. package/vendor/desktop/vendor/faces/cli/src/checkpoint.js +1 -1
  243. package/vendor/desktop/vendor/faces/cli/src/clipboard.js +1 -1
  244. package/vendor/desktop/vendor/faces/cli/src/cloudsync.js +1 -1
  245. package/vendor/desktop/vendor/faces/cli/src/commands.js +2 -2
  246. package/vendor/desktop/vendor/faces/cli/src/config.js +1 -1
  247. package/vendor/desktop/vendor/faces/cli/src/connect.js +1 -1
  248. package/vendor/desktop/vendor/faces/cli/src/devrun.js +1 -1
  249. package/vendor/desktop/vendor/faces/cli/src/diff.js +1 -1
  250. package/vendor/desktop/vendor/faces/cli/src/diffview.js +1 -1
  251. package/vendor/desktop/vendor/faces/cli/src/dream-cmd.js +3 -0
  252. package/vendor/desktop/vendor/faces/cli/src/dream.js +1 -1
  253. package/vendor/desktop/vendor/faces/cli/src/engine.js +1 -1
  254. package/vendor/desktop/vendor/faces/cli/src/events.js +1 -1
  255. package/vendor/desktop/vendor/faces/cli/src/export.js +1 -1
  256. package/vendor/desktop/vendor/faces/cli/src/fingerprint.js +1 -1
  257. package/vendor/desktop/vendor/faces/cli/src/format.js +1 -1
  258. package/vendor/desktop/vendor/faces/cli/src/fuzzy.js +1 -1
  259. package/vendor/desktop/vendor/faces/cli/src/history.js +1 -1
  260. package/vendor/desktop/vendor/faces/cli/src/init.js +1 -1
  261. package/vendor/desktop/vendor/faces/cli/src/limits.js +1 -1
  262. package/vendor/desktop/vendor/faces/cli/src/markdown.js +1 -1
  263. package/vendor/desktop/vendor/faces/cli/src/mcp.js +1 -1
  264. package/vendor/desktop/vendor/faces/cli/src/models.js +1 -1
  265. package/vendor/desktop/vendor/faces/cli/src/overlays.js +1 -1
  266. package/vendor/desktop/vendor/faces/cli/src/panels.js +1 -1
  267. package/vendor/desktop/vendor/faces/cli/src/permissions.js +1 -1
  268. package/vendor/desktop/vendor/faces/cli/src/ping.js +1 -1
  269. package/vendor/desktop/vendor/faces/cli/src/presence.js +1 -1
  270. package/vendor/desktop/vendor/faces/cli/src/provenance.js +1 -1
  271. package/vendor/desktop/vendor/faces/cli/src/provenance.lock.json +3 -3
  272. package/vendor/desktop/vendor/faces/cli/src/render.js +1 -1
  273. package/vendor/desktop/vendor/faces/cli/src/screen.js +1 -1
  274. package/vendor/desktop/vendor/faces/cli/src/screens.js +1 -1
  275. package/vendor/desktop/vendor/faces/cli/src/secret.js +1 -1
  276. package/vendor/desktop/vendor/faces/cli/src/securefs.js +1 -1
  277. package/vendor/desktop/vendor/faces/cli/src/settings.js +1 -1
  278. package/vendor/desktop/vendor/faces/cli/src/signup.js +1 -1
  279. package/vendor/desktop/vendor/faces/cli/src/summarize.js +1 -1
  280. package/vendor/desktop/vendor/faces/cli/src/sysdiag.js +1 -1
  281. package/vendor/desktop/vendor/faces/cli/src/theme.js +1 -1
  282. package/vendor/desktop/vendor/faces/cli/src/title.js +1 -1
  283. package/vendor/desktop/vendor/faces/cli/src/todos.js +1 -1
  284. package/vendor/desktop/vendor/faces/cli/src/tokens.js +1 -1
  285. package/vendor/desktop/vendor/faces/cli/src/topup.js +1 -1
  286. package/vendor/desktop/vendor/faces/cli/src/update.js +1 -1
  287. package/vendor/desktop/vendor/faces/cli/vendor/client/aegis.js +1 -1
  288. package/vendor/desktop/vendor/faces/cli/vendor/client/attest.js +1 -1
  289. package/vendor/desktop/vendor/faces/cli/vendor/client/authorship-key.js +1 -1
  290. package/vendor/desktop/vendor/faces/cli/vendor/client/auto-provision.js +1 -1
  291. package/vendor/desktop/vendor/faces/cli/vendor/client/brain-catalog.js +1 -1
  292. package/vendor/desktop/vendor/faces/cli/vendor/client/byok-catalog.js +1 -1
  293. package/vendor/desktop/vendor/faces/cli/vendor/client/catalog-client.js +1 -1
  294. package/vendor/desktop/vendor/faces/cli/vendor/client/conversation-export.js +1 -1
  295. package/vendor/desktop/vendor/faces/cli/vendor/client/credentials.js +1 -1
  296. package/vendor/desktop/vendor/faces/cli/vendor/client/credits.js +1 -1
  297. package/vendor/desktop/vendor/faces/cli/vendor/client/drive-connect.js +1 -1
  298. package/vendor/desktop/vendor/faces/cli/vendor/client/env-file.js +1 -1
  299. package/vendor/desktop/vendor/faces/cli/vendor/client/fingerprint.js +1 -1
  300. package/vendor/desktop/vendor/faces/cli/vendor/client/foreign-memory.js +1 -1
  301. package/vendor/desktop/vendor/faces/cli/vendor/client/foreign-sessions.js +1 -1
  302. package/vendor/desktop/vendor/faces/cli/vendor/client/google-signin.js +1 -1
  303. package/vendor/desktop/vendor/faces/cli/vendor/client/hooks.js +1 -1
  304. package/vendor/desktop/vendor/faces/cli/vendor/client/model-discovery.js +1 -1
  305. package/vendor/desktop/vendor/faces/cli/vendor/client/model-sync.js +1 -1
  306. package/vendor/desktop/vendor/faces/cli/vendor/client/naming.js +1 -1
  307. package/vendor/desktop/vendor/faces/cli/vendor/client/platform.js +1 -1
  308. package/vendor/desktop/vendor/faces/cli/vendor/client/prefs.js +1 -1
  309. package/vendor/desktop/vendor/faces/cli/vendor/client/presence.js +1 -1
  310. package/vendor/desktop/vendor/faces/cli/vendor/client/record-vault.js +2 -2
  311. package/vendor/desktop/vendor/faces/cli/vendor/client/session-search.js +1 -1
  312. package/vendor/desktop/vendor/faces/cli/vendor/client/session-store.js +1 -1
  313. package/vendor/desktop/vendor/faces/cli/vendor/client/skills.js +1 -1
  314. package/vendor/desktop/vendor/faces/cli/vendor/client/topup.js +1 -1
  315. package/vendor/desktop/vendor/faces/cli/vendor/client/touch.js +1 -1
  316. package/vendor/desktop/vendor/faces/cli/vendor/client/update.js +1 -1
  317. package/vendor/desktop/vendor/faces/cli/vendor/client/user-models.js +1 -1
  318. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/attachments.js +1 -1
  319. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/autonomous.js +1 -1
  320. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/claude-pro.js +1 -1
  321. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/context.js +1 -1
  322. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/engine.js +1 -1
  323. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/entitlement.js +1 -1
  324. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/exec-plan.js +1 -1
  325. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/integrity.js +1 -1
  326. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/local.js +1 -1
  327. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/perm-rules.js +2 -0
  328. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/perm-store.js +3 -1
  329. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/perm-write.js +2 -0
  330. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/pro-sessions.js +3 -1
  331. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/prompt.js +1 -1
  332. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/queue.js +1 -1
  333. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/repeat-guard.js +1 -1
  334. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/session-rounds.js +1 -1
  335. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/shell.js +1 -1
  336. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/spill.js +1 -1
  337. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/tools.js +1 -1
  338. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/turn-guard.js +1 -1
  339. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/verify-stop.js +1 -1
  340. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/worktree-lock.js +1 -1
  341. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/settings.js +1 -1
  342. package/vendor/desktop/vendor/faces/cli/vendor/desktop/main.js +3 -3
  343. package/vendor/desktop/vendor/faces/cli/vendor/desktop/renderer/usage.js +1 -1
  344. package/vendor/desktop/vendor/faces/cli/vendor/hosts/install.js +1 -1
  345. package/vendor/desktop/vendor/faces/cli/vendor/hosts/openai-shim.js +1 -1
  346. package/vendor/desktop/vendor/faces/cli/vendor/hosts/spec.js +1 -1
  347. package/vendor/desktop/vendor/faces/cli/vendor/hosts/targets.js +1 -1
  348. package/vendor/desktop/vendor/faces/cli/vendor/mcp/admission.js +1 -1
  349. package/vendor/desktop/vendor/faces/cli/vendor/mcp/server.js +1 -1
  350. package/vendor/desktop/vendor/faces/cli/vendor/mcp/tools.js +1 -1
  351. package/vendor/desktop/vendor/faces/cli/vendor/one/src/child.js +1 -1
  352. package/vendor/desktop/vendor/faces/cli/vendor/one/src/protocol.js +1 -1
  353. package/vendor/desktop/vendor/faces/cli/vendor/one/src/selfhost.js +1 -1
  354. package/vendor/desktop/vendor/fingerprint.js +1 -1
  355. package/vendor/desktop/vendor/foreign-memory.js +1 -1
  356. package/vendor/desktop/vendor/foreign-sessions.js +1 -1
  357. package/vendor/desktop/vendor/google-signin.js +1 -1
  358. package/vendor/desktop/vendor/hooks.js +1 -1
  359. package/vendor/desktop/vendor/model-discovery.js +1 -1
  360. package/vendor/desktop/vendor/model-sync.js +1 -1
  361. package/vendor/desktop/vendor/naming.js +1 -1
  362. package/vendor/desktop/vendor/platform.js +1 -1
  363. package/vendor/desktop/vendor/prefs.js +1 -1
  364. package/vendor/desktop/vendor/presence.js +1 -1
  365. package/vendor/desktop/vendor/protocol.js +1 -1
  366. package/vendor/desktop/vendor/record-vault.js +2 -2
  367. package/vendor/desktop/vendor/selfhost.js +1 -1
  368. package/vendor/desktop/vendor/session-search.js +1 -1
  369. package/vendor/desktop/vendor/session-store.js +1 -1
  370. package/vendor/desktop/vendor/skills.js +1 -1
  371. package/vendor/desktop/vendor/topup.js +1 -1
  372. package/vendor/desktop/vendor/touch.js +1 -1
  373. package/vendor/desktop/vendor/update.js +1 -1
  374. package/vendor/desktop/vendor/user-models.js +1 -1
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";const pkg="undefined"!=typeof window&&window.AegisAvatarParts?window.AegisAvatarParts:"undefined"!=typeof module&&module.exports?require("./parts.js"):null;if(!pkg)throw new Error("avatar/assemble.js: avatar/parts.js must be loaded first");const HEX=/^#[0-9a-f]{6}$/i;function shade(e,t){const r=HEX.exec(String(e||""));if(!r)return e;const s=parseInt(r[0].slice(1),16),o=t<0?0:255,a=Math.min(1,Math.abs(t)),n=e=>Math.round(e*(1-a)+o*a);return`#${(n(s>>16&255)<<16|n(s>>8&255)<<8|n(255&s)).toString(16).padStart(6,"0")}`}function shapesOf(e){return Array.isArray(e)?e.filter((e=>e&&"object"==typeof e)):[]}function asStrokes(e){return"string"==typeof e&&e.trim()?[{kind:"path",d:e,stroke:!0}]:Array.isArray(e)?e.map((e=>"string"==typeof e?{kind:"path",d:e,stroke:!0}:e)).filter((e=>e&&"object"==typeof e)):[]}function call(e,...t){return"function"==typeof e?e(...t):void 0}function customExpression(e,t,r){const s=e&&e.expressions&&e.expressions.custom,o=s&&"object"==typeof s?s[t]:null;if(!o||"object"!=typeof o)return null;const a={label:t,custom:!0};return"string"==typeof o.mouth&&o.mouth.trim()&&(a.mouth=o.mouth.trim()),void 0!==o.brows&&(a.brows=asStrokes(o.brows).map((e=>e.d))),void 0!==o.eyes&&("string"==typeof o.eyes&&pkg.EYE_OVERRIDES[o.eyes]?a.eyes=o.eyes:r.push(`custom expression ${t}: unknown eye override ${JSON.stringify(o.eyes)} — ignored`)),void 0===a.mouth&&void 0===a.brows&&void 0===a.eyes?(r.push(`custom expression ${t} carries no drawable geometry — ignored`),null):a}function assemble(e,t={}){const r=[],s=[],o=e&&"object"==typeof e?e:pkg.defaultPersona(),a=o.presentation&&"object"==typeof o.presentation?o.presentation:{},n=o.appearance&&"object"==typeof o.appearance?o.appearance:{},i=pkg.PALETTES[a.palette]?a.palette:"amber";void 0!==a.palette&&i!==a.palette&&r.push(`unknown palette ${JSON.stringify(a.palette)} — using ${i}`);const l=pkg.PALETTES[i],c=Number.isInteger(a.skin)&&a.skin>=0&&a.skin<pkg.SKIN_TONES.length?a.skin:2,p=pkg.SKIN_TONES[c],u=HEX.test(String(a.hairColor||""))?String(a.hairColor):"#3b2a20";function h(e){switch(e){case"skin":return p;case"skinShade":return shade(p,-.18);case"hair":return u;case"hairShade":return shade(u,-.25);case"cloth":return l.cloth;case"clothShade":return l.clothShade;case"accent":return l.accent;case"metal":return l.metal;case"bg":return l.bg;case"ink":default:return l.ink;case"sclera":return"#fdfbf7";case"highlight":return"#ffffff"}}function d(e,t,o,a){return e[o]||(null!=o&&""!==o&&(s.push(`${t}:${o}`),r.push(`unknown ${t} ${JSON.stringify(o)} — using ${a}`)),e[a])}const f=pkg.FRAMES[a.frame]?a.frame:"A",g=pkg.FRAMES[f],y=d(pkg.HAIR,"hair",a.hair,"bob-2"),k=d(pkg.EYES,"eyes",a.eyes,"soft"),m=[];for(const e of Array.isArray(a.outfit)?a.outfit:[])pkg.OUTFITS[e]?m.push(e):s.push(`outfit:${e}`);!m.length&&Array.isArray(a.outfit)&&a.outfit.length&&r.push("no known outfit layer — wearing the plain tee");const b=m.slice(0,3).map((e=>pkg.OUTFITS[e])),$="string"==typeof t.expression&&t.expression?t.expression:"neutral";let S=pkg.EXPRESSIONS[$],x=$;if(!S){const e=customExpression(o,$,r);e?S=e:("neutral"!==$&&(s.push(`expression:${$}`),r.push(`unknown expression ${JSON.stringify($)} — using neutral`)),S=pkg.EXPRESSIONS.neutral,x="neutral")}const w=S.eyes&&pkg.EYE_OVERRIDES[S.eyes]?pkg.EYE_OVERRIDES[S.eyes]:null,E=(Array.isArray(S.brows),asStrokes(S.brows)),v=asStrokes(S.mouth),A={shadow:[{kind:"ellipse",cx:100,cy:254,rx:62,ry:10,role:"clothShade",opacity:.5}],hairBack:shapesOf(y.back),body:[{kind:"path",d:pkg.BODY.neck,role:"skinShade"},{kind:"path",d:pkg.BODY.shirt,role:"cloth"},{kind:"path",d:pkg.BODY.sleeveL,role:"cloth"},{kind:"path",d:pkg.BODY.sleeveR,role:"cloth"}],outfitUnder:[],head:[{kind:"path",d:g.head,role:"skin"},...g.ear.map((e=>({kind:"circle",cx:e.cx,cy:e.cy,r:e.r,role:"skin"})))],face:[...w?w.map((e=>({...e,stroke:!0}))):[...k.left,...k.right],...E,...shapesOf(pkg.FACE.nose),...v],hairFront:[...shapesOf(y.front),...shapesOf(y.detail)],outfitOver:[],accessory:[],effect:[]},O=A.outfitUnder;for(const e of b){O.push(...shapesOf(e.under).map((e=>({...e,defaultRole:"cloth"}))));const t=shapesOf(e.over).map((e=>({...e,defaultRole:"cloth"})));e.accessory?A.accessory.push(...t):A.outfitOver.push(...t)}"happy"!==x&&"playful"!==x&&"delighted"!==x||A.effect.push({kind:"path",d:"M28 66 l4 10 l10 4 l-10 4 l-4 10 l-4 -10 l-10 -4 l10 -4 Z",role:"accent",opacity:.9},{kind:"path",d:"M172 88 l3 8 l8 3 l-8 3 l-3 8 l-3 -8 l-8 -3 l8 -3 Z",role:"accent",opacity:.7});const j={shadow:"clothShade",hairBack:"hair",body:"cloth",outfitUnder:"cloth",head:"skin",face:"ink",hairFront:"hair",outfitOver:"cloth",accessory:"metal",effect:"accent"};function R(e,t){const r=h(e.role||e.defaultRole||j[t]||"ink"),s=[];switch(e.stroke?s.push('fill="none"',`stroke="${r}"`,'stroke-width="3.5"','stroke-linecap="round"','stroke-linejoin="round"'):s.push(`fill="${r}"`),"number"==typeof e.opacity&&s.push(`opacity="${e.opacity}"`),e.kind){case"circle":return`<circle cx="${e.cx}" cy="${e.cy}" r="${e.r}" ${s.join(" ")}/>`;case"ellipse":return`<ellipse cx="${e.cx}" cy="${e.cy}" rx="${e.rx}" ry="${e.ry}" ${s.join(" ")}/>`;case"rect":{const t=void 0===e.rx?0:e.rx;return`<rect x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" rx="${t}" ${s.join(" ")}/>`}default:return`<path d="${e.d}" ${s.join(" ")}/>`}}const I=t.motion?String(t.motion):pkg.motionFor(o,Boolean(t.reducedMotion)),T=["small","medium","large"].includes(n.size)?n.size:"medium",N=[],P=[];for(const e of pkg.LAYERS){const t=A[e]||[];if(N.push({name:e,shapes:t.length}),!t.length)continue;const r=t.map((t=>R(t,e))).join("");P.push(`<g class="avatar-layer avatar-${e}" data-layer="${e}">${r}</g>`)}return{svg:`<svg class="avatar-svg" viewBox="0 0 200 268" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" role="presentation" data-motion="${I}" data-size="${T}" data-frame="${f}" data-palette="${i}" data-expression="${x}"><rect class="avatar-bg" x="0" y="0" width="200" height="268" rx="24" fill="${h("bg")}"/>`+P.join("")+"</svg>",layers:N,warnings:r,missing:s,expression:x,expressionLabel:S.label||x,palette:i,frame:f,hair:y===pkg.HAIR[a.hair]?a.hair:"bob-2",motion:I,size:T}}const API=Object.freeze({assemble:assemble,shade:shade});"undefined"!=typeof module&&module.exports?module.exports=API:"undefined"!=typeof globalThis&&(globalThis.AegisAvatarAssemble=API);
3
+ "use strict";const pkg="undefined"!=typeof window&&window.AegisAvatarParts?window.AegisAvatarParts:"undefined"!=typeof module&&module.exports?require("./parts.js"):null;if(!pkg)throw new Error("avatar/assemble.js: avatar/parts.js must be loaded first");const HEX=/^#[0-9a-f]{6}$/i;function shade(e,t){const r=HEX.exec(String(e||""));if(!r)return e;const s=parseInt(r[0].slice(1),16),o=t<0?0:255,a=Math.min(1,Math.abs(t)),n=e=>Math.round(e*(1-a)+o*a);return`#${(n(s>>16&255)<<16|n(s>>8&255)<<8|n(255&s)).toString(16).padStart(6,"0")}`}function shapesOf(e){return Array.isArray(e)?e.filter(e=>e&&"object"==typeof e):[]}function asStrokes(e){return"string"==typeof e&&e.trim()?[{kind:"path",d:e,stroke:!0}]:Array.isArray(e)?e.map(e=>"string"==typeof e?{kind:"path",d:e,stroke:!0}:e).filter(e=>e&&"object"==typeof e):[]}function call(e,...t){return"function"==typeof e?e(...t):void 0}function customExpression(e,t,r){const s=e&&e.expressions&&e.expressions.custom,o=s&&"object"==typeof s?s[t]:null;if(!o||"object"!=typeof o)return null;const a={label:t,custom:!0};return"string"==typeof o.mouth&&o.mouth.trim()&&(a.mouth=o.mouth.trim()),void 0!==o.brows&&(a.brows=asStrokes(o.brows).map(e=>e.d)),void 0!==o.eyes&&("string"==typeof o.eyes&&pkg.EYE_OVERRIDES[o.eyes]?a.eyes=o.eyes:r.push(`custom expression ${t}: unknown eye override ${JSON.stringify(o.eyes)} — ignored`)),void 0===a.mouth&&void 0===a.brows&&void 0===a.eyes?(r.push(`custom expression ${t} carries no drawable geometry — ignored`),null):a}function assemble(e,t={}){const r=[],s=[],o=e&&"object"==typeof e?e:pkg.defaultPersona(),a=o.presentation&&"object"==typeof o.presentation?o.presentation:{},n=o.appearance&&"object"==typeof o.appearance?o.appearance:{},i=pkg.PALETTES[a.palette]?a.palette:"amber";void 0!==a.palette&&i!==a.palette&&r.push(`unknown palette ${JSON.stringify(a.palette)} — using ${i}`);const l=pkg.PALETTES[i],c=Number.isInteger(a.skin)&&a.skin>=0&&a.skin<pkg.SKIN_TONES.length?a.skin:2,p=pkg.SKIN_TONES[c],u=HEX.test(String(a.hairColor||""))?String(a.hairColor):"#3b2a20";function h(e){switch(e){case"skin":return p;case"skinShade":return shade(p,-.18);case"hair":return u;case"hairShade":return shade(u,-.25);case"cloth":return l.cloth;case"clothShade":return l.clothShade;case"accent":return l.accent;case"metal":return l.metal;case"bg":return l.bg;case"ink":default:return l.ink;case"sclera":return"#fdfbf7";case"highlight":return"#ffffff"}}function d(e,t,o,a){return e[o]||(null!=o&&""!==o&&(s.push(`${t}:${o}`),r.push(`unknown ${t} ${JSON.stringify(o)} — using ${a}`)),e[a])}const f=pkg.FRAMES[a.frame]?a.frame:"A",g=pkg.FRAMES[f],y=d(pkg.HAIR,"hair",a.hair,"bob-2"),k=d(pkg.EYES,"eyes",a.eyes,"soft"),m=[];for(const e of Array.isArray(a.outfit)?a.outfit:[])pkg.OUTFITS[e]?m.push(e):s.push(`outfit:${e}`);!m.length&&Array.isArray(a.outfit)&&a.outfit.length&&r.push("no known outfit layer — wearing the plain tee");const b=m.slice(0,3).map(e=>pkg.OUTFITS[e]),$="string"==typeof t.expression&&t.expression?t.expression:"neutral";let S=pkg.EXPRESSIONS[$],x=$;if(!S){const e=customExpression(o,$,r);e?S=e:("neutral"!==$&&(s.push(`expression:${$}`),r.push(`unknown expression ${JSON.stringify($)} — using neutral`)),S=pkg.EXPRESSIONS.neutral,x="neutral")}const w=S.eyes&&pkg.EYE_OVERRIDES[S.eyes]?pkg.EYE_OVERRIDES[S.eyes]:null,E=(Array.isArray(S.brows),asStrokes(S.brows)),v=asStrokes(S.mouth),A={shadow:[{kind:"ellipse",cx:100,cy:254,rx:62,ry:10,role:"clothShade",opacity:.5}],hairBack:shapesOf(y.back),body:[{kind:"path",d:pkg.BODY.neck,role:"skinShade"},{kind:"path",d:pkg.BODY.shirt,role:"cloth"},{kind:"path",d:pkg.BODY.sleeveL,role:"cloth"},{kind:"path",d:pkg.BODY.sleeveR,role:"cloth"}],outfitUnder:[],head:[{kind:"path",d:g.head,role:"skin"},...g.ear.map(e=>({kind:"circle",cx:e.cx,cy:e.cy,r:e.r,role:"skin"}))],face:[...w?w.map(e=>({...e,stroke:!0})):[...k.left,...k.right],...E,...shapesOf(pkg.FACE.nose),...v],hairFront:[...shapesOf(y.front),...shapesOf(y.detail)],outfitOver:[],accessory:[],effect:[]},O=A.outfitUnder;for(const e of b){O.push(...shapesOf(e.under).map(e=>({...e,defaultRole:"cloth"})));const t=shapesOf(e.over).map(e=>({...e,defaultRole:"cloth"}));e.accessory?A.accessory.push(...t):A.outfitOver.push(...t)}"happy"!==x&&"playful"!==x&&"delighted"!==x||A.effect.push({kind:"path",d:"M28 66 l4 10 l10 4 l-10 4 l-4 10 l-4 -10 l-10 -4 l10 -4 Z",role:"accent",opacity:.9},{kind:"path",d:"M172 88 l3 8 l8 3 l-8 3 l-3 8 l-3 -8 l-8 -3 l8 -3 Z",role:"accent",opacity:.7});const j={shadow:"clothShade",hairBack:"hair",body:"cloth",outfitUnder:"cloth",head:"skin",face:"ink",hairFront:"hair",outfitOver:"cloth",accessory:"metal",effect:"accent"};function R(e,t){const r=h(e.role||e.defaultRole||j[t]||"ink"),s=[];switch(e.stroke?s.push('fill="none"',`stroke="${r}"`,'stroke-width="3.5"','stroke-linecap="round"','stroke-linejoin="round"'):s.push(`fill="${r}"`),"number"==typeof e.opacity&&s.push(`opacity="${e.opacity}"`),e.kind){case"circle":return`<circle cx="${e.cx}" cy="${e.cy}" r="${e.r}" ${s.join(" ")}/>`;case"ellipse":return`<ellipse cx="${e.cx}" cy="${e.cy}" rx="${e.rx}" ry="${e.ry}" ${s.join(" ")}/>`;case"rect":{const t=void 0===e.rx?0:e.rx;return`<rect x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" rx="${t}" ${s.join(" ")}/>`}default:return`<path d="${e.d}" ${s.join(" ")}/>`}}const I=t.motion?String(t.motion):pkg.motionFor(o,Boolean(t.reducedMotion)),T=["small","medium","large"].includes(n.size)?n.size:"medium",N=[],P=[];for(const e of pkg.LAYERS){const t=A[e]||[];if(N.push({name:e,shapes:t.length}),!t.length)continue;const r=t.map(t=>R(t,e)).join("");P.push(`<g class="avatar-layer avatar-${e}" data-layer="${e}">${r}</g>`)}return{svg:`<svg class="avatar-svg" viewBox="0 0 200 268" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" role="presentation" data-motion="${I}" data-size="${T}" data-frame="${f}" data-palette="${i}" data-expression="${x}"><rect class="avatar-bg" x="0" y="0" width="200" height="268" rx="24" fill="${h("bg")}"/>`+P.join("")+"</svg>",layers:N,warnings:r,missing:s,expression:x,expressionLabel:S.label||x,palette:i,frame:f,hair:y===pkg.HAIR[a.hair]?a.hair:"bob-2",motion:I,size:T}}const API=Object.freeze({assemble:assemble,shade:shade});"undefined"!=typeof module&&module.exports?module.exports=API:"undefined"!=typeof globalThis&&(globalThis.AegisAvatarAssemble=API);
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";const pkg="undefined"!=typeof window&&window.AegisAvatarAssemble?{parts:window.AegisAvatarParts,assemble:window.AegisAvatarAssemble.assemble,hud:window.AegisAvatarHud,machine:window.AegisAvatarMachine,pane:window.AegisAvatarPane,persona:window.AegisAvatarPersona}:"undefined"!=typeof module&&module.exports?{parts:require("./parts.js"),assemble:require("./assemble.js").assemble,hud:require("./hud.js"),machine:require("./machine.js"),pane:require("./pane.js"),persona:require("../../lib/avatar/persona.js")}:null;if(!pkg)throw new Error("avatar/avatar.js: the avatar modules must be loaded first");const IDLE_TIMEOUT_MS=3e5,TICK_INTERVAL_MS=3e4;function safe(e,n){try{return e()}catch{return n}}function resolveSource(e){const n=e&&e.avatar;return n&&"function"==typeof n.state?{kind:"main",reason:"",state:()=>Promise.resolve(n.state()),set:"function"==typeof n.set?e=>Promise.resolve(n.set(e)):null}:{kind:"none",reason:"main has no avatar surface yet",state:()=>Promise.resolve(null),set:null}}function mountAvatar(e={}){const n=e.doc,a=e.win||("undefined"!=typeof window?window:null);if(!n||"function"!=typeof n.createElement)throw new Error("mountAvatar: a document is required");const t=e.els||{},o=e.source||resolveSource(a),r=pkg.machine.createAvatarSignals({idleTimeoutMs:e.idleTimeoutMs||3e5});let s=e.persona&&"object"==typeof e.persona?e.persona:pkg.persona?pkg.persona.defaultPersona():pkg.parts.defaultPersona(),i=e.projection&&"object"==typeof e.projection?e.projection:null,l=e.capabilities&&"object"==typeof e.capabilities?e.capabilities:null,p=e.reason||o.reason||"";const u={persona:null,projection:null,capabilities:null,reason:null,active:!1};let c=!1,d=null,f=!1,m=null,v=null;const g=safe((()=>a&&"function"==typeof a.matchMedia?a.matchMedia("(prefers-reduced-motion: reduce)"):null),null);c=Boolean(g&&g.matches),g&&"function"==typeof g.addEventListener&&safe((()=>g.addEventListener("change",(e=>{c=Boolean(e&&"matches"in e?e.matches:g.matches),h()}))));const b=safe((()=>pkg.pane.buildPane({doc:n,persona:s,capabilities:l,onPatch:e=>{const n=safe((()=>pkg.persona?pkg.persona.update(s,e).persona:s),s);return y(n.persona||n,{repaint:!0}),function(e){return o.set?o.set(e).then((e=>e&&!1===e.ok?{ok:!1,reason:e.reason||"refused"}:(e&&e.persona&&y(e.persona,{repaint:!1}),{ok:!0,saved:!0})),(e=>({ok:!1,reason:e&&e.message||"write failed"}))):{ok:!0,saved:!1,reason:o.reason||"no write surface"}}(e)}})),null);function h(){if(f)return;if(null!==d)return;const e=a&&"function"==typeof a.requestAnimationFrame?a.requestAnimationFrame:null;e&&(d=safe((()=>e(w)),null),null!==d)||(d=0,Promise.resolve().then((()=>{d=null,w()})))}function w(){if(f)return;const e={persona:u.active&&u.persona?u.persona:s,projection:u.active?u.projection:i,capabilities:u.active?u.capabilities:l,reason:u.active&&null!==u.reason?u.reason:p},n=safe((()=>pkg.assemble(e.persona,{expression:r.expression,reducedMotion:c})),null);n?t.stage&&(t.stage.innerHTML=n.svg):t.stage&&(t.stage.innerHTML="");const a=pkg.hud.hudModel({persona:e.persona,projection:e.projection,capabilities:e.capabilities,expression:r.expression,expressionLabel:r.label,reason:e.reason});return safe((()=>pkg.hud.renderHud(t,a))),b&&"function"==typeof b.update&&safe((()=>b.update(e.persona))),m={expression:n?n.expression:null,motion:n?n.motion:null,warnings:n?n.warnings.slice():["assemble failed"],missing:n?n.missing.slice():[],hud:a,source:u.active?"preview":o.kind},m}function y(e,n={}){if(!e||"object"!=typeof e)return s;const a=safe((()=>pkg.persona?pkg.persona.validate(e).persona:e),e);return s=a&&a.persona?a.persona:a,!1!==n.repaint&&h(),s}function k(e,n){const a=safe((()=>r.signal(e,n)),null);return a&&h(),a}b&&t.paneHost&&"function"==typeof t.paneHost.appendChild&&t.paneHost.appendChild(b.root);const A={get expression(){return r.expression},get state(){return r.state},get persona(){return s},get painting(){return m},signal:k,turnStart:e=>k("turn.start",e),stream:()=>k("turn.stream"),turnEnd:e=>k("turn.end",e),tool:e=>k(pkg.machine.signalForTool(e),{tool:pkg.machine.toolName(e)}),approvalCard:()=>k("approval.card"),approvalDecided:()=>k("approval.decided"),queue:()=>k("queue.progress"),syncOk:()=>k("sync.ok"),syncError:e=>k("sync.error",e),poke:()=>k("poke"),celebrateDone:()=>k("celebrate.done"),reset:()=>k("reset"),tick:e=>{const n=safe((()=>r.tick(e)),null);return n&&n.changed&&h(),n},on:e=>r.on(e),setPersona:e=>y(e),refresh:function(){return f?Promise.resolve(null):Promise.resolve(safe((()=>o.state()),null)).then((e=>f||!e||"object"!=typeof e?(e||p||(p=o.reason||"main has not published a level yet"),h(),null):(e.persona&&y(e.persona,{repaint:!1}),e.projection&&"object"==typeof e.projection?i=e.projection:"number"==typeof e.level&&(i=e),e.capabilities&&"object"==typeof e.capabilities&&(l=e.capabilities),p="",h(),e)),(e=>(p=`level unavailable — ${e&&e.message||"read failed"}`,h(),null)))},preview:(e={})=>(u.active=!0,e.persona&&(u.persona=e.persona),"projection"in e&&(u.projection=e.projection),"capabilities"in e&&(u.capabilities=e.capabilities),"reason"in e&&(u.reason=void 0===e.reason?null:e.reason),h(),m),clearPreview:()=>(u.active=!1,h(),m),readout:()=>t.readout?String(t.readout.textContent||""):"",destroy(){f=!0,null!==v&&safe((()=>a.clearInterval(v))),v=null,b&&"function"==typeof b.destroy&&safe((()=>b.destroy())),t.stage&&(t.stage.innerHTML="")}};return a&&"function"==typeof a.setInterval&&(v=safe((()=>a.setInterval((()=>A.tick(Date.now())),3e4)),null)),h(),A}const API=Object.freeze({mountAvatar:mountAvatar,resolveSource:resolveSource,IDLE_TIMEOUT_MS:3e5,TICK_INTERVAL_MS:3e4});"undefined"!=typeof module&&module.exports?module.exports=API:"undefined"!=typeof globalThis&&(globalThis.AegisAvatar=API);
3
+ "use strict";const pkg="undefined"!=typeof window&&window.AegisAvatarAssemble?{parts:window.AegisAvatarParts,assemble:window.AegisAvatarAssemble.assemble,hud:window.AegisAvatarHud,machine:window.AegisAvatarMachine,pane:window.AegisAvatarPane,persona:window.AegisAvatarPersona}:"undefined"!=typeof module&&module.exports?{parts:require("./parts.js"),assemble:require("./assemble.js").assemble,hud:require("./hud.js"),machine:require("./machine.js"),pane:require("./pane.js"),persona:require("../../lib/avatar/persona.js")}:null;if(!pkg)throw new Error("avatar/avatar.js: the avatar modules must be loaded first");const IDLE_TIMEOUT_MS=3e5,TICK_INTERVAL_MS=3e4;function safe(e,n){try{return e()}catch{return n}}function resolveSource(e){const n=e&&e.avatar;return n&&"function"==typeof n.state?{kind:"main",reason:"",state:()=>Promise.resolve(n.state()),set:"function"==typeof n.set?e=>Promise.resolve(n.set(e)):null}:{kind:"none",reason:"main has no avatar surface yet",state:()=>Promise.resolve(null),set:null}}function mountAvatar(e={}){const n=e.doc,a=e.win||("undefined"!=typeof window?window:null);if(!n||"function"!=typeof n.createElement)throw new Error("mountAvatar: a document is required");const t=e.els||{},o=e.source||resolveSource(a),r=pkg.machine.createAvatarSignals({idleTimeoutMs:e.idleTimeoutMs||3e5});let s=e.persona&&"object"==typeof e.persona?e.persona:pkg.persona?pkg.persona.defaultPersona():pkg.parts.defaultPersona(),i=e.projection&&"object"==typeof e.projection?e.projection:null,l=e.capabilities&&"object"==typeof e.capabilities?e.capabilities:null,p=e.reason||o.reason||"";const u={persona:null,projection:null,capabilities:null,reason:null,active:!1};let c=!1,d=null,f=!1,m=null,v=null;const g=safe(()=>a&&"function"==typeof a.matchMedia?a.matchMedia("(prefers-reduced-motion: reduce)"):null,null);c=Boolean(g&&g.matches),g&&"function"==typeof g.addEventListener&&safe(()=>g.addEventListener("change",e=>{c=Boolean(e&&"matches"in e?e.matches:g.matches),h()}));const b=safe(()=>pkg.pane.buildPane({doc:n,persona:s,capabilities:l,onPatch:e=>{const n=safe(()=>pkg.persona?pkg.persona.update(s,e).persona:s,s);return y(n.persona||n,{repaint:!0}),function(e){return o.set?o.set(e).then(e=>e&&!1===e.ok?{ok:!1,reason:e.reason||"refused"}:(e&&e.persona&&y(e.persona,{repaint:!1}),{ok:!0,saved:!0}),e=>({ok:!1,reason:e&&e.message||"write failed"})):{ok:!0,saved:!1,reason:o.reason||"no write surface"}}(e)}}),null);function h(){if(f)return;if(null!==d)return;const e=a&&"function"==typeof a.requestAnimationFrame?a.requestAnimationFrame:null;e&&(d=safe(()=>e(w),null),null!==d)||(d=0,Promise.resolve().then(()=>{d=null,w()}))}function w(){if(f)return;const e={persona:u.active&&u.persona?u.persona:s,projection:u.active?u.projection:i,capabilities:u.active?u.capabilities:l,reason:u.active&&null!==u.reason?u.reason:p},n=safe(()=>pkg.assemble(e.persona,{expression:r.expression,reducedMotion:c}),null);n?t.stage&&(t.stage.innerHTML=n.svg):t.stage&&(t.stage.innerHTML="");const a=pkg.hud.hudModel({persona:e.persona,projection:e.projection,capabilities:e.capabilities,expression:r.expression,expressionLabel:r.label,reason:e.reason});return safe(()=>pkg.hud.renderHud(t,a)),b&&"function"==typeof b.update&&safe(()=>b.update(e.persona)),m={expression:n?n.expression:null,motion:n?n.motion:null,warnings:n?n.warnings.slice():["assemble failed"],missing:n?n.missing.slice():[],hud:a,source:u.active?"preview":o.kind},m}function y(e,n={}){if(!e||"object"!=typeof e)return s;const a=safe(()=>pkg.persona?pkg.persona.validate(e).persona:e,e);return s=a&&a.persona?a.persona:a,!1!==n.repaint&&h(),s}function k(e,n){const a=safe(()=>r.signal(e,n),null);return a&&h(),a}b&&t.paneHost&&"function"==typeof t.paneHost.appendChild&&t.paneHost.appendChild(b.root);const A={get expression(){return r.expression},get state(){return r.state},get persona(){return s},get painting(){return m},signal:k,turnStart:e=>k("turn.start",e),stream:()=>k("turn.stream"),turnEnd:e=>k("turn.end",e),tool:e=>k(pkg.machine.signalForTool(e),{tool:pkg.machine.toolName(e)}),approvalCard:()=>k("approval.card"),approvalDecided:()=>k("approval.decided"),queue:()=>k("queue.progress"),syncOk:()=>k("sync.ok"),syncError:e=>k("sync.error",e),poke:()=>k("poke"),celebrateDone:()=>k("celebrate.done"),reset:()=>k("reset"),tick:e=>{const n=safe(()=>r.tick(e),null);return n&&n.changed&&h(),n},on:e=>r.on(e),setPersona:e=>y(e),refresh:function(){return f?Promise.resolve(null):Promise.resolve(safe(()=>o.state(),null)).then(e=>f||!e||"object"!=typeof e?(e||p||(p=o.reason||"main has not published a level yet"),h(),null):(e.persona&&y(e.persona,{repaint:!1}),e.projection&&"object"==typeof e.projection?i=e.projection:"number"==typeof e.level&&(i=e),e.capabilities&&"object"==typeof e.capabilities&&(l=e.capabilities),p="",h(),e),e=>(p=`level unavailable — ${e&&e.message||"read failed"}`,h(),null))},preview:(e={})=>(u.active=!0,e.persona&&(u.persona=e.persona),"projection"in e&&(u.projection=e.projection),"capabilities"in e&&(u.capabilities=e.capabilities),"reason"in e&&(u.reason=void 0===e.reason?null:e.reason),h(),m),clearPreview:()=>(u.active=!1,h(),m),readout:()=>t.readout?String(t.readout.textContent||""):"",destroy(){f=!0,null!==v&&safe(()=>a.clearInterval(v)),v=null,b&&"function"==typeof b.destroy&&safe(()=>b.destroy()),t.stage&&(t.stage.innerHTML="")}};return a&&"function"==typeof a.setInterval&&(v=safe(()=>a.setInterval(()=>A.tick(Date.now()),3e4),null)),h(),A}const API=Object.freeze({mountAvatar:mountAvatar,resolveSource:resolveSource,IDLE_TIMEOUT_MS:3e5,TICK_INTERVAL_MS:3e4});"undefined"!=typeof module&&module.exports?module.exports=API:"undefined"!=typeof globalThis&&(globalThis.AegisAvatar=API);
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";const COMPANION_CARD_CLASS="companion-card",APPROVAL_CARD_CLASS="approval-card";function textEl(t,e,n){const o=t.createElement("div");return o.className=e,o.textContent=n,o}function buildCompanionCard(t,e,n){if(!t||!e||!e.id)return null;const o=t.createElement("div");o.className=`${APPROVAL_CARD_CLASS} ${COMPANION_CARD_CLASS}`,o.dataset.companionId=String(e.id),e.behaviour&&(o.dataset.companionBehaviour=String(e.behaviour)),o.dataset.proactive=e.proactive?"true":"false",o.appendChild(textEl(t,"approval-title",String(e.title||e.label||"Suggestion"))),e.body&&o.appendChild(textEl(t,"approval-summary",String(e.body)));const a=Array.isArray(e.facts)?e.facts.filter(Boolean):[];if(a.length){const e=t.createElement("ul");e.className="companion-facts";for(const n of a.slice(0,6)){const o=t.createElement("li");o.textContent=String(n),e.appendChild(o)}o.appendChild(e)}const i=t.createElement("div");i.className="approval-actions";const l=[];let r=!1;const d=a=>{if(r)return;r=!0;for(const t of l)t.disabled=!0;o.classList.add("resolved");const i=textEl(t,"approval-decision",String(a.doneLabel||("accept"===a.decision?"Accepted":"Not now")));o.appendChild(i),"function"==typeof n&&n(String(e.id),a.decision)};for(const n of Array.isArray(e.actions)?e.actions:[]){const e=t.createElement("button");e.type="button",e.className="approval-btn "+("accept"===n.decision?"allow":"deny"),e.textContent=String(n.label||n.decision),e.dataset.decision=String(n.decision),e.addEventListener("click",(()=>d(n))),l.push(e),i.appendChild(e)}return l.length?(o.appendChild(i),o):null}function mountCompanionCard(t,e,n,o){if(!e||"function"!=typeof e.appendChild)return null;const a=buildCompanionCard(t,n,o);if(!a)return null;let i="function"==typeof e.querySelector?e.querySelector(".approval-slot"):null;return i||(i=t.createElement("div"),i.className="approval-slot",e.appendChild(i)),i.appendChild(a),a}"undefined"!=typeof module&&module.exports&&(module.exports={buildCompanionCard:buildCompanionCard,mountCompanionCard:mountCompanionCard,COMPANION_CARD_CLASS:COMPANION_CARD_CLASS,APPROVAL_CARD_CLASS:APPROVAL_CARD_CLASS});
3
+ "use strict";const COMPANION_CARD_CLASS="companion-card",APPROVAL_CARD_CLASS="approval-card";function textEl(t,n,e){const a=t.createElement("div");return a.className=n,a.textContent=e,a}function buildCompanionCard(t,n,e){if(!t||!n||!n.id)return null;const a=t.createElement("div");a.className="approval-card companion-card",a.dataset.companionId=String(n.id),n.behaviour&&(a.dataset.companionBehaviour=String(n.behaviour)),a.dataset.proactive=n.proactive?"true":"false",a.appendChild(textEl(t,"approval-title",String(n.title||n.label||"Suggestion"))),n.body&&a.appendChild(textEl(t,"approval-summary",String(n.body)));const o=Array.isArray(n.facts)?n.facts.filter(Boolean):[];if(o.length){const n=t.createElement("ul");n.className="companion-facts";for(const e of o.slice(0,6)){const a=t.createElement("li");a.textContent=String(e),n.appendChild(a)}a.appendChild(n)}const i=t.createElement("div");i.className="approval-actions";const l=[];let r=!1;const c=o=>{if(r)return;r=!0;for(const t of l)t.disabled=!0;a.classList.add("resolved");const i=textEl(t,"approval-decision",String(o.doneLabel||("accept"===o.decision?"Accepted":"Not now")));a.appendChild(i),"function"==typeof e&&e(String(n.id),o.decision)};for(const e of Array.isArray(n.actions)?n.actions:[]){const n=t.createElement("button");n.type="button",n.className="approval-btn "+("accept"===e.decision?"allow":"deny"),n.textContent=String(e.label||e.decision),n.dataset.decision=String(e.decision),n.addEventListener("click",()=>c(e)),l.push(n),i.appendChild(n)}return l.length?(a.appendChild(i),a):null}function mountCompanionCard(t,n,e,a){if(!n||"function"!=typeof n.appendChild)return null;const o=buildCompanionCard(t,e,a);if(!o)return null;let i="function"==typeof n.querySelector?n.querySelector(".approval-slot"):null;return i||(i=t.createElement("div"),i.className="approval-slot",n.appendChild(i)),i.appendChild(o),o}"undefined"!=typeof module&&module.exports&&(module.exports={buildCompanionCard:buildCompanionCard,mountCompanionCard:mountCompanionCard,COMPANION_CARD_CLASS:"companion-card",APPROVAL_CARD_CLASS:"approval-card"});
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";const pkg="undefined"!=typeof window&&window.AegisAvatarParts?{parts:window.AegisAvatarParts,level:window.AegisAvatarLevel||null}:"undefined"!=typeof module&&module.exports?{parts:require("./parts.js"),level:require("../../lib/avatar/level.js")}:{parts:null,level:null};if(!pkg.parts)throw new Error("avatar/hud.js: avatar/parts.js must be loaded first");function num(e,l){return"number"==typeof e&&Number.isFinite(e)?e:l}function unlockText(e){return e.unlocks.map((e=>e.paid?`${e.label} · pack`:e.label)).join(", ")}function hudModel(e={}){const l=e.persona&&"object"==typeof e.persona?e.persona:pkg.parts.defaultPersona(),t=l.identity&&l.identity.name||"Aegis",n=e.projection&&"object"==typeof e.projection?e.projection:null,o=n?num(n.level,null):null,r=null!==o,u=String(e.expressionLabel||e.expression||"neutral"),s=`expression: ${u}`;if(!r){const l=String(e.reason||"main has not published a level yet");return{known:!1,name:t,level:null,tier:null,xpIntoLevel:null,xpForNext:null,percent:null,held:!1,heldNote:"",nextUnlock:null,nextUnlockText:"",unlockNote:"",expression:e.expression||"neutral",expressionLabel:u,readout:`${t} · level unknown — ${l} · ${s}`,ariaLive:"polite"}}const i=!0===n.held,a=num(n.settledLevel,o),d=n.tier||call((()=>pkg.level.tierFor(o).name),null)||null,p=num(n.xpIntoLevel,null),c=num(n.xpForNext,null),h=Math.round(100*Math.min(1,Math.max(0,num(n.progress,0)))),x=i?a:o;let v=null;try{v=pkg.level?pkg.level.nextUnlock(x):null}catch{v=null}const f=v?`next at level ${v.level}: ${unlockText(v)}`:"every unlock is yours",k=[];return k.push(`${t} · level ${o}`),d&&k.push(d),i&&k.push("level held · reshuffling"),i||null===c||null===p||k.push(`${p} / ${c} XP to level ${o+1}`),k.push(f),k.push(s),{known:!0,name:t,level:o,tier:d,xpIntoLevel:p,xpForNext:c,percent:h,held:i,heldNote:i?"level held · reshuffling":"",nextUnlock:v,nextUnlockText:f,unlockNote:i?`held — applies after the ledger settles (level ${a})`:"",expression:e.expression||"neutral",expressionLabel:u,readout:k.join(" · "),ariaLive:"polite",cosmetics:e.capabilities&&Array.isArray(e.capabilities.cosmeticsUnlocked)?e.capabilities.cosmeticsUnlocked.slice():null}}function call(e,l){try{return e()}catch{return l}}function renderHud(e,l){const t=e||{},n=(e,l)=>{e&&"string"==typeof l&&(e.textContent=l)},o=null===l.percent?"":`${l.percent}%`;return t.root&&(t.root.setAttribute("data-known",l.known?"true":"false"),t.root.setAttribute("data-held",l.held?"true":"false")),n(t.level,l.known?`L${l.level}`:"L—"),n(t.tier,l.tier||"—"),n(t.readout,l.readout),n(t.nextUnlock,l.nextUnlockText),n(t.unlockNote,l.unlockNote),n(t.expression,l.expressionLabel),t.fill&&(t.fill.style.width=o,t.fill.setAttribute&&t.fill.setAttribute("data-held",l.held?"true":"false")),t.bar&&t.bar.setAttribute("aria-hidden","true"),t.heldBadge&&(t.heldBadge.textContent=l.heldNote,t.heldBadge.hidden=!l.held),l}const API=Object.freeze({hudModel:hudModel,renderHud:renderHud,unlockText:unlockText});"undefined"!=typeof module&&module.exports?module.exports=API:"undefined"!=typeof globalThis&&(globalThis.AegisAvatarHud=API);
3
+ "use strict";const pkg="undefined"!=typeof window&&window.AegisAvatarParts?{parts:window.AegisAvatarParts,level:window.AegisAvatarLevel||null}:"undefined"!=typeof module&&module.exports?{parts:require("./parts.js"),level:require("../../lib/avatar/level.js")}:{parts:null,level:null};if(!pkg.parts)throw new Error("avatar/hud.js: avatar/parts.js must be loaded first");function num(e,l){return"number"==typeof e&&Number.isFinite(e)?e:l}function unlockText(e){return e.unlocks.map(e=>e.paid?`${e.label} · pack`:e.label).join(", ")}function hudModel(e={}){const l=e.persona&&"object"==typeof e.persona?e.persona:pkg.parts.defaultPersona(),t=l.identity&&l.identity.name||"Aegis",n=e.projection&&"object"==typeof e.projection?e.projection:null,o=n?num(n.level,null):null,r=null!==o,u=String(e.expressionLabel||e.expression||"neutral"),s=`expression: ${u}`;if(!r){const l=String(e.reason||"main has not published a level yet");return{known:!1,name:t,level:null,tier:null,xpIntoLevel:null,xpForNext:null,percent:null,held:!1,heldNote:"",nextUnlock:null,nextUnlockText:"",unlockNote:"",expression:e.expression||"neutral",expressionLabel:u,readout:`${t} · level unknown — ${l} · ${s}`,ariaLive:"polite"}}const i=!0===n.held,a=num(n.settledLevel,o),d=n.tier||call(()=>pkg.level.tierFor(o).name,null)||null,p=num(n.xpIntoLevel,null),c=num(n.xpForNext,null),h=Math.round(100*Math.min(1,Math.max(0,num(n.progress,0)))),x=i?a:o;let v=null;try{v=pkg.level?pkg.level.nextUnlock(x):null}catch{v=null}const f=v?`next at level ${v.level}: ${unlockText(v)}`:"every unlock is yours",k=[];return k.push(`${t} · level ${o}`),d&&k.push(d),i&&k.push("level held · reshuffling"),i||null===c||null===p||k.push(`${p} / ${c} XP to level ${o+1}`),k.push(f),k.push(s),{known:!0,name:t,level:o,tier:d,xpIntoLevel:p,xpForNext:c,percent:h,held:i,heldNote:i?"level held · reshuffling":"",nextUnlock:v,nextUnlockText:f,unlockNote:i?`held — applies after the ledger settles (level ${a})`:"",expression:e.expression||"neutral",expressionLabel:u,readout:k.join(" · "),ariaLive:"polite",cosmetics:e.capabilities&&Array.isArray(e.capabilities.cosmeticsUnlocked)?e.capabilities.cosmeticsUnlocked.slice():null}}function call(e,l){try{return e()}catch{return l}}function renderHud(e,l){const t=e||{},n=(e,l)=>{e&&"string"==typeof l&&(e.textContent=l)},o=null===l.percent?"":`${l.percent}%`;return t.root&&(t.root.setAttribute("data-known",l.known?"true":"false"),t.root.setAttribute("data-held",l.held?"true":"false")),n(t.level,l.known?`L${l.level}`:"L—"),n(t.tier,l.tier||"—"),n(t.readout,l.readout),n(t.nextUnlock,l.nextUnlockText),n(t.unlockNote,l.unlockNote),n(t.expression,l.expressionLabel),t.fill&&(t.fill.style.width=o,t.fill.setAttribute&&t.fill.setAttribute("data-held",l.held?"true":"false")),t.bar&&t.bar.setAttribute("aria-hidden","true"),t.heldBadge&&(t.heldBadge.textContent=l.heldNote,t.heldBadge.hidden=!l.held),l}const API=Object.freeze({hudModel:hudModel,renderHud:renderHud,unlockText:unlockText});"undefined"!=typeof module&&module.exports?module.exports=API:"undefined"!=typeof globalThis&&(globalThis.AegisAvatarHud=API);
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";!function(){const e="undefined"!=typeof window&&window.AegisAvatarParts?{parts:window.AegisAvatarParts,persona:window.AegisAvatarPersona||null}:"undefined"!=typeof module&&module.exports?{parts:require("./parts.js"),persona:require("../../lib/avatar/persona.js")}:{parts:null,persona:null};if(!e.parts)throw new Error("avatar/pane.js: avatar/parts.js must be loaded first");const t=Object.freeze({"outfit.seasonal-winter":"outfit.seasonal","outfit.archive-coat":"outfit.archive"}),a=Object.freeze(new Set(["outfit","palette","expressions"])),n=Object.freeze({name:"Name",pronouns:"Pronouns",selfDesc:"Describes itself as",formality:"Formality",humor:"Humour",verbosity:"Verbosity",proactivity:"Proactivity",address:"Addresses you as",emojis:"Use emojis",enabled:"Voice",engine:"Voice engine",voiceId:"Voice id",rate:"Rate",motion:"Motion",size:"Size",docked:"Dock in the sidebar",hairColor:"Hair colour",pack:"Expression pack"});function i(e,t){let a=e;for(const e of t){if(null===a||"object"!=typeof a)return;a=a[e]}return a}function o(e,t){const a={};let n=a;for(let a=0;a<e.length;a+=1)a===e.length-1?n[e[a]]=t:(n[e[a]]={},n=n[e[a]]);return a}function r(e,t,a,n){const i=e.createElement(t);for(const[e,t]of Object.entries(a||{}))null!=t&&!1!==t&&("class"===e?i.className=t:"text"===e?i.textContent=String(t):i.setAttribute&&i.setAttribute(e,String(t)));return void 0!==n&&(i.textContent=String(n)),i}const s=Object.freeze({buildPane:function(s={}){const d=s.doc;if(!d||"function"!=typeof d.createElement)throw new Error("buildPane: a document is required");const l=s.manifest||e.parts,p=e.persona&&e.persona.LIMITS||{name:40,address:32,voiceId:64},c=e.persona&&e.persona.MAX_OUTFIT_LAYERS||3;let u=s.persona&&"object"==typeof s.persona?s.persona:e.persona?e.persona.defaultPersona():l.defaultPersona();const f=s.capabilities&&Array.isArray(s.capabilities.cosmeticsUnlocked)?new Set(s.capabilities.cosmeticsUnlocked):null,h=[],v=r(d,"div",{class:"avatar-pane",id:"avatar-pane"});function g(e,n){"expressionPack"!==e&&"expressions"!==e||(e="expressions");const i=t[`${e}.${n}`]||`${e}.${n}`;return a.has(e)&&f?{id:i,known:!0,unlocked:f.has(i)}:{id:i,known:!1,unlocked:!0}}function m(e,t){const a=l.LABELS&&l.LABELS[e];return a&&a[t]||String(t)}function C(e,t,a,o){const s=r(d,"div",{class:"avatar-field","data-path":a.join(".")}),p=r(d,"label",{class:"avatar-label"},n[t]||t),c=r(d,"select",{id:`avatar-${o}-${a.join("-")}`,class:"avatar-select"}),f=l.IDS[o]||[];for(const e of f){const t=g(o,e),a=r(d,"option",{value:e},m(o,e));a.value=e,t.unlocked||(a.disabled=!0,a.textContent=`${m(o,e)} · locked`),c.appendChild(a)}c.value=String(i(u,a));const v=r(d,"span",{class:"avatar-field-note"}),C={path:a,kind:o,control:c,tag:"select",group:e};return c.addEventListener("change",(()=>{const e=g(o,c.value);if(!e.unlocked)return v.textContent=`${m(o,c.value)} is not unlocked yet (${e.id})`,void P(C,i(u,a));v.textContent="",P(C,c.value)})),h.push(C),s.appendChild(p),s.appendChild(c),s.appendChild(v),{field:s,control:c}}function y(e,t,a,{min:o,max:s,step:l,format:p}){const c=r(d,"div",{class:"avatar-field","data-path":a.join(".")}),f=i(u,a),v=r(d,"span",{class:"avatar-value"},p?p(f):String(f)),g=r(d,"label",{class:"avatar-label"},n[t]||t),m=r(d,"input",{type:"range",id:`avatar-${t}`,min:String(o),max:String(s),step:String(l)});m.value=String(f);const C={path:a,kind:t,control:m,tag:"input",group:e};return m.addEventListener("input",(()=>{v.textContent=p?p(m.value):String(m.value),P(C,Number(m.value))})),h.push(C),c.appendChild(g),c.appendChild(m),c.appendChild(v),{field:c,control:m}}function b(e,t,a){const o=r(d,"div",{class:"avatar-field","data-path":a.join(".")}),s=r(d,"input",{type:"checkbox",id:`avatar-${t}`});s.checked=!0===i(u,a);const l=r(d,"label",{class:"avatar-label",for:`avatar-${t}`},n[t]||t),p={path:a,kind:t,control:s,tag:"input",group:e};return s.addEventListener("change",(()=>P(p,!0===s.checked))),h.push(p),o.appendChild(s),o.appendChild(l),{field:o,control:s}}function k(e,t,a,o){const s=r(d,"div",{class:"avatar-field","data-path":a.join(".")}),l=r(d,"label",{class:"avatar-label"},n[t]||t),p=r(d,"input",{type:"text",id:`avatar-${t}`,maxlength:o});p.value=String(i(u,a)||"");const c={path:a,kind:t,control:p,tag:"input",group:e};return p.addEventListener("change",(()=>P(c,String(p.value).slice(0,o)))),h.push(c),s.appendChild(l),s.appendChild(p),{field:s,control:p}}function x(e,t){const a=r(d,"div",{class:"avatar-group","data-group":t});return a.appendChild(r(d,"div",{class:"avatar-group-title"},e)),v.appendChild(a),a}const S=x("Identity","identity");S.appendChild(k("identity","name",["identity","name"],p.name||40).field),S.appendChild(k("identity","pronouns",["identity","pronouns"],p.pronouns||24).field),S.appendChild(function(e,t,a,o,s){const l=r(d,"div",{class:"avatar-field avatar-field-stack","data-path":a.join(".")}),p=r(d,"label",{class:"avatar-label",for:`avatar-${t}`},n[t]||t),c=r(d,"textarea",{id:`avatar-${t}`,rows:2,maxlength:o});c.value=String(i(u,a)||"");const f={path:a,kind:t,control:c,tag:"textarea",group:"identity"};return c.addEventListener("change",(()=>P(f,String(c.value).slice(0,o)))),h.push(f),l.appendChild(p),l.appendChild(c),{field:l,control:c}}(0,"selfDesc",["identity","selfDesc"],p.selfDesc||120).field);const A=x("Presentation","presentation");A.appendChild(C("presentation","frame",["presentation","frame"],"frame").field),A.appendChild(C("presentation","skin",["presentation","skin"],"skin").field),A.appendChild(C("presentation","hair",["presentation","hair"],"hair").field),A.appendChild(function(e,t,a){const o=r(d,"div",{class:"avatar-field","data-path":a.join(".")}),s=r(d,"label",{class:"avatar-label"},n[t]||t),l=r(d,"input",{type:"color",id:`avatar-${t}`});l.value=String(i(u,a)||"#3b2a20");const p={path:a,kind:t,control:l,tag:"input",group:"presentation"};return l.addEventListener("change",(()=>P(p,String(l.value).toLowerCase()))),h.push(p),o.appendChild(s),o.appendChild(l),{field:o,control:l}}(0,"hairColor",["presentation","hairColor"]).field),A.appendChild(C("presentation","eyes",["presentation","eyes"],"eyes").field),A.appendChild(C("presentation","palette",["presentation","palette"],"palette").field),A.appendChild(function(e){const t=r(d,"div",{class:"avatar-field","data-path":"presentation.outfit"});t.appendChild(r(d,"div",{class:"avatar-label"},"Outfit (up to "+c+" layers)"));const a=Array.isArray(i(u,["presentation","outfit"]))?i(u,["presentation","outfit"]).slice():[],n=[],o=r(d,"span",{class:"avatar-field-note"});for(const e of l.IDS.outfit||[]){const s=g("outfit",e),l=r(d,"div",{class:"avatar-check"}),p=r(d,"input",{type:"checkbox",id:`avatar-outfit-${e}`});p.checked=a.includes(e),p.disabled=!s.unlocked;const f=r(d,"label",{for:`avatar-outfit-${e}`},m("outfit",e)+(s.unlocked?"":" · locked")),v={path:["presentation","outfit"],kind:"outfitLayer",control:p,tag:"input",group:"presentation",id:e};p.addEventListener("change",(()=>{const t=Array.isArray(i(u,["presentation","outfit"]))?i(u,["presentation","outfit"]).slice():[];let a;if(p.checked){if(t.length>=c)return p.checked=!1,void(o.textContent=`at most ${c} outfit layers (earned at level 5)`);a=t.concat([e])}else a=t.filter((t=>t!==e));o.textContent="",P(v,a)})),h.push(v),n.push(p),l.appendChild(p),l.appendChild(f),t.appendChild(l)}return t.appendChild(o),{field:t,control:n}}().field),x("Expressions","expressions").appendChild(C("expressions","pack",["expressions","pack"],"expressionPack").field);const j=x("Voice","voice");j.appendChild(b("voice","enabled",["voice","enabled"]).field),j.appendChild(C("voice","engine",["voice","engine"],"voiceEngine").field),j.appendChild(k("voice","voiceId",["voice","id"],p.voiceId||64).field),j.appendChild(y("voice","rate",["voice","rate"],{min:.5,max:2,step:.1,format:e=>`${Number(e).toFixed(1)}×`}).field);const $=x("Register","register"),w=e=>`${Math.round(100*Number(e))}%`;$.appendChild(y("register","formality",["register","formality"],{min:0,max:1,step:.05,format:w}).field),$.appendChild(y("register","humor",["register","humor"],{min:0,max:1,step:.05,format:w}).field),$.appendChild(y("register","verbosity",["register","verbosity"],{min:0,max:1,step:.05,format:w}).field),$.appendChild(C("register","proactivity",["register","proactivity"],"proactivity").field),$.appendChild(k("register","address",["register","address"],p.address||32).field),$.appendChild(b("register","emojis",["register","emojis"]).field);const L=x("Appearance","appearance");L.appendChild(C("appearance","motion",["appearance","motion"],"motion").field),L.appendChild(C("appearance","size",["appearance","size"],"size").field),L.appendChild(b("appearance","docked",["appearance","docked"]).field);const E=r(d,"p",{class:"avatar-pane-status",id:"avatar-pane-status",role:"status"});function P(t,a){u=e.persona?e.persona.validate(function(e,t){const a={};for(const n of["identity","presentation","expressions","voice","register","appearance"])a[n]=Object.assign({},e[n],t[n]);return a}(u,o(t.path,a))).persona:u;const n=o(t.path,a);let i;try{i="function"==typeof s.onPatch?s.onPatch(n,{persona:u,record:t}):void 0}catch(e){i={ok:!1,reason:e&&e.message||"change handler threw"}}return Promise.resolve(i).then((e=>{e&&e.ok?I(!1===e.saved?"preview only":"saved"):e&&e.reason?I(`not saved — ${e.reason}`):I(void 0===e?"":"preview only")}),(e=>I(`not saved — ${e&&e.message||"error"}`))),u}function I(e){E.textContent=String(e||""),E.hidden=!e}return v.appendChild(E),{root:v,controls:h,status:E,get persona(){return u},update(e){if(!e||"object"!=typeof e)return u;u=e;for(const e of h){const t=i(u,e.path);null==t?e.control.value="":"select"===e.tag?e.control.value=String(t):"checkbox"===(e.control.type||"")?e.control.checked=!0===t:Array.isArray(t)&&"outfitLayer"===e.kind?e.control.checked=t.includes(e.id):e.control.value=String(t)}return u},setStatus:I,destroy(){v.parentNode&&v.parentNode.removeChild&&v.parentNode.removeChild(v)}}},patchFor:o,readPath:i,UNLOCK_ALIASES:t,FIELD_LABELS:n});"undefined"!=typeof module&&module.exports?module.exports=s:"undefined"!=typeof globalThis&&(globalThis.AegisAvatarPane=s)}();
3
+ "use strict";!function(){const e="undefined"!=typeof window&&window.AegisAvatarParts?{parts:window.AegisAvatarParts,persona:window.AegisAvatarPersona||null}:"undefined"!=typeof module&&module.exports?{parts:require("./parts.js"),persona:require("../../lib/avatar/persona.js")}:{parts:null,persona:null};if(!e.parts)throw new Error("avatar/pane.js: avatar/parts.js must be loaded first");const t=Object.freeze({"outfit.seasonal-winter":"outfit.seasonal","outfit.archive-coat":"outfit.archive"}),a=Object.freeze(new Set(["outfit","palette","expressions"])),n=Object.freeze({name:"Name",pronouns:"Pronouns",selfDesc:"Describes itself as",formality:"Formality",humor:"Humour",verbosity:"Verbosity",proactivity:"Proactivity",address:"Addresses you as",emojis:"Use emojis",enabled:"Voice",engine:"Voice engine",voiceId:"Voice id",rate:"Rate",motion:"Motion",size:"Size",docked:"Dock in the sidebar",hairColor:"Hair colour",pack:"Expression pack"});function i(e,t){let a=e;for(const e of t){if(null===a||"object"!=typeof a)return;a=a[e]}return a}function o(e,t){const a={};let n=a;for(let a=0;a<e.length;a+=1)a===e.length-1?n[e[a]]=t:(n[e[a]]={},n=n[e[a]]);return a}function r(e,t,a,n){const i=e.createElement(t);for(const[e,t]of Object.entries(a||{}))null!=t&&!1!==t&&("class"===e?i.className=t:"text"===e?i.textContent=String(t):i.setAttribute&&i.setAttribute(e,String(t)));return void 0!==n&&(i.textContent=String(n)),i}const s=Object.freeze({buildPane:function(s={}){const d=s.doc;if(!d||"function"!=typeof d.createElement)throw new Error("buildPane: a document is required");const l=s.manifest||e.parts,p=e.persona&&e.persona.LIMITS||{name:40,address:32,voiceId:64},c=e.persona&&e.persona.MAX_OUTFIT_LAYERS||3;let u=s.persona&&"object"==typeof s.persona?s.persona:e.persona?e.persona.defaultPersona():l.defaultPersona();const f=s.capabilities&&Array.isArray(s.capabilities.cosmeticsUnlocked)?new Set(s.capabilities.cosmeticsUnlocked):null,h=[],v=r(d,"div",{class:"avatar-pane",id:"avatar-pane"});function g(e,n){"expressionPack"!==e&&"expressions"!==e||(e="expressions");const i=t[`${e}.${n}`]||`${e}.${n}`;return a.has(e)&&f?{id:i,known:!0,unlocked:f.has(i)}:{id:i,known:!1,unlocked:!0}}function m(e,t){const a=l.LABELS&&l.LABELS[e];return a&&a[t]||String(t)}function C(e,t,a,o){const s=r(d,"div",{class:"avatar-field","data-path":a.join(".")}),p=r(d,"label",{class:"avatar-label"},n[t]||t),c=r(d,"select",{id:`avatar-${o}-${a.join("-")}`,class:"avatar-select"}),f=l.IDS[o]||[];for(const e of f){const t=g(o,e),a=r(d,"option",{value:e},m(o,e));a.value=e,t.unlocked||(a.disabled=!0,a.textContent=`${m(o,e)} · locked`),c.appendChild(a)}c.value=String(i(u,a));const v=r(d,"span",{class:"avatar-field-note"}),C={path:a,kind:o,control:c,tag:"select",group:e};return c.addEventListener("change",()=>{const e=g(o,c.value);if(!e.unlocked)return v.textContent=`${m(o,c.value)} is not unlocked yet (${e.id})`,void P(C,i(u,a));v.textContent="",P(C,c.value)}),h.push(C),s.appendChild(p),s.appendChild(c),s.appendChild(v),{field:s,control:c}}function y(e,t,a,{min:o,max:s,step:l,format:p}){const c=r(d,"div",{class:"avatar-field","data-path":a.join(".")}),f=i(u,a),v=r(d,"span",{class:"avatar-value"},p?p(f):String(f)),g=r(d,"label",{class:"avatar-label"},n[t]||t),m=r(d,"input",{type:"range",id:`avatar-${t}`,min:String(o),max:String(s),step:String(l)});m.value=String(f);const C={path:a,kind:t,control:m,tag:"input",group:e};return m.addEventListener("input",()=>{v.textContent=p?p(m.value):String(m.value),P(C,Number(m.value))}),h.push(C),c.appendChild(g),c.appendChild(m),c.appendChild(v),{field:c,control:m}}function b(e,t,a){const o=r(d,"div",{class:"avatar-field","data-path":a.join(".")}),s=r(d,"input",{type:"checkbox",id:`avatar-${t}`});s.checked=!0===i(u,a);const l=r(d,"label",{class:"avatar-label",for:`avatar-${t}`},n[t]||t),p={path:a,kind:t,control:s,tag:"input",group:e};return s.addEventListener("change",()=>P(p,!0===s.checked)),h.push(p),o.appendChild(s),o.appendChild(l),{field:o,control:s}}function k(e,t,a,o){const s=r(d,"div",{class:"avatar-field","data-path":a.join(".")}),l=r(d,"label",{class:"avatar-label"},n[t]||t),p=r(d,"input",{type:"text",id:`avatar-${t}`,maxlength:o});p.value=String(i(u,a)||"");const c={path:a,kind:t,control:p,tag:"input",group:e};return p.addEventListener("change",()=>P(c,String(p.value).slice(0,o))),h.push(c),s.appendChild(l),s.appendChild(p),{field:s,control:p}}function x(e,t){const a=r(d,"div",{class:"avatar-group","data-group":t});return a.appendChild(r(d,"div",{class:"avatar-group-title"},e)),v.appendChild(a),a}const S=x("Identity","identity");S.appendChild(k("identity","name",["identity","name"],p.name||40).field),S.appendChild(k("identity","pronouns",["identity","pronouns"],p.pronouns||24).field),S.appendChild(function(e,t,a,o){const s=r(d,"div",{class:"avatar-field avatar-field-stack","data-path":a.join(".")}),l=r(d,"label",{class:"avatar-label",for:`avatar-${t}`},n[t]||t),p=r(d,"textarea",{id:`avatar-${t}`,rows:2,maxlength:o});p.value=String(i(u,a)||"");const c={path:a,kind:t,control:p,tag:"textarea",group:"identity"};return p.addEventListener("change",()=>P(c,String(p.value).slice(0,o))),h.push(c),s.appendChild(l),s.appendChild(p),{field:s,control:p}}(0,"selfDesc",["identity","selfDesc"],p.selfDesc||120).field);const A=x("Presentation","presentation");A.appendChild(C("presentation","frame",["presentation","frame"],"frame").field),A.appendChild(C("presentation","skin",["presentation","skin"],"skin").field),A.appendChild(C("presentation","hair",["presentation","hair"],"hair").field),A.appendChild(function(e,t,a){const o=r(d,"div",{class:"avatar-field","data-path":a.join(".")}),s=r(d,"label",{class:"avatar-label"},n[t]||t),l=r(d,"input",{type:"color",id:`avatar-${t}`});l.value=String(i(u,a)||"#3b2a20");const p={path:a,kind:t,control:l,tag:"input",group:"presentation"};return l.addEventListener("change",()=>P(p,String(l.value).toLowerCase())),h.push(p),o.appendChild(s),o.appendChild(l),{field:o,control:l}}(0,"hairColor",["presentation","hairColor"]).field),A.appendChild(C("presentation","eyes",["presentation","eyes"],"eyes").field),A.appendChild(C("presentation","palette",["presentation","palette"],"palette").field),A.appendChild(function(){const e=r(d,"div",{class:"avatar-field","data-path":"presentation.outfit"});e.appendChild(r(d,"div",{class:"avatar-label"},"Outfit (up to "+c+" layers)"));const t=Array.isArray(i(u,["presentation","outfit"]))?i(u,["presentation","outfit"]).slice():[],a=[],n=r(d,"span",{class:"avatar-field-note"});for(const o of l.IDS.outfit||[]){const s=g("outfit",o),l=r(d,"div",{class:"avatar-check"}),p=r(d,"input",{type:"checkbox",id:`avatar-outfit-${o}`});p.checked=t.includes(o),p.disabled=!s.unlocked;const f=r(d,"label",{for:`avatar-outfit-${o}`},m("outfit",o)+(s.unlocked?"":" · locked")),v={path:["presentation","outfit"],kind:"outfitLayer",control:p,tag:"input",group:"presentation",id:o};p.addEventListener("change",()=>{const e=Array.isArray(i(u,["presentation","outfit"]))?i(u,["presentation","outfit"]).slice():[];let t;if(p.checked){if(e.length>=c)return p.checked=!1,void(n.textContent=`at most ${c} outfit layers (earned at level 5)`);t=e.concat([o])}else t=e.filter(e=>e!==o);n.textContent="",P(v,t)}),h.push(v),a.push(p),l.appendChild(p),l.appendChild(f),e.appendChild(l)}return e.appendChild(n),{field:e,control:a}}().field),x("Expressions","expressions").appendChild(C("expressions","pack",["expressions","pack"],"expressionPack").field);const j=x("Voice","voice");j.appendChild(b("voice","enabled",["voice","enabled"]).field),j.appendChild(C("voice","engine",["voice","engine"],"voiceEngine").field),j.appendChild(k("voice","voiceId",["voice","id"],p.voiceId||64).field),j.appendChild(y("voice","rate",["voice","rate"],{min:.5,max:2,step:.1,format:e=>`${Number(e).toFixed(1)}×`}).field);const $=x("Register","register"),w=e=>`${Math.round(100*Number(e))}%`;$.appendChild(y("register","formality",["register","formality"],{min:0,max:1,step:.05,format:w}).field),$.appendChild(y("register","humor",["register","humor"],{min:0,max:1,step:.05,format:w}).field),$.appendChild(y("register","verbosity",["register","verbosity"],{min:0,max:1,step:.05,format:w}).field),$.appendChild(C("register","proactivity",["register","proactivity"],"proactivity").field),$.appendChild(k("register","address",["register","address"],p.address||32).field),$.appendChild(b("register","emojis",["register","emojis"]).field);const L=x("Appearance","appearance");L.appendChild(C("appearance","motion",["appearance","motion"],"motion").field),L.appendChild(C("appearance","size",["appearance","size"],"size").field),L.appendChild(b("appearance","docked",["appearance","docked"]).field);const E=r(d,"p",{class:"avatar-pane-status",id:"avatar-pane-status",role:"status"});function P(t,a){u=e.persona?e.persona.validate(function(e,t){const a={};for(const n of["identity","presentation","expressions","voice","register","appearance"])a[n]=Object.assign({},e[n],t[n]);return a}(u,o(t.path,a))).persona:u;const n=o(t.path,a);let i;try{i="function"==typeof s.onPatch?s.onPatch(n,{persona:u,record:t}):void 0}catch(e){i={ok:!1,reason:e&&e.message||"change handler threw"}}return Promise.resolve(i).then(e=>{e&&e.ok?I(!1===e.saved?"preview only":"saved"):e&&e.reason?I(`not saved — ${e.reason}`):I(void 0===e?"":"preview only")},e=>I(`not saved — ${e&&e.message||"error"}`)),u}function I(e){E.textContent=String(e||""),E.hidden=!e}return v.appendChild(E),{root:v,controls:h,status:E,get persona(){return u},update(e){if(!e||"object"!=typeof e)return u;u=e;for(const e of h){const t=i(u,e.path);null==t?e.control.value="":"select"===e.tag?e.control.value=String(t):"checkbox"===(e.control.type||"")?e.control.checked=!0===t:Array.isArray(t)&&"outfitLayer"===e.kind?e.control.checked=t.includes(e.id):e.control.value=String(t)}return u},setStatus:I,destroy(){v.parentNode&&v.parentNode.removeChild&&v.parentNode.removeChild(v)}}},patchFor:o,readPath:i,UNLOCK_ALIASES:t,FIELD_LABELS:n});"undefined"!=typeof module&&module.exports?module.exports=s:"undefined"!=typeof globalThis&&(globalThis.AegisAvatarPane=s)}();
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";!function(){const e=("undefined"!=typeof window&&window.AegisAvatarPersona?{persona:window.AegisAvatarPersona,events:window.AegisAvatarEvents}:"undefined"!=typeof module&&module.exports?{persona:require("../../lib/avatar/persona.js"),events:require("../../lib/avatar/events.js")}:{persona:null,events:null}).persona,r=Object.freeze(["shadow","hairBack","body","outfitUnder","head","face","hairFront","outfitOver","accessory","effect"]),t=Object.freeze(["#f7dcc9","#eec2a4","#dda57f","#c0835a","#8e5c3c","#5f3c28"]),c=Object.freeze({amber:Object.freeze({bg:"#241a12",ink:"#f6e6d2",accent:"#f0a83c",cloth:"#3d2c1e",clothShade:"#2a1d13",metal:"#c9a227"}),slate:Object.freeze({bg:"#14181f",ink:"#e6ecf5",accent:"#6fa8dc",cloth:"#26313f",clothShade:"#1a222c",metal:"#9fb3c8"}),moss:Object.freeze({bg:"#121a14",ink:"#e8f2e6",accent:"#7fbf7f",cloth:"#243329",clothShade:"#19241d",metal:"#a8bf8f"}),plum:Object.freeze({bg:"#1c1220",ink:"#f1e6f5",accent:"#b27ad6",cloth:"#33203d",clothShade:"#24162c",metal:"#d8b4e2"}),mono:Object.freeze({bg:"#131313",ink:"#f2f2f2",accent:"#bfbfbf",cloth:"#2b2b2b",clothShade:"#1d1d1d",metal:"#9a9a9a"}),sunset:Object.freeze({bg:"#2a1418",ink:"#ffeede",accent:"#ff7a59",cloth:"#472029",clothShade:"#311519",metal:"#ffb27a"})}),b=Object.freeze({A:Object.freeze({label:"Round",head:"M100 34 C133 34 153 58 153 93 C153 130 130 165 100 173 C70 165 47 130 47 93 C47 58 67 34 100 34 Z",ear:Object.freeze([Object.freeze({cx:47,cy:100,r:11}),Object.freeze({cx:153,cy:100,r:11})]),faceY:104}),B:Object.freeze({label:"Square",head:"M100 32 H141 Q155 32 155 62 V98 Q155 148 100 170 Q45 148 45 98 V62 Q45 32 59 32 Z",ear:Object.freeze([Object.freeze({cx:45,cy:98,r:10}),Object.freeze({cx:155,cy:98,r:10})]),faceY:102}),C:Object.freeze({label:"Oval",head:"M100 28 C129 28 147 52 147 90 C147 124 129 168 100 180 C71 168 53 124 53 90 C53 52 71 28 100 28 Z",ear:Object.freeze([Object.freeze({cx:53,cy:96,r:9}),Object.freeze({cx:147,cy:96,r:9})]),faceY:106})}),f=Object.freeze({neck:"M85 158 h30 v26 h-30 Z",shirt:"M58 190 Q100 176 142 190 V262 H58 Z",sleeveL:"M58 190 L38 226 L58 238 L74 206 Z",sleeveR:"M142 190 L162 226 L142 238 L126 206 Z"}),a=Object.freeze({"short-1":Object.freeze({label:"Short",back:Object.freeze([]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 28 C131 28 153 50 153 84 C144 62 124 54 100 54 C76 54 56 62 47 84 C47 50 69 28 100 28 Z"}),Object.freeze({kind:"path",d:"M62 62 Q86 46 108 56 Q88 60 74 74 Z"})])}),"bob-2":Object.freeze({label:"Bob",back:Object.freeze([Object.freeze({kind:"path",d:"M44 96 Q44 30 100 30 Q156 30 156 96 V150 Q140 146 138 118 V96 Q132 62 100 62 Q68 62 62 96 V118 Q60 146 44 150 Z"})]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 26 C133 26 156 52 156 90 Q140 60 100 60 Q60 60 44 90 C44 52 67 26 100 26 Z"}),Object.freeze({kind:"path",d:"M46 88 Q60 108 58 150 L44 150 Q42 110 46 88 Z"}),Object.freeze({kind:"path",d:"M154 88 Q140 108 142 150 L156 150 Q158 110 154 88 Z"})])}),"long-3":Object.freeze({label:"Long",back:Object.freeze([Object.freeze({kind:"path",d:"M40 100 Q40 28 100 28 Q160 28 160 100 V226 Q142 232 138 200 V104 Q132 60 100 60 Q68 60 62 104 V200 Q58 232 40 226 Z"})]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 26 C134 26 158 52 158 92 Q140 58 100 58 Q60 58 42 92 C42 52 66 26 100 26 Z"}),Object.freeze({kind:"path",d:"M52 88 Q64 120 62 170 L48 168 Q44 116 52 88 Z"}),Object.freeze({kind:"path",d:"M148 88 Q136 120 138 170 L152 168 Q156 116 148 88 Z"})])}),"curly-4":Object.freeze({label:"Curly",back:Object.freeze([Object.freeze({kind:"circle",cx:62,cy:66,r:26}),Object.freeze({kind:"circle",cx:100,cy:46,r:30}),Object.freeze({kind:"circle",cx:138,cy:66,r:26})]),front:Object.freeze([Object.freeze({kind:"circle",cx:76,cy:52,r:20}),Object.freeze({kind:"circle",cx:106,cy:44,r:22}),Object.freeze({kind:"circle",cx:134,cy:58,r:18})])}),"buzz-5":Object.freeze({label:"Buzz",back:Object.freeze([]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 30 C130 30 152 52 152 82 Q136 58 100 58 Q64 58 48 82 C48 52 70 30 100 30 Z"})])}),"ponytail-6":Object.freeze({label:"Ponytail",back:Object.freeze([Object.freeze({kind:"path",d:"M146 74 Q186 96 178 148 Q170 190 150 196 Q166 156 158 122 Q150 92 138 82 Z"})]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 28 C132 28 154 50 154 86 Q140 58 100 58 Q60 58 46 86 C46 50 68 28 100 28 Z"})])}),"braids-7":Object.freeze({label:"Braids",back:Object.freeze([Object.freeze({kind:"path",d:"M52 92 Q44 150 48 196 L70 196 Q60 150 64 100 Z"}),Object.freeze({kind:"path",d:"M148 92 Q156 150 152 196 L130 196 Q140 150 136 100 Z"})]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 28 C132 28 154 50 154 86 Q140 58 100 58 Q60 58 46 86 C46 50 68 28 100 28 Z"})]),detail:Object.freeze([Object.freeze({kind:"path",d:"M50 132 H70 M50 160 H70 M130 132 H150 M130 160 H150",stroke:!0,role:"hairShade"})])}),"wavy-8":Object.freeze({label:"Wavy",back:Object.freeze([Object.freeze({kind:"path",d:"M42 96 Q42 30 100 30 Q158 30 158 96 Q150 130 156 168 Q146 158 142 132 Q140 96 132 70 Q118 58 100 58 Q82 58 68 70 Q60 96 58 132 Q54 158 44 168 Q50 130 42 96 Z"})]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 26 C134 26 158 54 156 94 Q146 62 116 58 Q96 56 84 66 Q66 74 44 94 C42 54 66 26 100 26 Z"})])})}),l=Object.freeze({soft:Object.freeze({label:"Soft",left:Object.freeze([Object.freeze({kind:"ellipse",cx:78,cy:106,rx:12,ry:9}),Object.freeze({kind:"circle",cx:78,cy:106,r:5,role:"ink"}),Object.freeze({kind:"circle",cx:80,cy:103,r:2,role:"highlight"})]),right:Object.freeze([Object.freeze({kind:"ellipse",cx:122,cy:106,rx:12,ry:9}),Object.freeze({kind:"circle",cx:122,cy:106,r:5,role:"ink"}),Object.freeze({kind:"circle",cx:124,cy:103,r:2,role:"highlight"})])}),sharp:Object.freeze({label:"Sharp",left:Object.freeze([Object.freeze({kind:"path",d:"M66 106 Q78 94 90 106 Q78 112 66 106 Z"}),Object.freeze({kind:"circle",cx:79,cy:104,r:4,role:"ink"})]),right:Object.freeze([Object.freeze({kind:"path",d:"M110 106 Q122 94 134 106 Q122 112 110 106 Z"}),Object.freeze({kind:"circle",cx:121,cy:104,r:4,role:"ink"})])}),sleepy:Object.freeze({label:"Sleepy",left:Object.freeze([Object.freeze({kind:"path",d:"M66 106 Q78 112 90 106",stroke:!0}),Object.freeze({kind:"circle",cx:78,cy:109,r:3,role:"ink"})]),right:Object.freeze([Object.freeze({kind:"path",d:"M110 106 Q122 112 134 106",stroke:!0}),Object.freeze({kind:"circle",cx:122,cy:109,r:3,role:"ink"})])}),bright:Object.freeze({label:"Bright",left:Object.freeze([Object.freeze({kind:"circle",cx:78,cy:105,r:12}),Object.freeze({kind:"circle",cx:78,cy:105,r:6,role:"ink"}),Object.freeze({kind:"circle",cx:82,cy:100,r:3,role:"highlight"})]),right:Object.freeze([Object.freeze({kind:"circle",cx:122,cy:105,r:12}),Object.freeze({kind:"circle",cx:122,cy:105,r:6,role:"ink"}),Object.freeze({kind:"circle",cx:126,cy:100,r:3,role:"highlight"})])})}),n=Object.freeze({nose:Object.freeze([Object.freeze({kind:"path",d:"M100 116 Q104 124 98 128",stroke:!0})])}),o=Object.freeze({neutral:Object.freeze({label:"Neutral",brows:Object.freeze(["M64 92 Q78 86 90 92","M110 92 Q122 86 136 92"]),mouth:"M88 140 Q100 146 112 140"}),attentive:Object.freeze({label:"Attentive",brows:Object.freeze(["M64 88 Q78 80 90 88","M110 88 Q122 80 136 88"]),mouth:"M88 140 Q100 148 112 140"}),focused:Object.freeze({label:"Focused",brows:Object.freeze(["M64 90 Q78 84 90 96","M110 96 Q122 84 136 90"]),mouth:"M88 142 H112"}),waiting:Object.freeze({label:"Waiting",brows:Object.freeze(["M62 86 Q78 78 92 84","M108 84 Q122 78 138 86"]),mouth:"M90 142 Q100 138 110 142"}),happy:Object.freeze({label:"Happy",brows:Object.freeze(["M64 88 Q78 82 90 88","M110 88 Q122 82 136 88"]),mouth:"M84 138 Q100 156 116 138",eyes:"arc"}),sleepy:Object.freeze({label:"Sleepy",brows:Object.freeze(["M64 94 Q78 90 90 94","M110 94 Q122 90 136 94"]),mouth:"M92 144 Q100 150 108 144",eyes:"closed"}),concerned:Object.freeze({label:"Concerned",brows:Object.freeze(["M62 84 Q78 92 92 98","M108 98 Q122 92 138 84"]),mouth:"M88 146 Q100 138 112 146"}),warm:Object.freeze({label:"Warm",brows:Object.freeze(["M64 90 Q78 84 90 90","M110 90 Q122 84 136 90"]),mouth:"M86 138 Q100 152 114 138"}),proud:Object.freeze({label:"Proud",brows:Object.freeze(["M64 86 Q78 80 90 86","M110 86 Q122 80 136 86"]),mouth:"M88 138 Q104 150 112 138"}),playful:Object.freeze({label:"Playful",brows:Object.freeze(["M64 88 Q78 80 90 88","M110 88 Q122 80 136 88"]),mouth:"M84 138 Q100 158 116 138",eyes:"arc"}),curious:Object.freeze({label:"Curious",brows:Object.freeze(["M64 82 Q78 76 90 88","M110 88 Q122 76 136 82"]),mouth:"M94 142 Q100 148 106 142"}),steady:Object.freeze({label:"Steady",brows:Object.freeze(["M64 90 Q78 86 90 90","M110 90 Q122 86 136 90"]),mouth:"M90 141 Q100 145 110 141"}),delighted:Object.freeze({label:"Delighted",brows:Object.freeze(["M62 86 Q78 78 92 86","M108 86 Q122 78 138 86"]),mouth:"M82 136 Q100 160 118 136",eyes:"arc"}),reverent:Object.freeze({label:"Reverent",brows:Object.freeze(["M64 94 Q78 88 90 94","M110 94 Q122 88 136 94"]),mouth:"M90 140 Q100 144 110 140",eyes:"closed"}),weary:Object.freeze({label:"Weary",brows:Object.freeze(["M62 92 Q78 96 92 100","M108 100 Q122 96 138 92"]),mouth:"M88 146 Q100 142 112 146"})}),d=Object.freeze({core:Object.freeze(["neutral","attentive","focused","waiting","happy","sleepy","concerned"]),trusted:Object.freeze(["warm","proud"]),companion:Object.freeze(["playful","curious"]),confidant:Object.freeze(["steady","delighted"]),archivist:Object.freeze(["reverent","weary"])}),O=Object.freeze({arc:Object.freeze([Object.freeze({kind:"path",d:"M66 108 Q78 96 90 108",role:"ink"}),Object.freeze({kind:"path",d:"M110 108 Q122 96 134 108",role:"ink"})]),closed:Object.freeze([Object.freeze({kind:"path",d:"M66 106 H90",role:"ink"}),Object.freeze({kind:"path",d:"M110 106 H134",role:"ink"})])}),i=Object.freeze({hoodie:Object.freeze({label:"Hoodie",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M56 192 Q100 174 144 192 V262 H56 Z"}),Object.freeze({kind:"path",d:"M78 178 Q100 196 122 178 L134 190 Q100 212 66 190 Z",role:"clothShade"}),Object.freeze({kind:"path",d:"M74 214 H126 V240 H74 Z",role:"clothShade"}),Object.freeze({kind:"path",d:"M96 196 V214 M104 196 V214",role:"metal"})])}),tshirt:Object.freeze({label:"T-shirt",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M56 192 Q100 176 144 192 V262 H56 Z",role:"accent"}),Object.freeze({kind:"path",d:"M84 182 Q100 194 116 182 L120 188 Q100 200 80 188 Z",role:"clothShade"})])}),flannel:Object.freeze({label:"Flannel",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M56 192 Q100 176 144 192 V262 H56 Z"}),Object.freeze({kind:"path",d:"M70 196 V262 M88 194 V262 M112 194 V262 M130 196 V262",role:"clothShade"}),Object.freeze({kind:"path",d:"M56 214 H144 M56 236 H144",role:"accent"}),Object.freeze({kind:"path",d:"M84 182 L100 200 L116 182 L124 190 L100 214 L76 190 Z",role:"clothShade"})])}),jacket:Object.freeze({label:"Jacket",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M54 190 Q100 172 146 190 V262 H54 Z"}),Object.freeze({kind:"path",d:"M54 190 L100 214 L146 190 L146 200 L100 224 L54 200 Z",role:"clothShade"}),Object.freeze({kind:"path",d:"M100 214 V262",role:"metal"})])}),headphones:Object.freeze({label:"Headphones",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M46 96 Q46 30 100 30 Q154 30 154 96",role:"metal"}),Object.freeze({kind:"rect",x:34,y:88,width:22,height:34,rx:8}),Object.freeze({kind:"rect",x:144,y:88,width:22,height:34,rx:8}),Object.freeze({kind:"circle",cx:45,cy:105,r:6,role:"accent"}),Object.freeze({kind:"circle",cx:155,cy:105,r:6,role:"accent"})]),accessory:!0}),glasses:Object.freeze({label:"Glasses",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"rect",x:60,y:96,width:40,height:26,rx:8,role:"metal"}),Object.freeze({kind:"rect",x:100,y:96,width:40,height:26,rx:8,role:"metal"}),Object.freeze({kind:"path",d:"M100 106 H100 M60 104 L44 100 M140 104 L156 100",role:"metal"})]),accessory:!0}),scarf:Object.freeze({label:"Scarf",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M72 172 Q100 190 128 172 L134 190 Q100 208 66 190 Z",role:"accent"}),Object.freeze({kind:"path",d:"M112 190 L128 236 L112 240 L98 194 Z",role:"accent"})])}),apron:Object.freeze({label:"Apron",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M74 200 H126 V262 H74 Z",role:"clothShade"}),Object.freeze({kind:"path",d:"M80 190 L92 200 M120 190 L108 200",role:"metal"}),Object.freeze({kind:"path",d:"M80 228 H120",role:"accent"})])}),"seasonal-winter":Object.freeze({label:"Winter set",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M44 74 Q100 44 156 74 L156 88 Q100 60 44 88 Z",role:"accent"}),Object.freeze({kind:"circle",cx:100,cy:40,r:12,role:"accent"}),Object.freeze({kind:"path",d:"M72 172 Q100 190 128 172 L134 190 Q100 208 66 190 Z",role:"clothShade"})])}),"archive-coat":Object.freeze({label:"Archive coat",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M50 188 Q100 168 150 188 V262 H50 Z"}),Object.freeze({kind:"path",d:"M50 188 L100 216 L150 188 L150 200 L100 228 L50 200 Z",role:"clothShade"}),Object.freeze({kind:"path",d:"M56 222 H144 V234 H56 Z",role:"metal"}),Object.freeze({kind:"path",d:"M100 228 V262",role:"metal"})])})}),j=Object.freeze({frame:Object.freeze({A:"Round",B:"Square",C:"Oval"}),hair:Object.freeze(Object.fromEntries(Object.entries(a).map((([e,r])=>[e,r.label])))),eyes:Object.freeze(Object.fromEntries(Object.entries(l).map((([e,r])=>[e,r.label])))),outfit:Object.freeze(Object.fromEntries(Object.entries(i).map((([e,r])=>[e,r.label])))),palette:Object.freeze({amber:"Amber",slate:"Slate",moss:"Moss",plum:"Plum",mono:"Mono",sunset:"Sunset"}),expressionPack:Object.freeze({core:"Core",trusted:"Trusted",companion:"Companion",confidant:"Confidant",archivist:"Archivist"}),skin:Object.freeze({0:"Tone 1",1:"Tone 2",2:"Tone 3",3:"Tone 4",4:"Tone 5",5:"Tone 6"})}),z=e?e.PARTS:Object.freeze({});function h(){if(!e)throw new Error("avatar/parts.js: the shared persona module is not loaded");return e.defaultPersona()}const s=Object.freeze({LAYERS:r,IDS:z,SKIN_TONES:t,PALETTES:c,FRAMES:b,BODY:f,HAIR:a,EYES:l,FACE:n,EXPRESSIONS:o,EXPRESSION_PACKS:d,EYE_OVERRIDES:O,OUTFITS:i,LABELS:j,defaultPersona:h,motionFor:function(r,t){if(!e)return t?"minimal":"full";const c=r&&r.appearance?r:h();return e.appliesMotion(c,Boolean(t))},expressionsFor:function(e){const r=e&&e.expressions&&e.expressions.pack,t=d[r]||[],c=d.core.slice();for(const e of t)c.includes(e)||c.push(e);return c}});"undefined"!=typeof module&&module.exports?module.exports=s:"undefined"!=typeof globalThis&&(globalThis.AegisAvatarParts=s)}();
3
+ "use strict";!function(){const e=("undefined"!=typeof window&&window.AegisAvatarPersona?{persona:window.AegisAvatarPersona,events:window.AegisAvatarEvents}:"undefined"!=typeof module&&module.exports?{persona:require("../../lib/avatar/persona.js"),events:require("../../lib/avatar/events.js")}:{persona:null,events:null}).persona,r=Object.freeze(["shadow","hairBack","body","outfitUnder","head","face","hairFront","outfitOver","accessory","effect"]),t=Object.freeze(["#f7dcc9","#eec2a4","#dda57f","#c0835a","#8e5c3c","#5f3c28"]),c=Object.freeze({amber:Object.freeze({bg:"#241a12",ink:"#f6e6d2",accent:"#f0a83c",cloth:"#3d2c1e",clothShade:"#2a1d13",metal:"#c9a227"}),slate:Object.freeze({bg:"#14181f",ink:"#e6ecf5",accent:"#6fa8dc",cloth:"#26313f",clothShade:"#1a222c",metal:"#9fb3c8"}),moss:Object.freeze({bg:"#121a14",ink:"#e8f2e6",accent:"#7fbf7f",cloth:"#243329",clothShade:"#19241d",metal:"#a8bf8f"}),plum:Object.freeze({bg:"#1c1220",ink:"#f1e6f5",accent:"#b27ad6",cloth:"#33203d",clothShade:"#24162c",metal:"#d8b4e2"}),mono:Object.freeze({bg:"#131313",ink:"#f2f2f2",accent:"#bfbfbf",cloth:"#2b2b2b",clothShade:"#1d1d1d",metal:"#9a9a9a"}),sunset:Object.freeze({bg:"#2a1418",ink:"#ffeede",accent:"#ff7a59",cloth:"#472029",clothShade:"#311519",metal:"#ffb27a"})}),b=Object.freeze({A:Object.freeze({label:"Round",head:"M100 34 C133 34 153 58 153 93 C153 130 130 165 100 173 C70 165 47 130 47 93 C47 58 67 34 100 34 Z",ear:Object.freeze([Object.freeze({cx:47,cy:100,r:11}),Object.freeze({cx:153,cy:100,r:11})]),faceY:104}),B:Object.freeze({label:"Square",head:"M100 32 H141 Q155 32 155 62 V98 Q155 148 100 170 Q45 148 45 98 V62 Q45 32 59 32 Z",ear:Object.freeze([Object.freeze({cx:45,cy:98,r:10}),Object.freeze({cx:155,cy:98,r:10})]),faceY:102}),C:Object.freeze({label:"Oval",head:"M100 28 C129 28 147 52 147 90 C147 124 129 168 100 180 C71 168 53 124 53 90 C53 52 71 28 100 28 Z",ear:Object.freeze([Object.freeze({cx:53,cy:96,r:9}),Object.freeze({cx:147,cy:96,r:9})]),faceY:106})}),f=Object.freeze({neck:"M85 158 h30 v26 h-30 Z",shirt:"M58 190 Q100 176 142 190 V262 H58 Z",sleeveL:"M58 190 L38 226 L58 238 L74 206 Z",sleeveR:"M142 190 L162 226 L142 238 L126 206 Z"}),a=Object.freeze({"short-1":Object.freeze({label:"Short",back:Object.freeze([]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 28 C131 28 153 50 153 84 C144 62 124 54 100 54 C76 54 56 62 47 84 C47 50 69 28 100 28 Z"}),Object.freeze({kind:"path",d:"M62 62 Q86 46 108 56 Q88 60 74 74 Z"})])}),"bob-2":Object.freeze({label:"Bob",back:Object.freeze([Object.freeze({kind:"path",d:"M44 96 Q44 30 100 30 Q156 30 156 96 V150 Q140 146 138 118 V96 Q132 62 100 62 Q68 62 62 96 V118 Q60 146 44 150 Z"})]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 26 C133 26 156 52 156 90 Q140 60 100 60 Q60 60 44 90 C44 52 67 26 100 26 Z"}),Object.freeze({kind:"path",d:"M46 88 Q60 108 58 150 L44 150 Q42 110 46 88 Z"}),Object.freeze({kind:"path",d:"M154 88 Q140 108 142 150 L156 150 Q158 110 154 88 Z"})])}),"long-3":Object.freeze({label:"Long",back:Object.freeze([Object.freeze({kind:"path",d:"M40 100 Q40 28 100 28 Q160 28 160 100 V226 Q142 232 138 200 V104 Q132 60 100 60 Q68 60 62 104 V200 Q58 232 40 226 Z"})]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 26 C134 26 158 52 158 92 Q140 58 100 58 Q60 58 42 92 C42 52 66 26 100 26 Z"}),Object.freeze({kind:"path",d:"M52 88 Q64 120 62 170 L48 168 Q44 116 52 88 Z"}),Object.freeze({kind:"path",d:"M148 88 Q136 120 138 170 L152 168 Q156 116 148 88 Z"})])}),"curly-4":Object.freeze({label:"Curly",back:Object.freeze([Object.freeze({kind:"circle",cx:62,cy:66,r:26}),Object.freeze({kind:"circle",cx:100,cy:46,r:30}),Object.freeze({kind:"circle",cx:138,cy:66,r:26})]),front:Object.freeze([Object.freeze({kind:"circle",cx:76,cy:52,r:20}),Object.freeze({kind:"circle",cx:106,cy:44,r:22}),Object.freeze({kind:"circle",cx:134,cy:58,r:18})])}),"buzz-5":Object.freeze({label:"Buzz",back:Object.freeze([]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 30 C130 30 152 52 152 82 Q136 58 100 58 Q64 58 48 82 C48 52 70 30 100 30 Z"})])}),"ponytail-6":Object.freeze({label:"Ponytail",back:Object.freeze([Object.freeze({kind:"path",d:"M146 74 Q186 96 178 148 Q170 190 150 196 Q166 156 158 122 Q150 92 138 82 Z"})]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 28 C132 28 154 50 154 86 Q140 58 100 58 Q60 58 46 86 C46 50 68 28 100 28 Z"})])}),"braids-7":Object.freeze({label:"Braids",back:Object.freeze([Object.freeze({kind:"path",d:"M52 92 Q44 150 48 196 L70 196 Q60 150 64 100 Z"}),Object.freeze({kind:"path",d:"M148 92 Q156 150 152 196 L130 196 Q140 150 136 100 Z"})]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 28 C132 28 154 50 154 86 Q140 58 100 58 Q60 58 46 86 C46 50 68 28 100 28 Z"})]),detail:Object.freeze([Object.freeze({kind:"path",d:"M50 132 H70 M50 160 H70 M130 132 H150 M130 160 H150",stroke:!0,role:"hairShade"})])}),"wavy-8":Object.freeze({label:"Wavy",back:Object.freeze([Object.freeze({kind:"path",d:"M42 96 Q42 30 100 30 Q158 30 158 96 Q150 130 156 168 Q146 158 142 132 Q140 96 132 70 Q118 58 100 58 Q82 58 68 70 Q60 96 58 132 Q54 158 44 168 Q50 130 42 96 Z"})]),front:Object.freeze([Object.freeze({kind:"path",d:"M100 26 C134 26 158 54 156 94 Q146 62 116 58 Q96 56 84 66 Q66 74 44 94 C42 54 66 26 100 26 Z"})])})}),l=Object.freeze({soft:Object.freeze({label:"Soft",left:Object.freeze([Object.freeze({kind:"ellipse",cx:78,cy:106,rx:12,ry:9}),Object.freeze({kind:"circle",cx:78,cy:106,r:5,role:"ink"}),Object.freeze({kind:"circle",cx:80,cy:103,r:2,role:"highlight"})]),right:Object.freeze([Object.freeze({kind:"ellipse",cx:122,cy:106,rx:12,ry:9}),Object.freeze({kind:"circle",cx:122,cy:106,r:5,role:"ink"}),Object.freeze({kind:"circle",cx:124,cy:103,r:2,role:"highlight"})])}),sharp:Object.freeze({label:"Sharp",left:Object.freeze([Object.freeze({kind:"path",d:"M66 106 Q78 94 90 106 Q78 112 66 106 Z"}),Object.freeze({kind:"circle",cx:79,cy:104,r:4,role:"ink"})]),right:Object.freeze([Object.freeze({kind:"path",d:"M110 106 Q122 94 134 106 Q122 112 110 106 Z"}),Object.freeze({kind:"circle",cx:121,cy:104,r:4,role:"ink"})])}),sleepy:Object.freeze({label:"Sleepy",left:Object.freeze([Object.freeze({kind:"path",d:"M66 106 Q78 112 90 106",stroke:!0}),Object.freeze({kind:"circle",cx:78,cy:109,r:3,role:"ink"})]),right:Object.freeze([Object.freeze({kind:"path",d:"M110 106 Q122 112 134 106",stroke:!0}),Object.freeze({kind:"circle",cx:122,cy:109,r:3,role:"ink"})])}),bright:Object.freeze({label:"Bright",left:Object.freeze([Object.freeze({kind:"circle",cx:78,cy:105,r:12}),Object.freeze({kind:"circle",cx:78,cy:105,r:6,role:"ink"}),Object.freeze({kind:"circle",cx:82,cy:100,r:3,role:"highlight"})]),right:Object.freeze([Object.freeze({kind:"circle",cx:122,cy:105,r:12}),Object.freeze({kind:"circle",cx:122,cy:105,r:6,role:"ink"}),Object.freeze({kind:"circle",cx:126,cy:100,r:3,role:"highlight"})])})}),n=Object.freeze({nose:Object.freeze([Object.freeze({kind:"path",d:"M100 116 Q104 124 98 128",stroke:!0})])}),o=Object.freeze({neutral:Object.freeze({label:"Neutral",brows:Object.freeze(["M64 92 Q78 86 90 92","M110 92 Q122 86 136 92"]),mouth:"M88 140 Q100 146 112 140"}),attentive:Object.freeze({label:"Attentive",brows:Object.freeze(["M64 88 Q78 80 90 88","M110 88 Q122 80 136 88"]),mouth:"M88 140 Q100 148 112 140"}),focused:Object.freeze({label:"Focused",brows:Object.freeze(["M64 90 Q78 84 90 96","M110 96 Q122 84 136 90"]),mouth:"M88 142 H112"}),waiting:Object.freeze({label:"Waiting",brows:Object.freeze(["M62 86 Q78 78 92 84","M108 84 Q122 78 138 86"]),mouth:"M90 142 Q100 138 110 142"}),happy:Object.freeze({label:"Happy",brows:Object.freeze(["M64 88 Q78 82 90 88","M110 88 Q122 82 136 88"]),mouth:"M84 138 Q100 156 116 138",eyes:"arc"}),sleepy:Object.freeze({label:"Sleepy",brows:Object.freeze(["M64 94 Q78 90 90 94","M110 94 Q122 90 136 94"]),mouth:"M92 144 Q100 150 108 144",eyes:"closed"}),concerned:Object.freeze({label:"Concerned",brows:Object.freeze(["M62 84 Q78 92 92 98","M108 98 Q122 92 138 84"]),mouth:"M88 146 Q100 138 112 146"}),warm:Object.freeze({label:"Warm",brows:Object.freeze(["M64 90 Q78 84 90 90","M110 90 Q122 84 136 90"]),mouth:"M86 138 Q100 152 114 138"}),proud:Object.freeze({label:"Proud",brows:Object.freeze(["M64 86 Q78 80 90 86","M110 86 Q122 80 136 86"]),mouth:"M88 138 Q104 150 112 138"}),playful:Object.freeze({label:"Playful",brows:Object.freeze(["M64 88 Q78 80 90 88","M110 88 Q122 80 136 88"]),mouth:"M84 138 Q100 158 116 138",eyes:"arc"}),curious:Object.freeze({label:"Curious",brows:Object.freeze(["M64 82 Q78 76 90 88","M110 88 Q122 76 136 82"]),mouth:"M94 142 Q100 148 106 142"}),steady:Object.freeze({label:"Steady",brows:Object.freeze(["M64 90 Q78 86 90 90","M110 90 Q122 86 136 90"]),mouth:"M90 141 Q100 145 110 141"}),delighted:Object.freeze({label:"Delighted",brows:Object.freeze(["M62 86 Q78 78 92 86","M108 86 Q122 78 138 86"]),mouth:"M82 136 Q100 160 118 136",eyes:"arc"}),reverent:Object.freeze({label:"Reverent",brows:Object.freeze(["M64 94 Q78 88 90 94","M110 94 Q122 88 136 94"]),mouth:"M90 140 Q100 144 110 140",eyes:"closed"}),weary:Object.freeze({label:"Weary",brows:Object.freeze(["M62 92 Q78 96 92 100","M108 100 Q122 96 138 92"]),mouth:"M88 146 Q100 142 112 146"})}),d=Object.freeze({core:Object.freeze(["neutral","attentive","focused","waiting","happy","sleepy","concerned"]),trusted:Object.freeze(["warm","proud"]),companion:Object.freeze(["playful","curious"]),confidant:Object.freeze(["steady","delighted"]),archivist:Object.freeze(["reverent","weary"])}),O=Object.freeze({arc:Object.freeze([Object.freeze({kind:"path",d:"M66 108 Q78 96 90 108",role:"ink"}),Object.freeze({kind:"path",d:"M110 108 Q122 96 134 108",role:"ink"})]),closed:Object.freeze([Object.freeze({kind:"path",d:"M66 106 H90",role:"ink"}),Object.freeze({kind:"path",d:"M110 106 H134",role:"ink"})])}),i=Object.freeze({hoodie:Object.freeze({label:"Hoodie",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M56 192 Q100 174 144 192 V262 H56 Z"}),Object.freeze({kind:"path",d:"M78 178 Q100 196 122 178 L134 190 Q100 212 66 190 Z",role:"clothShade"}),Object.freeze({kind:"path",d:"M74 214 H126 V240 H74 Z",role:"clothShade"}),Object.freeze({kind:"path",d:"M96 196 V214 M104 196 V214",role:"metal"})])}),tshirt:Object.freeze({label:"T-shirt",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M56 192 Q100 176 144 192 V262 H56 Z",role:"accent"}),Object.freeze({kind:"path",d:"M84 182 Q100 194 116 182 L120 188 Q100 200 80 188 Z",role:"clothShade"})])}),flannel:Object.freeze({label:"Flannel",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M56 192 Q100 176 144 192 V262 H56 Z"}),Object.freeze({kind:"path",d:"M70 196 V262 M88 194 V262 M112 194 V262 M130 196 V262",role:"clothShade"}),Object.freeze({kind:"path",d:"M56 214 H144 M56 236 H144",role:"accent"}),Object.freeze({kind:"path",d:"M84 182 L100 200 L116 182 L124 190 L100 214 L76 190 Z",role:"clothShade"})])}),jacket:Object.freeze({label:"Jacket",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M54 190 Q100 172 146 190 V262 H54 Z"}),Object.freeze({kind:"path",d:"M54 190 L100 214 L146 190 L146 200 L100 224 L54 200 Z",role:"clothShade"}),Object.freeze({kind:"path",d:"M100 214 V262",role:"metal"})])}),headphones:Object.freeze({label:"Headphones",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M46 96 Q46 30 100 30 Q154 30 154 96",role:"metal"}),Object.freeze({kind:"rect",x:34,y:88,width:22,height:34,rx:8}),Object.freeze({kind:"rect",x:144,y:88,width:22,height:34,rx:8}),Object.freeze({kind:"circle",cx:45,cy:105,r:6,role:"accent"}),Object.freeze({kind:"circle",cx:155,cy:105,r:6,role:"accent"})]),accessory:!0}),glasses:Object.freeze({label:"Glasses",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"rect",x:60,y:96,width:40,height:26,rx:8,role:"metal"}),Object.freeze({kind:"rect",x:100,y:96,width:40,height:26,rx:8,role:"metal"}),Object.freeze({kind:"path",d:"M100 106 H100 M60 104 L44 100 M140 104 L156 100",role:"metal"})]),accessory:!0}),scarf:Object.freeze({label:"Scarf",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M72 172 Q100 190 128 172 L134 190 Q100 208 66 190 Z",role:"accent"}),Object.freeze({kind:"path",d:"M112 190 L128 236 L112 240 L98 194 Z",role:"accent"})])}),apron:Object.freeze({label:"Apron",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M74 200 H126 V262 H74 Z",role:"clothShade"}),Object.freeze({kind:"path",d:"M80 190 L92 200 M120 190 L108 200",role:"metal"}),Object.freeze({kind:"path",d:"M80 228 H120",role:"accent"})])}),"seasonal-winter":Object.freeze({label:"Winter set",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M44 74 Q100 44 156 74 L156 88 Q100 60 44 88 Z",role:"accent"}),Object.freeze({kind:"circle",cx:100,cy:40,r:12,role:"accent"}),Object.freeze({kind:"path",d:"M72 172 Q100 190 128 172 L134 190 Q100 208 66 190 Z",role:"clothShade"})])}),"archive-coat":Object.freeze({label:"Archive coat",under:Object.freeze([]),over:Object.freeze([Object.freeze({kind:"path",d:"M50 188 Q100 168 150 188 V262 H50 Z"}),Object.freeze({kind:"path",d:"M50 188 L100 216 L150 188 L150 200 L100 228 L50 200 Z",role:"clothShade"}),Object.freeze({kind:"path",d:"M56 222 H144 V234 H56 Z",role:"metal"}),Object.freeze({kind:"path",d:"M100 228 V262",role:"metal"})])})}),j=Object.freeze({frame:Object.freeze({A:"Round",B:"Square",C:"Oval"}),hair:Object.freeze(Object.fromEntries(Object.entries(a).map(([e,r])=>[e,r.label]))),eyes:Object.freeze(Object.fromEntries(Object.entries(l).map(([e,r])=>[e,r.label]))),outfit:Object.freeze(Object.fromEntries(Object.entries(i).map(([e,r])=>[e,r.label]))),palette:Object.freeze({amber:"Amber",slate:"Slate",moss:"Moss",plum:"Plum",mono:"Mono",sunset:"Sunset"}),expressionPack:Object.freeze({core:"Core",trusted:"Trusted",companion:"Companion",confidant:"Confidant",archivist:"Archivist"}),skin:Object.freeze({0:"Tone 1",1:"Tone 2",2:"Tone 3",3:"Tone 4",4:"Tone 5",5:"Tone 6"})}),z=e?e.PARTS:Object.freeze({});function h(){if(!e)throw new Error("avatar/parts.js: the shared persona module is not loaded");return e.defaultPersona()}const s=Object.freeze({LAYERS:r,IDS:z,SKIN_TONES:t,PALETTES:c,FRAMES:b,BODY:f,HAIR:a,EYES:l,FACE:n,EXPRESSIONS:o,EXPRESSION_PACKS:d,EYE_OVERRIDES:O,OUTFITS:i,LABELS:j,defaultPersona:h,motionFor:function(r,t){if(!e)return t?"minimal":"full";const c=r&&r.appearance?r:h();return e.appliesMotion(c,Boolean(t))},expressionsFor:function(e){const r=e&&e.expressions&&e.expressions.pack,t=d[r]||[],c=d.core.slice();for(const e of t)c.includes(e)||c.push(e);return c}});"undefined"!=typeof module&&module.exports?module.exports=s:"undefined"!=typeof globalThis&&(globalThis.AegisAvatarParts=s)}();
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";const COMMANDS=[{id:"new-chat",label:"New chat",hint:"Start a fresh conversation",keywords:"new chat conversation thread start clear",action:"newChat"},{id:"search",label:"Search conversations and memory",hint:"One sheet over both stores",keywords:"search find filter sessions memory history lookup",action:"search"},{id:"find",label:"Find in this conversation",hint:"⌘F — scoped to what is on screen",keywords:"find search transcript message match text within conversation locate",action:"find"},{id:"go-back",label:"Go back",hint:"Alt+← — return to the previous place",keywords:"back previous history navigate return undo go",action:"go-back"},{id:"go-forward",label:"Go forward",hint:"Alt+→ — return to where you came from",keywords:"forward next history navigate return redo go",action:"go-forward"},{id:"settings",label:"Settings",hint:"Providers, approvals, the key, customizations",keywords:"settings preferences options config configure providers approvals rules sandbox",action:"settings"},{id:"customizations",label:"Customizations",hint:"Tool approvals, plan mode, the companion",keywords:"customize customization persona appearance companion avatar theme identity approvals plan",action:"customizations"},{id:"automations",label:"Automations",hint:"The autonomous queue and its cadence",keywords:"automations queue autonomous background schedule cadence fanout effort",action:"automations"},{id:"cli",label:"Open aegis in a terminal",hint:"The terminal face of this install",keywords:"cli terminal shell console tui aegiscode one",action:"cli",when:"cliFace"},{id:"import",label:"Import session",hint:"Scan other AI tools for sessions and memory",keywords:"import migrate foreign sessions memory other tools bring",action:"import"},{id:"export-markdown",label:"Save as…",hint:"The current session as Markdown",keywords:"save export markdown md download file current session",action:"exportMarkdown"},{id:"export-json",label:"Export session…",hint:"The current session as a round-trippable record",keywords:"export json record backup raw session",action:"exportJson"},{id:"memory",label:"Memory inspector",hint:"What this install remembers about you",keywords:"memory inspector stored facts recall profile what do you know",action:"memory"},{id:"fingerprint",label:"Authorship panel",hint:"How this session was written",keywords:"authorship fingerprint provenance panel contribute",action:"fingerprint"},{id:"shortcuts",label:"Keyboard shortcuts",hint:"Every chord this build answers, and where each one lives",keywords:"keys shortcuts keyboard chords help bindings hotkeys accelerators",action:"shortcuts"},{id:"api-keys",label:"AEGIS key & BYOK key",hint:"Which keys this install has, and how to add the missing one",keywords:"keys api key byok provider account connect set up onboarding",action:"keys"},{id:"credits",label:"Credits & licence",hint:"Vendored code, fonts and the AGPL notice",keywords:"credits licence license agpl about legal notice fonts vendored",action:"credits"},{id:"toggle-sidebar",label:"Toggle sidebar",hint:"Hide or show the left rail",keywords:"sidebar rail hide show collapse expand toggle panel",action:"toggleSidebar"}];function availableCommands(e,o){const t=o||{};return e.filter((e=>!e.when||Boolean(t[e.when])))}!function(){const e={COMMANDS:COMMANDS,availableCommands:availableCommands};"undefined"!=typeof module&&module.exports&&(module.exports=e),globalThis.AegisCommands=e}();
3
+ "use strict";const COMMANDS=[{id:"new-chat",label:"New chat",hint:"Start a fresh conversation",keywords:"new chat conversation thread start clear",action:"newChat"},{id:"search",label:"Search conversations and memory",hint:"One sheet over both stores",keywords:"search find filter sessions memory history lookup",action:"search"},{id:"find",label:"Find in this conversation",hint:"⌘F — scoped to what is on screen",keywords:"find search transcript message match text within conversation locate",action:"find"},{id:"go-back",label:"Go back",hint:"Alt+← — return to the previous place",keywords:"back previous history navigate return undo go",action:"go-back"},{id:"go-forward",label:"Go forward",hint:"Alt+→ — return to where you came from",keywords:"forward next history navigate return redo go",action:"go-forward"},{id:"settings",label:"Settings",hint:"Providers, approvals, the key, customizations",keywords:"settings preferences options config configure providers approvals rules sandbox",action:"settings"},{id:"customizations",label:"Customizations",hint:"Tool approvals, plan mode, the companion",keywords:"customize customization persona appearance companion avatar theme identity approvals plan",action:"customizations"},{id:"automations",label:"Automations",hint:"The autonomous queue and its cadence",keywords:"automations queue autonomous background schedule cadence fanout effort",action:"automations"},{id:"cli",label:"Open aegis in a terminal",hint:"The terminal face of this install",keywords:"cli terminal shell console tui aegiscode one",action:"cli",when:"cliFace"},{id:"import",label:"Import session",hint:"Scan other AI tools for sessions and memory",keywords:"import migrate foreign sessions memory other tools bring",action:"import"},{id:"export-markdown",label:"Save as…",hint:"The current session as Markdown",keywords:"save export markdown md download file current session",action:"exportMarkdown"},{id:"export-json",label:"Export session…",hint:"The current session as a round-trippable record",keywords:"export json record backup raw session",action:"exportJson"},{id:"memory",label:"Memory inspector",hint:"What this install remembers about you",keywords:"memory inspector stored facts recall profile what do you know",action:"memory"},{id:"fingerprint",label:"Authorship panel",hint:"How this session was written",keywords:"authorship fingerprint provenance panel contribute",action:"fingerprint"},{id:"shortcuts",label:"Keyboard shortcuts",hint:"Every chord this build answers, and where each one lives",keywords:"keys shortcuts keyboard chords help bindings hotkeys accelerators",action:"shortcuts"},{id:"api-keys",label:"AEGIS key & BYOK key",hint:"Which keys this install has, and how to add the missing one",keywords:"keys api key byok provider account connect set up onboarding",action:"keys"},{id:"credits",label:"Credits & licence",hint:"Vendored code, fonts and the AGPL notice",keywords:"credits licence license agpl about legal notice fonts vendored",action:"credits"},{id:"toggle-sidebar",label:"Toggle sidebar",hint:"Hide or show the left rail",keywords:"sidebar rail hide show collapse expand toggle panel",action:"toggleSidebar"}];function availableCommands(e,o){const t=o||{};return e.filter(e=>!e.when||Boolean(t[e.when]))}!function(){const e={COMMANDS:COMMANDS,availableCommands:availableCommands};"undefined"!=typeof module&&module.exports&&(module.exports=e),globalThis.AegisCommands=e}();
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";function dayKey(e){const t=e instanceof Date?e:new Date(null==e?Date.now():e);if(Number.isNaN(t.getTime()))return"";const n=e=>String(e).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`}function daysBetween(e,t){const n=e instanceof Date?e.getTime():Number(e),o=t instanceof Date?t.getTime():Number(t);if(!Number.isFinite(n)||!Number.isFinite(o))return null;const s=new Date(n);s.setHours(0,0,0,0);const i=new Date(o);return i.setHours(0,0,0,0),Math.round((i.getTime()-s.getTime())/864e5)}function hash(e){let t=2166136261;const n=String(e);for(let e=0;e<n.length;e+=1)t^=n.charCodeAt(e),t=Math.imul(t,16777619);return t>>>0}const TIPS=Object.freeze([{id:"effort",text:"Effort sizes the call — low for quick edits, high when the answer has to be complete."},{id:"tools",text:'Turn on "confirm before running tools" in Tool approvals to see every command before it runs.'},{id:"quick",text:"The Quick Launcher shortcut opens a prompt from anywhere — no need to switch windows."},{id:"sessions",text:"Sessions → Export writes the thread out as a file you keep, not something held in the app."},{id:"queue",text:"Queued tasks run on their own class — they can stay on Aegis Cloud while you work locally."},{id:"memory",text:"Memory entries are yours: the inspector shows the source and tags for every one."},{id:"local",text:"Local model needs no key and no network — useful for anything you would rather not send anywhere."}]);function pickMessage(e,t){const n=e&&"object"==typeof e?e:{},o=dayKey(t),s=(e,t,s,i)=>({id:e,kind:t,text:s,day:o,usedFacts:i.filter((e=>void 0!==n[e]&&null!==n[e]))});if("string"==typeof n.updatePending&&n.updatePending)return s("update-ready","action",`Update ${n.updatePending} is downloaded — restart when it suits you, it installs on quit.`,["updatePending"]);if(!1===n.keyConfigured)return s("connect","action","Paste your AEGIS API key in Status to run turns on Aegis Cloud — or pick Local model below for no key at all.",["keyConfigured"]);if(!0===n.providerNeedsKey)return s("provider-key","action","Your provider class has models listed but no key saved — add one in Provider settings to use them.",["providerNeedsKey"]);if("number"==typeof n.queuePending&&n.queuePending>0)return s("queue","action",`${n.queuePending} queued task${1===n.queuePending?"":"s"} still waiting — the queue card runs ${1===n.queuePending?"it":"them"} on its own class.`,["queuePending"]);if("number"==typeof n.memoryCount&&n.memoryCount>0)return s("memory-held","action",`${n.memoryCount} memory entr${1===n.memoryCount?"y is":"ies are"} already saved here — the inspector shows the source and tags for every one.`,["memoryCount"]);if(0===daysBetween(n.firstSeenAt,t)&&null==n.lastTurnAt)return s("first-day","tip","First day. Pick a class and a model in the Model card, then send a turn — everything else here is optional.",["firstSeenAt","lastTurnAt"]);const i=daysBetween(n.lastTurnAt,t);if(null!=i&&i>=3)return s("returning","tip","Last turn was a few days ago — your sessions and queued tasks are still here.",["lastTurnAt"]);const r=TIPS[hash(o)%TIPS.length];return s(`tip-${r.id}`,"tip",r.text,["tipRotation"])}function dismissedToday(e,t){const n=e&&"object"==typeof e?e:null;return!!n&&n.day===dayKey(t)}"undefined"!=typeof module&&module.exports&&(module.exports={pickMessage:pickMessage,dayKey:dayKey,daysBetween:daysBetween,dismissedToday:dismissedToday,TIPS:TIPS}),"undefined"!=typeof window&&((window.aegisCompanion=window.aegisCompanion||{}).pickMessage=pickMessage,window.aegisCompanion.dayKey=dayKey,window.aegisCompanion.daysBetween=daysBetween,window.aegisCompanion.dismissedToday=dismissedToday,window.aegisCompanion.TIPS=TIPS);
3
+ "use strict";function dayKey(e){const t=e instanceof Date?e:new Date(null==e?Date.now():e);if(Number.isNaN(t.getTime()))return"";const n=e=>String(e).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`}function daysBetween(e,t){const n=e instanceof Date?e.getTime():Number(e),o=t instanceof Date?t.getTime():Number(t);if(!Number.isFinite(n)||!Number.isFinite(o))return null;const s=new Date(n);s.setHours(0,0,0,0);const i=new Date(o);return i.setHours(0,0,0,0),Math.round((i.getTime()-s.getTime())/864e5)}function hash(e){let t=2166136261;const n=String(e);for(let e=0;e<n.length;e+=1)t^=n.charCodeAt(e),t=Math.imul(t,16777619);return t>>>0}const TIPS=Object.freeze([{id:"effort",text:"Effort sizes the call — low for quick edits, high when the answer has to be complete."},{id:"tools",text:'Turn on "confirm before running tools" in Tool approvals to see every command before it runs.'},{id:"quick",text:"The Quick Launcher shortcut opens a prompt from anywhere — no need to switch windows."},{id:"sessions",text:"Sessions → Export writes the thread out as a file you keep, not something held in the app."},{id:"queue",text:"Queued tasks run on their own class — they can stay on Aegis Cloud while you work locally."},{id:"memory",text:"Memory entries are yours: the inspector shows the source and tags for every one."},{id:"local",text:"Local model needs no key and no network — useful for anything you would rather not send anywhere."}]);function pickMessage(e,t){const n=e&&"object"==typeof e?e:{},o=dayKey(t),s=(e,t,s,i)=>({id:e,kind:t,text:s,day:o,usedFacts:i.filter(e=>void 0!==n[e]&&null!==n[e])});if("string"==typeof n.updatePending&&n.updatePending)return s("update-ready","action",`Update ${n.updatePending} is downloaded — restart when it suits you, it installs on quit.`,["updatePending"]);if(!1===n.keyConfigured)return s("connect","action","Paste your AEGIS API key in Status to run turns on Aegis Cloud — or pick Local model below for no key at all.",["keyConfigured"]);if(!0===n.providerNeedsKey)return s("provider-key","action","Your provider class has models listed but no key saved — add one in Provider settings to use them.",["providerNeedsKey"]);if("number"==typeof n.queuePending&&n.queuePending>0)return s("queue","action",`${n.queuePending} queued task${1===n.queuePending?"":"s"} still waiting — the queue card runs ${1===n.queuePending?"it":"them"} on its own class.`,["queuePending"]);if("number"==typeof n.memoryCount&&n.memoryCount>0)return s("memory-held","action",`${n.memoryCount} memory entr${1===n.memoryCount?"y is":"ies are"} already saved here — the inspector shows the source and tags for every one.`,["memoryCount"]);if(0===daysBetween(n.firstSeenAt,t)&&null==n.lastTurnAt)return s("first-day","tip","First day. Pick a class and a model in the Model card, then send a turn — everything else here is optional.",["firstSeenAt","lastTurnAt"]);const i=daysBetween(n.lastTurnAt,t);if(null!=i&&i>=3)return s("returning","tip","Last turn was a few days ago — your sessions and queued tasks are still here.",["lastTurnAt"]);const r=TIPS[hash(o)%TIPS.length];return s(`tip-${r.id}`,"tip",r.text,["tipRotation"])}function dismissedToday(e,t){const n=e&&"object"==typeof e?e:null;return!!n&&n.day===dayKey(t)}"undefined"!=typeof module&&module.exports&&(module.exports={pickMessage:pickMessage,dayKey:dayKey,daysBetween:daysBetween,dismissedToday:dismissedToday,TIPS:TIPS}),"undefined"!=typeof window&&((window.aegisCompanion=window.aegisCompanion||{}).pickMessage=pickMessage,window.aegisCompanion.dayKey=dayKey,window.aegisCompanion.daysBetween=daysBetween,window.aegisCompanion.dismissedToday=dismissedToday,window.aegisCompanion.TIPS=TIPS);
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";const TRIGGERS=new Set(["/","@"]);function activeTrigger(e,t){if("string"!=typeof e||!e)return null;const r=Number.isInteger(t)?t:e.length;if(r<0||r>e.length)return null;let s=r-1;for(;s>=0&&!/\s/.test(e[s]);)s-=1;const n=s+1;if(n>=r)return null;const o=e[n];if(!TRIGGERS.has(o))return null;const i=e.slice(n+1,r);return i.includes("/")||i.includes("@")?null:{kind:"/"===o?"slash":"mention",query:i,start:n,end:r}}function rankRows(e,t){const r=Array.isArray(e)?e.filter(Boolean):[],s="string"==typeof t?t.trim().toLowerCase().replace(/^[/@]/,""):"";if(!s)return r.slice();const n=[];for(let e=0;e<r.length;e+=1){const t=r[e],i=(o=t.label,String(o||"").toLowerCase().replace(/^[/@]/,"")),l=String(t.keywords||"").toLowerCase();let u=0;i.startsWith(s)?u=100:i.split(/\s+/).some((e=>e.startsWith(s)))?u=80:i.includes(s)?u=60:l.split(/\s+/).some((e=>e.startsWith(s)))?u=40:l.includes(s)&&(u=20),u>0&&n.push({row:t,score:u,i:e})}var o;return n.sort(((e,t)=>t.score-e.score||e.i-t.i)),n.map((e=>e.row))}function stepRow(e,t,r){const s=Number.isInteger(e)&&e>0?e:0;if(!s)return-1;const n=Number.isInteger(t)?t:-1;if(n<0)return r>0?0:s-1;const o=n+(Number.isInteger(r)?r:0);return o<0?s-1:o>=s?0:o}!function(){const e={activeTrigger:activeTrigger,rankRows:rankRows,stepRow:stepRow};"undefined"!=typeof module&&module.exports&&(module.exports=e),globalThis.AegisComposerTriggers=e}();
3
+ "use strict";const TRIGGERS=new Set(["/","@"]);function activeTrigger(e,t){if("string"!=typeof e||!e)return null;const r=Number.isInteger(t)?t:e.length;if(r<0||r>e.length)return null;let s=r-1;for(;s>=0&&!/\s/.test(e[s]);)s-=1;const n=s+1;if(n>=r)return null;const o=e[n];if(!TRIGGERS.has(o))return null;const i=e.slice(n+1,r);return i.includes("/")||i.includes("@")?null:{kind:"/"===o?"slash":"mention",query:i,start:n,end:r}}function rankRows(e,t){const r=Array.isArray(e)?e.filter(Boolean):[],s="string"==typeof t?t.trim().toLowerCase().replace(/^[/@]/,""):"";if(!s)return r.slice();const n=e=>String(e||"").toLowerCase().replace(/^[/@]/,""),o=[];for(let e=0;e<r.length;e+=1){const t=r[e],i=n(t.label),l=String(t.keywords||"").toLowerCase();let u=0;i.startsWith(s)?u=100:i.split(/\s+/).some(e=>e.startsWith(s))?u=80:i.includes(s)?u=60:l.split(/\s+/).some(e=>e.startsWith(s))?u=40:l.includes(s)&&(u=20),u>0&&o.push({row:t,score:u,i:e})}return o.sort((e,t)=>t.score-e.score||e.i-t.i),o.map(e=>e.row)}function stepRow(e,t,r){const s=Number.isInteger(e)&&e>0?e:0;if(!s)return-1;const n=Number.isInteger(t)?t:-1;if(n<0)return r>0?0:s-1;const o=n+(Number.isInteger(r)?r:0);return o<0?s-1:o>=s?0:o}!function(){const e={activeTrigger:activeTrigger,rankRows:rankRows,stepRow:stepRow};"undefined"!=typeof module&&module.exports&&(module.exports=e),globalThis.AegisComposerTriggers=e}();
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";!function(){var e=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/mp4"],t={status:null,recorder:null,stream:null,chunks:[],timer:null,startedAt:0,phase:"idle"};function n(){if(t.timer&&(clearTimeout(t.timer),t.timer=null),t.stream){try{t.stream.getTracks().forEach((function(e){e.stop()}))}catch(e){}t.stream=null}t.recorder=null,t.chunks=[]}function r(e){t.phase=e;var n=document.getElementById("dictate-toggle"),r=document.getElementById("dictate-label");if(n){var i="recording"===e,a="transcribing"===e;n.classList.toggle("is-recording",i),n.setAttribute("aria-pressed",i?"true":"false"),n.disabled=a,r&&(r.textContent=i?"stop":a?"transcribing…":"dictate"),n.title=i?"Stop recording and transcribe.":a?"Transcribing locally…":"Dictate a message — transcribed locally, then inserted into the composer."}}function i(e,t){var n=document.getElementById("dictate-hint");n&&(n.textContent=e||"",n.dataset.kind=t||"",n.hidden=!e)}function a(){var e=document.getElementById("dictate-toggle");if(e){var n=t.status||{},i=Boolean(n.enabled);e.hidden=!i,i||("recording"===t.phase&&s(),r("idle"))}}function o(){if("idle"!==t.phase)return Promise.resolve(!1);if("undefined"==typeof navigator||!navigator.mediaDevices||"function"!=typeof navigator.mediaDevices.getUserMedia||"function"!=typeof window.MediaRecorder)return i("this build cannot record audio — MediaRecorder is unavailable","error"),Promise.resolve(!1);var a=t.status&&t.status.maxSeconds||60,o=function(){for(var t=0;t<e.length;t+=1){var n=e[t];try{if(window.MediaRecorder.isTypeSupported(n))return{mime:n,ext:-1!==n.indexOf("ogg")?"ogg":-1!==n.indexOf("mp4")?"m4a":"webm"}}catch(e){}}return{mime:"",ext:"webm"}}();return navigator.mediaDevices.getUserMedia({audio:!0}).then((function(e){var n;t.stream=e,t.chunks=[];try{n=new window.MediaRecorder(e,o.mime?{mimeType:o.mime}:void 0)}catch(t){n=new window.MediaRecorder(e)}return t.recorder=n,t.ext=o.ext,n.ondataavailable=function(e){e&&e.data&&e.data.size&&t.chunks.push(e.data)},n.start(),t.startedAt=Date.now(),i("",""),r("recording"),t.timer=setTimeout((function(){"recording"===t.phase&&(i("reached the "+a+"s limit — transcribing what was recorded","info"),s())}),1e3*a),!0})).catch((function(e){n();var t=e&&e.name?String(e.name):"";return i("NotAllowedError"===t?"microphone permission was denied — allow it in your system settings":"NotFoundError"===t?"no microphone was found on this machine":"could not start recording: "+(e&&e.message||"unknown error"),"error"),r("idle"),!1}))}function s(){var e=t.recorder;return e&&"recording"===t.phase?new Promise((function(t){e.onstop=function(){t()};try{e.stop()}catch(e){t()}})).then((function(){Math.max(1,Math.round((Date.now()-t.startedAt)/1e3));var e=t.chunks.slice(),a=t.ext||"webm";if(n(),!e.length)return i("nothing was recorded","error"),r("idle"),!1;var o=new Blob(e,{type:e[0].type||"audio/webm"});return r("transcribing"),i("transcribing locally…","info"),o.arrayBuffer().then((function(e){return window.aegis.speechTranscribe({audio:e,ext:a})})).then((function(e){return r("idle"),e&&e.ok?(function(e){var t=document.getElementById("prompt");if(t){var n="number"==typeof t.selectionStart?t.selectionStart:t.value.length,r="number"==typeof t.selectionEnd?t.selectionEnd:t.value.length,i=t.value.slice(0,n),a=t.value.slice(r),o=i&&!/\s$/.test(i),s=i+(o?" ":"")+e+a;t.value=s;var c=(i+(o?" ":"")+e).length;try{t.setSelectionRange(c,c),t.focus()}catch(e){}t.dispatchEvent(new Event("input",{bubbles:!0}))}}(e.text),i("",""),!0):(i(e&&e.reason||"transcription failed","error"),!1)}))})).catch((function(e){return n(),r("idle"),i(e&&e.message||"transcription failed","error"),!1})):(n(),r("idle"),Promise.resolve(!1))}window.aegisDictation={refresh:function(){return window.aegis&&"function"==typeof window.aegis.speechStatus?window.aegis.speechStatus().then((function(e){return t.status=e||{enabled:!1,reason:"dictation is not available"},a(),t.status})).catch((function(e){return t.status={enabled:!1,reason:e&&e.message||"could not read dictation status"},a(),t.status})):(t.status={enabled:!1,reason:"dictation is not available in this build"},a(),Promise.resolve(t.status))},toggle:function(){return"recording"===t.phase?s():"transcribing"===t.phase?Promise.resolve(!1):o()},startRecording:o,stopRecording:s,renderMic:a,state:function(){return t.phase},status:function(){return t.status}}}();
3
+ "use strict";!function(){var e=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/mp4"],t={status:null,recorder:null,stream:null,chunks:[],timer:null,startedAt:0,phase:"idle"};function n(){if(t.timer&&(clearTimeout(t.timer),t.timer=null),t.stream){try{t.stream.getTracks().forEach(function(e){e.stop()})}catch(e){}t.stream=null}t.recorder=null,t.chunks=[]}function r(e){t.phase=e;var n=document.getElementById("dictate-toggle"),r=document.getElementById("dictate-label");if(n){var i="recording"===e,a="transcribing"===e;n.classList.toggle("is-recording",i),n.setAttribute("aria-pressed",i?"true":"false"),n.disabled=a,r&&(r.textContent=i?"stop":a?"transcribing…":"dictate"),n.title=i?"Stop recording and transcribe.":a?"Transcribing locally…":"Dictate a message — transcribed locally, then inserted into the composer."}}function i(e,t){var n=document.getElementById("dictate-hint");n&&(n.textContent=e||"",n.dataset.kind=t||"",n.hidden=!e)}function a(){var e=document.getElementById("dictate-toggle");if(e){var n=t.status||{},i=Boolean(n.enabled);e.hidden=!i,i||("recording"===t.phase&&s(),r("idle"))}}function o(){if("idle"!==t.phase)return Promise.resolve(!1);if("undefined"==typeof navigator||!navigator.mediaDevices||"function"!=typeof navigator.mediaDevices.getUserMedia||"function"!=typeof window.MediaRecorder)return i("this build cannot record audio — MediaRecorder is unavailable","error"),Promise.resolve(!1);var a=t.status&&t.status.maxSeconds||60,o=function(){for(var t=0;t<e.length;t+=1){var n=e[t];try{if(window.MediaRecorder.isTypeSupported(n))return{mime:n,ext:-1!==n.indexOf("ogg")?"ogg":-1!==n.indexOf("mp4")?"m4a":"webm"}}catch(e){}}return{mime:"",ext:"webm"}}();return navigator.mediaDevices.getUserMedia({audio:!0}).then(function(e){var n;t.stream=e,t.chunks=[];try{n=new window.MediaRecorder(e,o.mime?{mimeType:o.mime}:void 0)}catch(t){n=new window.MediaRecorder(e)}return t.recorder=n,t.ext=o.ext,n.ondataavailable=function(e){e&&e.data&&e.data.size&&t.chunks.push(e.data)},n.start(),t.startedAt=Date.now(),i("",""),r("recording"),t.timer=setTimeout(function(){"recording"===t.phase&&(i("reached the "+a+"s limit — transcribing what was recorded","info"),s())},1e3*a),!0}).catch(function(e){n();var t=e&&e.name?String(e.name):"";return i("NotAllowedError"===t?"microphone permission was denied — allow it in your system settings":"NotFoundError"===t?"no microphone was found on this machine":"could not start recording: "+(e&&e.message||"unknown error"),"error"),r("idle"),!1})}function s(){var e=t.recorder;return e&&"recording"===t.phase?new Promise(function(t){e.onstop=function(){t()};try{e.stop()}catch(e){t()}}).then(function(){Math.max(1,Math.round((Date.now()-t.startedAt)/1e3));var e=t.chunks.slice(),a=t.ext||"webm";if(n(),!e.length)return i("nothing was recorded","error"),r("idle"),!1;var o=new Blob(e,{type:e[0].type||"audio/webm"});return r("transcribing"),i("transcribing locally…","info"),o.arrayBuffer().then(function(e){return window.aegis.speechTranscribe({audio:e,ext:a})}).then(function(e){return r("idle"),e&&e.ok?(function(e){var t=document.getElementById("prompt");if(t){var n="number"==typeof t.selectionStart?t.selectionStart:t.value.length,r="number"==typeof t.selectionEnd?t.selectionEnd:t.value.length,i=t.value.slice(0,n),a=t.value.slice(r),o=i&&!/\s$/.test(i),s=i+(o?" ":"")+e+a;t.value=s;var c=(i+(o?" ":"")+e).length;try{t.setSelectionRange(c,c),t.focus()}catch(e){}t.dispatchEvent(new Event("input",{bubbles:!0}))}}(e.text),i("",""),!0):(i(e&&e.reason||"transcription failed","error"),!1)})}).catch(function(e){return n(),r("idle"),i(e&&e.message||"transcription failed","error"),!1}):(n(),r("idle"),Promise.resolve(!1))}window.aegisDictation={refresh:function(){return window.aegis&&"function"==typeof window.aegis.speechStatus?window.aegis.speechStatus().then(function(e){return t.status=e||{enabled:!1,reason:"dictation is not available"},a(),t.status}).catch(function(e){return t.status={enabled:!1,reason:e&&e.message||"could not read dictation status"},a(),t.status}):(t.status={enabled:!1,reason:"dictation is not available in this build"},a(),Promise.resolve(t.status))},toggle:function(){return"recording"===t.phase?s():"transcribing"===t.phase?Promise.resolve(!1):o()},startRecording:o,stopRecording:s,renderMic:a,state:function(){return t.phase},status:function(){return t.status}}}();
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";let fs=null,path=null;try{"function"==typeof require&&(fs=require("node:fs"),path=require("node:path"))}catch{fs=null,path=null}const DIFF_LIMITS={fileBytes:262144,lcsCells:25e4,rows:400,context:3};function splitLines(t){const e=String(null==t?"":t).replace(/\r\n?/g,"\n");if(""===e)return[];const n=e.split("\n");return n.length&&""===n[n.length-1]&&n.pop(),n}function lineDiff(t,e){const n=splitLines(t),s=splitLines(e);let i=0;for(;i<n.length&&i<s.length&&n[i]===s[i];)i++;let r=0;for(;r<n.length-i&&r<s.length-i&&n[n.length-1-r]===s[s.length-1-r];)r++;const l=n.slice(i,n.length-r),o=s.slice(i,s.length-r),a=lcsOps(l,o),c=null===a,u=a||[...l.map((t=>({sign:"-",text:t}))),...o.map((t=>({sign:"+",text:t})))];if(!u.some((t=>" "!==t.sign)))return{rows:[],adds:0,dels:0,truncated:c};const f=DIFF_LIMITS.context,g=[];let d=1,p=1;const h=i>f?i-f:0,x=h;x>0&&g.push({sign:" ",text:"",marker:!0,note:`… ${x} unchanged line${1===x?"":"s"}`});for(let t=h;t<i;t++)g.push({sign:" ",text:n[t],no:p}),p++,d++;for(const t of u)" "===t.sign?(g.push({sign:" ",text:t.text,no:p}),p++,d++):"-"===t.sign?(g.push({sign:"-",text:t.text,no:d}),d++):(g.push({sign:"+",text:t.text,no:p}),p++);const m=s.length-r,y=Math.min(r,f);p=m+1;for(let t=0;t<y;t++)g.push({sign:" ",text:s[m+t],no:p}),p++,d++;if(r>f){const t=r-f;g.push({sign:" ",text:"",marker:!0,note:`… ${t} unchanged line${1===t?"":"s"}`})}const I=g.filter((t=>"+"===t.sign)).length,_=g.filter((t=>"-"===t.sign)).length;let w=g,F=!1;return w.length>DIFF_LIMITS.rows&&(w=w.slice(0,DIFF_LIMITS.rows),w.push({sign:" ",text:"",marker:!0,note:`… ${g.length-DIFF_LIMITS.rows} more diff lines`}),F=!0),{rows:w,adds:I,dels:_,truncated:c||F}}function lcsOps(t,e){const n=t.length,s=e.length;if(!n||!s)return[...t.map((t=>({sign:"-",text:t}))),...e.map((t=>({sign:"+",text:t})))];if(n*s>DIFF_LIMITS.lcsCells)return null;const i=s+1,r=new Int32Array((n+1)*i);for(let l=n-1;l>=0;l--)for(let n=s-1;n>=0;n--)r[l*i+n]=t[l]===e[n]?r[(l+1)*i+(n+1)]+1:Math.max(r[(l+1)*i+n],r[l*i+(n+1)]);const l=[];let o=0,a=0;for(;o<n&&a<s;)t[o]===e[a]?(l.push({sign:" ",text:t[o]}),o++,a++):r[(o+1)*i+a]>=r[o*i+(a+1)]?(l.push({sign:"-",text:t[o]}),o++):(l.push({sign:"+",text:e[a]}),a++);for(;o<n;)l.push({sign:"-",text:t[o++]});for(;a<s;)l.push({sign:"+",text:e[a++]});return l}function fileRows(t){const e=splitLines(t),n=e.slice(0,DIFF_LIMITS.rows),s=n.map(((t,e)=>({sign:" ",text:t,no:e+1}))),i=e.length-n.length;return i>0&&s.push({sign:" ",text:"",marker:!0,note:`… ${i} more lines`}),{rows:s,adds:0,dels:0,truncated:i>0}}function readCapped(t,e={}){if(!fs)return{text:null,missing:!0};const n=null==e.bytes?DIFF_LIMITS.fileBytes:e.bytes;try{const e=fs.statSync(t);if(!e.isFile())return{text:null,missing:!0};const s=fs.readFileSync(t,"utf8");return e.size>n?{text:s.slice(0,n),missing:!1,truncated:!0}:{text:s,missing:!1}}catch{return{text:null,missing:!0}}}function shortPath(t,e){const n=String(t||"");if(!e||!path)return n;const s=path.relative(e,n);if(s&&!s.startsWith("..")&&!path.isAbsolute(s))return s;const i=n.split(path.sep).filter(Boolean),r=n.startsWith(path.sep)?path.sep:"";return i.length>2?r+"…"+path.sep+i.slice(-2).join(path.sep):n}function editsDiff(t,e,n){const s=n(t)||{text:null,missing:!0};if("string"==typeof s.text){let t=s.text,n=0;for(const s of e)-1!==t.indexOf(s.old_string)?t=s.replace_all?t.split(s.old_string).join(s.new_string):t.replace(s.old_string,s.new_string):n++;const i=lineDiff(s.text,t);return Object.assign({kind:"Update"},i,{misses:n,replaceAll:e.some((t=>t.replace_all))})}let i=[],r=0,l=0,o=!1;return e.forEach(((t,n)=>{const s=lineDiff(t.old_string,t.new_string);n&&i.push({sign:" ",text:"",marker:!0,note:`… edit ${n+1} of ${e.length}`}),i=i.concat(s.rows),r+=s.adds,l+=s.dels,o=o||s.truncated})),{kind:"Update",rows:i,adds:r,dels:l,truncated:o,stacked:e.length}}function editPreview(t,e,n={}){try{const s=null==n.cwd?"undefined"!=typeof process?process.cwd():"":n.cwd,i=n.readFile||readCapped;if(!e||"object"!=typeof e)return null;const r="string"==typeof e.file_path?e.file_path:"string"==typeof e.path?e.path:null;if(!r)return null;const l={file:r,short:shortPath(r,s)};if("Edit"===t||"editFile"===t){if("string"==typeof e.old_string&&"string"==typeof e.new_string)return Object.assign({kind:"Update"},l,lineDiff(e.old_string,e.new_string),{replaceAll:!!e.replace_all});const t=(Array.isArray(e.edits)?e.edits:[]).filter((t=>t&&"string"==typeof t.old_string&&"string"==typeof t.new_string));return t.length?Object.assign({kind:"Update"},l,editsDiff(r,t,i)):null}if("Write"===t||"writeFile"===t){if("string"!=typeof e.content)return null;const t=i(r)||{text:null,missing:!0};let n=lineDiff(null==t.text?"":t.text,e.content);return n.rows.length||t.missing||!e.content||(n=fileRows(e.content)),Object.assign({kind:t.missing?"Create":"Write"},l,n,{truncated:n.truncated||!!t.truncated})}if("MultiEdit"===t){const t=(Array.isArray(e.edits)?e.edits:[]).filter((t=>t&&"string"==typeof t.old_string&&"string"==typeof t.new_string));return t.length?Object.assign({kind:"Update"},l,editsDiff(r,t,i)):null}return null}catch{return null}}function changeSummary(t){const e=[];return t.adds&&e.push(`Added ${t.adds} line${1===t.adds?"":"s"}`),t.dels&&e.push(`removed ${t.dels} line${1===t.dels?"":"s"}`),e.length?e.join(", "):"no line changes"}"undefined"!=typeof module&&module.exports&&(module.exports={DIFF_LIMITS:DIFF_LIMITS,splitLines:splitLines,lineDiff:lineDiff,lcsOps:lcsOps,readCapped:readCapped,shortPath:shortPath,changeSummary:changeSummary,editPreview:editPreview});
3
+ "use strict";let fs=null,path=null;try{"function"==typeof require&&(fs=require("node:fs"),path=require("node:path"))}catch{fs=null,path=null}const DIFF_LIMITS={fileBytes:262144,lcsCells:25e4,rows:400,context:3};function splitLines(t){const e=String(null==t?"":t).replace(/\r\n?/g,"\n");if(""===e)return[];const n=e.split("\n");return n.length&&""===n[n.length-1]&&n.pop(),n}function lineDiff(t,e){const n=splitLines(t),s=splitLines(e);let i=0;for(;i<n.length&&i<s.length&&n[i]===s[i];)i++;let r=0;for(;r<n.length-i&&r<s.length-i&&n[n.length-1-r]===s[s.length-1-r];)r++;const l=n.slice(i,n.length-r),o=s.slice(i,s.length-r),a=lcsOps(l,o),c=null===a,u=a||[...l.map(t=>({sign:"-",text:t})),...o.map(t=>({sign:"+",text:t}))];if(!u.some(t=>" "!==t.sign))return{rows:[],adds:0,dels:0,truncated:c};const f=DIFF_LIMITS.context,g=[];let d=1,p=1;const h=i>f?i-f:0,x=h;x>0&&g.push({sign:" ",text:"",marker:!0,note:`… ${x} unchanged line${1===x?"":"s"}`});for(let t=h;t<i;t++)g.push({sign:" ",text:n[t],no:p}),p++,d++;for(const t of u)" "===t.sign?(g.push({sign:" ",text:t.text,no:p}),p++,d++):"-"===t.sign?(g.push({sign:"-",text:t.text,no:d}),d++):(g.push({sign:"+",text:t.text,no:p}),p++);const m=s.length-r,y=Math.min(r,f);p=m+1;for(let t=0;t<y;t++)g.push({sign:" ",text:s[m+t],no:p}),p++,d++;if(r>f){const t=r-f;g.push({sign:" ",text:"",marker:!0,note:`… ${t} unchanged line${1===t?"":"s"}`})}const I=g.filter(t=>"+"===t.sign).length,_=g.filter(t=>"-"===t.sign).length;let w=g,F=!1;return w.length>DIFF_LIMITS.rows&&(w=w.slice(0,DIFF_LIMITS.rows),w.push({sign:" ",text:"",marker:!0,note:`… ${g.length-DIFF_LIMITS.rows} more diff lines`}),F=!0),{rows:w,adds:I,dels:_,truncated:c||F}}function lcsOps(t,e){const n=t.length,s=e.length;if(!n||!s)return[...t.map(t=>({sign:"-",text:t})),...e.map(t=>({sign:"+",text:t}))];if(n*s>DIFF_LIMITS.lcsCells)return null;const i=s+1,r=new Int32Array((n+1)*i);for(let l=n-1;l>=0;l--)for(let n=s-1;n>=0;n--)r[l*i+n]=t[l]===e[n]?r[(l+1)*i+(n+1)]+1:Math.max(r[(l+1)*i+n],r[l*i+(n+1)]);const l=[];let o=0,a=0;for(;o<n&&a<s;)t[o]===e[a]?(l.push({sign:" ",text:t[o]}),o++,a++):r[(o+1)*i+a]>=r[o*i+(a+1)]?(l.push({sign:"-",text:t[o]}),o++):(l.push({sign:"+",text:e[a]}),a++);for(;o<n;)l.push({sign:"-",text:t[o++]});for(;a<s;)l.push({sign:"+",text:e[a++]});return l}function fileRows(t){const e=splitLines(t),n=e.slice(0,DIFF_LIMITS.rows),s=n.map((t,e)=>({sign:" ",text:t,no:e+1})),i=e.length-n.length;return i>0&&s.push({sign:" ",text:"",marker:!0,note:`… ${i} more lines`}),{rows:s,adds:0,dels:0,truncated:i>0}}function readCapped(t,e={}){if(!fs)return{text:null,missing:!0};const n=null==e.bytes?DIFF_LIMITS.fileBytes:e.bytes;try{const e=fs.statSync(t);if(!e.isFile())return{text:null,missing:!0};const s=fs.readFileSync(t,"utf8");return e.size>n?{text:s.slice(0,n),missing:!1,truncated:!0}:{text:s,missing:!1}}catch{return{text:null,missing:!0}}}function shortPath(t,e){const n=String(t||"");if(!e||!path)return n;const s=path.relative(e,n);if(s&&!s.startsWith("..")&&!path.isAbsolute(s))return s;const i=n.split(path.sep).filter(Boolean),r=n.startsWith(path.sep)?path.sep:"";return i.length>2?r+"…"+path.sep+i.slice(-2).join(path.sep):n}function editsDiff(t,e,n){const s=n(t)||{text:null,missing:!0};if("string"==typeof s.text){let t=s.text,n=0;for(const s of e)-1!==t.indexOf(s.old_string)?t=s.replace_all?t.split(s.old_string).join(s.new_string):t.replace(s.old_string,s.new_string):n++;const i=lineDiff(s.text,t);return Object.assign({kind:"Update"},i,{misses:n,replaceAll:e.some(t=>t.replace_all)})}let i=[],r=0,l=0,o=!1;return e.forEach((t,n)=>{const s=lineDiff(t.old_string,t.new_string);n&&i.push({sign:" ",text:"",marker:!0,note:`… edit ${n+1} of ${e.length}`}),i=i.concat(s.rows),r+=s.adds,l+=s.dels,o=o||s.truncated}),{kind:"Update",rows:i,adds:r,dels:l,truncated:o,stacked:e.length}}function editPreview(t,e,n={}){try{const s=null==n.cwd?"undefined"!=typeof process?process.cwd():"":n.cwd,i=n.readFile||readCapped;if(!e||"object"!=typeof e)return null;const r="string"==typeof e.file_path?e.file_path:"string"==typeof e.path?e.path:null;if(!r)return null;const l={file:r,short:shortPath(r,s)};if("Edit"===t||"editFile"===t){if("string"==typeof e.old_string&&"string"==typeof e.new_string)return Object.assign({kind:"Update"},l,lineDiff(e.old_string,e.new_string),{replaceAll:!!e.replace_all});const t=(Array.isArray(e.edits)?e.edits:[]).filter(t=>t&&"string"==typeof t.old_string&&"string"==typeof t.new_string);return t.length?Object.assign({kind:"Update"},l,editsDiff(r,t,i)):null}if("Write"===t||"writeFile"===t){if("string"!=typeof e.content)return null;const t=i(r)||{text:null,missing:!0};let n=lineDiff(null==t.text?"":t.text,e.content);return n.rows.length||t.missing||!e.content||(n=fileRows(e.content)),Object.assign({kind:t.missing?"Create":"Write"},l,n,{truncated:n.truncated||!!t.truncated})}if("MultiEdit"===t){const t=(Array.isArray(e.edits)?e.edits:[]).filter(t=>t&&"string"==typeof t.old_string&&"string"==typeof t.new_string);return t.length?Object.assign({kind:"Update"},l,editsDiff(r,t,i)):null}return null}catch{return null}}function changeSummary(t){const e=[];return t.adds&&e.push(`Added ${t.adds} line${1===t.adds?"":"s"}`),t.dels&&e.push(`removed ${t.dels} line${1===t.dels?"":"s"}`),e.length?e.join(", "):"no line changes"}"undefined"!=typeof module&&module.exports&&(module.exports={DIFF_LIMITS:DIFF_LIMITS,splitLines:splitLines,lineDiff:lineDiff,lcsOps:lcsOps,readCapped:readCapped,shortPath:shortPath,changeSummary:changeSummary,editPreview:editPreview});
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";const AUTO_OPEN_ROWS=30,MAX_BLOCK_ROWS=200,DIFF_COLORS={delFg:"#dc5a5a",delBg:"#3d0100",addFg:"#50c850",addBg:"#022800",delHiFg:"#f8f8f2",delHiBg:"#5c0200",addHiFg:"#ffffff",addHiBg:"#044700",codeFg:"#f8f8f2",gutter:"#787878",kind:"#c099ff",kw:"#66d9ef",fn:"#a6e22e",str:"#e6db74",num:"#ae81ff",comment:"#75715e"},KEYWORDS=new Set(["const","let","var","function","return","if","else","for","while","do","switch","case","break","continue","import","export","from","default","class","extends","new","try","catch","finally","throw","async","await","yield","static","typeof","instanceof","in","of","delete","this","super","null","undefined","true","false","def","elif","lambda","pass","raise","with","as","not","and","or","is","None","True","False","self","fn","mut","pub","impl","struct","enum","trait","match","package","func","defer","chan","nil","echo","local","then","fi","esac"]);function highlightLine(e,t){const n=t||DIFF_COLORS,i=[],d=String(null==e?"":e),l=/(\/\/[^\n]*|#[^\n]*|\/\*[\s\S]*?\*\/)|('(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|`(?:\\.|[^`\\])*`)|(0[xX][0-9a-fA-F]+|\d+(?:\.\d+)?)|([A-Za-z_$][A-Za-z0-9_$]*)/g,a=(e,t)=>{e&&i.push({t:e,c:t})};let o,s=0;for(;o=l.exec(d);){if(o.index>s&&a(d.slice(s,o.index),n.codeFg),o[1])a(o[1],n.comment);else if(o[2])a(o[2],n.str);else if(o[3])a(o[3],n.num);else{const e=o[4],t=/^\s*\(/.test(d.slice(o.index+e.length));a(e,KEYWORDS.has(e)?n.kw:t?n.fn:n.codeFg)}s=o.index+o[0].length}return s<d.length&&a(d.slice(s),n.codeFg),i}function markIntraLine(e){for(let t=0;t<e.length;t++){if("-"!==e[t].sign)continue;let n=t;for(;n<e.length&&"-"===e[n].sign;)n++;let i=n;for(;i<e.length&&"+"===e[i].sign;)i++;const d=n-t;if(d&&d===i-n)for(let i=0;i<d;i++){const d=intraLine(e[t+i].text,e[n+i].text);d&&(e[t+i].hi={start:d.delStart,end:d.delEnd,side:"del"},e[n+i].hi={start:d.addStart,end:d.addEnd,side:"add"})}t=i-1}return e}function intraLine(e,t){const n=[...String(null==e?"":e)],i=[...String(null==t?"":t)];let d=0;for(;d<n.length&&d<i.length&&n[d]===i[d];)d++;let l=0;for(;l<n.length-d&&l<i.length-d&&n[n.length-1-l]===i[i.length-1-l];)l++;return d+l<.4*(Math.max(n.length,i.length)||1)?null:{delStart:d,delEnd:n.length-l,addStart:d,addEnd:i.length-l}}function defaultOpen(e){return!(!e||!e.rows)&&e.rows.length<=AUTO_OPEN_ROWS}function tokenSpan(e,t,n,i,d){const l=e.createElement("span");return i?(l.style.background=i,l.style.color=d):l.style.color=n,l.textContent=String(t),l}function appendCode(e,t,n,i){const d=String(null==n?"":n);let l=0;for(const n of highlightLine(d,DIFF_COLORS)){const d=[...n.t],a=l,o=l+d.length;if(l=o,!i||o<=i.start||a>=i.end){t.appendChild(tokenSpan(e,n.t,n.c));continue}const s=Math.max(i.start,a)-a,r=Math.min(i.end,o)-a;if(s>0&&t.appendChild(tokenSpan(e,d.slice(0,s).join(""),n.c)),r>s){const n="del"===i.side?DIFF_COLORS.delHiBg:DIFF_COLORS.addHiBg,l="del"===i.side?DIFF_COLORS.delHiFg:DIFF_COLORS.addHiFg;t.appendChild(tokenSpan(e,d.slice(s,r).join(""),null,n,l))}r<d.length&&t.appendChild(tokenSpan(e,d.slice(r).join(""),n.c))}}function renderRow(e,t,n){const i="-"===t.sign?"del":"+"===t.sign?"add":"ctx",d=e.createElement("div");d.className=`diff-row diff-${i}`;const l=e.createElement("span");l.className="diff-gutter",l.textContent=`${String(null==t.no?"":t.no).padStart(n)} `,d.appendChild(l);const a=e.createElement("span");a.className="diff-sign",a.textContent=" "===t.sign?" ":t.sign,d.appendChild(a);const o=e.createElement("span");return o.className="diff-code",appendCode(e,o,t.text,t.hi),d.appendChild(o),d}function markerRow(e,t){const n=e.createElement("div");n.className="diff-row diff-marker";const i=e.createElement("span");return i.className="diff-code",i.textContent=String(null==t?"":t),n.appendChild(i),n}function renderDiffBlock(e,t,n={}){const i=t||(void 0!==i?i:null);if(!i||!e||!e.rows)return null;let d=null==n.open?defaultOpen(e):!!n.open;const l=i.createElement("div");l.className="diff-block";const a=i.createElement("div");a.className="diff-summary","function"==typeof a.setAttribute&&(a.setAttribute("role","button"),a.setAttribute("aria-expanded",String(d)));const o=i.createElement("div");function s(){a.textContent="";const t=[{t:"⎿ ",c:DIFF_COLORS.gutter},{t:`${e.kind}(${e.short})`,c:DIFF_COLORS.kind}];if(e.adds&&t.push({t:` +${e.adds}`,c:DIFF_COLORS.addFg}),e.dels&&t.push({t:` -${e.dels}`,c:DIFF_COLORS.delFg}),e.adds||e.dels||t.push({t:" no line changes",c:DIFF_COLORS.gutter}),e.misses&&t.push({t:` ${e.misses} edit(s) not applied`,c:"#ffd166"}),e.rows&&e.rows.length){const n=d?"· click to collapse":e.adds||e.dels?"· click to view diff":"· click to view file";t.push({t:` ${n}`,c:DIFF_COLORS.comment})}for(const e of t){const t=i.createElement("span");t.style.color=e.c,t.textContent=e.t,a.appendChild(t)}"function"==typeof a.setAttribute&&a.setAttribute("aria-expanded",String(d))}function r(){if(o.textContent="",!d)return;const t=markIntraLine(e.rows.slice(0,200).map((e=>Object.assign({},e))));let n=1;for(const e of t)e.no&&e.no>n&&(n=e.no);const l=Math.max(2,String(n).length);for(const e of t)e.marker?o.appendChild(markerRow(i,e.note)):o.appendChild(renderRow(i,e,l));const a=e.rows.length-200;a>0&&o.appendChild(markerRow(i,`… ${a} more diff lines`)),e.truncated&&o.appendChild(markerRow(i,"… diff truncated (file too large to compare in full)"))}function c(){d=!d,s(),r()}return o.className="diff-body","function"==typeof a.addEventListener&&(a.addEventListener("click",c),a.addEventListener("keydown",(e=>{!e||"Enter"!==e.key&&" "!==e.key||("function"==typeof e.preventDefault&&e.preventDefault(),c())}))),s(),r(),l.appendChild(a),l.appendChild(o),l}"undefined"!=typeof module&&module.exports&&(module.exports={AUTO_OPEN_ROWS:AUTO_OPEN_ROWS,MAX_BLOCK_ROWS:200,DIFF_COLORS:DIFF_COLORS,defaultOpen:defaultOpen,highlightLine:highlightLine,markIntraLine:markIntraLine,renderDiffBlock:renderDiffBlock});
3
+ "use strict";const AUTO_OPEN_ROWS=30,MAX_BLOCK_ROWS=200,DIFF_COLORS={delFg:"#dc5a5a",delBg:"#3d0100",addFg:"#50c850",addBg:"#022800",delHiFg:"#f8f8f2",delHiBg:"#5c0200",addHiFg:"#ffffff",addHiBg:"#044700",codeFg:"#f8f8f2",gutter:"#787878",kind:"#c099ff",kw:"#66d9ef",fn:"#a6e22e",str:"#e6db74",num:"#ae81ff",comment:"#75715e"},KEYWORDS=new Set(["const","let","var","function","return","if","else","for","while","do","switch","case","break","continue","import","export","from","default","class","extends","new","try","catch","finally","throw","async","await","yield","static","typeof","instanceof","in","of","delete","this","super","null","undefined","true","false","def","elif","lambda","pass","raise","with","as","not","and","or","is","None","True","False","self","fn","mut","pub","impl","struct","enum","trait","match","package","func","defer","chan","nil","echo","local","then","fi","esac"]);function highlightLine(e,t){const n=t||DIFF_COLORS,i=[],d=String(null==e?"":e),l=/(\/\/[^\n]*|#[^\n]*|\/\*[\s\S]*?\*\/)|('(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|`(?:\\.|[^`\\])*`)|(0[xX][0-9a-fA-F]+|\d+(?:\.\d+)?)|([A-Za-z_$][A-Za-z0-9_$]*)/g,a=(e,t)=>{e&&i.push({t:e,c:t})};let o,s=0;for(;o=l.exec(d);){if(o.index>s&&a(d.slice(s,o.index),n.codeFg),o[1])a(o[1],n.comment);else if(o[2])a(o[2],n.str);else if(o[3])a(o[3],n.num);else{const e=o[4],t=/^\s*\(/.test(d.slice(o.index+e.length));a(e,KEYWORDS.has(e)?n.kw:t?n.fn:n.codeFg)}s=o.index+o[0].length}return s<d.length&&a(d.slice(s),n.codeFg),i}function markIntraLine(e){for(let t=0;t<e.length;t++){if("-"!==e[t].sign)continue;let n=t;for(;n<e.length&&"-"===e[n].sign;)n++;let i=n;for(;i<e.length&&"+"===e[i].sign;)i++;const d=n-t;if(d&&d===i-n)for(let i=0;i<d;i++){const d=intraLine(e[t+i].text,e[n+i].text);d&&(e[t+i].hi={start:d.delStart,end:d.delEnd,side:"del"},e[n+i].hi={start:d.addStart,end:d.addEnd,side:"add"})}t=i-1}return e}function intraLine(e,t){const n=[...String(null==e?"":e)],i=[...String(null==t?"":t)];let d=0;for(;d<n.length&&d<i.length&&n[d]===i[d];)d++;let l=0;for(;l<n.length-d&&l<i.length-d&&n[n.length-1-l]===i[i.length-1-l];)l++;return d+l<.4*(Math.max(n.length,i.length)||1)?null:{delStart:d,delEnd:n.length-l,addStart:d,addEnd:i.length-l}}function defaultOpen(e){return!(!e||!e.rows)&&e.rows.length<=30}function tokenSpan(e,t,n,i,d){const l=e.createElement("span");return i?(l.style.background=i,l.style.color=d):l.style.color=n,l.textContent=String(t),l}function appendCode(e,t,n,i){const d=String(null==n?"":n);let l=0;for(const n of highlightLine(d,DIFF_COLORS)){const d=[...n.t],a=l,o=l+d.length;if(l=o,!i||o<=i.start||a>=i.end){t.appendChild(tokenSpan(e,n.t,n.c));continue}const s=Math.max(i.start,a)-a,r=Math.min(i.end,o)-a;if(s>0&&t.appendChild(tokenSpan(e,d.slice(0,s).join(""),n.c)),r>s){const n="del"===i.side?DIFF_COLORS.delHiBg:DIFF_COLORS.addHiBg,l="del"===i.side?DIFF_COLORS.delHiFg:DIFF_COLORS.addHiFg;t.appendChild(tokenSpan(e,d.slice(s,r).join(""),null,n,l))}r<d.length&&t.appendChild(tokenSpan(e,d.slice(r).join(""),n.c))}}function renderRow(e,t,n){const i="-"===t.sign?"del":"+"===t.sign?"add":"ctx",d=e.createElement("div");d.className=`diff-row diff-${i}`;const l=e.createElement("span");l.className="diff-gutter",l.textContent=`${String(null==t.no?"":t.no).padStart(n)} `,d.appendChild(l);const a=e.createElement("span");a.className="diff-sign",a.textContent=" "===t.sign?" ":t.sign,d.appendChild(a);const o=e.createElement("span");return o.className="diff-code",appendCode(e,o,t.text,t.hi),d.appendChild(o),d}function markerRow(e,t){const n=e.createElement("div");n.className="diff-row diff-marker";const i=e.createElement("span");return i.className="diff-code",i.textContent=String(null==t?"":t),n.appendChild(i),n}function renderDiffBlock(e,t,n={}){const i=t||(void 0!==i?i:null);if(!i||!e||!e.rows)return null;let d=null==n.open?defaultOpen(e):!!n.open;const l=i.createElement("div");l.className="diff-block";const a=i.createElement("div");a.className="diff-summary","function"==typeof a.setAttribute&&(a.setAttribute("role","button"),a.setAttribute("aria-expanded",String(d)));const o=i.createElement("div");function s(){a.textContent="";const t=[{t:"⎿ ",c:DIFF_COLORS.gutter},{t:`${e.kind}(${e.short})`,c:DIFF_COLORS.kind}];if(e.adds&&t.push({t:` +${e.adds}`,c:DIFF_COLORS.addFg}),e.dels&&t.push({t:` -${e.dels}`,c:DIFF_COLORS.delFg}),e.adds||e.dels||t.push({t:" no line changes",c:DIFF_COLORS.gutter}),e.misses&&t.push({t:` ${e.misses} edit(s) not applied`,c:"#ffd166"}),e.rows&&e.rows.length){const n=d?"· click to collapse":e.adds||e.dels?"· click to view diff":"· click to view file";t.push({t:` ${n}`,c:DIFF_COLORS.comment})}for(const e of t){const t=i.createElement("span");t.style.color=e.c,t.textContent=e.t,a.appendChild(t)}"function"==typeof a.setAttribute&&a.setAttribute("aria-expanded",String(d))}function r(){if(o.textContent="",!d)return;const t=markIntraLine(e.rows.slice(0,200).map(e=>Object.assign({},e)));let n=1;for(const e of t)e.no&&e.no>n&&(n=e.no);const l=Math.max(2,String(n).length);for(const e of t)e.marker?o.appendChild(markerRow(i,e.note)):o.appendChild(renderRow(i,e,l));const a=e.rows.length-200;a>0&&o.appendChild(markerRow(i,`… ${a} more diff lines`)),e.truncated&&o.appendChild(markerRow(i,"… diff truncated (file too large to compare in full)"))}function c(){d=!d,s(),r()}return o.className="diff-body","function"==typeof a.addEventListener&&(a.addEventListener("click",c),a.addEventListener("keydown",e=>{!e||"Enter"!==e.key&&" "!==e.key||("function"==typeof e.preventDefault&&e.preventDefault(),c())})),s(),r(),l.appendChild(a),l.appendChild(o),l}"undefined"!=typeof module&&module.exports&&(module.exports={AUTO_OPEN_ROWS:30,MAX_BLOCK_ROWS:200,DIFF_COLORS:DIFF_COLORS,defaultOpen:defaultOpen,highlightLine:highlightLine,markIntraLine:markIntraLine,renderDiffBlock:renderDiffBlock});
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";!function(e,t){const n=function(){const e={cardStatus:"fp-card-status",cardOpen:"fp-open",overlay:"fp-overlay",backdrop:"fp-backdrop",close:"fp-close",keySource:"fp-key-source",keyPath:"fp-key-path",keyTag:"fp-key-tag",keyWarning:"fp-key-warning",vaultTarget:"fp-vault-target",vaultBackendDrive:"fp-vault-backend-drive",vaultBackendCloud:"fp-vault-backend-aegiscloud",vaultBackendOff:"fp-vault-backend-off",label:"fp-label",publishOnMint:"fp-publish-on-mint",autoSeal:"fp-auto-seal",autoSealLabel:"fp-auto-seal-label",autoHint:"fp-auto-hint",sealNow:"fp-seal-now",keygen:"fp-keygen",seal:"fp-seal",sealCard:"fp-seal-card",verify:"fp-verify",publish:"fp-publish",anchor:"fp-anchor",backupTo:"fp-backup-to",backup:"fp-backup",vault:"fp-vault",audit:"fp-audit",vaultList:"fp-vault-list",out:"fp-out",driveStatus:"fp-drive-status",driveSignIn:"fp-drive-signin",driveConnect:"fp-drive-connect",driveSyncNow:"fp-drive-sync",driveBackupChat:"fp-drive-backup-chat",driveHint:"fp-drive-hint"},t=e=>null==e||""===e?"–":String(e);function n(e){return e?!1===e.ok?e.error||"unavailable":e.configured?`key ${t(e.keyFingerprint)} · ${t(e.keySource)}`:"no key — mint one to seal records":"checking…"}function a(e){if(!e||!1===e.ok)return[{k:"state",v:e&&e.error||"unavailable"}];const n=[{k:"key",v:e.configured?e.keyFingerprint:"none"},{k:"source",v:t(e.keySource)},{k:"expected at",v:t(e.defaultKeyPath)},{k:"history",v:e.historyPresent?e.historyPath:"none yet"}];return e.configured&&e.keyPath&&e.keyPath!==e.defaultKeyPath&&n.splice(2,0,{k:"in use",v:e.keyPath}),n}function o(e){const t=e&&e.error?String(e.error):"";return/chmod/i.test(t)?t:""}function i(e){if(!e||!1===e.ok)return[{name:"vault unavailable",detail:e&&e.error||"unknown error"}];const t=Array.isArray(e.records)?e.records:Array.isArray(e.items)?e.items:Array.isArray(e.entries)?e.entries:[];return t.length?t.map((e=>{const t=e.name||e.file||e.path||e.id||"record",n=[e.id,e.publishedAt||e.createdAt,e.url].filter(Boolean);return{name:String(t),detail:n.join(" · ")}})):[{name:"nothing published yet",detail:""}]}function r(e){return e&&!1!==e.ok?e.signedIn?e.connected?"Google Drive connected"+(e.email?` · ${e.email}`:""):"signed in · Google Drive not connected yet":"not signed in — sign in with Google first":e&&e.error||"unavailable"}function s(e){if(!e||!1===e.ok)return{ok:!1,label:e&&e.error||"anchor check failed",claims:[]};const t=void 0!==e.present?e.present:e.presence,n=[{k:"present",v:t},{k:"unchanged",v:e.unchanged},{k:"attested",v:e.attested}],a=!0===t&&!0===e.unchanged&&!0===e.attested;return{ok:a,label:a?"the published copy is this record":"the published copy is not verifiably this record",claims:n}}function l(e){if(!e||!1===e.ok)return{ok:!1,label:e&&e.error||"audit failed",findings:[]};const t=Array.isArray(e.findings)?e.findings:Array.isArray(e.leaks)?e.leaks:Array.isArray(e.hits)?e.hits:[];return t.length?{ok:!1,label:`${t.length} item(s) in the vault look like key material`,findings:t}:{ok:!0,label:"no key material in the vault",findings:[]}}function u(e){if(!e||!1===e.ok)return{ok:!1,text:e&&e.error||"seal failed"};const n=e.record||{},a=[`sealed ${t(n.id)}`,`key ${t(n.keyFingerprint)}`,e.out];return a.push(n.aiKey?`ai ${t(n.ai)} on ${t(n.aiKey)}`:"ai unobserved"+(n.ai?` (${t(n.ai)})`:"")),e.vault&&e.vault.url?a.push(`published ${e.vault.url}`):e.vault&&a.push(`published ${t(e.vault.remote||e.vault.path)}`),e.vaultError&&a.push(`publish failed: ${e.vaultError}`),{ok:!0,text:a.filter(Boolean).join(" · "),file:e.out||null,record:e.record||null}}function c(e){if(!e||"object"!=typeof e)return"–";if(!0!==e.enabled)return"off — sealing stays a button";const t=[],n=Number(e.quietMs);return t.push(Number.isFinite(n)?`seals ${Math.round(n/1e3)}s after the last turn`:"seals when the session goes quiet"),e.publish&&t.push("publishes to the vault"),e.pendingTurns&&t.push(`${e.pendingTurns} turn${1===e.pendingTurns?"":"s"} pending`),e.seals&&t.push(`${e.seals} sealed`),e.failures&&t.push(`${e.failures} failed`),e.lastError&&t.push(`last error: ${e.lastError}`),t.join(" · ")}return{IDS:e,mount:function({api:d,doc:f,auto:p,getSessionId:k}={}){const y=f||("undefined"!=typeof document?document:null);if(!y)throw new Error("fingerprint: mount needs a document");const h=d||("undefined"!=typeof window?window.aegis:null),v=p||("undefined"!=typeof window?window.auto:null),b=e=>y.getElementById(e),g={status:null,last:null,busy:!1,mounted:!0};function $(t,n){const a=b(e.out);a&&(a.textContent=t,a.className=n?"fp-out fp-bad":"fp-out")}async function w(e,t){if(!h||"function"!=typeof h[e])return{ok:!1,error:`this build has no ${e} bridge`};try{const n=await h[e](t);return n&&"object"==typeof n?n:{ok:!1,error:`${e} returned nothing`}}catch(e){return{ok:!1,error:e&&e.message||String(e)}}}async function m(){const t=await w("getVaultBackend");return g.vaultBackend=t&&t.backend?t.backend:"aegiscloud",function(t){const n={drive:b(e.vaultBackendDrive),aegiscloud:b(e.vaultBackendCloud),off:b(e.vaultBackendOff)};for(const[e,a]of Object.entries(n))a&&a.setAttribute("aria-pressed",String(e===t))}(g.vaultBackend),g.vaultBackend}const S=e=>I("vault: "+("drive"===e?"Google Drive":"off"===e?"no sync":"AE"),(async()=>{const t=await w("setVaultBackend",e);return t&&t.backend?{ok:!0,...t}:{ok:!1,error:"could not save that"}}),{after:e=>e&&e.ok?L():null,say:e=>e.ok?`vault backend set to ${t(e.backend)}`:`could not save that: ${e.error}`});function B(){try{return"function"==typeof k&&k()||null}catch{return null}}async function C(){const t=await w("driveStatus");return g.drive=t,function(t){const n=b(e.driveStatus);n&&(n.textContent=r(t));const a=b(e.driveConnect);a&&(a.disabled=Boolean(t&&!t.signedIn));const o=Boolean(t&&t.connected),i=b(e.driveSyncNow);i&&(i.disabled=!o);const s=b(e.driveBackupChat);s&&(s.disabled=!(o&&Boolean(B())));const l=b(e.driveHint);l&&(l.textContent=o?"Each saved file starts with who wrote it, so it still makes sense in Drive without this app.":"Nothing is uploaded until you pick one of the two backups below.")}(t),t}const x=()=>I("sign in with Google",(()=>w("driveSignIn")),{after:e=>e&&e.ok?C():null,say:e=>e.ok?"signed in"+(e.username?` as ${e.username}`:""):`sign-in failed: ${e.error}`}),A=()=>I("connect Google Drive",(()=>w("driveConnect")),{after:e=>e&&e.ok?C():null,say:e=>e.ok?"Google Drive connected"+(e.email?` · ${e.email}`:""):`could not connect: ${e.error}`}),D=()=>I("back up all memory to Drive",(()=>w("driveSyncMemory")),{say:e=>e.ok?`backed up all ${e.count} memory entr${1===e.count?"y":"ies"}${e.author?` · authored ${e.author}`:""}${e.webViewLink?` → ${e.webViewLink}`:""}`:`backup failed: ${e.error}`}),N=()=>I("back up this conversation to Drive",(()=>w("driveBackupConversation",{sessionId:B()})),{say:e=>e.ok?`saved ${e.title?`“${e.title}”`:"this conversation"}${e.author?` · authored ${e.author}`:""}${e.webViewLink?` → ${e.webViewLink}`:""}`:`could not save this conversation: ${e.error}`});function V(t){const n=b(e.vaultList);if(n){n.textContent="";for(const e of i(t)){const t=y.createElement("li");t.className="fp-vault-row";const a=y.createElement("span");if(a.className="fp-vault-name",a.textContent=e.name,t.appendChild(a),e.detail){const n=y.createElement("span");n.className="fp-vault-detail",n.textContent=e.detail,t.appendChild(n)}n.appendChild(t)}}}async function L(){return g.status=await w("fingerprintStatus"),function(){const i=g.status,r=b(e.cardStatus);r&&(r.textContent=n(i));const s=b(e.keySource),l=b(e.keyPath),u=b(e.keyTag),c=b(e.keyWarning),d=b(e.vaultTarget),f=a(i),p=e=>{const t=f.find((t=>t.k===e));return t?t.v:"–"};if(s&&(s.textContent=p("source")),l&&(l.textContent=i&&i.keyPath?i.keyPath:p("expected at")),u&&(u.textContent=i&&i.configured?t(i.keyFingerprint):"none"),c){const e=o(i);c.textContent=e,c.hidden=!e}d&&i&&i.vault?
3
+ "use strict";!function(e){const t=function(){const e={cardStatus:"fp-card-status",cardOpen:"fp-open",overlay:"fp-overlay",backdrop:"fp-backdrop",close:"fp-close",keySource:"fp-key-source",keyPath:"fp-key-path",keyTag:"fp-key-tag",keyWarning:"fp-key-warning",vaultTarget:"fp-vault-target",vaultBackendDrive:"fp-vault-backend-drive",vaultBackendCloud:"fp-vault-backend-aegiscloud",vaultBackendOff:"fp-vault-backend-off",label:"fp-label",publishOnMint:"fp-publish-on-mint",autoSeal:"fp-auto-seal",autoSealLabel:"fp-auto-seal-label",autoHint:"fp-auto-hint",sealNow:"fp-seal-now",keygen:"fp-keygen",seal:"fp-seal",sealCard:"fp-seal-card",verify:"fp-verify",publish:"fp-publish",anchor:"fp-anchor",backupTo:"fp-backup-to",backup:"fp-backup",vault:"fp-vault",audit:"fp-audit",vaultList:"fp-vault-list",out:"fp-out",driveStatus:"fp-drive-status",driveSignIn:"fp-drive-signin",driveConnect:"fp-drive-connect",driveSyncNow:"fp-drive-sync",driveBackupChat:"fp-drive-backup-chat",driveHint:"fp-drive-hint"},t=e=>null==e||""===e?"–":String(e);function n(e){return e?!1===e.ok?e.error||"unavailable":e.configured?`key ${t(e.keyFingerprint)} · ${t(e.keySource)}`:"no key — mint one to seal records":"checking…"}function a(e){if(!e||!1===e.ok)return[{k:"state",v:e&&e.error||"unavailable"}];const n=[{k:"key",v:e.configured?e.keyFingerprint:"none"},{k:"source",v:t(e.keySource)},{k:"expected at",v:t(e.defaultKeyPath)},{k:"history",v:e.historyPresent?e.historyPath:"none yet"}];return e.configured&&e.keyPath&&e.keyPath!==e.defaultKeyPath&&n.splice(2,0,{k:"in use",v:e.keyPath}),n}function o(e){const t=e&&e.error?String(e.error):"";return/chmod/i.test(t)?t:""}function i(e){if(!e||!1===e.ok)return[{name:"vault unavailable",detail:e&&e.error||"unknown error"}];const t=Array.isArray(e.records)?e.records:Array.isArray(e.items)?e.items:Array.isArray(e.entries)?e.entries:[];return t.length?t.map(e=>{const t=e.name||e.file||e.path||e.id||"record",n=[e.id,e.publishedAt||e.createdAt,e.url].filter(Boolean);return{name:String(t),detail:n.join(" · ")}}):[{name:"nothing published yet",detail:""}]}function r(e){return e&&!1!==e.ok?e.signedIn?e.connected?"Google Drive connected"+(e.email?` · ${e.email}`:""):"signed in · Google Drive not connected yet":"not signed in — sign in with Google first":e&&e.error||"unavailable"}function s(e){if(!e||!1===e.ok)return{ok:!1,label:e&&e.error||"anchor check failed",claims:[]};const t=void 0!==e.present?e.present:e.presence,n=[{k:"present",v:t},{k:"unchanged",v:e.unchanged},{k:"attested",v:e.attested}],a=!0===t&&!0===e.unchanged&&!0===e.attested;return{ok:a,label:a?"the published copy is this record":"the published copy is not verifiably this record",claims:n}}function l(e){if(!e||!1===e.ok)return{ok:!1,label:e&&e.error||"audit failed",findings:[]};const t=Array.isArray(e.findings)?e.findings:Array.isArray(e.leaks)?e.leaks:Array.isArray(e.hits)?e.hits:[];return t.length?{ok:!1,label:`${t.length} item(s) in the vault look like key material`,findings:t}:{ok:!0,label:"no key material in the vault",findings:[]}}function u(e){if(!e||!1===e.ok)return{ok:!1,text:e&&e.error||"seal failed"};const n=e.record||{},a=[`sealed ${t(n.id)}`,`key ${t(n.keyFingerprint)}`,e.out];return a.push(n.aiKey?`ai ${t(n.ai)} on ${t(n.aiKey)}`:"ai unobserved"+(n.ai?` (${t(n.ai)})`:"")),e.vault&&e.vault.url?a.push(`published ${e.vault.url}`):e.vault&&a.push(`published ${t(e.vault.remote||e.vault.path)}`),e.vaultError&&a.push(`publish failed: ${e.vaultError}`),{ok:!0,text:a.filter(Boolean).join(" · "),file:e.out||null,record:e.record||null}}function c(e){if(!e||"object"!=typeof e)return"–";if(!0!==e.enabled)return"off — sealing stays a button";const t=[],n=Number(e.quietMs);return t.push(Number.isFinite(n)?`seals ${Math.round(n/1e3)}s after the last turn`:"seals when the session goes quiet"),e.publish&&t.push("publishes to the vault"),e.pendingTurns&&t.push(`${e.pendingTurns} turn${1===e.pendingTurns?"":"s"} pending`),e.seals&&t.push(`${e.seals} sealed`),e.failures&&t.push(`${e.failures} failed`),e.lastError&&t.push(`last error: ${e.lastError}`),t.join(" · ")}return{IDS:e,mount:function({api:d,doc:f,auto:p,getSessionId:k}={}){const y=f||("undefined"!=typeof document?document:null);if(!y)throw new Error("fingerprint: mount needs a document");const h=d||("undefined"!=typeof window?window.aegis:null),v=p||("undefined"!=typeof window?window.auto:null),b=e=>y.getElementById(e),g={status:null,last:null,busy:!1,mounted:!0};function $(t,n){const a=b(e.out);a&&(a.textContent=t,a.className=n?"fp-out fp-bad":"fp-out")}async function w(e,t){if(!h||"function"!=typeof h[e])return{ok:!1,error:`this build has no ${e} bridge`};try{const n=await h[e](t);return n&&"object"==typeof n?n:{ok:!1,error:`${e} returned nothing`}}catch(e){return{ok:!1,error:e&&e.message||String(e)}}}async function m(){const t=await w("getVaultBackend");return g.vaultBackend=t&&t.backend?t.backend:"aegiscloud",function(t){const n={drive:b(e.vaultBackendDrive),aegiscloud:b(e.vaultBackendCloud),off:b(e.vaultBackendOff)};for(const[e,a]of Object.entries(n))a&&a.setAttribute("aria-pressed",String(e===t))}(g.vaultBackend),g.vaultBackend}const S=e=>I("vault: "+("drive"===e?"Google Drive":"off"===e?"no sync":"AE"),async()=>{const t=await w("setVaultBackend",e);return t&&t.backend?{ok:!0,...t}:{ok:!1,error:"could not save that"}},{after:e=>e&&e.ok?L():null,say:e=>e.ok?`vault backend set to ${t(e.backend)}`:`could not save that: ${e.error}`});function B(){try{return"function"==typeof k&&k()||null}catch{return null}}async function C(){const t=await w("driveStatus");return g.drive=t,function(t){const n=b(e.driveStatus);n&&(n.textContent=r(t));const a=b(e.driveConnect);a&&(a.disabled=Boolean(t&&!t.signedIn));const o=Boolean(t&&t.connected),i=b(e.driveSyncNow);i&&(i.disabled=!o);const s=b(e.driveBackupChat);s&&(s.disabled=!(o&&Boolean(B())));const l=b(e.driveHint);l&&(l.textContent=o?"Each saved file starts with who wrote it, so it still makes sense in Drive without this app.":"Nothing is uploaded until you pick one of the two backups below.")}(t),t}const x=()=>I("sign in with Google",()=>w("driveSignIn"),{after:e=>e&&e.ok?C():null,say:e=>e.ok?"signed in"+(e.username?` as ${e.username}`:""):`sign-in failed: ${e.error}`}),A=()=>I("connect Google Drive",()=>w("driveConnect"),{after:e=>e&&e.ok?C():null,say:e=>e.ok?"Google Drive connected"+(e.email?` · ${e.email}`:""):`could not connect: ${e.error}`}),D=()=>I("back up all memory to Drive",()=>w("driveSyncMemory"),{say:e=>e.ok?`backed up all ${e.count} memory entr${1===e.count?"y":"ies"}${e.author?` · authored ${e.author}`:""}${e.webViewLink?` → ${e.webViewLink}`:""}`:`backup failed: ${e.error}`}),N=()=>I("back up this conversation to Drive",()=>w("driveBackupConversation",{sessionId:B()}),{say:e=>e.ok?`saved ${e.title?`“${e.title}”`:"this conversation"}${e.author?` · authored ${e.author}`:""}${e.webViewLink?` → ${e.webViewLink}`:""}`:`could not save this conversation: ${e.error}`});function V(t){const n=b(e.vaultList);if(n){n.textContent="";for(const e of i(t)){const t=y.createElement("li");t.className="fp-vault-row";const a=y.createElement("span");if(a.className="fp-vault-name",a.textContent=e.name,t.appendChild(a),e.detail){const n=y.createElement("span");n.className="fp-vault-detail",n.textContent=e.detail,t.appendChild(n)}n.appendChild(t)}}}async function L(){return g.status=await w("fingerprintStatus"),function(){const i=g.status,r=b(e.cardStatus);r&&(r.textContent=n(i));const s=b(e.keySource),l=b(e.keyPath),u=b(e.keyTag),c=b(e.keyWarning),d=b(e.vaultTarget),f=a(i),p=e=>{const t=f.find(t=>t.k===e);return t?t.v:"–"};if(s&&(s.textContent=p("source")),l&&(l.textContent=i&&i.keyPath?i.keyPath:p("expected at")),u&&(u.textContent=i&&i.configured?t(i.keyFingerprint):"none"),c){const e=o(i);c.textContent=e,c.hidden=!e}d&&i&&i.vault?
4
4
  // not where anything goes — printing `gdrive:AEGIS-AGPL/records` for a
5
- d.textContent="off"===i.vault.backend?"nothing — sync is off":"aegiscloud"===i.vault.backend?`aegiscloud:${t(i.vault.recordsDir)}`:`${t(i.vault.remote)}:${t(i.vault.recordsDir||i.vault.root)}`:d&&(d.textContent="–");const k=b(e.keygen);k&&(k.textContent=i&&i.configured?"Replace key…":"Mint key")}(),await O(),await m(),await C(),g.status}function M(t){if(!t||"object"!=typeof t)return;const n=b(e.autoSeal);n&&(n.checked=!0===t.enabled);const a=b(e.autoSealLabel);a&&(a.textContent=t.enabled?"sealing automatically when quiet":"seal automatically when quiet");const o=b(e.autoHint);o&&(o.textContent=c(t))}async function O(){if(!v||"function"!=typeof v.status){const t=b(e.autoHint);return t&&(t.textContent="this build has no automation bridge — sealing stays a button"),null}try{const e=await v.status();return e&&e.mint&&M(e.mint),e}catch(t){const n=b(e.autoHint);return n&&(n.textContent=`automation status unavailable: ${t&&t.message||String(t)}`),null}}async function P(){const n=Boolean(b(e.publishOnMint)&&b(e.publishOnMint).checked);return I("seal now",(async()=>v&&"function"==typeof v.sealNow?v.sealNow(n):{ok:!1,error:"this build has no automation bridge"}),{paint:e=>{e&&e.ok&&e.out&&(g.last={file:e.out,record:e.record||null})},say:e=>{if(!e)return"seal now: nothing happened";if(!1===e.ok)return`seal failed: ${e.error||"unknown"}`;if("skip"===e.type)return`nothing to seal (${e.reason||"no new turns"})`;const n=u(e);return n.ok?`sealed ${t((e.record||{}).id)} → ${t(e.out)}`:`seal failed: ${n.text}`}})}async function I(e,t,n){const a=n||{};if(g.busy)return null;g.busy=!0,$(`${e}…`,!1);try{const n=await t();return a.paint&&a.paint(n),a.after&&await a.after(n),$(a.say?a.say(n):`${e}: ${n&&!1===n.ok?n.error:"done"}`,Boolean(n&&!1===n.ok)),n}finally{g.busy=!1}}const E=()=>I("mint key",(()=>w("fingerprintKeygen",{force:Boolean(g.status&&g.status.configured)})),{after:L,say:e=>e.ok?`minted ${t(e.keyFingerprint)} at ${t(e.path)}`:`mint failed: ${e.error}`}),T=()=>{const e=b("model-select");return e&&e.value?e.value:null},j=()=>I("seal session",(()=>w("fingerprintMint",{label:b(e.label)&&b(e.label).value.trim()||null,publish:Boolean(b(e.publishOnMint)&&b(e.publishOnMint).checked),model:T()})),{paint:e=>{e.ok&&(g.last={file:e.out,record:e.record})},say:e=>{const n=u(e);return n.ok?`sealed ${t((e.record||{}).id)} → ${t(e.out)}`:`seal failed: ${n.text}`}}),F=()=>I("verify",(async()=>g.last&&g.last.file?w("fingerprintVerify",{file:g.last.file}):g.last&&g.last.record?w("fingerprintVerify",{record:g.last.record}):{ok:!1,error:"nothing sealed in this window yet — seal a session first"}),{say:e=>e.ok?`verified ${t(e.id)} · key ${t(e.keySource)}`:`not verified: ${e.error||e.reason}`}),G=()=>I("publish",(()=>g.last&&g.last.file?w("fingerprintPublish",{file:g.last.file}):g.last&&g.last.record?w("fingerprintPublish",{record:g.last.record}):{ok:!1,error:"nothing sealed in this window yet — seal a session first"}),{say:e=>e.ok?`published ${t(e.url||e.path)}${e.sha256?` · sha256 ${String(e.sha256).slice(0,12)}`:""}`:`publish failed: ${e.error}`}),H=()=>I("check anchor",(()=>g.last&&g.last.file?w("fingerprintAnchor",{file:g.last.file}):w("fingerprintAnchor",{})),{say:e=>{const t=s(e),n=t.claims.map((e=>`${e.k} ${!0===e.v?"yes":!1===e.v?"no":"unknown"}`)).join(" · ");return`${t.label}${n?` — ${n}`:""}`}}),K=()=>I("back up key",(()=>{const t=b(e.backupTo)&&b(e.backupTo).value.trim();return t?w("fingerprintBackup",{to:t}):{ok:!1,error:"backup needs a destination directory"}}),{say:e=>e.ok?`key copied to ${t(e.to||e.path)}`:`backup refused: ${e.error}`}),q=()=>I("list vault",(()=>w("fingerprintVault")),{paint:V,say:e=>e.ok?`vault listed — ${i(e).length} entry(ies)`:`vault unavailable: ${e.error}`}),R=()=>I("audit vault",(()=>w("fingerprintVaultAudit")),{say:e=>{const t=l(e),n=t.findings.map((e=>e&&(e.path||e.name)||String(e))).slice(0,3);return`${t.label}${n.length?` — ${n.join(", ")}`:""}`}});async function W(t){const n=b(e.overlay);if(!n)return;if(n.hidden=!1,y.body&&y.body.classList&&y.body.classList.add("fp-open"),await L(),await q(),t&&"drive"===t.focus){const t=b(e.driveStatus);t&&t.scrollIntoView&&t.scrollIntoView({block:"center"});const n=[e.driveSignIn,e.driveConnect,e.driveBackupChat,e.driveSyncNow].map(b).find((e=>e&&!e.disabled));return void(n&&n.focus())}const a=b(e.close);a&&a.focus()}function z(){const t=b(e.overlay);if(!t)return;t.hidden=!0,y.body&&y.body.classList&&y.body.classList.remove("fp-open");const n=b(e.cardOpen);n&&n.focus()}const J=(e,t,n)=>{const a=b(e);a&&a.addEventListener(t,n)};return J(e.cardOpen,"click",W),J(e.close,"click",z),J(e.backdrop,"click",z),J(e.keygen,"click",E),J(e.seal,"click",j),J(e.sealCard,"click",(async()=>{const e=await j();e&&e.ok&&await W()})),J(e.verify,"click",F),J(e.publish,"click",G),J(e.anchor,"click",H),J(e.backup,"click",K),J(e.vault,"click",q),J(e.audit,"click",R),J(e.vaultBackendDrive,"click",(()=>S("drive"))),J(e.vaultBackendCloud,"click",(()=>S("aegiscloud"))),J(e.vaultBackendOff,"click",(()=>S("off"))),J(e.driveSignIn,"click",x),J(e.driveConnect,"click",A),J(e.driveSyncNow,"click",D),J(e.driveBackupChat,"click",N),b(e.autoSeal)&&J(e.autoSeal,"change",(()=>{const t=b(e.autoSeal);return async function(t){if(!v||"function"!=typeof v.setMint)return null;const n=Boolean(b(e.publishOnMint)&&b(e.publishOnMint).checked);try{const e=await v.setMint({enabled:Boolean(t),publish:n});return e&&e.mint?M(e.mint):e&&!1===e.ok&&$(e.error||"could not save that",!0),e}catch(e){return $(`could not save that: ${e&&e.message||String(e)}`,!0),null}}(Boolean(t&&t.checked))})),b(e.sealNow)&&J(e.sealNow,"click",P),{open:W,close:z,isOpen:()=>{const t=b(e.overlay);return Boolean(t)&&!t.hidden},refresh:L,loadAutoMint:O,state:g,actions:{doKeygen:E,doSeal:j,doSealNow:P,doVerify:F,doPublish:G,doAnchor:H,doBackup:K,doVault:q,doAudit:R,doSetVaultBackend:S,doDriveSignIn:x,doDriveConnect:A,doDriveSyncNow:D,doDriveBackupChat:N},loadVaultBackend:m,loadDriveStatus:C}},keyLine:n,statusRows:a,keyWarning:o,vaultRows:i,anchorVerdict:s,auditVerdict:l,sealLine:u,autoMintLine:c,driveLine:r,dash:t}}();"undefined"!=typeof module&&module.exports&&(module.exports=n),e&&(e.aegisFingerprint=n)}("undefined"!=typeof window?window:null);
5
+ d.textContent="off"===i.vault.backend?"nothing — sync is off":"aegiscloud"===i.vault.backend?`aegiscloud:${t(i.vault.recordsDir)}`:`${t(i.vault.remote)}:${t(i.vault.recordsDir||i.vault.root)}`:d&&(d.textContent="–");const k=b(e.keygen);k&&(k.textContent=i&&i.configured?"Replace key…":"Mint key")}(),await O(),await m(),await C(),g.status}function M(t){if(!t||"object"!=typeof t)return;const n=b(e.autoSeal);n&&(n.checked=!0===t.enabled);const a=b(e.autoSealLabel);a&&(a.textContent=t.enabled?"sealing automatically when quiet":"seal automatically when quiet");const o=b(e.autoHint);o&&(o.textContent=c(t))}async function O(){if(!v||"function"!=typeof v.status){const t=b(e.autoHint);return t&&(t.textContent="this build has no automation bridge — sealing stays a button"),null}try{const e=await v.status();return e&&e.mint&&M(e.mint),e}catch(t){const n=b(e.autoHint);return n&&(n.textContent=`automation status unavailable: ${t&&t.message||String(t)}`),null}}async function P(){const n=Boolean(b(e.publishOnMint)&&b(e.publishOnMint).checked);return I("seal now",async()=>v&&"function"==typeof v.sealNow?v.sealNow(n):{ok:!1,error:"this build has no automation bridge"},{paint:e=>{e&&e.ok&&e.out&&(g.last={file:e.out,record:e.record||null})},say:e=>{if(!e)return"seal now: nothing happened";if(!1===e.ok)return`seal failed: ${e.error||"unknown"}`;if("skip"===e.type)return`nothing to seal (${e.reason||"no new turns"})`;const n=u(e);return n.ok?`sealed ${t((e.record||{}).id)} → ${t(e.out)}`:`seal failed: ${n.text}`}})}async function I(e,t,n){const a=n||{};if(g.busy)return null;g.busy=!0,$(`${e}…`,!1);try{const n=await t();return a.paint&&a.paint(n),a.after&&await a.after(n),$(a.say?a.say(n):`${e}: ${n&&!1===n.ok?n.error:"done"}`,Boolean(n&&!1===n.ok)),n}finally{g.busy=!1}}const E=()=>I("mint key",()=>w("fingerprintKeygen",{force:Boolean(g.status&&g.status.configured)}),{after:L,say:e=>e.ok?`minted ${t(e.keyFingerprint)} at ${t(e.path)}`:`mint failed: ${e.error}`}),T=()=>{const e=b("model-select");return e&&e.value?e.value:null},j=()=>I("seal session",()=>w("fingerprintMint",{label:b(e.label)&&b(e.label).value.trim()||null,publish:Boolean(b(e.publishOnMint)&&b(e.publishOnMint).checked),model:T()}),{paint:e=>{e.ok&&(g.last={file:e.out,record:e.record})},say:e=>{const n=u(e);return n.ok?`sealed ${t((e.record||{}).id)} → ${t(e.out)}`:`seal failed: ${n.text}`}}),F=()=>I("verify",async()=>g.last&&g.last.file?w("fingerprintVerify",{file:g.last.file}):g.last&&g.last.record?w("fingerprintVerify",{record:g.last.record}):{ok:!1,error:"nothing sealed in this window yet — seal a session first"},{say:e=>e.ok?`verified ${t(e.id)} · key ${t(e.keySource)}`:`not verified: ${e.error||e.reason}`}),G=()=>I("publish",()=>g.last&&g.last.file?w("fingerprintPublish",{file:g.last.file}):g.last&&g.last.record?w("fingerprintPublish",{record:g.last.record}):{ok:!1,error:"nothing sealed in this window yet — seal a session first"},{say:e=>e.ok?`published ${t(e.url||e.path)}${e.sha256?` · sha256 ${String(e.sha256).slice(0,12)}`:""}`:`publish failed: ${e.error}`}),H=()=>I("check anchor",()=>g.last&&g.last.file?w("fingerprintAnchor",{file:g.last.file}):w("fingerprintAnchor",{}),{say:e=>{const t=s(e),n=t.claims.map(e=>`${e.k} ${!0===e.v?"yes":!1===e.v?"no":"unknown"}`).join(" · ");return`${t.label}${n?` — ${n}`:""}`}}),K=()=>I("back up key",()=>{const t=b(e.backupTo)&&b(e.backupTo).value.trim();return t?w("fingerprintBackup",{to:t}):{ok:!1,error:"backup needs a destination directory"}},{say:e=>e.ok?`key copied to ${t(e.to||e.path)}`:`backup refused: ${e.error}`}),q=()=>I("list vault",()=>w("fingerprintVault"),{paint:V,say:e=>e.ok?`vault listed — ${i(e).length} entry(ies)`:`vault unavailable: ${e.error}`}),R=()=>I("audit vault",()=>w("fingerprintVaultAudit"),{say:e=>{const t=l(e),n=t.findings.map(e=>e&&(e.path||e.name)||String(e)).slice(0,3);return`${t.label}${n.length?` — ${n.join(", ")}`:""}`}});async function W(t){const n=b(e.overlay);if(!n)return;if(n.hidden=!1,y.body&&y.body.classList&&y.body.classList.add("fp-open"),await L(),await q(),t&&"drive"===t.focus){const t=b(e.driveStatus);t&&t.scrollIntoView&&t.scrollIntoView({block:"center"});const n=[e.driveSignIn,e.driveConnect,e.driveBackupChat,e.driveSyncNow].map(b).find(e=>e&&!e.disabled);return void(n&&n.focus())}const a=b(e.close);a&&a.focus()}function z(){const t=b(e.overlay);if(!t)return;t.hidden=!0,y.body&&y.body.classList&&y.body.classList.remove("fp-open");const n=b(e.cardOpen);n&&n.focus()}const J=(e,t,n)=>{const a=b(e);a&&a.addEventListener(t,n)};return J(e.cardOpen,"click",W),J(e.close,"click",z),J(e.backdrop,"click",z),J(e.keygen,"click",E),J(e.seal,"click",j),J(e.sealCard,"click",async()=>{const e=await j();e&&e.ok&&await W()}),J(e.verify,"click",F),J(e.publish,"click",G),J(e.anchor,"click",H),J(e.backup,"click",K),J(e.vault,"click",q),J(e.audit,"click",R),J(e.vaultBackendDrive,"click",()=>S("drive")),J(e.vaultBackendCloud,"click",()=>S("aegiscloud")),J(e.vaultBackendOff,"click",()=>S("off")),J(e.driveSignIn,"click",x),J(e.driveConnect,"click",A),J(e.driveSyncNow,"click",D),J(e.driveBackupChat,"click",N),b(e.autoSeal)&&J(e.autoSeal,"change",()=>{const t=b(e.autoSeal);return async function(t){if(!v||"function"!=typeof v.setMint)return null;const n=Boolean(b(e.publishOnMint)&&b(e.publishOnMint).checked);try{const e=await v.setMint({enabled:Boolean(t),publish:n});return e&&e.mint?M(e.mint):e&&!1===e.ok&&$(e.error||"could not save that",!0),e}catch(e){return $(`could not save that: ${e&&e.message||String(e)}`,!0),null}}(Boolean(t&&t.checked))}),b(e.sealNow)&&J(e.sealNow,"click",P),{open:W,close:z,isOpen:()=>{const t=b(e.overlay);return Boolean(t)&&!t.hidden},refresh:L,loadAutoMint:O,state:g,actions:{doKeygen:E,doSeal:j,doSealNow:P,doVerify:F,doPublish:G,doAnchor:H,doBackup:K,doVault:q,doAudit:R,doSetVaultBackend:S,doDriveSignIn:x,doDriveConnect:A,doDriveSyncNow:D,doDriveBackupChat:N},loadVaultBackend:m,loadDriveStatus:C}},keyLine:n,statusRows:a,keyWarning:o,vaultRows:i,anchorVerdict:s,auditVerdict:l,sealLine:u,autoMintLine:c,driveLine:r,dash:t}}();"undefined"!=typeof module&&module.exports&&(module.exports=t),e&&(e.aegisFingerprint=t)}("undefined"!=typeof window?window:null);
@@ -12,17 +12,24 @@
12
12
  <!-- No external origins. The UI fonts are vendored in ./fonts/, so the window
13
13
  draws the same faces on every platform with the network down; see
14
14
  fonts/NOTICE.md. `font-src 'self'` is what allows them, and is why the
15
- old fonts.googleapis.com / fonts.gstatic.com allowances are gone. -->
15
+ old fonts.googleapis.com / fonts.gstatic.com allowances are gone.
16
+
17
+ `frame-src 'self'` is the embedded terminal (ON9b): xterm.js cannot
18
+ render under `style-src 'self'` — it injects a <style> element and sets
19
+ style attributes, and Chromium drops both silently, leaving the terminal
20
+ in the UI font with its spacing collapsed. Rather than relax the policy
21
+ for this document, the terminal gets one of its own (pty-frame.html,
22
+ which is where vendor/xterm.{js,css} are now loaded); `default-src
23
+ 'none'` would otherwise refuse to frame it. -->
16
24
  <meta
17
25
  http-equiv="Content-Security-Policy"
18
- content="default-src 'none'; script-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' data:"
26
+ content="default-src 'none'; script-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' data:; frame-src 'self'"
19
27
  />
20
28
  <title>aegis one</title>
21
29
  <link rel="stylesheet" href="fonts/fonts.css" />
22
30
  <link rel="stylesheet" href="style.css" />
23
31
  <link rel="stylesheet" href="fingerprint.css" />
24
32
  <link rel="stylesheet" href="avatar/avatar.css" />
25
- <link rel="stylesheet" href="vendor/xterm.css" />
26
33
  </head>
27
34
  <body data-aegis-theme="default">
28
35
  <header class="topbar">
@@ -2022,7 +2029,6 @@
2022
2029
  <script src="library.js"></script>
2023
2030
  <script src="vendor/marked.umd.js"></script>
2024
2031
  <script src="vendor/purify.min.js"></script>
2025
- <script src="vendor/xterm.js"></script>
2026
2032
  <script src="pty-panel.js"></script>
2027
2033
  <script src="vendor/aegis-highlight.js"></script>
2028
2034
  <script src="markdown.js"></script>