zidane 3.1.0 → 3.1.2
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 +110 -7
- package/dist/{agent-O5SmWixc.d.ts → agent-C9q5VMGa.d.ts} +279 -3
- package/dist/{chunk-PYLYK3K7.js → chunk-2AE3VM5O.js} +547 -35
- package/dist/{chunk-R74LQKAM.js → chunk-7H34OFDA.js} +26 -0
- package/dist/{chunk-FEAOZ5DB.js → chunk-BRMURQA2.js} +12 -3
- package/dist/{chunk-SARMZCEL.js → chunk-BXO7CZHJ.js} +1 -1
- package/dist/{chunk-2EQT4EHD.js → chunk-IUBBVF53.js} +4 -0
- package/dist/{chunk-VF4A7HAC.js → chunk-YQ7LY6CL.js} +3 -0
- package/dist/contexts.d.ts +3 -3
- package/dist/contexts.js +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +1 -1
- package/dist/presets.d.ts +2 -2
- package/dist/presets.js +4 -4
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +2 -2
- package/dist/{sandbox-CW72eLDP.d.ts → sandbox-CLghrTLi.d.ts} +1 -1
- package/dist/session/sqlite.d.ts +2 -2
- package/dist/session.d.ts +2 -2
- package/dist/session.js +1 -1
- package/dist/{skills-use-DJKUctM5.d.ts → skills-use-DU0unNP4.d.ts} +1 -1
- package/dist/skills.d.ts +3 -3
- package/dist/tools.d.ts +5 -5
- package/dist/tools.js +3 -3
- package/dist/{types-BpvTmawk.d.ts → types-vA1a_ZX7.d.ts} +11 -0
- package/dist/types.d.ts +4 -4
- package/dist/{validation-DE4g5Cez.d.ts → validation-BKA33eqb.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -259,6 +259,32 @@ function buildMcpToolDef(config, client, tool, namespacedName, hooks) {
|
|
|
259
259
|
if (gateCtx.block)
|
|
260
260
|
return `Blocked: ${gateCtx.reason}`;
|
|
261
261
|
const effectiveInput = gateCtx.input;
|
|
262
|
+
if (gateCtx.result !== void 0) {
|
|
263
|
+
let substitute = gateCtx.result;
|
|
264
|
+
const transformCtx = {
|
|
265
|
+
turnId,
|
|
266
|
+
callId,
|
|
267
|
+
server: config.name,
|
|
268
|
+
tool: tool.name,
|
|
269
|
+
displayName,
|
|
270
|
+
input: effectiveInput,
|
|
271
|
+
result: substitute,
|
|
272
|
+
outputBytes: toolOutputByteLength(substitute)
|
|
273
|
+
};
|
|
274
|
+
await hooks?.callHook("mcp:tool:transform", transformCtx);
|
|
275
|
+
substitute = transformCtx.result;
|
|
276
|
+
await hooks?.callHook("mcp:tool:after", {
|
|
277
|
+
turnId,
|
|
278
|
+
callId,
|
|
279
|
+
server: config.name,
|
|
280
|
+
tool: tool.name,
|
|
281
|
+
displayName,
|
|
282
|
+
input: effectiveInput,
|
|
283
|
+
result: substitute,
|
|
284
|
+
outputBytes: toolOutputByteLength(substitute)
|
|
285
|
+
});
|
|
286
|
+
return substitute;
|
|
287
|
+
}
|
|
262
288
|
await hooks?.callHook("mcp:tool:before", {
|
|
263
289
|
turnId,
|
|
264
290
|
callId,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
toAnthropic,
|
|
6
6
|
toolResultsMessage,
|
|
7
7
|
userMessage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YQ7LY6CL.js";
|
|
9
9
|
import {
|
|
10
10
|
matchesContextExceeded
|
|
11
11
|
} from "./chunk-LNN5UTS2.js";
|
|
@@ -221,11 +221,14 @@ function mapStopReason(stopReason) {
|
|
|
221
221
|
case "tool_use":
|
|
222
222
|
return "tool-calls";
|
|
223
223
|
case "max_tokens":
|
|
224
|
+
case "model_context_window_exceeded":
|
|
224
225
|
return "length";
|
|
225
226
|
case "refusal":
|
|
226
227
|
return "content-filter";
|
|
228
|
+
// 4.6+: server-side mid-turn pause for long thinking. The loop
|
|
229
|
+
// continues with a synthetic continue message rather than terminating.
|
|
227
230
|
case "pause_turn":
|
|
228
|
-
return "
|
|
231
|
+
return "pause";
|
|
229
232
|
default:
|
|
230
233
|
return "other";
|
|
231
234
|
}
|
|
@@ -434,6 +437,11 @@ function anthropic(anthropicParams) {
|
|
|
434
437
|
const thinking = options.thinking ?? "off";
|
|
435
438
|
const modelId = options.model;
|
|
436
439
|
const params = {
|
|
440
|
+
// Forward-compat escape hatch for un-typed beta fields. Spread first so
|
|
441
|
+
// the typed core (model / max_tokens / system / tools / messages /
|
|
442
|
+
// stream) and the explicit `context_management` below override on
|
|
443
|
+
// collision — explicit always wins.
|
|
444
|
+
...anthropicParams?.extraBodyParams ?? {},
|
|
437
445
|
model: modelId,
|
|
438
446
|
max_tokens: options.maxTokens,
|
|
439
447
|
system,
|
|
@@ -485,11 +493,12 @@ function anthropic(anthropicParams) {
|
|
|
485
493
|
const response = await s.finalMessage();
|
|
486
494
|
const toolCalls = response.content.filter((b) => b.type === "tool_use").map((b) => ({ id: b.id, name: b.name, input: b.input }));
|
|
487
495
|
const finishReason = mapStopReason(response.stop_reason);
|
|
496
|
+
const isPause = response.stop_reason === "pause_turn";
|
|
488
497
|
return {
|
|
489
498
|
assistantMessage: fromAnthropic({ role: "assistant", content: response.content }),
|
|
490
499
|
text,
|
|
491
500
|
toolCalls,
|
|
492
|
-
done: response.stop_reason === "end_turn" || toolCalls.length === 0,
|
|
501
|
+
done: !isPause && (response.stop_reason === "end_turn" || toolCalls.length === 0),
|
|
493
502
|
usage: {
|
|
494
503
|
input: response.usage.input_tokens,
|
|
495
504
|
output: response.usage.output_tokens,
|
|
@@ -176,6 +176,10 @@ function createProcessContext(config) {
|
|
|
176
176
|
async readFile(handle, path) {
|
|
177
177
|
return readFile(resolve(handle.cwd, path), "utf-8");
|
|
178
178
|
},
|
|
179
|
+
async readFileBinary(handle, path) {
|
|
180
|
+
const buf = await readFile(resolve(handle.cwd, path));
|
|
181
|
+
return new Uint8Array(buf);
|
|
182
|
+
},
|
|
179
183
|
async writeFile(handle, path, content) {
|
|
180
184
|
const fullPath = resolve(handle.cwd, path);
|
|
181
185
|
await mkdir(dirname(fullPath), { recursive: true });
|
|
@@ -393,6 +393,9 @@ function openaiCompat(params) {
|
|
|
393
393
|
}
|
|
394
394
|
const maxTokens = options.thinkingBudget ? options.thinkingBudget + options.maxTokens : options.maxTokens;
|
|
395
395
|
const body = {
|
|
396
|
+
// Spread first so the typed core below wins on collision — explicit
|
|
397
|
+
// always overrides generic.
|
|
398
|
+
...params.extraBodyParams ?? {},
|
|
396
399
|
model: modelId,
|
|
397
400
|
messages,
|
|
398
401
|
max_tokens: maxTokens,
|
package/dist/contexts.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as SpawnConfig, b as ExecutionContext } from './types-
|
|
2
|
-
export { C as ContextCapabilities, a as ContextType, E as ExecResult, c as ExecutionHandle } from './types-
|
|
3
|
-
export { S as SandboxProvider, c as createSandboxContext } from './sandbox-
|
|
1
|
+
import { S as SpawnConfig, b as ExecutionContext } from './types-vA1a_ZX7.js';
|
|
2
|
+
export { C as ContextCapabilities, a as ContextType, E as ExecResult, c as ExecutionHandle } from './types-vA1a_ZX7.js';
|
|
3
|
+
export { S as SandboxProvider, c as createSandboxContext } from './sandbox-CLghrTLi.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Docker execution context.
|
package/dist/contexts.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { d as AgentHooks } from './agent-
|
|
2
|
-
export { ac as ActivationVia, ad as ActiveSkill, A as Agent, a as AgentAbortedError, b as AgentBehavior, c as AgentContextExceededError, e as AgentOptions, f as AgentProviderError, g as AgentRunOptions, h as AgentStats, i as AgentToolNotAllowedError, j as AnthropicParams, C as CONTEXT_EXCEEDED_MESSAGE_PATTERNS, k as CerebrasParams, m as ClassifiedError, n as ClassifiedErrorKind, o as CreateSessionOptions, ae as DeactivationReason, af as FileMapAdapter, ag as FileMapStoreOptions, I as ImageContent, M as McpConnection, p as McpServerConfig, q as McpToolHookContext, O as OAuthRefreshHookContext, ah as OpenAICompatAuthHeader, ai as OpenAICompatHttpError, aj as OpenAICompatParams, r as OpenAIParams, s as OpenRouterParams, P as PromptDocumentPart, t as PromptImagePart, u as PromptPart, v as PromptTextPart, w as Provider, x as ProviderCapabilities, R as RemoteStoreOptions, y as RunHookMap, S as Session, z as SessionContentBlock, B as SessionData, D as SessionEndStatus, E as SessionHookContext, F as SessionMessage, G as SessionRun, H as SessionStore, J as SessionTurn, ak as SkillActivationState, al as SkillActivationStateOptions, K as SkillConfig, am as SkillDiagnostic, L as SkillResource, an as SkillSource, N as SkillsConfig, Q as SpawnHookContext, T as StreamCallbacks, U as StreamHookContext, V as StreamOptions, W as ThinkingLevel, X as ToolCall, Y as ToolContext, Z as ToolDef, _ as ToolExecutionMode, $ as ToolHookContext, a0 as ToolMap, a1 as ToolResult, a2 as ToolResultContent, a3 as ToolResultImageContent, a4 as ToolResultTextContent, a5 as ToolSpec, a6 as TurnFinishReason, a7 as TurnResult, a8 as TurnUsage, ao as anthropic, ap as autoDetectAndConvert, aq as cerebras, ar as classifyOpenAICompatError, as as connectMcpServers, at as createAgent, au as createFileMapStore, av as createMemoryStore, aw as createRemoteStore, ax as createSession, ay as createSkillActivationState, az as fromAnthropic, aA as fromOpenAI, aB as loadSession, aC as mapOAIFinishReason, a9 as matchesContextExceeded, aD as normalizeMcpBlocks, aE as normalizeMcpServers, aF as openai, aG as openaiCompat, aH as openrouter, aI as resultToString, aJ as toAnthropic, aK as toOpenAI, aL as toTypedError, aa as toolOutputByteLength, ab as toolResultToText } from './agent-
|
|
1
|
+
import { d as AgentHooks } from './agent-C9q5VMGa.js';
|
|
2
|
+
export { ac as ActivationVia, ad as ActiveSkill, A as Agent, a as AgentAbortedError, b as AgentBehavior, c as AgentContextExceededError, e as AgentOptions, f as AgentProviderError, g as AgentRunOptions, h as AgentStats, i as AgentToolNotAllowedError, j as AnthropicParams, C as CONTEXT_EXCEEDED_MESSAGE_PATTERNS, k as CerebrasParams, m as ClassifiedError, n as ClassifiedErrorKind, o as CreateSessionOptions, ae as DeactivationReason, af as FileMapAdapter, ag as FileMapStoreOptions, I as ImageContent, M as McpConnection, p as McpServerConfig, q as McpToolHookContext, O as OAuthRefreshHookContext, ah as OpenAICompatAuthHeader, ai as OpenAICompatHttpError, aj as OpenAICompatParams, r as OpenAIParams, s as OpenRouterParams, P as PromptDocumentPart, t as PromptImagePart, u as PromptPart, v as PromptTextPart, w as Provider, x as ProviderCapabilities, R as RemoteStoreOptions, y as RunHookMap, S as Session, z as SessionContentBlock, B as SessionData, D as SessionEndStatus, E as SessionHookContext, F as SessionMessage, G as SessionRun, H as SessionStore, J as SessionTurn, ak as SkillActivationState, al as SkillActivationStateOptions, K as SkillConfig, am as SkillDiagnostic, L as SkillResource, an as SkillSource, N as SkillsConfig, Q as SpawnHookContext, T as StreamCallbacks, U as StreamHookContext, V as StreamOptions, W as ThinkingLevel, X as ToolCall, Y as ToolContext, Z as ToolDef, _ as ToolExecutionMode, $ as ToolHookContext, a0 as ToolMap, a1 as ToolResult, a2 as ToolResultContent, a3 as ToolResultImageContent, a4 as ToolResultTextContent, a5 as ToolSpec, a6 as TurnFinishReason, a7 as TurnResult, a8 as TurnUsage, ao as anthropic, ap as autoDetectAndConvert, aq as cerebras, ar as classifyOpenAICompatError, as as connectMcpServers, at as createAgent, au as createFileMapStore, av as createMemoryStore, aw as createRemoteStore, ax as createSession, ay as createSkillActivationState, az as fromAnthropic, aA as fromOpenAI, aB as loadSession, aC as mapOAIFinishReason, a9 as matchesContextExceeded, aD as normalizeMcpBlocks, aE as normalizeMcpServers, aF as openai, aG as openaiCompat, aH as openrouter, aI as resultToString, aJ as toAnthropic, aK as toOpenAI, aL as toTypedError, aa as toolOutputByteLength, ab as toolResultToText } from './agent-C9q5VMGa.js';
|
|
3
3
|
export { createDockerContext, createProcessContext } from './contexts.js';
|
|
4
|
-
export { S as SandboxProvider, c as createSandboxContext } from './sandbox-
|
|
5
|
-
export { C as ContextCapabilities, a as ContextType, E as ExecResult, b as ExecutionContext, c as ExecutionHandle, S as SpawnConfig } from './types-
|
|
4
|
+
export { S as SandboxProvider, c as createSandboxContext } from './sandbox-CLghrTLi.js';
|
|
5
|
+
export { C as ContextCapabilities, a as ContextType, E as ExecResult, b as ExecutionContext, c as ExecutionHandle, S as SpawnConfig } from './types-vA1a_ZX7.js';
|
|
6
6
|
export { Preset, basic, basicTools, definePreset } from './presets.js';
|
|
7
7
|
export { IMPLICITLY_ALLOWED_SKILL_TOOLS, SkillValidationIssue, SkillValidationResult, SourcedScanPath, buildCatalog, defineSkill, discoverSkills, installAllowedToolsGate, interpolateShellCommands, isToolAllowedByUnion, matchesAllowedTool, parseAllowedToolPattern, parseSkillFile, resolveSkills, validateResourcePath, validateSkillForWrite, validateSkillName, writeSkillToDisk, writeSkillsToDisk } from './skills.js';
|
|
8
|
-
export { S as SkillsReadToolOptions, a as SkillsRunScriptToolOptions, b as SkillsUseToolOptions, c as createSkillsReadTool, d as createSkillsRunScriptTool, e as createSkillsUseTool, f as edit, g as glob, h as grep, m as multiEdit } from './skills-use-
|
|
9
|
-
export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState, V as ValidationResult, c as createInteractionTool, b as createSpawnTool, s as spawn, v as validateToolArgs } from './validation-
|
|
8
|
+
export { S as SkillsReadToolOptions, a as SkillsRunScriptToolOptions, b as SkillsUseToolOptions, c as createSkillsReadTool, d as createSkillsRunScriptTool, e as createSkillsUseTool, f as edit, g as glob, h as grep, m as multiEdit } from './skills-use-DU0unNP4.js';
|
|
9
|
+
export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState, V as ValidationResult, c as createInteractionTool, b as createSpawnTool, s as spawn, v as validateToolArgs } from './validation-BKA33eqb.js';
|
|
10
10
|
import { Hookable } from 'hookable';
|
|
11
11
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
12
12
|
|
package/dist/index.js
CHANGED
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
cerebras,
|
|
7
7
|
openai,
|
|
8
8
|
openrouter
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BRMURQA2.js";
|
|
10
10
|
import {
|
|
11
11
|
basicTools,
|
|
12
12
|
basic_default,
|
|
13
13
|
definePreset
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BXO7CZHJ.js";
|
|
15
15
|
import {
|
|
16
16
|
createAgent,
|
|
17
17
|
createInteractionTool,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
multiEdit,
|
|
26
26
|
spawn,
|
|
27
27
|
validateToolArgs
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-2AE3VM5O.js";
|
|
29
29
|
import {
|
|
30
30
|
IMPLICITLY_ALLOWED_SKILL_TOOLS,
|
|
31
31
|
buildCatalog,
|
|
@@ -48,13 +48,13 @@ import {
|
|
|
48
48
|
createDockerContext,
|
|
49
49
|
createProcessContext,
|
|
50
50
|
createSandboxContext
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-IUBBVF53.js";
|
|
52
52
|
import {
|
|
53
53
|
connectMcpServers,
|
|
54
54
|
normalizeMcpBlocks,
|
|
55
55
|
normalizeMcpServers,
|
|
56
56
|
resultToString
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-7H34OFDA.js";
|
|
58
58
|
import {
|
|
59
59
|
toolOutputByteLength,
|
|
60
60
|
toolResultToText
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
openaiCompat,
|
|
77
77
|
toAnthropic,
|
|
78
78
|
toOpenAI
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-YQ7LY6CL.js";
|
|
80
80
|
import {
|
|
81
81
|
AgentAbortedError,
|
|
82
82
|
AgentContextExceededError,
|
package/dist/mcp.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'hookable';
|
|
2
|
-
export { M as McpConnection, p as McpServerConfig, as as connectMcpServers, aD as normalizeMcpBlocks, aE as normalizeMcpServers, aI as resultToString } from './agent-
|
|
2
|
+
export { M as McpConnection, p as McpServerConfig, as as connectMcpServers, aD as normalizeMcpBlocks, aE as normalizeMcpServers, aI as resultToString } from './agent-C9q5VMGa.js';
|
|
3
3
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-vA1a_ZX7.js';
|
package/dist/mcp.js
CHANGED
package/dist/presets.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as ToolDef, e as AgentOptions } from './agent-
|
|
1
|
+
import { Z as ToolDef, e as AgentOptions } from './agent-C9q5VMGa.js';
|
|
2
2
|
import 'hookable';
|
|
3
|
-
import './types-
|
|
3
|
+
import './types-vA1a_ZX7.js';
|
|
4
4
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/presets.js
CHANGED
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
basicTools,
|
|
3
3
|
basic_default,
|
|
4
4
|
definePreset
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-BXO7CZHJ.js";
|
|
6
|
+
import "./chunk-2AE3VM5O.js";
|
|
7
7
|
import "./chunk-TPXPVEH6.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-IUBBVF53.js";
|
|
9
|
+
import "./chunk-7H34OFDA.js";
|
|
10
10
|
import "./chunk-JH6IAAFA.js";
|
|
11
11
|
import "./chunk-LNN5UTS2.js";
|
|
12
12
|
export {
|
package/dist/providers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { j as AnthropicParams, k as CerebrasParams, ah as OpenAICompatAuthHeader, ai as OpenAICompatHttpError, aj as OpenAICompatParams, r as OpenAIParams, s as OpenRouterParams, w as Provider, x as ProviderCapabilities, T as StreamCallbacks, V as StreamOptions, X as ToolCall, a1 as ToolResult, a5 as ToolSpec, a7 as TurnResult, ao as anthropic, aq as cerebras, ar as classifyOpenAICompatError, aC as mapOAIFinishReason, aF as openai, aG as openaiCompat, aH as openrouter } from './agent-
|
|
1
|
+
export { j as AnthropicParams, k as CerebrasParams, ah as OpenAICompatAuthHeader, ai as OpenAICompatHttpError, aj as OpenAICompatParams, r as OpenAIParams, s as OpenRouterParams, w as Provider, x as ProviderCapabilities, T as StreamCallbacks, V as StreamOptions, X as ToolCall, a1 as ToolResult, a5 as ToolSpec, a7 as TurnResult, ao as anthropic, aq as cerebras, ar as classifyOpenAICompatError, aC as mapOAIFinishReason, aF as openai, aG as openaiCompat, aH as openrouter } from './agent-C9q5VMGa.js';
|
|
2
2
|
import 'hookable';
|
|
3
|
-
import './types-
|
|
3
|
+
import './types-vA1a_ZX7.js';
|
|
4
4
|
import '@modelcontextprotocol/sdk/client/index.js';
|
package/dist/providers.js
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
cerebras,
|
|
4
4
|
openai,
|
|
5
5
|
openrouter
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BRMURQA2.js";
|
|
7
7
|
import {
|
|
8
8
|
OpenAICompatHttpError,
|
|
9
9
|
classifyOpenAICompatError,
|
|
10
10
|
mapOAIFinishReason,
|
|
11
11
|
openaiCompat
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YQ7LY6CL.js";
|
|
13
13
|
import "./chunk-LNN5UTS2.js";
|
|
14
14
|
export {
|
|
15
15
|
OpenAICompatHttpError,
|
package/dist/session/sqlite.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as SessionStore } from '../agent-
|
|
1
|
+
import { H as SessionStore } from '../agent-C9q5VMGa.js';
|
|
2
2
|
import 'hookable';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-vA1a_ZX7.js';
|
|
4
4
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/session.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { o as CreateSessionOptions, af as FileMapAdapter, ag as FileMapStoreOptions, R as RemoteStoreOptions, S as Session, z as SessionContentBlock, B as SessionData, F as SessionMessage, G as SessionRun, H as SessionStore, J as SessionTurn, ap as autoDetectAndConvert, au as createFileMapStore, av as createMemoryStore, aw as createRemoteStore, ax as createSession, az as fromAnthropic, aA as fromOpenAI, aB as loadSession, aJ as toAnthropic, aK as toOpenAI } from './agent-
|
|
1
|
+
export { o as CreateSessionOptions, af as FileMapAdapter, ag as FileMapStoreOptions, R as RemoteStoreOptions, S as Session, z as SessionContentBlock, B as SessionData, F as SessionMessage, G as SessionRun, H as SessionStore, J as SessionTurn, ap as autoDetectAndConvert, au as createFileMapStore, av as createMemoryStore, aw as createRemoteStore, ax as createSession, az as fromAnthropic, aA as fromOpenAI, aB as loadSession, aJ as toAnthropic, aK as toOpenAI } from './agent-C9q5VMGa.js';
|
|
2
2
|
import 'hookable';
|
|
3
|
-
import './types-
|
|
3
|
+
import './types-vA1a_ZX7.js';
|
|
4
4
|
import '@modelcontextprotocol/sdk/client/index.js';
|
package/dist/session.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Z as ToolDef, K as SkillConfig, ak as SkillActivationState, d as AgentHooks } from './agent-
|
|
1
|
+
import { Z as ToolDef, K as SkillConfig, ak as SkillActivationState, d as AgentHooks } from './agent-C9q5VMGa.js';
|
|
2
2
|
import { Hookable } from 'hookable';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/skills.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as AgentHooks, ak as SkillActivationState, K as SkillConfig, an as SkillSource, am as SkillDiagnostic, N as SkillsConfig } from './agent-
|
|
2
|
-
export { ac as ActivationVia, ad as ActiveSkill, ae as DeactivationReason, al as SkillActivationStateOptions, L as SkillResource, ay as createSkillActivationState } from './agent-
|
|
1
|
+
import { d as AgentHooks, ak as SkillActivationState, K as SkillConfig, an as SkillSource, am as SkillDiagnostic, N as SkillsConfig } from './agent-C9q5VMGa.js';
|
|
2
|
+
export { ac as ActivationVia, ad as ActiveSkill, ae as DeactivationReason, al as SkillActivationStateOptions, L as SkillResource, ay as createSkillActivationState } from './agent-C9q5VMGa.js';
|
|
3
3
|
import { Hookable } from 'hookable';
|
|
4
|
-
import { b as ExecutionContext, c as ExecutionHandle } from './types-
|
|
4
|
+
import { b as ExecutionContext, c as ExecutionHandle } from './types-vA1a_ZX7.js';
|
|
5
5
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { S as SkillsReadToolOptions, a as SkillsRunScriptToolOptions, b as SkillsUseToolOptions, c as createSkillsReadTool, d as createSkillsRunScriptTool, e as createSkillsUseTool, f as edit, g as glob, h as grep, m as multiEdit } from './skills-use-
|
|
2
|
-
export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState, V as ValidationResult, c as createInteractionTool, b as createSpawnTool, s as spawn, v as validateToolArgs } from './validation-
|
|
3
|
-
import { Z as ToolDef } from './agent-
|
|
4
|
-
export { Y as ToolContext, a0 as ToolMap } from './agent-
|
|
1
|
+
export { S as SkillsReadToolOptions, a as SkillsRunScriptToolOptions, b as SkillsUseToolOptions, c as createSkillsReadTool, d as createSkillsRunScriptTool, e as createSkillsUseTool, f as edit, g as glob, h as grep, m as multiEdit } from './skills-use-DU0unNP4.js';
|
|
2
|
+
export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState, V as ValidationResult, c as createInteractionTool, b as createSpawnTool, s as spawn, v as validateToolArgs } from './validation-BKA33eqb.js';
|
|
3
|
+
import { Z as ToolDef } from './agent-C9q5VMGa.js';
|
|
4
|
+
export { Y as ToolContext, a0 as ToolMap } from './agent-C9q5VMGa.js';
|
|
5
5
|
import 'hookable';
|
|
6
6
|
import './presets.js';
|
|
7
|
-
import './types-
|
|
7
|
+
import './types-vA1a_ZX7.js';
|
|
8
8
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
9
9
|
|
|
10
10
|
declare const listFiles: ToolDef;
|
package/dist/tools.js
CHANGED
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
spawn,
|
|
15
15
|
validateToolArgs,
|
|
16
16
|
writeFile
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2AE3VM5O.js";
|
|
18
18
|
import "./chunk-TPXPVEH6.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-IUBBVF53.js";
|
|
20
|
+
import "./chunk-7H34OFDA.js";
|
|
21
21
|
import "./chunk-JH6IAAFA.js";
|
|
22
22
|
import "./chunk-LNN5UTS2.js";
|
|
23
23
|
export {
|
|
@@ -67,6 +67,17 @@ interface ExecutionContext {
|
|
|
67
67
|
}) => Promise<ExecResult>;
|
|
68
68
|
/** Read a file from the context's filesystem */
|
|
69
69
|
readFile: (handle: ExecutionHandle, path: string) => Promise<string>;
|
|
70
|
+
/**
|
|
71
|
+
* Read a file from the context's filesystem as raw bytes.
|
|
72
|
+
*
|
|
73
|
+
* Used by `read_file` to dispatch image / binary files into the multimodal
|
|
74
|
+
* `ToolResultContent[]` route. Optional — when not implemented, the tool
|
|
75
|
+
* falls back to `base64 < path` via the `exec` seam, which works in any
|
|
76
|
+
* shell-capable context. Implementations that already have a native
|
|
77
|
+
* binary read (in-process `fs.readFile` without encoding, container API,
|
|
78
|
+
* sandbox SDK) should override for the latency win.
|
|
79
|
+
*/
|
|
80
|
+
readFileBinary?: (handle: ExecutionHandle, path: string) => Promise<Uint8Array>;
|
|
70
81
|
/** Write a file to the context's filesystem */
|
|
71
82
|
writeFile: (handle: ExecutionHandle, path: string, content: string) => Promise<void>;
|
|
72
83
|
/** List files in a directory */
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { A as Agent, a as AgentAbortedError, b as AgentBehavior, c as AgentContextExceededError, d as AgentHooks, e as AgentOptions, f as AgentProviderError, g as AgentRunOptions, h as AgentStats, i as AgentToolNotAllowedError, j as AnthropicParams, C as CONTEXT_EXCEEDED_MESSAGE_PATTERNS, k as CerebrasParams, l as ChildRunStats, m as ClassifiedError, n as ClassifiedErrorKind, o as CreateSessionOptions, I as ImageContent, M as McpConnection, p as McpServerConfig, q as McpToolHookContext, O as OAuthRefreshHookContext, r as OpenAIParams, s as OpenRouterParams, P as PromptDocumentPart, t as PromptImagePart, u as PromptPart, v as PromptTextPart, w as Provider, x as ProviderCapabilities, R as RemoteStoreOptions, y as RunHookMap, S as Session, z as SessionContentBlock, B as SessionData, D as SessionEndStatus, E as SessionHookContext, F as SessionMessage, G as SessionRun, H as SessionStore, J as SessionTurn, K as SkillConfig, L as SkillResource, N as SkillsConfig, Q as SpawnHookContext, T as StreamCallbacks, U as StreamHookContext, V as StreamOptions, W as ThinkingLevel, X as ToolCall, Y as ToolContext, Z as ToolDef, _ as ToolExecutionMode, $ as ToolHookContext, a0 as ToolMap, a1 as ToolResult, a2 as ToolResultContent, a3 as ToolResultImageContent, a4 as ToolResultTextContent, a5 as ToolSpec, a6 as TurnFinishReason, a7 as TurnResult, a8 as TurnUsage, a9 as matchesContextExceeded, aa as toolOutputByteLength, ab as toolResultToText } from './agent-
|
|
2
|
-
export { C as ContextCapabilities, a as ContextType, E as ExecResult, b as ExecutionContext, c as ExecutionHandle, S as SpawnConfig } from './types-
|
|
3
|
-
export { S as SandboxProvider } from './sandbox-
|
|
1
|
+
export { A as Agent, a as AgentAbortedError, b as AgentBehavior, c as AgentContextExceededError, d as AgentHooks, e as AgentOptions, f as AgentProviderError, g as AgentRunOptions, h as AgentStats, i as AgentToolNotAllowedError, j as AnthropicParams, C as CONTEXT_EXCEEDED_MESSAGE_PATTERNS, k as CerebrasParams, l as ChildRunStats, m as ClassifiedError, n as ClassifiedErrorKind, o as CreateSessionOptions, I as ImageContent, M as McpConnection, p as McpServerConfig, q as McpToolHookContext, O as OAuthRefreshHookContext, r as OpenAIParams, s as OpenRouterParams, P as PromptDocumentPart, t as PromptImagePart, u as PromptPart, v as PromptTextPart, w as Provider, x as ProviderCapabilities, R as RemoteStoreOptions, y as RunHookMap, S as Session, z as SessionContentBlock, B as SessionData, D as SessionEndStatus, E as SessionHookContext, F as SessionMessage, G as SessionRun, H as SessionStore, J as SessionTurn, K as SkillConfig, L as SkillResource, N as SkillsConfig, Q as SpawnHookContext, T as StreamCallbacks, U as StreamHookContext, V as StreamOptions, W as ThinkingLevel, X as ToolCall, Y as ToolContext, Z as ToolDef, _ as ToolExecutionMode, $ as ToolHookContext, a0 as ToolMap, a1 as ToolResult, a2 as ToolResultContent, a3 as ToolResultImageContent, a4 as ToolResultTextContent, a5 as ToolSpec, a6 as TurnFinishReason, a7 as TurnResult, a8 as TurnUsage, a9 as matchesContextExceeded, aa as toolOutputByteLength, ab as toolResultToText } from './agent-C9q5VMGa.js';
|
|
2
|
+
export { C as ContextCapabilities, a as ContextType, E as ExecResult, b as ExecutionContext, c as ExecutionHandle, S as SpawnConfig } from './types-vA1a_ZX7.js';
|
|
3
|
+
export { S as SandboxProvider } from './sandbox-CLghrTLi.js';
|
|
4
4
|
export { Preset } from './presets.js';
|
|
5
|
-
export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState, V as ValidationResult } from './validation-
|
|
5
|
+
export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState, V as ValidationResult } from './validation-BKA33eqb.js';
|
|
6
6
|
import 'hookable';
|
|
7
7
|
import '@modelcontextprotocol/sdk/client/index.js';
|