zidane 1.8.0 → 2.0.1

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.
Files changed (36) hide show
  1. package/dist/{agent-CWQ5XOw6.d.ts → agent-D-ZFMbSd.d.ts} +371 -21
  2. package/dist/{chunk-FFFDQHMA.js → chunk-7JTBBZ2U.js} +21 -0
  3. package/dist/chunk-BCXXXJ3G.js +779 -0
  4. package/dist/{chunk-WQBKOZVI.js → chunk-FRNFVKWW.js} +50 -12
  5. package/dist/{chunk-EC7IRWVS.js → chunk-LN4LLLHA.js} +101 -7
  6. package/dist/chunk-LVC7NQUZ.js +22 -0
  7. package/dist/chunk-MYWDHD7C.js +14 -0
  8. package/dist/{chunk-3RJOWJOJ.js → chunk-OVQ4N64O.js} +1 -1
  9. package/dist/{chunk-4N5ADW7A.js → chunk-PASFWG7S.js} +343 -32
  10. package/dist/{chunk-TBC6MSVK.js → chunk-PJUUYBKF.js} +53 -4
  11. package/dist/{chunk-2IB4XBQE.js → chunk-VG2E6YK3.js} +0 -97
  12. package/dist/harnesses.d.ts +1 -2
  13. package/dist/harnesses.js +5 -5
  14. package/dist/index.d.ts +5 -6
  15. package/dist/index.js +42 -12
  16. package/dist/mcp.d.ts +1 -2
  17. package/dist/mcp.js +3 -1
  18. package/dist/providers.d.ts +1 -2
  19. package/dist/providers.js +3 -3
  20. package/dist/session/sqlite.d.ts +16 -0
  21. package/dist/session/sqlite.js +98 -0
  22. package/dist/session.d.ts +1 -2
  23. package/dist/session.js +3 -5
  24. package/dist/skills-use-C4KFVla0.d.ts +66 -0
  25. package/dist/skills.d.ts +215 -30
  26. package/dist/skills.js +21 -2
  27. package/dist/{spawn-EEv1Johs.d.ts → spawn-RoqpjYLZ.d.ts} +1 -1
  28. package/dist/tools.d.ts +3 -4
  29. package/dist/tools.js +10 -4
  30. package/dist/types.d.ts +2 -3
  31. package/dist/types.js +8 -2
  32. package/package.json +12 -3
  33. package/dist/chunk-4C6Y56CC.js +0 -390
  34. package/dist/chunk-CFLC2I7D.js +0 -8
  35. package/dist/glob-j9gbk6xm.d.ts +0 -5
  36. package/dist/types-CDI8Kmve.d.ts +0 -64
package/dist/skills.d.ts CHANGED
@@ -1,55 +1,231 @@
1
- import { S as SkillConfig, b as SkillsConfig } from './types-CDI8Kmve.js';
2
- export { a as SkillResource } from './types-CDI8Kmve.js';
1
+ import { d as AgentHooks, al as SkillActivationState, N as SkillConfig, ao as SkillSource, an as SkillDiagnostic, T as SkillsConfig } from './agent-D-ZFMbSd.js';
2
+ export { ad as ActivationVia, ae as ActiveSkill, af as DeactivationReason, am as SkillActivationStateOptions, Q as SkillResource, az as createSkillActivationState } from './agent-D-ZFMbSd.js';
3
+ import { Hookable } from 'hookable';
3
4
  import { b as ExecutionContext, c as ExecutionHandle } from './types-BpvTmawk.js';
5
+ import '@modelcontextprotocol/sdk/client/index.js';
6
+
7
+ /**
8
+ * `allowed-tools` enforcement middleware.
9
+ *
10
+ * Installed by the agent on `tool:gate` and `mcp:tool:gate`. Computes the
11
+ * union of `allowedTools` patterns across currently-active skills; blocks any
12
+ * tool call whose `displayName` is not in that union. The three injected
13
+ * skills tools (`skills_use` / `skills_read` / `skills_run_script`) are
14
+ * implicitly allowed so a skill declaring an allow-list cannot lock out the
15
+ * scaffolding that lets it run at all.
16
+ *
17
+ * The match target is `displayName` (wire / LLM-facing name), not the
18
+ * canonical name, because skill authors write allow-list entries to match
19
+ * what the model sees.
20
+ */
21
+
22
+ /** Tools that are always allowed regardless of the active skills' allow-list. */
23
+ declare const IMPLICITLY_ALLOWED_SKILL_TOOLS: readonly string[];
24
+ /**
25
+ * Register `tool:gate` / `mcp:tool:gate` handlers that enforce the union of
26
+ * `allowedTools` across active skills.
27
+ *
28
+ * No-op when no active skill declares an allow-list (permissive default —
29
+ * matches the spec's "experimental" note for `allowed-tools`).
30
+ *
31
+ * Returns an `uninstall` fn. The agent calls this at run end to detach the
32
+ * handlers and prevent cross-run hook leaks.
33
+ */
34
+ declare function installAllowedToolsGate(hooks: Hookable<AgentHooks>, state: SkillActivationState): () => void;
4
35
 
