aegiscode 7.0.24 → 7.0.26

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 (113) hide show
  1. package/package.json +7 -3
  2. package/scripts/check.mjs +52 -1
  3. package/scripts/demo.mjs +94 -1
  4. package/scripts/predist.mjs +75 -1
  5. package/scripts/runtests.mjs +56 -1
  6. package/scripts/seal-gate.mjs +74 -1
  7. package/src/agents.js +139 -1
  8. package/src/app.js +2957 -1
  9. package/src/art.js +289 -1
  10. package/src/chatflow.js +3023 -1
  11. package/src/checkpoint.js +90 -1
  12. package/src/clipboard.js +424 -1
  13. package/src/cloudsync.js +528 -1
  14. package/src/commands.js +4089 -1
  15. package/src/config.js +581 -1
  16. package/src/connect.js +349 -1
  17. package/src/credentials.js +33 -1
  18. package/src/deps.js +232 -1
  19. package/src/devrun.js +187 -1
  20. package/src/diff.js +333 -1
  21. package/src/diffview.js +296 -1
  22. package/src/engine.js +297 -1
  23. package/src/entitlement.js +355 -1
  24. package/src/events.js +707 -1
  25. package/src/export.js +67 -1
  26. package/src/filepreview.js +153 -1
  27. package/src/fingerprint.js +592 -1
  28. package/src/format.js +259 -1
  29. package/src/fuzzy.js +119 -1
  30. package/src/history.js +423 -1
  31. package/src/init.js +175 -1
  32. package/src/input.js +139 -1
  33. package/src/keys.js +183 -1
  34. package/src/markdown.js +306 -1
  35. package/src/models.js +507 -1
  36. package/src/naming.js +57 -1
  37. package/src/overlays.js +462 -1
  38. package/src/panels.js +1418 -1
  39. package/src/ping.js +226 -1
  40. package/src/presence.js +238 -1
  41. package/src/render.js +516 -1
  42. package/src/screen.js +518 -1
  43. package/src/screens.js +896 -1
  44. package/src/secret.js +59 -1
  45. package/src/securefs.js +359 -1
  46. package/src/settings.js +155 -1
  47. package/src/shared.js +52 -1
  48. package/src/sharedpaths.js +53 -1
  49. package/src/signup.js +156 -1
  50. package/src/summarize.js +95 -1
  51. package/src/sysdiag.js +585 -1
  52. package/src/system.js +40 -1
  53. package/src/theme.js +570 -1
  54. package/src/title.js +220 -1
  55. package/src/todos.js +115 -1
  56. package/src/tokens.js +263 -1
  57. package/src/topup.js +210 -1
  58. package/src/update.js +191 -1
  59. package/vendor/client/aegis.js +2441 -1
  60. package/vendor/client/attest.js +518 -1
  61. package/vendor/client/authorship-key.js +410 -1
  62. package/vendor/client/auto-provision.js +134 -1
  63. package/vendor/client/brain-catalog.js +268 -1
  64. package/vendor/client/byok-catalog.js +199 -1
  65. package/vendor/client/catalog-client.js +487 -1
  66. package/vendor/client/conversation-export.js +177 -1
  67. package/vendor/client/credentials.js +494 -1
  68. package/vendor/client/device-fingerprint.js +141 -1
  69. package/vendor/client/drive-connect.js +110 -1
  70. package/vendor/client/drive-upload.js +234 -1
  71. package/vendor/client/env-file.js +1273 -1
  72. package/vendor/client/fingerprint.js +1064 -1
  73. package/vendor/client/foreign-memory.js +669 -1
  74. package/vendor/client/google-signin.js +133 -1
  75. package/vendor/client/hooks.js +430 -1
  76. package/vendor/client/model-discovery.js +373 -1
  77. package/vendor/client/naming.js +283 -1
  78. package/vendor/client/platform.js +937 -1
  79. package/vendor/client/prefs.js +351 -1
  80. package/vendor/client/presence-constants.js +107 -1
  81. package/vendor/client/presence.js +438 -1
  82. package/vendor/client/record-vault.js +1055 -3
  83. package/vendor/client/session-store.js +575 -1
  84. package/vendor/client/topup.js +297 -1
  85. package/vendor/client/touch.js +458 -1
  86. package/vendor/client/update.js +763 -1
  87. package/vendor/client/user-models.js +381 -1
  88. package/vendor/desktop/lib/local/agents.js +105 -1
  89. package/vendor/desktop/lib/local/attachments.js +276 -1
  90. package/vendor/desktop/lib/local/autonomous.js +1045 -1
  91. package/vendor/desktop/lib/local/claude-pro.js +1028 -1
  92. package/vendor/desktop/lib/local/context.js +125 -1
  93. package/vendor/desktop/lib/local/engine.js +3666 -1
  94. package/vendor/desktop/lib/local/entitlement.js +660 -1
  95. package/vendor/desktop/lib/local/git-scope.js +228 -1
  96. package/vendor/desktop/lib/local/local.js +2145 -1
  97. package/vendor/desktop/lib/local/prompt.js +280 -1
  98. package/vendor/desktop/lib/local/queue.js +560 -1
  99. package/vendor/desktop/lib/local/session-rounds.js +238 -1
  100. package/vendor/desktop/lib/local/spill.js +75 -1
  101. package/vendor/desktop/lib/local/turn-guard.js +300 -1
  102. package/vendor/desktop/lib/local/worktree-lock.js +235 -1
  103. package/vendor/desktop/lib/settings.js +890 -1
  104. package/vendor/desktop/renderer/usage.js +1239 -1
  105. package/vendor/hosts/install.js +638 -1
  106. package/vendor/hosts/openai-shim.js +515 -1
  107. package/vendor/hosts/spec.js +164 -1
  108. package/vendor/hosts/targets.js +346 -1
  109. package/vendor/mcp/server.js +221 -1
  110. package/vendor/mcp/tools.js +408 -1
  111. package/vendor/one/src/child.js +285 -1
  112. package/vendor/one/src/permissions.js +383 -1
  113. package/SOURCE-OFFER.txt +0 -9
