aegisone 1.0.8 → 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 (220) 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 +7 -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 +5 -0
  16. package/vendor/cli/bin/aegiscode.js +137 -0
  17. package/vendor/cli/package.json +1 -1
  18. package/vendor/cli/scripts/check.mjs +5 -0
  19. package/vendor/cli/scripts/demo.mjs +5 -0
  20. package/vendor/cli/scripts/predist.mjs +29 -2
  21. package/vendor/cli/scripts/runtests.mjs +5 -0
  22. package/vendor/cli/scripts/seal-gate.mjs +76 -0
  23. package/vendor/cli/src/agents.js +5 -0
  24. package/vendor/cli/src/app.js +5 -0
  25. package/vendor/cli/src/art.js +5 -0
  26. package/vendor/cli/src/autonomous.js +23 -0
  27. package/vendor/cli/src/caps.js +5 -0
  28. package/vendor/cli/src/chatflow.js +104 -31
  29. package/vendor/cli/src/checkpoint.js +5 -0
  30. package/vendor/cli/src/clipboard.js +5 -0
  31. package/vendor/cli/src/cloudsync.js +5 -0
  32. package/vendor/cli/src/commands.js +326 -14
  33. package/vendor/cli/src/config.js +5 -0
  34. package/vendor/cli/src/credentials.js +5 -0
  35. package/vendor/cli/src/deps.js +5 -0
  36. package/vendor/cli/src/devrun.js +5 -0
  37. package/vendor/cli/src/diff.js +5 -0
  38. package/vendor/cli/src/diffview.js +5 -0
  39. package/vendor/cli/src/engine.js +5 -0
  40. package/vendor/cli/src/entitlement.js +5 -0
  41. package/vendor/cli/src/events.js +15 -0
  42. package/vendor/cli/src/export.js +5 -0
  43. package/vendor/cli/src/fingerprint.js +5 -0
  44. package/vendor/cli/src/format.js +5 -0
  45. package/vendor/cli/src/fuzzy.js +5 -0
  46. package/vendor/cli/src/gate.js +12 -0
  47. package/vendor/cli/src/history.js +5 -0
  48. package/vendor/cli/src/init.js +5 -0
  49. package/vendor/cli/src/input.js +5 -0
  50. package/vendor/cli/src/keys.js +29 -2
  51. package/vendor/cli/src/limits.js +192 -0
  52. package/vendor/cli/src/markdown.js +5 -0
  53. package/vendor/cli/src/mcp.js +13 -0
  54. package/vendor/cli/src/models.js +5 -0
  55. package/vendor/cli/src/naming.js +5 -0
  56. package/vendor/cli/src/overlays.js +7 -2
  57. package/vendor/cli/src/panels.js +5 -0
  58. package/vendor/cli/src/permissions.js +56 -1
  59. package/vendor/cli/src/ping.js +5 -0
  60. package/vendor/cli/src/presence.js +5 -0
  61. package/vendor/cli/src/provenance.js +238 -0
  62. package/vendor/cli/src/provenance.lock.json +36 -0
  63. package/vendor/cli/src/render.js +5 -0
  64. package/vendor/cli/src/screen.js +5 -0
  65. package/vendor/cli/src/screens.js +48 -37
  66. package/vendor/cli/src/secret.js +5 -0
  67. package/vendor/cli/src/securefs.js +5 -0
  68. package/vendor/cli/src/settings.js +5 -0
  69. package/vendor/cli/src/shared.js +5 -0
  70. package/vendor/cli/src/sharedpaths.js +5 -0
  71. package/vendor/cli/src/signup.js +5 -0
  72. package/vendor/cli/src/summarize.js +5 -0
  73. package/vendor/cli/src/sysdiag.js +582 -0
  74. package/vendor/cli/src/system.js +5 -0
  75. package/vendor/cli/src/theme.js +5 -0
  76. package/vendor/cli/src/title.js +5 -0
  77. package/vendor/cli/src/todos.js +5 -0
  78. package/vendor/cli/src/tokens.js +5 -0
  79. package/vendor/cli/src/topup.js +5 -0
  80. package/vendor/cli/src/update.js +5 -0
  81. package/vendor/cli/vendor/client/aegis.js +5 -0
  82. package/vendor/cli/vendor/client/attest.js +5 -0
  83. package/vendor/cli/vendor/client/authorship-key.js +5 -0
  84. package/vendor/cli/vendor/client/auto-provision.js +5 -0
  85. package/vendor/cli/vendor/client/brain-catalog.js +5 -0
  86. package/vendor/cli/vendor/client/byok-catalog.js +5 -0
  87. package/vendor/cli/vendor/client/credentials.js +5 -0
  88. package/vendor/cli/vendor/client/device-fingerprint.js +5 -0
  89. package/vendor/cli/vendor/client/env-file.js +5 -0
  90. package/vendor/cli/vendor/client/fingerprint.js +5 -0
  91. package/vendor/cli/vendor/client/foreign-memory.js +5 -0
  92. package/vendor/cli/vendor/client/hooks.js +5 -0
  93. package/vendor/cli/vendor/client/model-discovery.js +332 -0
  94. package/vendor/cli/vendor/client/platform.js +5 -0
  95. package/vendor/cli/vendor/client/prefs.js +5 -0
  96. package/vendor/cli/vendor/client/presence-constants.js +5 -0
  97. package/vendor/cli/vendor/client/presence.js +5 -0
  98. package/vendor/cli/vendor/client/record-vault.js +5 -0
  99. package/vendor/cli/vendor/client/session-store.js +5 -0
  100. package/vendor/cli/vendor/client/topup.js +5 -0
  101. package/vendor/cli/vendor/client/touch.js +5 -0
  102. package/vendor/cli/vendor/client/update.js +5 -0
  103. package/vendor/cli/vendor/client/user-models.js +5 -0
  104. package/vendor/cli/vendor/desktop/lib/local/aegis-seal.mjs +5 -0
  105. package/vendor/cli/vendor/desktop/lib/local/agents.js +5 -0
  106. package/vendor/cli/vendor/desktop/lib/local/autonomous.js +5 -0
  107. package/vendor/cli/vendor/desktop/lib/local/context.js +5 -0
  108. package/vendor/cli/vendor/desktop/lib/local/covenant.js +5 -0
  109. package/vendor/cli/vendor/desktop/lib/local/engine.js +129 -0
  110. package/vendor/cli/vendor/desktop/lib/local/entitlement.js +5 -0
  111. package/vendor/cli/vendor/desktop/lib/local/git-scope.js +5 -0
  112. package/vendor/cli/vendor/desktop/lib/local/local.js +5 -0
  113. package/vendor/cli/vendor/desktop/lib/local/prompt.js +5 -0
  114. package/vendor/cli/vendor/desktop/lib/local/queue.js +5 -0
  115. package/vendor/cli/vendor/desktop/lib/local/session-rounds.js +5 -0
  116. package/vendor/cli/vendor/desktop/lib/local/shell.js +88 -9
  117. package/vendor/cli/vendor/desktop/lib/local/tools.js +13 -6
  118. package/vendor/cli/vendor/desktop/lib/local/turn-guard.js +5 -0
  119. package/vendor/cli/vendor/desktop/lib/local/worktree-lock.js +5 -0
  120. package/vendor/cli/vendor/desktop/lib/settings.js +5 -0
  121. package/vendor/cli/vendor/desktop/renderer/usage.js +5 -0
  122. package/vendor/cli/vendor/mcp/server.js +5 -0
  123. package/vendor/cli/vendor/mcp/tools.js +5 -0
  124. package/vendor/cli/vendor/tools/agent-gate.mjs +23 -0
  125. package/vendor/desktop/bin/aegis.js +5 -0
  126. package/vendor/desktop/lib/auto.js +5 -0
  127. package/vendor/desktop/lib/avatar/companion.js +5 -0
  128. package/vendor/desktop/lib/avatar/cosmetics.js +5 -0
  129. package/vendor/desktop/lib/avatar/events.js +5 -0
  130. package/vendor/desktop/lib/avatar/holder-turn.js +5 -0
  131. package/vendor/desktop/lib/avatar/holders.js +5 -0
  132. package/vendor/desktop/lib/avatar/identity.js +5 -0
  133. package/vendor/desktop/lib/avatar/level.js +5 -0
  134. package/vendor/desktop/lib/avatar/mirror.js +5 -0
  135. package/vendor/desktop/lib/avatar/persona.js +5 -0
  136. package/vendor/desktop/lib/avatar/profile.js +5 -0
  137. package/vendor/desktop/lib/avatar/register.js +5 -0
  138. package/vendor/desktop/lib/avatar/store.js +5 -0
  139. package/vendor/desktop/lib/avatar/tiers.js +5 -0
  140. package/vendor/desktop/lib/avatar/transfer.js +5 -0
  141. package/vendor/desktop/lib/avatar/turn.js +5 -0
  142. package/vendor/desktop/lib/avatar/voice.js +5 -0
  143. package/vendor/desktop/lib/avatar/xp.js +5 -0
  144. package/vendor/desktop/lib/deep-link.js +5 -0
  145. package/vendor/desktop/lib/fingerprint.js +5 -0
  146. package/vendor/desktop/lib/local/aegis-seal.mjs +5 -0
  147. package/vendor/desktop/lib/local/agents.js +5 -0
  148. package/vendor/desktop/lib/local/autonomous.js +5 -0
  149. package/vendor/desktop/lib/local/context.js +5 -0
  150. package/vendor/desktop/lib/local/covenant.js +5 -0
  151. package/vendor/desktop/lib/local/engine.js +129 -0
  152. package/vendor/desktop/lib/local/entitlement.js +5 -0
  153. package/vendor/desktop/lib/local/git-scope.js +5 -0
  154. package/vendor/desktop/lib/local/local.js +5 -0
  155. package/vendor/desktop/lib/local/prompt.js +5 -0
  156. package/vendor/desktop/lib/local/queue.js +5 -0
  157. package/vendor/desktop/lib/local/session-rounds.js +5 -0
  158. package/vendor/desktop/lib/local/shell.js +88 -9
  159. package/vendor/desktop/lib/local/telemetry.js +5 -0
  160. package/vendor/desktop/lib/local/tools.js +13 -6
  161. package/vendor/desktop/lib/local/turn-guard.js +5 -0
  162. package/vendor/desktop/lib/local/worktree-lock.js +5 -0
  163. package/vendor/desktop/lib/provider-key-mirror.js +5 -0
  164. package/vendor/desktop/lib/quick-launcher.js +5 -0
  165. package/vendor/desktop/lib/settings.js +5 -0
  166. package/vendor/desktop/lib/sync/memory-queue.js +5 -0
  167. package/vendor/desktop/lib/sync/persist-gate.js +5 -0
  168. package/vendor/desktop/lib/sync/sessions.js +5 -0
  169. package/vendor/desktop/lib/window-state.js +5 -0
  170. package/vendor/desktop/main.js +34 -0
  171. package/vendor/desktop/package.json +1 -1
  172. package/vendor/desktop/preload.js +14 -0
  173. package/vendor/desktop/renderer/app.js +111 -0
  174. package/vendor/desktop/renderer/avatar/assemble.js +5 -0
  175. package/vendor/desktop/renderer/avatar/avatar.css +7 -0
  176. package/vendor/desktop/renderer/avatar/avatar.js +5 -0
  177. package/vendor/desktop/renderer/avatar/cards.js +5 -0
  178. package/vendor/desktop/renderer/avatar/hud.js +5 -0
  179. package/vendor/desktop/renderer/avatar/machine.js +5 -0
  180. package/vendor/desktop/renderer/avatar/pane.js +5 -0
  181. package/vendor/desktop/renderer/avatar/parts.js +5 -0
  182. package/vendor/desktop/renderer/budget.js +5 -0
  183. package/vendor/desktop/renderer/diff.js +5 -0
  184. package/vendor/desktop/renderer/diffview.js +5 -0
  185. package/vendor/desktop/renderer/fingerprint.css +7 -0
  186. package/vendor/desktop/renderer/fingerprint.js +5 -0
  187. package/vendor/desktop/renderer/fonts/fonts.css +7 -0
  188. package/vendor/desktop/renderer/index.html +7 -0
  189. package/vendor/desktop/renderer/markdown.js +5 -0
  190. package/vendor/desktop/renderer/quick.css +7 -0
  191. package/vendor/desktop/renderer/quick.html +7 -0
  192. package/vendor/desktop/renderer/quick.js +5 -0
  193. package/vendor/desktop/renderer/stream-policy.js +5 -0
  194. package/vendor/desktop/renderer/style.css +7 -0
  195. package/vendor/desktop/renderer/transcript-view.js +5 -0
  196. package/vendor/desktop/renderer/usage.js +5 -0
  197. package/vendor/desktop/vendor/aegis.js +5 -0
  198. package/vendor/desktop/vendor/agent-gate.mjs +23 -0
  199. package/vendor/desktop/vendor/attest.js +5 -0
  200. package/vendor/desktop/vendor/authorship-key.js +5 -0
  201. package/vendor/desktop/vendor/auto-provision.js +5 -0
  202. package/vendor/desktop/vendor/brain-catalog.js +5 -0
  203. package/vendor/desktop/vendor/byok-catalog.js +5 -0
  204. package/vendor/desktop/vendor/credentials.js +5 -0
  205. package/vendor/desktop/vendor/device-fingerprint.js +5 -0
  206. package/vendor/desktop/vendor/env-file.js +5 -0
  207. package/vendor/desktop/vendor/fingerprint.js +5 -0
  208. package/vendor/desktop/vendor/foreign-memory.js +5 -0
  209. package/vendor/desktop/vendor/hooks.js +5 -0
  210. package/vendor/desktop/vendor/model-discovery.js +332 -0
  211. package/vendor/desktop/vendor/platform.js +5 -0
  212. package/vendor/desktop/vendor/prefs.js +5 -0
  213. package/vendor/desktop/vendor/presence-constants.js +5 -0
  214. package/vendor/desktop/vendor/presence.js +5 -0
  215. package/vendor/desktop/vendor/record-vault.js +5 -0
  216. package/vendor/desktop/vendor/session-store.js +5 -0
  217. package/vendor/desktop/vendor/topup.js +5 -0
  218. package/vendor/desktop/vendor/touch.js +5 -0
  219. package/vendor/desktop/vendor/update.js +5 -0
  220. package/vendor/desktop/vendor/user-models.js +5 -0