5
36
  /**
6
37
  * Skill catalog generation.
7
38
  *
8
- * Builds the system prompt section that discloses available skills
9
- * to the agent, following progressive disclosure (tier 1: name + description only).
39
+ * Builds the system prompt section that discloses available skills to the
40
+ * agent tier 1 of progressive disclosure per the Agent Skills spec.
41
+ *
42
+ * The catalog's behavioral prose branches on which activation mechanism is
43
+ * active for the run:
44
+ *
45
+ * - When the `skills_use` tool is auto-injected (the default for a non-empty
46
+ * catalog), the prose tells the model to call `skills_use` with the skill's
47
+ * name. The agent returns a structured `<skill_content>` block.
48
+ * - When the skills tool is opted out (`SkillsConfig.tool: false`), the prose
49
+ * falls back to the file-read pattern — the model reads `SKILL.md` itself
50
+ * via its file-read tool.
10
51
  */
11
52
 
53
+ interface BuildCatalogOptions {
54
+ /**
55
+ * When true (the default), the prose instructs the model to call
56
+ * `skills_use`. Set to false when `SkillsConfig.tool === false` so the
57
+ * system prompt matches the active activation mechanism.
58
+ */
59
+ skillsToolRegistered?: boolean;
60
+ /**
61
+ * Name of the tool the model should use to read `SKILL.md` files when
62
+ * `skillsToolRegistered` is false. Defaults to `'read_file'`.
63
+ */
64
+ readToolName?: string;
65
+ }
12
66
  /**
13
67
  * Build the skill catalog XML and behavioral instructions for the system prompt.
68
+ */
69
+ declare function buildCatalog(skills: SkillConfig[], optionsOrReadToolName?: BuildCatalogOptions | string): string;
70
+
71
+ /**
72
+ * Strict validators for Agent Skills.
14
73
  *
15
- * @param skills - Resolved skills to include (already filtered for excluded)
16
- * @param readToolName - Tool name the agent should use to read skill files (default: 'read_file')
74
+ * Applied on the authoring path (`defineSkill`, `writeSkillToDisk`). Parser-time
75
+ * validation is intentionally lenient see `parseSkillFile` for diagnostic collection.
17
76
  */
