zidane 7.0.20 → 7.0.22
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-cli.js +2 -2
- package/dist/acp.d.ts +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/{anthropic-DATE-m9f.js → anthropic-BSbDiW0J.js} +34 -4
- package/dist/anthropic-BSbDiW0J.js.map +1 -0
- package/dist/{approvals-CzrFKdu-.js → approvals-BnDsgTtD.js} +2 -2
- package/dist/{approvals-CzrFKdu-.js.map → approvals-BnDsgTtD.js.map} +1 -1
- package/dist/{auth-DD4KYv1w.js → auth-Nq-tSMb9.js} +52 -34
- package/dist/{auth-DD4KYv1w.js.map → auth-Nq-tSMb9.js.map} +1 -1
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat.d.ts +5 -5
- package/dist/chat.js +2 -2
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/daemon-cli.js +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/{index-CvGkUoNk.d.ts → index-C4mY0oKE.d.ts} +3 -21
- package/dist/index-C4mY0oKE.d.ts.map +1 -0
- package/dist/{index-CGjexO2a.d.ts → index-D2JCY11Z.d.ts} +5 -5
- package/dist/index-D2JCY11Z.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/{ipc-gce-02nV.js → ipc-Oro3uyMP.js} +2 -2
- package/dist/{ipc-gce-02nV.js.map → ipc-Oro3uyMP.js.map} +1 -1
- package/dist/ipc.d.ts +5 -5
- package/dist/ipc.d.ts.map +1 -1
- package/dist/ipc.js +3 -3
- package/dist/mcp.d.ts +1 -1
- package/dist/{oauth-D-LZ4ic-.js → oauth-CmtlmCzi.js} +142 -210
- package/dist/oauth-CmtlmCzi.js.map +1 -0
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/presets.d.ts +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/baseten.d.ts +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +1 -1
- package/dist/{providers-Bjdvmpfu.js → providers-ZucqgwU7.js} +2 -2
- package/dist/{providers-Bjdvmpfu.js.map → providers-ZucqgwU7.js.map} +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +3 -3
- package/dist/restate.d.ts +1 -1
- package/dist/{server-C3FOQvIu.js → server-HZdjqDpS.js} +18 -5
- package/dist/server-HZdjqDpS.js.map +1 -0
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/{tool-formatters-BTNnkola.d.ts → tool-formatters-GZHxP824.d.ts} +2 -2
- package/dist/{tool-formatters-BTNnkola.d.ts.map → tool-formatters-GZHxP824.d.ts.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/{transcript-anchors-DzY3KZ54.d.ts → transcript-anchors-CY50AXdF.d.ts} +2 -2
- package/dist/{transcript-anchors-DzY3KZ54.d.ts.map → transcript-anchors-CY50AXdF.d.ts.map} +1 -1
- package/dist/tui.d.ts +3 -3
- package/dist/tui.js +3 -3
- package/dist/{turn-operations-DRED3NeH.d.ts → turn-operations-CAmNETlu.d.ts} +3 -3
- package/dist/{turn-operations-DRED3NeH.d.ts.map → turn-operations-CAmNETlu.d.ts.map} +1 -1
- package/dist/types.d.ts +1 -1
- package/docs/CHAT.md +8 -0
- package/docs/IPC.md +4 -2
- package/package.json +1 -1
- package/dist/anthropic-DATE-m9f.js.map +0 -1
- package/dist/index-CGjexO2a.d.ts.map +0 -1
- package/dist/index-CvGkUoNk.d.ts.map +0 -1
- package/dist/oauth-D-LZ4ic-.js.map +0 -1
- package/dist/server-C3FOQvIu.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { A as mergeCatalogEntry, D as listModelOverlay, O as listModels, k as lookupModel } from "./openai-compat-cIeLSED_.js";
|
|
2
2
|
import { fn as ALTERNATE_CRED_KEY_SUFFIX, mn as isReservedCredKey, pn as alternateCredKey } from "./agent-LC2c1ue-.js";
|
|
3
3
|
import { t as writeFileAtomic } from "./atomic-write-B7zr1ddF.js";
|
|
4
|
-
import { m as FAST_MODE_OPTIONS, n as anthropic, p as ANTHROPIC_EXTRA_MODELS } from "./anthropic-
|
|
5
|
-
import {
|
|
4
|
+
import { m as FAST_MODE_OPTIONS, n as anthropic, p as ANTHROPIC_EXTRA_MODELS } from "./anthropic-BSbDiW0J.js";
|
|
5
|
+
import { c as withCredentialsLock, h as registerOAuthProvider, m as refreshOpenAICodexToken, p as refreshAnthropicToken } from "./oauth-CmtlmCzi.js";
|
|
6
6
|
import { arcee } from "./providers/arcee.js";
|
|
7
7
|
import { baseten } from "./providers/baseten.js";
|
|
8
8
|
import { cerebras } from "./providers/cerebras.js";
|
|
9
9
|
import { t as generatePkce } from "./pkce-t8BcPyEi.js";
|
|
10
10
|
import { n as createCursorOAuthProvider } from "./cursor-iojRXHF9.js";
|
|
11
|
-
import { n as zai, r as mistral } from "./providers-
|
|
11
|
+
import { n as zai, r as mistral } from "./providers-ZucqgwU7.js";
|
|
12
12
|
import { local } from "./providers/local.js";
|
|
13
13
|
import { openai } from "./providers/openai.js";
|
|
14
14
|
import { openrouter } from "./providers/openrouter.js";
|
|
@@ -1404,6 +1404,9 @@ function readCredentials(dataDir) {
|
|
|
1404
1404
|
if (migrated) return migrated;
|
|
1405
1405
|
return {};
|
|
1406
1406
|
}
|
|
1407
|
+
return readStoredCredentials(path);
|
|
1408
|
+
}
|
|
1409
|
+
function readStoredCredentials(path) {
|
|
1407
1410
|
try {
|
|
1408
1411
|
const raw = readFileSync(path, "utf-8");
|
|
1409
1412
|
const parsed = JSON.parse(raw);
|
|
@@ -1470,6 +1473,9 @@ function readProviderCredentialPair(dataDir, descriptor) {
|
|
|
1470
1473
|
* (first launch on a fresh machine: `~/.zidane/` may not exist yet).
|
|
1471
1474
|
*/
|
|
1472
1475
|
function writeCredentials(dataDir, creds) {
|
|
1476
|
+
withCredentialsLock(credentialsPath(dataDir), () => writeCredentialsUnlocked(dataDir, creds));
|
|
1477
|
+
}
|
|
1478
|
+
function writeCredentialsUnlocked(dataDir, creds) {
|
|
1473
1479
|
writeFileAtomic(credentialsPath(dataDir), `${JSON.stringify(creds, null, 2)}\n`, {
|
|
1474
1480
|
ensureDir: true,
|
|
1475
1481
|
mode: FILE_MODE
|
|
@@ -1490,14 +1496,17 @@ function writeCredentials(dataDir, creds) {
|
|
|
1490
1496
|
* that "switch" between each other. Dropping it on the next write self-heals.
|
|
1491
1497
|
*/
|
|
1492
1498
|
function setProviderCredential(dataDir, descriptor, cred) {
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1499
|
+
readCredentials(dataDir);
|
|
1500
|
+
return withCredentialsLock(credentialsPath(dataDir), () => {
|
|
1501
|
+
const all = readStoredCredentials(credentialsPath(dataDir));
|
|
1502
|
+
const fileKey = assertableCredKey(descriptor);
|
|
1503
|
+
const altKey = alternateCredKey(fileKey);
|
|
1504
|
+
const previous = all[fileKey];
|
|
1505
|
+
if (previous && previous.kind !== cred.kind) all[altKey] = previous;
|
|
1506
|
+
else if (all[altKey]?.kind === cred.kind) delete all[altKey];
|
|
1507
|
+
all[fileKey] = cred;
|
|
1508
|
+
writeCredentialsUnlocked(dataDir, all);
|
|
1509
|
+
});
|
|
1501
1510
|
}
|
|
1502
1511
|
/**
|
|
1503
1512
|
* Make the provider's stored `source` credential the preferred one.
|
|
@@ -1509,17 +1518,20 @@ function setProviderCredential(dataDir, descriptor, cred) {
|
|
|
1509
1518
|
* any caller that trusted it instead of refetching.
|
|
1510
1519
|
*/
|
|
1511
1520
|
function setPreferredCredential(dataDir, descriptor, source) {
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1521
|
+
readCredentials(dataDir);
|
|
1522
|
+
return withCredentialsLock(credentialsPath(dataDir), () => {
|
|
1523
|
+
const all = readStoredCredentials(credentialsPath(dataDir));
|
|
1524
|
+
const fileKey = assertableCredKey(descriptor);
|
|
1525
|
+
const altKey = alternateCredKey(fileKey);
|
|
1526
|
+
const alternate = all[altKey];
|
|
1527
|
+
if (!alternate || alternate.kind !== source) return all[fileKey]?.kind === source ? "already-active" : "not-stored";
|
|
1528
|
+
const active = all[fileKey];
|
|
1529
|
+
all[fileKey] = alternate;
|
|
1530
|
+
if (active) all[altKey] = active;
|
|
1531
|
+
else delete all[altKey];
|
|
1532
|
+
writeCredentialsUnlocked(dataDir, all);
|
|
1533
|
+
return "promoted";
|
|
1534
|
+
});
|
|
1523
1535
|
}
|
|
1524
1536
|
/**
|
|
1525
1537
|
* Sign a provider out — drops BOTH stored credentials.
|
|
@@ -1531,13 +1543,16 @@ function setPreferredCredential(dataDir, descriptor, source) {
|
|
|
1531
1543
|
* first ({@link readProviderCredentialPair}) and re-store the survivor.
|
|
1532
1544
|
*/
|
|
1533
1545
|
function removeProviderCredential(dataDir, descriptor) {
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1546
|
+
readCredentials(dataDir);
|
|
1547
|
+
return withCredentialsLock(credentialsPath(dataDir), () => {
|
|
1548
|
+
const all = readStoredCredentials(credentialsPath(dataDir));
|
|
1549
|
+
const fileKey = credKeyOf(descriptor);
|
|
1550
|
+
const altKey = alternateCredKey(fileKey);
|
|
1551
|
+
if (!(fileKey in all) && !(altKey in all)) return;
|
|
1552
|
+
delete all[fileKey];
|
|
1553
|
+
delete all[altKey];
|
|
1554
|
+
writeCredentialsUnlocked(dataDir, all);
|
|
1555
|
+
});
|
|
1541
1556
|
}
|
|
1542
1557
|
/**
|
|
1543
1558
|
* Reconcile `process.env` with the stored credentials so the harness providers
|
|
@@ -1653,11 +1668,14 @@ function migrateLegacyFile(targetPath) {
|
|
|
1653
1668
|
};
|
|
1654
1669
|
}
|
|
1655
1670
|
if (Object.keys(migrated).length === 0) return null;
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1671
|
+
return withCredentialsLock(targetPath, () => {
|
|
1672
|
+
if (existsSync(targetPath)) return readStoredCredentials(targetPath);
|
|
1673
|
+
writeFileAtomic(targetPath, `${JSON.stringify(migrated, null, 2)}\n`, {
|
|
1674
|
+
ensureDir: true,
|
|
1675
|
+
mode: FILE_MODE
|
|
1676
|
+
});
|
|
1677
|
+
return migrated;
|
|
1659
1678
|
});
|
|
1660
|
-
return migrated;
|
|
1661
1679
|
}
|
|
1662
1680
|
function isOAuthLegacy(value) {
|
|
1663
1681
|
return typeof value === "object" && value !== null && "access" in value && typeof value.access === "string";
|
|
@@ -1739,4 +1757,4 @@ function detectAuth(dataDir, registry, env = process.env) {
|
|
|
1739
1757
|
//#endregion
|
|
1740
1758
|
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 };
|
|
1741
1759
|
|
|
1742
|
-
//# sourceMappingURL=auth-
|
|
1760
|
+
//# sourceMappingURL=auth-Nq-tSMb9.js.map
|