aegis-desktop 1.0.27 → 1.0.29

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 (138) hide show
  1. package/lib/local/integrity.js +1 -1
  2. package/main.js +67 -1
  3. package/package.json +1 -1
  4. package/vendor/faces/cli/LICENSE +661 -0
  5. package/vendor/faces/cli/README.md +784 -0
  6. package/vendor/faces/cli/bin/aegiscode.js +20 -0
  7. package/vendor/faces/cli/package.json +44 -0
  8. package/vendor/faces/cli/scripts/check.mjs +4 -0
  9. package/vendor/faces/cli/scripts/demo.mjs +4 -0
  10. package/vendor/faces/cli/scripts/predist.mjs +4 -0
  11. package/vendor/faces/cli/scripts/runtests.mjs +4 -0
  12. package/vendor/faces/cli/scripts/seal-gate.mjs +3 -0
  13. package/vendor/faces/cli/src/agents.js +3 -0
  14. package/vendor/faces/cli/src/app.js +3 -0
  15. package/vendor/faces/cli/src/art.js +3 -0
  16. package/vendor/faces/cli/src/autonomous.js +3 -0
  17. package/vendor/faces/cli/src/caps.js +3 -0
  18. package/vendor/faces/cli/src/chatflow.js +3 -0
  19. package/vendor/faces/cli/src/checkpoint.js +3 -0
  20. package/vendor/faces/cli/src/clipboard.js +3 -0
  21. package/vendor/faces/cli/src/cloudsync.js +3 -0
  22. package/vendor/faces/cli/src/commands.js +3 -0
  23. package/vendor/faces/cli/src/config.js +3 -0
  24. package/vendor/faces/cli/src/connect.js +3 -0
  25. package/vendor/faces/cli/src/credentials.js +3 -0
  26. package/vendor/faces/cli/src/deps.js +3 -0
  27. package/vendor/faces/cli/src/devrun.js +3 -0
  28. package/vendor/faces/cli/src/diff.js +3 -0
  29. package/vendor/faces/cli/src/diffview.js +3 -0
  30. package/vendor/faces/cli/src/engine.js +3 -0
  31. package/vendor/faces/cli/src/entitlement.js +3 -0
  32. package/vendor/faces/cli/src/events.js +3 -0
  33. package/vendor/faces/cli/src/export.js +3 -0
  34. package/vendor/faces/cli/src/filepreview.js +3 -0
  35. package/vendor/faces/cli/src/fingerprint.js +3 -0
  36. package/vendor/faces/cli/src/format.js +3 -0
  37. package/vendor/faces/cli/src/fuzzy.js +3 -0
  38. package/vendor/faces/cli/src/gate.js +3 -0
  39. package/vendor/faces/cli/src/history.js +3 -0
  40. package/vendor/faces/cli/src/init.js +3 -0
  41. package/vendor/faces/cli/src/input.js +3 -0
  42. package/vendor/faces/cli/src/keys.js +3 -0
  43. package/vendor/faces/cli/src/limits.js +3 -0
  44. package/vendor/faces/cli/src/markdown.js +3 -0
  45. package/vendor/faces/cli/src/mcp.js +3 -0
  46. package/vendor/faces/cli/src/models.js +3 -0
  47. package/vendor/faces/cli/src/naming.js +3 -0
  48. package/vendor/faces/cli/src/overlays.js +3 -0
  49. package/vendor/faces/cli/src/panels.js +3 -0
  50. package/vendor/faces/cli/src/permissions.js +3 -0
  51. package/vendor/faces/cli/src/ping.js +3 -0
  52. package/vendor/faces/cli/src/presence.js +3 -0
  53. package/vendor/faces/cli/src/provenance.js +58 -0
  54. package/vendor/faces/cli/src/provenance.lock.json +36 -0
  55. package/vendor/faces/cli/src/render.js +3 -0
  56. package/vendor/faces/cli/src/screen.js +3 -0
  57. package/vendor/faces/cli/src/screens.js +3 -0
  58. package/vendor/faces/cli/src/secret.js +3 -0
  59. package/vendor/faces/cli/src/securefs.js +3 -0
  60. package/vendor/faces/cli/src/settings.js +3 -0
  61. package/vendor/faces/cli/src/shared.js +3 -0
  62. package/vendor/faces/cli/src/sharedpaths.js +3 -0
  63. package/vendor/faces/cli/src/signup.js +3 -0
  64. package/vendor/faces/cli/src/summarize.js +3 -0
  65. package/vendor/faces/cli/src/sysdiag.js +3 -0
  66. package/vendor/faces/cli/src/system.js +3 -0
  67. package/vendor/faces/cli/src/theme.js +3 -0
  68. package/vendor/faces/cli/src/title.js +3 -0
  69. package/vendor/faces/cli/src/todos.js +3 -0
  70. package/vendor/faces/cli/src/tokens.js +3 -0
  71. package/vendor/faces/cli/src/topup.js +3 -0
  72. package/vendor/faces/cli/src/update.js +3 -0
  73. package/vendor/faces/cli/vendor/client/aegis.js +4 -0
  74. package/vendor/faces/cli/vendor/client/attest.js +3 -0
  75. package/vendor/faces/cli/vendor/client/authorship-key.js +3 -0
  76. package/vendor/faces/cli/vendor/client/auto-provision.js +3 -0
  77. package/vendor/faces/cli/vendor/client/brain-catalog.js +3 -0
  78. package/vendor/faces/cli/vendor/client/byok-catalog.js +3 -0
  79. package/vendor/faces/cli/vendor/client/catalog-client.js +3 -0
  80. package/vendor/faces/cli/vendor/client/conversation-export.js +3 -0
  81. package/vendor/faces/cli/vendor/client/credentials.js +3 -0
  82. package/vendor/faces/cli/vendor/client/device-fingerprint.js +3 -0
  83. package/vendor/faces/cli/vendor/client/drive-connect.js +3 -0
  84. package/vendor/faces/cli/vendor/client/drive-upload.js +3 -0
  85. package/vendor/faces/cli/vendor/client/env-file.js +3 -0
  86. package/vendor/faces/cli/vendor/client/fingerprint.js +3 -0
  87. package/vendor/faces/cli/vendor/client/foreign-memory.js +3 -0
  88. package/vendor/faces/cli/vendor/client/google-signin.js +3 -0
  89. package/vendor/faces/cli/vendor/client/hooks.js +3 -0
  90. package/vendor/faces/cli/vendor/client/model-discovery.js +3 -0
  91. package/vendor/faces/cli/vendor/client/naming.js +3 -0
  92. package/vendor/faces/cli/vendor/client/platform.js +3 -0
  93. package/vendor/faces/cli/vendor/client/prefs.js +3 -0
  94. package/vendor/faces/cli/vendor/client/presence-constants.js +3 -0
  95. package/vendor/faces/cli/vendor/client/presence.js +3 -0
  96. package/vendor/faces/cli/vendor/client/record-vault.js +105 -0
  97. package/vendor/faces/cli/vendor/client/session-store.js +3 -0
  98. package/vendor/faces/cli/vendor/client/topup.js +3 -0
  99. package/vendor/faces/cli/vendor/client/touch.js +3 -0
  100. package/vendor/faces/cli/vendor/client/update.js +3 -0
  101. package/vendor/faces/cli/vendor/client/user-models.js +3 -0
  102. package/vendor/faces/cli/vendor/covenant/README.md +21 -0
  103. package/vendor/faces/cli/vendor/covenant/aegis.seal +177 -0
  104. package/vendor/faces/cli/vendor/desktop/lib/local/aegis-seal.mjs +241 -0
  105. package/vendor/faces/cli/vendor/desktop/lib/local/agents.js +3 -0
  106. package/vendor/faces/cli/vendor/desktop/lib/local/attachments.js +3 -0
  107. package/vendor/faces/cli/vendor/desktop/lib/local/autonomous.js +3 -0
  108. package/vendor/faces/cli/vendor/desktop/lib/local/claude-pro.js +3 -0
  109. package/vendor/faces/cli/vendor/desktop/lib/local/context.js +3 -0
  110. package/vendor/faces/cli/vendor/desktop/lib/local/covenant.js +567 -0
  111. package/vendor/faces/cli/vendor/desktop/lib/local/engine.js +3 -0
  112. package/vendor/faces/cli/vendor/desktop/lib/local/entitlement.js +3 -0
  113. package/vendor/faces/cli/vendor/desktop/lib/local/exec-plan.js +3 -0
  114. package/vendor/faces/cli/vendor/desktop/lib/local/git-scope.js +3 -0
  115. package/vendor/faces/cli/vendor/desktop/lib/local/integrity.js +3 -0
  116. package/vendor/faces/cli/vendor/desktop/lib/local/local.js +3 -0
  117. package/vendor/faces/cli/vendor/desktop/lib/local/prompt.js +3 -0
  118. package/vendor/faces/cli/vendor/desktop/lib/local/queue.js +3 -0
  119. package/vendor/faces/cli/vendor/desktop/lib/local/session-rounds.js +3 -0
  120. package/vendor/faces/cli/vendor/desktop/lib/local/shell.js +3 -0
  121. package/vendor/faces/cli/vendor/desktop/lib/local/spill.js +3 -0
  122. package/vendor/faces/cli/vendor/desktop/lib/local/tools.js +3 -0
  123. package/vendor/faces/cli/vendor/desktop/lib/local/turn-guard.js +3 -0
  124. package/vendor/faces/cli/vendor/desktop/lib/local/worktree-lock.js +3 -0
  125. package/vendor/faces/cli/vendor/desktop/lib/settings.js +3 -0
  126. package/vendor/faces/cli/vendor/desktop/main.js +6 -0
  127. package/vendor/faces/cli/vendor/desktop/renderer/usage.js +3 -0
  128. package/vendor/faces/cli/vendor/hosts/install.js +1 -0
  129. package/vendor/faces/cli/vendor/hosts/openai-shim.js +2 -0
  130. package/vendor/faces/cli/vendor/hosts/spec.js +1 -0
  131. package/vendor/faces/cli/vendor/hosts/targets.js +1 -0
  132. package/vendor/faces/cli/vendor/mcp/server.js +4 -0
  133. package/vendor/faces/cli/vendor/mcp/tools.js +3 -0
  134. package/vendor/faces/cli/vendor/one/src/child.js +3 -0
  135. package/vendor/faces/cli/vendor/one/src/permissions.js +3 -0
  136. package/vendor/faces/cli/vendor/one/src/selfhost.js +3 -0
  137. package/vendor/faces/cli/vendor/tools/agent-gate.mjs +1203 -0
  138. package/vendor/selfhost.js +3 -0
