zidane 5.12.2 → 5.12.4
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/README.md +6 -5
- package/dist/{agent-Dt3mALPV.d.ts → agent-CVTAoYS0.d.ts} +33 -2
- package/dist/agent-CVTAoYS0.d.ts.map +1 -0
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat.d.ts +6 -6
- package/dist/chat.js +2 -2
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +1 -1
- package/dist/{headless-BBwdL006.js → headless-DM5JeUiE.js} +3 -3
- package/dist/{headless-BBwdL006.js.map → headless-DM5JeUiE.js.map} +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -1
- package/dist/{index-Do7IZGW5.d.ts → index-BuIaw3r3.d.ts} +2 -2
- package/dist/{index-Do7IZGW5.d.ts.map → index-BuIaw3r3.d.ts.map} +1 -1
- package/dist/{index-BDRh3kup.d.ts → index-Gin_mFQJ.d.ts} +2 -2
- package/dist/{index-BDRh3kup.d.ts.map → index-Gin_mFQJ.d.ts.map} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +7 -7
- package/dist/{logger-C2E41UWq.d.ts → logger-CYtWKlBF.d.ts} +2 -2
- package/dist/{logger-C2E41UWq.d.ts.map → logger-CYtWKlBF.d.ts.map} +1 -1
- package/dist/{login-LF-inV4T.js → login-94imBv_3.js} +2 -2
- package/dist/{login-LF-inV4T.js.map → login-94imBv_3.js.map} +1 -1
- package/dist/{mcp-DeJ9280K.js → mcp-Bnnrt_Ps.js} +5 -2
- package/dist/{mcp-DeJ9280K.js.map → mcp-Bnnrt_Ps.js.map} +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/output/stream-json.d.ts +2 -2
- package/dist/output/stream-json.js +1 -1
- package/dist/output/terminal.d.ts +2 -2
- package/dist/{presets-sIs25Per.js → presets-BorC0fVx.js} +2 -2
- package/dist/{presets-sIs25Per.js.map → presets-BorC0fVx.js.map} +1 -1
- package/dist/presets.d.ts +2 -2
- package/dist/presets.js +1 -1
- package/dist/{providers-psx2_0LB.js → providers-C_zClj1S.js} +338 -8
- package/dist/providers-C_zClj1S.js.map +1 -0
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +2 -2
- package/dist/restate.d.ts +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/skills.d.ts +2 -2
- package/dist/{tool-formatters-COmtAwgF.d.ts → tool-formatters-Chwpa2Ix.d.ts} +2 -2
- package/dist/tool-formatters-Chwpa2Ix.d.ts.map +1 -0
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/{tools-Dfvr9bBs.js → tools-BlMV33N1.js} +46 -3
- package/dist/tools-BlMV33N1.js.map +1 -0
- package/dist/tools.d.ts +2 -2
- package/dist/tools.js +1 -1
- package/dist/{transcript-anchors-BtOrrlmN.js → transcript-anchors-D2zBge6D.js} +5 -5
- package/dist/{transcript-anchors-BtOrrlmN.js.map → transcript-anchors-D2zBge6D.js.map} +1 -1
- package/dist/{transcript-anchors-DLa8m9_E.d.ts → transcript-anchors-LMTpzn6r.d.ts} +5 -5
- package/dist/{transcript-anchors-DLa8m9_E.d.ts.map → transcript-anchors-LMTpzn6r.d.ts.map} +1 -1
- package/dist/tui.d.ts +3 -3
- package/dist/tui.js +5 -5
- package/dist/{turn-operations-ifKg5muR.d.ts → turn-operations-DyOAiVE3.d.ts} +3 -3
- package/dist/{turn-operations-ifKg5muR.d.ts.map → turn-operations-DyOAiVE3.d.ts.map} +1 -1
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
- package/dist/agent-Dt3mALPV.d.ts.map +0 -1
- package/dist/providers-psx2_0LB.js.map +0 -1
- package/dist/tool-formatters-COmtAwgF.d.ts.map +0 -1
- package/dist/tools-Dfvr9bBs.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as utf8ByteLength } from "./utils-ngQzYzZD.js";
|
|
2
2
|
import { t as buildContextBreakdown } from "./context-breakdown-kO-pDsay.js";
|
|
3
3
|
import { a as formatTaskStatus, i as formatDuration, o as formatTaskSummary, s as previewLine } from "./format-BNOXpl-1.js";
|
|
4
|
-
import { a as
|
|
4
|
+
import { _ as ANTHROPIC_EXTRA_MODELS, a as local, c as generatePkce, f as arcee, g as writeFileAtomicAsync, i as openai, l as cerebras, n as createXaiOAuthProvider, p as anthropic, r as openrouter, s as createCursorOAuthProvider, t as xai, u as baseten, v as FAST_MODE_OPTIONS } from "./providers-C_zClj1S.js";
|
|
5
5
|
import { i as AgentProviderError, l as errorMessage, m as toTypedError, n as AgentBudgetExceededError, o as AgentToolPairingError, t as AgentAbortedError, u as isAbortLikeError } from "./errors-BpPfMo_4.js";
|
|
6
6
|
import { F as canonicalizePrompt, O as appendStaticSection, P as buildPromptMessage, a as detectTurnInterruption, c as filterUnresolvedToolUses, d as remintDuplicateToolCallIds, f as resolveContentRefsInMessages, j as renderSystemForWire, n as SYNTHETIC_TOOL_RESULT_PLACEHOLDER, o as ensureEndsWithUserMessage, s as ensureToolResultPairing } from "./messages-9wyCuvLF.js";
|
|
7
7
|
import { n as reconcileImageMediaType } from "./media-sniff-Bn76JxAu.js";
|
|
@@ -10,7 +10,7 @@ import { r as createProcessContext, t as resolveDetachedTasksCapability } from "
|
|
|
10
10
|
import { i as styleReplacementForVia, n as resolveOldString, r as stripLineNumberPrefixes, t as describeVia } from "./edit-utils-EGosADZq.js";
|
|
11
11
|
import { a as markReadStateElided, n as getToolDedupState, o as readStateKey, r as hashContent, s as resolveReadStateMap } from "./read-state-DH2IuQHX.js";
|
|
12
12
|
import { S as escapeXml, d as buildCatalog, n as stripShellInterpolations, p as installAllowedToolsGate, r as resolveSkills, t as interpolateShellCommands, v as validateResourcePathReal, x as createSkillActivationState } from "./interpolate-Da6kPCXn.js";
|
|
13
|
-
import { n as connectMcpServers } from "./mcp-
|
|
13
|
+
import { n as connectMcpServers } from "./mcp-Bnnrt_Ps.js";
|
|
14
14
|
import { n as flattenTurns, r as formatTokenUsage, t as effectiveInputFromTurn } from "./stats-DAKBEKjc.js";
|
|
15
15
|
import { n as shellQuote, t as alwaysQuote } from "./shell-quote-BmnhZmdM.js";
|
|
16
16
|
import { isAbsolute, join, resolve } from "node:path";
|
|
@@ -759,6 +759,24 @@ function registerCursorOAuthProvider() {
|
|
|
759
759
|
}
|
|
760
760
|
return provider;
|
|
761
761
|
}
|
|
762
|
+
let xaiRegistered = false;
|
|
763
|
+
/**
|
|
764
|
+
* Register xAI Grok with pi-ai's OAuth registry.
|
|
765
|
+
*
|
|
766
|
+
* pi-ai ships an xAI *API-key* provider, but no OAuth one — so
|
|
767
|
+
* `getOAuthApiKey('xai-oauth', …)` (lazy refresh in `resolveOAuthApiKey`)
|
|
768
|
+
* would throw "Unknown OAuth provider" until we register our flow. The
|
|
769
|
+
* callback page routes through the supplied renderer so the post-redirect
|
|
770
|
+
* HTML matches zidane's theme. Call once at startup; idempotent.
|
|
771
|
+
*/
|
|
772
|
+
function registerXaiOAuthProvider(renderPage) {
|
|
773
|
+
const provider = createXaiOAuthProvider(renderPage);
|
|
774
|
+
if (!xaiRegistered) {
|
|
775
|
+
registerOAuthProvider(provider);
|
|
776
|
+
xaiRegistered = true;
|
|
777
|
+
}
|
|
778
|
+
return provider;
|
|
779
|
+
}
|
|
762
780
|
//#endregion
|
|
763
781
|
//#region src/chat/providers.ts
|
|
764
782
|
/**
|
|
@@ -770,6 +788,12 @@ function registerCursorOAuthProvider() {
|
|
|
770
788
|
*/
|
|
771
789
|
const { anthropic: anthropicOAuthProvider, openaiCodex: openaiCodexOAuthProvider } = createCustomCallbackOAuthProviders(renderDefaultCallbackPage);
|
|
772
790
|
registerCursorOAuthProvider();
|
|
791
|
+
/**
|
|
792
|
+
* xAI Grok isn't built into pi-ai's OAuth registry (only its API-key provider
|
|
793
|
+
* is), so register our loopback-PKCE flow — themed via `renderDefaultCallbackPage`
|
|
794
|
+
* — so lazy token refresh resolves through it.
|
|
795
|
+
*/
|
|
796
|
+
const xaiOAuthProvider = registerXaiOAuthProvider(renderDefaultCallbackPage);
|
|
773
797
|
/** Convenience accessor — returns `credentialFileKey ?? key`. */
|
|
774
798
|
function credKeyOf(desc) {
|
|
775
799
|
return desc.credentialFileKey ?? desc.key;
|
|
@@ -817,6 +841,24 @@ const cerebrasDescriptor = {
|
|
|
817
841
|
envKey: "CEREBRAS_API_KEY",
|
|
818
842
|
apiKeyPlaceholder: "csk-…"
|
|
819
843
|
};
|
|
844
|
+
/**
|
|
845
|
+
* xAI Grok. Supports BOTH a static API key (`XAI_API_KEY`) and the
|
|
846
|
+
* SuperGrok / X Premium+ OAuth subscription, so the wizard offers both methods.
|
|
847
|
+
* Models come from pi-ai's `xai` registry (OpenAI-compatible endpoint), shared
|
|
848
|
+
* by both auth modes.
|
|
849
|
+
*/
|
|
850
|
+
const xaiDescriptor = {
|
|
851
|
+
key: "xai",
|
|
852
|
+
label: "xAI Grok",
|
|
853
|
+
factory: xai,
|
|
854
|
+
defaultModel: "grok-4.3",
|
|
855
|
+
envKey: "XAI_API_KEY",
|
|
856
|
+
apiKeyPlaceholder: "xai-…",
|
|
857
|
+
oauthProvider: xaiOAuthProvider,
|
|
858
|
+
oauthHint: "SuperGrok / X Premium+ subscription",
|
|
859
|
+
credentialFileKey: "xai-oauth",
|
|
860
|
+
piProviderId: "xai"
|
|
861
|
+
};
|
|
820
862
|
const arceeDescriptor = {
|
|
821
863
|
key: "arcee",
|
|
822
864
|
label: "Arcee",
|
|
@@ -1065,6 +1107,7 @@ const BUILTIN_PROVIDERS = {
|
|
|
1065
1107
|
openai: openaiDescriptor,
|
|
1066
1108
|
openrouter: openrouterDescriptor,
|
|
1067
1109
|
cerebras: cerebrasDescriptor,
|
|
1110
|
+
xai: xaiDescriptor,
|
|
1068
1111
|
arcee: arceeDescriptor,
|
|
1069
1112
|
baseten: basetenDescriptor,
|
|
1070
1113
|
local: localDescriptor
|
|
@@ -9098,4 +9141,4 @@ const writeFile$1 = {
|
|
|
9098
9141
|
//#endregion
|
|
9099
9142
|
export { restoreModelOptions as $, PERSISTENCE_PREVIEW_BYTES as A, cerebrasDescriptor as B, stableStringify as C, TOOL_USE_SKIPPED_MESSAGE as D, TOOL_USE_CANCELLED_MESSAGE as E, resolvePersistDir as F, getModelInfo as G, effectiveContextWindow as H, resolveTasksDir as I, modelSupportsReasoning as J, localDescriptor as K, BUILTIN_PROVIDERS as L, cleanupPersistedSession as M, maybePersistToolResult as N, validateToolArgs as O, resolveMcpWarningsDir as P, piIdOf as Q, OUTPUT_RESERVE_TOKENS as R, normalizeShellCommand as S, SHELL_CASCADE_CANCEL_MESSAGE as T, enabledModelOptions as U, credKeyOf as V, getContextWindow as W, openaiDescriptor as X, modelsForDescriptor as Y, openrouterDescriptor as Z, createSkillsReadTool as _, multiEdit as a, defaultRepeatGuardNormalize as b, grep as c, createAgent as d, WAIT_TASK_TIMED_OUT_PREFIX as f, createSkillsRunScriptTool as g, createSkillsUseTool as h, readFile$1 as i, buildPersistedStub as j, PERSISTED_STUB_PREFIX as k, glob$1 as l, createToolSearchTool as m, createSpawnTool as n, listFiles as o, waitTask as p, modelOptionsFor as q, shellKill as r, createInteractionTool as s, writeFile$1 as t, edit as u, createShellTool as v, INTERRUPT_MESSAGE_FOR_TOOL_USE as w, defaultRepeatGuardTracked as x, shell as y, anthropicDescriptor as z };
|
|
9100
9143
|
|
|
9101
|
-
//# sourceMappingURL=tools-
|
|
9144
|
+
//# sourceMappingURL=tools-BlMV33N1.js.map
|