zidane 6.3.7 → 6.3.9
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-CAX3tOEY.js → acp-dthcOo20.js} +3 -3
- package/dist/{acp-CAX3tOEY.js.map → acp-dthcOo20.js.map} +1 -1
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-Emjeo5Ad.js → agent-XcXGROHb.js} +38 -18
- package/dist/agent-XcXGROHb.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat.d.ts +4 -4
- package/dist/chat.js +2 -2
- package/dist/{context-transport-3b0qpM2m.js → context-transport-DIVijS-Z.js} +3 -3
- package/dist/{context-transport-3b0qpM2m.js.map → context-transport-DIVijS-Z.js.map} +1 -1
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -1
- package/dist/{index-DTIe4e1R.d.ts → index-DEqQQ8tN.d.ts} +42 -6
- package/dist/index-DEqQQ8tN.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/{login-C41DcRK-.js → login-COaVj9kG.js} +35 -5
- package/dist/{login-C41DcRK-.js.map → login-COaVj9kG.js.map} +1 -1
- package/dist/{mcp-8bEHU4WB.js → mcp-CzUy5luo.js} +3 -3
- package/dist/{mcp-8bEHU4WB.js.map → mcp-CzUy5luo.js.map} +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +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/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/openrouter.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/{read-state-CNyeMG7W.js → read-state-Dt7UbVsd.js} +26 -2
- package/dist/read-state-Dt7UbVsd.js.map +1 -0
- package/dist/restate.d.ts +1 -1
- package/dist/restate.js +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/{stdio-BKFpPNvX.js → stdio-D7Nf908h.js} +2 -2
- package/dist/{stdio-BKFpPNvX.js.map → stdio-D7Nf908h.js.map} +1 -1
- package/dist/{stdio-loader-DFDpBwwI.js → stdio-loader-C3ydQZyZ.js} +2 -2
- package/dist/{stdio-loader-DFDpBwwI.js.map → stdio-loader-C3ydQZyZ.js.map} +1 -1
- package/dist/{tool-formatters-B_dGfYqT.d.ts → tool-formatters-B0y_dlZ-.d.ts} +2 -2
- package/dist/{tool-formatters-B_dGfYqT.d.ts.map → tool-formatters-B0y_dlZ-.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/tools.js +2 -2
- package/dist/{transcript-anchors-CqxIlrhv.d.ts → transcript-anchors-B93mTVIi.d.ts} +2 -2
- package/dist/{transcript-anchors-CqxIlrhv.d.ts.map → transcript-anchors-B93mTVIi.d.ts.map} +1 -1
- package/dist/{transcript-anchors-DhBTqTyc.js → transcript-anchors-BeCn35OE.js} +3 -3
- package/dist/{transcript-anchors-DhBTqTyc.js.map → transcript-anchors-BeCn35OE.js.map} +1 -1
- package/dist/tui.d.ts +3 -3
- package/dist/tui.js +52 -8
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-D7JhuW_X.d.ts → turn-operations-B-t6VR01.d.ts} +3 -3
- package/dist/{turn-operations-D7JhuW_X.d.ts.map → turn-operations-B-t6VR01.d.ts.map} +1 -1
- package/dist/types-BIarq1qE.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CHAT.md +1 -1
- package/docs/TUI.md +4 -2
- package/package.json +1 -1
- package/dist/agent-Emjeo5Ad.js.map +0 -1
- package/dist/index-DTIe4e1R.d.ts.map +0 -1
- package/dist/read-state-CNyeMG7W.js.map +0 -1
package/dist/acp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as ExecutionContext } from "./types-M2DauK2D.js";
|
|
2
|
-
import { Km as ToolDef, Mm as ToolResultContent, Pp as AgentBehavior, Vm as TurnUsage, Wi as Agent, Zp as McpServerConfig, _m as SessionContentBlock, cm as PromptPart, dh as Session, hh as SessionStore, qi as AgentOptions, rf as Provider, t as Preset } from "./index-
|
|
2
|
+
import { Km as ToolDef, Mm as ToolResultContent, Pp as AgentBehavior, Vm as TurnUsage, Wi as Agent, Zp as McpServerConfig, _m as SessionContentBlock, cm as PromptPart, dh as Session, hh as SessionStore, qi as AgentOptions, rf as Provider, t as Preset } from "./index-DEqQQ8tN.js";
|
|
3
3
|
import { Readable, Writable } from "node:stream";
|
|
4
4
|
|
|
5
5
|
//#region src/acp/types.d.ts
|
package/dist/acp.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as createJsonRpcConnection, a as wrapToolsForAcpClient, c as sessionBlocksToAcp, g as JsonRpcRemoteError, i as withAcpDefaultTools, l as stopReasonFromRun, n as AcpProtocolError, o as acpMcpServersToZidane, r as createAcpServer, s as acpPromptToPromptParts, t as runAcpStdioServer, u as toolResultToAcpContent } from "./acp-
|
|
1
|
+
import { _ as createJsonRpcConnection, a as wrapToolsForAcpClient, c as sessionBlocksToAcp, g as JsonRpcRemoteError, i as withAcpDefaultTools, l as stopReasonFromRun, n as AcpProtocolError, o as acpMcpServersToZidane, r as createAcpServer, s as acpPromptToPromptParts, t as runAcpStdioServer, u as toolResultToAcpContent } from "./acp-dthcOo20.js";
|
|
2
2
|
export { AcpProtocolError, JsonRpcRemoteError, acpMcpServersToZidane, acpPromptToPromptParts, createAcpServer, createJsonRpcConnection, runAcpStdioServer, sessionBlocksToAcp, stopReasonFromRun, toolResultToAcpContent, withAcpDefaultTools, wrapToolsForAcpClient };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as rewriteMessagesToWire, i as rewriteContentToCanonical, n as buildAliasMaps, o as toCanonicalName, r as buildSanitizedWireAliases, s as toWireName, t as augmentMcpDoubleUnderscoreAliases } from "./aliasing-lVFbm81n.js";
|
|
2
2
|
import { a as isWireTurn, c as toolOutputByteLength, i as documentBlockMarker, l as toolResultToText, o as sanitizeToolResultMetadata, s as toolOutputBudgetByteLength, t as DEFAULT_AGENT_CLOCK } from "./types-BIarq1qE.js";
|
|
3
3
|
import { i as styleReplacementForVia, n as resolveOldString, r as stripLineNumberPrefixes, t as describeVia } from "./edit-utils-EGosADZq.js";
|
|
4
|
-
import { a as hydrateReadStateFromSessionAsync, c as resolveReadStateMap, n as getToolDedupState, o as markReadStateElided, r as hashContent, s as
|
|
4
|
+
import { a as hydrateReadStateFromSessionAsync, c as readStateKey, l as resolveReadStateMap, n as getToolDedupState, o as markReadStateElided, r as hashContent, s as noteStaleRejection, t as getReadState, u as staleRefusalHint } from "./read-state-Dt7UbVsd.js";
|
|
5
5
|
import { n as estimateTokens, r as utf8ByteLength } from "./utils-ngQzYzZD.js";
|
|
6
6
|
import { t as buildContextBreakdown } from "./context-breakdown-Dzo25N45.js";
|
|
7
7
|
import { a as formatDuration, c as previewLine, o as formatTaskStatus, s as formatTaskSummary } from "./format-BF745pLL.js";
|
|
@@ -14,7 +14,7 @@ import { C as stripShellInterpolations, O as validateResourcePathReal, S as inte
|
|
|
14
14
|
import { n as writeFileAtomicAsync, t as writeFileAtomic } from "./atomic-write-B7zr1ddF.js";
|
|
15
15
|
import { r as createLogger, t as consoleSink } from "./logger-DBX9uYOw.js";
|
|
16
16
|
import { n as reconcileImageMediaType } from "./media-sniff-UKijEaiQ.js";
|
|
17
|
-
import { d as wrapDiscoveredMcpTools, i as deriveMcpToolMeta, n as connectMcpServers, s as nonOwningMcpView } from "./mcp-
|
|
17
|
+
import { d as wrapDiscoveredMcpTools, i as deriveMcpToolMeta, n as connectMcpServers, s as nonOwningMcpView } from "./mcp-CzUy5luo.js";
|
|
18
18
|
import { E as canonicalizePrompt, T as buildPromptMessage } from "./openai-compat-Bf9uMTMa.js";
|
|
19
19
|
import { appendStaticSection, renderSystemForWire } from "./prompt.js";
|
|
20
20
|
import { a as detectTurnInterruption, c as ensureToolResultPairing, l as filterUnresolvedToolUses, m as resolveContentRefsInMessages, n as SYNTHETIC_TOOL_RESULT_PLACEHOLDER, p as remintDuplicateToolCallIds, s as ensureEndsWithUserMessage } from "./messages-DoHRwMw-.js";
|
|
@@ -2877,6 +2877,7 @@ const edit = {
|
|
|
2877
2877
|
ctx.reportOutcome?.("failed");
|
|
2878
2878
|
return `Edit error: file not found: ${target}.${hint}`;
|
|
2879
2879
|
}
|
|
2880
|
+
let drift = null;
|
|
2880
2881
|
if (ctx.behavior?.requireReadBeforeEdit) {
|
|
2881
2882
|
const readState = resolveReadStateMap(ctx);
|
|
2882
2883
|
if (readState) {
|
|
@@ -2884,23 +2885,26 @@ const edit = {
|
|
|
2884
2885
|
const prior = readState.get(absKey);
|
|
2885
2886
|
if (!prior) {
|
|
2886
2887
|
ctx.reportOutcome?.("failed");
|
|
2887
|
-
return `Edit error: ${target} has not been read in this session. Call read_file first so the edit applies against the current contents.`;
|
|
2888
|
-
}
|
|
2889
|
-
if (prior.contentHash !== hashContent(original)) {
|
|
2890
|
-
ctx.reportOutcome?.("failed");
|
|
2891
|
-
return `Edit error: ${target} has changed on disk since the last read. Re-read the file before editing.`;
|
|
2888
|
+
return `Edit error: ${target} has not been read in this session. Call read_file first so the edit applies against the current contents — reads through shell (cat, grep, sed) don't register.`;
|
|
2892
2889
|
}
|
|
2890
|
+
if (prior.contentHash !== hashContent(original)) drift = {
|
|
2891
|
+
readState,
|
|
2892
|
+
absKey,
|
|
2893
|
+
prior
|
|
2894
|
+
};
|
|
2893
2895
|
}
|
|
2894
2896
|
}
|
|
2895
2897
|
const match = resolveOldString(original, find);
|
|
2896
2898
|
if (!match) {
|
|
2897
|
-
const preview = nearestMatchPreview(original, find);
|
|
2898
2899
|
ctx.reportOutcome?.("failed");
|
|
2900
|
+
if (drift) return staleEditRefusal(target, drift);
|
|
2901
|
+
const preview = nearestMatchPreview(original, find);
|
|
2899
2902
|
return preview ? `Edit error: old_string not found in ${target}. Closest match in the file: ${preview}` : `Edit error: old_string not found in ${target}.`;
|
|
2900
2903
|
}
|
|
2901
2904
|
const { actual, occurrences, via } = match;
|
|
2902
2905
|
if (occurrences > 1 && !replaceAll) {
|
|
2903
2906
|
ctx.reportOutcome?.("failed");
|
|
2907
|
+
if (drift) return staleEditRefusal(target, drift);
|
|
2904
2908
|
return `Edit error: old_string appears ${occurrences} times in ${target}. Pass replace_all=true or expand old_string for uniqueness.`;
|
|
2905
2909
|
}
|
|
2906
2910
|
const styledReplacement = styleReplacementForVia(replacement, via, actual);
|
|
@@ -2918,15 +2922,24 @@ const edit = {
|
|
|
2918
2922
|
...prior,
|
|
2919
2923
|
contentHash: hashContent(updated),
|
|
2920
2924
|
mtimeMs: Date.now(),
|
|
2921
|
-
elided: true
|
|
2925
|
+
elided: true,
|
|
2926
|
+
staleRejections: 0
|
|
2922
2927
|
});
|
|
2923
2928
|
}
|
|
2924
2929
|
ctx.reportOutcome?.("edited");
|
|
2925
2930
|
const viaNote = via === "exact" ? "" : ` (old_string was not found verbatim; matched via ${describeVia(via)})`;
|
|
2926
|
-
return `Edited ${target}: replaced ${occurrences} occurrence${occurrences === 1 ? "" : "s"}.${viaNote}`;
|
|
2931
|
+
return `Edited ${target}: replaced ${occurrences} occurrence${occurrences === 1 ? "" : "s"}.${viaNote}${drift ? ` Note: the file had changed on disk since your last read — old_string still anchored cleanly, but re-read before further edits.` : ""}`;
|
|
2927
2932
|
}
|
|
2928
2933
|
};
|
|
2929
2934
|
/**
|
|
2935
|
+
* Drift refusal for `edit`: records the rejection against the read-state
|
|
2936
|
+
* entry so consecutive refusals escalate from "re-read the file" to naming
|
|
2937
|
+
* the external-writer hypothesis — see {@link staleRefusalHint}.
|
|
2938
|
+
*/
|
|
2939
|
+
function staleEditRefusal(target, drift) {
|
|
2940
|
+
return `Edit error: ${target} has changed on disk since the last read. Re-read the file before editing.${staleRefusalHint(noteStaleRejection(drift.readState, drift.absKey, drift.prior))}`;
|
|
2941
|
+
}
|
|
2942
|
+
/**
|
|
2930
2943
|
* Find the line that shares the longest common prefix with the needle's first
|
|
2931
2944
|
* line. Cheap heuristic — better than nothing for the common "model has a typo"
|
|
2932
2945
|
* case (off-by-one indent, trailing whitespace, escape mismatch).
|
|
@@ -3619,6 +3632,7 @@ const multiEdit = {
|
|
|
3619
3632
|
ctx.reportOutcome?.("failed");
|
|
3620
3633
|
return `multi_edit error: file not found: ${target}.${hint}`;
|
|
3621
3634
|
}
|
|
3635
|
+
let drift = null;
|
|
3622
3636
|
if (ctx.behavior?.requireReadBeforeEdit) {
|
|
3623
3637
|
const readState = resolveReadStateMap(ctx);
|
|
3624
3638
|
if (readState) {
|
|
@@ -3626,12 +3640,13 @@ const multiEdit = {
|
|
|
3626
3640
|
const prior = readState.get(absKey);
|
|
3627
3641
|
if (!prior) {
|
|
3628
3642
|
ctx.reportOutcome?.("failed");
|
|
3629
|
-
return `multi_edit error: ${target} has not been read in this session. Call read_file first so the edits apply against the current contents.`;
|
|
3630
|
-
}
|
|
3631
|
-
if (prior.contentHash !== hashContent(current)) {
|
|
3632
|
-
ctx.reportOutcome?.("failed");
|
|
3633
|
-
return `multi_edit error: ${target} has changed on disk since the last read. Re-read the file before editing.`;
|
|
3643
|
+
return `multi_edit error: ${target} has not been read in this session. Call read_file first so the edits apply against the current contents — reads through shell (cat, grep, sed) don't register.`;
|
|
3634
3644
|
}
|
|
3645
|
+
if (prior.contentHash !== hashContent(current)) drift = {
|
|
3646
|
+
readState,
|
|
3647
|
+
absKey,
|
|
3648
|
+
prior
|
|
3649
|
+
};
|
|
3635
3650
|
}
|
|
3636
3651
|
}
|
|
3637
3652
|
const outcomes = [];
|
|
@@ -3698,10 +3713,14 @@ const multiEdit = {
|
|
|
3698
3713
|
...prior,
|
|
3699
3714
|
contentHash: hashContent(current),
|
|
3700
3715
|
mtimeMs: Date.now(),
|
|
3701
|
-
elided: true
|
|
3716
|
+
elided: true,
|
|
3717
|
+
staleRejections: 0
|
|
3702
3718
|
});
|
|
3703
3719
|
}
|
|
3704
|
-
} else
|
|
3720
|
+
} else {
|
|
3721
|
+
ctx.reportOutcome?.("failed");
|
|
3722
|
+
if (drift) return `multi_edit error: ${target} has changed on disk since the last read. Re-read the file before editing.${staleRefusalHint(noteStaleRejection(drift.readState, drift.absKey, drift.prior))}`;
|
|
3723
|
+
}
|
|
3705
3724
|
const n = steps.length;
|
|
3706
3725
|
let header;
|
|
3707
3726
|
if (appliedCount === n) header = `Edited ${target}: applied ${n} edit${n === 1 ? "" : "s"} (${totalReplacements} replacement${totalReplacements === 1 ? "" : "s"}).`;
|
|
@@ -3713,6 +3732,7 @@ const multiEdit = {
|
|
|
3713
3732
|
if (o.kind === "failed") failureLines.push(`edit #${i + 1} failed: ${o.reason}`);
|
|
3714
3733
|
}
|
|
3715
3734
|
const parts = [header];
|
|
3735
|
+
if (drift && appliedCount > 0) parts.push(`Note: the file had changed on disk since your last read — the applied edits anchored cleanly against the current content, but re-read before further edits.`);
|
|
3716
3736
|
if (viaNotes.length > 0) parts.push(viaNotes.join("\n"));
|
|
3717
3737
|
if (failureLines.length > 0) parts.push(failureLines.join("\n"));
|
|
3718
3738
|
if (failedCount > 0) parts.push(annotationFor(outcomes));
|
|
@@ -15918,4 +15938,4 @@ function createAgent(rawOptions) {
|
|
|
15918
15938
|
//#endregion
|
|
15919
15939
|
export { removeInstalledExtension as $, readKeybindings as $t, NO_TOOLS_PREAMBLE as A, looksBinary as At, stripImagesFromTurns as B, validateToolArgs as Bt, resolveTasksDir as C, shouldAutoCompact as Cn, createSkillsRunScriptTool as Ct, selectRecentFiles as D, stableStringify as Dn, shell as Dt, selectFilesFromSession as E, normalizeShellCommand as En, createShellTool as Et, buildTailCompactPrompt as F, listFiles as Ft, EMPTY_EXTENSION_REGISTRY as G, KEYBINDING_KEY_COL_WIDTH as Gt, truncateHeadForPtlRetry as H, DEFAULT_KEYBINDINGS as Ht, buildUpToCompactPrompt as I, createInteractionTool as It, fetchExtensionSource as J, groupBindings as Jt, createExtensionPromptBridge as K, ensureKeybindingsFile as Kt, ANCHOR_PREVIEW_MAX_CHARS as L, grep as Lt, buildCompactPrompt as M, createModelSearchTool as Mt, buildFromCompactPrompt as N, formatModelLine as Nt, compactConversation as O, tailTruncate as Ot, buildFullCompactPrompt as P, matchModelEntries as Pt, readExtensionInstallProvenance as Q, parseBindingSpec as Qt, anchorPreviewFor as R, glob as Rt, resolveSessionDir as S, effectiveContextWindow as Sn, createSkillsUseTool as St, selectFilesFromReadState as T, defaultRepeatGuardTracked as Tn, shellKill as Tt, CompactInvalidInputError as U, KEYBINDING_DEFS as Ut, summaryToTurn as V, resolveStorageDirs as Vt, CompactPromptTooLongError as W, KEYBINDING_DEF_BY_ACTION as Wt, listExtensionCandidates as X, matchesBinding as Xt, installExtensionFromSpec as Y, keybindingsPath as Yt, parseExtensionInstallSource as Z, mergeKeybindings as Zt, rehomePersistedStubs as _, resolveExtensionConfigValue as _n, WAIT_TASK_TIMED_OUT_PREFIX as _t, SHELL_CASCADE_CANCEL_MESSAGE as a, defaultExtensionScanPaths as an, composeExtensionPreset as at, resolveMcpWarningsDir as b, AUTO_COMPACT_MIN_GROWTH_FRACTION as bn, createSpawnTool as bt, applyCompactSummaryCutoff as c, isExtensionDefinition as cn, mergeContributions as ct, PERSISTED_STUB_PREFIX as d, defineExtension as dn, createWorkspaceSurface as dt, readKeybindingsRaw as en, updateInstalledExtension as et, PERSISTENCE_PREVIEW_BYTES as f, clampExtensionConfigNumber as fn, composePresets as ft, migrateSessionArtifactDirs as g, resolveExtensionConfig as gn, writeFile$1 as gt, maybePersistToolResult as h, isValidExtensionConfigValue as hn, basic_default as ht, INTERRUPT_MESSAGE_FOR_TOOL_USE as i, ENTRY_CANDIDATES as in, buildExtensionRegistry as it, TRAILER as j, multiEdit as jt, BASE_INSTRUCTIONS as k, readFile$1 as kt, collectNewlyStaleReadPaths as l, parseExtensionScanPathEnv as ln, partitionExtensionCatalog as lt, cleanupPersistedSession as m, isValidExtensionConfigItem as mn, basicTools as mt, normalizeProviders as n, stripJsonComments as nn, discoverAndBuildExtensionRegistry as nt, TOOL_USE_CANCELLED_MESSAGE as o, discoverExtensions as on, disposeExtensionRegistry as ot, buildPersistedStub as p, coerceExtensionConfigInput as pn, definePreset as pt, ExtensionInstallError as q, formatBindingForDisplay as qt, resolveModelTargets as r, registerExtensionHostModules as rn, buildExtensionPreset as rt, TOOL_USE_SKIPPED_MESSAGE as s, inlineLoadedExtension as sn, filterExtensionRegistry as st, createAgent as t, resolveExtensionKeybindings as tn, createExtensionHud as tt, renderStaleReadNotice as u, scanExtensionDirectories as un, createExtensionHostRuntimeBridge as ut, resolveLegacyPersistDir as v, sanitizeExtensionConfigActionPatch as vn, waitTask as vt, buildPostCompactAttachments as w, defaultRepeatGuardNormalize as wn, createSkillsReadTool as wt, resolvePersistDir as x, OUTPUT_RESERVE_TOKENS as xn, isSpawnTool as xt, resolveLegacySessionDir as y, toWireConfigSchema as yn, createToolSearchTool as yt, sliceForCompaction as z, edit as zt };
|
|
15920
15940
|
|
|
15921
|
-
//# sourceMappingURL=agent-
|
|
15941
|
+
//# sourceMappingURL=agent-XcXGROHb.js.map
|