aegiscode 6.8.1 → 6.8.2
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 +1 -1
- package/src/screens.js +36 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aegiscode",
|
|
3
3
|
"productName": "AEGIS Code",
|
|
4
|
-
"version": "6.8.
|
|
4
|
+
"version": "6.8.2",
|
|
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",
|
package/src/screens.js
CHANGED
|
@@ -38,6 +38,7 @@ const render = require('./render.js');
|
|
|
38
38
|
const { updateConfig, configExists, loadConfig } = require('./config.js');
|
|
39
39
|
const { updateNotice, updateLine } = require('./update.js');
|
|
40
40
|
const credentials = require('./credentials.js');
|
|
41
|
+
const { createSettingsStore, isReservedNamespace } = require('./deps.js');
|
|
41
42
|
|
|
42
43
|
const VERSION = require('../package.json').version;
|
|
43
44
|
|
|
@@ -442,12 +443,42 @@ function make(style, text) {
|
|
|
442
443
|
return sp;
|
|
443
444
|
}
|
|
444
445
|
|
|
446
|
+
/**
|
|
447
|
+
* Whether this machine holds a BYOK provider route of the user's own — the
|
|
448
|
+
* desktop host's `providerRouteConfigured()`, ported here because the CLI's
|
|
449
|
+
* `/byok-key <provider>` writes the exact same `byok:<provider>` row (see
|
|
450
|
+
* `engine.js`'s `byokNamespace`) into the exact same settings.json, and
|
|
451
|
+
* `connectNeeded()` below used to only ever check the AEGIS account key —
|
|
452
|
+
* so a CLI user who did BYOK and never touched the account key got the
|
|
453
|
+
* connect block re-pitched at them on every single launch.
|
|
454
|
+
*
|
|
455
|
+
* `settings.list()` goes through `get()`, which never puts a plaintext key on
|
|
456
|
+
* a row (only the `configured` boolean already derived from it) — that field
|
|
457
|
+
* is what a row counts on, not a `key` string that doesn't exist on it.
|
|
458
|
+
*
|
|
459
|
+
* Failure reads as "no configured route found", which keeps the block
|
|
460
|
+
* visible — same fail-toward-showing-it bias as the account-key read below.
|
|
461
|
+
*/
|
|
462
|
+
function providerRouteConfigured() {
|
|
463
|
+
try {
|
|
464
|
+
const store = createSettingsStore({ dir: credentials.aegisHome() });
|
|
465
|
+
return store.list().some((row) => {
|
|
466
|
+
if (!row || !row.provider || isReservedNamespace(row.provider)) return false;
|
|
467
|
+
const baseURL = typeof row.baseURL === 'string' ? row.baseURL.trim() : '';
|
|
468
|
+
return Boolean(row.configured || baseURL);
|
|
469
|
+
});
|
|
470
|
+
} catch {
|
|
471
|
+
return false;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
445
475
|
/**
|
|
446
476
|
* Whether the welcome screen should still pitch the two connect routes.
|
|
447
477
|
*
|
|
448
|
-
* Once an AEGIS account key is on this machine
|
|
449
|
-
* of them, and two rows repeating
|
|
450
|
-
* onboarding — the same rule the desktop
|
|
478
|
+
* Once an AEGIS account key is on this machine, or a BYOK provider route is
|
|
479
|
+
* configured, the user has already taken one of them, and two rows repeating
|
|
480
|
+
* what they just did is nagging, not onboarding — the same rule the desktop
|
|
481
|
+
* host applies to its welcome panel.
|
|
451
482
|
*
|
|
452
483
|
* A read that fails (no credentials file, an unreadable one) resolves to
|
|
453
484
|
* "show it": the block is exactly what a user with no key needs, and a
|
|
@@ -456,6 +487,7 @@ function make(style, text) {
|
|
|
456
487
|
*/
|
|
457
488
|
function connectNeeded() {
|
|
458
489
|
try {
|
|
490
|
+
if (providerRouteConfigured()) return false;
|
|
459
491
|
return !credentials.keyStatus().configured;
|
|
460
492
|
} catch {
|
|
461
493
|
return true;
|
|
@@ -688,6 +720,7 @@ module.exports = {
|
|
|
688
720
|
WHATS_NEW,
|
|
689
721
|
CONNECT,
|
|
690
722
|
connectNeeded,
|
|
723
|
+
providerRouteConfigured,
|
|
691
724
|
trustLines,
|
|
692
725
|
themePickerLines,
|
|
693
726
|
keyLines,
|