aegiscode 7.0.26 → 7.0.28

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 (118) hide show
  1. package/SOURCE-OFFER.txt +9 -0
  2. package/package.json +4 -7
  3. package/scripts/check.mjs +1 -52
  4. package/scripts/demo.mjs +1 -94
  5. package/scripts/predist.mjs +1 -75
  6. package/scripts/runtests.mjs +1 -56
  7. package/scripts/seal-gate.mjs +1 -74
  8. package/src/agents.js +1 -139
  9. package/src/app.js +1 -2957
  10. package/src/art.js +1 -289
  11. package/src/chatflow.js +1 -3023
  12. package/src/checkpoint.js +1 -90
  13. package/src/clipboard.js +1 -424
  14. package/src/cloudsync.js +1 -528
  15. package/src/commands.js +1 -4089
  16. package/src/config.js +1 -581
  17. package/src/connect.js +1 -349
  18. package/src/credentials.js +1 -33
  19. package/src/deps.js +1 -232
  20. package/src/devrun.js +1 -187
  21. package/src/diff.js +1 -333
  22. package/src/diffview.js +1 -296
  23. package/src/engine.js +1 -297
  24. package/src/entitlement.js +1 -355
  25. package/src/events.js +1 -707
  26. package/src/export.js +1 -67
  27. package/src/filepreview.js +1 -153
  28. package/src/fingerprint.js +1 -592
  29. package/src/format.js +1 -259
  30. package/src/fuzzy.js +1 -119
  31. package/src/history.js +1 -423
  32. package/src/init.js +1 -175
  33. package/src/input.js +1 -139
  34. package/src/keys.js +1 -183
  35. package/src/markdown.js +1 -306
  36. package/src/models.js +1 -507
  37. package/src/naming.js +1 -57
  38. package/src/overlays.js +1 -462
  39. package/src/panels.js +1 -1418
  40. package/src/ping.js +1 -226
  41. package/src/presence.js +1 -238
  42. package/src/render.js +1 -516
  43. package/src/screen.js +1 -518
  44. package/src/screens.js +1 -896
  45. package/src/secret.js +1 -59
  46. package/src/securefs.js +1 -359
  47. package/src/settings.js +1 -155
  48. package/src/shared.js +1 -52
  49. package/src/sharedpaths.js +1 -53
  50. package/src/signup.js +1 -156
  51. package/src/summarize.js +1 -95
  52. package/src/sysdiag.js +1 -585
  53. package/src/system.js +1 -40
  54. package/src/theme.js +1 -570
  55. package/src/title.js +1 -220
  56. package/src/todos.js +1 -115
  57. package/src/tokens.js +1 -263
  58. package/src/topup.js +1 -210
  59. package/src/update.js +1 -191
  60. package/vendor/client/aegis.js +1 -2441
  61. package/vendor/client/attest.js +1 -518
  62. package/vendor/client/authorship-key.js +1 -410
  63. package/vendor/client/auto-provision.js +1 -134
  64. package/vendor/client/brain-catalog.js +1 -268
  65. package/vendor/client/byok-catalog.js +1 -199
  66. package/vendor/client/catalog-client.js +1 -487
  67. package/vendor/client/conversation-export.js +1 -177
  68. package/vendor/client/credentials.js +1 -494
  69. package/vendor/client/device-fingerprint.js +1 -141
  70. package/vendor/client/drive-connect.js +1 -110
  71. package/vendor/client/drive-upload.js +1 -234
  72. package/vendor/client/env-file.js +1 -1273
  73. package/vendor/client/fingerprint.js +1 -1064
  74. package/vendor/client/foreign-memory.js +1 -669
  75. package/vendor/client/google-signin.js +1 -133
  76. package/vendor/client/hooks.js +1 -430
  77. package/vendor/client/model-discovery.js +1 -373
  78. package/vendor/client/naming.js +1 -283
  79. package/vendor/client/platform.js +1 -937
  80. package/vendor/client/prefs.js +1 -351
  81. package/vendor/client/presence-constants.js +1 -107
  82. package/vendor/client/presence.js +1 -438
  83. package/vendor/client/record-vault.js +3 -1055
  84. package/vendor/client/session-store.js +1 -575
  85. package/vendor/client/topup.js +1 -297
  86. package/vendor/client/touch.js +1 -458
  87. package/vendor/client/update.js +1 -763
  88. package/vendor/client/user-models.js +1 -381
  89. package/vendor/desktop/lib/local/agents.js +1 -105
  90. package/vendor/desktop/lib/local/attachments.js +1 -276
  91. package/vendor/desktop/lib/local/autonomous.js +1 -1045
  92. package/vendor/desktop/lib/local/claude-pro.js +1 -1028
  93. package/vendor/desktop/lib/local/context.js +1 -125
  94. package/vendor/desktop/lib/local/engine.js +1 -3666
  95. package/vendor/desktop/lib/local/entitlement.js +1 -660
  96. package/vendor/desktop/lib/local/exec-plan.js +1 -269
  97. package/vendor/desktop/lib/local/git-scope.js +1 -228
  98. package/vendor/desktop/lib/local/integrity.js +1 -163
  99. package/vendor/desktop/lib/local/local.js +1 -2145
  100. package/vendor/desktop/lib/local/prompt.js +1 -280
  101. package/vendor/desktop/lib/local/queue.js +1 -560
  102. package/vendor/desktop/lib/local/session-rounds.js +1 -238
  103. package/vendor/desktop/lib/local/shell.js +1 -712
  104. package/vendor/desktop/lib/local/spill.js +1 -75
  105. package/vendor/desktop/lib/local/tools.js +1 -1328
  106. package/vendor/desktop/lib/local/turn-guard.js +1 -300
  107. package/vendor/desktop/lib/local/worktree-lock.js +1 -235
  108. package/vendor/desktop/lib/settings.js +1 -890
  109. package/vendor/desktop/main.js +1 -4890
  110. package/vendor/desktop/renderer/usage.js +1 -1239
  111. package/vendor/hosts/install.js +1 -638
  112. package/vendor/hosts/openai-shim.js +1 -515
  113. package/vendor/hosts/spec.js +1 -164
  114. package/vendor/hosts/targets.js +1 -346
  115. package/vendor/mcp/server.js +1 -221
  116. package/vendor/mcp/tools.js +1 -408
  117. package/vendor/one/src/child.js +1 -285
  118. package/vendor/one/src/permissions.js +1 -383
