aegiscode 7.0.0 → 7.0.2

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 (109) hide show
  1. package/bin/aegiscode.js +137 -0
  2. package/package.json +1 -1
  3. package/scripts/check.mjs +5 -0
  4. package/scripts/demo.mjs +5 -0
  5. package/scripts/predist.mjs +29 -2
  6. package/scripts/runtests.mjs +5 -0
  7. package/scripts/seal-gate.mjs +76 -0
  8. package/src/agents.js +5 -0
  9. package/src/app.js +5 -0
  10. package/src/art.js +5 -0
  11. package/src/autonomous.js +23 -0
  12. package/src/caps.js +5 -0
  13. package/src/chatflow.js +109 -31
  14. package/src/checkpoint.js +5 -0
  15. package/src/clipboard.js +5 -0
  16. package/src/cloudsync.js +5 -0
  17. package/src/commands.js +326 -14
  18. package/src/config.js +5 -0
  19. package/src/credentials.js +5 -0
  20. package/src/deps.js +5 -0
  21. package/src/devrun.js +5 -0
  22. package/src/diff.js +5 -0
  23. package/src/diffview.js +5 -0
  24. package/src/engine.js +5 -0
  25. package/src/entitlement.js +5 -0
  26. package/src/events.js +15 -0
  27. package/src/export.js +5 -0
  28. package/src/fingerprint.js +5 -0
  29. package/src/format.js +5 -0
  30. package/src/fuzzy.js +5 -0
  31. package/src/gate.js +12 -0
  32. package/src/history.js +5 -0
  33. package/src/init.js +5 -0
  34. package/src/input.js +5 -0
  35. package/src/keys.js +34 -2
  36. package/src/limits.js +192 -0
  37. package/src/markdown.js +5 -0
  38. package/src/mcp.js +13 -0
  39. package/src/models.js +5 -0
  40. package/src/naming.js +5 -0
  41. package/src/overlays.js +12 -2
  42. package/src/panels.js +5 -0
  43. package/src/permissions.js +56 -1
  44. package/src/ping.js +5 -0
  45. package/src/presence.js +5 -0
  46. package/src/provenance.js +238 -0
  47. package/src/provenance.lock.json +36 -0
  48. package/src/render.js +5 -0
  49. package/src/screen.js +5 -0
  50. package/src/screens.js +53 -37
  51. package/src/secret.js +5 -0
  52. package/src/securefs.js +5 -0
  53. package/src/settings.js +5 -0
  54. package/src/shared.js +5 -0
  55. package/src/sharedpaths.js +5 -0
  56. package/src/signup.js +5 -0
  57. package/src/summarize.js +5 -0
  58. package/src/sysdiag.js +587 -0
  59. package/src/system.js +5 -0
  60. package/src/theme.js +5 -0
  61. package/src/title.js +5 -0
  62. package/src/todos.js +5 -0
  63. package/src/tokens.js +5 -0
  64. package/src/topup.js +5 -0
  65. package/src/update.js +5 -0
  66. package/vendor/client/aegis.js +5 -0
  67. package/vendor/client/attest.js +5 -0
  68. package/vendor/client/authorship-key.js +5 -0
  69. package/vendor/client/auto-provision.js +5 -0
  70. package/vendor/client/brain-catalog.js +5 -0
  71. package/vendor/client/byok-catalog.js +5 -0
  72. package/vendor/client/credentials.js +5 -0
  73. package/vendor/client/device-fingerprint.js +5 -0
  74. package/vendor/client/env-file.js +5 -0
  75. package/vendor/client/fingerprint.js +5 -0
  76. package/vendor/client/foreign-memory.js +5 -0
  77. package/vendor/client/hooks.js +5 -0
  78. package/vendor/client/model-discovery.js +332 -0
  79. package/vendor/client/platform.js +5 -0
  80. package/vendor/client/prefs.js +5 -0
  81. package/vendor/client/presence-constants.js +5 -0
  82. package/vendor/client/presence.js +5 -0
  83. package/vendor/client/record-vault.js +5 -0
  84. package/vendor/client/session-store.js +5 -0
  85. package/vendor/client/topup.js +5 -0
  86. package/vendor/client/touch.js +5 -0
  87. package/vendor/client/update.js +5 -0
  88. package/vendor/client/user-models.js +5 -0
  89. package/vendor/desktop/lib/local/aegis-seal.mjs +5 -0
  90. package/vendor/desktop/lib/local/agents.js +5 -0
  91. package/vendor/desktop/lib/local/autonomous.js +5 -0
  92. package/vendor/desktop/lib/local/context.js +5 -0
  93. package/vendor/desktop/lib/local/covenant.js +5 -0
  94. package/vendor/desktop/lib/local/engine.js +129 -0
  95. package/vendor/desktop/lib/local/entitlement.js +5 -0
  96. package/vendor/desktop/lib/local/git-scope.js +5 -0
  97. package/vendor/desktop/lib/local/local.js +5 -0
  98. package/vendor/desktop/lib/local/prompt.js +5 -0
  99. package/vendor/desktop/lib/local/queue.js +5 -0
  100. package/vendor/desktop/lib/local/session-rounds.js +5 -0
  101. package/vendor/desktop/lib/local/shell.js +88 -9
  102. package/vendor/desktop/lib/local/tools.js +13 -6
  103. package/vendor/desktop/lib/local/turn-guard.js +5 -0
  104. package/vendor/desktop/lib/local/worktree-lock.js +5 -0
  105. package/vendor/desktop/lib/settings.js +5 -0
  106. package/vendor/desktop/renderer/usage.js +5 -0
  107. package/vendor/mcp/server.js +5 -0
  108. package/vendor/mcp/tools.js +5 -0
  109. package/vendor/tools/agent-gate.mjs +23 -0
