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.
- package/package.json +7 -3
- package/scripts/check.mjs +52 -1
- package/scripts/demo.mjs +94 -1
- package/scripts/predist.mjs +75 -1
- package/scripts/runtests.mjs +56 -1
- package/scripts/seal-gate.mjs +74 -1
- package/src/agents.js +139 -1
- package/src/app.js +2957 -1
- package/src/art.js +289 -1
- package/src/chatflow.js +3023 -1
- package/src/checkpoint.js +90 -1
- package/src/clipboard.js +424 -1
- package/src/cloudsync.js +528 -1
- package/src/commands.js +4089 -1
- package/src/config.js +581 -1
- package/src/connect.js +349 -1
- package/src/credentials.js +33 -1
- package/src/deps.js +232 -1
- package/src/devrun.js +187 -1
- package/src/diff.js +333 -1
- package/src/diffview.js +296 -1
- package/src/engine.js +297 -1
- package/src/entitlement.js +355 -1
- package/src/events.js +707 -1
- package/src/export.js +67 -1
- package/src/filepreview.js +153 -1
- package/src/fingerprint.js +592 -1
- package/src/format.js +259 -1
- package/src/fuzzy.js +119 -1
- package/src/history.js +423 -1
- package/src/init.js +175 -1
- package/src/input.js +139 -1
- package/src/keys.js +183 -1
- package/src/markdown.js +306 -1
- package/src/models.js +507 -1
- package/src/naming.js +57 -1
- package/src/overlays.js +462 -1
- package/src/panels.js +1418 -1
- package/src/ping.js +226 -1
- package/src/presence.js +238 -1
- package/src/render.js +516 -1
- package/src/screen.js +518 -1
- package/src/screens.js +896 -1
- package/src/secret.js +59 -1
- package/src/securefs.js +359 -1
- package/src/settings.js +155 -1
- package/src/shared.js +52 -1
- package/src/sharedpaths.js +53 -1
- package/src/signup.js +156 -1
- package/src/summarize.js +95 -1
- package/src/sysdiag.js +585 -1
- package/src/system.js +40 -1
- package/src/theme.js +570 -1
- package/src/title.js +220 -1
- package/src/todos.js +115 -1
- package/src/tokens.js +263 -1
- package/src/topup.js +210 -1
- package/src/update.js +191 -1
- package/vendor/client/aegis.js +2441 -1
- package/vendor/client/attest.js +518 -1
- package/vendor/client/authorship-key.js +410 -1
- package/vendor/client/auto-provision.js +134 -1
- package/vendor/client/brain-catalog.js +268 -1
- package/vendor/client/byok-catalog.js +199 -1
- package/vendor/client/catalog-client.js +487 -1
- package/vendor/client/conversation-export.js +177 -1
- package/vendor/client/credentials.js +494 -1
- package/vendor/client/device-fingerprint.js +141 -1
- package/vendor/client/drive-connect.js +110 -1
- package/vendor/client/drive-upload.js +234 -1
- package/vendor/client/env-file.js +1273 -1
- package/vendor/client/fingerprint.js +1064 -1
- package/vendor/client/foreign-memory.js +669 -1
- package/vendor/client/google-signin.js +133 -1
- package/vendor/client/hooks.js +430 -1
- package/vendor/client/model-discovery.js +373 -1
- package/vendor/client/naming.js +283 -1
- package/vendor/client/platform.js +937 -1
- package/vendor/client/prefs.js +351 -1
- package/vendor/client/presence-constants.js +107 -1
- package/vendor/client/presence.js +438 -1
- package/vendor/client/record-vault.js +1055 -3
- package/vendor/client/session-store.js +575 -1
- package/vendor/client/topup.js +297 -1
- package/vendor/client/touch.js +458 -1
- package/vendor/client/update.js +763 -1
- package/vendor/client/user-models.js +381 -1
- package/vendor/desktop/lib/local/agents.js +105 -1
- package/vendor/desktop/lib/local/attachments.js +276 -1
- package/vendor/desktop/lib/local/autonomous.js +1045 -1
- package/vendor/desktop/lib/local/claude-pro.js +1028 -1
- package/vendor/desktop/lib/local/context.js +125 -1
- package/vendor/desktop/lib/local/engine.js +3666 -1
- package/vendor/desktop/lib/local/entitlement.js +660 -1
- package/vendor/desktop/lib/local/git-scope.js +228 -1
- package/vendor/desktop/lib/local/local.js +2145 -1
- package/vendor/desktop/lib/local/prompt.js +280 -1
- package/vendor/desktop/lib/local/queue.js +560 -1
- package/vendor/desktop/lib/local/session-rounds.js +238 -1
- package/vendor/desktop/lib/local/spill.js +75 -1
- package/vendor/desktop/lib/local/turn-guard.js +300 -1
- package/vendor/desktop/lib/local/worktree-lock.js +235 -1
- package/vendor/desktop/lib/settings.js +890 -1
- package/vendor/desktop/renderer/usage.js +1239 -1
- package/vendor/hosts/install.js +638 -1
- package/vendor/hosts/openai-shim.js +515 -1
- package/vendor/hosts/spec.js +164 -1
- package/vendor/hosts/targets.js +346 -1
- package/vendor/mcp/server.js +221 -1
- package/vendor/mcp/tools.js +408 -1
- package/vendor/one/src/child.js +285 -1
- package/vendor/one/src/permissions.js +383 -1
- 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
|
-
|
|
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
|
+
};
|