aegiscode 7.0.11 → 7.0.12
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/bin/aegiscode.js +29 -0
- package/package.json +1 -1
- package/src/app.js +210 -16
- package/src/config.js +7 -0
- package/src/connect.js +351 -0
- package/src/engine.js +14 -0
- package/src/fingerprint.js +46 -16
- package/src/limits.js +1 -1
- package/src/provenance.lock.json +2 -2
- package/src/screens.js +14 -1
- package/vendor/client/credentials.js +9 -2
- package/vendor/client/google-signin.js +127 -0
- package/vendor/client/record-vault.js +431 -113
- package/vendor/client/update.js +266 -0
- package/vendor/desktop/lib/local/claude-pro.js +134 -11
- package/vendor/desktop/lib/local/engine.js +47 -25
- package/vendor/desktop/lib/settings.js +65 -24
|
@@ -103,6 +103,19 @@ const QUICK_LAUNCHER_NAMESPACE = '__quickLauncher';
|
|
|
103
103
|
* fighting existing app/OS bindings, memorable enough to type once. */
|
|
104
104
|
const DEFAULT_QUICK_LAUNCHER_SHORTCUT = 'CmdOrCtrl+Shift+Space';
|
|
105
105
|
|
|
106
|
+
/** Reserved namespace for where `fingerprint publish`/the vault card sends
|
|
107
|
+
* sealed records: `{ backend }`, one of VAULT_BACKEND_VALUES — app-level, not
|
|
108
|
+
* a provider, for the same reason the quick launcher isn't. Default is
|
|
109
|
+
* `aegiscloud` (unset reads as the default, same convention as confirm mode)
|
|
110
|
+
* because it is the only backend that exists on a fresh install — see
|
|
111
|
+
* client/record-vault.js's own DEFAULT_BACKEND. `drive` asks the fingerprint
|
|
112
|
+
* service to talk to rclone's `gdrive` remote instead (the user's own Drive,
|
|
113
|
+
* configured by them); `off` means publish/anchor/vault/audit refuse with a
|
|
114
|
+
* named reason rather than silently reaching either backend. */
|
|
115
|
+
const VAULT_BACKEND_NAMESPACE = '__vaultBackend';
|
|
116
|
+
const DEFAULT_VAULT_BACKEND = 'aegiscloud';
|
|
117
|
+
const VAULT_BACKEND_VALUES = Object.freeze(['aegiscloud', 'drive', 'off']);
|
|
118
|
+
|
|
106
119
|
/** Reserved namespace for the tool-call approval ("confirm mode") preference:
|
|
107
120
|
* `{ enabled }` — app-level, not a provider, so it stays out of the provider
|
|
108
121
|
* CRUD surface for the same reason the AEGIS key does. Default is ON
|
|
@@ -138,31 +151,34 @@ const AVATAR_NAMESPACE = '__avatar';
|
|
|
138
151
|
* main.js telemetryEnabled() through getTelemetryOptIn(). */
|
|
139
152
|
const TELEMETRY_NAMESPACE = '__telemetry';
|
|
140
153
|
|
|
141
|
-
/** Reserved namespace for the auto-drain
|
|
154
|
+
/** Reserved namespace for the auto-drain switch:
|
|
142
155
|
* `{ enabled, intervalMs }` — app-level, not a provider.
|
|
143
156
|
*
|
|
144
|
-
* DEFAULT
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
* `__confirmMode`/`__memoryPersist` above. */
|
|
157
|
+
* DEFAULT ON (user request: the queue must work with no click and nothing on
|
|
158
|
+
* screen). An absent namespace means "drain in the background"; only an
|
|
159
|
+
* explicit `enabled: false` disarms it, and that is what the settings store
|
|
160
|
+
* writes when someone turns the worker off from the CLI or by hand.
|
|
161
|
+
*
|
|
162
|
+
* The guards are what make that default defensible, and they live in
|
|
163
|
+
* `lib/auto.js`, not here: a tick skips when the queue is empty (so an idle
|
|
164
|
+
* install costs one JSON parse and no lock I/O), when another host holds the
|
|
165
|
+
* drain lock, when a drain is already in flight, and when the switch was
|
|
166
|
+
* turned off since the last tick — the switch is re-read on EVERY tick, so
|
|
167
|
+
* disarming stops the very next one. Nothing secret lives here, so no
|
|
168
|
+
* encryption — same shape as `__confirmMode`/`__memoryPersist` above. */
|
|
157
169
|
const AUTO_DRAIN_NAMESPACE = '__autoDrain';
|
|
158
170
|
|
|
159
|
-
/** Reserved namespace for the auto-mint (seal-on-quiet)
|
|
171
|
+
/** Reserved namespace for the auto-mint (seal-on-quiet) switch:
|
|
160
172
|
* `{ enabled, publish }` — app-level, not a provider.
|
|
161
173
|
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
174
|
+
* `enabled` is DEFAULT ON, same as auto-drain: a session seals itself once it
|
|
175
|
+
* has been quiet, with nothing on screen asking for it. Only an explicit
|
|
176
|
+
* `enabled: false` disarms it.
|
|
177
|
+
*
|
|
178
|
+
* `publish` stays a separate, DEFAULT OFF switch: sealing writes a local
|
|
179
|
+
* record, whereas publishing sends those bytes to the vault over `rclone` and
|
|
180
|
+
* writes an anchor beside them. An automatic network copy is never implied by
|
|
181
|
+
* an automatic seal.
|
|
166
182
|
*
|
|
167
183
|
* The AI half of the record resolves through the shared rungs in
|
|
168
184
|
* client/attest.js (`$AEGIS_AI_SECRET`/`$AEGIS_AI_MODEL` in the app scope) —
|
|
@@ -195,6 +211,7 @@ const RESERVED_NAMESPACES = Object.freeze([
|
|
|
195
211
|
AEGIS_KEY_NAMESPACE,
|
|
196
212
|
LEGACY_AEGIS_NAMESPACE,
|
|
197
213
|
QUICK_LAUNCHER_NAMESPACE,
|
|
214
|
+
VAULT_BACKEND_NAMESPACE,
|
|
198
215
|
CONFIRM_MODE_NAMESPACE,
|
|
199
216
|
MEMORY_PERSIST_NAMESPACE,
|
|
200
217
|
AVATAR_NAMESPACE,
|
|
@@ -539,6 +556,24 @@ function createSettingsStore({ dir, safeStorage, prefsDir, env } = {}) {
|
|
|
539
556
|
return quickLauncherConfig();
|
|
540
557
|
}
|
|
541
558
|
|
|
559
|
+
// --- Vault backend: reserved namespace, plain (unencrypted) preference ---
|
|
560
|
+
// No secret lives here either — just which of three named destinations a
|
|
561
|
+
// publish goes to — so like the quick launcher there is nothing to encrypt.
|
|
562
|
+
|
|
563
|
+
function vaultBackendConfig() {
|
|
564
|
+
const cfg = load()[VAULT_BACKEND_NAMESPACE] || {};
|
|
565
|
+
const backend = VAULT_BACKEND_VALUES.includes(cfg.backend) ? cfg.backend : DEFAULT_VAULT_BACKEND;
|
|
566
|
+
return { backend };
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
function setVaultBackendConfig(backend) {
|
|
570
|
+
if (!VAULT_BACKEND_VALUES.includes(backend)) return vaultBackendConfig();
|
|
571
|
+
const data = load();
|
|
572
|
+
data[VAULT_BACKEND_NAMESPACE] = { backend };
|
|
573
|
+
save(data);
|
|
574
|
+
return vaultBackendConfig();
|
|
575
|
+
}
|
|
576
|
+
|
|
542
577
|
// --- Confirm mode: SHARED preference (AEGISONE ON8, decision D8 rule 1) --
|
|
543
578
|
// "Confirm before running tools" — the switch for the renderer's tool-call
|
|
544
579
|
// approval gate (desktop/lib/local/engine.js gatedExecuteTool). ON (default,
|
|
@@ -726,10 +761,10 @@ function createSettingsStore({ dir, safeStorage, prefsDir, env } = {}) {
|
|
|
726
761
|
function getAutoDrain() {
|
|
727
762
|
const cfg = load()[AUTO_DRAIN_NAMESPACE] || {};
|
|
728
763
|
return {
|
|
729
|
-
// Unset ===
|
|
730
|
-
//
|
|
731
|
-
//
|
|
732
|
-
enabled: cfg.enabled
|
|
764
|
+
// Unset === TRUE. The queue drains in the background unless someone
|
|
765
|
+
// switched it off in as many words; `lib/auto.js` re-reads this on every
|
|
766
|
+
// tick, so that off switch stops the very next one.
|
|
767
|
+
enabled: cfg.enabled !== false,
|
|
733
768
|
intervalMs: clampAutoDrainInterval(cfg.intervalMs),
|
|
734
769
|
};
|
|
735
770
|
}
|
|
@@ -760,7 +795,8 @@ function createSettingsStore({ dir, safeStorage, prefsDir, env } = {}) {
|
|
|
760
795
|
function getAutoMint() {
|
|
761
796
|
const cfg = load()[AUTO_MINT_NAMESPACE] || {};
|
|
762
797
|
return {
|
|
763
|
-
|
|
798
|
+
// Unset === TRUE (background sealing). `publish` below stays opt-in.
|
|
799
|
+
enabled: cfg.enabled !== false,
|
|
764
800
|
// Independent of `enabled` on purpose: an automatic seal must not drag
|
|
765
801
|
// an automatic upload along with it.
|
|
766
802
|
publish: cfg.publish === true,
|
|
@@ -807,6 +843,8 @@ function createSettingsStore({ dir, safeStorage, prefsDir, env } = {}) {
|
|
|
807
843
|
migrateLegacyAegisKey,
|
|
808
844
|
quickLauncherConfig,
|
|
809
845
|
setQuickLauncherConfig,
|
|
846
|
+
vaultBackendConfig,
|
|
847
|
+
setVaultBackendConfig,
|
|
810
848
|
getConfirmMode,
|
|
811
849
|
setConfirmMode,
|
|
812
850
|
confirmModeState,
|
|
@@ -833,6 +871,7 @@ module.exports = {
|
|
|
833
871
|
AEGIS_KEY_NAMESPACE,
|
|
834
872
|
LEGACY_AEGIS_NAMESPACE,
|
|
835
873
|
QUICK_LAUNCHER_NAMESPACE,
|
|
874
|
+
VAULT_BACKEND_NAMESPACE,
|
|
836
875
|
CONFIRM_MODE_NAMESPACE,
|
|
837
876
|
MEMORY_PERSIST_NAMESPACE,
|
|
838
877
|
AVATAR_NAMESPACE,
|
|
@@ -844,6 +883,8 @@ module.exports = {
|
|
|
844
883
|
AUTO_DRAIN_INTERVAL_MAX_MS,
|
|
845
884
|
AVATAR_MOTION_MODES,
|
|
846
885
|
DEFAULT_QUICK_LAUNCHER_SHORTCUT,
|
|
886
|
+
DEFAULT_VAULT_BACKEND,
|
|
887
|
+
VAULT_BACKEND_VALUES,
|
|
847
888
|
RESERVED_NAMESPACES,
|
|
848
889
|
isReservedNamespace,
|
|
849
890
|
maskKey,
|