aegisone 1.0.18 → 1.0.21
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/README.md +2 -2
- package/package.json +2 -1
- package/scripts/bump.mjs +29 -4
- package/scripts/predist.mjs +15 -2
- package/src/dispatch.js +1 -0
- package/vendor/cli/bin/aegiscode.js +41 -0
- package/vendor/cli/package.json +2 -1
- package/vendor/cli/scripts/predist.mjs +6 -3
- package/vendor/cli/src/app.js +436 -24
- package/vendor/cli/src/autonomous.js +19 -2
- package/vendor/cli/src/chatflow.js +77 -4
- package/vendor/cli/src/commands.js +220 -10
- package/vendor/cli/src/config.js +21 -0
- package/vendor/cli/src/connect.js +351 -0
- package/vendor/cli/src/deps.js +97 -1
- package/vendor/cli/src/engine.js +98 -8
- package/vendor/cli/src/fingerprint.js +46 -16
- package/vendor/cli/src/limits.js +1 -1
- package/vendor/cli/src/overlays.js +54 -0
- package/vendor/cli/src/provenance.lock.json +3 -3
- package/vendor/cli/src/screens.js +14 -1
- package/vendor/cli/src/update.js +103 -12
- package/vendor/cli/vendor/client/aegis.js +169 -3
- package/vendor/cli/vendor/client/credentials.js +9 -2
- package/vendor/cli/vendor/client/drive-connect.js +87 -0
- package/vendor/cli/vendor/client/drive-upload.js +176 -0
- package/vendor/cli/vendor/client/google-signin.js +127 -0
- package/vendor/cli/vendor/client/record-vault.js +431 -113
- package/vendor/cli/vendor/client/update.js +366 -8
- package/vendor/cli/vendor/desktop/lib/local/claude-pro.js +134 -11
- package/vendor/cli/vendor/desktop/lib/local/engine.js +111 -26
- package/vendor/cli/vendor/desktop/lib/local/prompt.js +67 -37
- package/vendor/cli/vendor/desktop/lib/local/tools.js +49 -13
- package/vendor/cli/vendor/desktop/lib/settings.js +65 -24
- package/vendor/desktop/lib/auto.js +11 -7
- package/vendor/desktop/lib/fingerprint.js +76 -17
- package/vendor/desktop/lib/google-connect.js +171 -0
- package/vendor/desktop/lib/local/claude-pro.js +134 -11
- package/vendor/desktop/lib/local/engine.js +111 -26
- package/vendor/desktop/lib/local/prompt.js +67 -37
- package/vendor/desktop/lib/local/tools.js +49 -13
- package/vendor/desktop/lib/settings.js +65 -24
- package/vendor/desktop/main.js +270 -36
- package/vendor/desktop/package.json +5 -2
- package/vendor/desktop/preload.js +45 -12
- package/vendor/desktop/renderer/app.js +691 -22
- package/vendor/desktop/renderer/budget.js +18 -9
- package/vendor/desktop/renderer/companion.js +225 -0
- package/vendor/desktop/renderer/fingerprint.css +16 -0
- package/vendor/desktop/renderer/fingerprint.js +136 -2
- package/vendor/desktop/renderer/index.html +302 -121
- package/vendor/desktop/renderer/provider-toolbar.js +136 -0
- package/vendor/desktop/renderer/providers.js +261 -0
- package/vendor/desktop/renderer/style.css +547 -171
- package/vendor/desktop/vendor/aegis.js +169 -3
- package/vendor/desktop/vendor/credentials.js +9 -2
- package/vendor/desktop/vendor/drive-connect.js +87 -0
- package/vendor/desktop/vendor/drive-upload.js +176 -0
- package/vendor/desktop/vendor/google-signin.js +127 -0
- package/vendor/desktop/vendor/record-vault.js +431 -113
- package/vendor/desktop/vendor/update.js +366 -8
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AEGISONE
|
|
2
2
|
|
|
3
|
-
Product version: **1.0.
|
|
3
|
+
Product version: **1.0.21**
|
|
4
4
|
|
|
5
5
|
One product, two faces: the terminal (`aegiscode`) and the window (`aegis-desktop`),
|
|
6
6
|
reached through one command — `aegis` — and released as one version.
|
|
@@ -60,7 +60,7 @@ fails, and it never leaves you with "nothing happened". Afterwards: `aegis`
|
|
|
60
60
|
|
|
61
61
|
## Size, measured not claimed
|
|
62
62
|
|
|
63
|
-
Measured size: **2.
|
|
63
|
+
Measured size: **2.31 MB** (2,424,639 bytes) with Electron absent — both faces inside.
|
|
64
64
|
|
|
65
65
|
The plan's "~2 MB" was a target, so it is measured here rather than published:
|
|
66
66
|
`npm pack one/` on this tree, with Electron absent, produces that tarball, and it
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aegisone",
|
|
3
3
|
"productName": "AEGISONE",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.21",
|
|
5
5
|
"description": "AEGISONE — one product, two faces. `aegis` opens the window when there is nothing else to do and runs the terminal otherwise; `aegiscode` keeps behaving exactly as it always has.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "AEGIS Code",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"predist": "node scripts/predist.mjs",
|
|
29
|
+
"prepack": "node scripts/predist.mjs --quiet",
|
|
29
30
|
"prepublishOnly": "npm run predist",
|
|
30
31
|
"bump": "node scripts/bump.mjs",
|
|
31
32
|
"compat": "node test/one-compat.test.mjs",
|
package/scripts/bump.mjs
CHANGED
|
@@ -60,7 +60,7 @@ export function bumpTargets(root) {
|
|
|
60
60
|
* Build the plan for a bump: read the four documents, compute every new version
|
|
61
61
|
* from the derivation, and hand back the exact new contents.
|
|
62
62
|
*
|
|
63
|
-
* @param {{root?: string, version: string, io?: object, read?: Function}} input
|
|
63
|
+
* @param {{root?: string, version: string, io?: object, read?: Function, repair?: boolean}} input
|
|
64
64
|
* @returns {{version: string, faces: object, files: Array<object>, changed: number}}
|
|
65
65
|
*/
|
|
66
66
|
export function plan(input) {
|
|
@@ -68,6 +68,7 @@ export function plan(input) {
|
|
|
68
68
|
const root = src.root || ROOT;
|
|
69
69
|
const read = src.read || ((abs) => fs.readFileSync(abs, 'utf8'));
|
|
70
70
|
const version = release.parseVersion(src.version).text;
|
|
71
|
+
const repair = src.repair === true;
|
|
71
72
|
|
|
72
73
|
const targets = bumpTargets(root);
|
|
73
74
|
const faces = release.deriveFaceVersions(version);
|
|
@@ -89,6 +90,16 @@ export function plan(input) {
|
|
|
89
90
|
// Refuse a tree that is already drifting: the manifests must equal what the
|
|
90
91
|
// derivation says for the product version they carry today, or a bump would
|
|
91
92
|
// launder the drift into "the new version".
|
|
93
|
+
//
|
|
94
|
+
// `repair: true` is the one exception, and it is narrow on purpose. It exists
|
|
95
|
+
// for the case that has actually happened: a face was bumped by hand and
|
|
96
|
+
// PUBLISHED (`aegiscode 7.0.11`) without the product moving, so the tree can
|
|
97
|
+
// only be made consistent going FORWARD — product 1.0.19 is what derives
|
|
98
|
+
// 7.0.11 again. Refusing here would leave the drift unreachable, since the
|
|
99
|
+
// script also refuses to run from it. What a repair may never do is move a
|
|
100
|
+
// face BACKWARDS: that would re-cut a published version, so each face's new
|
|
101
|
+
// number is checked against the one already on disk, not just against the
|
|
102
|
+
// derivation.
|
|
92
103
|
const currentProduct = JSON.parse(documents[0].content).version;
|
|
93
104
|
const expected = release.deriveFaceVersions(currentProduct);
|
|
94
105
|
for (const doc of documents.slice(2)) {
|
|
@@ -96,13 +107,23 @@ export function plan(input) {
|
|
|
96
107
|
const want = expected[name];
|
|
97
108
|
if (!want) throw new Error(`${doc.file}: unexpected package name ${JSON.stringify(name)}`);
|
|
98
109
|
const got = JSON.parse(doc.content).version;
|
|
99
|
-
if (got !== want.version) {
|
|
110
|
+
if (got !== want.version && !repair) {
|
|
100
111
|
throw new Error(
|
|
101
112
|
`${doc.file} carries ${name} ${got}, but product ${currentProduct} derives ${want.version} — ` +
|
|
102
113
|
'the tree is already inconsistent; run `node test/one-version.test.mjs` to see all of it, ' +
|
|
103
114
|
'then bump from a clean state'
|
|
104
115
|
);
|
|
105
116
|
}
|
|
117
|
+
if (repair) {
|
|
118
|
+
// A published number is never rewritten, by a bump or a repair.
|
|
119
|
+
const to = release.deriveFaceVersion(version, release.FACE_LINES.find((f) => f.package === name));
|
|
120
|
+
const gotCounter = release.releaseCounter(got);
|
|
121
|
+
if (release.releaseCounter(to) < gotCounter) {
|
|
122
|
+
throw new Error(
|
|
123
|
+
`repair would move ${name} backwards: ${got} -> ${to} — a published version is never re-cut`
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
106
127
|
}
|
|
107
128
|
|
|
108
129
|
const files = release.planBump({ version, documents });
|
|
@@ -125,16 +146,20 @@ export function main(argv, io) {
|
|
|
125
146
|
const errOut = o.stderr || process.stderr;
|
|
126
147
|
const args = (Array.isArray(argv) ? argv : []).map(String);
|
|
127
148
|
const dryRun = args.includes('--dry-run');
|
|
149
|
+
// `--repair` is the escape hatch for a tree whose face was bumped and
|
|
150
|
+
// published by hand. It is not implied by anything: without it, drift is
|
|
151
|
+
// still a hard error.
|
|
152
|
+
const repair = args.includes('--repair');
|
|
128
153
|
const positional = args.filter((a) => !a.startsWith('--'));
|
|
129
154
|
if (positional.length !== 1) {
|
|
130
|
-
errOut.write('usage: node one/scripts/bump.mjs <major|minor|patch|X.Y.Z> [--dry-run]\n');
|
|
155
|
+
errOut.write('usage: node one/scripts/bump.mjs <major|minor|patch|X.Y.Z> [--dry-run] [--repair]\n');
|
|
131
156
|
return 2;
|
|
132
157
|
}
|
|
133
158
|
|
|
134
159
|
let built;
|
|
135
160
|
try {
|
|
136
161
|
const current = JSON.parse(fs.readFileSync(path.join(ROOT, 'one', 'package.json'), 'utf8')).version;
|
|
137
|
-
built = plan({ root: ROOT, version: release.nextVersion(current, positional[0]) });
|
|
162
|
+
built = plan({ root: ROOT, version: release.nextVersion(current, positional[0]), repair });
|
|
138
163
|
} catch (error) {
|
|
139
164
|
errOut.write(`bump: ${(error && error.message) || error}\n`);
|
|
140
165
|
return 1;
|
package/scripts/predist.mjs
CHANGED
|
@@ -138,6 +138,12 @@ export const MANIFEST = [
|
|
|
138
138
|
note: 'the ONE place that decides which OS this is (Phase 30.1)' },
|
|
139
139
|
{ src: 'client/topup.js', shapes: ['mirror', 'flat'],
|
|
140
140
|
note: 'the token-bank top-up: amount bounds, the balance reading, and the credit watch every host drives' },
|
|
141
|
+
{ src: 'client/google-signin.js', shapes: ['mirror', 'flat'],
|
|
142
|
+
note: 'the localhost half of aegis1\'s desktop Google OAuth round-trip; `connect --google` drives it' },
|
|
143
|
+
{ src: 'client/drive-connect.js', shapes: ['mirror', 'flat'],
|
|
144
|
+
note: 'the desktop half of aegis1\'s Drive OAuth (/connect/drive, /api/drive/token); requires ./aegis.js only via the caller' },
|
|
145
|
+
{ src: 'client/drive-upload.js', shapes: ['mirror', 'flat'],
|
|
146
|
+
note: 'the Drive v3 REST wrapper that uploads the memory backup' },
|
|
141
147
|
|
|
142
148
|
// ── the MCP host surface ────────────────────────────────────────────────
|
|
143
149
|
{ src: 'mcp/tools.js', shapes: ['mirror'],
|
|
@@ -887,9 +893,16 @@ async function stageLocked({ want, log }) {
|
|
|
887
893
|
*/
|
|
888
894
|
export async function main(argv, io) {
|
|
889
895
|
const o = io || {};
|
|
890
|
-
const out = o.stdout || process.stdout;
|
|
891
|
-
const errOut = o.stderr || process.stderr;
|
|
892
896
|
const args = Array.isArray(argv) ? argv : [];
|
|
897
|
+
// `--quiet` is not cosmetic: `prepack` runs this stager, and `npm pack --json`
|
|
898
|
+
// interleaves hook stdout with its own JSON report. A caller that parses that
|
|
899
|
+
// report (`test/one-pack-boot.test.mjs`) gets the progress lines instead of
|
|
900
|
+
// JSON and fails. So the progress stream is silenced here rather than by
|
|
901
|
+
// every caller remembering to.
|
|
902
|
+
const quiet = args.includes('--quiet');
|
|
903
|
+
const sink = { write: () => true };
|
|
904
|
+
const out = quiet ? sink : o.stdout || process.stdout;
|
|
905
|
+
const errOut = o.stderr || process.stderr;
|
|
893
906
|
let shapes;
|
|
894
907
|
if (args.includes('--mirror-only')) shapes = ['mirror'];
|
|
895
908
|
else if (args.includes('--flat-only')) shapes = ['flat', 'nested'];
|
package/src/dispatch.js
CHANGED
|
@@ -42,6 +42,11 @@ Usage:
|
|
|
42
42
|
echo "q" | aegiscode -p - read the prompt from stdin
|
|
43
43
|
|
|
44
44
|
Account:
|
|
45
|
+
aegiscode connect sign this machine in — registers a device account
|
|
46
|
+
if it has none (idempotent per machine), and that
|
|
47
|
+
key is what cloud memory and the record vault use
|
|
48
|
+
aegiscode connect --status is this machine connected? (--json; exit 1 if not)
|
|
49
|
+
aegiscode connect --logout sign out (forget the saved key here)
|
|
45
50
|
aegiscode login [<key>] save your AEGIS API key (prompts, no echo, if omitted)
|
|
46
51
|
aegiscode logout remove the saved key
|
|
47
52
|
aegiscode key status show which key is in use and where it came from
|
|
@@ -89,6 +94,11 @@ Provenance (this binary, and whether it is still the published one):
|
|
|
89
94
|
|
|
90
95
|
Options:
|
|
91
96
|
-m, --model <id> pin a model id (see /models; default: server choice)
|
|
97
|
+
--class <name> run this turn on aegis|byok|local|pro. The one-shot
|
|
98
|
+
path had no way to state a class, so '-p' always ran
|
|
99
|
+
the pooled route (DEFAULT_CLASS) no matter what was
|
|
100
|
+
pinned — a headless turn could not use a BYOK key at
|
|
101
|
+
all. '--class byok' needs '--model <provider>:<model>'.
|
|
92
102
|
--base <url> API base (default $AEGIS_API_BASE or aegiscloud.org)
|
|
93
103
|
--key <key> API key for THIS RUN only — it is not saved. Use
|
|
94
104
|
"aegiscode login" to store one for good.
|
|
@@ -123,6 +133,9 @@ function parseArgs(argv) {
|
|
|
123
133
|
base: null,
|
|
124
134
|
key: null,
|
|
125
135
|
json: false,
|
|
136
|
+
// No `--class` flag given: `null` (not DEFAULT_CLASS) so the stored config
|
|
137
|
+
// pin still wins, exactly as it does for a launch with no `--model`.
|
|
138
|
+
class: null,
|
|
126
139
|
stream: true,
|
|
127
140
|
maxTokens: undefined,
|
|
128
141
|
light: false,
|
|
@@ -202,6 +215,16 @@ function parseArgs(argv) {
|
|
|
202
215
|
opts.commandArg = sub;
|
|
203
216
|
opts.commandArgv = argv.slice(argv[1] && !argv[1].startsWith('-') ? 2 : 1);
|
|
204
217
|
argv = [];
|
|
218
|
+
} else if (head === 'connect') {
|
|
219
|
+
// Same position-0 rule and the same passthrough as `gate`/`fingerprint`:
|
|
220
|
+
// everything after `connect` is the subcommand's (`--status`, `--logout`,
|
|
221
|
+
// `--app`, `--base`), so the tail is handed over verbatim — and a bare
|
|
222
|
+
// `connect` means "sign this machine in", which is the thing a new user
|
|
223
|
+
// actually needs, not a help page.
|
|
224
|
+
opts.command = 'connect';
|
|
225
|
+
opts.commandArg = null;
|
|
226
|
+
opts.commandArgv = argv.slice(1);
|
|
227
|
+
argv = [];
|
|
205
228
|
} else if (head === 'provenance') {
|
|
206
229
|
// Same position-0 rule and the same reason as `gate`: it is a one-shot
|
|
207
230
|
// question about THIS BINARY, not a prompt that happens to start with the
|
|
@@ -246,6 +269,9 @@ function parseArgs(argv) {
|
|
|
246
269
|
case '--model':
|
|
247
270
|
opts.model = next();
|
|
248
271
|
break;
|
|
272
|
+
case '--class':
|
|
273
|
+
opts.class = next();
|
|
274
|
+
break;
|
|
249
275
|
case '--base':
|
|
250
276
|
opts.base = next();
|
|
251
277
|
break;
|
|
@@ -632,6 +658,20 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
632
658
|
});
|
|
633
659
|
}
|
|
634
660
|
|
|
661
|
+
// Signing this machine in (and registering it, on a fresh install). Before a
|
|
662
|
+
// session is built, for the same reason `fingerprint` is: it is a one-shot
|
|
663
|
+
// question with a scriptable answer, and it must work with no terminal at all
|
|
664
|
+
// — the first-run prompt, CI, and `aegiscode connect --status` in a health
|
|
665
|
+
// check all need it without a TUI.
|
|
666
|
+
if (opts.command === 'connect') {
|
|
667
|
+
const { runConnect } = require('../src/connect.js');
|
|
668
|
+
return runConnect(opts.commandArgv || [], {
|
|
669
|
+
json: opts.json,
|
|
670
|
+
stdout: process.stdout,
|
|
671
|
+
stderr: process.stderr,
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
|
|
635
675
|
// The agent-key gate on aegiscodex-dev / aegiscode-plugin. Dispatched here,
|
|
636
676
|
// before a session is built, for the same reason `fingerprint` is: it is a
|
|
637
677
|
// one-shot administrative question ("can this machine edit that tree?"),
|
|
@@ -797,6 +837,7 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
797
837
|
|
|
798
838
|
const app = createApp({
|
|
799
839
|
model: opts.model,
|
|
840
|
+
class: opts.class,
|
|
800
841
|
stream: opts.stream,
|
|
801
842
|
light: opts.light,
|
|
802
843
|
maxTokens: opts.maxTokens,
|
package/vendor/cli/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aegiscode",
|
|
3
3
|
"productName": "AEGIS Code",
|
|
4
|
-
"version": "7.0.
|
|
4
|
+
"version": "7.0.13",
|
|
5
5
|
"description": "aegiscode — the command-line version of AEGIS Desktop. The shared tool surface in your shell, over the same thin transport and tool registry as the MCP plugin and the desktop app. Ships transport + UI only; no brain.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "AEGIS Code",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"scripts": {
|
|
27
27
|
"start": "node bin/aegiscode.js",
|
|
28
28
|
"predist": "node scripts/predist.mjs",
|
|
29
|
+
"prepack": "node scripts/predist.mjs --quiet",
|
|
29
30
|
"prepublishOnly": "npm run predist",
|
|
30
31
|
"precheck": "node scripts/predist.mjs",
|
|
31
32
|
"check": "node scripts/check.mjs",
|
|
@@ -37,7 +37,10 @@ import { sealGate } from './seal-gate.mjs';
|
|
|
37
37
|
const HERE = path.dirname(fileURLToPath(import.meta.url));
|
|
38
38
|
const SHARED = path.join(HERE, '..', '..', 'one', 'scripts', 'predist.mjs');
|
|
39
39
|
|
|
40
|
-
async function main() {
|
|
40
|
+
async function main(argv) {
|
|
41
|
+
// `--quiet` is forwarded, not swallowed: `prepack` passes it so these
|
|
42
|
+
// progress lines do not corrupt `npm pack --json`; publishing keeps them.
|
|
43
|
+
const args = Array.isArray(argv) ? argv : process.argv.slice(2), quiet = args.includes('--quiet') ? ['--quiet'] : [];
|
|
41
44
|
const gate = sealGate();
|
|
42
45
|
if (!gate.ok && !process.env.AEGIS_ALLOW_UNSEALED) {
|
|
43
46
|
process.stderr.write(
|
|
@@ -65,11 +68,11 @@ async function main() {
|
|
|
65
68
|
);
|
|
66
69
|
return 1;
|
|
67
70
|
}
|
|
68
|
-
return shared.main(['--mirror-only']);
|
|
71
|
+
return shared.main(['--mirror-only', ...quiet]);
|
|
69
72
|
}
|
|
70
73
|
|
|
71
74
|
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
72
|
-
process.exitCode = await main();
|
|
75
|
+
process.exitCode = await main(process.argv.slice(2));
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
export { main, sealGate };
|