@@ -94,7 +94,7 @@ const UNITS = Object.freeze([
94
94
  * (`tools/desktop-seal.mjs` in the source tree, `tools/obfuscate-faces.mjs`
95
95
  * after obfuscation), never by hand.
96
96
  */
97
- const SEALED = 'dc27eef1b63a4ba52eaacc8476dcf5de82020d3d4614662a44b9b99fa18e5579';
97
+ const SEALED = '48fc29f73f029cb1da82fb44f24bef085525eba53a2c2dc913fefb005e6f3ebf';
98
98
 
99
99
  /**
100
100
  * Ask the question. Never throws — a check that can break the program it is
package/main.js CHANGED
@@ -1486,7 +1486,10 @@ function registerQuickLauncherIpc(ipcMain, dispatch) {
1486
1486
  /**
1487
1487
  * Resolve the per-user data directory for settings + sessions. Electron gives
1488
1488
  * us app.getPath('userData'); outside Electron (headless smoke tests) fall back
1489
- * to ~/.aegiscode so the pure functions can still be exercised.
1489
+ * to the platform's own state root via `one/src/iface/paths.js`, so this host
1490
+ * does not keep a second, divergent answer to "where is this OS's data dir".
1491
+ * (It previously hard-coded `~/.aegiscode`, which is a POSIX answer written in
1492
+ * a file that also runs on Windows.)
1490
1493
  */
1491
1494
  function resolveUserDataDir(app) {
1492
1495
  if (app && typeof app.getPath === 'function') {
@@ -1496,6 +1499,13 @@ function resolveUserDataDir(app) {
1496
1499
  /* fall through */
1497
1500
  }
1498
1501
  }
1502
+ try {
1503
+ const PATHS = require('../one/src/iface/paths.js');
1504
+ const planned = PATHS.plan({ platform: process.platform, env: process.env });
1505
+ if (planned && planned.ok) return planned.state;
1506
+ } catch {
1507
+ /* the one/ tree is not shipped beside a standalone desktop build */
1508
+ }
1499
1509
  return path.join(os.homedir(), '.aegiscode');
1500
1510
  }
1501
1511
 
@@ -3783,6 +3793,62 @@ function bootstrap() {
3783
3793
 
3784
3794
  const { app, BrowserWindow, ipcMain, safeStorage, shell, Menu, Notification, screen, dialog, globalShortcut } = electron;
3785
3795
 
3796
+ // ── one artifact, two faces (one/src/selfhost.js) ────────────────────────
3797
+ //
3798
+ // A PACKAGED launch may have been asked for the terminal face: `aegiscode`,
3799
+ // `aegis --tui`, `aegis code`. The packaged app carries both faces in
3800
+ // `resources/faces/`, and Electron embeds Node — so re-entering ourselves with
3801
+ // ELECTRON_RUN_AS_NODE=1 runs the terminal face with no Node on the user's
3802
+ // PATH. That is the one case both installers currently have to apologise for.
3803
+ //
3804
+ // This runs BEFORE the GPU switches below, deliberately: a terminal session
3805
+ // must never initialise Chromium, let alone crash-loop its GPU process on a
3806
+ // headless box (the failure the block below exists to survive).
3807
+ //
3808
+ // `plan()` returns null for every other case — including every window request,
3809
+ // because in that case THIS process is the window and spawning a second one
3810
+ // would race the single-instance lock below. Null means "carry on", never
3811
+ // "do nothing".
3812
+ try {
3813
+ // Two layouts, same reason every other staged module has two: in a checkout
3814
+ // it is a sibling of `desktop/`, and packaged electron-builder cannot reach
3815
+ // outside the app dir, so predist stages it FLAT as `vendor/selfhost.js`
3816
+ // (one MANIFEST row, two shapes).
3817
+ let selfhost;
3818
+ try {
3819
+ selfhost = require('./vendor/selfhost.js');
3820
+ } catch {
3821
+ selfhost = require('../one/src/selfhost.js');
3822
+ }
3823
+ const planned = selfhost.plan({
3824
+ packaged: app.isPackaged,
3825
+ execPath: process.execPath,
3826
+ resourcesPath: process.resourcesPath,
3827
+ argv: process.argv.slice(1),
3828
+ invokedAs: path.basename(process.argv[1] || process.execPath),
3829
+ });
3830
+ if (planned) {
3831
+ // Synchronous on purpose: the terminal face owns the tty, and its exit
3832
+ // code IS ours — a detached `aegis code` that returns 0 while the child
3833
+ // failed tells a script nothing true.
3834
+ const opts = selfhost.spawnOptions(planned, process.env);
3835
+ const res = require('node:child_process').spawnSync(opts.exec, opts.args, {
3836
+ stdio: 'inherit',
3837
+ env: opts.env,
3838
+ });
3839
+ const code = typeof res.status === 'number' ? res.status : 1;
3840
+ app.exit(code);
3841
+ return;
3842
+ }
3843
+ } catch (err) {
3844
+ // A missing selfhost module is not fatal: it means this build predates the
3845
+ // packaged terminal face, and a window is still the right answer. Printed
3846
+ // rather than swallowed so a genuinely broken staging step is visible.
3847
+ if (app.isPackaged && !/MODULE_NOT_FOUND/.test(String(err && err.message))) {
3848
+ process.stderr.write(`aegis: terminal face hand-off failed: ${(err && err.message) || err}\n`);
3849
+ }
3850
+ }
3851
+
3786
3852
  // A container/CI/headless server with no usable GPU crashes Chromium's GPU
3787
3853
  // process in a retry loop that ends in a FATAL exit ("GPU process isn't
3788
3854
  // usable. Goodbye.") — and that happens BEFORE app.whenReady() ever fires,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "aegis-desktop",
3
3
  "productName": "AEGIS Desktop",
4
4
  "desktopName": "aegis-desktop",
5
- "version": "1.0.27",
5
+ "version": "1.0.29",
6
6
  "description": "Thin Electron host for AEGIS — a local chat UI over the shared client/aegis.js transport. Ships transport + UI only; engine logic stays server-side.",
7
7
  "author": {
8
8
  "name": "AEGIS Code",