zidane 5.6.11 → 5.6.13
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 +19 -2
- package/dist/{agent-C9AKTU_V.d.ts → agent-ClkpElCZ.d.ts} +540 -55
- package/dist/agent-ClkpElCZ.d.ts.map +1 -0
- package/dist/chat.d.ts +47 -17
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +3 -3
- package/dist/{index-6f4T7Gc0.d.ts → index-CTDMMdIy.d.ts} +348 -3
- package/dist/index-CTDMMdIy.d.ts.map +1 -0
- package/dist/{index-DPN7TcXK.d.ts → index-v3Tzobqr.d.ts} +2 -2
- package/dist/{index-DPN7TcXK.d.ts.map → index-v3Tzobqr.d.ts.map} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +169 -8
- package/dist/index.js.map +1 -1
- package/dist/{login-BindcfKi.js → login-DS3sf6b5.js} +4 -4
- package/dist/{login-BindcfKi.js.map → login-DS3sf6b5.js.map} +1 -1
- package/dist/{mcp-0jRkIV0g.js → mcp-DGeB7-3D.js} +13 -2
- package/dist/mcp-DGeB7-3D.js.map +1 -0
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/{messages-BfmXLDT4.js → messages-Dym8S_YH.js} +303 -8
- package/dist/messages-Dym8S_YH.js.map +1 -0
- package/dist/{presets-CmzMeWg2.js → presets-CZXS_87d.js} +2 -2
- package/dist/{presets-CmzMeWg2.js.map → presets-CZXS_87d.js.map} +1 -1
- package/dist/presets.d.ts +2 -2
- package/dist/presets.js +1 -1
- package/dist/{providers-C_ahnRBS.js → providers-beXyD9W9.js} +137 -21
- package/dist/providers-beXyD9W9.js.map +1 -0
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +3 -3
- package/dist/restate.d.ts +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/{session-PUzXZlG6.js → session-BRIsmBSY.js} +5 -2
- package/dist/session-BRIsmBSY.js.map +1 -0
- package/dist/session.d.ts +2 -2
- package/dist/session.js +3 -3
- package/dist/skills.d.ts +2 -2
- package/dist/{tools-CxOfTt3R.js → tools-DE9pR_NG.js} +515 -116
- package/dist/tools-DE9pR_NG.js.map +1 -0
- package/dist/tools.d.ts +3 -3
- package/dist/tools.js +1 -1
- package/dist/{transcript-anchors-DDCHSDdX.d.ts → transcript-anchors-D0TR6djV.d.ts} +4 -4
- package/dist/transcript-anchors-D0TR6djV.d.ts.map +1 -0
- package/dist/tui.d.ts +2 -2
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +12 -8
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-CxE8BBau.js → turn-operations-6Yls2HuG.js} +907 -42
- package/dist/turn-operations-6Yls2HuG.js.map +1 -0
- package/dist/types-oKPBdCmL.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/docs/ARCHITECTURE.md +101 -20
- package/docs/CHAT.md +27 -5
- package/docs/RESTATE.md +1 -1
- package/docs/SKILL.md +39 -3
- package/package.json +5 -2
- package/dist/agent-C9AKTU_V.d.ts.map +0 -1
- package/dist/index-6f4T7Gc0.d.ts.map +0 -1
- package/dist/mcp-0jRkIV0g.js.map +0 -1
- package/dist/messages-BfmXLDT4.js.map +0 -1
- package/dist/providers-C_ahnRBS.js.map +0 -1
- package/dist/session-PUzXZlG6.js.map +0 -1
- package/dist/tools-CxOfTt3R.js.map +0 -1
- package/dist/transcript-anchors-DDCHSDdX.d.ts.map +0 -1
- package/dist/turn-operations-CxE8BBau.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,16 +1,177 @@
|
|
|
1
|
-
import { A as resolvePersistDir, C as TOOL_USE_SKIPPED_MESSAGE, D as buildPersistedStub, E as PERSISTENCE_PREVIEW_BYTES, F as resolveReadStateMap, M as getReadState, O as cleanupPersistedSession, P as readStateKey, S as TOOL_USE_CANCELLED_MESSAGE, T as PERSISTED_STUB_PREFIX, _ as createSkillsReadTool, a as multiEdit, b as INTERRUPT_MESSAGE_FOR_TOOL_USE, c as grep, g as createSkillsRunScriptTool, h as createSkillsUseTool, j as resolveTasksDir, k as maybePersistToolResult, l as glob, n as createSpawnTool, p as createAgent, s as createInteractionTool, u as edit, v as createShellTool, w as validateToolArgs, x as SHELL_CASCADE_CANCEL_MESSAGE } from "./tools-
|
|
1
|
+
import { A as resolvePersistDir, C as TOOL_USE_SKIPPED_MESSAGE, D as buildPersistedStub, E as PERSISTENCE_PREVIEW_BYTES, F as resolveReadStateMap, M as getReadState, O as cleanupPersistedSession, P as readStateKey, S as TOOL_USE_CANCELLED_MESSAGE, T as PERSISTED_STUB_PREFIX, _ as createSkillsReadTool, a as multiEdit, b as INTERRUPT_MESSAGE_FOR_TOOL_USE, c as grep, g as createSkillsRunScriptTool, h as createSkillsUseTool, j as resolveTasksDir, k as maybePersistToolResult, l as glob, n as createSpawnTool, p as createAgent, s as createInteractionTool, u as edit, v as createShellTool, w as validateToolArgs, x as SHELL_CASCADE_CANCEL_MESSAGE } from "./tools-DE9pR_NG.js";
|
|
2
2
|
import { n as createProcessContext, t as createSandboxContext } from "./contexts-BOtMvzli.js";
|
|
3
3
|
import { a as AgentToolNotAllowedError, c as errorMessage, i as AgentProviderError, l as matchesContextExceeded, n as AgentBudgetExceededError, o as AgentToolPairingError, r as AgentContextExceededError, s as CONTEXT_EXCEEDED_MESSAGE_PATTERNS, t as AgentAbortedError, u as toTypedError } from "./errors-DdZXnyXE.js";
|
|
4
4
|
import { n as toolOutputByteLength, r as toolResultToText } from "./types-oKPBdCmL.js";
|
|
5
|
-
import {
|
|
6
|
-
import { c as createMemoryMcpCredentialStore, i as resultToString, l as hasAuthorizationHeader, n as normalizeMcpBlocks, r as normalizeMcpServers, s as McpOAuthProvider, t as connectMcpServers } from "./mcp-
|
|
5
|
+
import { A as replaceDynamicSection, D as hasSystemPromptBoundary, E as appendStaticSection, O as joinSystemPrompt, S as sanitizeToolSpecs, T as appendDynamicSection, _ as mapOAIFinishReason, a as detectTurnInterruption, c as filterUnresolvedToolUses, d as toAnthropic, f as toOpenAI, g as classifyOpenAICompatError, i as autoDetectAndConvert, j as splitSystemPrompt, k as renderSystemForWire, l as fromAnthropic, m as OpenAICompatHttpError, n as SYNTHETIC_TOOL_RESULT_PLACEHOLDER, o as ensureEndsWithUserMessage, p as toWireMessages, r as TOOL_USE_INTERRUPTED_MARKER, s as ensureToolResultPairing, t as ORPHANED_TOOL_RESULT_MARKER, u as fromOpenAI, v as openaiCompat, w as SYSTEM_PROMPT_BOUNDARY, x as sanitizeToolSchema } from "./messages-Dym8S_YH.js";
|
|
6
|
+
import { c as createMemoryMcpCredentialStore, i as resultToString, l as hasAuthorizationHeader, n as normalizeMcpBlocks, r as normalizeMcpServers, s as McpOAuthProvider, t as connectMcpServers } from "./mcp-DGeB7-3D.js";
|
|
7
7
|
import { _ as validateResourcePath, a as discoverSkills, b as createSkillActivationState, f as IMPLICITLY_ALLOWED_SKILL_TOOLS, g as parseAllowedToolPattern, h as matchesAllowedTool, i as writeSkillsToDisk, l as parseSkillFile, m as isToolAllowedByUnion, n as resolveSkills, p as installAllowedToolsGate, r as writeSkillToDisk, t as interpolateShellCommands, u as buildCatalog, v as validateSkillForWrite, y as validateSkillName } from "./interpolate-DM1UcKeQ.js";
|
|
8
|
-
import { C as summaryToTurn, E as CompactPromptTooLongError, S as stripImagesFromTurns, T as CompactInvalidInputError, _ as buildTailCompactPrompt, a as selectFilesFromSession, b as anchorPreviewFor, c as BYTES_PER_TOKEN, d as BASE_INSTRUCTIONS, f as NO_TOOLS_PREAMBLE, g as buildFullCompactPrompt, h as buildFromCompactPrompt, i as selectFilesFromReadState, l as estimateTokens, m as buildCompactPrompt, n as startOAuthCallback, o as selectRecentFiles, p as TRAILER, r as buildPostCompactAttachments, s as compactConversation, t as loginMcpServer, u as utf8ByteLength, v as buildUpToCompactPrompt, w as truncateHeadForPtlRetry, x as sliceForCompaction, y as ANCHOR_PREVIEW_MAX_CHARS } from "./login-
|
|
8
|
+
import { C as summaryToTurn, E as CompactPromptTooLongError, S as stripImagesFromTurns, T as CompactInvalidInputError, _ as buildTailCompactPrompt, a as selectFilesFromSession, b as anchorPreviewFor, c as BYTES_PER_TOKEN, d as BASE_INSTRUCTIONS, f as NO_TOOLS_PREAMBLE, g as buildFullCompactPrompt, h as buildFromCompactPrompt, i as selectFilesFromReadState, l as estimateTokens, m as buildCompactPrompt, n as startOAuthCallback, o as selectRecentFiles, p as TRAILER, r as buildPostCompactAttachments, s as compactConversation, t as loginMcpServer, u as utf8ByteLength, v as buildUpToCompactPrompt, w as truncateHeadForPtlRetry, x as sliceForCompaction, y as ANCHOR_PREVIEW_MAX_CHARS } from "./login-DS3sf6b5.js";
|
|
9
9
|
import { r as statsByModel, t as flattenTurns } from "./stats-Lc3zL3RM.js";
|
|
10
|
-
import { i as basic_default, n as definePreset, r as basicTools } from "./presets-
|
|
11
|
-
import { i as anthropic, n as openai, r as cerebras, t as openrouter } from "./providers-
|
|
12
|
-
import { a as createFileMapStore, i as createMemoryStore, n as loadSession, r as createRemoteStore, t as createSession } from "./session-
|
|
10
|
+
import { i as basic_default, n as definePreset, r as basicTools } from "./presets-CZXS_87d.js";
|
|
11
|
+
import { a as applyAnthropicCacheBreakpoints, i as anthropic, n as openai, r as cerebras, t as openrouter } from "./providers-beXyD9W9.js";
|
|
12
|
+
import { a as createFileMapStore, i as createMemoryStore, n as loadSession, r as createRemoteStore, t as createSession } from "./session-BRIsmBSY.js";
|
|
13
13
|
import { defineSkill } from "./skills.js";
|
|
14
|
+
//#region src/cache-telemetry.ts
|
|
15
|
+
const FNV_OFFSET = 2166136261;
|
|
16
|
+
const FNV_PRIME = 16777619;
|
|
17
|
+
/**
|
|
18
|
+
* FNV-1a 32-bit hash of a UTF-8 string. Pure, allocation-free, ~10 ns per
|
|
19
|
+
* KB. Cryptographic strength is irrelevant here — we only need byte-change
|
|
20
|
+
* detection, and FNV-1a has effectively zero collision risk for the small
|
|
21
|
+
* number of dimensions tracked.
|
|
22
|
+
*
|
|
23
|
+
* Exported for tests; callers shouldn't typically import directly.
|
|
24
|
+
*/
|
|
25
|
+
function fnv1a32(s) {
|
|
26
|
+
let h = FNV_OFFSET;
|
|
27
|
+
for (let i = 0; i < s.length; i++) {
|
|
28
|
+
h ^= s.charCodeAt(i) & 255;
|
|
29
|
+
h = Math.imul(h, FNV_PRIME);
|
|
30
|
+
}
|
|
31
|
+
return h >>> 0;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Build a {@link CacheDimensionSnapshot} from a `turn:before` payload.
|
|
35
|
+
*
|
|
36
|
+
* Pure — exported so hosts can compute snapshots outside the logger (e.g.
|
|
37
|
+
* stamping them onto custom telemetry spans). The hash is deterministic on
|
|
38
|
+
* byte-identical inputs.
|
|
39
|
+
*/
|
|
40
|
+
function snapshotCacheDimensions(options) {
|
|
41
|
+
const toolsJson = JSON.stringify(options.tools ?? []);
|
|
42
|
+
return {
|
|
43
|
+
systemHash: fnv1a32(options.system),
|
|
44
|
+
systemBytes: options.system.length,
|
|
45
|
+
toolsHash: fnv1a32(toolsJson),
|
|
46
|
+
toolsCount: Array.isArray(options.tools) ? options.tools.length : 0,
|
|
47
|
+
model: options.model,
|
|
48
|
+
thinking: options.thinking ?? "off",
|
|
49
|
+
thinkingBudget: options.thinkingBudget ?? 0
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Compare two snapshots and return the list of dimensions whose bytes
|
|
54
|
+
* differ. The `details` map carries a short human-readable description per
|
|
55
|
+
* changed dimension (e.g. `system: 1024 → 1031 bytes`).
|
|
56
|
+
*
|
|
57
|
+
* Pure / no I/O. Use this in tests to assert the diff logic; the logger
|
|
58
|
+
* itself just formats and emits the result.
|
|
59
|
+
*/
|
|
60
|
+
function diffCacheDimensions(prev, curr) {
|
|
61
|
+
const changed = [];
|
|
62
|
+
const details = {};
|
|
63
|
+
if (prev.systemHash !== curr.systemHash) {
|
|
64
|
+
changed.push("system");
|
|
65
|
+
details.system = `${prev.systemBytes} → ${curr.systemBytes} bytes (hash ${hex(prev.systemHash)} → ${hex(curr.systemHash)})`;
|
|
66
|
+
}
|
|
67
|
+
if (prev.toolsHash !== curr.toolsHash) {
|
|
68
|
+
changed.push("tools");
|
|
69
|
+
details.tools = `${prev.toolsCount} → ${curr.toolsCount} tools (hash ${hex(prev.toolsHash)} → ${hex(curr.toolsHash)})`;
|
|
70
|
+
}
|
|
71
|
+
if (prev.model !== curr.model) {
|
|
72
|
+
changed.push("model");
|
|
73
|
+
details.model = `${prev.model} → ${curr.model}`;
|
|
74
|
+
}
|
|
75
|
+
if (prev.thinking !== curr.thinking) {
|
|
76
|
+
changed.push("thinking");
|
|
77
|
+
details.thinking = `${prev.thinking} → ${curr.thinking}`;
|
|
78
|
+
}
|
|
79
|
+
if (prev.thinkingBudget !== curr.thinkingBudget) {
|
|
80
|
+
changed.push("thinkingBudget");
|
|
81
|
+
details.thinkingBudget = `${prev.thinkingBudget} → ${curr.thinkingBudget}`;
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
changed,
|
|
85
|
+
details
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function hex(n) {
|
|
89
|
+
return `0x${n.toString(16).padStart(8, "0")}`;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Install the cache-break logger on an agent's hook bus.
|
|
93
|
+
*
|
|
94
|
+
* Subscribes to `turn:before` (snapshot) + `turn:after` (compare with prior
|
|
95
|
+
* snapshot, log breaks). Returns an `uninstall` fn that detaches both
|
|
96
|
+
* listeners. Idempotent w.r.t. agent lifecycle — installs/uninstalls cleanly
|
|
97
|
+
* across runs.
|
|
98
|
+
*
|
|
99
|
+
* Recommended setup:
|
|
100
|
+
*
|
|
101
|
+
* ```ts
|
|
102
|
+
* const uninstall = installCacheBreakLogger(agent.hooks, {
|
|
103
|
+
* log: line => logger.debug(line),
|
|
104
|
+
* verbose: !!process.env.ZIDANE_DEBUG?.includes('cache'),
|
|
105
|
+
* })
|
|
106
|
+
* // ...
|
|
107
|
+
* uninstall()
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* Performance: hashing runs on each `turn:before` and is bounded by the
|
|
111
|
+
* input size (system + tools serialization). Disabled callers pay nothing
|
|
112
|
+
* (don't install).
|
|
113
|
+
*/
|
|
114
|
+
function installCacheBreakLogger(hooks, options = {}) {
|
|
115
|
+
const log = options.log ?? ((line) => console.error(line));
|
|
116
|
+
const verbose = options.verbose === true;
|
|
117
|
+
const expectedReadAtLeast = options.expectedReadAtLeast ?? 1;
|
|
118
|
+
let prev;
|
|
119
|
+
let turnIndex = 0;
|
|
120
|
+
let pending;
|
|
121
|
+
function onTurnBefore(ctx) {
|
|
122
|
+
const curr = snapshotCacheDimensions(ctx.options);
|
|
123
|
+
turnIndex += 1;
|
|
124
|
+
if (verbose) log(formatVerboseLine({
|
|
125
|
+
turn: turnIndex,
|
|
126
|
+
turnId: ctx.turnId,
|
|
127
|
+
snapshot: curr
|
|
128
|
+
}));
|
|
129
|
+
pending = {
|
|
130
|
+
snapshot: curr,
|
|
131
|
+
turnIndex,
|
|
132
|
+
turnId: ctx.turnId
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function onTurnAfter(ctx) {
|
|
136
|
+
if (!pending || pending.turnId !== ctx.turnId) return;
|
|
137
|
+
const { snapshot: curr, turnIndex: tIdx } = pending;
|
|
138
|
+
pending = void 0;
|
|
139
|
+
if (prev && tIdx > 1 && typeof ctx.usage.cacheRead === "number") {
|
|
140
|
+
const cacheRead = ctx.usage.cacheRead;
|
|
141
|
+
if (cacheRead < expectedReadAtLeast) {
|
|
142
|
+
const diff = diffCacheDimensions(prev, curr);
|
|
143
|
+
if (diff.changed.length > 0) log(formatBreakLine({
|
|
144
|
+
turn: tIdx,
|
|
145
|
+
turnId: ctx.turnId,
|
|
146
|
+
cacheRead,
|
|
147
|
+
cacheCreation: ctx.usage.cacheCreation ?? 0,
|
|
148
|
+
diff
|
|
149
|
+
}));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
prev = curr;
|
|
153
|
+
}
|
|
154
|
+
const unregisterBefore = hooks.hook("turn:before", onTurnBefore);
|
|
155
|
+
const unregisterAfter = hooks.hook("turn:after", onTurnAfter);
|
|
156
|
+
return () => {
|
|
157
|
+
unregisterBefore();
|
|
158
|
+
unregisterAfter();
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function formatBreakLine(input) {
|
|
162
|
+
const names = input.diff.changed.join(", ");
|
|
163
|
+
const details = input.diff.changed.map((d) => ` ${d}: ${input.diff.details[d]}`).join("\n");
|
|
164
|
+
return [
|
|
165
|
+
`[zidane:cache-break] turn=${input.turn} turnId=${input.turnId} cacheRead=${input.cacheRead} cacheCreation=${input.cacheCreation}`,
|
|
166
|
+
` changed: ${names}`,
|
|
167
|
+
details
|
|
168
|
+
].join("\n");
|
|
169
|
+
}
|
|
170
|
+
function formatVerboseLine(input) {
|
|
171
|
+
const s = input.snapshot;
|
|
172
|
+
return `[zidane:cache] turn=${input.turn} turnId=${input.turnId} system=${hex(s.systemHash)}(${s.systemBytes}b) tools=${hex(s.toolsHash)}(${s.toolsCount}) model=${s.model} thinking=${s.thinking}/${s.thinkingBudget}`;
|
|
173
|
+
}
|
|
174
|
+
//#endregion
|
|
14
175
|
//#region src/logger.ts
|
|
15
176
|
/**
|
|
16
177
|
* Build a Logger from a sink. Stateless and cheap; create one per agent
|
|
@@ -1616,6 +1777,6 @@ function zodToJsonSchema(jsonSchema) {
|
|
|
1616
1777
|
return rest;
|
|
1617
1778
|
}
|
|
1618
1779
|
//#endregion
|
|
1619
|
-
export { ANCHOR_PREVIEW_MAX_CHARS, AgentAbortedError, AgentBudgetExceededError, AgentContextExceededError, AgentProviderError, AgentToolNotAllowedError, AgentToolPairingError, BASE_INSTRUCTIONS, BYTES_PER_TOKEN, CONTEXT_EXCEEDED_MESSAGE_PATTERNS, CompactInvalidInputError, CompactPromptTooLongError, GEN_AI_ATTRIBUTES, IMPLICITLY_ALLOWED_SKILL_TOOLS, INTERRUPT_MESSAGE_FOR_TOOL_USE, McpOAuthProvider, NO_TOOLS_PREAMBLE, ORPHANED_TOOL_RESULT_MARKER, OpenAICompatHttpError, PERSISTED_STUB_PREFIX, PERSISTENCE_PREVIEW_BYTES, SHELL_CASCADE_CANCEL_MESSAGE, SYNTHETIC_TOOL_RESULT_PLACEHOLDER, TOOL_USE_CANCELLED_MESSAGE, TOOL_USE_INTERRUPTED_MARKER, TOOL_USE_SKIPPED_MESSAGE, TRAILER, anchorPreviewFor, anthropic, autoDetectAndConvert, basic_default as basic, basicTools, buildCatalog, buildCompactPrompt, buildFromCompactPrompt, buildFullCompactPrompt, buildPersistedStub, buildPostCompactAttachments, buildTailCompactPrompt, buildUpToCompactPrompt, cerebras, classifyOpenAICompatError, cleanupPersistedSession, compactConversation, connectMcpServers, consoleSink, createAgent, createFileMapStore, createInteractionTool, createLogger, createLoggingHooks, createMemoryMcpCredentialStore, createMemoryStore, createMetricsHooks, createProcessContext, createRemoteStore, createRunSummaryCollector, createSandboxContext, createSession, createShellTool, createSkillActivationState, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createTracingHooks, definePreset, defineSkill, detectTurnInterruption, discoverSkills, edit, ensureToolResultPairing, errorMessage, estimateTokens, filterUnresolvedToolUses, flattenTurns, fromAnthropic, fromOpenAI, getReadState, glob, grep, hasAuthorizationHeader, installAllowedToolsGate, interpolateShellCommands, isToolAllowedByUnion, jsonSink, loadSession, loginMcpServer, mapOAIFinishReason, matchesAllowedTool, matchesContextExceeded, maybePersistToolResult, multiEdit, normalizeMcpBlocks, normalizeMcpServers, openai, openaiCompat, openrouter, parseAllowedToolPattern, parseSkillFile, readStateKey, resolvePersistDir, resolveReadStateMap, resolveSkills, resolveTasksDir, resultToString, sanitizeToolSchema, sanitizeToolSpecs, selectFilesFromReadState, selectFilesFromSession, selectRecentFiles, sliceForCompaction, startOAuthCallback, statsByModel, stripImagesFromTurns, summaryToTurn, toAnthropic, toOpenAI, toTypedError, toolOutputByteLength, toolResultToText, truncateHeadForPtlRetry, utf8ByteLength, validateResourcePath, validateSkillForWrite, validateSkillName, validateToolArgs, writeSkillToDisk, writeSkillsToDisk, zodToJsonSchema };
|
|
1780
|
+
export { ANCHOR_PREVIEW_MAX_CHARS, AgentAbortedError, AgentBudgetExceededError, AgentContextExceededError, AgentProviderError, AgentToolNotAllowedError, AgentToolPairingError, BASE_INSTRUCTIONS, BYTES_PER_TOKEN, CONTEXT_EXCEEDED_MESSAGE_PATTERNS, CompactInvalidInputError, CompactPromptTooLongError, GEN_AI_ATTRIBUTES, IMPLICITLY_ALLOWED_SKILL_TOOLS, INTERRUPT_MESSAGE_FOR_TOOL_USE, McpOAuthProvider, NO_TOOLS_PREAMBLE, ORPHANED_TOOL_RESULT_MARKER, OpenAICompatHttpError, PERSISTED_STUB_PREFIX, PERSISTENCE_PREVIEW_BYTES, SHELL_CASCADE_CANCEL_MESSAGE, SYNTHETIC_TOOL_RESULT_PLACEHOLDER, SYSTEM_PROMPT_BOUNDARY, TOOL_USE_CANCELLED_MESSAGE, TOOL_USE_INTERRUPTED_MARKER, TOOL_USE_SKIPPED_MESSAGE, TRAILER, anchorPreviewFor, anthropic, appendDynamicSection, appendStaticSection, applyAnthropicCacheBreakpoints, autoDetectAndConvert, basic_default as basic, basicTools, buildCatalog, buildCompactPrompt, buildFromCompactPrompt, buildFullCompactPrompt, buildPersistedStub, buildPostCompactAttachments, buildTailCompactPrompt, buildUpToCompactPrompt, cerebras, classifyOpenAICompatError, cleanupPersistedSession, compactConversation, connectMcpServers, consoleSink, createAgent, createFileMapStore, createInteractionTool, createLogger, createLoggingHooks, createMemoryMcpCredentialStore, createMemoryStore, createMetricsHooks, createProcessContext, createRemoteStore, createRunSummaryCollector, createSandboxContext, createSession, createShellTool, createSkillActivationState, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createTracingHooks, definePreset, defineSkill, detectTurnInterruption, diffCacheDimensions, discoverSkills, edit, ensureEndsWithUserMessage, ensureToolResultPairing, errorMessage, estimateTokens, filterUnresolvedToolUses, flattenTurns, fnv1a32, fromAnthropic, fromOpenAI, getReadState, glob, grep, hasAuthorizationHeader, hasSystemPromptBoundary, installAllowedToolsGate, installCacheBreakLogger, interpolateShellCommands, isToolAllowedByUnion, joinSystemPrompt, jsonSink, loadSession, loginMcpServer, mapOAIFinishReason, matchesAllowedTool, matchesContextExceeded, maybePersistToolResult, multiEdit, normalizeMcpBlocks, normalizeMcpServers, openai, openaiCompat, openrouter, parseAllowedToolPattern, parseSkillFile, readStateKey, renderSystemForWire, replaceDynamicSection, resolvePersistDir, resolveReadStateMap, resolveSkills, resolveTasksDir, resultToString, sanitizeToolSchema, sanitizeToolSpecs, selectFilesFromReadState, selectFilesFromSession, selectRecentFiles, sliceForCompaction, snapshotCacheDimensions, splitSystemPrompt, startOAuthCallback, statsByModel, stripImagesFromTurns, summaryToTurn, toAnthropic, toOpenAI, toTypedError, toWireMessages, toolOutputByteLength, toolResultToText, truncateHeadForPtlRetry, utf8ByteLength, validateResourcePath, validateSkillForWrite, validateSkillName, validateToolArgs, writeSkillToDisk, writeSkillsToDisk, zodToJsonSchema };
|
|
1620
1781
|
|
|
1621
1782
|
//# sourceMappingURL=index.js.map
|