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
@@ -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
+ }
@@ -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
  /**
@@ -19,9 +19,12 @@
19
19
  * - `runOnboarding` **returns** whether the user declined rather than calling
20
20
  * `process.exit` from inside a library function, so the caller owns process
21
21
  * 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.
22
+ * - The right-hand box is about *this* client: the commands that add a model
23
+ * and set a key, each held to this package's own registry. It used to be a
24
+ * `What's new` list of *this* package's release notes — never Aegiscodex's,
25
+ * printing another project's changelog in our banner would be a lie about
26
+ * what the user just installed — but a changelog is stale the moment the
27
+ * next release lands, and it answered no question a new user has.
25
28
  *
26
29
  * Every screen is split into a pure line-builder (`trustLines`,
27
30
  * `themePickerLines`, `welcomeLines`) plus a thin key loop, so the exact
@@ -45,7 +48,8 @@ const VERSION = require('../package.json').version;
45
48
 
46
49
  const PRODUCT = 'AEGIS Code';
47
50
 
48
- /** The two boxes' contents. `What's new` is this package's own changelog. */
51
+ /** The two boxes' contents. The right-hand box is `KEY_HELP` — the commands
52
+ * that add a model and set a key — not a changelog; see its comment below. */
49
53
  const TIPS = [
50
54
  ' Run /init to create an AEGIS.md',
51
55
  ' Use ↑↓ to recall past prompts',
@@ -55,30 +59,38 @@ const TIPS = [
55
59
  ];
56
60
 
57
61
  /**
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.
62
+ * The second box: what this build can DO for you, not what changed in it.
63
63
  *
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.
64
+ * It used to be a hand-written `What's new` patch list, and that shape was the
65
+ * problem: a changelog on a welcome screen is read once and then goes stale by
66
+ * construction, so the box spent most of its life advertising releases the user
67
+ * was not running (it sat four minors behind while the package shipped 6.7.3)
68
+ * or, worse, patch notes for a version nobody can act on. The four things a new
69
+ * user actually has to know to get a turn running are all commands: how to add a
70
+ * model, how to set a provider key, how to set an AEGIS account key, and how to
71
+ * switch between the models they now hold. Those do not go stale — every command
72
+ * named here is asserted to exist in the registry by test/cli-onboarding.test.mjs,
73
+ * so a rename fails the suite instead of quietly leaving a dead route on the
74
+ * first screen the user reads.
75
+ *
76
+ * The row count is load-bearing, exactly as the patch list's was: at 80×24 the
77
+ * welcome screen fills rows-1 exactly (23 of 24), and `boxes()` receives an
78
+ * `avail` it never reads, so a tenth row would push the footer hint off the
79
+ * bottom of the commonest terminal there is. `test/cli-onboarding.test.mjs`
80
+ * pins the total; retire a row rather than adding one. Each provider row wraps
81
+ * its `argument list` onto a second row on purpose — a 60-cell command on a
82
+ * 39-cell box would be clipped mid-word by `boxLines()`, which reads as a
83
+ * rendering fault rather than as an example.
72
84
  */
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',
85
+ const KEY_HELP = [
86
+ ' Add a model: /model add',
87
+ ' <id> <name> <model> <url>',
88
+ ' Set a provider key: /byok-key',
89
+ ' <provider> — openai, anthropic',
90
+ ' Set your account key: /key <key>',
91
+ ' Switch model: /model, or alt+p',
92
+ ' Reasoning effort: /effort',
93
+ ' All commands: press / for the list',
82
94
  ];
83
95
 
84
96
  /**
@@ -87,11 +99,19 @@ const WHATS_NEW = [
87
99
  * screen, in place of the desktop host's welcome panel (BYOK + AEGIS Cloud).
88
100
  *
89
101
  * 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
102
+ * budget `KEY_HELP` is held to: at 80×24 the rule, mark, title, tagline and
103
+ * the Tips/Models-and-keys pair already come to 21 of the 23 usable rows, so a
92
104
  * boxed third panel (three rows minimum, two of them rules) would push the
93
105
  * footer hint off the bottom of the commonest terminal there is. Two rows fit
94
- * exactly, one route each, and the desktop line shares the second.
106
+ * exactly: one route row, and the desktop line under it.
107
+ *
108
+ * WHICH route row is the part that matters, and it is composed by
109
+ * `connectRows()` below rather than being a constant, because the two routes
110
+ * have separate gates. They used to share a single one that short-circuited on
111
+ * the account key, so the `/byok-key` row disappeared the moment a user
112
+ * redeemed an AEGIS key — see `byokRouteNeeded()`. Holding the block to two
113
+ * rows is why the both-owed case merges the routes into one row again: at
114
+ * 80×24 a third row is the footer hint.
95
115
  *
96
116
  * Both commands named here are real registry entries — `/byok-key` saves a
97
117
  * provider key, `/key` saves the AEGIS account key — and the URL is the shared
@@ -100,20 +120,65 @@ const WHATS_NEW = [
100
120
  * which the bare `aegiscloud.org` this row used to print did not. Nothing here
101
121
  * is a URL or a command that only exists in this comment.
102
122
  */
103
- const CONNECT = [
123
+ const CONNECT_BYOK = [
124
+ 'Your own provider key: /byok-key <provider> — works with your AEGIS key',
125
+ ];
126
+
127
+ // The AEGIS Cloud route. The URL in the desktop row below is the shared signup
128
+ // deep link from signup.js, not a hand-written one: it lands on the register
129
+ // panel with the key page queued behind it and the channel attached, which the
130
+ // bare `aegiscloud.org` that row used to print did not.
131
+ //
132
+ // The scheme-less form, and this is the only link in the CLI that uses it. The
133
+ // row's copy spends 45 of the 75 cells `wrapped()` allows at 80 columns
134
+ // (cols - 4 - indent), so `https://aegiscloud.org/key?s=cli` makes the row 77
135
+ // and wraps — a line the 80x24 screen does not have, because the connect
136
+ // block sits on row 21 of 23 and the row it pushes out is the footer hint.
137
+ // `s=cli` is the parameter that files the signup, so it is the scheme that
138
+ // goes, not the channel: see signup.js `signupDisplayUrl()`. Editing this copy
139
+ // means re-measuring; test/cli-onboarding.test.mjs fails on the row count if
140
+ // the row grows past the budget, and names the row that caused it.
141
+ const CONNECT_CLOUD = [
142
+ 'AEGIS Cloud, one account key: /key — no provider signup',
143
+ ];
144
+
145
+ // Both routes still owed (a fresh install): one row naming both, the original
146
+ // copy. Two rows is the whole budget, so this is not a third line — see the
147
+ // block comment above.
148
+ const CONNECT_BOTH = [
104
149
  'Your key, your bill: /byok-key <provider> — or AEGIS Cloud, /key',
105
- // The scheme-less form, and this is the only link in the CLI that uses it.
106
- // The row's copy spends 45 of the 75 cells `wrapped()` allows at 80 columns
107
- // (cols - 4 - indent), so `https://aegiscloud.org/key?s=cli` makes the row 77
108
- // and wraps — a line the 80x24 screen does not have, because the connect
109
- // block sits on row 21 of 23 and the row it pushes out is the footer hint.
110
- // `s=cli` is the parameter that files the signup, so it is the scheme that
111
- // goes, not the channel: see signup.js `signupDisplayUrl()`. Editing this copy
112
- // means re-measuring; test/cli-onboarding.test.mjs fails on the row count if
113
- // the row grows past the budget, and names the row that caused it.
150
+ ];
151
+
152
+ const CONNECT_DESKTOP = [
114
153
  `AEGIS Desktop: same engine on your machine — ${signupDisplayUrl()}`,
115
154
  ];
116
155
 
156
+ /**
157
+ * The connect rows to draw, in order, for the machine as it stands now.
158
+ *
159
+ * `[]` means nothing to say — both routes are configured — and the caller then
160
+ * draws no block at all. Otherwise: one route row (both-owed merges into a
161
+ * single row, the 80×24 budget above, and the desktop pointer always shares
162
+ * the block with it).
163
+ *
164
+ * The gates are independent on purpose. An AEGIS key does not cancel the
165
+ * `/byok-key` row and a provider route does not cancel the `/key` row: the two
166
+ * are not alternatives, they are two ways in, and the row a user has already
167
+ * taken is the only one that may be dropped.
168
+ */
169
+ function connectRows() {
170
+ const rows = [];
171
+ const byok = byokRouteNeeded();
172
+ const cloud = cloudRouteNeeded();
173
+ if (byok && cloud) rows.push(...CONNECT_BOTH);
174
+ else if (byok) rows.push(...CONNECT_BYOK);
175
+ else if (cloud) rows.push(...CONNECT_CLOUD);
176
+ // The desktop pointer is not a route, so it is not gated on one: whenever the
177
+ // block is drawn at all, the "why would I want the app" answer is in it.
178
+ if (rows.length) rows.push(...CONNECT_DESKTOP);
179
+ return rows;
180
+ }
181
+
117
182
  /** Centre a plain string, returning one span line. Clip first, or a string
118
183
  * wider than the terminal produces a row that wraps and shears the frame. */
119
184
  function centered(text, cols, style) {
@@ -354,13 +419,14 @@ function welcomeLines(ctx, cols, rows, firstRun = true) {
354
419
 
355
420
  lines.push(...boxes(t, cols, rows - lines.length - 4));
356
421
  lines.push([span('', '')]);
357
- // The connect block, before the footer hint and only while the machine
358
- // holds no account key. `wrapped` splits rather than clips, so a narrow
359
- // terminal gets four short rows instead of two sheared ones; the height
360
- // budget is unaffected at 80×24, where each line still fits on one row.
361
- if (connectNeeded()) {
362
- for (const text of CONNECT) lines.push(...wrapped(text, cols, t.white, 1));
363
- }
422
+ // The connect block, before the footer hint. The rows are composed by
423
+ // `connectRows()` — the two routes gate SEPARATELY, so an AEGIS-key holder
424
+ // with no provider route of their own is still told `/byok-key` exists,
425
+ // which is the whole point: holding an account key is not a reason to hide
426
+ // the bring-your-own-key route. `wrapped` splits rather than clips, so a
427
+ // narrow terminal gets short rows instead of sheared ones; the height budget
428
+ // is unaffected at 80×24, where each row still fits on one line.
429
+ for (const text of connectRows()) lines.push(...wrapped(text, cols, t.white, 1));
364
430
  lines.push([span(t.gray, GLYPH.hint), span(t.white, ' Try "write a test for <filepath>"')]);
365
431
  while (lines.length < rows - 1) lines.push([span('', '')]);
366
432
  return lines;
@@ -393,18 +459,17 @@ function boxLines(t, header, rows, boxW) {
393
459
  return out;
394
460
  }
395
461
 
396
- /** The Tips + What's new boxes, side by side (stacked when too narrow). */
462
+ /** The Tips + Models-and-keys boxes, side by side (stacked when too narrow). */
397
463
  function boxes(t, cols, avail) {
398
464
  const gap = 2;
399
465
  const twoUp = Math.floor((cols - gap) / 2);
400
466
  const tipRows = TIPS.map((s) => `${GLYPH.pointer}${s}`);
401
- const newsRows = WHATS_NEW;
402
- // Name the running build in the header. `WHATS_NEW` is hand-written prose and
403
- // will always lag the release it describes by however long it takes someone
404
- // to remember; the header cannot, so the box is never *silently* stale — a
405
- // user on a newer build reads "What's new in vX" over notes that end earlier
406
- // and can see the gap for what it is.
407
- const newsHead = `What's new in v${VERSION}`;
467
+ const newsRows = KEY_HELP;
468
+ // Name the running build in the header. The rows below are commands and
469
+ // cannot go stale, but the header is the only place the screen says which
470
+ // build is running, and it is derived from `VERSION` rather than typed — so
471
+ // a user on a newer build is never reading notes written for an older one.
472
+ const newsHead = `Models & keys · v${VERSION}`;
408
473
  if (twoUp >= 30) {
409
474
  let a = boxLines(t, 'Tips for getting started', tipRows, twoUp);
410
475
  let b = boxLines(t, newsHead, newsRows, twoUp);
@@ -492,12 +557,14 @@ function providerRouteConfigured() {
492
557
  }
493
558
 
494
559
  /**
495
- * Whether the welcome screen should still pitch the two connect routes.
560
+ * Whether ANY part of the connect block is still owed to this machine.
496
561
  *
497
- * Once an AEGIS account key is on this machine, or a BYOK provider route is
498
- * configured, the user has already taken one of them, and two rows repeating
499
- * what they just did is nagging, not onboarding — the same rule the desktop
500
- * host applies to its welcome panel.
562
+ * It is the OR of the two route gates, and it is deliberately not the thing
563
+ * `welcomeLines` branches on any more: the rows are composed one at a time by
564
+ * `connectRows()`, so a machine that holds an AEGIS account key and no
565
+ * provider route still gets the `/byok-key` row. This helper is the coarse
566
+ * question ("is there anything left to say") — a caller that wants the rows
567
+ * should ask `connectRows()` instead.
501
568
  *
502
569
  * A read that fails (no credentials file, an unreadable one) resolves to
503
570
  * "show it": the block is exactly what a user with no key needs, and a
@@ -506,7 +573,38 @@ function providerRouteConfigured() {
506
573
  */
507
574
  function connectNeeded() {
508
575
  try {
509
- if (providerRouteConfigured()) return false;
576
+ return byokRouteNeeded() || cloudRouteNeeded();
577
+ } catch {
578
+ return true;
579
+ }
580
+ }
581
+
582
+ /**
583
+ * The two halves of the connect block, gated SEPARATELY — this is the fix.
584
+ *
585
+ * They used to share one gate that short-circuited on the account key, so a
586
+ * user who redeemed an AEGIS key was never told BYOK exists at all: the row
587
+ * naming `/byok-key` was retired at the exact moment they had an account and
588
+ * were most likely to want a provider route of their own (unlimited/no relay
589
+ * billing, a model the pool does not carry). An account key and a provider
590
+ * route are not alternatives — `/byok-key` works alongside one — so the BYOK
591
+ * row is now gated on the BYOK route alone and an AEGIS-key holder still
592
+ * reads it. The Cloud row keeps the old account-key gate, because that is the
593
+ * thing it pitches.
594
+ *
595
+ * Both reads fail toward SHOWING the row: a failed status read must never be
596
+ * the reason a new install is told nothing about how to start.
597
+ */
598
+ function byokRouteNeeded() {
599
+ try {
600
+ return !providerRouteConfigured();
601
+ } catch {
602
+ return true;
603
+ }
604
+ }
605
+
606
+ function cloudRouteNeeded() {
607
+ try {
510
608
  return !credentials.keyStatus().configured;
511
609
  } catch {
512
610
  return true;
@@ -753,9 +851,15 @@ async function runOnboarding(ctx, o = {}) {
753
851
  module.exports = {
754
852
  PRODUCT,
755
853
  TIPS,
756
- WHATS_NEW,
757
- CONNECT,
854
+ KEY_HELP,
855
+ CONNECT_BYOK,
856
+ CONNECT_CLOUD,
857
+ CONNECT_BOTH,
858
+ CONNECT_DESKTOP,
859
+ connectRows,
758
860
  connectNeeded,
861
+ byokRouteNeeded,
862
+ cloudRouteNeeded,
759
863
  providerRouteConfigured,
760
864
  trustLines,
761
865
  themePickerLines,
@@ -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
  /**