@@ -372,6 +372,10 @@ function shortcutsGrid(cols, ctx) {
372
372
  cell('/', 'for commands', '?', 'for shortcuts'),
373
373
  cell('ctrl + c', 'to quit', 'ctrl + o', 'for permissions'),
374
374
  cell('alt + p', 'to switch model', 'alt + t', 'to toggle thinking'),
375
+ // The shift chords the two pickers commit with. They are on the sheet for
376
+ // the same reason every other row is: `handleOverlayKey` handles them now,
377
+ // and a key a user cannot read about is a key that does not exist.
378
+ cell('shift + ↑/↓', 'pins as it moves', 'shift + enter', 'runs the row'),
375
379
  cell('esc', 'to interrupt a turn', 'ctrl + l', 'to clear the screen'),
376
380
  cell('ctrl + t', 'to show tokens', 'ctrl + r', 'to resume a session'),
377
381
  cell('↑ / ↓', 'for history', 'tab', 'to complete a command'),
@@ -901,6 +905,18 @@ async function runSession(host) {
901
905
  const lineCache = new WeakMap();
902
906
 
903
907
  let overlay = null;
908
+
909
+ /**
910
+ * The palette's rows: the ONE ranking the frame draws and the key handlers
911
+ * act on. Tab and Enter each wrote this expression out in full, which is two
912
+ * chances for the row that is completed or run to be a different row than the
913
+ * one highlighted. A function declaration so `render`'s closure can call it
914
+ * whatever order the definitions are initialised in.
915
+ */
916
+ function paletteRows(query) {
917
+ const q = paletteQuery(query == null ? (overlay && overlay.query) || '' : query);
918
+ return fuzzy.fuzzyRankWithAliases(q, host.visibleCommands(), (c) => c.name, (c) => c.aliases || []);
919
+ }
904
920
  // Automode's running tally of silent "continue" answers to the round-budget
905
921
  // dialog (see autoContinuePlan above). Cleared whenever the human is
906
922
  // actually asked (autoContinuePlan resets it once the allowance is spent),
@@ -1998,6 +2014,24 @@ async function runSession(host) {
1998
2014
  }
1999
2015
  };
2000
2016
 
2017
+ /**
2018
+ * Pin a model row — the ONE path a row is applied through, shared by Enter,
2019
+ * shift+enter and the shift+arrow chord. Written out once because applying a
2020
+ * model is not just a config write: it may have to move the class first and
2021
+ * it may have to collect the provider key the row needs. A second apply path
2022
+ * would eventually skip one of those (the reference's own picker pinned the
2023
+ * id and left the class behind), and the user would be running on a model
2024
+ * whose key this machine does not hold.
2025
+ */
2026
+ const applyModelRow = async (chosen) => {
2027
+ if (!chosen) return;
2028
+ if (chosen.cls === 'byok' && ctx.modelClass !== 'byok') await dispatch('/class byok');
2029
+ ctx.model = chosen.id;
2030
+ host.updateConfig({ model: chosen.id, currentModelId: chosen.id, modelClass: ctx.modelClass });
2031
+ note(`model: ${chosen.id}${chosen.cls === 'byok' ? ' (byok)' : ''}`);
2032
+ await collectKeyFor(chosen);
2033
+ };
2034
+
2001
2035
  const handleOverlayKey = async (key) => {
2002
2036
  const type = overlay.type;
2003
2037
  if (key.name === KEY.ESC || key.name === KEY.CTRL_C) {
@@ -2011,16 +2045,11 @@ async function runSession(host) {
2011
2045
  return;
2012
2046
  }
2013
2047
  if (key.name === KEY.TAB && type === 'palette') {
2014
- // Tab completes the query to the highlighted command, ranking with the
2015
- // same function the palette rendered with so the row completed is the
2016
- // row Enter would run. Nothing highlighted (no matches) → do nothing.
2017
- const list = fuzzy.fuzzyRankWithAliases(
2018
- paletteQuery(overlay.query),
2019
- host.visibleCommands(),
2020
- (c) => c.name,
2021
- (c) => c.aliases || []
2022
- );
2023
- const chosen = list[overlay.sel || 0];
2048
+ // Tab completes the query to the highlighted command. The ranking is
2049
+ // `paletteRows()`, the same list the frame drew and Enter runs, so the
2050
+ // row completed is the row highlighted. Nothing highlighted (no matches)
2051
+ // → do nothing.
2052
+ const chosen = paletteRows()[overlay.sel || 0];
2024
2053
  if (chosen) {
2025
2054
  overlay.query = chosen.name;
2026
2055
  overlay.sel = 0;
@@ -2032,13 +2061,7 @@ async function runSession(host) {
2032
2061
  if (type === 'palette') {
2033
2062
  // Rank with the same function the palette rendered with, so the row
2034
2063
  // highlighted is the row Enter runs.
2035
- const list = fuzzy.fuzzyRankWithAliases(
2036
- paletteQuery(overlay.query),
2037
- host.visibleCommands(),
2038
- (c) => c.name,
2039
- (c) => c.aliases || []
2040
- );
2041
- const chosen = list[overlay.sel || 0];
2064
+ const chosen = paletteRows()[overlay.sel || 0];
2042
2065
  const arg = String(overlay.query || '').trim().split(/\s+/).slice(1).join(' ');
2043
2066
  overlay = null;
2044
2067
  render();
@@ -2051,20 +2074,7 @@ async function runSession(host) {
2051
2074
  const chosen = (overlay.items || [])[overlay.sel || 0];
2052
2075
  overlay = null;
2053
2076
  render();
2054
- if (chosen) {
2055
- // A direct-provider (byok) row needs the class the id actually
2056
- // belongs to before the pin can route anywhere.
2057
- if (chosen.cls === 'byok' && ctx.modelClass !== 'byok') await dispatch('/class byok');
2058
- ctx.model = chosen.id;
2059
- host.updateConfig({ model: chosen.id, currentModelId: chosen.id, modelClass: ctx.modelClass });
2060
- note(`model: ${chosen.id}${chosen.cls === 'byok' ? ' (byok)' : ''}`);
2061
- // Then the key, if this row needs one this machine does not have —
2062
- // collected here rather than as a warning to run some command
2063
- // afterward. See collectKeyFor: the decision comes from the shared
2064
- // env-file module, so the variable a key is written to is the same
2065
- // one the desktop reads, instead of each host keeping a private copy.
2066
- await collectKeyFor(chosen);
2067
- }
2077
+ await applyModelRow(chosen);
2068
2078
  render();
2069
2079
  return;
2070
2080
  }
@@ -2092,6 +2102,69 @@ async function runSession(host) {
2092
2102
  render();
2093
2103
  return;
2094
2104
  }
2105
+ if (key.name === KEY.SHIFT_UP || key.name === KEY.SHIFT_DOWN) {
2106
+ // Shift is the one-keystroke commit in the two pickers that write a
2107
+ // setting: it moves the highlight one row in the pressed direction and
2108
+ // applies THAT row immediately, so changing the model is a single key
2109
+ // instead of point-then-Enter. It routes into the same apply paths Enter
2110
+ // uses, so the chord cannot pin a model Enter would refuse to pin, skip
2111
+ // the provider-key prompt a byok row needs, or store an effort level the
2112
+ // picker's own table does not contain.
2113
+ const step = key.name === KEY.SHIFT_UP ? -1 : 1;
2114
+ const max = Math.max(0, overlayRowCount() - 1);
2115
+ overlay.sel = Math.min(max, Math.max(0, (overlay.sel || 0) + step));
2116
+ if (type === 'model') {
2117
+ const chosen = (overlay.items || [])[overlay.sel || 0];
2118
+ overlay = null;
2119
+ render();
2120
+ await applyModelRow(chosen);
2121
+ render();
2122
+ return;
2123
+ }
2124
+ if (type === 'effort') {
2125
+ const chosen = overlays.EFFORT_VALUES[overlay.sel || 0];
2126
+ overlay = null;
2127
+ ctx.effort = chosen || 'high';
2128
+ host.updateConfig({ effort: ctx.effort });
2129
+ note(`effort: ${ctx.effort}`);
2130
+ render();
2131
+ return;
2132
+ }
2133
+ render();
2134
+ return;
2135
+ }
2136
+ if (key.name === KEY.SHIFT_ENTER) {
2137
+ // The same commit as Enter, in the spelling terminals that have no other
2138
+ // way to send it: on the palette it runs the highlighted command without
2139
+ // the user reaching for the Enter key proper, and in a picker it applies
2140
+ // the highlighted row. Both read the same sel/items every other path
2141
+ // reads, so the chord cannot run a different row than the frame drew.
2142
+ if (type === 'palette') {
2143
+ const chosen = paletteRows()[overlay.sel || 0];
2144
+ overlay = null;
2145
+ render();
2146
+ if (chosen) await dispatch(`/${chosen.name}`);
2147
+ return;
2148
+ }
2149
+ if (type === 'model') {
2150
+ const chosen = (overlay.items || [])[overlay.sel || 0];
2151
+ overlay = null;
2152
+ render();
2153
+ await applyModelRow(chosen);
2154
+ render();
2155
+ return;
2156
+ }
2157
+ if (type === 'effort') {
2158
+ const chosen = overlays.EFFORT_VALUES[overlay.sel || 0];
2159
+ overlay = null;
2160
+ ctx.effort = chosen || 'high';
2161
+ host.updateConfig({ effort: ctx.effort });
2162
+ note(`effort: ${ctx.effort}`);
2163
+ render();
2164
+ return;
2165
+ }
2166
+ return;
2167
+ }
2095
2168
  if (key.name === KEY.UP) {
2096
2169
  overlay.sel = Math.max(0, (overlay.sel || 0) - 1);
2097
2170
  render();
@@ -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
  /**
@@ -93,6 +98,9 @@ const { pickerEntries } = require('./models.js');
93
98
  const { resolveShared } = require('./sharedpaths.js');
94
99
  const { createCliEntitlement, paymentView, probeFee } = require('./entitlement.js');
95
100
  const { openUrl, URLS } = require('./system.js');
101
+ // The machine checks behind `/doctor system` — see cli/src/sysdiag.js for why
102
+ // they exist and why they never mutate anything.
103
+ const sysdiag = require('./sysdiag.js');
96
104
  const { sniffProject, buildAegisMd } = require('./init.js');
97
105
  const { upgradeAdvice, latestPublishedVersion } = require('./update.js');
98
106
  const {
@@ -410,8 +418,120 @@ const {
410
418
  withUserModels,
411
419
  addUserModel,
412
420
  removeUserModel,
421
+ userModelIdsFor,
422
+ userModelsPath,
413
423
  } = require(resolveShared(path.join('client', 'user-models.js')));
414
424
 
425
+ /**
426
+ * Ask the VENDOR what it serves (`client/model-discovery.js`), so `/model-add`
427
+ * can offer a list instead of asking the user to recall an id.
428
+ *
429
+ * Same `resolveShared` resolution as its two siblings above: one implementation
430
+ * of "what does this provider's key actually reach", read by both faces. It is
431
+ * loaded at module scope rather than lazily inside the handler because the
432
+ * command needs it to decide what to PROMPT with — a discovery module that
433
+ * loads only after discovery was decided to be possible would be circular.
434
+ *
435
+ * The module does no I/O at load (no key store, no network), so pulling it in
436
+ * with `/help` costs a `require` and nothing else.
437
+ */
438
+ const {
439
+ discoverModels: discoverVendorModels,
440
+ endpointFor: vendorEndpointFor,
441
+ discoverableProviders,
442
+ } = require(resolveShared(path.join('client', 'model-discovery.js')));
443
+
444
+ /**
445
+ * The vendor key for a provider, resolved the way the engine resolves it:
446
+ * the saved provider-key row first, then `~/.aegiscode/.env` (and the shell).
447
+ *
448
+ * Deliberately the same ORDER as `desktop/lib/local/engine.js`'s
449
+ * `providerKeyFromEnv` + `byok:<provider>` lookup, because discovery must use
450
+ * the key the NEXT TURN will use — a listing fetched with a different key than
451
+ * the one the call runs on is a listing of somebody else's catalog. This is
452
+ * read-only: it never writes a key, never logs one, and returns '' when the
453
+ * machine has none, which the caller reports as "no key to ask with".
454
+ */
455
+ function byokKeyForProvider(c, provider) {
456
+ const id = String(provider || '').trim().toLowerCase();
457
+ if (!id) return '';
458
+ try {
459
+ const store = c && c.settings && c.settings();
460
+ if (store && typeof store.rawKey === 'function' && typeof c.byokNamespace === 'function') {
461
+ const saved = store.rawKey(c.byokNamespace(id));
462
+ if (typeof saved === 'string' && saved.trim()) return saved.trim();
463
+ }
464
+ } catch {
465
+ /* a store that throws is a store with no key, not a reason to stop */
466
+ }
467
+ try {
468
+ const { providerKeyFromEnv } = require(resolveShared(path.join('client', 'env-file.js')));
469
+ return (providerKeyFromEnv(id) || {}).key || '';
470
+ } catch {
471
+ return '';
472
+ }
473
+ }
474
+
475
+ /**
476
+ * Ask the provider's own list endpoint, if this machine can. Never throws.
477
+ *
478
+ * `fetchImpl` is injectable through the context so the CLI tests drive a stub
479
+ * and never open a socket; `c.fetchImpl` is undefined in a real run, which is
480
+ * the module's normal `fetch`.
481
+ */
482
+ async function discoverProviderModels(c, provider, key) {
483
+ try {
484
+ return await discoverVendorModels(provider, { key, fetchImpl: c && c.fetchImpl });
485
+ } catch (err) {
486
+ return { ok: false, provider, supported: true, error: (err && err.message) || String(err) };
487
+ }
488
+ }
489
+
490
+ /**
491
+ * The provider's own catalog, best-effort, as `[ids]`. Undefined when the
492
+ * vendor could not be asked — the caller then falls back to a free-form id
493
+ * prompt, because that path works and must keep working offline.
494
+ */
495
+ async function offeredModelIds(c, provider, key) {
496
+ const res = await discoverProviderModels(c, provider, key);
497
+ return res && res.ok && Array.isArray(res.ids) && res.ids.length ? res.ids : undefined;
498
+ }
499
+
500
+ /**
501
+ * Declare ids into the store, skipping the ones already there. Returns the
502
+ * count added, plus what was skipped and WHY, so the caller can say
503
+ * "3 added, 2 already declared" instead of claiming work it did not do.
504
+ *
505
+ * The cap matters here more than anywhere else: a vendor's list endpoint
506
+ * answers with everything it serves — OpenAI currently returns 100 ids — and
507
+ * the store holds at most 32 per provider by design. Without this the bulk
508
+ * path would report sixty-eight "refused" models, which reads as sixty-eight
509
+ * broken ids rather than one deliberate ceiling. So the cap ends the batch and
510
+ * is reported as itself.
511
+ */
512
+ function addManyUserModels(provider, ids) {
513
+ let added = 0;
514
+ let capped = 0;
515
+ const already = [];
516
+ const failed = [];
517
+ for (const id of ids) {
518
+ try {
519
+ if (addUserModel(provider, id).added) added += 1;
520
+ else already.push(id);
521
+ } catch (err) {
522
+ const message = (err && err.message) || String(err);
523
+ if (/the cap/.test(message)) {
524
+ // Every remaining id would hit the same wall, so stop rather than
525
+ // loop sixty more times to collect sixty copies of one message.
526
+ capped = ids.length - added - already.length - failed.length;
527
+ break;
528
+ }
529
+ failed.push({ id, reason: message });
530
+ }
531
+ }
532
+ return { added, already, failed, capped };
533
+ }
534
+
415
535
  /**
416
536
  * The server's BYOK provider catalog, or null when it cannot be reached.
417
537
  *
@@ -1630,12 +1750,12 @@ const COMMANDS = [
1630
1750
  },
1631
1751
  },
1632
1752
  {
1633
- name: 'doctor', args: ['action'], hint: '[fix]', category: 'support',
1753
+ name: 'doctor', args: ['action'], hint: '[fix|system]', category: 'support',
1634
1754
  desc: 'Run diagnostic checks on this environment',
1635
1755
  handler: async (c, args) => {
1636
1756
  const action = ((args && args.action) || '').toLowerCase();
1637
- if (action && action !== 'fix') {
1638
- note(c, 'Usage: /doctor [fix] — "fix" re-tightens the data dir to 0700/0600');
1757
+ if (action && action !== 'fix' && action !== 'system') {
1758
+ note(c, 'Usage: /doctor [fix|system] — "fix" re-tightens the data dir to 0700/0600, "system" checks the machine itself');
1639
1759
  c.render();
1640
1760
  return true;
1641
1761
  }
@@ -1710,6 +1830,29 @@ const COMMANDS = [
1710
1830
  repaired.failed.map((f) => `${f.rel}: ${f.reason}`).join(', ')
1711
1831
  );
1712
1832
  }
1833
+ // `/doctor system` — the machine, not the checkout. Read-only by design:
1834
+ // cli/src/sysdiag.js holds the nine checks and each one's remedy, and
1835
+ // nothing here executes a remedy, because all of them need elevation and
1836
+ // the ordering matters (VSS has to survive DoSnapshotSet before a restore
1837
+ // point can exist). An unread probe is its own state, never a ✔.
1838
+ let systemReport = null;
1839
+ if (action === 'system') {
1840
+ const probe = sysdiag.collect();
1841
+ if (!probe.ok) {
1842
+ ok(
1843
+ 'machine checks',
1844
+ false,
1845
+ probe.reason === 'not-windows'
1846
+ ? 'not available on this platform — the machine audit is Windows-only (cli/src/sysdiag.js)'
1847
+ : `could not run: ${probe.reason}`,
1848
+ );
1849
+ } else {
1850
+ systemReport = sysdiag.assess(probe.data);
1851
+ for (const f of systemReport.findings) ok(`${f.title} (${f.severity})`, false, `${f.detail} → ${f.remedyText}`);
1852
+ for (const p of systemReport.clean) ok(p.title, true, p.detail);
1853
+ for (const u of systemReport.unassessed) ok(`${u.title} (unassessed)`, false, u.reason);
1854
+ }
1855
+ }
1713
1856
  const lines = [[span(C.gold + BOLD, 'Doctor'), span(BOLD_OFF, '')], [span(C.gray, '─'.repeat(30))]];
1714
1857
  for (const [good, label, detail] of checks) {
1715
1858
  lines.push([
@@ -1718,6 +1861,15 @@ const COMMANDS = [
1718
1861
  span(C.gray, String(detail)),
1719
1862
  ]);
1720
1863
  }
1864
+ if (systemReport && systemReport.findings.length) {
1865
+ const s = systemReport.summary;
1866
+ lines.push([
1867
+ span(C.gold, ' Remedy'),
1868
+ span(C.gray, ` — ${s.findings} finding(s) across ${s.assessed}/${s.total} measured checks.`),
1869
+ ]);
1870
+ lines.push([span(C.gray, ' Run in an ELEVATED PowerShell. AEGIS diagnoses this; it does not change your machine.')]);
1871
+ for (const line of sysdiag.remedyScript().split('\n')) lines.push([span(C.gray, ` ${line}`)]);
1872
+ }
1721
1873
  panel(c, lines);
1722
1874
  c.render();
1723
1875
  return true;
@@ -3010,9 +3162,9 @@ const COMMANDS = [
3010
3162
  // the next refresh and the window shows it on ITS next refresh. The file is
3011
3163
  // printed on success, because a hand-edit is the bulk path and a store the
3012
3164
  // user cannot find is a store they will not use.
3013
- name: 'model-add', aliases: ['add-model'], args: ['provider'], hint: '<provider> <model-id>',
3165
+ name: 'model-add', aliases: ['add-model'], args: ['provider'], hint: '<provider> [model-id|*]',
3014
3166
  category: 'model',
3015
- desc: 'Offer a model id the AEGIS catalog does not name (your key, both faces)',
3167
+ desc: 'Offer a model id the AEGIS catalog does not name (asks the vendor when it can)',
3016
3168
  handler: async (c, a) => {
3017
3169
  const args = a || {};
3018
3170
  const typed = String(args.provider || '').trim();
@@ -3023,15 +3175,6 @@ const COMMANDS = [
3023
3175
  const rest = String(args._rest || '').trim();
3024
3176
  const sp = rest.indexOf(' ');
3025
3177
  let model = sp === -1 ? '' : rest.slice(sp + 1).trim();
3026
- if (!model) {
3027
- // Plain inline input, NOT readSecret: a model id is not a secret, and
3028
- // hiding it would make a typo unreviewable before it is stored.
3029
- model = String((await c.askInput(`model id for ${typed}: `)) || '').trim();
3030
- }
3031
- if (!model) {
3032
- c.push({ role: 'note', text: 'nothing saved.' });
3033
- return true;
3034
- }
3035
3178
  // Resolve the provider against the relay's catalog first. A slug the
3036
3179
  // server does not list can never be attached to a key, so storing it
3037
3180
  // would produce a declaration that is invisible in every picker — the
@@ -3052,6 +3195,76 @@ const COMMANDS = [
3052
3195
  return true;
3053
3196
  }
3054
3197
  const id = (match && match.provider && match.provider.id) || typed.toLowerCase();
3198
+ // ── what the vendor says, before we ask the user to remember it ──────
3199
+ //
3200
+ // The whole cost of this feature used to be "know the vendor's model id",
3201
+ // which is the release-lag problem handed to the user instead of solved.
3202
+ // When this machine holds a key for the provider, its own list endpoint
3203
+ // answers that in one request. Best-effort by construction: no key, no
3204
+ // endpoint, no network or an unparseable reply all fall through to the
3205
+ // free-form prompt below, which is the path that already worked offline.
3206
+ const key = byokKeyForProvider(c, id);
3207
+ const offered = await offeredModelIds(c, id, key);
3208
+
3209
+ // `*` is the bulk path: declare everything the vendor currently serves.
3210
+ // Only the CHAT rows are declared (an embeddings or TTS id in a model
3211
+ // picker is a row nobody can run), and only after the vendor answered —
3212
+ // with no list there is nothing to take all of, and saying so is the
3213
+ // honest outcome rather than an empty success.
3214
+ if (model === '*') {
3215
+ if (!offered) {
3216
+ const why = await discoverProviderModels(c, id, key);
3217
+ c.push({
3218
+ role: 'error',
3219
+ text: `cannot list ${id}: ${(why && why.error) || 'no list available'} — type the ids instead: /model-add ${id} <model-id>`,
3220
+ });
3221
+ return true;
3222
+ }
3223
+ const bulk = addManyUserModels(id, offered);
3224
+ if (typeof c.refreshByokModels === 'function') {
3225
+ try { await c.refreshByokModels(); } catch { /* the next refresh reads the file anyway */ }
3226
+ }
3227
+ c.push({
3228
+ role: 'done',
3229
+ text: `added ${bulk.added} of the ${offered.length} model ids ${id} serves${bulk.already.length ? ` (${bulk.already.length} were already declared)` : ''}.`,
3230
+ });
3231
+ if (bulk.capped) {
3232
+ // The store's per-provider ceiling, named as a ceiling. A vendor list
3233
+ // is a hundred rows; this is one deliberate limit, not sixty broken
3234
+ // ids, and the two must not read the same in the transcript.
3235
+ c.push({
3236
+ role: 'note',
3237
+ text: `stopped at the store's per-provider cap (32) — ${bulk.capped} more id(s) were left out; /model-add ${id} <model-id> stores a specific one, /model-rm frees a slot.`,
3238
+ });
3239
+ }
3240
+ if (bulk.failed.length) {
3241
+ c.push({ role: 'note', text: `${bulk.failed.length} id(s) were refused: ${bulk.failed.map((f) => f.id).join(', ')}` });
3242
+ }
3243
+ c.push({ role: 'note', text: `stored in ${userModelsPath()} — the desktop reads the same file. /model-discover ${id} lists what the vendor serves.` });
3244
+ return true;
3245
+ }
3246
+
3247
+ if (!model) {
3248
+ // Plain inline input, NOT readSecret: a model id is not a secret, and
3249
+ // hiding it would make a typo unreviewable before it is stored.
3250
+ if (offered) {
3251
+ c.push({ role: 'note', text: `${id} serves ${offered.length} model ids — ${offered.slice(0, 12).join(', ')}${offered.length > 12 ? ', …' : ''}` });
3252
+ }
3253
+ const typedId = String((await c.askInput(
3254
+ offered
3255
+ ? `model id for ${id} (1-${offered.length}, or type one): `
3256
+ : `model id for ${id}: `
3257
+ )) || '').trim();
3258
+ // A bare number picks the row it is listed under. Only an in-range
3259
+ // integer is read that way, so an id that happens to start with a digit
3260
+ // is still stored verbatim unless it is exactly a listed position.
3261
+ const n = /^\d+$/.test(typedId) ? Number(typedId) : 0;
3262
+ model = n >= 1 && n <= offered.length ? offered[n - 1] : typedId;
3263
+ }
3264
+ if (!model) {
3265
+ c.push({ role: 'note', text: 'nothing saved.' });
3266
+ return true;
3267
+ }
3055
3268
  let res;
3056
3269
  try {
3057
3270
  res = addUserModel(id, model);
@@ -3090,10 +3303,109 @@ const COMMANDS = [
3090
3303
  text: `saved, but no row will be offered for "${id}" yet — the relay lists no provider of that id (or that provider lists no models).`,
3091
3304
  });
3092
3305
  }
3306
+ if (res.added && offered) {
3307
+ // The vendor was asked and it lists more than the one id just stored.
3308
+ // Naming the size of that list is the difference between "the picker has
3309
+ // four models" and "this vendor ships forty and you have one of them".
3310
+ c.push({
3311
+ role: 'note',
3312
+ text: `${id} currently serves ${offered.length} model ids — /model-discover ${id} lists them, /model-add ${id} '*' takes them all.`,
3313
+ });
3314
+ }
3093
3315
  c.push({ role: 'note', text: `stored in ${res.file} — the desktop reads the same file.` });
3094
3316
  return true;
3095
3317
  },
3096
3318
  },
3319
+ {
3320
+ // ── what the vendor serves, right now ─────────────────────────────────
3321
+ //
3322
+ // `/model-add` answers "store THIS id"; this answers "which ids are there",
3323
+ // which is the question a user actually has when a vendor ships something
3324
+ // on a Tuesday. It reads the same key `client/env-file.js` and the provider
3325
+ // CRUD share (saved row first, `~/.aegiscode/.env` second) and hits the
3326
+ // vendor's own list endpoint, so the answer cannot be stale by
3327
+ // construction — that is the whole point of asking instead of shipping
3328
+ // another hand-copied list.
3329
+ //
3330
+ // Offline, keyless and shape-changed are all REPORTED, never thrown: this
3331
+ // command sits beside a manual path that works, so its worst case has to be
3332
+ // a sentence, not a stack trace.
3333
+ name: 'model-discover', aliases: ['discover-models', 'vendor-models'], args: ['provider'], hint: '<provider>',
3334
+ category: 'model',
3335
+ desc: "List the model ids your provider's own API serves",
3336
+ handler: async (c, a) => {
3337
+ const args = a || {};
3338
+ const typed = String(args.provider || '').trim();
3339
+ if (!typed) {
3340
+ c.push({
3341
+ role: 'error',
3342
+ text: `Usage: /model-discover <provider> — this client can ask: ${discoverableProviders().join(', ')}`,
3343
+ });
3344
+ return true;
3345
+ }
3346
+ // Resolve the alias against the relay's catalog when it is reachable, so
3347
+ // `/model-discover xai` and `/model-discover grok` are one request.
3348
+ const providers = await byokCatalog(c.client);
3349
+ const match = providers ? findByokProvider(providers, typed) : null;
3350
+ const id = ((match && match.provider && match.provider.id) || typed).toLowerCase();
3351
+ const entry = vendorEndpointFor(id);
3352
+ if (!entry) {
3353
+ c.push({
3354
+ role: 'error',
3355
+ text: `no list endpoint for "${id}" in this client — /model-add ${id} <model-id> stores an id you already know. Providers it can ask: ${discoverableProviders().join(', ')}`,
3356
+ });
3357
+ return true;
3358
+ }
3359
+ const key = byokKeyForProvider(c, id);
3360
+ if (!key) {
3361
+ c.push({
3362
+ role: 'error',
3363
+ text: `no ${id} key on this machine — /byok-key ${id} saves one (or put it in ~/.aegiscode/.env), then this lists what the key reaches.`,
3364
+ });
3365
+ return true;
3366
+ }
3367
+ const res = await discoverProviderModels(c, id, key);
3368
+ if (!res || !res.ok) {
3369
+ c.push({ role: 'error', text: `could not list ${id}: ${(res && res.error) || 'no answer'}` });
3370
+ return true;
3371
+ }
3372
+ // Where the user stands: which of these are already offered here.
3373
+ const declared = new Set(userModelIdsFor(id));
3374
+ const known = new Set(
3375
+ ((match && match.provider && match.provider.models) || []).map((m) => String(m))
3376
+ );
3377
+ c.push({ role: 'note', text: `${id} at ${entry.url}${entry.note ? ` (${entry.note})` : ''}` });
3378
+ c.push({
3379
+ role: 'note',
3380
+ text: `${res.count} chat model id(s) the vendor serves — mark: [seen] the relay already lists it, [your] you declared it, [new] this machine does not offer it yet.`,
3381
+ });
3382
+ const lines = res.ids.map((m, i) => {
3383
+ const mark = declared.has(m) ? '[your]' : known.has(m) ? '[seen]' : '[new]';
3384
+ return `${String(i + 1).padStart(3)}. ${mark} ${m}`;
3385
+ });
3386
+ if (lines.length) c.push({ role: 'panel', lines });
3387
+ if (!lines.length) {
3388
+ c.push({ role: 'note', text: `the vendor answered with no chat models — /model-add ${id} <model-id> stores one by hand.` });
3389
+ }
3390
+ if (res.others.length) {
3391
+ // Named, not hidden. "the vendor lists 60 and you were shown 12" is a
3392
+ // fact the user is owed; a silent filter is how a picker looks empty
3393
+ // for a reason nobody can see.
3394
+ c.push({
3395
+ role: 'note',
3396
+ text: `${res.others.length} id(s) are not chat models (embeddings, audio, moderation or an unsupported method) and are left out: ${res.others.slice(0, 8).join(', ')}${res.others.length > 8 ? ', …' : ''}`,
3397
+ });
3398
+ }
3399
+ const fresh = res.ids.filter((m) => !declared.has(m) && !known.has(m));
3400
+ if (fresh.length) {
3401
+ c.push({
3402
+ role: 'note',
3403
+ text: `${fresh.length} of them are not offered on this machine yet — /model-add ${id} '<model-id>' stores one, /model-add ${id} '*' stores every chat model the vendor serves.`,
3404
+ });
3405
+ }
3406
+ return true;
3407
+ },
3408
+ },
3097
3409
  {
3098
3410
  name: 'model-rm', aliases: ['rm-model'], args: ['provider'], hint: '<provider> <model-id>',
3099
3411
  category: 'model',
@@ -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
  /**