package/src/art.js CHANGED
@@ -1,291 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
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
- 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
- };
3
+ const{caps:t,detect:e,cells:n,padCells:r}=require("./caps.js"),o=["╔═╗╔═╗╔═╗╦╔═╗","╠═╣║╣ ║ ╦║╚═╗","╩ ╩╚═╝╚═╝╩╚═╝"],a=o,s=o,c=["▐","▛","▜","▌","▝","▘"],u=new Map([...["╔","╗","╚","╝","╠","╣","╦","╩"].map((t=>[t,"+"])),["═","-"],["║","|"]]),i=new Map([...u,["█","#"],["▓","@"],["▒","="],["░","."],...c.map((t=>[t,"#"])),["✦","*"],["·","."]]),p=new Map(c.map((t=>[t,"#"]))),l=new Map([["✦","*"]]),m={ascii:i,edges:p,star:l};function E(n=null){const r=function(n){return n?"string"==typeof n?e(process.env,process.stdout,n):n:t()}(n);if("ascii"===r.glyphs)return i;const o=new Map;if("edges"===r.face)for(const[t,e]of p)o.set(t,e);if("narrow"===r.star)for(const[t,e]of l)o.set(t,e);return o.size?o:null}function f(t,e=null){const n=E(e);return n?t.map((t=>[...t].map((t=>n.get(t)??t)).join(""))):t}function M(t){return f(t,null)}module.exports={WELCOME_MARK:o,WELCOME_ART:a,WELCOME_ART_STACKED:s,WELCOME_TITLE:"Welcome to AEGIS Code",WELCOME_BACK:"Welcome back!",TAGLINE:"Your intent, AI automated.",TAGLINE_SHORT:"Your intent, automated.",STAR:"✦",EDGE_RUNES:c,BOX_RUNES:["╔","╗","╚","╝","╠","╣","╦","╩","║","═"],PASSES:["native","star","edges","ascii"],STENCILS:m,stencilFor:E,stencilGlyph:function(t,e=null){const n=E(e);return n&&n.get(t)||t},portability:M,portabilityFor:f,welcomeArtFor:function(){return M(a)},welcomeArtParts:function(){const t=M(o);return{rows:t.map((t=>[t,""])),width:Math.max(...t.map(n)),gutter:0}},center:function(t,e){return t.map((t=>{const o=Math.max(0,Math.floor((e-n(t))/2));return" ".repeat(o)+r(t,e-o)}))},padBoth:function(t,e){const r=Math.max(...t.map(n));return t.map((t=>{const n=Math.floor((e-r)/2);return" ".repeat(Math.max(0,n))+t}))}};