18
- declare function buildCatalog(skills: SkillConfig[], readToolName?: string): string;
77
+
78
+ /**
79
+ * A single issue surfaced by skill-authoring validation.
80
+ * Distinct from `ValidationResult` in `tools/validation.ts` (tool-input JSON
81
+ * schema validation) — different domain, different module.
82
+ */
83
+ interface SkillValidationIssue {
84
+ /** Stable machine-readable code for consumer matching. */
85
+ code: string;
86
+ /** Human-readable description. */
87
+ message: string;
88
+ /** Frontmatter field name the issue relates to, when applicable. */
89
+ field?: string;
90
+ }
91
+ interface SkillValidationResult {
92
+ valid: boolean;
93
+ errors: SkillValidationIssue[];
94
+ }
95
+ /**
96
+ * Validate a skill name per the spec:
97
+ * - 1–64 characters
98
+ * - Lowercase alphanumeric + hyphens only
99
+ * - Must not start or end with a hyphen
100
+ * - Must not contain consecutive hyphens
101
+ *
102
+ * The parent-directory match is validated separately (it requires knowing the
103
+ * skill's `location`, which this function does not).
104
+ */
105
+ declare function validateSkillName(name: string): boolean;
106
+ /**
107
+ * Strict validation for a skill that is about to be authored / written to disk.
108
+ * Rejects anything that would violate the spec. Use the lenient parser path
109
+ * (`parseSkillFile`) for loading third-party skills.
110
+ */
111
+ declare function validateSkillForWrite(skill: SkillConfig): SkillValidationResult;
112
+ /**
113
+ * Validate that `relPath` stays inside `baseDir` when resolved.
114
+ *
115
+ * Rejects:
116
+ * - Absolute paths (`/etc/passwd`, `C:\…`)
117
+ * - Parent traversal (`..` segments that escape baseDir)
118
+ * - Null-byte tricks
119
+ *
120
+ * Returns `{ valid: true, absolutePath }` on success or `{ valid: false, error }`
121
+ * with a human-readable reason.
122
+ */
123
+ declare function validateResourcePath(relPath: string, baseDir: string): {
124
+ valid: true;
125
+ absolutePath: string;
126
+ } | {
127
+ valid: false;
128
+ error: string;
129
+ };
130
+ /**
131
+ * Parse a single `allowed-tools` entry into its tool name + optional argument pattern.
132
+ *
133
+ * Examples:
134
+ * - `Read` → `{ tool: 'Read' }`
135
+ * - `Bash(git:*)` → `{ tool: 'Bash', argPrefix: 'git' }`
136
+ */
137
+ declare function parseAllowedToolPattern(entry: string): {
138
+ tool: string;
139
+ argPrefix?: string;
140
+ } | null;
141
+ /**
142
+ * Check whether a tool call (identified by its wire/displayName and argument input)
143
+ * matches a skill's allow-list entry.
144
+ *
145
+ * Matching rules (Zidane's interpretation of the spec's unspecified syntax):
146
+ * - Exact match: displayName === pattern (no parens).
147
+ * - Prefix match: for `Tool(arg:*)`, displayName === 'Tool' AND **any** string
148
+ * value in the input object starts with `arg`. This is intentionally
149
+ * permissive: it doesn't depend on a convention about which property carries
150
+ * the "command" (schemas vary across tools), and for the common
151
+ * `shell({ command: 'git …' })` shape it behaves identically to a "primary
152
+ * string" rule.
153
+ * - For tools whose inputs carry no string values, the arg-match returns false.
154
+ */
155
+ declare function matchesAllowedTool(displayName: string, input: Record<string, unknown>, pattern: string): boolean;
156
+ /**
157
+ * Test whether a tool call is allowed by the union of `allowedTools` across a set
158
+ * of active skills. Returns `true` when the union is empty (permissive default)
159
+ * OR when any entry matches.
160
+ */
161
+ declare function isToolAllowedByUnion(displayName: string, input: Record<string, unknown>, union: readonly string[]): boolean;
19
162
 
20
163
  /**
21
164
  * Skill discovery and parsing.
22
165
  *
23
166
  * Scans filesystem directories for SKILL.md files following the
24
167
  * Agent Skills specification (agentskills.io/specification).
168
+ *
169
+ * Parsing is intentionally **lenient** — per the spec's client-implementation
170
+ * guide: warn, don't block. Diagnostics are attached to the returned
171
+ * SkillConfig for host UIs to surface; only unrecoverable errors (missing
172
+ * description, unparseable YAML) skip the skill entirely.
25
173
  */
26
174
 
27
- /**
28
- * Validate a skill name per the Agent Skills spec:
29
- * 1-64 chars, lowercase alphanumeric + hyphens, no leading/trailing/consecutive hyphens.
30
- */
31
- declare function validateSkillName(name: string): boolean;
32
175
  interface ParsedSkillFile {
33
176
  frontmatter: Record<string, unknown>;
34
177
  body: string;
178
+ diagnostics: SkillDiagnostic[];
35
179
  }
36
180
  /**
37
181
  * Parse a SKILL.md file into frontmatter + body.
38
- * Uses simple regex-based extraction (no external YAML lib needed for simple cases).
182
+ *
183
+ * Uses a simple regex-based YAML extractor that handles:
184
+ * - Flat key: value pairs
185
+ * - Quoted values
186
+ * - One-level nested maps (for `metadata:`)
187
+ * - Lenient recovery from unquoted-colon values (e.g.
188
+ * `description: Use when: the user asks …`) via a quote-wrap retry.
39
189
  */
40
190
  declare function parseFrontmatter(content: string): ParsedSkillFile;
