zidane 3.3.3 → 3.3.5
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/{agent-DqEkutk4.d.ts → agent-LEf7zjw6.d.ts} +60 -1
- package/dist/{chunk-7H34OFDA.js → chunk-UXA7PPI5.js} +101 -4
- package/dist/{chunk-KITHPMLV.js → chunk-VC3PM4QB.js} +1 -1
- package/dist/{chunk-5GRZ5XVU.js → chunk-ZCJZIZZV.js} +6 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +3 -3
- package/dist/providers.d.ts +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/{skills-use-WbOh6TuS.d.ts → skills-use-CVxdV6Tq.d.ts} +1 -1
- package/dist/skills.d.ts +2 -2
- package/dist/tools.d.ts +4 -4
- package/dist/tools.js +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/{validation-DTbkLXbd.d.ts → validation-C4Ucr2wT.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -176,12 +176,50 @@ interface McpServerConfig {
|
|
|
176
176
|
bootstrapTimeout?: number;
|
|
177
177
|
/** Timeout in milliseconds for MCP tool calls (default: 30000) */
|
|
178
178
|
toolTimeout?: number;
|
|
179
|
+
/**
|
|
180
|
+
* Allow-list of tool names to expose. Names match the upstream tool name
|
|
181
|
+
* (NOT the namespaced `mcp_{server}_{tool}` form). Tools not in the list are
|
|
182
|
+
* dropped before registration — the model never sees them in its catalog and
|
|
183
|
+
* the wire cost of advertising them is avoided.
|
|
184
|
+
*
|
|
185
|
+
* Mutually exclusive with {@link McpServerConfig.disabledTools} — passing both
|
|
186
|
+
* throws at bootstrap time.
|
|
187
|
+
*
|
|
188
|
+
* Composes with {@link McpServerConfig.toolFilter}: allow-list applies first,
|
|
189
|
+
* then the predicate. Composes with the `mcp:tools:filter` hook: config-side
|
|
190
|
+
* filters apply first, then the hook can further narrow the list.
|
|
191
|
+
*/
|
|
192
|
+
enabledTools?: string[];
|
|
193
|
+
/**
|
|
194
|
+
* Deny-list of tool names. Tools matching are dropped before registration.
|
|
195
|
+
* Same matching semantics as {@link McpServerConfig.enabledTools}.
|
|
196
|
+
*/
|
|
197
|
+
disabledTools?: string[];
|
|
198
|
+
/**
|
|
199
|
+
* Custom predicate run on each upstream tool. Return `true` to keep, `false`
|
|
200
|
+
* to drop. Receives the raw `listTools()` payload — useful for filtering by
|
|
201
|
+
* description, schema shape, or other metadata that an allow/deny list can't
|
|
202
|
+
* express.
|
|
203
|
+
*
|
|
204
|
+
* Runs after the allow/deny filter but before the `mcp:tools:filter` hook.
|
|
205
|
+
*/
|
|
206
|
+
toolFilter?: (tool: {
|
|
207
|
+
name: string;
|
|
208
|
+
description?: string | null;
|
|
209
|
+
inputSchema?: unknown;
|
|
210
|
+
}) => boolean;
|
|
179
211
|
}
|
|
180
212
|
type ToolExecutionMode = 'sequential' | 'parallel';
|
|
181
213
|
interface AgentBehavior {
|
|
182
214
|
/** Tool execution mode (default: 'sequential') */
|
|
183
215
|
toolExecution?: ToolExecutionMode;
|
|
184
|
-
/**
|
|
216
|
+
/**
|
|
217
|
+
* Max agent loop iterations.
|
|
218
|
+
*
|
|
219
|
+
* Default: unlimited (Infinity). The loop runs until the model signals
|
|
220
|
+
* completion (no tool calls / `end_turn`), the abort signal fires, or this
|
|
221
|
+
* cap is hit. Set a finite value as a safety net for runaway loops.
|
|
222
|
+
*/
|
|
185
223
|
maxTurns?: number;
|
|
186
224
|
/** Max tokens per LLM response (default: 16384) */
|
|
187
225
|
maxTokens?: number;
|
|
@@ -2028,6 +2066,27 @@ interface AgentHooks {
|
|
|
2028
2066
|
ok: false;
|
|
2029
2067
|
error: Error;
|
|
2030
2068
|
})) => void;
|
|
2069
|
+
/**
|
|
2070
|
+
* Fires once per server after `listTools()` and after the config-side filters
|
|
2071
|
+
* (`enabledTools` / `disabledTools` / `toolFilter`) have applied, but BEFORE
|
|
2072
|
+
* tools are registered. Handlers may mutate `ctx.tools` in place — splicing,
|
|
2073
|
+
* reordering, or replacing entries — to further narrow what the model sees.
|
|
2074
|
+
*
|
|
2075
|
+
* Composes with config-side filters: config drops tools the host's static
|
|
2076
|
+
* policy excludes; this hook is the runtime escape hatch for per-user, per-
|
|
2077
|
+
* environment, or capability-driven decisions that the config can't express.
|
|
2078
|
+
*
|
|
2079
|
+
* Items are upstream tool descriptors (NOT yet namespaced as `mcp_<server>_<tool>`).
|
|
2080
|
+
*/
|
|
2081
|
+
'mcp:tools:filter': (ctx: {
|
|
2082
|
+
server: string;
|
|
2083
|
+
transport: 'stdio' | 'sse' | 'streamable-http';
|
|
2084
|
+
tools: Array<{
|
|
2085
|
+
name: string;
|
|
2086
|
+
description?: string | null;
|
|
2087
|
+
inputSchema?: unknown;
|
|
2088
|
+
}>;
|
|
2089
|
+
}) => void;
|
|
2031
2090
|
/**
|
|
2032
2091
|
* MCP-side counterpart of `tool:gate`. Same shape: set `block` to refuse,
|
|
2033
2092
|
* set `result` to substitute a successful payload and skip the upstream
|
|
@@ -4,10 +4,65 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// src/mcp/index.ts
|
|
6
6
|
import { Buffer } from "buffer";
|
|
7
|
-
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
8
7
|
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
9
8
|
import { getDefaultEnvironment, StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
10
9
|
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
10
|
+
|
|
11
|
+
// src/mcp/tolerant-client.ts
|
|
12
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
13
|
+
import { Protocol } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
14
|
+
import {
|
|
15
|
+
InitializeResultSchema,
|
|
16
|
+
LATEST_PROTOCOL_VERSION,
|
|
17
|
+
SUPPORTED_PROTOCOL_VERSIONS
|
|
18
|
+
} from "@modelcontextprotocol/sdk/types.js";
|
|
19
|
+
var TolerantMcpClient = class extends Client {
|
|
20
|
+
async connect(transport, options) {
|
|
21
|
+
await Protocol.prototype.connect.call(this, transport);
|
|
22
|
+
if (transport.sessionId !== void 0)
|
|
23
|
+
return;
|
|
24
|
+
const self = this;
|
|
25
|
+
try {
|
|
26
|
+
const result = await this.request(
|
|
27
|
+
{
|
|
28
|
+
method: "initialize",
|
|
29
|
+
params: {
|
|
30
|
+
protocolVersion: LATEST_PROTOCOL_VERSION,
|
|
31
|
+
capabilities: self._capabilities,
|
|
32
|
+
clientInfo: self._clientInfo
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
InitializeResultSchema,
|
|
36
|
+
options
|
|
37
|
+
);
|
|
38
|
+
if (result === void 0)
|
|
39
|
+
throw new Error(`Server sent invalid initialize result: ${result}`);
|
|
40
|
+
if (!SUPPORTED_PROTOCOL_VERSIONS.includes(result.protocolVersion))
|
|
41
|
+
throw new Error(`Server's protocol version is not supported: ${result.protocolVersion}`);
|
|
42
|
+
self._serverCapabilities = result.capabilities;
|
|
43
|
+
self._serverVersion = result.serverInfo;
|
|
44
|
+
const setProtocolVersion = transport.setProtocolVersion;
|
|
45
|
+
if (setProtocolVersion)
|
|
46
|
+
setProtocolVersion.call(transport, result.protocolVersion);
|
|
47
|
+
self._instructions = result.instructions;
|
|
48
|
+
try {
|
|
49
|
+
await this.notification({ method: "notifications/initialized" });
|
|
50
|
+
} catch (notifyError) {
|
|
51
|
+
const msg = notifyError instanceof Error ? notifyError.message : String(notifyError);
|
|
52
|
+
console.warn(`[zidane:mcp] server rejected notifications/initialized (continuing): ${msg}`);
|
|
53
|
+
}
|
|
54
|
+
if (self._pendingListChangedConfig) {
|
|
55
|
+
self._setupListChangedHandlers(self._pendingListChangedConfig);
|
|
56
|
+
self._pendingListChangedConfig = void 0;
|
|
57
|
+
}
|
|
58
|
+
} catch (error) {
|
|
59
|
+
void this.close();
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// src/mcp/index.ts
|
|
11
66
|
var DEFAULT_MCP_BOOTSTRAP_TIMEOUT_MS = 1e4;
|
|
12
67
|
function inferTransport(raw) {
|
|
13
68
|
if (raw.transport === "stdio" || raw.transport === "sse" || raw.transport === "streamable-http")
|
|
@@ -44,6 +99,12 @@ function normalizeOne(name, raw) {
|
|
|
44
99
|
config.bootstrapTimeout = raw.bootstrapTimeout;
|
|
45
100
|
if (typeof raw.toolTimeout === "number")
|
|
46
101
|
config.toolTimeout = raw.toolTimeout;
|
|
102
|
+
if (Array.isArray(raw.enabledTools))
|
|
103
|
+
config.enabledTools = raw.enabledTools;
|
|
104
|
+
if (Array.isArray(raw.disabledTools))
|
|
105
|
+
config.disabledTools = raw.disabledTools;
|
|
106
|
+
if (typeof raw.toolFilter === "function")
|
|
107
|
+
config.toolFilter = raw.toolFilter;
|
|
47
108
|
return config;
|
|
48
109
|
}
|
|
49
110
|
function looksLikeSingleConfig(obj) {
|
|
@@ -197,10 +258,24 @@ async function connectMcpServers(configs, _clientFactory, hooks) {
|
|
|
197
258
|
}
|
|
198
259
|
async function bootstrapServer(config, _clientFactory, hooks) {
|
|
199
260
|
const start = Date.now();
|
|
261
|
+
if (config.enabledTools && config.disabledTools) {
|
|
262
|
+
const error = new Error(
|
|
263
|
+
`MCP server "${config.name}": enabledTools and disabledTools are mutually exclusive \u2014 set one or the other, not both.`
|
|
264
|
+
);
|
|
265
|
+
await hooks?.callHook("mcp:bootstrap:start", { name: config.name, transport: config.transport });
|
|
266
|
+
await hooks?.callHook("mcp:bootstrap:end", {
|
|
267
|
+
name: config.name,
|
|
268
|
+
transport: config.transport,
|
|
269
|
+
durationMs: 0,
|
|
270
|
+
ok: false,
|
|
271
|
+
error
|
|
272
|
+
});
|
|
273
|
+
return { ok: false, name: config.name, error };
|
|
274
|
+
}
|
|
200
275
|
await hooks?.callHook("mcp:bootstrap:start", { name: config.name, transport: config.transport });
|
|
201
276
|
let client = null;
|
|
202
277
|
try {
|
|
203
|
-
client = _clientFactory ? _clientFactory() : new
|
|
278
|
+
client = _clientFactory ? _clientFactory() : new TolerantMcpClient({ name: "zidane", version: "1.0.0" });
|
|
204
279
|
const currentClient = client;
|
|
205
280
|
const transport = createTransport(config);
|
|
206
281
|
const bootstrapTimeout = config.bootstrapTimeout ?? DEFAULT_MCP_BOOTSTRAP_TIMEOUT_MS;
|
|
@@ -212,15 +287,16 @@ async function bootstrapServer(config, _clientFactory, hooks) {
|
|
|
212
287
|
bootstrapTimeout,
|
|
213
288
|
`MCP server "${config.name}" bootstrap timed out after ${bootstrapTimeout}ms`
|
|
214
289
|
);
|
|
290
|
+
const filteredTools = await applyMcpToolFilters(config, mcpTools, hooks);
|
|
215
291
|
const durationMs = Date.now() - start;
|
|
216
292
|
await hooks?.callHook("mcp:bootstrap:end", {
|
|
217
293
|
name: config.name,
|
|
218
294
|
transport: config.transport,
|
|
219
295
|
durationMs,
|
|
220
296
|
ok: true,
|
|
221
|
-
toolCount:
|
|
297
|
+
toolCount: filteredTools.length
|
|
222
298
|
});
|
|
223
|
-
return { ok: true, name: config.name, config, client: currentClient, tools:
|
|
299
|
+
return { ok: true, name: config.name, config, client: currentClient, tools: filteredTools };
|
|
224
300
|
} catch (err) {
|
|
225
301
|
const error = err instanceof Error ? err : new Error(String(err));
|
|
226
302
|
await closeClientQuietly(client);
|
|
@@ -235,6 +311,27 @@ async function bootstrapServer(config, _clientFactory, hooks) {
|
|
|
235
311
|
return { ok: false, name: config.name, error };
|
|
236
312
|
}
|
|
237
313
|
}
|
|
314
|
+
async function applyMcpToolFilters(config, tools, hooks) {
|
|
315
|
+
let filtered = tools;
|
|
316
|
+
if (config.enabledTools && config.enabledTools.length > 0) {
|
|
317
|
+
const allow = new Set(config.enabledTools);
|
|
318
|
+
filtered = filtered.filter((t) => allow.has(t.name));
|
|
319
|
+
}
|
|
320
|
+
if (config.disabledTools && config.disabledTools.length > 0) {
|
|
321
|
+
const deny = new Set(config.disabledTools);
|
|
322
|
+
filtered = filtered.filter((t) => !deny.has(t.name));
|
|
323
|
+
}
|
|
324
|
+
if (config.toolFilter) {
|
|
325
|
+
const predicate = config.toolFilter;
|
|
326
|
+
filtered = filtered.filter((t) => predicate(t));
|
|
327
|
+
}
|
|
328
|
+
if (hooks) {
|
|
329
|
+
const ctx = { server: config.name, transport: config.transport, tools: [...filtered] };
|
|
330
|
+
await hooks.callHook("mcp:tools:filter", ctx);
|
|
331
|
+
filtered = ctx.tools;
|
|
332
|
+
}
|
|
333
|
+
return filtered;
|
|
334
|
+
}
|
|
238
335
|
function buildMcpToolDef(config, client, tool, namespacedName, hooks) {
|
|
239
336
|
return {
|
|
240
337
|
spec: {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-UD25QF3H.js";
|
|
12
12
|
import {
|
|
13
13
|
connectMcpServers
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UXA7PPI5.js";
|
|
15
15
|
import {
|
|
16
16
|
toolOutputByteLength
|
|
17
17
|
} from "./chunk-JH6IAAFA.js";
|
|
@@ -1712,7 +1712,8 @@ async function runLoop(ctx) {
|
|
|
1712
1712
|
let totalOut = 0;
|
|
1713
1713
|
const turnUsages = [];
|
|
1714
1714
|
const startTime = Date.now();
|
|
1715
|
-
const maxTurns = ctx.maxTurns ??
|
|
1715
|
+
const maxTurns = ctx.maxTurns ?? Number.POSITIVE_INFINITY;
|
|
1716
|
+
let turnsCompleted = 0;
|
|
1716
1717
|
const ttft = { mark: void 0 };
|
|
1717
1718
|
const markTtft = () => {
|
|
1718
1719
|
if (ttft.mark === void 0)
|
|
@@ -1728,6 +1729,7 @@ async function runLoop(ctx) {
|
|
|
1728
1729
|
break;
|
|
1729
1730
|
}
|
|
1730
1731
|
const result = await executeTurn(ctx, turn);
|
|
1732
|
+
turnsCompleted = turn + 1;
|
|
1731
1733
|
totalIn += result.usage.input;
|
|
1732
1734
|
totalOut += result.usage.output;
|
|
1733
1735
|
turnUsages.push(result.usage);
|
|
@@ -1777,7 +1779,7 @@ async function runLoop(ctx) {
|
|
|
1777
1779
|
return {
|
|
1778
1780
|
totalIn,
|
|
1779
1781
|
totalOut,
|
|
1780
|
-
turns:
|
|
1782
|
+
turns: turnsCompleted,
|
|
1781
1783
|
elapsed: Date.now() - startTime,
|
|
1782
1784
|
turnUsage: turnUsages,
|
|
1783
1785
|
...ttft.mark !== void 0 ? { timeTillFirstTokenMs: ttft.mark } : {}
|
|
@@ -2383,6 +2385,7 @@ var HOOK_EVENT_NAMES = [
|
|
|
2383
2385
|
"mcp:close",
|
|
2384
2386
|
"mcp:bootstrap:start",
|
|
2385
2387
|
"mcp:bootstrap:end",
|
|
2388
|
+
"mcp:tools:filter",
|
|
2386
2389
|
"mcp:tool:gate",
|
|
2387
2390
|
"mcp:tool:before",
|
|
2388
2391
|
"mcp:tool:after",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { d as AgentHooks } from './agent-
|
|
2
|
-
export { ab as ActivationVia, ac 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, ad as DeactivationReason, ae as FileMapAdapter, af as FileMapStoreOptions, M as McpConnection, p as McpServerConfig, q as McpToolHookContext, O as OAuthRefreshHookContext, ag as OpenAICompatAuthHeader, ah as OpenAICompatHttpError, ai 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, I as SessionTurn, aj as SkillActivationState, ak as SkillActivationStateOptions, J as SkillConfig, al as SkillDiagnostic, K as SkillResource, am as SkillSource, L as SkillsConfig, N as SpawnHookContext, Q as StreamCallbacks, T as StreamHookContext, U as StreamOptions, V as ThinkingLevel, W as ToolCall, X as ToolContext, Y as ToolDef, Z as ToolExecutionMode, _ as ToolHookContext, $ as ToolMap, a0 as ToolResult, a1 as ToolResultContent, a2 as ToolResultImageContent, a3 as ToolResultTextContent, a4 as ToolSpec, a5 as TurnFinishReason, a6 as TurnResult, a7 as TurnUsage, an as anthropic, ao as autoDetectAndConvert, ap as cerebras, aq as classifyOpenAICompatError, ar as connectMcpServers, as as createAgent, at as createFileMapStore, au as createMemoryStore, av as createRemoteStore, aw as createSession, ax as createSkillActivationState, ay as fromAnthropic, az as fromOpenAI, aA as loadSession, aB as mapOAIFinishReason, a8 as matchesContextExceeded, aC as normalizeMcpBlocks, aD as normalizeMcpServers, aE as openai, aF as openaiCompat, aG as openrouter, aH as resultToString, aI as toAnthropic, aJ as toOpenAI, aK as toTypedError, a9 as toolOutputByteLength, aa as toolResultToText } from './agent-
|
|
1
|
+
import { d as AgentHooks } from './agent-LEf7zjw6.js';
|
|
2
|
+
export { ab as ActivationVia, ac 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, ad as DeactivationReason, ae as FileMapAdapter, af as FileMapStoreOptions, M as McpConnection, p as McpServerConfig, q as McpToolHookContext, O as OAuthRefreshHookContext, ag as OpenAICompatAuthHeader, ah as OpenAICompatHttpError, ai 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, I as SessionTurn, aj as SkillActivationState, ak as SkillActivationStateOptions, J as SkillConfig, al as SkillDiagnostic, K as SkillResource, am as SkillSource, L as SkillsConfig, N as SpawnHookContext, Q as StreamCallbacks, T as StreamHookContext, U as StreamOptions, V as ThinkingLevel, W as ToolCall, X as ToolContext, Y as ToolDef, Z as ToolExecutionMode, _ as ToolHookContext, $ as ToolMap, a0 as ToolResult, a1 as ToolResultContent, a2 as ToolResultImageContent, a3 as ToolResultTextContent, a4 as ToolSpec, a5 as TurnFinishReason, a6 as TurnResult, a7 as TurnUsage, an as anthropic, ao as autoDetectAndConvert, ap as cerebras, aq as classifyOpenAICompatError, ar as connectMcpServers, as as createAgent, at as createFileMapStore, au as createMemoryStore, av as createRemoteStore, aw as createSession, ax as createSkillActivationState, ay as fromAnthropic, az as fromOpenAI, aA as loadSession, aB as mapOAIFinishReason, a8 as matchesContextExceeded, aC as normalizeMcpBlocks, aD as normalizeMcpServers, aE as openai, aF as openaiCompat, aG as openrouter, aH as resultToString, aI as toAnthropic, aJ as toOpenAI, aK as toTypedError, a9 as toolOutputByteLength, aa as toolResultToText } from './agent-LEf7zjw6.js';
|
|
3
3
|
export { createDockerContext, createProcessContext } from './contexts.js';
|
|
4
4
|
export { S as SandboxProvider, c as createSandboxContext } from './sandbox-CLghrTLi.js';
|
|
5
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, 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-CVxdV6Tq.js';
|
|
9
|
+
export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState, V as ValidationResult, c as createInteractionTool, b as createSpawnTool, v as validateToolArgs } from './validation-C4Ucr2wT.js';
|
|
10
10
|
import { Hookable } from 'hookable';
|
|
11
11
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
12
12
|
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
basicTools,
|
|
12
12
|
basic_default,
|
|
13
13
|
definePreset
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VC3PM4QB.js";
|
|
15
15
|
import {
|
|
16
16
|
createAgent,
|
|
17
17
|
createInteractionTool,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
grep,
|
|
25
25
|
multiEdit,
|
|
26
26
|
validateToolArgs
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-ZCJZIZZV.js";
|
|
28
28
|
import {
|
|
29
29
|
IMPLICITLY_ALLOWED_SKILL_TOOLS,
|
|
30
30
|
buildCatalog,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
normalizeMcpBlocks,
|
|
54
54
|
normalizeMcpServers,
|
|
55
55
|
resultToString
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-UXA7PPI5.js";
|
|
57
57
|
import {
|
|
58
58
|
toolOutputByteLength,
|
|
59
59
|
toolResultToText
|
package/dist/mcp.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import 'hookable';
|
|
2
|
-
export { M as McpConnection, p as McpServerConfig, ar as connectMcpServers, aC as normalizeMcpBlocks, aD as normalizeMcpServers, aH as resultToString } from './agent-DqEkutk4.js';
|
|
3
1
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
2
|
+
import 'hookable';
|
|
3
|
+
export { M as McpConnection, p as McpServerConfig, ar as connectMcpServers, aC as normalizeMcpBlocks, aD as normalizeMcpServers, aH as resultToString } from './agent-LEf7zjw6.js';
|
|
4
4
|
import './types-vA1a_ZX7.js';
|
package/dist/mcp.js
CHANGED
package/dist/presets.d.ts
CHANGED
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-VC3PM4QB.js";
|
|
6
|
+
import "./chunk-ZCJZIZZV.js";
|
|
7
7
|
import "./chunk-X3VOTPVM.js";
|
|
8
8
|
import "./chunk-UD25QF3H.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-UXA7PPI5.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, ag as OpenAICompatAuthHeader, ah as OpenAICompatHttpError, ai as OpenAICompatParams, r as OpenAIParams, s as OpenRouterParams, w as Provider, x as ProviderCapabilities, Q as StreamCallbacks, U as StreamOptions, W as ToolCall, a0 as ToolResult, a4 as ToolSpec, a6 as TurnResult, an as anthropic, ap as cerebras, aq as classifyOpenAICompatError, aB as mapOAIFinishReason, aE as openai, aF as openaiCompat, aG as openrouter } from './agent-
|
|
1
|
+
export { j as AnthropicParams, k as CerebrasParams, ag as OpenAICompatAuthHeader, ah as OpenAICompatHttpError, ai as OpenAICompatParams, r as OpenAIParams, s as OpenRouterParams, w as Provider, x as ProviderCapabilities, Q as StreamCallbacks, U as StreamOptions, W as ToolCall, a0 as ToolResult, a4 as ToolSpec, a6 as TurnResult, an as anthropic, ap as cerebras, aq as classifyOpenAICompatError, aB as mapOAIFinishReason, aE as openai, aF as openaiCompat, aG as openrouter } from './agent-LEf7zjw6.js';
|
|
2
2
|
import 'hookable';
|
|
3
3
|
import './types-vA1a_ZX7.js';
|
|
4
4
|
import '@modelcontextprotocol/sdk/client/index.js';
|
package/dist/session/sqlite.d.ts
CHANGED
package/dist/session.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { o as CreateSessionOptions, ae as FileMapAdapter, af as FileMapStoreOptions, R as RemoteStoreOptions, S as Session, z as SessionContentBlock, B as SessionData, F as SessionMessage, G as SessionRun, H as SessionStore, I as SessionTurn, ao as autoDetectAndConvert, at as createFileMapStore, au as createMemoryStore, av as createRemoteStore, aw as createSession, ay as fromAnthropic, az as fromOpenAI, aA as loadSession, aI as toAnthropic, aJ as toOpenAI } from './agent-
|
|
1
|
+
export { o as CreateSessionOptions, ae as FileMapAdapter, af as FileMapStoreOptions, R as RemoteStoreOptions, S as Session, z as SessionContentBlock, B as SessionData, F as SessionMessage, G as SessionRun, H as SessionStore, I as SessionTurn, ao as autoDetectAndConvert, at as createFileMapStore, au as createMemoryStore, av as createRemoteStore, aw as createSession, ay as fromAnthropic, az as fromOpenAI, aA as loadSession, aI as toAnthropic, aJ as toOpenAI } from './agent-LEf7zjw6.js';
|
|
2
2
|
import 'hookable';
|
|
3
3
|
import './types-vA1a_ZX7.js';
|
|
4
4
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Y as ToolDef, J as SkillConfig, aj as SkillActivationState, d as AgentHooks } from './agent-
|
|
1
|
+
import { Y as ToolDef, J as SkillConfig, aj as SkillActivationState, d as AgentHooks } from './agent-LEf7zjw6.js';
|
|
2
2
|
import { Hookable } from 'hookable';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/skills.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as AgentHooks, aj as SkillActivationState, J as SkillConfig, am as SkillSource, al as SkillDiagnostic, L as SkillsConfig } from './agent-
|
|
2
|
-
export { ab as ActivationVia, ac as ActiveSkill, ad as DeactivationReason, ak as SkillActivationStateOptions, K as SkillResource, ax as createSkillActivationState } from './agent-
|
|
1
|
+
import { d as AgentHooks, aj as SkillActivationState, J as SkillConfig, am as SkillSource, al as SkillDiagnostic, L as SkillsConfig } from './agent-LEf7zjw6.js';
|
|
2
|
+
export { ab as ActivationVia, ac as ActiveSkill, ad as DeactivationReason, ak as SkillActivationStateOptions, K as SkillResource, ax as createSkillActivationState } from './agent-LEf7zjw6.js';
|
|
3
3
|
import { Hookable } from 'hookable';
|
|
4
4
|
import { b as ExecutionContext, c as ExecutionHandle } from './types-vA1a_ZX7.js';
|
|
5
5
|
import '@modelcontextprotocol/sdk/client/index.js';
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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, v as validateToolArgs } from './validation-
|
|
3
|
-
import { Y as ToolDef } from './agent-
|
|
4
|
-
export { X as ToolContext, $ 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-CVxdV6Tq.js';
|
|
2
|
+
export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState, V as ValidationResult, c as createInteractionTool, b as createSpawnTool, v as validateToolArgs } from './validation-C4Ucr2wT.js';
|
|
3
|
+
import { Y as ToolDef } from './agent-LEf7zjw6.js';
|
|
4
|
+
export { X as ToolContext, $ as ToolMap } from './agent-LEf7zjw6.js';
|
|
5
5
|
import 'hookable';
|
|
6
6
|
import './presets.js';
|
|
7
7
|
import './types-vA1a_ZX7.js';
|
package/dist/tools.js
CHANGED
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
shell,
|
|
14
14
|
validateToolArgs,
|
|
15
15
|
writeFile
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZCJZIZZV.js";
|
|
17
17
|
import "./chunk-X3VOTPVM.js";
|
|
18
18
|
import "./chunk-UD25QF3H.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-UXA7PPI5.js";
|
|
20
20
|
import "./chunk-JH6IAAFA.js";
|
|
21
21
|
import "./chunk-LNN5UTS2.js";
|
|
22
22
|
export {
|
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, 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, I as SessionTurn, J as SkillConfig, K as SkillResource, L as SkillsConfig, N as SpawnHookContext, Q as StreamCallbacks, T as StreamHookContext, U as StreamOptions, V as ThinkingLevel, W as ToolCall, X as ToolContext, Y as ToolDef, Z as ToolExecutionMode, _ as ToolHookContext, $ as ToolMap, a0 as ToolResult, a1 as ToolResultContent, a2 as ToolResultImageContent, a3 as ToolResultTextContent, a4 as ToolSpec, a5 as TurnFinishReason, a6 as TurnResult, a7 as TurnUsage, a8 as matchesContextExceeded, a9 as toolOutputByteLength, aa as toolResultToText } from './agent-
|
|
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, 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, I as SessionTurn, J as SkillConfig, K as SkillResource, L as SkillsConfig, N as SpawnHookContext, Q as StreamCallbacks, T as StreamHookContext, U as StreamOptions, V as ThinkingLevel, W as ToolCall, X as ToolContext, Y as ToolDef, Z as ToolExecutionMode, _ as ToolHookContext, $ as ToolMap, a0 as ToolResult, a1 as ToolResultContent, a2 as ToolResultImageContent, a3 as ToolResultTextContent, a4 as ToolSpec, a5 as TurnFinishReason, a6 as TurnResult, a7 as TurnUsage, a8 as matchesContextExceeded, a9 as toolOutputByteLength, aa as toolResultToText } from './agent-LEf7zjw6.js';
|
|
2
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
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-C4Ucr2wT.js';
|
|
6
6
|
import 'hookable';
|
|
7
7
|
import '@modelcontextprotocol/sdk/client/index.js';
|