zidane 6.5.4 → 6.5.6
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/dist/{acp-CIpD8UIw.js → acp-Dm95NwNM.js} +6 -6
- package/dist/{acp-CIpD8UIw.js.map → acp-Dm95NwNM.js.map} +1 -1
- package/dist/acp-cli.js +6 -6
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-8kfGIDb_.js → agent-CcTWL-Z6.js} +231 -167
- package/dist/agent-CcTWL-Z6.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{anthropic-qaw8XAc9.js → anthropic-DLc_Kw-1.js} +420 -25
- package/dist/anthropic-DLc_Kw-1.js.map +1 -0
- package/dist/{auth-BLy7X1SY.js → auth-BAclQnl3.js} +127 -35
- package/dist/{auth-BLy7X1SY.js.map → auth-BAclQnl3.js.map} +1 -1
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat/pure.js +2 -2
- package/dist/chat.d.ts +115 -9
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +8 -8
- package/dist/{context-segments-1mcqSCM3.js → context-segments-CJCtJ9sU.js} +16 -3
- package/dist/{context-segments-1mcqSCM3.js.map → context-segments-CJCtJ9sU.js.map} +1 -1
- package/dist/{context-transport-Bco9Wo0b.js → context-transport-D8yeGdpd.js} +2 -2
- package/dist/{context-transport-Bco9Wo0b.js.map → context-transport-D8yeGdpd.js.map} +1 -1
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/daytona.js +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/{errors-BwBxu3zD.js → errors-DKiMrOKq.js} +61 -2
- package/dist/{errors-BwBxu3zD.js.map → errors-DKiMrOKq.js.map} +1 -1
- package/dist/errors.js +2 -2
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/{fetch-url-B7aSg6Bp.js → fetch-url-ma-5_p0p.js} +2 -2
- package/dist/{fetch-url-B7aSg6Bp.js.map → fetch-url-ma-5_p0p.js.map} +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +3 -3
- package/dist/{index-BSNr0OQn.d.ts → index-ZWibV230.d.ts} +100 -28
- package/dist/index-ZWibV230.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -13
- package/dist/{login-D3CKhgbI.js → login-CB23LyI1.js} +3 -3
- package/dist/{login-D3CKhgbI.js.map → login-CB23LyI1.js.map} +1 -1
- package/dist/{mcp-D9fqOQo5.js → mcp-CVtSQTWg.js} +3 -3
- package/dist/{mcp-D9fqOQo5.js.map → mcp-CVtSQTWg.js.map} +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/{messages-C_H9soi5.js → messages-CZMUuKzo.js} +2 -2
- package/dist/{messages-C_H9soi5.js.map → messages-CZMUuKzo.js.map} +1 -1
- package/dist/{oauth-ZebH9NHb.js → oauth-C4GvY_p1.js} +27 -8
- package/dist/oauth-C4GvY_p1.js.map +1 -0
- package/dist/{openai-compat-CnHeo4Lz.js → openai-compat-BoTi-9fd.js} +9 -4
- package/dist/openai-compat-BoTi-9fd.js.map +1 -0
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/{plugins-2PMTVcp-.js → plugins-onDvTHEm.js} +2 -2
- package/dist/{plugins-2PMTVcp-.js.map → plugins-onDvTHEm.js.map} +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/anthropic.js +1 -1
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/arcee.js +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/baseten.js +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/cerebras.js +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/local.js +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai-compat.js +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +4 -4
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/openrouter.js +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +2 -2
- package/dist/{providers-Bxs-XHir.js → providers-CmhdtD7w.js} +3 -3
- package/dist/{providers-Bxs-XHir.js.map → providers-CmhdtD7w.js.map} +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +4 -4
- package/dist/restate.d.ts +1 -1
- package/dist/restate.js +2 -2
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session/sqlite.js +1 -1
- package/dist/{session-VpLrNaFQ.js → session-CyRLSsVa.js} +2 -2
- package/dist/{session-VpLrNaFQ.js.map → session-CyRLSsVa.js.map} +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/session.js +2 -2
- package/dist/{skills-Cp9vnBwd.js → skills-BMGH_KK1.js} +2 -2
- package/dist/{skills-Cp9vnBwd.js.map → skills-BMGH_KK1.js.map} +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/skills.js +1 -1
- package/dist/{timeout-BDetbuN6.js → timeout-CjOG2mea.js} +29 -2
- package/dist/timeout-CjOG2mea.js.map +1 -0
- package/dist/timeout-DEaqslLO.d.ts.map +1 -1
- package/dist/{tool-formatters-BfKqWm5N.d.ts → tool-formatters-D3wSS2zz.d.ts} +2 -2
- package/dist/{tool-formatters-BfKqWm5N.d.ts.map → tool-formatters-D3wSS2zz.d.ts.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/fetch-url.js +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools/web-search.js +2 -2
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +1 -1
- package/dist/{transcript-anchors-Bv8HQ3S2.js → transcript-anchors-D-Yuimif.js} +177 -63
- package/dist/transcript-anchors-D-Yuimif.js.map +1 -0
- package/dist/{transcript-anchors-CNqDbrc9.d.ts → transcript-anchors-llwMrLRG.d.ts} +2 -2
- package/dist/{transcript-anchors-CNqDbrc9.d.ts.map → transcript-anchors-llwMrLRG.d.ts.map} +1 -1
- package/dist/tui.d.ts +24 -29
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +964 -244
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-iGu5J08j.js → turn-operations-7_Ff7INF.js} +2 -2
- package/dist/{turn-operations-iGu5J08j.js.map → turn-operations-7_Ff7INF.js.map} +1 -1
- package/dist/{turn-operations-CnIpcenJ.d.ts → turn-operations-C_XvfBU3.d.ts} +3 -3
- package/dist/{turn-operations-CnIpcenJ.d.ts.map → turn-operations-C_XvfBU3.d.ts.map} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/docs/CHAT.md +1 -1
- package/docs/TUI.md +4 -4
- package/package.json +2 -1
- package/dist/agent-8kfGIDb_.js.map +0 -1
- package/dist/anthropic-qaw8XAc9.js.map +0 -1
- package/dist/index-BSNr0OQn.d.ts.map +0 -1
- package/dist/oauth-ZebH9NHb.js.map +0 -1
- package/dist/openai-compat-CnHeo4Lz.js.map +0 -1
- package/dist/timeout-BDetbuN6.js.map +0 -1
- package/dist/transcript-anchors-Bv8HQ3S2.js.map +0 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { A as mergeCatalogEntry, D as listModelOverlay, O as listModels, k as lookupModel } from "./openai-compat-
|
|
1
|
+
import { A as mergeCatalogEntry, D as listModelOverlay, O as listModels, k as lookupModel } from "./openai-compat-BoTi-9fd.js";
|
|
2
|
+
import { cn as ALTERNATE_CRED_KEY_SUFFIX, ln as alternateCredKey, un as isReservedCredKey } from "./agent-CcTWL-Z6.js";
|
|
2
3
|
import { t as writeFileAtomic } from "./atomic-write-B7zr1ddF.js";
|
|
3
|
-
import { f as ANTHROPIC_EXTRA_MODELS, n as anthropic, p as FAST_MODE_OPTIONS } from "./anthropic-
|
|
4
|
-
import { d as refreshAnthropicToken, f as refreshOpenAICodexToken, p as registerOAuthProvider } from "./oauth-
|
|
4
|
+
import { f as ANTHROPIC_EXTRA_MODELS, n as anthropic, p as FAST_MODE_OPTIONS } from "./anthropic-DLc_Kw-1.js";
|
|
5
|
+
import { d as refreshAnthropicToken, f as refreshOpenAICodexToken, p as registerOAuthProvider } from "./oauth-C4GvY_p1.js";
|
|
5
6
|
import { arcee } from "./providers/arcee.js";
|
|
6
7
|
import { baseten } from "./providers/baseten.js";
|
|
7
8
|
import { cerebras } from "./providers/cerebras.js";
|
|
8
9
|
import { t as generatePkce } from "./pkce-t8BcPyEi.js";
|
|
9
10
|
import { n as createCursorOAuthProvider } from "./cursor-iojRXHF9.js";
|
|
10
|
-
import { n as zai, r as mistral } from "./providers-
|
|
11
|
+
import { n as zai, r as mistral } from "./providers-CmhdtD7w.js";
|
|
11
12
|
import { local } from "./providers/local.js";
|
|
12
13
|
import { openai } from "./providers/openai.js";
|
|
13
14
|
import { openrouter } from "./providers/openrouter.js";
|
|
@@ -1414,11 +1415,36 @@ function normalizeCredentials(parsed) {
|
|
|
1414
1415
|
else result[key] = value;
|
|
1415
1416
|
return result;
|
|
1416
1417
|
}
|
|
1418
|
+
/**
|
|
1419
|
+
* Canonical file key for a descriptor, rejecting the reserved alternate suffix.
|
|
1420
|
+
*
|
|
1421
|
+
* Loud on a misconfigured provider instead of quietly mixing its credentials
|
|
1422
|
+
* into another provider's alternate slot (extension registration refuses the
|
|
1423
|
+
* suffix upfront; this covers descriptors passed in directly). Read paths stay
|
|
1424
|
+
* tolerant — only the functions that can WRITE a pair go through here.
|
|
1425
|
+
*/
|
|
1426
|
+
function assertableCredKey(descriptor) {
|
|
1427
|
+
const fileKey = credKeyOf(descriptor);
|
|
1428
|
+
if (isReservedCredKey(fileKey)) throw new Error(`Provider "${descriptor.key}" uses credential key "${fileKey}", but the "${ALTERNATE_CRED_KEY_SUFFIX}" suffix is reserved for a provider's second credential slot.`);
|
|
1429
|
+
return fileKey;
|
|
1430
|
+
}
|
|
1417
1431
|
/** Read a single provider's credential (translating via the descriptor). */
|
|
1418
1432
|
function readProviderCredential(dataDir, descriptor) {
|
|
1419
1433
|
return readCredentials(dataDir)[credKeyOf(descriptor)];
|
|
1420
1434
|
}
|
|
1421
1435
|
/**
|
|
1436
|
+
* Both stored credentials for a provider: `active` is the one every reader
|
|
1437
|
+
* resolves, `alternate` is the stored-but-not-preferred one (if any).
|
|
1438
|
+
*/
|
|
1439
|
+
function readProviderCredentialPair(dataDir, descriptor) {
|
|
1440
|
+
const all = readCredentials(dataDir);
|
|
1441
|
+
const fileKey = credKeyOf(descriptor);
|
|
1442
|
+
return {
|
|
1443
|
+
active: all[fileKey],
|
|
1444
|
+
alternate: all[alternateCredKey(fileKey)]
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
/**
|
|
1422
1448
|
* Write credentials atomically (write-then-rename) with mode 0o600.
|
|
1423
1449
|
*
|
|
1424
1450
|
* Atomic on the same filesystem — readers either see the previous file or the
|
|
@@ -1431,16 +1457,64 @@ function writeCredentials(dataDir, creds) {
|
|
|
1431
1457
|
mode: FILE_MODE
|
|
1432
1458
|
});
|
|
1433
1459
|
}
|
|
1460
|
+
/**
|
|
1461
|
+
* Store a credential as the provider's preferred one.
|
|
1462
|
+
*
|
|
1463
|
+
* A credential of the OTHER kind already in the canonical slot is demoted to
|
|
1464
|
+
* {@link alternateCredKey}, not destroyed: authenticating with OAuth used to
|
|
1465
|
+
* silently delete a working API key (and vice versa), leaving the user to
|
|
1466
|
+
* re-enter it. Replacing a credential of the SAME kind is a plain overwrite —
|
|
1467
|
+
* that's a re-auth, not a second source.
|
|
1468
|
+
*
|
|
1469
|
+
* The pair holds AT MOST ONE credential of each kind. A same-kind alternate is
|
|
1470
|
+
* therefore stale — no code path here can produce one, but a file written by an
|
|
1471
|
+
* older build can carry it, and it would surface as two identical source rows
|
|
1472
|
+
* that "switch" between each other. Dropping it on the next write self-heals.
|
|
1473
|
+
*/
|
|
1434
1474
|
function setProviderCredential(dataDir, descriptor, cred) {
|
|
1435
1475
|
const all = readCredentials(dataDir);
|
|
1436
|
-
|
|
1476
|
+
const fileKey = assertableCredKey(descriptor);
|
|
1477
|
+
const altKey = alternateCredKey(fileKey);
|
|
1478
|
+
const previous = all[fileKey];
|
|
1479
|
+
if (previous && previous.kind !== cred.kind) all[altKey] = previous;
|
|
1480
|
+
else if (all[altKey]?.kind === cred.kind) delete all[altKey];
|
|
1481
|
+
all[fileKey] = cred;
|
|
1437
1482
|
writeCredentials(dataDir, all);
|
|
1438
1483
|
}
|
|
1484
|
+
/**
|
|
1485
|
+
* Make the provider's stored `source` credential the preferred one.
|
|
1486
|
+
*
|
|
1487
|
+
* No-op unless a credential of that kind is sitting in the alternate slot, so
|
|
1488
|
+
* calling it for the already-active source is harmless.
|
|
1489
|
+
*/
|
|
1490
|
+
function setPreferredCredential(dataDir, descriptor, source) {
|
|
1491
|
+
const all = readCredentials(dataDir);
|
|
1492
|
+
const fileKey = assertableCredKey(descriptor);
|
|
1493
|
+
const altKey = alternateCredKey(fileKey);
|
|
1494
|
+
const alternate = all[altKey];
|
|
1495
|
+
if (!alternate || alternate.kind !== source) return;
|
|
1496
|
+
const active = all[fileKey];
|
|
1497
|
+
all[fileKey] = alternate;
|
|
1498
|
+
if (active) all[altKey] = active;
|
|
1499
|
+
else delete all[altKey];
|
|
1500
|
+
writeCredentials(dataDir, all);
|
|
1501
|
+
}
|
|
1502
|
+
/**
|
|
1503
|
+
* Sign a provider out — drops BOTH stored credentials.
|
|
1504
|
+
*
|
|
1505
|
+
* "Signed out" has to mean the provider resolves nothing afterwards, which is
|
|
1506
|
+
* what this has always guaranteed and what callers named it for; promoting the
|
|
1507
|
+
* alternate instead would silently leave the provider authenticated through the
|
|
1508
|
+
* other source. Callers that want the fall-back behavior can read the pair
|
|
1509
|
+
* first ({@link readProviderCredentialPair}) and re-store the survivor.
|
|
1510
|
+
*/
|
|
1439
1511
|
function removeProviderCredential(dataDir, descriptor) {
|
|
1440
1512
|
const all = readCredentials(dataDir);
|
|
1441
1513
|
const fileKey = credKeyOf(descriptor);
|
|
1442
|
-
|
|
1514
|
+
const altKey = alternateCredKey(fileKey);
|
|
1515
|
+
if (!(fileKey in all) && !(altKey in all)) return;
|
|
1443
1516
|
delete all[fileKey];
|
|
1517
|
+
delete all[altKey];
|
|
1444
1518
|
writeCredentials(dataDir, all);
|
|
1445
1519
|
}
|
|
1446
1520
|
/**
|
|
@@ -1474,7 +1548,8 @@ function removeProviderCredential(dataDir, descriptor) {
|
|
|
1474
1548
|
* Descriptors without an `envKey` (OAuth-only providers, custom providers
|
|
1475
1549
|
* that bypass env-var resolution) are skipped silently.
|
|
1476
1550
|
*/
|
|
1477
|
-
function applyApiKeyEnv(dataDir, registry) {
|
|
1551
|
+
function applyApiKeyEnv(dataDir, registry, opts = {}) {
|
|
1552
|
+
const log = opts.log ?? ((message) => void process.stderr.write(message));
|
|
1478
1553
|
const creds = readCredentials(dataDir);
|
|
1479
1554
|
for (const descriptor of Object.values(registry)) {
|
|
1480
1555
|
const cred = creds[credKeyOf(descriptor)];
|
|
@@ -1484,7 +1559,7 @@ function applyApiKeyEnv(dataDir, registry) {
|
|
|
1484
1559
|
const value = stored[field.key];
|
|
1485
1560
|
if (typeof value === "string" && value.length > 0) {
|
|
1486
1561
|
const ambient = process.env[field.envVar];
|
|
1487
|
-
if (ambient && ambient !== value && process.env.ZIDANE_DEBUG)
|
|
1562
|
+
if (ambient && ambient !== value && process.env.ZIDANE_DEBUG) log(`[zidane/chat] applyApiKeyEnv: overriding ambient \`${field.envVar}\` with stored value from credentials.json (provider=${descriptor.key}, field=${field.key}).\n`);
|
|
1488
1563
|
process.env[field.envVar] = value;
|
|
1489
1564
|
}
|
|
1490
1565
|
}
|
|
@@ -1493,12 +1568,12 @@ function applyApiKeyEnv(dataDir, registry) {
|
|
|
1493
1568
|
const envKey = descriptor.envKey;
|
|
1494
1569
|
const ambient = process.env[envKey];
|
|
1495
1570
|
if (cred?.kind === "apikey" && cred.value) {
|
|
1496
|
-
if (ambient && ambient !== cred.value && process.env.ZIDANE_DEBUG)
|
|
1571
|
+
if (ambient && ambient !== cred.value && process.env.ZIDANE_DEBUG) log(`[zidane/chat] applyApiKeyEnv: overriding ambient \`${envKey}\` with stored API key from credentials.json (provider=${descriptor.key}). Sign out via the auth wizard if the ambient value was intended to win.\n`);
|
|
1497
1572
|
process.env[envKey] = cred.value;
|
|
1498
1573
|
continue;
|
|
1499
1574
|
}
|
|
1500
1575
|
if (cred?.kind === "oauth" && cred.access) {
|
|
1501
|
-
if (ambient !== void 0 && process.env.ZIDANE_DEBUG)
|
|
1576
|
+
if (ambient !== void 0 && process.env.ZIDANE_DEBUG) log(`[zidane/chat] applyApiKeyEnv: clearing ambient \`${envKey}\` because credentials.json has stored OAuth for ${descriptor.key} — refresh path needs the file.\n`);
|
|
1502
1577
|
delete process.env[envKey];
|
|
1503
1578
|
continue;
|
|
1504
1579
|
}
|
|
@@ -1570,13 +1645,17 @@ function isOAuthLegacy(value) {
|
|
|
1570
1645
|
/**
|
|
1571
1646
|
* Detect available auth for every registered provider.
|
|
1572
1647
|
*
|
|
1573
|
-
*
|
|
1574
|
-
* layer that has a credential — the agent itself resolves them in the same
|
|
1575
|
-
* order via its provider factories):
|
|
1648
|
+
* A method appears in `methods` for every layer that has a credential:
|
|
1576
1649
|
*
|
|
1577
|
-
*
|
|
1578
|
-
*
|
|
1579
|
-
*
|
|
1650
|
+
* - `kind: 'apikey'` from `credentials.json` (injected into env at TUI launch)
|
|
1651
|
+
* - explicit env var (descriptor's `envKey`)
|
|
1652
|
+
* - `kind: 'oauth'` from `credentials.json` (or legacy `cwd/.credentials.json`)
|
|
1653
|
+
*
|
|
1654
|
+
* A provider may store one of EACH kind. The preferred one lives in the
|
|
1655
|
+
* canonical file key and is flagged {@link AuthMethod.active}; the other sits
|
|
1656
|
+
* in `alternateCredKey` and is reported too, so the UI can offer to promote it.
|
|
1657
|
+
* Order within `methods` is presentational — it is no longer a resolution
|
|
1658
|
+
* order, because the active flag answers that directly.
|
|
1580
1659
|
*
|
|
1581
1660
|
* Pure read — never refreshes or rewrites the credentials file.
|
|
1582
1661
|
*/
|
|
@@ -1584,45 +1663,58 @@ function detectAuth(dataDir, registry, env = process.env) {
|
|
|
1584
1663
|
const creds = readCredentials(dataDir);
|
|
1585
1664
|
return Object.values(registry).map((descriptor) => {
|
|
1586
1665
|
const methods = [];
|
|
1587
|
-
const
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1666
|
+
const fileKey = credKeyOf(descriptor);
|
|
1667
|
+
const fileEntry = creds[fileKey];
|
|
1668
|
+
const altEntry = creds[alternateCredKey(fileKey)];
|
|
1669
|
+
const describeStored = (entry, active) => {
|
|
1670
|
+
if (entry?.kind === "apikey" && entry.value) return {
|
|
1671
|
+
source: "apikey",
|
|
1672
|
+
detail: "credentials.json",
|
|
1673
|
+
active
|
|
1674
|
+
};
|
|
1675
|
+
if (entry?.kind === "oauth" && entry.access) return {
|
|
1676
|
+
source: "oauth",
|
|
1677
|
+
detail: typeof entry.expires === "number" ? `oauth · expires ${new Date(entry.expires).toLocaleString()}` : "oauth · credentials.json",
|
|
1678
|
+
active
|
|
1679
|
+
};
|
|
1680
|
+
};
|
|
1681
|
+
const activeMethod = describeStored(fileEntry, true);
|
|
1682
|
+
if (activeMethod) methods.push(activeMethod);
|
|
1592
1683
|
if (fileEntry?.kind === "apikey" && !fileEntry.value && descriptor.customFields && descriptor.customFields.length > 0) {
|
|
1593
1684
|
const stored = fileEntry.customFields ?? {};
|
|
1594
1685
|
if (descriptor.customFields.filter((f) => f.required).every((f) => typeof stored[f.key] === "string" && stored[f.key].length > 0)) methods.push({
|
|
1595
1686
|
source: "apikey",
|
|
1596
|
-
detail: "credentials.json (configured)"
|
|
1687
|
+
detail: "credentials.json (configured)",
|
|
1688
|
+
active: true
|
|
1597
1689
|
});
|
|
1598
1690
|
}
|
|
1599
1691
|
if (descriptor.customFields && descriptor.customFields.length > 0) {
|
|
1600
1692
|
const required = descriptor.customFields.filter((f) => f.required);
|
|
1601
1693
|
if (required.length > 0 && required.every((f) => typeof env[f.envVar] === "string" && env[f.envVar].length > 0)) methods.push({
|
|
1602
1694
|
source: "env",
|
|
1603
|
-
detail: required.map((f) => f.envVar).join(", ")
|
|
1695
|
+
detail: required.map((f) => f.envVar).join(", "),
|
|
1696
|
+
active: false
|
|
1604
1697
|
});
|
|
1605
1698
|
}
|
|
1699
|
+
const alternateMethod = describeStored(altEntry, false);
|
|
1700
|
+
if (alternateMethod) methods.push(alternateMethod);
|
|
1606
1701
|
if (descriptor.envKey && env[descriptor.envKey]) methods.push({
|
|
1607
1702
|
source: "env",
|
|
1608
|
-
detail: descriptor.envKey
|
|
1703
|
+
detail: descriptor.envKey,
|
|
1704
|
+
active: false
|
|
1609
1705
|
});
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
methods.push({
|
|
1613
|
-
source: "oauth",
|
|
1614
|
-
detail
|
|
1615
|
-
});
|
|
1616
|
-
}
|
|
1706
|
+
const unique = [];
|
|
1707
|
+
for (const method of methods) if (!unique.some((seen) => seen.source === method.source)) unique.push(method);
|
|
1617
1708
|
return {
|
|
1618
1709
|
key: descriptor.key,
|
|
1619
1710
|
label: descriptor.label,
|
|
1620
|
-
available:
|
|
1621
|
-
methods
|
|
1711
|
+
available: unique.length > 0,
|
|
1712
|
+
methods: unique,
|
|
1713
|
+
...descriptor.envKey ? { envKey: descriptor.envKey } : {}
|
|
1622
1714
|
};
|
|
1623
1715
|
});
|
|
1624
1716
|
}
|
|
1625
1717
|
//#endregion
|
|
1626
|
-
export {
|
|
1718
|
+
export { openrouterDescriptor as C, renderDefaultCallbackPage as E, openaiDescriptor as S, restoreModelOptions as T, getModelInfo as _, readProviderCredential as a, modelSupportsReasoning as b, setPreferredCredential as c, BUILTIN_PROVIDERS as d, anthropicDescriptor as f, getContextWindow as g, enabledModelOptions as h, readCredentials as i, setProviderCredential as l, credKeyOf as m, applyApiKeyEnv as n, readProviderCredentialPair as o, cerebrasDescriptor as p, credentialsPath as r, removeProviderCredential as s, detectAuth as t, writeCredentials as u, localDescriptor as v, piIdOf as w, modelsForDescriptor as x, modelOptionsFor as y };
|
|
1627
1719
|
|
|
1628
|
-
//# sourceMappingURL=auth-
|
|
1720
|
+
//# sourceMappingURL=auth-BAclQnl3.js.map
|