191
+ interface ParseSkillOptions {
192
+ /** Source tag to attach to the returned SkillConfig. */
193
+ source?: SkillSource;
194
+ }
41
195
  /**
42
- * Parse a SKILL.md file into a SkillConfig.
43
- * Returns null if the file is invalid (missing description).
196
+ * Parse a SKILL.md file into a SkillConfig (lenient).
197
+ *
198
+ * Returns `null` only when the skill is fundamentally unusable:
199
+ * - The file is missing
200
+ * - The description is absent (required by spec for disclosure)
201
+ *
202
+ * All other issues are surfaced as `SkillConfig.diagnostics` with severity
203
+ * `warning`. Deprecated top-level fields (`paths`, `model`, `thinking`) are
204
+ * auto-migrated into `metadata['zidane.*']`.
44
205
  */
45
- declare function parseSkillFile(filePath: string): Promise<SkillConfig | null>;
46
- declare function getDefaultScanPaths(): string[];
206
+ declare function parseSkillFile(filePath: string, options?: ParseSkillOptions): Promise<SkillConfig | null>;
207
+ /** A scan path paired with the source tag that should be attached to any skills found in it. */
208
+ interface SourcedScanPath {
209
+ path: string;
210
+ source: SkillSource;
211
+ }
47
212
  /**
48
- * Discover skills from filesystem paths.
213
+ * Return the default scan paths tagged by source. Project-scope paths come
214
+ * first; their skills therefore win on name collisions against user-scope
215
+ * skills (first-found wins in discovery).
216
+ */
217
+ declare function getDefaultScanPaths(): SourcedScanPath[];
218
+ /**
219
+ * Infer a source tag for a user-provided scan path.
220
+ * Paths under `$HOME` are treated as 'user'; everything else as 'project'.
221
+ */
222
+ declare function inferSource(path: string): SkillSource;
223
+ /**
224
+ * Discover skills from sourced filesystem paths.
49
225
  * Each path is scanned for subdirectories containing SKILL.md.
50
- * Later paths have lower priority (earlier skill with same name wins).
226
+ * Earlier paths have higher priority (first-found wins on name collision).
51
227
  */
52
- declare function discoverSkills(paths: string[]): Promise<SkillConfig[]>;
228
+ declare function discoverSkills(paths: SourcedScanPath[]): Promise<SkillConfig[]>;
53
229
 
54
230
  /**
55
231
  * Shell interpolation for skill instructions.
@@ -84,12 +260,11 @@ declare function interpolateShellCommands(instructions: string, execution: Execu
84
260
 
85
261
  /**
86
262
  * Resolve all skills from a SkillsConfig:
87
- * 1. Write dynamic skills (config.write) to a temp directory
88
- * 2. Discover skills from scan paths (defaults + config.scan + written dir)
89
- * 3. Filter out exclude skills
90
263
  *
91
- * Written skills are materialized as proper SKILL.md files on disk,
92
- * so they participate in discovery like any other filesystem skill.
264
+ * 1. Materialize `config.write` entries to a temp directory, tagged as `inline`
265
+ * 2. Combine with default + user-provided scan paths (project-first, user-next)
266
+ * 3. Run lenient discovery
267
+ * 4. Apply filters: `exclude`, `enabled` allowlist, optional project-skill trust gate
93
268
  */
94
269
  declare function resolveSkills(config: SkillsConfig): Promise<SkillConfig[]>;
95
270
  /**
@@ -102,15 +277,21 @@ declare function mergeSkillsConfig(harness?: SkillsConfig, agent?: SkillsConfig)
102
277
  /**
103
278
  * Skill writer — materializes inline SkillConfig objects to disk as proper
104
279
  * SKILL.md files so they participate fully in the filesystem-based skill system.
280
+ *
281
+ * Strict-validates each skill before writing (see `validateSkillForWrite`).
105
282
  */
106
283
 
107
284
  /**
108
- * Write a SkillConfig to disk as a proper skill directory with SKILL.md.
285
+ * Write a `SkillConfig` to disk as a proper skill directory with SKILL.md.
109
286
  * Returns the path to the written SKILL.md file.
287
+ *
288
+ * Throws if the skill fails `validateSkillForWrite` — the authoring path is
289
+ * strict on purpose. For loading third-party skills, use `parseSkillFile`
290
+ * directly (lenient).
110
291
  */
111
292
  declare function writeSkillToDisk(skill: SkillConfig, targetDir: string): string;