@@ -0,0 +1,238 @@
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.
6
+ 'use strict';
7
+
8
+ /**
9
+ * provenance — who this program is, and whether it is still the program that
10
+ * was published.
11
+ *
12
+ * Two questions, both asked from inside the CLI so the answer is available to
13
+ * the person running it and not only to whoever holds the git clone:
14
+ *
15
+ * 1. **Identity.** `IDENTITY` is the one place the product name, licence,
16
+ * copyright holder and source URL are written for a user to read: it is
17
+ * what `aegiscode provenance` prints, and what a rebranded copy has to
18
+ * deliberately delete rather than merely never mention. This half is
19
+ * *meant* to be read, and removing it is itself the evidence.
20
+ *
21
+ * 2. **Integrity of the safety files.** `selfCheck()` re-hashes the CLI files
22
+ * whose edit changes what the program ALLOWS — the agent-key gate, the
23
+ * permission evaluator, the frozen approval classes, the `runner with no
24
+ * one to answer it`, the entry point that wires them, the silent interlock
25
+ * in src/limits.js, and this file — against `provenance.lock.json`, which
26
+ * ships in the package.
27
+ *
28
+ * This half is deliberately OPAQUE. Its manifest carries no paths, only
29
+ * digests under non-identifying unit ids, and the manifest is the only
30
+ * place they appear: the id→path table lives in `UNITS` below, and every
31
+ * message this module emits names a unit id and nothing else. A report
32
+ * that said "src/gate.js: a1b2… → c3d4…" would be a repair manual for
33
+ * whoever neutered the gate, and the whole point of the check is that the
34
+ * build which fails it does not get told where to aim next.
35
+ *
36
+ * ## What this is not
37
+ *
38
+ * It is not DRM, and calling it tamper-proof would be a lie of the kind this
39
+ * repo keeps a ledger of. Whoever has the bytes can edit the safety file AND
40
+ * regenerate the lock; there is no key here and no server to ask, because a
41
+ * client that phones home to prove itself is a client that fails when the
42
+ * network does, and this program is used offline. What it buys is that the
43
+ * neutered build is no longer SILENT: either it announces the divergence to its
44
+ * own user, or its author deleted a check that is named in every file header and
45
+ * pinned by `tools/invariant-lock.mjs` — a deliberate act with a paper trail.
46
+ *
47
+ * The second gate is `src/limits.js`. It withholds capability instead of
48
+ * explaining a mismatch, so deleting the loud report is not enough: a build
49
+ * assembled that way still refuses its own privileged subcommands and says only
50
+ * that it is in reduced mode. It is also not asked from one place — each module
51
+ * that owns one of those privileges (`gate.js`, `mcp.js`, `autonomous.js`,
52
+ * `permissions.js`) asks it for itself, so the refusal survives the deletion of
53
+ * the entry point's call rather than going with it.
54
+ *
55
+ * ## Why a missing lock file is a failure, not a pass
56
+ *
57
+ * Fail-closed, like the repo's gate and its invariant lock, and for the same
58
+ * reason: deleting the manifest is the cheapest possible way to switch this off,
59
+ * so absence is reported (`unverifiable`) instead of being read as "nothing
60
+ * configured". `AEGIS_NO_PROVENANCE_CHECK=1` silences it for a development tree
61
+ * that is mid-edit — loudly, and by name, so it is never the quiet path.
62
+ */
63
+
64
+ const { createHash } = require('node:crypto');
65
+ const { existsSync, readFileSync } = require('node:fs');
66
+ const path = require('node:path');
67
+ const limits = require('./limits.js');
68
+
69
+ /** Everything a copy would have to change to look like its own product. */
70
+ const IDENTITY = Object.freeze({
71
+ product: 'AEGIS Code',
72
+ bin: 'aegiscode',
73
+ license: 'AGPL-3.0-or-later',
74
+ copyright: 'Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.',
75
+ source: 'https://github.com/aegisinfo/aegiscode-plugin',
76
+ homepage: 'https://aegiscloud.org',
77
+ });
78
+
79
+ /**
80
+ * The sealed set: id → path. This table is the mapping the manifest refuses to
81
+ * carry, and the only reason a report can say `p3` at all. Keep it in step with
82
+ * `tools/provenance.mjs`, which writes both halves from it.
83
+ */
84
+ const UNITS = Object.freeze([
85
+ Object.freeze({ id: 'p1', rel: 'bin/aegiscode.js' }),
86
+ Object.freeze({ id: 'p2', rel: 'src/provenance.js' }),
87
+ Object.freeze({ id: 'p3', rel: 'src/gate.js' }),
88
+ Object.freeze({ id: 'p4', rel: 'src/permissions.js' }),
89
+ Object.freeze({ id: 'p5', rel: 'src/caps.js' }),
90
+ Object.freeze({ id: 'p6', rel: 'src/autonomous.js' }),
91
+ Object.freeze({ id: 'p7', rel: 'src/limits.js' }),
92
+ Object.freeze({ id: 'p8', rel: 'src/mcp.js' }),
93
+ ]);
94
+
95
+ const PACKAGE_ROOT = path.join(__dirname, '..');
96
+ const MANIFEST_FILE = path.join(__dirname, 'provenance.lock.json');
97
+
98
+ const sha256 = (data) => createHash('sha256').update(data).digest('hex');
99
+
100
+ /**
101
+ * Read the shipped manifest. Two shapes are accepted:
102
+ *
103
+ * - current: `{ v: 1, alg: 'sha256', units: { p1: '<hex>', … } }` — ids only,
104
+ * no paths, nothing to read off the file except which digests moved;
105
+ * - legacy: `{ files: { '<rel path>': '<hex>' } }` — still honoured so a
106
+ * package built from an older tree can still be checked, and still reported
107
+ * by id rather than by path.
108
+ */
109
+ function readManifest() {
110
+ try {
111
+ const parsed = JSON.parse(readFileSync(MANIFEST_FILE, 'utf8'));
112
+ if (!parsed) return null;
113
+ if (parsed.units && typeof parsed.units === 'object') {
114
+ return { units: parsed.units, legacyPaths: null };
115
+ }
116
+ if (parsed.files && typeof parsed.files === 'object') {
117
+ return { units: parsed.files, legacyPaths: parsed.files };
118
+ }
119
+ return null;
120
+ } catch {
121
+ return null;
122
+ }
123
+ }
124
+
125
+ /** Resolve a unit's expected digest, in either manifest shape. */
126
+ function expectedFor(manifest, unit) {
127
+ if (!manifest) return undefined;
128
+ if (manifest.legacyPaths) return manifest.legacyPaths[unit.rel];
129
+ return manifest.units[unit.id];
130
+ }
131
+
132
+ /**
133
+ * Compare this install's safety files to the shipped manifest.
134
+ *
135
+ * Never throws: this is a diagnostic, and a diagnostic that can break the
136
+ * program it is reporting on is worse than no diagnostic.
137
+ *
138
+ * Reports unit ids, never paths. See the header for why the difference matters.
139
+ *
140
+ * @returns {{ ok: boolean, checked: number, problems: string[], unverifiable: boolean }}
141
+ */
142
+ function selfCheck() {
143
+ const manifest = readManifest();
144
+ if (!manifest) {
145
+ return {
146
+ ok: false,
147
+ checked: 0,
148
+ problems: [`${path.basename(MANIFEST_FILE)} is missing or unreadable`],
149
+ unverifiable: true,
150
+ };
151
+ }
152
+ const problems = [];
153
+ let checked = 0;
154
+ for (const unit of UNITS) {
155
+ const abs = path.join(PACKAGE_ROOT, unit.rel);
156
+ if (!existsSync(abs)) {
157
+ problems.push(`${unit.id}: sealed unit missing from this install`);
158
+ continue;
159
+ }
160
+ try {
161
+ const actual = sha256(readFileSync(abs));
162
+ checked++;
163
+ const expected = expectedFor(manifest, unit);
164
+ if (expected && actual !== expected) problems.push(`${unit.id}: digest moved`);
165
+ } catch {
166
+ problems.push(`${unit.id}: unreadable`);
167
+ }
168
+ }
169
+ return { ok: problems.length === 0, checked, problems, unverifiable: false };
170
+ }
171
+
172
+ /**
173
+ * The one stderr line worth writing, or null when everything is as published.
174
+ *
175
+ * It names ids and counts. It does not name files, does not describe what those
176
+ * files do, and does not say how to re-seal: those three sentences are exactly
177
+ * what a tampered build would otherwise hand its author for free.
178
+ *
179
+ * A development tree can silence it with AEGIS_NO_PROVENANCE_CHECK=1; the
180
+ * silence is printed too, because a control that can be switched off quietly is
181
+ * not a control.
182
+ */
183
+ function warning(report) {
184
+ if (!report || report.ok) return null;
185
+ if (process.env.AEGIS_NO_PROVENANCE_CHECK) {
186
+ return `aegiscode: provenance check SKIPPED (AEGIS_NO_PROVENANCE_CHECK is set): ${report.problems[0]}\n`;
187
+ }
188
+ return (
189
+ `aegiscode: provenance — ${report.problems.length} sealed unit${
190
+ report.problems.length === 1 ? '' : 's'
191
+ } do not match the published manifest (${IDENTITY.license}):\n` +
192
+ report.problems.map((p) => `aegiscode: ${p}\n`).join('') +
193
+ 'aegiscode: this build is not the published one; do not trust what it reports about itself.\n'
194
+ );
195
+ }
196
+
197
+ /** The human-readable answer for `aegiscode provenance`. */
198
+ function describe({ version } = {}) {
199
+ const report = selfCheck();
200
+ const lines = [
201
+ `${IDENTITY.product} (${IDENTITY.bin})${version ? ` ${version}` : ''} — ${IDENTITY.license}`,
202
+ `source: ${IDENTITY.source}`,
203
+ `homepage: ${IDENTITY.homepage}`,
204
+ IDENTITY.copyright,
205
+ ];
206
+ // The identity half is MEANT to be read — it is the notice that has to travel
207
+ // with a copy, and withholding it would defeat the licence half of this file.
208
+ // The integrity half is not. A build that failed the silent gate does not get
209
+ // to report on itself: it is told exactly as much as any other module is
210
+ // (src/limits.js, "reduced mode"), and the ids it would otherwise print stay
211
+ // here. Asked through limits.armed() rather than trusting the caller, so that
212
+ // deleting the entry point's own refusal does not hand this back — the guard
213
+ // lives in a file the sealed set covers.
214
+ if (limits.armed()) {
215
+ lines.push('safety: reduced mode — this build is not the one that was published.');
216
+ return {
217
+ text: lines.join('\n') + '\n',
218
+ ok: false,
219
+ report: { ok: false, checked: report.checked, problems: [], unverifiable: report.unverifiable, withheld: true },
220
+ };
221
+ }
222
+ if (report.ok) {
223
+ lines.push(`safety: ${report.checked} sealed units verified`);
224
+ } else if (report.unverifiable) {
225
+ lines.push(`safety: UNVERIFIABLE — ${report.problems[0]}`);
226
+ } else {
227
+ lines.push(`safety: ${report.problems.length} sealed unit(s) do not match the published manifest:`);
228
+ for (const p of report.problems) lines.push(` ${p}`);
229
+ }
230
+ return { text: lines.join('\n') + '\n', ok: report.ok, report };
231
+ }
232
+
233
+ /** The id→path mapping, for the development tool only. Never called at runtime. */
234
+ function sealMap() {
235
+ return UNITS.map((u) => ({ id: u.id, rel: u.rel }));
236
+ }
237
+
238
+ module.exports = { IDENTITY, UNITS, MANIFEST_FILE, selfCheck, warning, describe, sealMap };
@@ -0,0 +1,36 @@
1
+ {
2
+ "v": 1,
3
+ "alg": "sha256",
4
+ "comment": [
5
+ "Generated by tools/provenance.mjs (`lock --write`, which also seals the",
6
+ "interlock). Read that file, and cli/src/provenance.js, before editing this.",
7
+ "",
8
+ "IDS ONLY. The id-to-path table is in cli/src/provenance.js (`UNITS`) and is",
9
+ "never printed at runtime; this file deliberately does not name the files it",
10
+ "covers, because the manifest ships in the package and a manifest that listed",
11
+ "them would be a table of contents for whoever wants to edit one.",
12
+ "",
13
+ "cli/src/provenance.js re-hashes these at startup and writes one line to",
14
+ "stderr if a digest moved — by id, without naming the file or the fix. A",
15
+ "second, silent gate (cli/src/limits.js) asks the same question as a closed",
16
+ "set and, when it fails, withholds the privileged subcommands instead of",
17
+ "explaining anything.",
18
+ "",
19
+ "This is a speed bump with a loud voice, not DRM: whoever holds the bytes",
20
+ "can regenerate this file. It is worth regenerating only deliberately —",
21
+ "`tools/invariant-lock.mjs` pins this file and the safety files, so a silent",
22
+ "change upstream fails the lock instead of landing."
23
+ ],
24
+ "license": "AGPL-3.0-or-later",
25
+ "source": "https://github.com/aegisinfo/aegiscode-plugin",
26
+ "units": {
27
+ "p1": "6ab4d502c73d950c4c17afaaa5afc350475050a0bb45e883a8fdb8c71ca04757",
28
+ "p2": "d63d147de5455eea111d000b748d7eef9572a11a08d31f2471d5ff146701342c",
29
+ "p3": "ff962ac8dbf42cecb2477e2f77bf5ec61f88aa1751b0d4e506bf030fbc5fc6c6",
30
+ "p4": "2e8385c3a653a2af324050b4b92aeb9d142fc6765c91a13ccc928c5d4a2dbedb",
31
+ "p5": "408d67f78f31f6d637a26d2852e0c809a260544e613afdc64b731401c0ba3801",
32
+ "p6": "2a934a1b76e1321457d0a2e7ebf91dcc9520097d6b62f7d5a99af0bd69c2cf97",
33
+ "p7": "904efedb3101cca9d7b81009dfe72216ce773e7ab8f5bc603327b2f76da356be",
34
+ "p8": "3cc054d06715e065fe635b37b7d1bb98bf7989d64453a572ddbb77cec5b830e7"
35
+ }
36
+ }
package/src/render.js CHANGED
@@ -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
  /**
package/src/screen.js CHANGED
@@ -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
  /**
package/src/screens.js CHANGED
@@ -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
  /**
@@ -19,9 +24,12 @@
19
24
  * - `runOnboarding` **returns** whether the user declined rather than calling
20
25
  * `process.exit` from inside a library function, so the caller owns process
21
26
  * lifecycle (and a test can drive the whole flow).
22
- * - The `What's new` box lists *this* package's release notes, not
23
- * Aegiscodex's: printing another project's changelog in our banner would be
24
- * a lie about what the user just installed.
27
+ * - The right-hand box is about *this* client: the commands that add a model
28
+ * and set a key, each held to this package's own registry. It used to be a
29
+ * `What's new` list of *this* package's release notes — never Aegiscodex's,
30
+ * printing another project's changelog in our banner would be a lie about
31
+ * what the user just installed — but a changelog is stale the moment the
32
+ * next release lands, and it answered no question a new user has.
25
33
  *
26
34
  * Every screen is split into a pure line-builder (`trustLines`,
27
35
  * `themePickerLines`, `welcomeLines`) plus a thin key loop, so the exact
@@ -45,7 +53,8 @@ const VERSION = require('../package.json').version;
45
53
 
46
54
  const PRODUCT = 'AEGIS Code';
47
55
 
48
- /** The two boxes' contents. `What's new` is this package's own changelog. */
56
+ /** The two boxes' contents. The right-hand box is `KEY_HELP` — the commands
57
+ * that add a model and set a key — not a changelog; see its comment below. */
49
58
  const TIPS = [
50
59
  ' Run /init to create an AEGIS.md',
51
60
  ' Use ↑↓ to recall past prompts',
@@ -55,30 +64,38 @@ const TIPS = [
55
64
  ];
56
65
 
57
66
  /**
58
- * The `What's new` box — newest release first, two rows per release, **eight
59
- * rows in total**. The row count is load-bearing, not cosmetic: at 80×24 the
60
- * welcome screen already fills exactly `rows - 1`, so a ninth row pushes the
61
- * footer hint off the bottom of the commonest terminal there is. Retire the
62
- * oldest entry rather than adding one.
67
+ * The second box: what this build can DO for you, not what changed in it.
63
68
  *
64
- * This block went four minor versions stale (it still topped out at v6.3.0
65
- * while the package shipped 6.7.3) because nothing held it to anything. Two
66
- * things do now: the box header names `VERSION`, so the screen always says
67
- * which build is running, and every `/command` named below is asserted to
68
- * exist in the registry by `test/cli-onboarding.test.mjs`. The prose stays
69
- * hand-written — a changelog is prose — but it can no longer advertise a
70
- * command that was renamed away, and it cannot claim to be news for a release
71
- * the user is not running.
69
+ * It used to be a hand-written `What's new` patch list, and that shape was the
70
+ * problem: a changelog on a welcome screen is read once and then goes stale by
71
+ * construction, so the box spent most of its life advertising releases the user
72
+ * was not running (it sat four minors behind while the package shipped 6.7.3)
73
+ * or, worse, patch notes for a version nobody can act on. The four things a new
74
+ * user actually has to know to get a turn running are all commands: how to add a
75
+ * model, how to set a provider key, how to set an AEGIS account key, and how to
76
+ * switch between the models they now hold. Those do not go stale — every command
77
+ * named here is asserted to exist in the registry by test/cli-onboarding.test.mjs,
78
+ * so a rename fails the suite instead of quietly leaving a dead route on the
79
+ * first screen the user reads.
80
+ *
81
+ * The row count is load-bearing, exactly as the patch list's was: at 80×24 the
82
+ * welcome screen fills rows-1 exactly (23 of 24), and `boxes()` receives an
83
+ * `avail` it never reads, so a tenth row would push the footer hint off the
84
+ * bottom of the commonest terminal there is. `test/cli-onboarding.test.mjs`
85
+ * pins the total; retire a row rather than adding one. Each provider row wraps
86
+ * its `argument list` onto a second row on purpose — a 60-cell command on a
87
+ * 39-cell box would be clipped mid-word by `boxLines()`, which reads as a
88
+ * rendering fault rather than as an example.
72
89
  */
73
- const WHATS_NEW = [
74
- ' v6.7.x: caps read from the tty,',
75
- ' edits render as diff blocks',
76
- ' v6.6.0: autonomous mode — a',
77
- ' persistent work queue',
78
- ' v6.5.0: live tool rows, /cost',
79
- ' from the ledger the pool set',
80
- ' v6.4.0: `aegiscode login`',
81
- ' /release-notes for more',
90
+ const KEY_HELP = [
91
+ ' Add a model: /model add',
92
+ ' <id> <name> <model> <url>',
93
+ ' Set a provider key: /byok-key',
94
+ ' <provider> — openai, anthropic',
95
+ ' Set your account key: /key <key>',
96
+ ' Switch model: /model, or alt+p',
97
+ ' Reasoning effort: /effort',
98
+ ' All commands: press / for the list',
82
99
  ];
83
100
 
84
101
  /**
@@ -87,8 +104,8 @@ const WHATS_NEW = [
87
104
  * screen, in place of the desktop host's welcome panel (BYOK + AEGIS Cloud).
88
105
  *
89
106
  * It is two plain rows and not a third box, and the reason is the same row
90
- * budget `WHATS_NEW` is held to: at 80×24 the rule, mark, title, tagline and
91
- * the Tips/What's-new pair already come to 21 of the 23 usable rows, so a
107
+ * budget `KEY_HELP` is held to: at 80×24 the rule, mark, title, tagline and
108
+ * the Tips/Models-and-keys pair already come to 21 of the 23 usable rows, so a
92
109
  * boxed third panel (three rows minimum, two of them rules) would push the
93
110
  * footer hint off the bottom of the commonest terminal there is. Two rows fit
94
111
  * exactly: one route row, and the desktop line under it.
@@ -447,18 +464,17 @@ function boxLines(t, header, rows, boxW) {
447
464
  return out;
448
465
  }
449
466
 
450
- /** The Tips + What's new boxes, side by side (stacked when too narrow). */
467
+ /** The Tips + Models-and-keys boxes, side by side (stacked when too narrow). */
451
468
  function boxes(t, cols, avail) {
452
469
  const gap = 2;
453
470
  const twoUp = Math.floor((cols - gap) / 2);
454
471
  const tipRows = TIPS.map((s) => `${GLYPH.pointer}${s}`);
455
- const newsRows = WHATS_NEW;
456
- // Name the running build in the header. `WHATS_NEW` is hand-written prose and
457
- // will always lag the release it describes by however long it takes someone
458
- // to remember; the header cannot, so the box is never *silently* stale — a
459
- // user on a newer build reads "What's new in vX" over notes that end earlier
460
- // and can see the gap for what it is.
461
- const newsHead = `What's new in v${VERSION}`;
472
+ const newsRows = KEY_HELP;
473
+ // Name the running build in the header. The rows below are commands and
474
+ // cannot go stale, but the header is the only place the screen says which
475
+ // build is running, and it is derived from `VERSION` rather than typed — so
476
+ // a user on a newer build is never reading notes written for an older one.
477
+ const newsHead = `Models & keys · v${VERSION}`;
462
478
  if (twoUp >= 30) {
463
479
  let a = boxLines(t, 'Tips for getting started', tipRows, twoUp);
464
480
  let b = boxLines(t, newsHead, newsRows, twoUp);
@@ -840,7 +856,7 @@ async function runOnboarding(ctx, o = {}) {
840
856
  module.exports = {
841
857
  PRODUCT,
842
858
  TIPS,
843
- WHATS_NEW,
859
+ KEY_HELP,
844
860
  CONNECT_BYOK,
845
861
  CONNECT_CLOUD,
846
862
  CONNECT_BOTH,
package/src/secret.js CHANGED
@@ -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
  /**
package/src/securefs.js CHANGED
@@ -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
  /**
package/src/settings.js CHANGED
@@ -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
  /**
package/src/shared.js CHANGED
@@ -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
  /**
package/src/signup.js CHANGED
@@ -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
  /**
2
7
  * The one place the CLI tells a user where to get an account key.
3
8
  *
package/src/summarize.js CHANGED
@@ -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
  /**