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";!function(e,t){const n=function(){const e=6e4,t=60*e,n=24*t;function r(e){const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}function s(e){const t=e&&Number(e.updatedAt);return Number.isFinite(t)&&t>0?t:0}const o=["January","February","March","April","May","June","July","August","September","October","November","December"];function i(e,t){if(!e)return{key:"undated",label:"Undated",rank:1e9};const s=r(t),i=r(e);if(i>=s)return{key:"today",label:"Today",rank:0};if(i>=s-n)return{key:"yesterday",label:"Yesterday",rank:1};if(i>s-7*n)return{key:"week",label:"Previous 7 days",rank:2};if(i>s-30*n)return{key:"month",label:"Previous 30 days",rank:3};const u=new Date(e),a=`${o[u.getMonth()]} ${u.getFullYear()}`,l=new Date(t),c=12*(l.getFullYear()-u.getFullYear())+(l.getMonth()-u.getMonth());return{key:`m${u.getFullYear()}-${u.getMonth()}`,label:a,rank:4+Math.max(0,c)}}function u(e){const t=Array.isArray(e&&e.messages)?e.messages:[];for(const e of t)if(e&&"user"===e.role&&"string"==typeof e.content&&e.content.trim())return e.content.trim();return e&&"string"==typeof e.firstPrompt?e.firstPrompt.trim():""}function a(e,t){const n=String(e).replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function l(e){const t=String(e&&e.cwd||e&&e.dir||"");if(!t)return"";const n=t.split(/[\\/]/).filter(Boolean);return n.length?n[n.length-1]:""}function c(e){const t=Array.isArray(e&&e.messages)?e.messages:null;if(t)return t.length;const n=Number(e&&e.messages);return Number.isFinite(n)&&n>=0?n:0}function f(s,i){const u=Number.isFinite(i)?i:Date.now();if(!s)return"";const a=u-s;if(a<0)return"just now";if(a<e)return"just now";if(a<t)return`${Math.floor(a/e)}m ago`;if(a<n)return`${Math.floor(a/t)}h ago`;const l=Math.round((r(u)-r(s))/n);if(l<=1)return"yesterday";if(l<7)return`${l}d ago`;const c=new Date(s),f=c.getFullYear()===new Date(u).getFullYear(),g=o[c.getMonth()].slice(0,3);return f?`${c.getDate()} ${g}`:`${c.getDate()} ${g} ${c.getFullYear()}`}return{IDS:{list:"sessions-list",filter:"sessions-filter",count:"sessions-count",hint:"sessions-hint"},groupSessions:function(e,t){const n=Number.isFinite(t)?t:Date.now(),r=Array.isArray(e)?e.filter(Boolean):[],o=new Map;for(const e of r){const t=i(s(e),n);let r=o.get(t.key);r||(r={key:t.key,label:t.label,rank:t.rank,sessions:[]},o.set(t.key,r)),r.sessions.push(e)}return[...o.values()].sort(((e,t)=>e.rank-t.rank))},bucketOf:i,sessionTitle:function(e){const t=String(e&&e.title||"").trim();if(t)return a(t,80);const n=u(e);if(n)return a(n,80);const r=String(e&&e.id||"").trim();return r?`untitled · ${r.slice(0,8)}`:"untitled"},sessionMeta:function(e,t){const n=[],r=c(e);r&&n.push(`${r} msg${1===r?"":"s"}`);const o=f(s(e),t);o&&n.push(o);const i=l(e);return i&&n.push(i),e&&!0===e.pending&&n.push("unsynced"),n.join(" · ")},projectOf:l,messageCount:c,firstPrompt:u,filterSessions:function(e,t){const n=String(null==e?"":e).trim().toLowerCase(),r=Array.isArray(t)?t.filter(Boolean):[];return n?r.filter((e=>[String(e&&e.title||""),u(e),String(e&&e.cwd||e&&e.dir||""),String(e&&e.id||"")].join("\n").toLowerCase().includes(n))):r},countLabel:function(e,t){const n=Number(t)||0,r=Number(e)||0;return n?r===n?`${n} conversation${1===n?"":"s"}`:`${r} of ${n}`:""},relTime:f,collapse:a,startOfDay:r}}();"undefined"!=typeof module&&module.exports&&(module.exports=n),e&&(e.aegisLibrary=n)}("undefined"!=typeof window?window:null);
3
+ "use strict";!function(e){const t=function(){const e=36e5,t=24*e;function n(e){const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}function r(e){const t=e&&Number(e.updatedAt);return Number.isFinite(t)&&t>0?t:0}const s=["January","February","March","April","May","June","July","August","September","October","November","December"];function o(e,r){if(!e)return{key:"undated",label:"Undated",rank:1e9};const o=n(r),i=n(e);if(i>=o)return{key:"today",label:"Today",rank:0};if(i>=o-t)return{key:"yesterday",label:"Yesterday",rank:1};if(i>o-7*t)return{key:"week",label:"Previous 7 days",rank:2};if(i>o-30*t)return{key:"month",label:"Previous 30 days",rank:3};const u=new Date(e),a=`${s[u.getMonth()]} ${u.getFullYear()}`,l=new Date(r),c=12*(l.getFullYear()-u.getFullYear())+(l.getMonth()-u.getMonth());return{key:`m${u.getFullYear()}-${u.getMonth()}`,label:a,rank:4+Math.max(0,c)}}function i(e){const t=Array.isArray(e&&e.messages)?e.messages:[];for(const e of t)if(e&&"user"===e.role&&"string"==typeof e.content&&e.content.trim())return e.content.trim();return e&&"string"==typeof e.firstPrompt?e.firstPrompt.trim():""}function u(e,t){const n=String(e).replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function a(e){const t=String(e&&e.cwd||e&&e.dir||"");if(!t)return"";const n=t.split(/[\\/]/).filter(Boolean);return n.length?n[n.length-1]:""}function l(e){const t=Array.isArray(e&&e.messages)?e.messages:null;if(t)return t.length;const n=Number(e&&e.messages);return Number.isFinite(n)&&n>=0?n:0}function c(r,o){const i=Number.isFinite(o)?o:Date.now();if(!r)return"";const u=i-r;if(u<0)return"just now";if(u<6e4)return"just now";if(u<e)return`${Math.floor(u/6e4)}m ago`;if(u<t)return`${Math.floor(u/e)}h ago`;const a=Math.round((n(i)-n(r))/t);if(a<=1)return"yesterday";if(a<7)return`${a}d ago`;const l=new Date(r),c=l.getFullYear()===new Date(i).getFullYear(),f=s[l.getMonth()].slice(0,3);return c?`${l.getDate()} ${f}`:`${l.getDate()} ${f} ${l.getFullYear()}`}return{IDS:{list:"sessions-list",filter:"sessions-filter",count:"sessions-count",hint:"sessions-hint"},groupSessions:function(e,t){const n=Number.isFinite(t)?t:Date.now(),s=Array.isArray(e)?e.filter(Boolean):[],i=new Map;for(const e of s){const t=o(r(e),n);let s=i.get(t.key);s||(s={key:t.key,label:t.label,rank:t.rank,sessions:[]},i.set(t.key,s)),s.sessions.push(e)}return[...i.values()].sort((e,t)=>e.rank-t.rank)},bucketOf:o,sessionTitle:function(e){const t=String(e&&e.title||"").trim();if(t)return u(t,80);const n=i(e);if(n)return u(n,80);const r=String(e&&e.id||"").trim();return r?`untitled · ${r.slice(0,8)}`:"untitled"},sessionMeta:function(e,t){const n=[],s=l(e);s&&n.push(`${s} msg${1===s?"":"s"}`);const o=c(r(e),t);o&&n.push(o);const i=a(e);return i&&n.push(i),e&&!0===e.pending&&n.push("unsynced"),n.join(" · ")},projectOf:a,messageCount:l,firstPrompt:i,filterSessions:function(e,t){const n=String(null==e?"":e).trim().toLowerCase(),r=Array.isArray(t)?t.filter(Boolean):[];return n?r.filter(e=>[String(e&&e.title||""),i(e),String(e&&e.cwd||e&&e.dir||""),String(e&&e.id||"")].join("\n").toLowerCase().includes(n)):r},countLabel:function(e,t){const n=Number(t)||0,r=Number(e)||0;return n?r===n?`${n} conversation${1===n?"":"s"}`:`${r} of ${n}`:""},relTime:c,collapse:u,startOfDay:n}}();"undefined"!=typeof module&&module.exports&&(module.exports=t),e&&(e.aegisLibrary=t)}("undefined"!=typeof window?window:null);
@@ -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(t,e){const n=function(){function t(t){if("string"!=typeof t||!t)return!1;try{const e=new URL(t);return"http:"===e.protocol||"https:"===e.protocol}catch{return!1}}function e(t){const e=/language-([\w-]+)/.exec(t||"");return e?e[1]:""}let n=!1;function o(t){const e="undefined"!=typeof window?window.marked:null;return e&&"function"==typeof e.parse?(function(t){n||(t.setOptions({gfm:!0,breaks:!1}),n=!0)}(e),e.parse(null==t?"":String(t))):null}function r(t){const n=t.querySelector("code");if(!n)return;const o=e(n.className),r=n.textContent||"",i="undefined"!=typeof window?window.AegisHighlight:null;i&&(n.innerHTML=i.highlight(r,o)),t.classList.add("code-block");const l=document.createElement("button");l.type="button",l.className="code-copy-btn",l.textContent="copy",l.addEventListener("click",(()=>{navigator.clipboard.writeText(r).then((()=>{l.textContent="copied!",setTimeout((()=>{l.textContent="copy"}),1500)}),(()=>{l.textContent="copy failed",setTimeout((()=>{l.textContent="copy"}),1500)}))})),t.appendChild(l)}return{renderInto:function(e,n){const i=o(n),l=null==i?null:function(t){const e="undefined"!=typeof window?window.DOMPurify:null;return e&&"function"==typeof e.sanitize?e.sanitize(t,{ALLOWED_URI_REGEXP:/^(?:https?:|#)/i}):null}(i);if(null!=l){e.innerHTML=l;for(const t of e.querySelectorAll("pre"))r(t);!function(e){const n="undefined"!=typeof window?window.aegis:null,o=e.querySelectorAll("a[href]");for(const e of o){const o=e.getAttribute("href");e.removeAttribute("target"),e.setAttribute("rel","noopener noreferrer"),t(o)?e.addEventListener("click",(t=>{t.preventDefault(),n&&"function"==typeof n.openExternal&&n.openExternal(o)})):e.removeAttribute("href")}}(e)}else e.textContent=null==n?"":String(n)},isExternalHref:t,langFromClassName:e}}();"object"==typeof module&&module.exports?module.exports=n:t.AegisMarkdown=n}("undefined"!=typeof globalThis?globalThis:this);
3
+ "use strict";!function(t){const e=function(){function t(t){if("string"!=typeof t||!t)return!1;try{const e=new URL(t);return"http:"===e.protocol||"https:"===e.protocol}catch{return!1}}function e(t){const e=/language-([\w-]+)/.exec(t||"");return e?e[1]:""}let n=!1;function o(t){const e="undefined"!=typeof window?window.marked:null;return e&&"function"==typeof e.parse?(function(t){n||(t.setOptions({gfm:!0,breaks:!1}),n=!0)}(e),e.parse(null==t?"":String(t))):null}function r(t){const n=t.querySelector("code");if(!n)return;const o=e(n.className),r=n.textContent||"",i="undefined"!=typeof window?window.AegisHighlight:null;i&&(n.innerHTML=i.highlight(r,o)),t.classList.add("code-block");const l=document.createElement("button");l.type="button",l.className="code-copy-btn",l.textContent="copy",l.addEventListener("click",()=>{navigator.clipboard.writeText(r).then(()=>{l.textContent="copied!",setTimeout(()=>{l.textContent="copy"},1500)},()=>{l.textContent="copy failed",setTimeout(()=>{l.textContent="copy"},1500)})}),t.appendChild(l)}return{renderInto:function(e,n){const i=o(n),l=null==i?null:function(t){const e="undefined"!=typeof window?window.DOMPurify:null;return e&&"function"==typeof e.sanitize?e.sanitize(t,{ALLOWED_URI_REGEXP:/^(?:https?:|#)/i}):null}(i);if(null!=l){e.innerHTML=l;for(const t of e.querySelectorAll("pre"))r(t);!function(e){const n="undefined"!=typeof window?window.aegis:null,o=e.querySelectorAll("a[href]");for(const e of o){const o=e.getAttribute("href");e.removeAttribute("target"),e.setAttribute("rel","noopener noreferrer"),t(o)?e.addEventListener("click",t=>{t.preventDefault(),n&&"function"==typeof n.openExternal&&n.openExternal(o)}):e.removeAttribute("href")}}(e)}else e.textContent=null==n?"":String(n)},isExternalHref:t,langFromClassName:e}}();"object"==typeof module&&module.exports?module.exports=e:t.AegisMarkdown=e}("undefined"!=typeof globalThis?globalThis:this);
@@ -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 scoreCommand(e,n){const t=String(null==n?"":n).trim().toLowerCase();if(!t)return 1;const r=String(e.label||"").toLowerCase(),o=String(e.keywords||"").toLowerCase();return r.startsWith(t)?100:r.split(/[^a-z0-9]+/).filter(Boolean).some((e=>e.startsWith(t)))?70:r.includes(t)?45:o.includes(t)?20:0}function filterCommands(e,n){const t=String(null==n?"":n).trim().toLowerCase(),r=Array.isArray(e)?e:[];if(!t)return r.slice();const o=[];for(let e=0;e<r.length;e+=1){const n=r[e],i=scoreCommand(n,t);i>0&&o.push({cmd:n,score:i,index:e})}return o.sort(((e,n)=>n.score-e.score||e.index-n.index)),o.map((e=>e.cmd))}function initialIndex(e){return Array.isArray(e)&&e.length?0:-1}function moveIndex(e,n,t){if(!n||n<1)return-1;if(e<0)return t>0?0:n-1;const r=e+t;return r<0?n-1:r>=n?0:r}!function(){const e={scoreCommand:scoreCommand,filterCommands:filterCommands,initialIndex:initialIndex,moveIndex:moveIndex};"undefined"!=typeof module&&module.exports&&(module.exports=e),globalThis.AegisPaletteFilter=e}();
3
+ "use strict";function scoreCommand(e,n){const t=String(null==n?"":n).trim().toLowerCase();if(!t)return 1;const r=String(e.label||"").toLowerCase(),o=String(e.keywords||"").toLowerCase();return r.startsWith(t)?100:r.split(/[^a-z0-9]+/).filter(Boolean).some(e=>e.startsWith(t))?70:r.includes(t)?45:o.includes(t)?20:0}function filterCommands(e,n){const t=String(null==n?"":n).trim().toLowerCase(),r=Array.isArray(e)?e:[];if(!t)return r.slice();const o=[];for(let e=0;e<r.length;e+=1){const n=r[e],i=scoreCommand(n,t);i>0&&o.push({cmd:n,score:i,index:e})}return o.sort((e,n)=>n.score-e.score||e.index-n.index),o.map(e=>e.cmd)}function initialIndex(e){return Array.isArray(e)&&e.length?0:-1}function moveIndex(e,n,t){if(!n||n<1)return-1;if(e<0)return t>0?0:n-1;const r=e+t;return r<0?n-1:r>=n?0:r}!function(){const e={scoreCommand:scoreCommand,filterCommands:filterCommands,initialIndex:initialIndex,moveIndex:moveIndex};"undefined"!=typeof module&&module.exports&&(module.exports=e),globalThis.AegisPaletteFilter=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(){if("undefined"==typeof window)return;const e=window.aegisProviders;if(!e)return;const t=window.aegisProviderMark;function n(e,t,n){const l=document.createElement(e);return t&&(l.className=t),null!=n&&(l.textContent=n),l}window.aegisProviderToolbar={mount:function(l){const o=l||{};let i=[];function r(l){const i=n("li","pt-row");if(l.selectable){const r=n("button","pt-pick");r.type="button";const d=n("div","pt-head");if(t&&"function"==typeof t.build){const e="local"===l.class?"ollama":l.provider||"",n=t.build(document,l.model,l.classLabel,e);n.el.classList.add("pt-mark"),d.appendChild(n.el)}d.appendChild(n("span","pt-model",l.modelLabel||l.model)),r.appendChild(d),l.model&&l.modelLabel&&l.modelLabel!==l.model&&r.appendChild(n("span","pt-id",l.model)),r.appendChild(n("span","pt-target",l.url?`${l.method} ${l.url}`:"no network route — runs as a local process")),r.addEventListener("click",(()=>{o.onSelect&&o.onSelect(e.selectionFor(l))})),i.appendChild(r)}else i.appendChild(n("span","pt-model pt-muted",l.modelLabel)),i.appendChild(n("span","pt-target",l.url?`${l.method} ${l.url}`:"—"));return l.billing&&i.appendChild(n("span","pt-billing",l.billing)),l.blocked&&i.appendChild(n("span","pt-blocked",l.blocked)),i}function d(t){const l=e.filterEntries(i,t);if(o.count&&(o.count.textContent=i.length?`${l.length} of ${i.length} provider route${1===i.length?"":"s"}`:"no providers reported"),o.list){o.list.innerHTML="";let e=null,t=null;for(const i of l){if(i.group!==e){e=i.group;const l=n("li","pt-group");l.appendChild(n("h3","pt-group-title",e)),t=n("ul","pt-rows"),l.appendChild(t),o.list.appendChild(l)}t.appendChild(r(i))}l.length||o.list.appendChild(n("li","pt-empty",i.length?"No provider or model matches that filter.":"No provider paths yet — press Refresh once a key is saved."))}if(o.hint&&t&&l.length){const e=l.filter((e=>e.url&&!/localhost|127\.0\.0\.1/.test(e.url))).length,t=l.filter((e=>e.url&&/localhost|127\.0\.0\.1/.test(e.url))).length,n=l.filter((e=>!e.url)).length;o.hint.textContent=[e?`${e} over the network`:"",t?`${t} on this machine`:"",n?`${n} with no route`:""].filter(Boolean).join(" · ")}else o.hint&&!t&&(o.hint.textContent=i.length?"Every provider this build can address, and the URL a turn to it uses.":"")}return o.search&&o.search.addEventListener("input",(()=>d(o.search.value))),{set:t=>(i=e.buildProviderPaths(t),d(o.search?o.search.value:""),i),entries:()=>i.slice()}}}}();
3
+ "use strict";!function(){if("undefined"==typeof window)return;const e=window.aegisProviders;if(!e)return;const t=window.aegisProviderMark;function n(e,t,n){const l=document.createElement(e);return t&&(l.className=t),null!=n&&(l.textContent=n),l}window.aegisProviderToolbar={mount:function(l){const o=l||{};let i=[];function r(l){const i=n("li","pt-row");if(l.selectable){const r=n("button","pt-pick");r.type="button";const d=n("div","pt-head");if(t&&"function"==typeof t.build){const e="local"===l.class?"ollama":l.provider||"",n=t.build(document,l.model,l.classLabel,e);n.el.classList.add("pt-mark"),d.appendChild(n.el)}d.appendChild(n("span","pt-model",l.modelLabel||l.model)),r.appendChild(d),l.model&&l.modelLabel&&l.modelLabel!==l.model&&r.appendChild(n("span","pt-id",l.model)),r.appendChild(n("span","pt-target",l.url?`${l.method} ${l.url}`:"no network route — runs as a local process")),r.addEventListener("click",()=>{o.onSelect&&o.onSelect(e.selectionFor(l))}),i.appendChild(r)}else i.appendChild(n("span","pt-model pt-muted",l.modelLabel)),i.appendChild(n("span","pt-target",l.url?`${l.method} ${l.url}`:"—"));return l.billing&&i.appendChild(n("span","pt-billing",l.billing)),l.blocked&&i.appendChild(n("span","pt-blocked",l.blocked)),i}function d(t){const l=e.filterEntries(i,t);if(o.count&&(o.count.textContent=i.length?`${l.length} of ${i.length} provider route${1===i.length?"":"s"}`:"no providers reported"),o.list){o.list.innerHTML="";let e=null,t=null;for(const i of l){if(i.group!==e){e=i.group;const l=n("li","pt-group");l.appendChild(n("h3","pt-group-title",e)),t=n("ul","pt-rows"),l.appendChild(t),o.list.appendChild(l)}t.appendChild(r(i))}l.length||o.list.appendChild(n("li","pt-empty",i.length?"No provider or model matches that filter.":"No provider paths yet — press Refresh once a key is saved."))}if(o.hint&&t&&l.length){const e=l.filter(e=>e.url&&!/localhost|127\.0\.0\.1/.test(e.url)).length,t=l.filter(e=>e.url&&/localhost|127\.0\.0\.1/.test(e.url)).length,n=l.filter(e=>!e.url).length;o.hint.textContent=[e?`${e} over the network`:"",t?`${t} on this machine`:"",n?`${n} with no route`:""].filter(Boolean).join(" · ")}else o.hint&&!t&&(o.hint.textContent=i.length?"Every provider this build can address, and the URL a turn to it uses.":"")}return o.search&&o.search.addEventListener("input",()=>d(o.search.value)),{set:t=>(i=e.buildProviderPaths(t),d(o.search?o.search.value:""),i),entries:()=>i.slice()}}}}();
@@ -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 POOLED_PATH="/api/v1/chat/completions",BYOK_PATH="/api/v1/byok/chat/completions",LOCAL_PATH="/v1/chat/completions",DEFAULT_CLOUD_BASE="https://aegiscloud.org",DEFAULT_LOCAL_BASE="http://localhost:11434";function joinUrl(e,l){const o="string"==typeof e?e.trim():"",r="string"==typeof l?l.trim():"";return o?/^https?:\/\//i.test(r)?r:r?`${o.replace(/\/+$/,"")}/${r.replace(/^\/+/,"")}`:o.replace(/\/+$/,""):""}function billingFor(e,l,o,r){if("pro"===e)return"Claude Code subscription — no AEGIS tokens spent";if("local"===e)return"free — runs on this machine";if("byok"===e){const e=r&&r.fee||null;return e&&e.require_balance?"your provider key pays the vendor; an AEGIS key and a funded balance pay the handling fee":"your provider key pays the vendor; an AEGIS key attributes the handling fee"}return"billed to your AEGIS account"}function blockedReason(e,l,o,r){return"aegis"===e&&r&&r.needsKey?"no AEGIS API key on this machine":"local"===e&&r&&r.needsDaemon?"no model server listening":"local"===e&&r&&!1===r.listed?"server answered but lists no models":"byok"===e&&o&&!1===o.configured?o.keyRejected?`provider key rejected: ${o.keyRejected}`:"no key saved for this provider":"pro"===e&&l&&!1===l.configured?"not signed in to Claude Code":null}function buildProviderPaths(e){const l=[],o=Array.isArray(e)?e:[];for(const e of o){if(!e||"string"!=typeof e.class)continue;const o=e.class,r={configured:!1!==e.classConfigured},i=e.list&&"object"==typeof e.list?e.list:null,n=Array.isArray(i&&i.models)?i.models:[],s=i&&(i.apiBase||i.baseURL)||DEFAULT_CLOUD_BASE,t=i&&i.baseURL||DEFAULT_LOCAL_BASE;if(n.length)for(const a of n){if(!a||!a.id)continue;const n="string"==typeof a.provider&&a.provider?a.provider:o;let d=null,c=null;"aegis"===o?(d=joinUrl(s,POOLED_PATH),c="POST"):"byok"===o?(d=joinUrl(s,BYOK_PATH),c="POST"):"local"===o&&(d=joinUrl(t,LOCAL_PATH),c="POST"),l.push({class:o,classLabel:e.classLabel||o,model:a.id,modelLabel:a.label||a.id,provider:n,uniqueModel:`${o}:${a.id}`,group:e.classLabel||o,url:d,method:c,billing:billingFor(o,r,a,i),blocked:blockedReason(o,r,a,i),selectable:!0})}else{const n="aegis"===o||"local"===o;l.push({class:o,classLabel:e.classLabel||o,model:"",modelLabel:"aegis"===o?"server default (auto)":"local"===o?"type a model tag in the Model card":"—",provider:"",uniqueModel:o,group:e.classLabel||o,url:n?joinUrl("local"===o?t:s,"local"===o?LOCAL_PATH:POOLED_PATH):null,method:n?"POST":null,billing:billingFor(o,r,null,i),blocked:blockedReason(o,r,null,i),selectable:!1})}}return l}function filterEntries(e,l){const o=Array.isArray(e)?e:[],r=String(null==l?"":l).trim().toLowerCase();if(!r)return o.slice();const i=r.split(/\s+/).filter(Boolean);return o.filter((e=>{const l=[e.model,e.modelLabel,e.provider,e.class,e.classLabel,e.url||""].join("\n").toLowerCase();return i.every((e=>l.includes(e)))}))}function selectionFor(e){return e?{class:e.class,model:"aegis"!==e.class||e.model?e.model:""}:null}"undefined"!=typeof module&&module.exports&&(module.exports={buildProviderPaths:buildProviderPaths,filterEntries:filterEntries,selectionFor:selectionFor,joinUrl:joinUrl,POOLED_PATH:POOLED_PATH,BYOK_PATH:BYOK_PATH,LOCAL_PATH:LOCAL_PATH}),"undefined"!=typeof window&&(window.aegisProviders={buildProviderPaths:buildProviderPaths,filterEntries:filterEntries,selectionFor:selectionFor,joinUrl:joinUrl,POOLED_PATH:POOLED_PATH,BYOK_PATH:BYOK_PATH,LOCAL_PATH:LOCAL_PATH});
3
+ "use strict";const POOLED_PATH="/api/v1/chat/completions",BYOK_PATH="/api/v1/byok/chat/completions",LOCAL_PATH="/v1/chat/completions",DEFAULT_CLOUD_BASE="https://aegiscloud.org",DEFAULT_LOCAL_BASE="http://localhost:11434";function joinUrl(e,o){const l="string"==typeof e?e.trim():"",r="string"==typeof o?o.trim():"";return l?/^https?:\/\//i.test(r)?r:r?`${l.replace(/\/+$/,"")}/${r.replace(/^\/+/,"")}`:l.replace(/\/+$/,""):""}function billingFor(e,o,l,r){if("pro"===e)return"Claude Code subscription — no AEGIS tokens spent";if("local"===e)return"free — runs on this machine";if("byok"===e){const e=r&&r.fee||null;return e&&e.require_balance?"your provider key pays the vendor; an AEGIS key and a funded balance pay the handling fee":"your provider key pays the vendor; an AEGIS key attributes the handling fee"}return"billed to your AEGIS account"}function blockedReason(e,o,l,r){return"aegis"===e&&r&&r.needsKey?"no AEGIS API key on this machine":"local"===e&&r&&r.needsDaemon?"no model server listening":"local"===e&&r&&!1===r.listed?"server answered but lists no models":"byok"===e&&l&&!1===l.configured?l.keyRejected?`provider key rejected: ${l.keyRejected}`:"no key saved for this provider":"pro"===e&&o&&!1===o.configured?"not signed in to Claude Code":null}function buildProviderPaths(e){const o=[],l=Array.isArray(e)?e:[];for(const e of l){if(!e||"string"!=typeof e.class)continue;const l=e.class,r={configured:!1!==e.classConfigured},n=e.list&&"object"==typeof e.list?e.list:null,i=Array.isArray(n&&n.models)?n.models:[],s=n&&(n.apiBase||n.baseURL)||DEFAULT_CLOUD_BASE,t=n&&n.baseURL||DEFAULT_LOCAL_BASE;if(!i.length){const i="aegis"===l||"local"===l;o.push({class:l,classLabel:e.classLabel||l,model:"",modelLabel:"aegis"===l?"server default (auto)":"local"===l?"type a model tag in the Model card":"—",provider:"",uniqueModel:l,group:e.classLabel||l,url:i?joinUrl("local"===l?t:s,"local"===l?LOCAL_PATH:POOLED_PATH):null,method:i?"POST":null,billing:billingFor(l,r,null,n),blocked:blockedReason(l,r,null,n),selectable:!1});continue}for(const a of i){if(!a||!a.id)continue;const i="string"==typeof a.provider&&a.provider?a.provider:l;let d=null,c=null;"aegis"===l?(d=joinUrl(s,POOLED_PATH),c="POST"):"byok"===l?(d=joinUrl(s,BYOK_PATH),c="POST"):"local"===l&&(d=joinUrl(t,LOCAL_PATH),c="POST"),o.push({class:l,classLabel:e.classLabel||l,model:a.id,modelLabel:a.label||a.id,provider:i,uniqueModel:`${l}:${a.id}`,group:e.classLabel||l,url:d,method:c,billing:billingFor(l,r,a,n),blocked:blockedReason(l,r,a,n),selectable:!0})}}return o}function filterEntries(e,o){const l=Array.isArray(e)?e:[],r=String(null==o?"":o).trim().toLowerCase();if(!r)return l.slice();const n=r.split(/\s+/).filter(Boolean);return l.filter(e=>{const o=[e.model,e.modelLabel,e.provider,e.class,e.classLabel,e.url||""].join("\n").toLowerCase();return n.every(e=>o.includes(e))})}function selectionFor(e){return e?{class:e.class,model:"aegis"!==e.class||e.model?e.model:""}:null}"undefined"!=typeof module&&module.exports&&(module.exports={buildProviderPaths:buildProviderPaths,filterEntries:filterEntries,selectionFor:selectionFor,joinUrl:joinUrl,POOLED_PATH:POOLED_PATH,BYOK_PATH:BYOK_PATH,LOCAL_PATH:LOCAL_PATH}),"undefined"!=typeof window&&(window.aegisProviders={buildProviderPaths:buildProviderPaths,filterEntries:filterEntries,selectionFor:selectionFor,joinUrl:joinUrl,POOLED_PATH:POOLED_PATH,BYOK_PATH:BYOK_PATH,LOCAL_PATH:LOCAL_PATH});
@@ -0,0 +1,35 @@
1
+ /*
2
+ * SPDX-License-Identifier: AGPL-3.0-or-later
3
+ * Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
4
+ * AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
5
+ * Conveying a modified copy, or running one as a network service, owes the
6
+ * corresponding source under this licence (§5/§13) — see LICENSING.md.
7
+ */
8
+ /* ── ON9b: the embedded terminal document (pty-frame.html) ──────────────────
9
+ Deliberately tiny. Everything the terminal draws is xterm's own; this sheet
10
+ only gives it the full frame to draw in and names the font it draws with.
11
+
12
+ The family is stated here rather than inherited: pty-frame.html loads
13
+ fonts.css (the @font-face rules) and NOT style.css, so `--font-mono` would
14
+ resolve to nothing and xterm would fall back to its built-in
15
+ `courier-new, courier, monospace` — a host font, which is the divergence
16
+ desktop/test/renderer-fonts.test.mjs exists to prevent. pty-panel.js reads
17
+ this variable off the frame document and passes it to the Terminal. */
18
+ :root {
19
+ --font-mono: 'DM Mono', monospace;
20
+ }
21
+
22
+ html,
23
+ body {
24
+ margin: 0;
25
+ height: 100%;
26
+ overflow: hidden;
27
+ /* Matches .pty-panel-body in style.css, so the frame never flashes white
28
+ between document load and xterm's first paint. */
29
+ background: #0b0d10;
30
+ }
31
+
32
+ #pty-frame-root {
33
+ width: 100%;
34
+ height: 100%;
35
+ }
@@ -0,0 +1,47 @@
1
+ <!doctype html>
2
+ <!--
3
+ * SPDX-License-Identifier: AGPL-3.0-or-later
4
+ * Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
5
+ * AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
6
+ * Conveying a modified copy, or running one as a network service, owes the
7
+ * corresponding source under this licence (§5/§13) — see LICENSING.md.
8
+ -->
9
+ <html lang="en">
10
+ <head>
11
+ <meta charset="utf-8" />
12
+ <!-- ON9b — the embedded terminal's OWN document, and the one place in this
13
+ app where `style-src` allows inline styles.
14
+
15
+ Why a second document exists at all: xterm.js renders by injecting a
16
+ per-terminal <style> element (cell metrics, the 256-colour palette, bold
17
+ and dim variants) and by setting `.style.*` attributes on rows, the
18
+ cursor and its canvases. Under index.html's `style-src 'self'` Chromium
19
+ blocks both — not with an error the app can see, but by dropping the
20
+ declarations: the rows lose `white-space: pre` and the monospace family,
21
+ so every run of spaces collapses and the terminal paints the UI font.
22
+ That is what shipped in 1.0.64: a legible-but-wrong terminal, box-drawn
23
+ frames smashed out of alignment, measured as
24
+ `font-family: "Times New Roman"; white-space: normal` in a CSP probe.
25
+
26
+ Neither a nonce nor a hash can fix it (a nonce does not cover style
27
+ ATTRIBUTES, and the injected text varies with the panel's pixel size),
28
+ so the choice is between relaxing the policy for the whole window and
29
+ giving the terminal a document of its own. This is that document: it
30
+ loads xterm, the vendored faces and nothing else — no app markup, no
31
+ model output, no remote origin — so `'unsafe-inline'` here buys the
32
+ renderer nothing it could not already do, while index.html keeps the
33
+ tight policy desktop/test/renderer-fonts.test.mjs asserts. -->
34
+ <meta
35
+ http-equiv="Content-Security-Policy"
36
+ content="default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' data:"
37
+ />
38
+ <title>Terminal (aegiscode)</title>
39
+ <link rel="stylesheet" href="fonts/fonts.css" />
40
+ <link rel="stylesheet" href="vendor/xterm.css" />
41
+ <link rel="stylesheet" href="pty-frame.css" />
42
+ </head>
43
+ <body>
44
+ <div id="pty-frame-root"></div>
45
+ <script src="vendor/xterm.js"></script>
46
+ </body>
47
+ </html>
@@ -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 ptyPanelCreateId(){return"undefined"!=typeof window&&window.crypto&&"function"==typeof window.crypto.randomUUID?window.crypto.randomUUID():`pty-${Date.now()}-${Math.random().toString(36).slice(2)}`}let ptyPanelCurrent=null;function ptyPanelBuildOverlay(){const e=document.createElement("div");return e.className="pty-panel-overlay",e.innerHTML='<div class="pty-panel" role="dialog" aria-label="Terminal"><div class="pty-panel-header"><span class="pty-panel-title">Terminal (aegiscode)</span><button type="button" class="pty-panel-close" aria-label="Close terminal">×</button></div><div class="pty-panel-body"></div></div>',e}function ptyPanelTeardown(e){if(e){try{e.unsubscribe()}catch{}try{window.aegis.pty.cancel(e.id)}catch{}try{e.term.dispose()}catch{}try{e.resizeObserver&&e.resizeObserver.disconnect()}catch{}e.overlay&&e.overlay.parentNode&&e.overlay.parentNode.removeChild(e.overlay)}}function ptyPanelClose(){if(!ptyPanelCurrent)return;const e=ptyPanelCurrent;ptyPanelCurrent=null,ptyPanelTeardown(e)}function ptyPanelOpen(){if(ptyPanelCurrent)return ptyPanelCurrent.overlay&&"function"==typeof ptyPanelCurrent.overlay.focus&&ptyPanelCurrent.overlay.focus(),{ok:!0};if("undefined"==typeof window||"function"!=typeof window.Terminal)return{ok:!1,reason:"the terminal panel is not available in this build (xterm.js missing)"};if(void 0===window.aegis||!window.aegis.pty)return{ok:!1,reason:"the terminal panel bridge is not available in this build"};const e=ptyPanelBuildOverlay();document.body.appendChild(e);const n=e.querySelector(".pty-panel-body"),t=new window.Terminal({convertEol:!0,cursorBlink:!0,fontSize:13});t.open(n),ptyPanelFit(t,n);const r=ptyPanelCreateId(),o=window.aegis.pty.onEvent(r,(e=>{const n=e&&e.p;n&&("data"===n.kind?t.write(n.chunk):"exit"===n.kind&&t.write("\r\n[process exited]\r\n"))}));let i=null;return"function"==typeof window.ResizeObserver&&(i=new window.ResizeObserver((()=>ptyPanelFit(t,n))),i.observe(n)),ptyPanelCurrent={id:r,term:t,unsubscribe:o,overlay:e,resizeObserver:i},t.onData((e=>window.aegis.pty.write(r,e))),t.onResize((({cols:e,rows:n})=>window.aegis.pty.resize(r,e,n))),e.querySelector(".pty-panel-close").addEventListener("click",ptyPanelClose),e.addEventListener("keydown",(e=>{"Escape"===e.key&&ptyPanelClose()})),window.aegis.pty.exec(r,{cols:t.cols,rows:t.rows}).then((e=>{e&&e.ok||t.write(`\r\n[could not start: ${e&&e.e&&e.e.msg||"unknown error"}]\r\n`)})),{ok:!0}}function ptyPanelFit(e,n){const t=e._core,r=t&&t._renderService&&t._renderService.dimensions&&t._renderService.dimensions.css.cell;if(!r||!r.width||!r.height)return null;const o=Math.max(2,Math.floor(n.clientWidth/r.width)),i=Math.max(1,Math.floor(n.clientHeight/r.height));return o===e.cols&&i===e.rows||e.resize(o,i),{cols:o,rows:i}}function ptyPanelIsOpen(){return Boolean(ptyPanelCurrent)}"undefined"!=typeof module&&module.exports&&(module.exports={createId:ptyPanelCreateId,open:ptyPanelOpen,close:ptyPanelClose,isOpen:ptyPanelIsOpen}),"undefined"!=typeof window&&(window.aegisPtyPanel={open:ptyPanelOpen,close:ptyPanelClose,isOpen:ptyPanelIsOpen});
3
+ "use strict";const PTY_PANEL_FRAME_SRC="pty-frame.html",PTY_PANEL_FRAME_ROOT="pty-frame-root";function ptyPanelCreateId(){return"undefined"!=typeof window&&window.crypto&&"function"==typeof window.crypto.randomUUID?window.crypto.randomUUID():`pty-${Date.now()}-${Math.random().toString(36).slice(2)}`}const ptyPanelSessions=new Map;let ptyPanelNextLabel=1,ptyPanelShell=null;function ptyPanelBuildShell(){const e=document.createElement("div");return e.className="pty-panel-overlay",e.innerHTML='<div class="pty-panel" role="dialog" aria-label="Terminal"><div class="pty-panel-header"><span class="pty-panel-tabs" role="tablist" aria-label="Terminal sessions"></span><button type="button" class="pty-panel-new" aria-label="New terminal" title="New terminal">+</button><button type="button" class="pty-panel-close" aria-label="Close terminal" title="Close this terminal">×</button></div><div class="pty-panel-body"></div></div>',e}function ptyPanelMount(e){const t=ptyPanelShell;if(!t)return!1;const n=t.querySelector(".pty-panel-tabs"),l=t.querySelector(".pty-panel-body");if(!n||!l)return!1;const a=document.createElement("button");a.type="button",a.className="pty-panel-tab",a.setAttribute("role","tab"),a.setAttribute("aria-selected","false"),a.textContent=e.label,a.addEventListener("click",()=>ptyPanelActivate(e)),n.appendChild(a);const o=document.createElement("div");o.className="pty-panel-slot",o.hidden=!0;const s=document.createElement("iframe");return s.className="pty-panel-frame",s.title=`Terminal ${e.label} (aegiscode)`,s.src="pty-frame.html",o.appendChild(s),l.appendChild(o),e.tab=a,e.slot=o,e.frame=s,!0}function ptyPanelActivate(e){if(e&&!e.closed){for(const t of ptyPanelSessions.values()){const n=t===e;t.slot&&(t.slot.hidden=!n),t.tab&&(t.tab.classList.toggle("is-active",n),t.tab.setAttribute("aria-selected",n?"true":"false"))}ptyPanelShell.active=e.id,e.term&&e.host&&ptyPanelFit(e.term,e.host),e.term&&e.term.focus()}}function ptyPanelTeardown(e){if(e){e.closed=!0;try{e.unsubscribe&&e.unsubscribe()}catch{}try{window.aegis.pty.cancel(e.id)}catch{}try{e.term&&e.term.dispose()}catch{}try{e.resizeObserver&&e.resizeObserver.disconnect()}catch{}e.tab&&e.tab.parentNode&&e.tab.parentNode.removeChild(e.tab),e.slot&&e.slot.parentNode&&e.slot.parentNode.removeChild(e.slot)}}function ptyPanelClose(e){const t=e?ptyPanelSessions.get(e):ptyPanelSessions.get(ptyPanelShell&&ptyPanelShell.active);if(!t)return;if(ptyPanelSessions.delete(t.id),ptyPanelTeardown(t),0===ptyPanelSessions.size)return void ptyPanelCloseAll();const n=Array.from(ptyPanelSessions.values());ptyPanelActivate(n[n.length-1])}function ptyPanelCloseAll(){for(const e of Array.from(ptyPanelSessions.values()))ptyPanelSessions.delete(e.id),ptyPanelTeardown(e);ptyPanelShell&&ptyPanelShell.parentNode&&ptyPanelShell.parentNode.removeChild(ptyPanelShell),ptyPanelShell=null}function ptyPanelFontFamily(e){try{return e.getComputedStyle(e.document.documentElement).getPropertyValue("--font-mono").trim()||"monospace"}catch{return"monospace"}}function ptyPanelFail(e,t){if(!e||!e.slot)return;const n=document.createElement("p");n.className="pty-panel-note",n.textContent=t,e.slot.appendChild(n)}function ptyPanelBoot(e){if(!e||e.closed||e.term)return;const t=e.frame&&e.frame.contentWindow,n=t&&t.document,l=n&&n.getElementById("pty-frame-root");if(!t||"function"!=typeof t.Terminal||!l)return void ptyPanelFail(e,"the terminal panel is not available in this build (xterm.js missing)");const a=new t.Terminal({convertEol:!0,cursorBlink:!0,fontSize:13,fontFamily:ptyPanelFontFamily(t)});e.term=a,e.host=l,a.open(l),ptyPanelFit(a,l);const o=e.id;e.unsubscribe=window.aegis.pty.onEvent(o,e=>{const t=e&&e.p;t&&("data"===t.kind?a.write(t.chunk):"exit"===t.kind&&a.write("\r\n[process exited]\r\n"))}),"function"==typeof t.ResizeObserver&&(e.resizeObserver=new t.ResizeObserver(()=>ptyPanelFit(a,l)),e.resizeObserver.observe(l)),a.onData(e=>window.aegis.pty.write(o,e)),a.onResize(({cols:e,rows:t})=>window.aegis.pty.resize(o,e,t)),window.aegis.pty.exec(o,{cols:a.cols,rows:a.rows}).then(e=>{e&&e.ok||a.write(`\r\n[could not start: ${e&&e.e&&e.e.msg||"unknown error"}]\r\n`)}),a.focus()}function ptyPanelOpen(){if("undefined"==typeof window||void 0===window.aegis||!window.aegis.pty)return{ok:!1,reason:"the terminal panel bridge is not available in this build"};ptyPanelShell||(ptyPanelShell=ptyPanelBuildShell(),document.body.appendChild(ptyPanelShell),ptyPanelShell.querySelector(".pty-panel-new").addEventListener("click",()=>ptyPanelOpen()),ptyPanelShell.querySelector(".pty-panel-close").addEventListener("click",()=>ptyPanelClose()),ptyPanelShell.addEventListener("keydown",e=>{"Escape"===e.key&&ptyPanelClose()}));const e={id:ptyPanelCreateId(),label:String(ptyPanelNextLabel++),tab:null,slot:null,frame:null,term:null,host:null,unsubscribe:null,resizeObserver:null,closed:!1};return ptyPanelSessions.set(e.id,e),ptyPanelMount(e)?(ptyPanelActivate(e),e.frame&&e.frame.addEventListener("load",()=>ptyPanelBoot(e)),{ok:!0,id:e.id}):(ptyPanelSessions.delete(e.id),{ok:!1,reason:"could not build the terminal panel"})}function ptyPanelFit(e,t){const n=e._core,l=n&&n._renderService&&n._renderService.dimensions&&n._renderService.dimensions.css.cell;if(!l||!l.width||!l.height)return null;const a=Math.max(2,Math.floor(t.clientWidth/l.width)),o=Math.max(1,Math.floor(t.clientHeight/l.height));return a===e.cols&&o===e.rows||e.resize(a,o),{cols:a,rows:o}}function ptyPanelIsOpen(){return ptyPanelSessions.size>0}"undefined"!=typeof module&&module.exports&&(module.exports={createId:ptyPanelCreateId,open:ptyPanelOpen,close:ptyPanelClose,closeAll:ptyPanelCloseAll,isOpen:ptyPanelIsOpen,count:()=>ptyPanelSessions.size,FRAME_SRC:"pty-frame.html",FRAME_ROOT:"pty-frame-root"}),"undefined"!=typeof window&&(window.aegisPtyPanel={open:ptyPanelOpen,close:ptyPanelClose,closeAll:ptyPanelCloseAll,isOpen:ptyPanelIsOpen,count:()=>ptyPanelSessions.size});
@@ -0,0 +1,72 @@
1
+ <!doctype html>
2
+ <!--
3
+ * SPDX-License-Identifier: AGPL-3.0-or-later
4
+ * Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
5
+ * AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
6
+ * Conveying a modified copy, or running one as a network service, owes the
7
+ * corresponding source under this licence (§5/§13) — see LICENSING.md.
8
+ -->
9
+ <html lang="en">
10
+ <head>
11
+ <meta charset="utf-8" />
12
+ <!-- ON10 — the terminal as its OWN OS WINDOW.
13
+ The panel (pty-panel.js) drew the same shell in an in-app overlay,
14
+ which covered the chat and could not leave the app's bounds. This
15
+ document is the whole window: nothing from the chat is behind it, so
16
+ the native chat stays usable while several terminals run beside it.
17
+ Same relaxed `style-src` as pty-frame.html and for the same reason —
18
+ xterm injects <style> elements and .style.* attributes (see that
19
+ file's header); this document contains xterm and no app content. -->
20
+ <meta
21
+ http-equiv="Content-Security-Policy"
22
+ content="default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' data:"
23
+ />
24
+ <title>Terminal — aegiscode</title>
25
+ <link rel="stylesheet" href="fonts/fonts.css" />
26
+ <link rel="stylesheet" href="vendor/xterm.css" />
27
+ <style>
28
+ /* --font-mono must be declared HERE, not inherited: this document links
29
+ fonts/fonts.css (which only declares @font-face) and is not the app
30
+ window, so style.css's :root never applies. Without it pty-window.js's
31
+ ptyWinFontFamily() falls back to the host stack and the window draws in
32
+ a different face than the panel — which is the divergence
33
+ renderer-fonts.test.mjs exists to prevent, and which
34
+ pty-window-render.test.mjs caught only because it runs in Electron. */
35
+ :root { color-scheme: dark; --font-mono: 'DM Mono', monospace; }
36
+ html, body { margin: 0; height: 100%; background: #0d1117; color: #c9d1d9; }
37
+ body { display: flex; flex-direction: column; font: 12px/1.4 var(--font-ui, system-ui, sans-serif); }
38
+ #pty-win-chrome {
39
+ display: flex; align-items: center; gap: 4px; padding: 4px 6px;
40
+ background: #161b22; border-bottom: 1px solid #30363d; flex: 0 0 auto;
41
+ -webkit-app-region: drag; user-select: none;
42
+ }
43
+ #pty-win-tabs { display: flex; gap: 4px; overflow-x: auto; flex: 1 1 auto; }
44
+ .pty-win-tab {
45
+ -webkit-app-region: no-drag;
46
+ background: #21262d; color: #8b949e; border: 1px solid #30363d;
47
+ border-radius: 5px 5px 0 0; padding: 3px 10px; font: inherit; cursor: pointer;
48
+ white-space: nowrap;
49
+ }
50
+ .pty-win-tab.is-active { background: #0d1117; color: #e6edf3; border-bottom-color: #0d1117; }
51
+ #pty-win-new {
52
+ -webkit-app-region: no-drag;
53
+ background: transparent; color: #8b949e; border: 1px solid #30363d;
54
+ border-radius: 5px; width: 22px; height: 22px; line-height: 1; cursor: pointer;
55
+ }
56
+ #pty-win-new:hover { color: #e6edf3; border-color: #8b949e; }
57
+ #pty-win-body { flex: 1 1 auto; position: relative; min-height: 0; }
58
+ .pty-win-slot { position: absolute; inset: 0; padding: 4px 6px; box-sizing: border-box; }
59
+ .pty-win-slot[hidden] { display: none; }
60
+ .pty-win-note { padding: 12px; color: #8b949e; white-space: pre-wrap; }
61
+ </style>
62
+ </head>
63
+ <body>
64
+ <div id="pty-win-chrome">
65
+ <div id="pty-win-tabs" role="tablist" aria-label="Terminal sessions"></div>
66
+ <button type="button" id="pty-win-new" aria-label="New terminal" title="New terminal (Ctrl+Shift+T)">+</button>
67
+ </div>
68
+ <div id="pty-win-body"></div>
69
+ <script src="vendor/xterm.js"></script>
70
+ <script src="pty-window.js"></script>
71
+ </body>
72
+ </html>
@@ -0,0 +1,3 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ "use strict";const ptyWinSessions=new Map;let ptyWinNextLabel=1,ptyWinActive=null;function ptyWinId(){return window.crypto&&"function"==typeof window.crypto.randomUUID?window.crypto.randomUUID():`pty-${Date.now()}-${Math.random().toString(36).slice(2)}`}function ptyWinFit(t,e){const n=t&&t._core,i=n&&n._renderService&&n._renderService.dimensions&&n._renderService.dimensions.css.cell;if(!i||!i.width||!i.height)return null;const o=Math.max(2,Math.floor(e.clientWidth/i.width)),s=Math.max(1,Math.floor(e.clientHeight/i.height));return o===t.cols&&s===t.rows||t.resize(o,s),{cols:o,rows:s}}function ptyWinFontFamily(){return getComputedStyle(document.documentElement).getPropertyValue("--font-mono").trim()||"ui-monospace, SFMono-Regular, Menlo, monospace"}function ptyWinActivate(t){if(t&&!t.closed){for(const e of ptyWinSessions.values()){const n=e===t;e.slot&&(e.slot.hidden=!n),e.tab&&(e.tab.classList.toggle("is-active",n),e.tab.setAttribute("aria-selected",n?"true":"false"))}ptyWinActive=t.id,t.term&&t.slot&&ptyWinFit(t.term,t.slot),t.term&&t.term.focus()}}function ptyWinTeardown(t){if(t){t.closed=!0;try{t.unsubscribe&&t.unsubscribe()}catch{}try{t.ro&&t.ro.disconnect()}catch{}try{window.aegis.pty.cancel(t.id)}catch{}if(ptyWinSessions.delete(t.id),t.tab&&t.tab.remove&&t.tab.remove(),t.slot&&t.slot.remove&&t.slot.remove(),ptyWinActive===t.id){const t=ptyWinSessions.values().next().value||null;ptyWinActive=null,t&&ptyWinActivate(t)}}}function ptyWinClose(t){const e=t?ptyWinSessions.get(t):ptyWinActive&&ptyWinSessions.get(ptyWinActive);e&&ptyWinTeardown(e),0===ptyWinSessions.size&&window.aegis&&"function"==typeof window.aegis.closePtyWindow&&window.aegis.closePtyWindow()}function ptyWinFail(t,e){const n=document.createElement("div");n.className="pty-win-note",n.textContent=e,t.slot&&t.slot.appendChild(n)}function ptyWinStart(){if("undefined"==typeof window||!window.aegis||!window.aegis.pty)return document.getElementById("pty-win-body").innerHTML='<div class="pty-win-note">the terminal bridge is not available in this build</div>',null;if("function"!=typeof window.Terminal)return document.getElementById("pty-win-body").innerHTML='<div class="pty-win-note">xterm.js is missing from this build — the terminal cannot render</div>',null;const t=document.getElementById("pty-win-tabs"),e=document.getElementById("pty-win-body"),n=ptyWinId(),i=String(ptyWinNextLabel++),o=document.createElement("button");o.type="button",o.className="pty-win-tab",o.setAttribute("role","tab"),o.textContent=i,o.title=`Terminal ${i} — click to switch, middle-click to close`;const s=document.createElement("div");s.className="pty-win-slot",s.hidden=!0;const r={id:n,label:i,tab:o,slot:s,term:null,unsubscribe:null,ro:null,closed:!1};ptyWinSessions.set(n,r),o.addEventListener("click",()=>ptyWinActivate(r)),o.addEventListener("auxclick",t=>{1===t.button&&(t.preventDefault(),ptyWinClose(n))}),t.appendChild(o),e.appendChild(s);const c=new window.Terminal({convertEol:!0,cursorBlink:!0,fontSize:13,fontFamily:ptyWinFontFamily(),allowProposedApi:!0});return r.term=c,c.open(s),ptyWinFit(c,s),r.unsubscribe=window.aegis.pty.onEvent(n,t=>{const e=t&&t.p;e&&("data"===e.kind?c.write(e.chunk):"exit"===e.kind&&c.write("\r\n[process exited]\r\n"))}),"function"==typeof ResizeObserver&&(r.ro=new ResizeObserver(()=>ptyWinFit(c,s)),r.ro.observe(s)),c.onData(t=>window.aegis.pty.write(n,t)),c.onResize(({cols:t,rows:e})=>window.aegis.pty.resize(n,t,e)),window.aegis.pty.exec(n,{cols:c.cols,rows:c.rows}).then(t=>{t&&t.ok||c.write(`\r\n[could not start: ${t&&t.e&&t.e.msg||"unknown error"}]\r\n`)}),ptyWinActivate(r),r}window.addEventListener("DOMContentLoaded",()=>{const t=document.getElementById("pty-win-new");t&&t.addEventListener("click",()=>ptyWinStart()),window.addEventListener("keydown",t=>{t.ctrlKey&&t.shiftKey&&("T"===t.key||"t"===t.key)?(t.preventDefault(),ptyWinStart()):t.ctrlKey&&t.shiftKey&&("W"===t.key||"w"===t.key)&&(t.preventDefault(),ptyWinClose())}),ptyWinStart()}),window.aegisPtyWindow={start:ptyWinStart,close:ptyWinClose,count:()=>ptyWinSessions.size,active:()=>ptyWinActive};
@@ -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(){if(!window.models||!window.quickLauncher)throw document.body.textContent="This page must run inside the AEGIS Electron host (window.models/window.quickLauncher missing).",new Error("window.models/window.quickLauncher unavailable — not running under Electron");const e=window.models,t=window.quickLauncher,n="byok",o="quick-launcher-byok-model",l={form:document.getElementById("ql-form"),prompt:document.getElementById("ql-prompt"),response:document.getElementById("ql-response"),modelLabel:document.getElementById("ql-model-label"),modelSelect:document.getElementById("ql-model-select"),stopBtn:document.getElementById("ql-stop"),pushBtn:document.getElementById("ql-push"),status:document.getElementById("ql-status")};let d=!1,i=null,s="",r="",c=!1,a=null;function u(e){l.status.textContent=e}function m(e){d=e,l.stopBtn.hidden=!e,l.prompt.disabled=e}async function p(t){if(!t||d)return;if(a)return void u(a);c=!1,l.pushBtn.hidden=!0,l.response.textContent="",m(!0),u("thinking…"),i=`quick-${Date.now()}-${Math.random().toString(36).slice(2)}`;let o="";try{const d=await e.chat({class:n,model:l.modelSelect.value||void 0,prompt:t,tools:!1,sessionId:i},(e=>{e&&"string"==typeof e.delta&&e.delta&&(o+=e.delta,l.response.textContent=o,l.response.scrollTop=l.response.scrollHeight)})),a=d&&d.choices&&d.choices[0]&&d.choices[0].message,m=o||a&&a.content||"";l.response.textContent=m,s=t,r=m,c=Boolean(m),l.pushBtn.hidden=!c,u(c?"⌘/Ctrl+⏎ to add this to the main chat":"no answer")}catch(e){l.response.textContent=`Error: ${e&&e.message?e.message:e}`,u("failed")}finally{m(!1),i=null}}function h(){c&&t.pushToMain({prompt:s,response:r,model:l.modelSelect.value||null,class:n}).catch((()=>{}))}l.modelSelect.addEventListener("change",(()=>{localStorage.setItem(o,l.modelSelect.value)})),l.form.addEventListener("submit",(e=>{e.preventDefault(),p(l.prompt.value.trim())})),l.prompt.addEventListener("keydown",(e=>{if("Enter"===e.key&&(e.metaKey||e.ctrlKey))return e.preventDefault(),void h();"Enter"!==e.key||e.shiftKey||(e.preventDefault(),p(l.prompt.value.trim()))})),l.stopBtn.addEventListener("click",(function(){i&&e.cancel(i).catch((()=>{}))})),l.pushBtn.addEventListener("click",h),window.addEventListener("focus",(()=>{d||(l.prompt.value="",l.response.textContent="",l.pushBtn.hidden=!0,c=!1,u(a||"Enter to ask · Esc to close")),l.prompt.focus()})),async function(){try{const t=(await e.listClasses()||[]).find((e=>e.class===n)),d=await e.listModels(n),i=(d&&d.models||[]).slice();i.sort(((e,t)=>{const n=e.configured?0:1,o=t.configured?0:1;if(n!==o)return n-o;const l=String(e.provider||""),d=String(t.provider||"");if(l!==d)return l<d?-1:1;const i=String(e.id||""),s=String(t.id||"");return i<s?-1:i>s?1:0})),l.modelSelect.innerHTML="";for(const e of i){const t=document.createElement("option");t.value=e.id,t.textContent=e.configured?e.label||e.id:`${e.label||e.id} (no key)`,t.disabled=!e.configured,e.configured||(t.title="No key saved for this provider yet."),l.modelSelect.appendChild(t)}const s=localStorage.getItem(o);if(s&&i.some((e=>e.id===s&&e.configured)))l.modelSelect.value=s;else{const e=i.find((e=>e.configured));e&&(l.modelSelect.value=e.id)}l.modelSelect.hidden=i.length<=1;const r=i.filter((e=>e.configured)).length;l.modelLabel.textContent=i.length<=1&&i[0]?i[0].label||i[0].id:`BYOK · ${r}/${i.length}`,a=function(e,t){return e&&e.providersFailed?`BYOK catalog unavailable — ${e&&e.providersError||"catalog unreachable"}`:t.length?e&&e.needsProviderKey?"No provider key saved — add one in Settings › Provider":e&&e.needsAegisKey?"BYOK also needs your AEGIS key — connect it in Settings":null:"No BYOK models — add a provider key in Settings › Provider"}(d,i),a?(l.modelSelect.hidden=i.length<=1,u(a)):t||u("BYOK is not offered by this build")}catch(e){l.modelLabel.textContent="BYOK — unavailable",l.modelSelect.hidden=!0,a=`BYOK unavailable — ${e&&e.message?e.message:e}`,u(a)}}(),l.prompt.focus()}();
3
+ "use strict";!function(){if(!window.models||!window.quickLauncher)throw document.body.textContent="This page must run inside the AEGIS Electron host (window.models/window.quickLauncher missing).",new Error("window.models/window.quickLauncher unavailable — not running under Electron");const e=window.models,t=window.quickLauncher,n="byok",o="quick-launcher-byok-model",l={form:document.getElementById("ql-form"),prompt:document.getElementById("ql-prompt"),response:document.getElementById("ql-response"),modelLabel:document.getElementById("ql-model-label"),modelSelect:document.getElementById("ql-model-select"),stopBtn:document.getElementById("ql-stop"),pushBtn:document.getElementById("ql-push"),status:document.getElementById("ql-status")};let d=!1,i=null,s="",r="",c=!1,a=null;function u(e){l.status.textContent=e}function m(e){d=e,l.stopBtn.hidden=!e,l.prompt.disabled=e}async function p(t){if(!t||d)return;if(a)return void u(a);c=!1,l.pushBtn.hidden=!0,l.response.textContent="",m(!0),u("thinking…"),i=`quick-${Date.now()}-${Math.random().toString(36).slice(2)}`;let o="";try{const d=await e.chat({class:n,model:l.modelSelect.value||void 0,prompt:t,tools:!1,sessionId:i},e=>{e&&"string"==typeof e.delta&&e.delta&&(o+=e.delta,l.response.textContent=o,l.response.scrollTop=l.response.scrollHeight)}),a=d&&d.choices&&d.choices[0]&&d.choices[0].message,m=o||a&&a.content||"";l.response.textContent=m,s=t,r=m,c=Boolean(m),l.pushBtn.hidden=!c,u(c?"⌘/Ctrl+⏎ to add this to the main chat":"no answer")}catch(e){l.response.textContent=`Error: ${e&&e.message?e.message:e}`,u("failed")}finally{m(!1),i=null}}function h(){c&&t.pushToMain({prompt:s,response:r,model:l.modelSelect.value||null,class:n}).catch(()=>{})}l.modelSelect.addEventListener("change",()=>{localStorage.setItem(o,l.modelSelect.value)}),l.form.addEventListener("submit",e=>{e.preventDefault(),p(l.prompt.value.trim())}),l.prompt.addEventListener("keydown",e=>{if("Enter"===e.key&&(e.metaKey||e.ctrlKey))return e.preventDefault(),void h();"Enter"!==e.key||e.shiftKey||(e.preventDefault(),p(l.prompt.value.trim()))}),l.stopBtn.addEventListener("click",function(){i&&e.cancel(i).catch(()=>{})}),l.pushBtn.addEventListener("click",h),window.addEventListener("focus",()=>{d||(l.prompt.value="",l.response.textContent="",l.pushBtn.hidden=!0,c=!1,u(a||"Enter to ask · Esc to close")),l.prompt.focus()}),async function(){try{const t=(await e.listClasses()||[]).find(e=>e.class===n),d=await e.listModels(n),i=(d&&d.models||[]).slice();i.sort((e,t)=>{const n=e.configured?0:1,o=t.configured?0:1;if(n!==o)return n-o;const l=String(e.provider||""),d=String(t.provider||"");if(l!==d)return l<d?-1:1;const i=String(e.id||""),s=String(t.id||"");return i<s?-1:i>s?1:0}),l.modelSelect.innerHTML="";for(const e of i){const t=document.createElement("option");t.value=e.id,t.textContent=e.configured?e.label||e.id:`${e.label||e.id} (no key)`,t.disabled=!e.configured,e.configured||(t.title="No key saved for this provider yet."),l.modelSelect.appendChild(t)}const s=localStorage.getItem(o);if(s&&i.some(e=>e.id===s&&e.configured))l.modelSelect.value=s;else{const e=i.find(e=>e.configured);e&&(l.modelSelect.value=e.id)}l.modelSelect.hidden=i.length<=1;const r=i.filter(e=>e.configured).length;l.modelLabel.textContent=i.length<=1&&i[0]?i[0].label||i[0].id:`BYOK · ${r}/${i.length}`,a=function(e,t){return e&&e.providersFailed?`BYOK catalog unavailable — ${e&&e.providersError||"catalog unreachable"}`:t.length?e&&e.needsProviderKey?"No provider key saved — add one in Settings › Provider":e&&e.needsAegisKey?"BYOK also needs your AEGIS key — connect it in Settings":null:"No BYOK models — add a provider key in Settings › Provider"}(d,i),a?(l.modelSelect.hidden=i.length<=1,u(a)):t||u("BYOK is not offered by this build")}catch(e){l.modelLabel.textContent="BYOK — unavailable",l.modelSelect.hidden=!0,a=`BYOK unavailable — ${e&&e.message?e.message:e}`,u(a)}}(),l.prompt.focus()}();
@@ -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(){function e(e){return document.getElementById(e)}function t(t,i,n){var a=e(t);a&&(a.textContent=i||"",n&&(a.dataset.kind=n),a.hidden=!i)}var i={entries:[],roots:[],missing:[],createDir:""};function n(){return window.aegis&&"function"==typeof window.aegis.skillsList?window.aegis.skillsList().then((function(n){n&&n.ok?(i.entries=n.skills||[],i.roots=n.roots||[],i.missing=n.missing||[],i.createDir=n.createDir||"",function(){var t=e("skills-list");if(t){if(t.innerHTML="",i.entries.length)i.entries.forEach((function(e){t.appendChild(function(e,t){var i=document.createElement("li");i.className="skill-row";var n=document.createElement("span");n.className="skill-row-name",n.textContent="/"+e.name,i.appendChild(n);var a=document.createElement("span");a.className="skill-row-desc",a.textContent=e.description||"(no description)",e.warning&&(a.classList.add("skill-row-warning"),a.title=e.warning),i.appendChild(a);var l=document.createElement("span");l.className="skill-row-scope",l.textContent=e.scope,l.title=e.path,i.appendChild(l);var o=document.createElement("button");return o.type="button",o.className="skill-row-remove",o.textContent="×",o.title="Delete this skill ("+e.path+")",o.setAttribute("aria-label","Delete skill "+e.name),o.addEventListener("click",(function(){t(e.name)})),i.appendChild(o),i}(e,l))}));else{var n=document.createElement("li");n.className="skill-row";var a=document.createElement("span");a.className="skill-row-desc",a.textContent="No skills found yet — create one below.",n.appendChild(a),t.appendChild(n)}var o=e("skills-dirs-list");o&&(o.innerHTML="",i.roots.forEach((function(e){var t=document.createElement("li");t.textContent=e,-1!==i.missing.indexOf(e)&&(t.classList.add("skills-dirs-missing"),t.title="does not exist yet — creating a skill here will create it"),o.appendChild(t)})));var s=e("skill-target-dir");if(s){var r=s.value;s.innerHTML="";var d=i.roots.filter((function(e){return-1===i.missing.indexOf(e)||e===i.createDir}));i.createDir&&-1===d.indexOf(i.createDir)&&d.unshift(i.createDir),d.forEach((function(e){var t=document.createElement("option");t.value=e,t.textContent=e,s.appendChild(t)})),r&&-1!==d.indexOf(r)?s.value=r:i.createDir&&(s.value=i.createDir)}}}(),t("skills-status",i.entries.length?i.entries.length+(1===i.entries.length?" skill":" skills"):"","info")):t("skills-status",n&&n.error||"could not read the skill list","error")})).catch((function(e){t("skills-status",e&&e.message||"could not read the skill list","error")})):(t("skills-status","skills are not available in this build","error"),Promise.resolve())}function a(i){i&&i.preventDefault();var a=e("skill-name"),l=e("skill-description"),o=e("skill-body"),s=e("skill-target-dir"),r=a?a.value.trim():"";return r?window.aegis&&"function"==typeof window.aegis.skillsCreate?window.aegis.skillsCreate({name:r,description:l?l.value.trim():"",body:o?o.value:"",targetDir:s?s.value:""}).then((function(e){if(e&&e.ok)return t("skill-create-hint","created "+e.path,"ok"),a&&(a.value=""),l&&(l.value=""),o&&(o.value=""),n();t("skill-create-hint",e&&e.error||"could not create that skill","error")})).catch((function(e){t("skill-create-hint",e&&e.message||"could not create that skill","error")})):(t("skill-create-hint","skills are not available in this build","error"),Promise.resolve()):(t("skill-create-hint","a skill needs a name","error"),a&&a.focus(),Promise.resolve())}function l(e){return e&&window.aegis&&"function"==typeof window.aegis.skillsRemove&&("function"!=typeof window.confirm||window.confirm('Delete the skill "'+e+'"? Its folder and SKILL.md will be removed.'))?window.aegis.skillsRemove(e).then((function(i){if(i&&i.ok)return t("skills-status","deleted "+e,"ok"),n();t("skills-status",i&&i.error||"could not remove that skill","error")})).catch((function(e){t("skills-status",e&&e.message||"could not remove that skill","error")})):Promise.resolve()}function o(i){i&&i.preventDefault();var a=e("skill-import-url"),l=e("skill-import-name"),o=a?a.value.trim():"";return o?window.aegis&&"function"==typeof window.aegis.skillsImport?(t("skill-import-hint","fetching…","info"),window.aegis.skillsImport({url:o,name:l?l.value.trim():""}).then((function(e){if(e&&e.ok)return t("skill-import-hint","imported "+e.name+" from "+e.source,"ok"),a&&(a.value=""),l&&(l.value=""),n();t("skill-import-hint",e&&e.error||"could not import that skill","error")})).catch((function(e){t("skill-import-hint",e&&e.message||"could not import that skill","error")}))):(t("skill-import-hint","skill import is not available in this build","error"),Promise.resolve()):(t("skill-import-hint","a URL is required","error"),a&&a.focus(),Promise.resolve())}var s={status:null,loaded:!1};function r(i){var n=i||{};s.status=n;var a=n.settings||{},l=e("dictation-enabled");l&&(l.checked=!0===a.enabled);var o=e("dictation-model");o&&(o.value=a.model||"");var r=e("dictation-language");r&&a.language&&(r.value=a.language);var d=e("dictation-max-seconds");d&&a.maxSeconds&&(d.value=String(a.maxSeconds));var c=[];n.enabled?c.push("Ready — "+(n.reason||"local engine available")+(a.model?"":" (no model file set)")):(c.push(n.reason||"dictation is off"),n.install&&c.push(n.install)),t("dictation-hint",c.join("\n"),n.enabled?"ok":"info");var u=e("dictation-save");u&&(u.disabled=!1),window.aegisDictation&&window.aegisDictation.renderMic()}function d(){return window.aegis&&"function"==typeof window.aegis.speechStatus?window.aegis.speechStatus().then((function(e){return s.loaded=!0,r(e),e})).catch((function(e){t("dictation-hint",e&&e.message||"could not read dictation status","error")})):(t("dictation-hint","dictation is not available in this build","error"),Promise.resolve())}function c(){if(!window.aegis||"function"!=typeof window.aegis.speechSet)return Promise.resolve();var i={enabled:Boolean(e("dictation-enabled")&&e("dictation-enabled").checked),engine:"local",model:e("dictation-model")?e("dictation-model").value.trim():"",language:e("dictation-language")?e("dictation-language").value:"auto",maxSeconds:e("dictation-max-seconds")?Number(e("dictation-max-seconds").value):60};return i.enabled||(i.engine="none"),window.aegis.speechSet(i).then((function(e){return e&&e.ok?(t("dictation-hint","saved","ok"),d()):(r(e||{}),e)})).catch((function(e){t("dictation-hint",e&&e.message||"could not save dictation settings","error")}))}function u(){var t=e("skills-form");t&&t.addEventListener("submit",a);var i=e("skills-import-form");i&&i.addEventListener("submit",o);var l=e("skills-refresh");l&&l.addEventListener("click",(function(){n()}));var s=e("dictation-save");s&&s.addEventListener("click",c);var r=e("dictation-refresh");r&&r.addEventListener("click",(function(){d()}));var u=e("dictation-enabled");u&&u.addEventListener("change",c)}window.aegisSettingsCards={refreshAll:function(){return Promise.all([n(),d()])},loadSkills:n,loadDictation:d,createSkill:a,importSkill:o,removeSkill:l,saveDictation:c,skills:function(){return i},dictation:function(){return s}},"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",(function(){u()})):u())}();
3
+ "use strict";!function(){function e(e){return document.getElementById(e)}function t(t,i,n){var a=e(t);a&&(a.textContent=i||"",n&&(a.dataset.kind=n),a.hidden=!i)}var i={entries:[],roots:[],missing:[],createDir:""};function n(){return window.aegis&&"function"==typeof window.aegis.skillsList?window.aegis.skillsList().then(function(n){n&&n.ok?(i.entries=n.skills||[],i.roots=n.roots||[],i.missing=n.missing||[],i.createDir=n.createDir||"",function(){var t=e("skills-list");if(t){if(t.innerHTML="",i.entries.length)i.entries.forEach(function(e){t.appendChild(function(e,t){var i=document.createElement("li");i.className="skill-row";var n=document.createElement("span");n.className="skill-row-name",n.textContent="/"+e.name,i.appendChild(n);var a=document.createElement("span");a.className="skill-row-desc",a.textContent=e.description||"(no description)",e.warning&&(a.classList.add("skill-row-warning"),a.title=e.warning),i.appendChild(a);var l=document.createElement("span");l.className="skill-row-scope",l.textContent=e.scope,l.title=e.path,i.appendChild(l);var o=document.createElement("button");return o.type="button",o.className="skill-row-remove",o.textContent="×",o.title="Delete this skill ("+e.path+")",o.setAttribute("aria-label","Delete skill "+e.name),o.addEventListener("click",function(){t(e.name)}),i.appendChild(o),i}(e,l))});else{var n=document.createElement("li");n.className="skill-row";var a=document.createElement("span");a.className="skill-row-desc",a.textContent="No skills found yet — create one below.",n.appendChild(a),t.appendChild(n)}var o=e("skills-dirs-list");o&&(o.innerHTML="",i.roots.forEach(function(e){var t=document.createElement("li");t.textContent=e,-1!==i.missing.indexOf(e)&&(t.classList.add("skills-dirs-missing"),t.title="does not exist yet — creating a skill here will create it"),o.appendChild(t)}));var s=e("skill-target-dir");if(s){var r=s.value;s.innerHTML="";var d=i.roots.filter(function(e){return-1===i.missing.indexOf(e)||e===i.createDir});i.createDir&&-1===d.indexOf(i.createDir)&&d.unshift(i.createDir),d.forEach(function(e){var t=document.createElement("option");t.value=e,t.textContent=e,s.appendChild(t)}),r&&-1!==d.indexOf(r)?s.value=r:i.createDir&&(s.value=i.createDir)}}}(),t("skills-status",i.entries.length?i.entries.length+(1===i.entries.length?" skill":" skills"):"","info")):t("skills-status",n&&n.error||"could not read the skill list","error")}).catch(function(e){t("skills-status",e&&e.message||"could not read the skill list","error")}):(t("skills-status","skills are not available in this build","error"),Promise.resolve())}function a(i){i&&i.preventDefault();var a=e("skill-name"),l=e("skill-description"),o=e("skill-body"),s=e("skill-target-dir"),r=a?a.value.trim():"";return r?window.aegis&&"function"==typeof window.aegis.skillsCreate?window.aegis.skillsCreate({name:r,description:l?l.value.trim():"",body:o?o.value:"",targetDir:s?s.value:""}).then(function(e){if(e&&e.ok)return t("skill-create-hint","created "+e.path,"ok"),a&&(a.value=""),l&&(l.value=""),o&&(o.value=""),n();t("skill-create-hint",e&&e.error||"could not create that skill","error")}).catch(function(e){t("skill-create-hint",e&&e.message||"could not create that skill","error")}):(t("skill-create-hint","skills are not available in this build","error"),Promise.resolve()):(t("skill-create-hint","a skill needs a name","error"),a&&a.focus(),Promise.resolve())}function l(e){return e&&window.aegis&&"function"==typeof window.aegis.skillsRemove&&("function"!=typeof window.confirm||window.confirm('Delete the skill "'+e+'"? Its folder and SKILL.md will be removed.'))?window.aegis.skillsRemove(e).then(function(i){if(i&&i.ok)return t("skills-status","deleted "+e,"ok"),n();t("skills-status",i&&i.error||"could not remove that skill","error")}).catch(function(e){t("skills-status",e&&e.message||"could not remove that skill","error")}):Promise.resolve()}function o(i){i&&i.preventDefault();var a=e("skill-import-url"),l=e("skill-import-name"),o=a?a.value.trim():"";return o?window.aegis&&"function"==typeof window.aegis.skillsImport?(t("skill-import-hint","fetching…","info"),window.aegis.skillsImport({url:o,name:l?l.value.trim():""}).then(function(e){if(e&&e.ok)return t("skill-import-hint","imported "+e.name+" from "+e.source,"ok"),a&&(a.value=""),l&&(l.value=""),n();t("skill-import-hint",e&&e.error||"could not import that skill","error")}).catch(function(e){t("skill-import-hint",e&&e.message||"could not import that skill","error")})):(t("skill-import-hint","skill import is not available in this build","error"),Promise.resolve()):(t("skill-import-hint","a URL is required","error"),a&&a.focus(),Promise.resolve())}var s={status:null,loaded:!1};function r(i){var n=i||{};s.status=n;var a=n.settings||{},l=e("dictation-enabled");l&&(l.checked=!0===a.enabled);var o=e("dictation-model");o&&(o.value=a.model||"");var r=e("dictation-language");r&&a.language&&(r.value=a.language);var d=e("dictation-max-seconds");d&&a.maxSeconds&&(d.value=String(a.maxSeconds));var c=[];n.enabled?c.push("Ready — "+(n.reason||"local engine available")+(a.model?"":" (no model file set)")):(c.push(n.reason||"dictation is off"),n.install&&c.push(n.install)),t("dictation-hint",c.join("\n"),n.enabled?"ok":"info");var u=e("dictation-save");u&&(u.disabled=!1),window.aegisDictation&&window.aegisDictation.renderMic()}function d(){return window.aegis&&"function"==typeof window.aegis.speechStatus?window.aegis.speechStatus().then(function(e){return s.loaded=!0,r(e),e}).catch(function(e){t("dictation-hint",e&&e.message||"could not read dictation status","error")}):(t("dictation-hint","dictation is not available in this build","error"),Promise.resolve())}function c(){if(!window.aegis||"function"!=typeof window.aegis.speechSet)return Promise.resolve();var i={enabled:Boolean(e("dictation-enabled")&&e("dictation-enabled").checked),engine:"local",model:e("dictation-model")?e("dictation-model").value.trim():"",language:e("dictation-language")?e("dictation-language").value:"auto",maxSeconds:e("dictation-max-seconds")?Number(e("dictation-max-seconds").value):60};return i.enabled||(i.engine="none"),window.aegis.speechSet(i).then(function(e){return e&&e.ok?(t("dictation-hint","saved","ok"),d()):(r(e||{}),e)}).catch(function(e){t("dictation-hint",e&&e.message||"could not save dictation settings","error")})}function u(){var t=e("skills-form");t&&t.addEventListener("submit",a);var i=e("skills-import-form");i&&i.addEventListener("submit",o);var l=e("skills-refresh");l&&l.addEventListener("click",function(){n()});var s=e("dictation-save");s&&s.addEventListener("click",c);var r=e("dictation-refresh");r&&r.addEventListener("click",function(){d()});var u=e("dictation-enabled");u&&u.addEventListener("change",c)}window.aegisSettingsCards={refreshAll:function(){return Promise.all([n(),d()])},loadSkills:n,loadDictation:d,createSkill:a,importSkill:o,removeSkill:l,saveDictation:c,skills:function(){return i},dictation:function(){return s}},"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){u()}):u())}();
@@ -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 MOD="Mod",SHORTCUTS=[{chord:`${MOD}+N`,label:"New chat",group:"Conversations",source:"menu",where:"File > New Chat"},{chord:`${MOD}+K`,label:"Search",group:"Conversations",source:"menu",where:"View > Search",note:"One sheet over both stores — sessions and memory."},{chord:`${MOD}+Shift+K`,label:"Search memory",group:"Conversations",source:"menu",where:"View > Search memory",hidden:!0,note:"Same sheet, pre-scoped to memory. The menu row is hidden; the chord works."},{chord:`${MOD}+F`,label:"Find in conversation",group:"Conversations",source:"menu",where:"Edit > Find in conversation",note:"Scoped to the transcript on screen; never leaves this window."},{chord:`${MOD}+S`,label:"Save as…",group:"Conversations",source:"menu",where:"File > Save as…",note:"The current session as Markdown."},{chord:`${MOD}+P`,label:"Command palette",group:"Windows",source:"menu",where:"View > Command palette…",note:"Not ⌘K — that chord already opens search."},{chord:`${MOD}+B`,label:"Toggle sidebar",group:"Windows",source:"menu",where:"View > Toggle sidebar",note:"Collapses the rail; it is not unmounted, so its state survives."},{chord:"Enter",label:"Send the message",group:"Composer",source:"renderer",where:"composer keydown"},{chord:"Shift+Enter",label:"New line without sending",group:"Composer",source:"renderer",where:"composer keydown"},{chord:"Up / Down",label:"Move the highlight",group:"Inside the palette",source:"renderer",where:"palette keydown"},{chord:"Enter",label:"Run the highlighted command",group:"Inside the palette",source:"renderer",where:"palette keydown"},{chord:"Esc",label:"Close the sheet on top",group:"Everywhere",source:"renderer",where:"overlay Escape",note:"With no sheet open it interrupts the running turn instead."},{chord:`${MOD}+R`,label:"Reload the window",group:"Everywhere",source:"native",where:"View > Reload"},{chord:`${MOD}+Shift+I`,label:"Toggle developer tools",group:"Everywhere",source:"native",where:"View > Toggle developer tools"}];function isMac(e){const o=String(e||"").toLowerCase();return"darwin"===o||o.startsWith("mac")}function modKey(e){return isMac(e)?"⌘":"Ctrl"}function platformize(e,o){const r=isMac(o);return String(e).split("+").map((e=>e===MOD?r?"⌘":"Ctrl":"Shift"===e?r?"⇧":"Shift":"Alt"===e?r?"⌥":"Alt":e)).join(r?"":"+")}function groups(){const e=[];for(const o of SHORTCUTS)e.includes(o.group)||e.push(o.group);return e}function rowsFor(e){return SHORTCUTS.filter((o=>o.group===e))}"undefined"!=typeof module&&module.exports&&(module.exports={SHORTCUTS:SHORTCUTS,MOD:MOD,isMac:isMac,modKey:modKey,platformize:platformize,groups:groups,rowsFor:rowsFor}),"undefined"!=typeof window&&(window.aegisShortcuts=window.aegisShortcuts||{},window.aegisShortcuts.SHORTCUTS=SHORTCUTS,window.aegisShortcuts.isMac=isMac,window.aegisShortcuts.platformize=platformize,window.aegisShortcuts.groups=groups,window.aegisShortcuts.rowsFor=rowsFor);
3
+ "use strict";const MOD="Mod",SHORTCUTS=[{chord:`${MOD}+N`,label:"New chat",group:"Conversations",source:"menu",where:"File > New Chat"},{chord:`${MOD}+K`,label:"Search",group:"Conversations",source:"menu",where:"View > Search",note:"One sheet over both stores — sessions and memory."},{chord:`${MOD}+Shift+K`,label:"Search memory",group:"Conversations",source:"menu",where:"View > Search memory",hidden:!0,note:"Same sheet, pre-scoped to memory. The menu row is hidden; the chord works."},{chord:`${MOD}+F`,label:"Find in conversation",group:"Conversations",source:"menu",where:"Edit > Find in conversation",note:"Scoped to the transcript on screen; never leaves this window."},{chord:`${MOD}+S`,label:"Save as…",group:"Conversations",source:"menu",where:"File > Save as…",note:"The current session as Markdown."},{chord:`${MOD}+P`,label:"Command palette",group:"Windows",source:"menu",where:"View > Command palette…",note:"Not ⌘K — that chord already opens search."},{chord:`${MOD}+B`,label:"Toggle sidebar",group:"Windows",source:"menu",where:"View > Toggle sidebar",note:"Collapses the rail; it is not unmounted, so its state survives."},{chord:"Enter",label:"Send the message",group:"Composer",source:"renderer",where:"composer keydown"},{chord:"Shift+Enter",label:"New line without sending",group:"Composer",source:"renderer",where:"composer keydown"},{chord:"Up / Down",label:"Move the highlight",group:"Inside the palette",source:"renderer",where:"palette keydown"},{chord:"Enter",label:"Run the highlighted command",group:"Inside the palette",source:"renderer",where:"palette keydown"},{chord:"Esc",label:"Close the sheet on top",group:"Everywhere",source:"renderer",where:"overlay Escape",note:"With no sheet open it interrupts the running turn instead."},{chord:`${MOD}+R`,label:"Reload the window",group:"Everywhere",source:"native",where:"View > Reload"},{chord:`${MOD}+Shift+I`,label:"Toggle developer tools",group:"Everywhere",source:"native",where:"View > Toggle developer tools"}];function isMac(e){const o=String(e||"").toLowerCase();return"darwin"===o||o.startsWith("mac")}function modKey(e){return isMac(e)?"⌘":"Ctrl"}function platformize(e,o){const r=isMac(o);return String(e).split("+").map(e=>e===MOD?r?"⌘":"Ctrl":"Shift"===e?r?"⇧":"Shift":"Alt"===e?r?"⌥":"Alt":e).join(r?"":"+")}function groups(){const e=[];for(const o of SHORTCUTS)e.includes(o.group)||e.push(o.group);return e}function rowsFor(e){return SHORTCUTS.filter(o=>o.group===e)}"undefined"!=typeof module&&module.exports&&(module.exports={SHORTCUTS:SHORTCUTS,MOD:MOD,isMac:isMac,modKey:modKey,platformize:platformize,groups:groups,rowsFor:rowsFor}),"undefined"!=typeof window&&(window.aegisShortcuts=window.aegisShortcuts||{},window.aegisShortcuts.SHORTCUTS=SHORTCUTS,window.aegisShortcuts.isMac=isMac,window.aegisShortcuts.platformize=platformize,window.aegisShortcuts.groups=groups,window.aegisShortcuts.rowsFor=rowsFor);
@@ -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 STICK_SLOP_PX=48;function nearBottom(t,e){const n=t||{},o=Number.isFinite(e)?e:STICK_SLOP_PX;return(Number(n.scrollHeight)||0)-(Number(n.scrollTop)||0)-(Number(n.clientHeight)||0)<=o}function shouldFollow(t,e){const n=e||{};return!!n.force||!n.userScrolledUp&&nearBottom(t,n.slop)}const ABORT_SIGNATURES=[/AbortError/,/\boperation was aborted\b/i,/\buser aborted\b/i,/\brequest\s+aborted\b/i,/\bsignal is aborted\b/i,/\baborted without reason\b/i];function isCancellation(t,e){if((e||{}).userStopped)return!0;if(!t)return!1;if("AbortError"===t.name||"ABORT_ERR"===t.code)return!0;const n="string"==typeof t?t:t.message;return"string"==typeof n&&ABORT_SIGNATURES.some((t=>t.test(n)))}function stopAppliesTo(t,e){return null!=t&&t!==e}function salvageTurn(t){const e=t||{},n="string"==typeof e.streamedText?e.streamedText:"",o="string"==typeof e.reasoningText?e.reasoningText:"";return n?{text:n,reasoning:o,kind:"answer"}:o?{text:o,reasoning:"",kind:"reasoning-only"}:{text:"(stopped before any output)",reasoning:"",kind:"empty"}}function replayableContent(t,e){return"reasoning-only"===t?"(stopped: reasoning only)":"empty"===t?"(stopped before any output)":e}function flattenParts(t){if(null==t)return"";if("string"==typeof t)return t;if(!Array.isArray(t))return"";const e=[];for(const n of t)n&&"object"==typeof n&&("string"==typeof n.text?e.push(n.text):"image_url"===n.type&&e.push("[image]"));return e.join("\n")}function joinContent(t,e){if("string"==typeof t&&"string"==typeof e)return`${t}\n\n${e}`;const n=[],o=t=>{if("string"!=typeof t){if(Array.isArray(t))for(const e of t)e&&"object"==typeof e&&("image_url"===e.type?n.push(e):"string"==typeof e.text&&n.push({type:"text",text:e.text}))}else t.trim()&&n.push({type:"text",text:t})};o(t),o(e);const r=n.filter((t=>"text"===t.type)).map((t=>t.text)),s=n.filter((t=>"image_url"===t.type)),i=[];return r.length&&i.push({type:"text",text:r.join("\n\n")}),i.push(...s),1===i.length&&"text"===i[0].type?i[0].text:i}function replayHistory(t){const e=[];for(const n of Array.isArray(t)?t:[]){if(!n)continue;if("user"!==n.role&&"assistant"!==n.role)continue;const t="string"==typeof n.content||Array.isArray(n.content)?n.content:"string"==typeof n.text?n.text:"",o=Array.isArray(t)?flattenParts(t):t;if(!o.trim())continue;if("assistant"===n.role&&isPlaceholderContent(o))continue;const r=e[e.length-1];r&&r.role===n.role?r.content=joinContent(r.content,t):e.push({role:n.role,content:t})}for(;e.length&&"assistant"===e[0].role;)e.shift();return e}function isPlaceholderContent(t){const e="string"==typeof t?t.trim():"";return!!e&&("(stopped: reasoning only)"===e||"(stopped before any output)"===e||"(empty response)"===e||"(no response)"===e)}const LIVE_METER_MIN_GROWTH=32,LIVE_METER_GROWTH_FRACTION=32;function liveMeterDue(t,e){const n=Number(e)||0;if(null==t)return n>0;const o=n-(Number(t)||0);return!(o<=0)&&o>=Math.max(32,Math.floor(n/32))}function toolMark(t){const e=t||{};return!0===e.ok?"✓":!1===e.ok?"✗":"⊘"}"undefined"!=typeof module&&module.exports&&(module.exports={nearBottom:nearBottom,shouldFollow:shouldFollow,isCancellation:isCancellation,stopAppliesTo:stopAppliesTo,salvageTurn:salvageTurn,replayableContent:replayableContent,isPlaceholderContent:isPlaceholderContent,replayHistory:replayHistory,liveMeterDue:liveMeterDue,toolMark:toolMark,STICK_SLOP_PX:STICK_SLOP_PX,LIVE_METER_MIN_GROWTH:32,LIVE_METER_GROWTH_FRACTION:32});
3
+ "use strict";const STICK_SLOP_PX=48;function nearBottom(t,e){const n=t||{},o=Number.isFinite(e)?e:48;return(Number(n.scrollHeight)||0)-(Number(n.scrollTop)||0)-(Number(n.clientHeight)||0)<=o}function shouldFollow(t,e){const n=e||{};return!!n.force||!n.userScrolledUp&&nearBottom(t,n.slop)}const ABORT_SIGNATURES=[/AbortError/,/\boperation was aborted\b/i,/\buser aborted\b/i,/\brequest\s+aborted\b/i,/\bsignal is aborted\b/i,/\baborted without reason\b/i];function isCancellation(t,e){if((e||{}).userStopped)return!0;if(!t)return!1;if("AbortError"===t.name||"ABORT_ERR"===t.code)return!0;const n="string"==typeof t?t:t.message;return"string"==typeof n&&ABORT_SIGNATURES.some(t=>t.test(n))}function stopAppliesTo(t,e){return null!=t&&t!==e}function salvageTurn(t){const e=t||{},n="string"==typeof e.streamedText?e.streamedText:"",o="string"==typeof e.reasoningText?e.reasoningText:"";return n?{text:n,reasoning:o,kind:"answer"}:o?{text:o,reasoning:"",kind:"reasoning-only"}:{text:"(stopped before any output)",reasoning:"",kind:"empty"}}function replayableContent(t,e){return"reasoning-only"===t?"(stopped: reasoning only)":"empty"===t?"(stopped before any output)":e}function flattenParts(t){if(null==t)return"";if("string"==typeof t)return t;if(!Array.isArray(t))return"";const e=[];for(const n of t)n&&"object"==typeof n&&("string"==typeof n.text?e.push(n.text):"image_url"===n.type&&e.push("[image]"));return e.join("\n")}function joinContent(t,e){if("string"==typeof t&&"string"==typeof e)return`${t}\n\n${e}`;const n=[],o=t=>{if("string"!=typeof t){if(Array.isArray(t))for(const e of t)e&&"object"==typeof e&&("image_url"===e.type?n.push(e):"string"==typeof e.text&&n.push({type:"text",text:e.text}))}else t.trim()&&n.push({type:"text",text:t})};o(t),o(e);const r=n.filter(t=>"text"===t.type).map(t=>t.text),s=n.filter(t=>"image_url"===t.type),i=[];return r.length&&i.push({type:"text",text:r.join("\n\n")}),i.push(...s),1===i.length&&"text"===i[0].type?i[0].text:i}function replayHistory(t){const e=[];for(const n of Array.isArray(t)?t:[]){if(!n)continue;if("user"!==n.role&&"assistant"!==n.role)continue;const t="string"==typeof n.content||Array.isArray(n.content)?n.content:"string"==typeof n.text?n.text:"",o=Array.isArray(t)?flattenParts(t):t;if(!o.trim())continue;if("assistant"===n.role&&isPlaceholderContent(o))continue;const r=e[e.length-1];r&&r.role===n.role?r.content=joinContent(r.content,t):e.push({role:n.role,content:t})}for(;e.length&&"assistant"===e[0].role;)e.shift();return e}function isPlaceholderContent(t){const e="string"==typeof t?t.trim():"";return!!e&&("(stopped: reasoning only)"===e||"(stopped before any output)"===e||"(empty response)"===e||"(no response)"===e)}const LIVE_METER_MIN_GROWTH=32,LIVE_METER_GROWTH_FRACTION=32;function growthGatedDue(t,e,n,o){if(null==t)return e>0;const r=e-(Number(t)||0);return!(r<=0)&&r>=Math.max(n,Math.floor(e/o))}function liveMeterDue(t,e){return growthGatedDue(t,Number(e)||0,32,32)}const MARKDOWN_RENDER_MIN_GROWTH=32,MARKDOWN_RENDER_GROWTH_FRACTION=32;function markdownRenderDue(t,e){return growthGatedDue(t,Number(e)||0,32,32)}function toolMark(t){const e=t||{};return!0===e.ok?"✓":!1===e.ok?"✗":"⊘"}"undefined"!=typeof module&&module.exports&&(module.exports={nearBottom:nearBottom,shouldFollow:shouldFollow,isCancellation:isCancellation,stopAppliesTo:stopAppliesTo,salvageTurn:salvageTurn,replayableContent:replayableContent,isPlaceholderContent:isPlaceholderContent,replayHistory:replayHistory,liveMeterDue:liveMeterDue,markdownRenderDue:markdownRenderDue,toolMark:toolMark,STICK_SLOP_PX:48,LIVE_METER_MIN_GROWTH:32,LIVE_METER_GROWTH_FRACTION:32,MARKDOWN_RENDER_MIN_GROWTH:32,MARKDOWN_RENDER_GROWTH_FRACTION:32});
@@ -6024,8 +6024,11 @@ body.keys-open {
6024
6024
  */
6025
6025
  /* ── ON9: the embedded terminal panel (renderer/pty-panel.js) ───────────────
6026
6026
  `aegiscode` running inside this window instead of a second OS process.
6027
- One overlay, one xterm.js instance; the close chip and Escape both tear it
6028
- down (pty-panel.js close()), same as the import sheet's backdrop pattern. */
6027
+ ONE overlay holding N terminals (tabs): each (cli) click adds a tab, the
6028
+ close chip tears down the active one, and closing the last removes the
6029
+ overlay (pty-panel.js close()), same as the import sheet's backdrop
6030
+ pattern. The main process was always multi-session — `pty-host.js` keys a
6031
+ Map by id — so the tabs are the whole of the multi-shell fix. */
6029
6032
  .pty-panel-overlay {
6030
6033
  position: fixed;
6031
6034
  inset: 0;
@@ -6050,14 +6053,54 @@ body.keys-open {
6050
6053
  .pty-panel-header {
6051
6054
  display: flex;
6052
6055
  align-items: center;
6053
- justify-content: space-between;
6056
+ gap: var(--s-1, 4px);
6054
6057
  padding: var(--s-2) var(--s-3);
6055
6058
  background: var(--surface3, rgba(255, 255, 255, 0.08));
6056
6059
  color: var(--text);
6057
6060
  font-weight: var(--fw-semibold);
6058
6061
  }
6059
6062
 
6063
+ /* The tab strip. Takes all spare width so + and × stay pinned right. */
6064
+ .pty-panel-tabs {
6065
+ display: flex;
6066
+ align-items: center;
6067
+ gap: var(--s-1, 4px);
6068
+ flex: 1 1 auto;
6069
+ min-width: 0;
6070
+ overflow-x: auto;
6071
+ scrollbar-width: thin;
6072
+ }
6073
+
6074
+ .pty-panel-tab {
6075
+ flex: 0 0 auto;
6076
+ background: none;
6077
+ border: 1px solid transparent;
6078
+ border-radius: var(--r-sm, 6px);
6079
+ color: var(--text-dim, var(--text));
6080
+ font: inherit;
6081
+ font-weight: var(--fw-regular, 400);
6082
+ font-size: var(--fs-sm, 13px);
6083
+ padding: 2px var(--s-2);
6084
+ cursor: pointer;
6085
+ opacity: 0.7;
6086
+ }
6087
+
6088
+ .pty-panel-tab:hover {
6089
+ opacity: 1;
6090
+ background: rgba(255, 255, 255, 0.06);
6091
+ }
6092
+
6093
+ .pty-panel-tab.is-active {
6094
+ opacity: 1;
6095
+ color: var(--text);
6096
+ font-weight: var(--fw-semibold);
6097
+ border-color: var(--border, rgba(255, 255, 255, 0.18));
6098
+ background: rgba(255, 255, 255, 0.1);
6099
+ }
6100
+
6101
+ .pty-panel-new,
6060
6102
  .pty-panel-close {
6103
+ flex: 0 0 auto;
6061
6104
  background: none;
6062
6105
  border: none;
6063
6106
  color: var(--text);
@@ -6067,8 +6110,17 @@ body.keys-open {
6067
6110
  padding: var(--s-1);
6068
6111
  }
6069
6112
 
6113
+ /* One slot per session; exactly one is visible. Every slot fills the body so
6114
+ a hidden tab's iframe keeps a non-zero box once re-shown — the re-fit in
6115
+ ptyPanelActivate() depends on that. */
6116
+ .pty-panel-slot {
6117
+ position: absolute;
6118
+ inset: var(--s-2);
6119
+ }
6120
+
6070
6121
  .pty-panel-body {
6071
6122
  flex: 1;
6123
+ position: relative;
6072
6124
  padding: var(--s-2);
6073
6125
  overflow: hidden;
6074
6126
  /* xterm.js paints its own canvas/rows inside; this just gives it a
@@ -6077,6 +6129,28 @@ body.keys-open {
6077
6129
  background: #0b0d10;
6078
6130
  }
6079
6131
 
6132
+ /* ON9b: the terminal is its own document (pty-frame.html) so xterm's injected
6133
+ styles land where `style-src` permits them — see the comment in that file.
6134
+ From this side it is one element that must fill the body exactly, because
6135
+ pty-panel.js derives cols/rows from the size of the root INSIDE it. */
6136
+ .pty-panel-frame {
6137
+ display: block;
6138
+ width: 100%;
6139
+ height: 100%;
6140
+ border: 0;
6141
+ background: #0b0d10;
6142
+ }
6143
+
6144
+ /* Shown in place of the terminal when the frame loaded without xterm — a
6145
+ sentence instead of an empty black panel. */
6146
+ .pty-panel-note {
6147
+ margin: 0;
6148
+ padding: var(--s-2);
6149
+ color: var(--text);
6150
+ font-family: var(--font-ui);
6151
+ font-size: var(--fs-sm, 13px);
6152
+ }
6153
+
6080
6154
  @media (prefers-reduced-motion: reduce) {
6081
6155
  *,
6082
6156
  *::before,
@@ -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 policy="undefined"!=typeof module&&module.exports?require("./stream-policy.js"):{nearBottom:nearBottom,shouldFollow:shouldFollow};function createTranscriptView(e){const n=e||{},t=n.messages,o="function"==typeof n.requestFrame?n.requestFrame:"function"==typeof requestAnimationFrame?requestAnimationFrame:e=>e();let r=!1;function c(){return t?{scrollHeight:t.scrollHeight,scrollTop:t.scrollTop,clientHeight:t.clientHeight}:null}function l(){return r=!policy.nearBottom(c()),r}return{metrics:c,noteScroll:l,attachScrollVeto:function(e){const n=e||t;return!(!n||"function"!=typeof n.addEventListener||(n.addEventListener("scroll",l,{passive:!0}),0))},follow:function(e){return!!t&&!!policy.shouldFollow(c(),{force:e&&e.force,userScrolledUp:r})&&(e&&e.force&&(r=!1),t.scrollTop=t.scrollHeight,!0)},paint:function(e){let n=!1;return function(){n||(n=!0,o((()=>{n=!1,e()})))}},isScrolledUp:()=>r}}function attachScrollLift(e){const n=e||{},t=Array.prototype.slice.call(n.panes||[]),o=n.target||("undefined"!=typeof document&&document.body?document.body:null);if(!t.length||!o||!o.classList)return null;const r="function"==typeof n.requestFrame?n.requestFrame:"function"==typeof requestAnimationFrame?requestAnimationFrame:e=>e(),c=n.className||"is-scrolled",l="number"==typeof n.threshold?n.threshold:4;let s=!1;function i(){s=!1;let e=!1;for(const n of t)if(n&&n.scrollTop>l){e=!0;break}o.classList.toggle(c,e),"function"==typeof n.onSync&&n.onSync({lifted:e,panes:t})}function u(){s||(s=!0,r(i))}for(const e of t)e&&"function"==typeof e.addEventListener&&e.addEventListener("scroll",u,{passive:!0});return i(),{sync:i,panes:t,unbind:()=>{for(const e of t)e&&"function"==typeof e.removeEventListener&&e.removeEventListener("scroll",u)}}}function bindEscapeInterrupt(e){const n=e||{};let t=null;function o(e){const o={at:Date.now(),key:e&&e.key,repeat:Boolean(e&&e.repeat),overlayOpen:null,hasPendingTurn:null,consumed:!1,threw:null};if(t=o,!e||"Escape"!==e.key)return!1;if(e.repeat)return!1;if("function"==typeof n.isOverlayOpen){try{o.overlayOpen=Boolean(n.isOverlayOpen())}catch(e){o.threw="isOverlayOpen: "+(e&&e.message||e),o.overlayOpen=!1}if(o.overlayOpen){if("function"==typeof n.onOverlayEscape)try{n.onOverlayEscape()}catch(e){o.threw="onOverlayEscape: "+(e&&e.message||e)}return!1}}if("function"==typeof n.hasPendingTurn){try{o.hasPendingTurn=Boolean(n.hasPendingTurn())}catch(e){return o.threw="hasPendingTurn: "+(e&&e.message||e),!1}if(!o.hasPendingTurn)return!1}if("function"!=typeof n.stopTurn)return!1;"function"==typeof e.preventDefault&&e.preventDefault(),o.consumed=!0;let r=null;try{const e=n.stopTurn();r=void 0===e?null:Boolean(e)}catch(e){r=!1,o.threw="stopTurn: "+(e&&e.message||e)}return o.stopAccepted=r,!0}return n.doc&&"function"==typeof n.doc.addEventListener&&n.doc.addEventListener("keydown",o),{handle:o,lastDecision:()=>t,unbind:()=>{n.doc&&"function"==typeof n.doc.removeEventListener&&n.doc.removeEventListener("keydown",o)}}}"undefined"!=typeof module&&module.exports&&(module.exports={createTranscriptView:createTranscriptView,bindEscapeInterrupt:bindEscapeInterrupt,attachScrollLift:attachScrollLift});
3
+ "use strict";const policy="undefined"!=typeof module&&module.exports?require("./stream-policy.js"):{nearBottom:nearBottom,shouldFollow:shouldFollow};function createTranscriptView(e){const n=e||{},t=n.messages,o="function"==typeof n.requestFrame?n.requestFrame:"function"==typeof requestAnimationFrame?requestAnimationFrame:e=>e();let r=!1;function c(){return t?{scrollHeight:t.scrollHeight,scrollTop:t.scrollTop,clientHeight:t.clientHeight}:null}function l(){return r=!policy.nearBottom(c()),r}return{metrics:c,noteScroll:l,attachScrollVeto:function(e){const n=e||t;return!(!n||"function"!=typeof n.addEventListener||(n.addEventListener("scroll",l,{passive:!0}),0))},follow:function(e){return!!t&&!!policy.shouldFollow(c(),{force:e&&e.force,userScrolledUp:r})&&(e&&e.force&&(r=!1),t.scrollTop=t.scrollHeight,!0)},paint:function(e){let n=!1;return function(){n||(n=!0,o(()=>{n=!1,e()}))}},isScrolledUp:()=>r}}function attachScrollLift(e){const n=e||{},t=Array.prototype.slice.call(n.panes||[]),o=n.target||("undefined"!=typeof document&&document.body?document.body:null);if(!t.length||!o||!o.classList)return null;const r="function"==typeof n.requestFrame?n.requestFrame:"function"==typeof requestAnimationFrame?requestAnimationFrame:e=>e(),c=n.className||"is-scrolled",l="number"==typeof n.threshold?n.threshold:4;let s=!1;function i(){s=!1;let e=!1;for(const n of t)if(n&&n.scrollTop>l){e=!0;break}o.classList.toggle(c,e),"function"==typeof n.onSync&&n.onSync({lifted:e,panes:t})}function u(){s||(s=!0,r(i))}for(const e of t)e&&"function"==typeof e.addEventListener&&e.addEventListener("scroll",u,{passive:!0});return i(),{sync:i,panes:t,unbind:()=>{for(const e of t)e&&"function"==typeof e.removeEventListener&&e.removeEventListener("scroll",u)}}}function bindEscapeInterrupt(e){const n=e||{};let t=null;function o(e){const o={at:Date.now(),key:e&&e.key,repeat:Boolean(e&&e.repeat),overlayOpen:null,hasPendingTurn:null,consumed:!1,threw:null};if(t=o,!e||"Escape"!==e.key)return!1;if(e.repeat)return!1;if("function"==typeof n.isOverlayOpen){try{o.overlayOpen=Boolean(n.isOverlayOpen())}catch(e){o.threw="isOverlayOpen: "+(e&&e.message||e),o.overlayOpen=!1}if(o.overlayOpen){if("function"==typeof n.onOverlayEscape)try{n.onOverlayEscape()}catch(e){o.threw="onOverlayEscape: "+(e&&e.message||e)}return!1}}if("function"==typeof n.hasPendingTurn){try{o.hasPendingTurn=Boolean(n.hasPendingTurn())}catch(e){return o.threw="hasPendingTurn: "+(e&&e.message||e),!1}if(!o.hasPendingTurn)return!1}if("function"!=typeof n.stopTurn)return!1;"function"==typeof e.preventDefault&&e.preventDefault(),o.consumed=!0;let r=null;try{const e=n.stopTurn();r=void 0===e?null:Boolean(e)}catch(e){r=!1,o.threw="stopTurn: "+(e&&e.message||e)}return o.stopAccepted=r,!0}return n.doc&&"function"==typeof n.doc.addEventListener&&n.doc.addEventListener("keydown",o),{handle:o,lastDecision:()=>t,unbind:()=>{n.doc&&"function"==typeof n.doc.removeEventListener&&n.doc.removeEventListener("keydown",o)}}}"undefined"!=typeof module&&module.exports&&(module.exports={createTranscriptView:createTranscriptView,bindEscapeInterrupt:bindEscapeInterrupt,attachScrollLift:attachScrollLift});