aegisone 1.0.6 → 1.0.9

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 (222) hide show
  1. package/README.md +2 -2
  2. package/bin/aegis.js +5 -0
  3. package/install.ps1 +5 -0
  4. package/install.sh +5 -0
  5. package/package.json +1 -1
  6. package/scripts/bump.mjs +5 -0
  7. package/scripts/bundle.js +5 -0
  8. package/scripts/predist.mjs +9 -0
  9. package/src/child.js +5 -0
  10. package/src/dispatch.js +5 -0
  11. package/src/doctor.js +5 -0
  12. package/src/host.js +5 -0
  13. package/src/permissions.js +5 -0
  14. package/src/probes.js +5 -0
  15. package/src/release.js +19 -5
  16. package/vendor/cli/README.md +39 -1
  17. package/vendor/cli/bin/aegiscode.js +137 -0
  18. package/vendor/cli/package.json +1 -1
  19. package/vendor/cli/scripts/check.mjs +5 -0
  20. package/vendor/cli/scripts/demo.mjs +5 -0
  21. package/vendor/cli/scripts/predist.mjs +29 -2
  22. package/vendor/cli/scripts/runtests.mjs +5 -0
  23. package/vendor/cli/scripts/seal-gate.mjs +76 -0
  24. package/vendor/cli/src/agents.js +5 -0
  25. package/vendor/cli/src/app.js +79 -1
  26. package/vendor/cli/src/art.js +5 -0
  27. package/vendor/cli/src/autonomous.js +23 -0
  28. package/vendor/cli/src/caps.js +5 -0
  29. package/vendor/cli/src/chatflow.js +245 -32
  30. package/vendor/cli/src/checkpoint.js +5 -0
  31. package/vendor/cli/src/clipboard.js +5 -0
  32. package/vendor/cli/src/cloudsync.js +5 -0
  33. package/vendor/cli/src/commands.js +487 -4
  34. package/vendor/cli/src/config.js +5 -0
  35. package/vendor/cli/src/credentials.js +5 -0
  36. package/vendor/cli/src/deps.js +5 -0
  37. package/vendor/cli/src/devrun.js +5 -0
  38. package/vendor/cli/src/diff.js +5 -0
  39. package/vendor/cli/src/diffview.js +5 -0
  40. package/vendor/cli/src/engine.js +9 -2
  41. package/vendor/cli/src/entitlement.js +5 -0
  42. package/vendor/cli/src/events.js +15 -0
  43. package/vendor/cli/src/export.js +5 -0
  44. package/vendor/cli/src/fingerprint.js +5 -0
  45. package/vendor/cli/src/format.js +5 -0
  46. package/vendor/cli/src/fuzzy.js +5 -0
  47. package/vendor/cli/src/gate.js +12 -0
  48. package/vendor/cli/src/history.js +5 -0
  49. package/vendor/cli/src/init.js +5 -0
  50. package/vendor/cli/src/input.js +5 -0
  51. package/vendor/cli/src/keys.js +29 -2
  52. package/vendor/cli/src/limits.js +192 -0
  53. package/vendor/cli/src/markdown.js +5 -0
  54. package/vendor/cli/src/mcp.js +13 -0
  55. package/vendor/cli/src/models.js +5 -0
  56. package/vendor/cli/src/naming.js +5 -0
  57. package/vendor/cli/src/overlays.js +7 -2
  58. package/vendor/cli/src/panels.js +5 -0
  59. package/vendor/cli/src/permissions.js +56 -1
  60. package/vendor/cli/src/ping.js +5 -0
  61. package/vendor/cli/src/presence.js +5 -0
  62. package/vendor/cli/src/provenance.js +238 -0
  63. package/vendor/cli/src/provenance.lock.json +36 -0
  64. package/vendor/cli/src/render.js +5 -0
  65. package/vendor/cli/src/screen.js +5 -0
  66. package/vendor/cli/src/screens.js +166 -62
  67. package/vendor/cli/src/secret.js +5 -0
  68. package/vendor/cli/src/securefs.js +5 -0
  69. package/vendor/cli/src/settings.js +5 -0
  70. package/vendor/cli/src/shared.js +5 -0
  71. package/vendor/cli/src/sharedpaths.js +5 -0
  72. package/vendor/cli/src/signup.js +5 -0
  73. package/vendor/cli/src/summarize.js +5 -0
  74. package/vendor/cli/src/sysdiag.js +582 -0
  75. package/vendor/cli/src/system.js +5 -0
  76. package/vendor/cli/src/theme.js +5 -0
  77. package/vendor/cli/src/title.js +5 -0
  78. package/vendor/cli/src/todos.js +5 -0
  79. package/vendor/cli/src/tokens.js +5 -0
  80. package/vendor/cli/src/topup.js +5 -0
  81. package/vendor/cli/src/update.js +5 -0
  82. package/vendor/cli/vendor/client/aegis.js +27 -0
  83. package/vendor/cli/vendor/client/attest.js +5 -0
  84. package/vendor/cli/vendor/client/authorship-key.js +5 -0
  85. package/vendor/cli/vendor/client/auto-provision.js +5 -0
  86. package/vendor/cli/vendor/client/brain-catalog.js +5 -0
  87. package/vendor/cli/vendor/client/byok-catalog.js +48 -8
  88. package/vendor/cli/vendor/client/credentials.js +5 -0
  89. package/vendor/cli/vendor/client/device-fingerprint.js +5 -0
  90. package/vendor/cli/vendor/client/env-file.js +5 -0
  91. package/vendor/cli/vendor/client/fingerprint.js +5 -0
  92. package/vendor/cli/vendor/client/foreign-memory.js +5 -0
  93. package/vendor/cli/vendor/client/hooks.js +5 -0
  94. package/vendor/cli/vendor/client/model-discovery.js +332 -0
  95. package/vendor/cli/vendor/client/platform.js +5 -0
  96. package/vendor/cli/vendor/client/prefs.js +5 -0
  97. package/vendor/cli/vendor/client/presence-constants.js +5 -0
  98. package/vendor/cli/vendor/client/presence.js +5 -0
  99. package/vendor/cli/vendor/client/record-vault.js +5 -0
  100. package/vendor/cli/vendor/client/session-store.js +5 -0
  101. package/vendor/cli/vendor/client/topup.js +5 -0
  102. package/vendor/cli/vendor/client/touch.js +5 -0
  103. package/vendor/cli/vendor/client/update.js +5 -0
  104. package/vendor/cli/vendor/client/user-models.js +383 -0
  105. package/vendor/cli/vendor/desktop/lib/local/aegis-seal.mjs +5 -0
  106. package/vendor/cli/vendor/desktop/lib/local/agents.js +5 -0
  107. package/vendor/cli/vendor/desktop/lib/local/autonomous.js +86 -0
  108. package/vendor/cli/vendor/desktop/lib/local/context.js +5 -0
  109. package/vendor/cli/vendor/desktop/lib/local/covenant.js +5 -0
  110. package/vendor/cli/vendor/desktop/lib/local/engine.js +576 -14
  111. package/vendor/cli/vendor/desktop/lib/local/entitlement.js +5 -0
  112. package/vendor/cli/vendor/desktop/lib/local/git-scope.js +5 -0
  113. package/vendor/cli/vendor/desktop/lib/local/local.js +5 -0
  114. package/vendor/cli/vendor/desktop/lib/local/prompt.js +5 -0
  115. package/vendor/cli/vendor/desktop/lib/local/queue.js +5 -0
  116. package/vendor/cli/vendor/desktop/lib/local/session-rounds.js +5 -0
  117. package/vendor/cli/vendor/desktop/lib/local/shell.js +88 -9
  118. package/vendor/cli/vendor/desktop/lib/local/tools.js +13 -6
  119. package/vendor/cli/vendor/desktop/lib/local/turn-guard.js +5 -0
  120. package/vendor/cli/vendor/desktop/lib/local/worktree-lock.js +5 -0
  121. package/vendor/cli/vendor/desktop/lib/settings.js +5 -0
  122. package/vendor/cli/vendor/desktop/renderer/usage.js +73 -1
  123. package/vendor/cli/vendor/mcp/server.js +5 -0
  124. package/vendor/cli/vendor/mcp/tools.js +5 -0
  125. package/vendor/cli/vendor/tools/agent-gate.mjs +23 -0
  126. package/vendor/desktop/README.md +11 -0
  127. package/vendor/desktop/bin/aegis.js +5 -0
  128. package/vendor/desktop/lib/auto.js +5 -0
  129. package/vendor/desktop/lib/avatar/companion.js +5 -0
  130. package/vendor/desktop/lib/avatar/cosmetics.js +5 -0
  131. package/vendor/desktop/lib/avatar/events.js +5 -0
  132. package/vendor/desktop/lib/avatar/holder-turn.js +5 -0
  133. package/vendor/desktop/lib/avatar/holders.js +5 -0
  134. package/vendor/desktop/lib/avatar/identity.js +5 -0
  135. package/vendor/desktop/lib/avatar/level.js +5 -0
  136. package/vendor/desktop/lib/avatar/mirror.js +5 -0
  137. package/vendor/desktop/lib/avatar/persona.js +5 -0
  138. package/vendor/desktop/lib/avatar/profile.js +5 -0
  139. package/vendor/desktop/lib/avatar/register.js +5 -0
  140. package/vendor/desktop/lib/avatar/store.js +5 -0
  141. package/vendor/desktop/lib/avatar/tiers.js +5 -0
  142. package/vendor/desktop/lib/avatar/transfer.js +5 -0
  143. package/vendor/desktop/lib/avatar/turn.js +5 -0
  144. package/vendor/desktop/lib/avatar/voice.js +5 -0
  145. package/vendor/desktop/lib/avatar/xp.js +5 -0
  146. package/vendor/desktop/lib/deep-link.js +40 -1
  147. package/vendor/desktop/lib/fingerprint.js +5 -0
  148. package/vendor/desktop/lib/local/aegis-seal.mjs +5 -0
  149. package/vendor/desktop/lib/local/agents.js +5 -0
  150. package/vendor/desktop/lib/local/autonomous.js +86 -0
  151. package/vendor/desktop/lib/local/context.js +5 -0
  152. package/vendor/desktop/lib/local/covenant.js +5 -0
  153. package/vendor/desktop/lib/local/engine.js +576 -14
  154. package/vendor/desktop/lib/local/entitlement.js +5 -0
  155. package/vendor/desktop/lib/local/git-scope.js +5 -0
  156. package/vendor/desktop/lib/local/local.js +5 -0
  157. package/vendor/desktop/lib/local/prompt.js +5 -0
  158. package/vendor/desktop/lib/local/queue.js +5 -0
  159. package/vendor/desktop/lib/local/session-rounds.js +5 -0
  160. package/vendor/desktop/lib/local/shell.js +88 -9
  161. package/vendor/desktop/lib/local/telemetry.js +5 -0
  162. package/vendor/desktop/lib/local/tools.js +13 -6
  163. package/vendor/desktop/lib/local/turn-guard.js +5 -0
  164. package/vendor/desktop/lib/local/worktree-lock.js +5 -0
  165. package/vendor/desktop/lib/provider-key-mirror.js +5 -0
  166. package/vendor/desktop/lib/quick-launcher.js +5 -0
  167. package/vendor/desktop/lib/settings.js +5 -0
  168. package/vendor/desktop/lib/sync/memory-queue.js +5 -0
  169. package/vendor/desktop/lib/sync/persist-gate.js +5 -0
  170. package/vendor/desktop/lib/sync/sessions.js +5 -0
  171. package/vendor/desktop/lib/window-state.js +5 -0
  172. package/vendor/desktop/main.js +293 -6
  173. package/vendor/desktop/package.json +1 -1
  174. package/vendor/desktop/preload.js +32 -0
  175. package/vendor/desktop/renderer/app.js +506 -12
  176. package/vendor/desktop/renderer/avatar/assemble.js +5 -0
  177. package/vendor/desktop/renderer/avatar/avatar.css +7 -0
  178. package/vendor/desktop/renderer/avatar/avatar.js +5 -0
  179. package/vendor/desktop/renderer/avatar/cards.js +5 -0
  180. package/vendor/desktop/renderer/avatar/hud.js +5 -0
  181. package/vendor/desktop/renderer/avatar/machine.js +5 -0
  182. package/vendor/desktop/renderer/avatar/pane.js +5 -0
  183. package/vendor/desktop/renderer/avatar/parts.js +5 -0
  184. package/vendor/desktop/renderer/budget.js +5 -0
  185. package/vendor/desktop/renderer/diff.js +5 -0
  186. package/vendor/desktop/renderer/diffview.js +5 -0
  187. package/vendor/desktop/renderer/fingerprint.css +7 -0
  188. package/vendor/desktop/renderer/fingerprint.js +5 -0
  189. package/vendor/desktop/renderer/fonts/fonts.css +7 -0
  190. package/vendor/desktop/renderer/index.html +9 -2
  191. package/vendor/desktop/renderer/markdown.js +5 -0
  192. package/vendor/desktop/renderer/quick.css +7 -0
  193. package/vendor/desktop/renderer/quick.html +7 -0
  194. package/vendor/desktop/renderer/quick.js +5 -0
  195. package/vendor/desktop/renderer/stream-policy.js +5 -0
  196. package/vendor/desktop/renderer/style.css +39 -0
  197. package/vendor/desktop/renderer/transcript-view.js +5 -0
  198. package/vendor/desktop/renderer/usage.js +73 -1
  199. package/vendor/desktop/vendor/aegis.js +27 -0
  200. package/vendor/desktop/vendor/agent-gate.mjs +23 -0
  201. package/vendor/desktop/vendor/attest.js +5 -0
  202. package/vendor/desktop/vendor/authorship-key.js +5 -0
  203. package/vendor/desktop/vendor/auto-provision.js +5 -0
  204. package/vendor/desktop/vendor/brain-catalog.js +5 -0
  205. package/vendor/desktop/vendor/byok-catalog.js +48 -8
  206. package/vendor/desktop/vendor/credentials.js +5 -0
  207. package/vendor/desktop/vendor/device-fingerprint.js +5 -0
  208. package/vendor/desktop/vendor/env-file.js +5 -0
  209. package/vendor/desktop/vendor/fingerprint.js +5 -0
  210. package/vendor/desktop/vendor/foreign-memory.js +5 -0
  211. package/vendor/desktop/vendor/hooks.js +5 -0
  212. package/vendor/desktop/vendor/model-discovery.js +332 -0
  213. package/vendor/desktop/vendor/platform.js +5 -0
  214. package/vendor/desktop/vendor/prefs.js +5 -0
  215. package/vendor/desktop/vendor/presence-constants.js +5 -0
  216. package/vendor/desktop/vendor/presence.js +5 -0
  217. package/vendor/desktop/vendor/record-vault.js +5 -0
  218. package/vendor/desktop/vendor/session-store.js +5 -0
  219. package/vendor/desktop/vendor/topup.js +5 -0
  220. package/vendor/desktop/vendor/touch.js +5 -0
  221. package/vendor/desktop/vendor/update.js +5 -0
  222. package/vendor/desktop/vendor/user-models.js +383 -0
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,10 @@
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
+ */
1
8
  /* ---------------------------------------------------------- φ(α) panel
2
9
  The panel reuses the memory inspector's sheet (.memory-overlay /
3
10
  .memory-panel, style.css:483+) so the two overlays are the same object to the
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,10 @@
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
+ */
1
8
  /* Vendored webfonts — DO NOT EDIT BY HAND.
2
9
  *
3
10
  * Generated by desktop/scripts/bundle-fonts.mjs from the Google Fonts CSS for
@@ -1,4 +1,11 @@
1
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
+ -->
2
9
  <html lang="en">
3
10
  <head>
4
11
  <meta charset="utf-8" />
@@ -544,14 +551,14 @@
544
551
  <button type="button" class="wc-link" id="welcome-cloud">
545
552
  Connect AEGIS Cloud — I already have a key →
546
553
  </button>
547
- <span class="wc-note">
554
+ <span class="wc-note" id="welcome-cloud-note">
548
555
  Connect it here and the same queue runs on pooled models right
549
556
  away, free, while this window is open.
550
557
  </span>
551
558
  <button type="button" class="wc-link" id="welcome-byok">
552
559
  Bring your own key →
553
560
  </button>
554
- <span class="wc-note">
561
+ <span class="wc-note" id="welcome-byok-note">
555
562
  The free path, and it stays free: exec, write and edit run on
556
563
  your machine, your repos, sessions and keys live on this disk,
557
564
  and a local model server needs no account at all. A provider
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,10 @@
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
+ */
1
8
  :root {
2
9
  --bg: #0d1117;
3
10
  --surface: #12161e;
@@ -1,4 +1,11 @@
1
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
+ -->
2
9
  <html lang="en">
3
10
  <head>
4
11
  <meta charset="utf-8" />
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,10 @@
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
+ */
1
8
  :root {
2
9
  --bg: #0a0e14;
3
10
  --surface: #12161e;
@@ -1525,6 +1532,38 @@ label {
1525
1532
  background: rgba(255, 255, 255, 0.03);
1526
1533
  }
1527
1534
 
1535
+ /* The round-horizon card borrows the approval card wholesale — same slot, same
1536
+ buttons, same one-decision-then-disable behaviour — and only re-tints to the
1537
+ accent: it is a budget question about the turn, not a permission question
1538
+ about a tool, and the two can be on screen in the same conversation. Without
1539
+ the tint a user reading quickly would answer the wrong one. */
1540
+ .rounds-card {
1541
+ border-color: var(--accent);
1542
+ background: rgba(90, 160, 255, 0.08);
1543
+ }
1544
+
1545
+ .rounds-card .approval-title {
1546
+ color: var(--accent);
1547
+ }
1548
+
1549
+ .rounds-card.resolved .approval-title {
1550
+ color: var(--text2);
1551
+ }
1552
+
1553
+ /* An app-authored turn note ({ note } frames — today auto mode's "continuing
1554
+ automatically" line). Muted and unboxed on purpose: it is a statement about
1555
+ the turn's budget, not a question, and it must not read as either of the two
1556
+ cards that ARE questions (approval, round horizon). */
1557
+ .turn-note {
1558
+ font-family: var(--font-mono);
1559
+ font-size: 11px;
1560
+ color: var(--text2);
1561
+ border-left: 2px solid var(--accent);
1562
+ padding: 2px 0 2px 8px;
1563
+ margin: 4px 0;
1564
+ opacity: 0.9;
1565
+ }
1566
+
1528
1567
  .approval-title {
1529
1568
  font-family: var(--font-mono);
1530
1569
  font-size: 11px;
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -139,9 +144,36 @@ function estimatedBuckets(prompt, reply, reasoning) {
139
144
  // Keys are matched by exact id first, then by prefix (ratesFor below), so a
140
145
  // family row covers every dated variant of it.
141
146
  const RATES = {
147
+ // Sonnet, Opus, Fable, Haiku — the four FAMILY rows, matched by prefix, and
148
+ // deliberately NOT re-pointed at any one generation's price.
149
+ //
150
+ // The tempting change is to price this row as Claude Sonnet 5's published
151
+ // $2.00/$10.00, on the theory that `sonnet` names Sonnet 5. It does not: this
152
+ // repo's own alias tables carry no such id. `cli/src/models.js` lists pooled
153
+ // seats by name and `cli/src/config.js` records that the platform "does not
154
+ // advertise" `sonnet` at all — a pin on it was a phantom that made the pool
155
+ // answer from its own default with no error. So a bare `sonnet` is a LABEL,
156
+ // not a route: `cli/src/tokens.js` uses it as the default stand-in when no
157
+ // model is named, and the family row here is what a non-`claude-`-prefixed
158
+ // spelling resolves to by prefix.
159
+ //
160
+ // $3.00/$15.00 is therefore the honest figure for it, and it is the SAME
161
+ // figure as `RATES.default` below — which is the point: an id that names no
162
+ // real vendored route prices exactly like an unpriced one, never like a
163
+ // current-generation model. Every id that DOES name a real model has an exact
164
+ // row in the Claude 5 block below, and an exact id out-ranks a prefix match,
165
+ // so correcting those is what fixes the money — re-pointing this family row
166
+ // only moves the number an admitted placeholder reports, and silently
167
+ // re-prices every dated spelling that resolves here by prefix
168
+ // (`sonnet-4-5-20250929` is pinned at $3.00 in test/turn-accounting.test.mjs
169
+ // for exactly that reason).
142
170
  sonnet: { input: 3.00, output: 15.00, cacheRead: 0.30, cacheWrite: 3.75 },
143
171
  default: { input: 3.00, output: 15.00, cacheRead: 0.30, cacheWrite: 3.75 },
144
- fable: { input: 5.00, output: 25.00, cacheRead: 0.50, cacheWrite: 6.25 },
172
+ // Fable — the alias for **claude-fable-5**, at Fable's published
173
+ // $10.00/$50.00. The $5.00/$25.00 this row used to carry is the Opus-class
174
+ // figure; Fable has never been priced there, and the error ran in the
175
+ // under-reporting direction on the most expensive model in the lineup.
176
+ fable: { input: 10.00, output: 50.00, cacheRead: 1.00, cacheWrite: 12.50 },
145
177
  opus: { input: 5.00, output: 25.00, cacheRead: 0.50, cacheWrite: 6.25 },
146
178
  // Haiku — the same class of hole as the DeepSeek row below, on the provider
147
179
  // whose prices we already thought we knew. The three rows above price Sonnet,
@@ -160,6 +192,46 @@ const RATES = {
160
192
  // match is EXACT and cannot be reordered away.
161
193
  'claude-haiku': { input: 1.00, output: 5.00, cacheRead: 0.10, cacheWrite: 1.25 },
162
194
 
195
+ // ── the Claude 5 line, one row per ID ────────────────────────────────────
196
+ //
197
+ // Every figure here is Anthropic's own published rate (docs.claude.com
198
+ // pricing table, fetched 2026-10-11), not a fraction derived from a sibling
199
+ // row. They are EXACT rows because the family fallback prices this
200
+ // generation wrong in both directions: `claude-sonnet-5-5` family-matched
201
+ // `sonnet` and `claude-fable-5-1` family-matched `fable`, so the very ids
202
+ // the picker offers and the BYOK relay forwards were billed at rates the
203
+ // vendor does not charge for them.
204
+ //
205
+ // cacheRead is NOT the 0.1x-input convention the 4.x rows above use.
206
+ // Anthropic changed the cache-hit multiplier on this generation and quotes
207
+ // it per model — 5% of input on Opus 5.5 and Sonnet 5.5 ($0.20 / $0.10),
208
+ // 2.5% on Fable 5.1 ($0.25), 10% on Fable 5 and Haiku 5.5 ($1.00 / $0.01)
209
+ // — so each row carries the published number rather than a multiplier this
210
+ // file computed. cacheWrite stays 1.25x input, which the same table
211
+ // confirms for all of them.
212
+ //
213
+ // Haiku 5.5 is priced by PROMPT LENGTH: the vendor charges 5x input and 5x
214
+ // output once a request's prompt passes 100k tokens ($0.50/$2.50). This
215
+ // schema has no prompt-size field — the only tiering it models is
216
+ // DeepSeek's time-of-day peak/offPeak — so the row carries the up-to-100k
217
+ // tier and a long-context Haiku turn UNDER-reports. Said out loud rather
218
+ // than left implicit: the alternative is 5x-ing every ordinary Haiku turn,
219
+ // which is the louder error.
220
+ 'claude-opus-5': { input: 5.00, output: 25.00, cacheRead: 0.50, cacheWrite: 6.25 },
221
+ 'claude-opus-5-5': { input: 4.00, output: 20.00, cacheRead: 0.20, cacheWrite: 5.00 },
222
+ 'claude-sonnet-5': { input: 2.00, output: 10.00, cacheRead: 0.20, cacheWrite: 2.50 },
223
+ 'claude-sonnet-5-5': { input: 2.00, output: 10.00, cacheRead: 0.10, cacheWrite: 2.50 },
224
+ 'claude-haiku-5-5': { input: 0.10, output: 0.50, cacheRead: 0.01, cacheWrite: 0.125 },
225
+ 'claude-fable-5': { input: 10.00, output: 50.00, cacheRead: 1.00, cacheWrite: 12.50 },
226
+ 'claude-fable-5-1': { input: 10.00, output: 50.00, cacheRead: 0.25, cacheWrite: 12.50 },
227
+ // The Sonnet 4.x spellings keep their own line items now that `sonnet`
228
+ // above carries the 5-line price: without these, a Claude Sonnet 4.x turn —
229
+ // the id a config saved before this change still holds, and the wire model
230
+ // the dated form names — would family-match the alias row and be billed
231
+ // $2.00/$10.00 against the vendor's $3.00/$15.00.
232
+ 'claude-sonnet-4-6': { input: 3.00, output: 15.00, cacheRead: 0.30, cacheWrite: 3.75 },
233
+ 'claude-sonnet-4-5': { input: 3.00, output: 15.00, cacheRead: 0.30, cacheWrite: 3.75 },
234
+
163
235
  // DeepSeek — read off the vendor's own pricing table
164
236
  // (api-docs.deepseek.com/quick_start/pricing), not from a secondary blog and
165
237
  // not from a mirror of our own catalog.
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env node
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.
2
7
  /**
3
8
  * AEGIS thin client — zero-dependency transport to aegiscloud.org.
4
9
  *
@@ -1440,7 +1445,29 @@ function createClient(opts = {}) {
1440
1445
  .sort((a, b) => a[0] - b[0])
1441
1446
  .map(([idx, c]) => ({ ...c, id: c.id || `call_${idx}` }));
1442
1447
 
1448
+ // The hidden chain-of-thought belongs on the RESULT, not only on the live
1449
+ // stream. `reasoningText` above is accumulated and forwarded to the caller's
1450
+ // `onReasoning`/`onStream` so the thinking can be shown while it happens —
1451
+ // but the resolved result carried only `content`, so every down-stream
1452
+ // diagnosis of "the model spent the whole budget thinking and never wrote a
1453
+ // word" read an empty reasoning channel on THIS lane and concluded there had
1454
+ // been no thinking at all.
1455
+ //
1456
+ // That is not a cosmetic loss. desktop/lib/local/engine.js decides its
1457
+ // reasoning-only recovery from exactly this field (`reasonedButSilent` →
1458
+ // `reasoningTextOf(res)`), so on byok the gate was dead code: DeepSeek
1459
+ // returns `finish_reason: 'stop'` with empty content and a full
1460
+ // `reasoning_content`, which matched neither `isTruncated` (the reason says
1461
+ // 'stop', not 'length') nor the reasoning retry (nothing to detect), and the
1462
+ // turn fell straight through to emptyTurnError — the "backend error: the
1463
+ // model returned no answer … max_tokens 16384" the user sees. Measured live
1464
+ // on byok/deepseek-v4-flash 2026-10-11.
1465
+ //
1466
+ // Kept out of `content` on purpose: deliberation is not an answer, and
1467
+ // folding it in would make a no-answer turn look answered to every caller's
1468
+ // empty-check (see the note at the `reasoningText` accumulation above).
1443
1469
  const message = { content: cleanText };
1470
+ if (reasoningText) message.reasoning_content = reasoningText;
1444
1471
  if (toolCalls.length) message.tool_calls = toolCalls;
1445
1472
  const result = {
1446
1473
  model: resultModel,
@@ -306,6 +306,29 @@ const WRITEISH_BASH = [
306
306
  // `node --test` is deliberately NOT a hit.
307
307
  /\b(python[0-9.]*|perl)\s+-c\b/, /\b(python[0-9.]*|perl)\s+-e\b/,
308
308
  /\bnode\b[^|;]*\s(?:-e|--eval)\b/, /\b(sh|bash|zsh|dash)\s+-c\b/,
309
+
310
+ // Archive extraction overwrites arbitrary paths in bulk with none of the
311
+ // markers above: `tar -x`, `unzip`, `7z x/e` never mention `cp`/`mv`/a `>`.
312
+ // Found probing this list by hand on 2026-10-12 — none of these tripped it.
313
+ // Kept in step with aegiscodex-dev/src/repoguard.js, which carries the same list.
314
+ /\btar\b[^|;]*(?:-[A-Za-z]*x[A-Za-z]*\b|--extract\b)/,
315
+ /\bunzip\b/, /\b7z[ar]?\s+[xe]\b/,
316
+
317
+ // Download-straight-to-file: the write is the whole point, but the marker
318
+ // is a flag shared with nothing else (`-o`/`-O`/`--output`), not a bare tool
319
+ // name, so it is scoped to the specific tool that owns that flag.
320
+ /\bcurl\b[^|;]*\s-{1,2}(?:o|O|output|remote-name)\b/,
321
+ /\bwget\b[^|;]*\s-{1,2}(?:O|output-document)\b/,
322
+
323
+ // Bulk copy/sync — functionally `cp -r` under a different name.
324
+ /\brsync\b/,
325
+
326
+ // `-out`/`-o`/`--output` on the specific tools that use it to write a file,
327
+ // each scoped to its own tool name so an unrelated `-o` (e.g. `ls -o`) on
328
+ // some other command is not a false hit.
329
+ /\bopenssl\b[^|;]*\s-out\b/,
330
+ /\bgpg2?\b[^|;]*\s-{1,2}(?:o|output)\b/,
331
+ /\bbase64\b[^|;]*\s-{1,2}(?:o|output)\b/,
309
332
  ];
310
333
 
311
334
  /** Path-shaped tokens in a command line. Deliberately over-eager: see bashTargets. */
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -95,14 +100,49 @@ const BYOK_MODEL_ADDITIONS = Object.freeze({
95
100
  // catalog.py) pins exactly one default_model, `claude-sonnet-5`, and
96
101
  // `anthropic-haiku` pins `claude-haiku-4-5` as its own provider row — so
97
102
  // between them an Anthropic BYOK key could pin Sonnet or Haiku but never
98
- // Opus or Fable, the other two members of the current Claude 5 lineup the
99
- // vendor already serves. Both ids already have a priced rate row
100
- // (desktop/renderer/usage.js `opus`/`fable`, matched by family substring),
101
- // so the picker just had no way to offer them, not an unpriced gap. Listed
102
- // under the `anthropic` provider id because that is the row the server
103
- // advertises a configured Anthropic key against — the relay forwards
104
- // whichever of the two names the caller actually pins.
105
- anthropic: Object.freeze(['claude-opus-5', 'claude-fable-5']),
103
+ // Opus or Fable, the other two members of the Claude 5 lineup the vendor
104
+ // already serves. Listed under the `anthropic` provider id because that is
105
+ // the row the server advertises a configured Anthropic key against — the
106
+ // relay forwards whichever of these names the caller actually pins.
107
+ //
108
+ // Verified live 2026-10-11 against `GET https://api.anthropic.com/v1/models`
109
+ // (14 ids, `has_more: false`), which is where every id below is copied from
110
+ // rather than from memory:
111
+ //
112
+ // claude-haiku-5-5, claude-sonnet-5-5, claude-opus-5-5, claude-fable-5-1,
113
+ // claude-opus-5, claude-sonnet-5, claude-fable-5, claude-opus-4-8,
114
+ // claude-opus-4-7, claude-sonnet-4-6, claude-opus-4-6,
115
+ // claude-opus-4-5-20251101, claude-haiku-4-5-20251001,
116
+ // claude-sonnet-4-5-20250929
117
+ //
118
+ // The server's two defaults cover `claude-sonnet-5` and `claude-haiku-4-5`;
119
+ // the five below are the CURRENT members of the lineup it does not name —
120
+ // the 5.5 generation (Haiku, Sonnet, Opus) plus Fable 5.1, and the older
121
+ // Opus 5 / Fable 5 that were already listed. Every one has a priced rate row
122
+ // (desktop/renderer/usage.js, the Claude 5 block), so the picker was missing
123
+ // the ability to OFFER them, not a rate.
124
+ //
125
+ // What is deliberately NOT here, and why it matters more than what is:
126
+ // `claude-opus-4-1` (and its dated form `claude-opus-4-1-20250805`) is
127
+ // RETIRED upstream. Probed live 2026-10-11, `POST /v1/messages` with that
128
+ // model answers HTTP 404 `not_found_error` — the same probe answers
129
+ // `rate_limit_error` (i.e. the model resolved) for every id listed above,
130
+ // which is what makes 404 mean "no such model" rather than "no credit".
131
+ // The engine's own MODELS table still carries a legacy `claude-opus-4-1`
132
+ // row for saved configs, and that is fine — it is a local label that
133
+ // RESOLVES; a client-side catalog addition is a promise the picker will pin
134
+ // and the relay will forward, and this module's whole reason for existing is
135
+ // that a fabricated id "would pin, look accepted, and 404 on the first
136
+ // turn". So Opus 4.1 stays out of the offered list until Anthropic serves
137
+ // it again.
138
+ anthropic: Object.freeze([
139
+ 'claude-opus-5',
140
+ 'claude-fable-5',
141
+ 'claude-opus-5-5',
142
+ 'claude-sonnet-5-5',
143
+ 'claude-haiku-5-5',
144
+ 'claude-fable-5-1',
145
+ ]),
106
146
  // xAI's `grok` descriptor still pins `grok-4.5` as default_model — current
107
147
  // when that descriptor was written, but xAI has since shipped grok-4.6 and
108
148
  // grok-4.7 (flagship, Sept 2026) on the same `grok-4.5`-shaped id
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**
@@ -1,3 +1,8 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
+ // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
+ // Conveying a modified copy, or running one as a network service, owes the
5
+ // corresponding source under this licence (§5/§13) — see LICENSING.md.
1
6
  'use strict';
2
7
 
3
8
  /**