112
293
  /**
113
- * Write multiple SkillConfig objects to a target directory.
294
+ * Write multiple `SkillConfig` objects to a target directory.
114
295
  * Each skill gets its own subdirectory with a SKILL.md file.
115
296
  * Returns the target directory path (for use as a scan path).
116
297
  */
@@ -118,8 +299,12 @@ declare function writeSkillsToDisk(skills: SkillConfig[], targetDir: string): st
118
299
 
119
300
  /**
120
301
  * Define an inline skill configuration.
121
- * Convenience wrapper for type safety — returns the config as-is.
302
+ *
303
+ * Strict-validates at author-time — throws if the config would be rejected by
304
+ * `writeSkillToDisk` or the spec. Source defaults to `'inline'`.
122
305
  */
123
- declare function defineSkill(config: SkillConfig): SkillConfig;
306
+ declare function defineSkill(config: Omit<SkillConfig, 'source'> & {
307
+ source?: SkillConfig['source'];
308
+ }): SkillConfig;
124
309
 
125
- export { SkillConfig, SkillsConfig, buildCatalog, defineSkill, discoverSkills, getDefaultScanPaths, interpolateShellCommands, mergeSkillsConfig, parseFrontmatter, parseSkillFile, resolveSkills, validateSkillName, writeSkillToDisk, writeSkillsToDisk };
310
+ export { IMPLICITLY_ALLOWED_SKILL_TOOLS, SkillActivationState, SkillConfig, SkillDiagnostic, SkillSource, type SkillValidationIssue, type SkillValidationResult, SkillsConfig, type SourcedScanPath, buildCatalog, defineSkill, discoverSkills, getDefaultScanPaths, inferSource, installAllowedToolsGate, interpolateShellCommands, isToolAllowedByUnion, matchesAllowedTool, mergeSkillsConfig, parseAllowedToolPattern, parseFrontmatter, parseSkillFile, resolveSkills, validateResourcePath, validateSkillForWrite, validateSkillName, writeSkillToDisk, writeSkillsToDisk };
package/dist/skills.js CHANGED
@@ -1,29 +1,48 @@
1
1
  import {
2
2
  defineSkill
3
- } from "./chunk-CFLC2I7D.js";
3
+ } from "./chunk-LVC7NQUZ.js";
4
4
  import {
5
+ IMPLICITLY_ALLOWED_SKILL_TOOLS,
5
6
  buildCatalog,
7
+ createSkillActivationState,
6
8
  discoverSkills,
7
9
  getDefaultScanPaths,
10
+ inferSource,
11
+ installAllowedToolsGate,
8
12
  interpolateShellCommands,
13
+ isToolAllowedByUnion,
14
+ matchesAllowedTool,
9
15
  mergeSkillsConfig,
16
+ parseAllowedToolPattern,
10
17
  parseFrontmatter,
11
18
  parseSkillFile,
12
19
  resolveSkills,
20
+ validateResourcePath,
21
+ validateSkillForWrite,
13
22
  validateSkillName,
14
23
  writeSkillToDisk,
15
24
  writeSkillsToDisk
16
- } from "./chunk-4C6Y56CC.js";
25
+ } from "./chunk-BCXXXJ3G.js";
26
+ import "./chunk-7JTBBZ2U.js";
17
27
  export {
28
+ IMPLICITLY_ALLOWED_SKILL_TOOLS,
18
29
  buildCatalog,
30
+ createSkillActivationState,
19
31
  defineSkill,
20
32
  discoverSkills,
21
33
  getDefaultScanPaths,
34
+ inferSource,
35
+ installAllowedToolsGate,
22
36
  interpolateShellCommands,
37
+ isToolAllowedByUnion,
38
+ matchesAllowedTool,
23
39
  mergeSkillsConfig,
40
+ parseAllowedToolPattern,
24
41
  parseFrontmatter,
25
42
  parseSkillFile,
26
43
  resolveSkills,
44
+ validateResourcePath,
45
+ validateSkillForWrite,
27
46
  validateSkillName,
28
47
  writeSkillToDisk,
29
48
  writeSkillsToDisk
@@ -1,4 +1,4 @@
1
- import { W as ToolContext, X as ToolDef, o as HarnessConfig, h as AgentStats } from './agent-CWQ5XOw6.js';
1
+ import { _ as ToolContext, $ as ToolDef, p as HarnessConfig, h as AgentStats } from './agent-D-ZFMbSd.js';
2
2
 
3
3
  /**
4
4
  * Interaction tool — lets the agent request structured input from the outside world.
package/dist/tools.d.ts CHANGED
@@ -1,11 +1,10 @@
1
- export { g as glob } from './glob-j9gbk6xm.js';
2
- export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState, c as createInteractionTool, b as createSpawnTool, s as spawn } from './spawn-EEv1Johs.js';
3
- import { X as ToolDef } from './agent-CWQ5XOw6.js';
1
+ export { S as SkillsReadToolOptions, a as SkillsRunScriptToolOptions, b as SkillsUseToolOptions, c as createSkillsReadTool, d as createSkillsRunScriptTool, e as createSkillsUseTool, g as glob } from './skills-use-C4KFVla0.js';
2
+ export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState, c as createInteractionTool, b as createSpawnTool, s as spawn } from './spawn-RoqpjYLZ.js';
3
+ import { $ as ToolDef } from './agent-D-ZFMbSd.js';
4
4
  export { V as ValidationResult, v as validateToolArgs } from './validation-DOY_k7lW.js';
5
5
  import 'hookable';
6
6
  import './types-BpvTmawk.js';
7
7
  import '@modelcontextprotocol/sdk/client/index.js';
8
- import './types-CDI8Kmve.js';
9
8
 
10
9
  declare const listFiles: ToolDef;
11
10
 
package/dist/tools.js CHANGED
@@ -1,5 +1,8 @@
1
1
  import {
2
2
  createInteractionTool,
3
+ createSkillsReadTool,
4
+ createSkillsRunScriptTool,
5
+ createSkillsUseTool,
3
6
  createSpawnTool,
4
7
  glob,
5
8
  listFiles,
@@ -8,13 +11,16 @@ import {
8
11
  spawn,
9
12
  validateToolArgs,
10
13
  writeFile
11
- } from "./chunk-4N5ADW7A.js";
12
- import "./chunk-4C6Y56CC.js";
14
+ } from "./chunk-PASFWG7S.js";
15
+ import "./chunk-BCXXXJ3G.js";
13
16
  import "./chunk-SZA4FKW5.js";
14
- import "./chunk-TBC6MSVK.js";
15
- import "./chunk-FFFDQHMA.js";
17
+ import "./chunk-PJUUYBKF.js";
18
+ import "./chunk-7JTBBZ2U.js";
16
19
  export {
17
20
  createInteractionTool,
21
+ createSkillsReadTool,
22
+ createSkillsRunScriptTool,
23
+ createSkillsUseTool,
18
24
  createSpawnTool,
19
25
  glob,
20
26
  listFiles,
package/dist/types.d.ts CHANGED
@@ -1,8 +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 AnthropicParams, C as CONTEXT_EXCEEDED_MESSAGE_PATTERNS, j as CerebrasParams, k as ChildRunStats, l as ClassifiedError, m as ClassifiedErrorKind, n as CreateSessionOptions, H as Harness, o as HarnessConfig, 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, R as RemoteStoreOptions, x as RunHookMap, S as Session, y as SessionContentBlock, z as SessionData, B as SessionEndStatus, D as SessionHookContext, E as SessionMessage, F as SessionRun, G as SessionStore, J as SessionTurn, K as SpawnHookContext, L as SqliteStoreOptions, N as StreamCallbacks, Q as StreamHookContext, T as StreamOptions, U as ThinkingLevel, V as ToolCall, W as ToolContext, X as ToolDef, Y as ToolExecutionMode, Z as ToolHookContext, _ as ToolMap, $ as ToolResult, a0 as ToolSpec, a1 as TurnFinishReason, a2 as TurnResult, a3 as TurnUsage, a4 as matchesContextExceeded } from './agent-CWQ5XOw6.js';
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, H as Harness, p as HarnessConfig, I as ImageContent, M as McpConnection, q as McpServerConfig, r as McpToolHookContext, O as OAuthRefreshHookContext, s as OpenAIParams, t as OpenRouterParams, P as PromptDocumentPart, u as PromptImagePart, v as PromptPart, w as PromptTextPart, x as Provider, y as ProviderCapabilities, R as RemoteStoreOptions, z as RunHookMap, S as Session, B as SessionContentBlock, D as SessionData, E as SessionEndStatus, F as SessionHookContext, G as SessionMessage, J as SessionRun, K as SessionStore, L as SessionTurn, N as SkillConfig, Q as SkillResource, T as SkillsConfig, U as SpawnHookContext, V as StreamCallbacks, W as StreamHookContext, X as StreamOptions, Y as ThinkingLevel, Z as ToolCall, _ as ToolContext, $ as ToolDef, a0 as ToolExecutionMode, a1 as ToolHookContext, a2 as ToolMap, a3 as ToolResult, a4 as ToolResultContent, a5 as ToolResultImageContent, a6 as ToolResultTextContent, a7 as ToolSpec, a8 as TurnFinishReason, a9 as TurnResult, aa as TurnUsage, ab as matchesContextExceeded, ac as toolResultToText } from './agent-D-ZFMbSd.js';
2
2
  export { C as ContextCapabilities, a as ContextType, E as ExecResult, b as ExecutionContext, c as ExecutionHandle, S as SpawnConfig } from './types-BpvTmawk.js';
3
3
  export { S as SandboxProvider } from './sandbox-CW72eLDP.js';
4
- export { S as SkillConfig, a as SkillResource, b as SkillsConfig } from './types-CDI8Kmve.js';
5
- export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState } from './spawn-EEv1Johs.js';
4
+ export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState } from './spawn-RoqpjYLZ.js';
6
5
  export { V as ValidationResult } from './validation-DOY_k7lW.js';
7
6
  import 'hookable';
8
7
  import '@modelcontextprotocol/sdk/client/index.js';
package/dist/types.js CHANGED
@@ -1,14 +1,20 @@
1
+ import {
2
+ toolResultToText
3
+ } from "./chunk-MYWDHD7C.js";
1
4
  import {
2
5
  AgentAbortedError,
3
6
  AgentContextExceededError,
4
7
  AgentProviderError,
8
+ AgentToolNotAllowedError,
5
9
  CONTEXT_EXCEEDED_MESSAGE_PATTERNS,
6
10
  matchesContextExceeded
7
- } from "./chunk-FFFDQHMA.js";
11
+ } from "./chunk-7JTBBZ2U.js";
8
12
  export {
9
13
  AgentAbortedError,
10
14
  AgentContextExceededError,
11
15
  AgentProviderError,
16
+ AgentToolNotAllowedError,
12
17
  CONTEXT_EXCEEDED_MESSAGE_PATTERNS,
13
- matchesContextExceeded
18
+ matchesContextExceeded,
19
+ toolResultToText
14
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zidane",
3
- "version": "1.8.0",
3
+ "version": "2.0.1",
4
4
  "description": "an agent that goes straight to the goal",
5
5
  "type": "module",
6
6
  "private": false,
@@ -46,6 +46,10 @@
46
46
  "import": "./dist/session.js",
47
47
  "types": "./dist/session.d.ts"
48
48
  },
49
+ "./session/sqlite": {
50
+ "import": "./dist/session/sqlite.js",
51
+ "types": "./dist/session/sqlite.d.ts"
52
+ },
49
53
  "./skills": {
50
54
  "import": "./dist/skills.js",
51
55
  "types": "./dist/skills.d.ts"
@@ -67,23 +71,28 @@
67
71
  "typecheck": "tsc --noEmit"
68
72
  },
69
73
  "dependencies": {
70
- "@anthropic-ai/sdk": "^0.88.0",
71
- "@modelcontextprotocol/sdk": "^1.29.0",
72
74
  "@yaelg/pi-ai": "^0.66.1",
73
75
  "chalk": "^5.6.2",
74
76
  "hookable": "^6.1.0",
75
77
  "md4x": "^0.0.25"
76
78
  },
77
79
  "peerDependencies": {
80
+ "@anthropic-ai/sdk": "^0.88.0",
81
+ "@modelcontextprotocol/sdk": ">=1.11.0",
78
82
  "zod": ">=4.0.0"
79
83
  },
80
84
  "peerDependenciesMeta": {
85
+ "@anthropic-ai/sdk": {
86
+ "optional": true
87
+ },
81
88
  "zod": {
82
89
  "optional": true
83
90
  }
84
91
  },
85
92
  "devDependencies": {
93
+ "@anthropic-ai/sdk": "^0.88.0",
86
94
  "@antfu/eslint-config": "^8.1.1",
95
+ "@modelcontextprotocol/sdk": "^1.29.0",
87
96
  "@types/bun": "^1.3.12",
88
97
  "@types/dockerode": "^4.0.1",
89
98
  "bumpp": "^11.0.1",