package/src/art.js CHANGED
@@ -1,3 +1,291 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- "use strict";const{caps:caps,detect:detect,cells:cells,padCells:padCells}=require("./caps.js");function capsOf(t){return t?"string"==typeof t?detect(process.env,process.stdout,t):t:caps()}const WELCOME_MARK=["╔═╗╔═╗╔═╗╦╔═╗","╠═╣║╣ ║ ╦║╚═╗","╩ ╩╚═╝╚═╝╩╚═╝"],WELCOME_ART=WELCOME_MARK,WELCOME_ART_STACKED=WELCOME_MARK,WELCOME_TITLE="Welcome to AEGIS Code",WELCOME_BACK="Welcome back!",TAGLINE="Your intent, AI automated.",TAGLINE_SHORT="Your intent, automated.",STAR="✦",EDGE_RUNES=["▐","▛","▜","▌","▝","▘"],BOX_RUNES=["╔","╗","╚","╝","╠","╣","╦","╩","║","═"],BOX_STENCIL=new Map([...["╔","╗","╚","╝","╠","╣","╦","╩"].map((t=>[t,"+"])),["═","-"],["║","|"]]),ASCII_STENCIL=new Map([...BOX_STENCIL,["█","#"],["▓","@"],["▒","="],["░","."],...EDGE_RUNES.map((t=>[t,"#"])),["✦","*"],["·","."]]),EDGE_STENCIL=new Map(EDGE_RUNES.map((t=>[t,"#"]))),STAR_STENCIL=new Map([["✦","*"]]),STENCILS={ascii:ASCII_STENCIL,edges:EDGE_STENCIL,star:STAR_STENCIL},PASSES=["native","star","edges","ascii"];function stencilFor(t=null){const e=capsOf(t);if("ascii"===e.glyphs)return ASCII_STENCIL;const E=new Map;if("edges"===e.face)for(const[t,e]of EDGE_STENCIL)E.set(t,e);if("narrow"===e.star)for(const[t,e]of STAR_STENCIL)E.set(t,e);return E.size?E:null}function stencilGlyph(t,e=null){const E=stencilFor(e);return E&&E.get(t)||t}function portabilityFor(t,e=null){const E=stencilFor(e);return E?t.map((t=>[...t].map((t=>E.get(t)??t)).join(""))):t}function portability(t){return portabilityFor(t,null)}function welcomeArtFor(){return portability(WELCOME_ART)}function welcomeArtParts(){const t=portability(WELCOME_MARK);return{rows:t.map((t=>[t,""])),width:Math.max(...t.map(cells)),gutter:0}}function center(t,e){return t.map((t=>{const E=Math.max(0,Math.floor((e-cells(t))/2));return" ".repeat(E)+padCells(t,e-E)}))}function padBoth(t,e){const E=Math.max(...t.map(cells));return t.map((t=>{const r=Math.floor((e-E)/2);return" ".repeat(Math.max(0,r))+t}))}module.exports={WELCOME_MARK:WELCOME_MARK,WELCOME_ART:WELCOME_ART,WELCOME_ART_STACKED:WELCOME_ART_STACKED,WELCOME_TITLE:WELCOME_TITLE,WELCOME_BACK:WELCOME_BACK,TAGLINE:TAGLINE,TAGLINE_SHORT:TAGLINE_SHORT,STAR:"✦",EDGE_RUNES:EDGE_RUNES,BOX_RUNES:BOX_RUNES,PASSES:PASSES,STENCILS:STENCILS,stencilFor:stencilFor,stencilGlyph:stencilGlyph,portability:portability,portabilityFor:portabilityFor,welcomeArtFor:welcomeArtFor,welcomeArtParts:welcomeArtParts,center:center,padBoth:padBoth};
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
+ const { caps, detect, cells, padCells } = require('./caps.js');
9
+
10
+ /**
11
+ * Resolve a stencil target — nothing at all, a `process.platform` name, or a
12
+ * whole caps object — to the capabilities that decide the pass.
13
+ *
14
+ * A platform *name* is still accepted because it is the shape a test wants when
15
+ * it is asking "what would the mark look like on that host?"; it is resolved
16
+ * through the same `detect()` the live process uses, so a platform string is a
17
+ * convenience alias for a capability probe, never a second decision path. Under
18
+ * the uniform policy `detect()` ignores the platform it is handed, so
19
+ * `capsOf('win32')` and `capsOf('linux')` return the same axes — which is the
20
+ * point, and is asserted by `test/cli-terminal-caps.test.mjs`.
21
+ */
22
+ function capsOf(target) {
23
+ if (!target) return caps();
24
+ if (typeof target === 'string') return detect(process.env, process.stdout, target);
25
+ return target;
26
+ }
27
+
28
+ /**
29
+ * Welcome art — the ÆGIS wordmark, adopted verbatim from `aegiscodex-`.
30
+ *
31
+ * This is the mark the rest of the family already draws: the wordmark block in
32
+ * `aegiscodex-/src/ui/components/layout/WelcomeMessage.tsx`, which is kept in
33
+ * sync with `aegiscodex-/assets/demo.svg`, the canonical rendering. The CLI now
34
+ * shows the same welcome screen as the desktop host instead of its own art.
35
+ *
36
+ * It REPLACES the earlier Claude-binary composition (feather plume, top hat,
37
+ * ▐▛███▜▌ face, crescent moon, diving whale). That mark was three blocks joined
38
+ * side by side, which is why this file carried a stacking path, a `✦` star pass
39
+ * and a two-ink split; a single 13-cell block needs none of them, so the banner
40
+ * draws it in one ink — gold — exactly as `theme.colors.primary` inks it in the
41
+ * desktop, and the wide/narrow branch in both consumers now always takes the
42
+ * wide path.
43
+ *
44
+ * Every row is the same display width with no trailing blank, so `center()` and
45
+ * `padCells()` stay exact. `test/cli-conformance.test.mjs` pins these rows to
46
+ * the literals they were lifted from, so the mark cannot drift from aegiscodex-.
47
+ *
48
+ * Which stencil pass is applied is decided by the terminal's capabilities, not
49
+ * by `process.platform` — see the portability section below and `caps.js`.
50
+ */
51
+
52
+ // The ÆGIS wordmark: 3 rows × 13 cells, uniform. Row 1 is the cap line, row 2
53
+ // carries the Æ crossbar (╦) and the G/S shoulders, row 3 the baseline.
54
+ //
55
+ // Deliberately not named after the old spaced `'A E G I S'` string: that
56
+ // export was removed and `cli-conformance.test.mjs` fails the build if its name
57
+ // reappears in this file's exports. The guard is about that string, not this
58
+ // block, so the block takes a name of its own rather than the guard being
59
+ // loosened to accommodate it.
60
+ const WELCOME_MARK = [
61
+ '╔═╗╔═╗╔═╗╦╔═╗',
62
+ '╠═╣║╣ ║ ╦║╚═╗',
63
+ '╩ ╩╚═╝╚═╝╩╚═╝',
64
+ ];
65
+
66
+ /** The welcome mark: the wordmark, with nothing drawn beside it. */
67
+ const WELCOME_ART = WELCOME_MARK;
68
+
69
+ /**
70
+ * There is no stacked variant any more: the mark is 13 cells, so it fits any
71
+ * terminal that can draw the banner's own frame. Kept as an alias rather than
72
+ * deleted because `welcomeArtFor()` and the capability matrix enumerate both
73
+ * names, and a second constant that happens to equal the first is cheaper than
74
+ * a branch in two consumers.
75
+ */
76
+ const WELCOME_ART_STACKED = WELCOME_MARK;
77
+
78
+ /** Welcome copy, in aegiscode-dev's frame: coral title over the mark. */
79
+ const WELCOME_TITLE = 'Welcome to AEGIS Code';
80
+ const WELCOME_BACK = 'Welcome back!';
81
+ // One owner for the tagline: `render.js` joins it into the banner's version
82
+ // line and `screens.js` centres it on the welcome screen. It used to be written
83
+ // out twice — once here, once inline in `screens.js` — so a copy change landed
84
+ // in one place and left the other stale.
85
+ const TAGLINE = 'Your intent, AI automated.';
86
+ // For terminals too narrow for the full line. `centered()` clips rather than
87
+ // wraps, and a truncated tagline reads as a rendering fault, so this is a real
88
+ // fallback and not a stylistic variant.
89
+ const TAGLINE_SHORT = 'Your intent, automated.';
90
+
91
+ // ── Terminal portability ─────────────────────────────────────────────────────
92
+ // The wordmark is drawn with U+2550 box-drawing runes, which are single-width on
93
+ // essentially every terminal in use. Each pass swaps offending code points 1:1
94
+ // (same character count per row) so the width maths stays exact and the mark
95
+ // keeps its shape.
96
+ //
97
+ // A pass is applied when the user ASKS for one — `AEGIS_ART=ascii` for a font
98
+ // with no box-drawing or block range, `AEGIS_STAR=narrow` for a font that
99
+ // renders ✦ through a two-cell emoji fallback. It is never triggered by the
100
+ // host: `process.platform`, `TERM`, `TERM_PROGRAM`, `WT_SESSION` and the
101
+ // locale's character set are probed and reported by `caps.js` and then
102
+ // deliberately ignored, because a font that lacks the runes is something only
103
+ // the person looking at the screen can settle. Previously PowerShell outside
104
+ // Windows Terminal, Terminal.app and any `LANG=C` shell each silently got a
105
+ // different mark from the same build.
106
+ //
107
+ // The passes still compose rather than being picked one-of-three, because the
108
+ // two overrides are independent: `AEGIS_STAR=narrow` alone gives a native block
109
+ // palette with a single-column star, which no single flat table could express.
110
+ //
111
+ // This table is the ONE stencil source of truth for the product. `theme.js`
112
+ // resolves `GLYPH.star` through `stencilGlyph(STAR, caps)` rather than carrying
113
+ // its own `'✦' → '*'` rule, and `render.js` builds the mark's tint map by
114
+ // stencilling its runes — both had a private copy of the same decision, which
115
+ // is how a stencil edit here could leave the star wide on one host and the mark
116
+ // untinted on another. `test/cli-terminal-caps.test.mjs` pins all of it.
117
+ const STAR = '✦';
118
+
119
+ /** The quartile/quadrant face edges. The wordmark no longer draws them, but the
120
+ * `face` capability still resolves through this list, so the pass stays. */
121
+ const EDGE_RUNES = ['▐', '▛', '▜', '▌', '▝', '▘'];
122
+
123
+ /**
124
+ * The box-drawing runes the wordmark is made of. A legacy console has none of
125
+ * them, and without a mapping the mark would be drawn in a font that has no
126
+ * glyphs for it — boxes of tofu where the product name should be.
127
+ *
128
+ * Every corner, tee and cross becomes `+` (the classic ASCII box) and the two
129
+ * straight strokes keep their meaning as `-` and `|`, so the stencilled mark is
130
+ * still legible as ÆGIS rather than as a row of plusses. Ten runes, ten 1:1
131
+ * swaps: the mark stays 13 cells wide and 3 rows tall on every terminal.
132
+ */
133
+ const BOX_RUNES = ['╔', '╗', '╚', '╝', '╠', '╣', '╦', '╩', '║', '═'];
134
+ const BOX_STENCIL = new Map([
135
+ ...['╔', '╗', '╚', '╝', '╠', '╣', '╦', '╩'].map((c) => [c, '+']),
136
+ ['═', '-'],
137
+ ['║', '|'],
138
+ ]);
139
+
140
+ /** Full ASCII pass: the wordmark's box runes, the block palette, the face
141
+ * edges, the star, the mid-dot. */
142
+ const ASCII_STENCIL = new Map([
143
+ ...BOX_STENCIL,
144
+ ['█', '#'],
145
+ ['▓', '@'],
146
+ ['▒', '='],
147
+ ['░', '.'],
148
+ ...EDGE_RUNES.map((c) => [c, '#']),
149
+ [STAR, '*'],
150
+ ['·', '.'],
151
+ ]);
152
+
153
+ /** Unicode pass for fonts that carry █▓▒░ but not the face edges (Apple, old Consolas). */
154
+ const EDGE_STENCIL = new Map(EDGE_RUNES.map((c) => [c, '#']));
155
+
156
+ /** ✦ alone: a font that falls back to a *two-cell* emoji glyph for it. */
157
+ const STAR_STENCIL = new Map([[STAR, '*']]);
158
+
159
+ /**
160
+ * The named passes. They compose rather than being picked one-of-three:
161
+ * `AEGIS_STAR=narrow` takes `star` only — a native block palette with a
162
+ * single-column star — and `AEGIS_ART=ascii` takes the full pass.
163
+ */
164
+ const STENCILS = { ascii: ASCII_STENCIL, edges: EDGE_STENCIL, star: STAR_STENCIL };
165
+
166
+ /**
167
+ * The capability classes this mark has a pass for, and the one that needs none.
168
+ * Kept as a name list so a caller (and the test) can enumerate the matrix
169
+ * without restating the pass table.
170
+ */
171
+ const PASSES = ['native', 'star', 'edges', 'ascii'];
172
+
173
+
174
+ /**
175
+ * The stencil for a terminal, or `null` when its runes need no pass.
176
+ *
177
+ * `glyphs: 'ascii'` is the full pass and subsumes the others — a terminal with
178
+ * no block glyphs certainly has no quartile edges and no ✦ either, so it must
179
+ * not be handed a partial map that leaves ░▒▓◧ on screen.
180
+ *
181
+ * @param {string|object|null} [target] a caps object, a `process.platform` name,
182
+ * or nothing for the live process's resolved capabilities.
183
+ * @returns {Map<string,string>|null}
184
+ */
185
+ function stencilFor(target = null) {
186
+ const c = capsOf(target);
187
+ if (c.glyphs === 'ascii') return ASCII_STENCIL;
188
+ const pass = new Map();
189
+ if (c.face === 'edges') for (const [k, v] of EDGE_STENCIL) pass.set(k, v);
190
+ if (c.star === 'narrow') for (const [k, v] of STAR_STENCIL) pass.set(k, v);
191
+ return pass.size ? pass : null;
192
+ }
193
+
194
+ /**
195
+ * One rune as the terminal renders it — the identity when it is native.
196
+ * Exported so `theme.js`'s glyph table and `render.js`'s tint map are derived
197
+ * from the stencil instead of restating it.
198
+ * @param {string} ch
199
+ * @param {string|object} [target] a caps object, a platform name, or nothing
200
+ */
201
+ function stencilGlyph(ch, target = null) {
202
+ const s = stencilFor(target);
203
+ return (s && s.get(ch)) || ch;
204
+ }
205
+
206
+ /** One pass over an art block, for an explicit target (caps object or platform). */
207
+ function portabilityFor(rows, target = null) {
208
+ const s = stencilFor(target);
209
+ if (!s) return rows;
210
+ return rows.map((r) => [...r].map((ch) => s.get(ch) ?? ch).join(''));
211
+ }
212
+
213
+ /**
214
+ * The mark as the terminal running this process will render it.
215
+ *
216
+ * Deliberately NOT memoised: `aegiscode --ascii` and `/terminal ascii` re-resolve
217
+ * the capabilities mid-session, and a cached mark would keep drawing the
218
+ * previous terminal's runes until the process restarted.
219
+ */
220
+ function portability(rows) {
221
+ return portabilityFor(rows, null);
222
+ }
223
+
224
+ /** The welcome mark, as this terminal will render it. */
225
+ function welcomeArtFor() {
226
+ return portability(WELCOME_ART);
227
+ }
228
+
229
+ /**
230
+ * The mark, ready for the banner: one row per output row, each as a
231
+ * `[left, right]` pair so the two consumers' ink split keeps working.
232
+ *
233
+ * The right half is always empty now. The pair shape is kept because
234
+ * `render.js`'s `artRow()` is built around it — `left` is painted gold, `right`
235
+ * per-shade — and collapsing it would mean a second, cosmetic signature for the
236
+ * same data. A future two-tone mark drops straight back into the right slot.
237
+ *
238
+ * The width argument the consumers used to pass is gone with the wide/narrow
239
+ * split: 13 cells fits everywhere the banner itself fits, so there is nothing
240
+ * left for the terminal's column count to decide.
241
+ *
242
+ * @returns {{rows: Array<[string,string]>, width: number, gutter: number}}
243
+ */
244
+ function welcomeArtParts() {
245
+ const rows = portability(WELCOME_MARK);
246
+ return {
247
+ rows: rows.map((r) => [r, '']),
248
+ width: Math.max(...rows.map(cells)),
249
+ gutter: 0,
250
+ };
251
+ }
252
+
253
+ /** Centre every row of an art block inside `width` (left pad + right fill). */
254
+ function center(rows, width) {
255
+ return rows.map((r) => {
256
+ const pad = Math.max(0, Math.floor((width - cells(r)) / 2));
257
+ return ' '.repeat(pad) + padCells(r, width - pad);
258
+ });
259
+ }
260
+
261
+ /** Centre each row against the block's own max width (no trailing fill). */
262
+ function padBoth(rows, width) {
263
+ const w = Math.max(...rows.map(cells));
264
+ return rows.map((r) => {
265
+ const pad = Math.floor((width - w) / 2);
266
+ return ' '.repeat(Math.max(0, pad)) + r;
267
+ });
268
+ }
269
+
270
+ module.exports = {
271
+ WELCOME_MARK,
272
+ WELCOME_ART,
273
+ WELCOME_ART_STACKED,
274
+ WELCOME_TITLE,
275
+ WELCOME_BACK,
276
+ TAGLINE,
277
+ TAGLINE_SHORT,
278
+ STAR,
279
+ EDGE_RUNES,
280
+ BOX_RUNES,
281
+ PASSES,
282
+ STENCILS,
283
+ stencilFor,
284
+ stencilGlyph,
285
+ portability,
286
+ portabilityFor,
287
+ welcomeArtFor,
288
+ welcomeArtParts,
289
+ center,
290
+ padBoth,
291
+ };