aegisone 1.0.18 → 1.0.20

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 (48) hide show
  1. package/README.md +2 -2
  2. package/package.json +1 -1
  3. package/scripts/bump.mjs +29 -4
  4. package/scripts/predist.mjs +2 -0
  5. package/src/dispatch.js +1 -0
  6. package/vendor/cli/bin/aegiscode.js +29 -0
  7. package/vendor/cli/package.json +1 -1
  8. package/vendor/cli/src/app.js +335 -24
  9. package/vendor/cli/src/autonomous.js +19 -2
  10. package/vendor/cli/src/chatflow.js +77 -4
  11. package/vendor/cli/src/commands.js +175 -5
  12. package/vendor/cli/src/config.js +21 -0
  13. package/vendor/cli/src/connect.js +351 -0
  14. package/vendor/cli/src/deps.js +97 -1
  15. package/vendor/cli/src/engine.js +98 -8
  16. package/vendor/cli/src/fingerprint.js +46 -16
  17. package/vendor/cli/src/limits.js +1 -1
  18. package/vendor/cli/src/overlays.js +54 -0
  19. package/vendor/cli/src/provenance.lock.json +3 -3
  20. package/vendor/cli/src/screens.js +14 -1
  21. package/vendor/cli/vendor/client/credentials.js +9 -2
  22. package/vendor/cli/vendor/client/google-signin.js +127 -0
  23. package/vendor/cli/vendor/client/record-vault.js +431 -113
  24. package/vendor/cli/vendor/client/update.js +266 -0
  25. package/vendor/cli/vendor/desktop/lib/local/claude-pro.js +134 -11
  26. package/vendor/cli/vendor/desktop/lib/local/engine.js +47 -25
  27. package/vendor/cli/vendor/desktop/lib/settings.js +65 -24
  28. package/vendor/desktop/lib/auto.js +11 -7
  29. package/vendor/desktop/lib/fingerprint.js +76 -17
  30. package/vendor/desktop/lib/local/claude-pro.js +134 -11
  31. package/vendor/desktop/lib/local/engine.js +47 -25
  32. package/vendor/desktop/lib/settings.js +65 -24
  33. package/vendor/desktop/main.js +79 -24
  34. package/vendor/desktop/package.json +4 -2
  35. package/vendor/desktop/preload.js +31 -12
  36. package/vendor/desktop/renderer/app.js +676 -17
  37. package/vendor/desktop/renderer/budget.js +18 -9
  38. package/vendor/desktop/renderer/companion.js +225 -0
  39. package/vendor/desktop/renderer/fingerprint.css +16 -0
  40. package/vendor/desktop/renderer/fingerprint.js +62 -2
  41. package/vendor/desktop/renderer/index.html +285 -121
  42. package/vendor/desktop/renderer/provider-toolbar.js +136 -0
  43. package/vendor/desktop/renderer/providers.js +261 -0
  44. package/vendor/desktop/renderer/style.css +547 -171
  45. package/vendor/desktop/vendor/credentials.js +9 -2
  46. package/vendor/desktop/vendor/google-signin.js +127 -0
  47. package/vendor/desktop/vendor/record-vault.js +431 -113
  48. package/vendor/desktop/vendor/update.js +266 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AEGISONE
2
2
 
3
- Product version: **1.0.18**
3
+ Product version: **1.0.20**
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.24 MB** (2,349,905 bytes) with Electron absent — both faces inside.
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.18",
4
+ "version": "1.0.20",
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",
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;
@@ -138,6 +138,8 @@ 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' },
141
143
 
142
144
  // ── the MCP host surface ────────────────────────────────────────────────
143
145
  { src: 'mcp/tools.js', shapes: ['mirror'],
package/src/dispatch.js CHANGED
@@ -72,6 +72,7 @@ const FACE_ENV = 'AEGISONE_FACE';
72
72
  */
73
73
  const TUI_VERBS = new Set([
74
74
  'login',
75
+ 'connect',
75
76
  'logout',
76
77
  'key',
77
78
  'mcp',
@@ -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
@@ -202,6 +207,16 @@ function parseArgs(argv) {
202
207
  opts.commandArg = sub;
203
208
  opts.commandArgv = argv.slice(argv[1] && !argv[1].startsWith('-') ? 2 : 1);
204
209
  argv = [];
210
+ } else if (head === 'connect') {
211
+ // Same position-0 rule and the same passthrough as `gate`/`fingerprint`:
212
+ // everything after `connect` is the subcommand's (`--status`, `--logout`,
213
+ // `--app`, `--base`), so the tail is handed over verbatim — and a bare
214
+ // `connect` means "sign this machine in", which is the thing a new user
215
+ // actually needs, not a help page.
216
+ opts.command = 'connect';
217
+ opts.commandArg = null;
218
+ opts.commandArgv = argv.slice(1);
219
+ argv = [];
205
220
  } else if (head === 'provenance') {
206
221
  // Same position-0 rule and the same reason as `gate`: it is a one-shot
207
222
  // question about THIS BINARY, not a prompt that happens to start with the
@@ -632,6 +647,20 @@ async function main(argv = process.argv.slice(2)) {
632
647
  });
633
648
  }
634
649
 
650
+ // Signing this machine in (and registering it, on a fresh install). Before a
651
+ // session is built, for the same reason `fingerprint` is: it is a one-shot
652
+ // question with a scriptable answer, and it must work with no terminal at all
653
+ // — the first-run prompt, CI, and `aegiscode connect --status` in a health
654
+ // check all need it without a TUI.
655
+ if (opts.command === 'connect') {
656
+ const { runConnect } = require('../src/connect.js');
657
+ return runConnect(opts.commandArgv || [], {
658
+ json: opts.json,
659
+ stdout: process.stdout,
660
+ stderr: process.stderr,
661
+ });
662
+ }
663
+
635
664
  // The agent-key gate on aegiscodex-dev / aegiscode-plugin. Dispatched here,
636
665
  // before a session is built, for the same reason `fingerprint` is: it is a
637
666
  // one-shot administrative question ("can this machine edit that tree?"),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aegiscode",
3
3
  "productName": "AEGIS Code",
4
- "version": "7.0.10",
4
+ "version": "7.0.12",
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",