zidane 2.1.1 → 2.2.0

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 CHANGED
@@ -20,12 +20,12 @@ bun start --prompt "create a hello world app"
20
20
 
21
21
  ```ts
22
22
  import { createAgent } from 'zidane'
23
- import { basic } from 'zidane/harnesses'
23
+ import { basic } from 'zidane/presets'
24
24
  import { anthropic } from 'zidane/providers'
25
25
 
26
26
  const agent = createAgent({
27
+ ...basic,
27
28
  provider: anthropic({ apiKey: 'sk-ant-...' }),
28
- harness: basic,
29
29
  })
30
30
 
31
31
  const stats = await agent.run({ prompt: 'build a REST API' })
@@ -37,8 +37,11 @@ All options on `createAgent`:
37
37
  ```ts
38
38
  createAgent({
39
39
  provider, // required: LLM provider
40
+ name: 'basic', // optional display name (shown in traces/logs)
41
+ system: 'You are a helpful...', // default system prompt
42
+ tools: { shell, readFile }, // tool set (default: no tools)
43
+ toolAliases: { shell: 'Bash' }, // map canonical names to LLM-facing names
40
44
  session, // session for persistence
41
- harness: basic, // tool set (default: noTools)
42
45
  behavior: { // agent-level defaults
43
46
  toolExecution: 'parallel', // or 'sequential' (default: parallel)
44
47
  maxTurns: 50, // max loop iterations
@@ -51,6 +54,12 @@ createAgent({
51
54
  })
52
55
  ```
53
56
 
57
+ Presets are just `Partial<AgentOptions>` — spread them in, override any field:
58
+
59
+ ```ts
60
+ createAgent({ ...basic, provider, system: 'be concise' })
61
+ ```
62
+
54
63
  All options on `agent.run()`:
55
64
 
56
65
  ```ts
@@ -72,7 +81,7 @@ await agent.run({
72
81
 
73
82
  `prompt` is optional when a session with existing turns is provided — the agent resumes from the last turn. This supports apps where the user message is persisted to the session before the agent runs (e.g. WebSocket → session → queue → agent).
74
83
 
75
- Precedence: `run.behavior` > `agent.behavior` > `harness.behavior` > hardcoded defaults.
84
+ Precedence: `run.behavior` > `agent.behavior` > hardcoded defaults.
76
85
 
77
86
  ## CLI
78
87
 
@@ -81,7 +90,7 @@ bun start \
81
90
  --prompt "your task" \ # required
82
91
  --model claude-opus-4-6 \ # model id
83
92
  --provider anthropic \ # anthropic | openai | openrouter | cerebras
84
- --harness basic \ # tool set
93
+ --preset basic \ # preset name
85
94
  --system "be concise" \ # system prompt
86
95
  --thinking off \ # off | minimal | low | medium | high
87
96
  --context process \ # process | docker
@@ -139,9 +148,11 @@ cerebras({ apiKey: 'csk-...', defaultModel: 'zai-glm-4.7' })
139
148
 
140
149
  Fallback: `params.apiKey` > `CEREBRAS_API_KEY` env
141
150
 
142
- ## Harnesses
151
+ ## Presets
152
+
153
+ Reusable slices of `AgentOptions` — spread them into `createAgent()`.
143
154
 
144
- Tools are grouped into **harnesses**. The `basic` harness includes:
155
+ The `basic` preset bundles:
145
156
 
146
157
  | Tool | Description |
147
158
  |---|---|
@@ -151,22 +162,25 @@ Tools are grouped into **harnesses**. The `basic` harness includes:
151
162
  | `list_files` | List directory contents |
152
163
  | `spawn` | Spawn a sub-agent |
153
164
 
154
- Define a custom harness:
165
+ Define a custom preset:
155
166
 
156
167
  ```ts
157
- import { defineHarness, basicTools } from 'zidane/harnesses'
168
+ import { basicTools, definePreset } from 'zidane/presets'
158
169
 
159
- const harness = defineHarness({
170
+ const researcher = definePreset({
160
171
  name: 'researcher',
161
172
  system: 'You are a research assistant.',
162
173
  tools: { ...basicTools },
163
174
  })
175
+
176
+ createAgent({ ...researcher, provider })
164
177
  ```
165
178
 
166
- For pure chat with no tools, pass `tools: {}` on a specific run or use the `noTools` harness:
179
+ For pure chat with no tools, omit `tools` or pass `{}` at run time:
167
180
 
168
181
  ```ts
169
- await agent.run({ prompt: 'just chat', tools: {} })
182
+ createAgent({ provider }) // no tools
183
+ await agent.run({ prompt: 'just chat', tools: {} }) // override for one run
170
184
  ```
171
185
 
172
186
  ## Thinking
@@ -189,7 +203,7 @@ await agent.run({ prompt: 'solve this', thinking: 'high' })
189
203
  await agent.run({ prompt: 'solve this', thinking: 'high', behavior: { thinkingBudget: 50000 } })
190
204
 
191
205
  // Agent-level default
192
- const agent = createAgent({ provider, harness, behavior: { thinkingBudget: 16384 } })
206
+ const agent = createAgent({ ...basic, provider, behavior: { thinkingBudget: 16384 } })
193
207
  ```
194
208
 
195
209
  Thinking traces are stored in session turns as `{ type: 'thinking', text }` content blocks and streamed live via the `stream:thinking` hook. Supported by Anthropic (native) and OpenRouter/Cerebras (`reasoning_content`/`reasoning` SSE fields).
@@ -314,10 +328,10 @@ agent.followUp('now write tests for what you built')
314
328
  The `spawn` tool delegates tasks to child agents that run independently.
315
329
 
316
330
  ```ts
331
+ import { basicTools, definePreset } from 'zidane/presets'
317
332
  import { createSpawnTool } from 'zidane/tools'
318
- import { defineHarness, basicTools } from 'zidane/harnesses'
319
333
 
320
- const harness = defineHarness({
334
+ const orchestrator = definePreset({
321
335
  name: 'orchestrator',
322
336
  tools: {
323
337
  ...basicTools,
@@ -330,15 +344,15 @@ const harness = defineHarness({
330
344
  })
331
345
  ```
332
346
 
333
- Children inherit the parent's harness and can spawn their own children.
347
+ Children inherit the parent's preset (tools, system prompt, aliases, MCP servers, skills, behavior) and can spawn their own children. Pass `preset` on `createSpawnTool()` to override the inherited slice per child.
334
348
 
335
349
  ## Interaction Tool
336
350
 
337
- Let the agent pause and request structured input from the outside world. Not included in any harness by default.
351
+ Let the agent pause and request structured input from the outside world. Not included in any preset by default.
338
352
 
339
353
  ```ts
354
+ import { basicTools, definePreset } from 'zidane/presets'
340
355
  import { createInteractionTool } from 'zidane/tools'
341
- import { defineHarness, basicTools } from 'zidane/harnesses'
342
356
 
343
357
  const askUser = createInteractionTool({
344
358
  name: 'ask_user',
@@ -353,7 +367,7 @@ const askUser = createInteractionTool({
353
367
  },
354
368
  })
355
369
 
356
- const harness = defineHarness({
370
+ const interactive = definePreset({
357
371
  name: 'interactive',
358
372
  tools: { ...basicTools, ask_user: askUser },
359
373
  })
@@ -371,7 +385,7 @@ import { createAgent, createSession, createSqliteStore } from 'zidane'
371
385
  const store = createSqliteStore({ path: './sessions.db' })
372
386
  const session = await createSession({ store })
373
387
 
374
- const agent = createAgent({ harness, provider, session })
388
+ const agent = createAgent({ ...basic, provider, session })
375
389
  await agent.run({ prompt: 'hello' })
376
390
  await session.save()
377
391
  ```
@@ -395,7 +409,7 @@ import { loadSession } from 'zidane/session'
395
409
 
396
410
  const session = await loadSession(store, 'my-session')
397
411
  if (session) {
398
- const agent = createAgent({ harness, provider, session })
412
+ const agent = createAgent({ ...basic, provider, session })
399
413
  await agent.run({ prompt: 'continue' })
400
414
  }
401
415
  ```
@@ -414,7 +428,7 @@ Connect any MCP-compatible tool server. Tools are namespaced as `mcp_{server}_{t
414
428
 
415
429
  ```ts
416
430
  const agent = createAgent({
417
- harness,
431
+ ...basic,
418
432
  provider,
419
433
  mcpServers: [
420
434
  { name: 'fs', transport: 'stdio', command: 'npx', args: ['-y', '@modelcontextprotocol/server-filesystem', '.'] },
@@ -423,7 +437,7 @@ const agent = createAgent({
423
437
  })
424
438
  ```
425
439
 
426
- MCP servers can also be declared on the harness. Connections are lazy (first `run()`) and reused.
440
+ MCP servers can live on a preset too (they're just `AgentOptions` fields). Connections are lazy (first `run()`) and reused.
427
441
 
428
442
  ## Skills
429
443
 
@@ -467,7 +481,7 @@ Scan paths in priority order (first found wins):
467
481
  import { createAgent, defineSkill } from 'zidane'
468
482
 
469
483
  const agent = createAgent({
470
- harness,
484
+ ...basic,
471
485
  provider,
472
486
  skills: {
473
487
  scan: ['./custom-skills'],
@@ -496,7 +510,7 @@ An execution context defines **where** tools run. Defaults to in-process.
496
510
  import { createAgent, createDockerContext } from 'zidane'
497
511
 
498
512
  const agent = createAgent({
499
- harness,
513
+ ...basic,
500
514
  provider,
501
515
  execution: createDockerContext({
502
516
  image: 'node:22',
@@ -514,7 +528,7 @@ Implement `SandboxProvider` for your provider (E2B, Rivet, etc.):
514
528
  import { createAgent, createSandboxContext } from 'zidane'
515
529
 
516
530
  const agent = createAgent({
517
- harness,
531
+ ...basic,
518
532
  provider,
519
533
  execution: createSandboxContext(myProvider),
520
534
  })
@@ -6,7 +6,7 @@ import { Client } from '@modelcontextprotocol/sdk/client/index.js';
6
6
  * Typed error classes for agent runs.
7
7
  *
8
8
  * Providers classify native errors into one of these so downstream consumers
9
- * (e.g. harness adapters) can react without string-sniffing messages.
9
+ * can react without string-sniffing messages.
10
10
  *
11
11
  * Provider authors: implement `Provider.classifyError` to map native errors
12
12
  * (SDK exceptions, HTTP responses) to a `ClassifiedError`. The loop wraps
@@ -310,9 +310,9 @@ interface AgentRunOptions {
310
310
  images?: ImageContent[];
311
311
  /** Abort signal — when triggered, the agent stops after the current turn */
312
312
  signal?: AbortSignal;
313
- /** Behavior overrides for this run (overrides agent and harness defaults) */
313
+ /** Behavior overrides for this run (overrides agent defaults) */
314
314
  behavior?: AgentBehavior;
315
- /** Tool overrides for this run. Pass {} for no tools. Omit to use harness tools. */
315
+ /** Tool overrides for this run. Pass {} for no tools. Omit to use agent tools. */
316
316
  tools?: Record<string, ToolDef>;
317
317
  /**
318
318
  * Per-run hook registrations. Each hook is attached before the run starts and
@@ -405,11 +405,11 @@ interface ChildRunStats {
405
405
  /**
406
406
  * Base context for tool execution hooks.
407
407
  *
408
- * `name` is the canonical tool identity — the spec name defined in the harness (or the
408
+ * `name` is the canonical tool identity — the spec name registered on the agent (or the
409
409
  * `mcp_{server}_{tool}` name for MCP tools). Hooks should policy-match against `name`.
410
410
  *
411
411
  * `displayName` is the outward-facing name — the alias surfaced to the LLM when
412
- * `HarnessConfig.toolAliases` maps the canonical name; otherwise equal to `name`.
412
+ * `AgentOptions.toolAliases` maps the canonical name; otherwise equal to `name`.
413
413
  * UI/telemetry adapters should emit `displayName`.
414
414
  *
415
415
  * Canonical vs. alias matters on session resume: `session.turns` persists canonical
@@ -418,7 +418,7 @@ interface ChildRunStats {
418
418
  interface ToolHookContext {
419
419
  turnId: string;
420
420
  callId: string;
421
- /** Canonical tool name (harness spec name). Stable across alias-map changes. */
421
+ /** Canonical tool name (spec name). Stable across alias-map changes. */
422
422
  name: string;
423
423
  /** Aliased (wire) name — equal to `name` when no alias is defined. */
424
424
  displayName: string;
@@ -430,8 +430,8 @@ interface ToolHookContext {
430
430
  * `tool` is the native tool name on the MCP server. `server` is the configured server
431
431
  * name. The canonical zidane-namespaced identity is `mcp_{server}_{tool}`.
432
432
  *
433
- * `displayName` equals the canonical namespaced name unless the harness has aliased
434
- * this MCP tool via `HarnessConfig.toolAliases`; in which case `displayName` is the
433
+ * `displayName` equals the canonical namespaced name unless the agent has aliased
434
+ * this MCP tool via `AgentOptions.toolAliases`; in which case `displayName` is the
435
435
  * alias that the LLM sees.
436
436
  */
437
437
  interface McpToolHookContext {
@@ -1130,18 +1130,12 @@ interface SkillsConfig {
1130
1130
  trustProjectSkills?: boolean;
1131
1131
  }
1132
1132
 
1133
- /** Core tools available in every basic harness (without spawn) */
1134
- declare const basicTools: {
1135
- shell: ToolDef;
1136
- readFile: ToolDef;
1137
- writeFile: ToolDef;
1138
- listFiles: ToolDef;
1139
- };
1140
- declare const _default: HarnessConfig;
1141
-
1142
1133
  /**
1143
1134
  * Runtime context passed to every tool execution.
1144
1135
  * Provides access to the agent's provider, abort signal, execution environment, and hooks.
1136
+ *
1137
+ * The preset-y fields (`name`, `system`, `tools`, `toolAliases`, `mcpServers`, `skills`,
1138
+ * `behavior`) mirror the agent's own options so child-spawning tools can inherit them.
1145
1139
  */
1146
1140
  interface ToolContext {
1147
1141
  /** The LLM provider for this agent run */
@@ -1154,8 +1148,29 @@ interface ToolContext {
1154
1148
  handle: ExecutionHandle;
1155
1149
  /** Agent hooks for emitting events (e.g. spawn:complete) */
1156
1150
  hooks: Hookable<AgentHooks>;
1157
- /** The harness config for this agent (tools available to the agent) */
1158
- harness: HarnessConfig;
1151
+ /** Agent display name (preset or user-supplied) */
1152
+ name?: string;
1153
+ /** Agent default system prompt */
1154
+ system?: string;
1155
+ /** Source tool map the agent was created with (pre-MCP-merge, pre-skills-injection) */
1156
+ tools: Record<string, ToolDef>;
1157
+ /**
1158
+ * Map canonical tool names to LLM-facing (aliased) names.
1159
+ *
1160
+ * Aliasing is **LLM-boundary-only**:
1161
+ * - The alias is what the provider's tool spec carries, what the model calls it, and
1162
+ * what appears in `ToolHookContext.displayName` / `McpToolHookContext.displayName`.
1163
+ * - The canonical name is what lives in `session.turns`, `ToolHookContext.name`, and
1164
+ * what the agent uses to look up the tool implementation. Alias changes never
1165
+ * desync persisted history.
1166
+ */
1167
+ toolAliases?: Record<string, string>;
1168
+ /** MCP servers configured on the agent (for child inheritance) */
1169
+ mcpServers?: McpServerConfig[];
1170
+ /** Skills configuration (for child inheritance) */
1171
+ skills?: SkillsConfig;
1172
+ /** Behavior defaults (for child inheritance) */
1173
+ behavior?: AgentBehavior;
1159
1174
  /** Turn ID that requested this tool call */
1160
1175
  turnId: string;
1161
1176
  /** Tool call ID from the model */
@@ -1196,55 +1211,6 @@ interface ToolDef {
1196
1211
  execute: (input: Record<string, unknown>, ctx: ToolContext) => Promise<string | ToolResultContent[]>;
1197
1212
  }
1198
1213
  type ToolMap = Map<string, ToolDef>;
1199
- interface HarnessConfig {
1200
- /** Display name for this harness */
1201
- name: string;
1202
- /** Default system prompt injected when no system is provided at run time */
1203
- system?: string;
1204
- /** Tool definitions available to the agent */
1205
- tools: Record<string, ToolDef>;
1206
- /** MCP servers to connect and expose as tools */
1207
- mcpServers?: McpServerConfig[];
1208
- /** Skills configuration at the harness level */
1209
- skills?: SkillsConfig;
1210
- /** Default behavior for agents using this harness */
1211
- behavior?: AgentBehavior;
1212
- /**
1213
- * Map canonical tool names to LLM-facing (aliased) names.
1214
- *
1215
- * Aliasing is **LLM-boundary-only**:
1216
- * - The alias is what the provider's tool spec carries, what the model calls it, and
1217
- * what appears in `ToolHookContext.displayName` / `McpToolHookContext.displayName`.
1218
- * - The canonical name is what lives in `session.turns`, `ToolHookContext.name`, and
1219
- * what the agent uses to look up the tool implementation. Alias changes never
1220
- * desync persisted history.
1221
- *
1222
- * Keys are canonical names from `tools` (or `mcp_{server}_{tool}` for MCP tools).
1223
- * Collisions between aliases are rejected by the loop.
1224
- *
1225
- * @example
1226
- * ```ts
1227
- * defineHarness({
1228
- * tools: { ...basicTools },
1229
- * toolAliases: { shell: 'Bash', read_file: 'Read', write_file: 'Write' },
1230
- * })
1231
- * ```
1232
- *
1233
- * @remarks Alias a tool only when the aliased name is semantically equivalent.
1234
- * `list_files` → `Glob` is NOT a valid alias because Glob is pattern-based.
1235
- */
1236
- toolAliases?: Record<string, string>;
1237
- }
1238
- /**
1239
- * Define a harness with a name, optional system prompt, and tools.
1240
- */
1241
- declare function defineHarness(config: HarnessConfig): HarnessConfig;
1242
- type Harness = HarnessConfig;
1243
- /**
1244
- * A harness with no tools — for pure chat mode.
1245
- * Pass `tools: {}` in agent.run() or use this harness directly.
1246
- */
1247
- declare const noTools: HarnessConfig;
1248
1214
 
1249
1215
  /**
1250
1216
  * MCP (Model Context Protocol) server support.
@@ -1298,7 +1264,7 @@ declare function normalizeMcpBlocks(content: unknown): ToolResultContent[] | nul
1298
1264
  * Connect to MCP servers and discover their tools.
1299
1265
  *
1300
1266
  * Each tool is namespaced as `mcp_{serverName}_{toolName}` to avoid
1301
- * collisions with harness tools or tools from other servers.
1267
+ * collisions with agent tools or tools from other servers.
1302
1268
  *
1303
1269
  * @param configs - Array of MCP server configurations
1304
1270
  * @param _clientFactory - Internal: override client construction for testing
@@ -1544,9 +1510,21 @@ interface AgentHooks {
1544
1510
  'session:save': (ctx: SessionHookContext) => void;
1545
1511
  }
1546
1512
  interface AgentOptions {
1547
- /** Harness (tools + system prompt). Defaults to a no-tools harness if omitted. */
1548
- harness?: HarnessConfig;
1549
1513
  provider: Provider;
1514
+ /** Display name for the agent (used in traces/logs). */
1515
+ name?: string;
1516
+ /** Default system prompt injected when no system is provided at run time. */
1517
+ system?: string;
1518
+ /** Tool definitions available to the agent. Defaults to no tools. */
1519
+ tools?: Record<string, ToolDef>;
1520
+ /**
1521
+ * Map canonical tool names to LLM-facing (aliased) names.
1522
+ *
1523
+ * Aliasing is **LLM-boundary-only**: the alias is what the provider's tool spec
1524
+ * carries and what the model calls the tool; the canonical name is what lives in
1525
+ * `session.turns` and what the agent uses to look up the tool implementation.
1526
+ */
1527
+ toolAliases?: Record<string, string>;
1550
1528
  /** Agent-level behavior defaults (overridden by run-level behavior) */
1551
1529
  behavior?: AgentBehavior;
1552
1530
  /** Execution context: where tools run. Defaults to in-process. */
@@ -1555,7 +1533,7 @@ interface AgentOptions {
1555
1533
  mcpServers?: McpServerConfig[];
1556
1534
  /** Session for identity, turn persistence, and run tracking */
1557
1535
  session?: Session;
1558
- /** Skills configuration (merged with harness-level skills, agent takes precedence) */
1536
+ /** Skills configuration */
1559
1537
  skills?: SkillsConfig;
1560
1538
  /** @internal */
1561
1539
  _mcpConnector?: (configs: McpServerConfig[]) => Promise<McpConnection>;
@@ -1599,6 +1577,6 @@ interface Agent {
1599
1577
  readonly activeSkills: readonly ActiveSkill[];
1600
1578
  meta: Record<string, unknown>;
1601
1579
  }
1602
- declare function createAgent({ harness: harnessOption, provider, behavior: agentBehavior, execution, mcpServers, session, skills: agentSkills, _mcpConnector }: AgentOptions): Agent;
1580
+ declare function createAgent({ provider, name: agentName, system: agentSystem, tools: agentTools, toolAliases, behavior: agentBehavior, execution, mcpServers, session, skills: agentSkills, _mcpConnector }: AgentOptions): Agent;
1603
1581
 
1604
- export { type ToolDef as $, type Agent as A, type SessionContentBlock as B, CONTEXT_EXCEEDED_MESSAGE_PATTERNS as C, type SessionData as D, type SessionEndStatus as E, type SessionHookContext as F, type SessionMessage as G, type Harness as H, type ImageContent as I, type SessionRun as J, type SessionStore as K, type SessionTurn as L, type McpConnection as M, type SkillConfig as N, type OAuthRefreshHookContext as O, type PromptDocumentPart as P, type SkillResource as Q, type RemoteStoreOptions as R, type Session as S, type SkillsConfig as T, type SpawnHookContext as U, type StreamCallbacks as V, type StreamHookContext as W, type StreamOptions as X, type ThinkingLevel as Y, type ToolCall as Z, type ToolContext as _, AgentAbortedError as a, type ToolExecutionMode as a0, type ToolHookContext as a1, type ToolMap as a2, type ToolResult as a3, type ToolResultContent as a4, type ToolResultImageContent as a5, type ToolResultTextContent as a6, type ToolSpec as a7, type TurnFinishReason as a8, type TurnResult as a9, defineHarness as aA, fromAnthropic as aB, fromOpenAI as aC, loadSession as aD, mapOAIFinishReason as aE, noTools as aF, normalizeMcpBlocks as aG, normalizeMcpServers as aH, openai as aI, openaiCompat as aJ, openrouter as aK, resultToString as aL, toAnthropic as aM, toOpenAI as aN, toTypedError as aO, _default as aP, basicTools as aQ, type TurnUsage as aa, matchesContextExceeded as ab, toolResultToText as ac, type ActivationVia as ad, type ActiveSkill as ae, type DeactivationReason as af, type FileMapAdapter as ag, type FileMapStoreOptions as ah, type OpenAICompatAuthHeader as ai, OpenAICompatHttpError as aj, type OpenAICompatParams as ak, type SkillActivationState as al, type SkillActivationStateOptions as am, type SkillDiagnostic as an, type SkillSource as ao, anthropic as ap, autoDetectAndConvert as aq, cerebras as ar, classifyOpenAICompatError as as, connectMcpServers as at, createAgent as au, createFileMapStore as av, createMemoryStore as aw, createRemoteStore as ax, createSession as ay, createSkillActivationState as az, type AgentBehavior as b, AgentContextExceededError as c, type AgentHooks as d, type AgentOptions as e, AgentProviderError as f, type AgentRunOptions as g, type AgentStats as h, AgentToolNotAllowedError as i, type AnthropicParams as j, type CerebrasParams as k, type ChildRunStats as l, type ClassifiedError as m, type ClassifiedErrorKind as n, type CreateSessionOptions as o, type HarnessConfig as p, type McpServerConfig as q, type McpToolHookContext as r, type OpenAIParams as s, type OpenRouterParams as t, type PromptImagePart as u, type PromptPart as v, type PromptTextPart as w, type Provider as x, type ProviderCapabilities as y, type RunHookMap as z };
1582
+ export { type ToolHookContext as $, type Agent as A, type SessionData as B, CONTEXT_EXCEEDED_MESSAGE_PATTERNS as C, type SessionEndStatus as D, type SessionHookContext as E, type SessionMessage as F, type SessionRun as G, type SessionStore as H, type ImageContent as I, type SessionTurn as J, type SkillConfig as K, type SkillResource as L, type McpConnection as M, type SkillsConfig as N, type OAuthRefreshHookContext as O, type PromptDocumentPart as P, type SpawnHookContext as Q, type RemoteStoreOptions as R, type Session as S, type StreamCallbacks as T, type StreamHookContext as U, type StreamOptions as V, type ThinkingLevel as W, type ToolCall as X, type ToolContext as Y, type ToolDef as Z, type ToolExecutionMode as _, AgentAbortedError as a, type ToolMap as a0, type ToolResult as a1, type ToolResultContent as a2, type ToolResultImageContent as a3, type ToolResultTextContent as a4, type ToolSpec as a5, type TurnFinishReason as a6, type TurnResult as a7, type TurnUsage as a8, matchesContextExceeded as a9, loadSession as aA, mapOAIFinishReason as aB, normalizeMcpBlocks as aC, normalizeMcpServers as aD, openai as aE, openaiCompat as aF, openrouter as aG, resultToString as aH, toAnthropic as aI, toOpenAI as aJ, toTypedError as aK, toolResultToText as aa, type ActivationVia as ab, type ActiveSkill as ac, type DeactivationReason as ad, type FileMapAdapter as ae, type FileMapStoreOptions as af, type OpenAICompatAuthHeader as ag, OpenAICompatHttpError as ah, type OpenAICompatParams as ai, type SkillActivationState as aj, type SkillActivationStateOptions as ak, type SkillDiagnostic as al, type SkillSource as am, anthropic as an, autoDetectAndConvert as ao, cerebras as ap, classifyOpenAICompatError as aq, connectMcpServers as ar, createAgent as as, createFileMapStore as at, createMemoryStore as au, createRemoteStore as av, createSession as aw, createSkillActivationState as ax, fromAnthropic as ay, fromOpenAI as az, type AgentBehavior as b, AgentContextExceededError as c, type AgentHooks as d, type AgentOptions as e, AgentProviderError as f, type AgentRunOptions as g, type AgentStats as h, AgentToolNotAllowedError as i, type AnthropicParams as j, type CerebrasParams as k, type ChildRunStats as l, type ClassifiedError as m, type ClassifiedErrorKind as n, type CreateSessionOptions as o, type McpServerConfig as p, type McpToolHookContext as q, type OpenAIParams as r, type OpenRouterParams as s, type PromptImagePart as t, type PromptPart as u, type PromptTextPart as v, type Provider as w, type ProviderCapabilities as x, type RunHookMap as y, type SessionContentBlock as z };
@@ -167,7 +167,7 @@ async function connectMcpServers(configs, _clientFactory, hooks) {
167
167
  },
168
168
  execute: async (input, ctx) => {
169
169
  const { turnId, callId, signal } = ctx;
170
- const displayName = ctx.harness?.toolAliases?.[namespacedName] ?? namespacedName;
170
+ const displayName = ctx.toolAliases?.[namespacedName] ?? namespacedName;
171
171
  const gateCtx = {
172
172
  turnId,
173
173
  callId,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  validateSkillForWrite
3
- } from "./chunk-DCYJYM3E.js";
3
+ } from "./chunk-TPXPVEH6.js";
4
4
 
5
5
  // src/skills/index.ts
6
6
  function defineSkill(config) {
@@ -3,16 +3,15 @@ import {
3
3
  createSkillActivationState,
4
4
  installAllowedToolsGate,
5
5
  interpolateShellCommands,
6
- mergeSkillsConfig,
7
6
  resolveSkills,
8
7
  validateResourcePath
9
- } from "./chunk-DCYJYM3E.js";
8
+ } from "./chunk-TPXPVEH6.js";
10
9
  import {
11
10
  createProcessContext
12
11
  } from "./chunk-2EQT4EHD.js";
13
12
  import {
14
13
  connectMcpServers
15
- } from "./chunk-IJORSHFI.js";
14
+ } from "./chunk-37GD7NL3.js";
16
15
  import {
17
16
  AgentAbortedError,
18
17
  AgentProviderError,
@@ -775,7 +774,13 @@ async function executeSingleTool(ctx, call, turnId) {
775
774
  execution: ctx.execution,
776
775
  handle: ctx.handle,
777
776
  hooks: ctx.hooks,
778
- harness: ctx.harness,
777
+ tools: ctx.agentTools,
778
+ ...ctx.agentName !== void 0 ? { name: ctx.agentName } : {},
779
+ ...ctx.agentSystem !== void 0 ? { system: ctx.agentSystem } : {},
780
+ ...ctx.agentToolAliases !== void 0 ? { toolAliases: ctx.agentToolAliases } : {},
781
+ ...ctx.agentMcpServers !== void 0 ? { mcpServers: ctx.agentMcpServers } : {},
782
+ ...ctx.agentSkills !== void 0 ? { skills: ctx.agentSkills } : {},
783
+ ...ctx.agentBehavior !== void 0 ? { behavior: ctx.agentBehavior } : {},
779
784
  turnId,
780
785
  callId,
781
786
  runId: ctx.runId,
@@ -927,7 +932,6 @@ function buildPromptMessage(provider, parts) {
927
932
  }
928
933
 
929
934
  // src/agent.ts
930
- var noTools = { name: "none", system: "You are a helpful assistant.", tools: {} };
931
935
  var HOOK_EVENT_NAMES = [
932
936
  "system:before",
933
937
  "turn:before",
@@ -979,37 +983,37 @@ var HOOK_EVENT_SET = new Set(HOOK_EVENT_NAMES);
979
983
  function isKnownHookEvent(event) {
980
984
  return HOOK_EVENT_SET.has(event);
981
985
  }
982
- function resolveBehavior(harnessBehavior, agentBehavior, runBehavior) {
986
+ function resolveBehavior(agentBehavior, runBehavior) {
983
987
  return {
984
- toolExecution: runBehavior?.toolExecution ?? agentBehavior?.toolExecution ?? harnessBehavior?.toolExecution ?? "parallel",
985
- maxTurns: runBehavior?.maxTurns ?? agentBehavior?.maxTurns ?? harnessBehavior?.maxTurns,
986
- maxTokens: runBehavior?.maxTokens ?? agentBehavior?.maxTokens ?? harnessBehavior?.maxTokens,
987
- thinkingBudget: runBehavior?.thinkingBudget ?? agentBehavior?.thinkingBudget ?? harnessBehavior?.thinkingBudget,
988
- schema: runBehavior?.schema ?? agentBehavior?.schema ?? harnessBehavior?.schema
988
+ toolExecution: runBehavior?.toolExecution ?? agentBehavior?.toolExecution ?? "parallel",
989
+ maxTurns: runBehavior?.maxTurns ?? agentBehavior?.maxTurns,
990
+ maxTokens: runBehavior?.maxTokens ?? agentBehavior?.maxTokens,
991
+ thinkingBudget: runBehavior?.thinkingBudget ?? agentBehavior?.thinkingBudget,
992
+ schema: runBehavior?.schema ?? agentBehavior?.schema
989
993
  };
990
994
  }
991
- function createAgent({ harness: harnessOption, provider, behavior: agentBehavior, execution, mcpServers, session, skills: agentSkills, _mcpConnector }) {
995
+ function createAgent({ provider, name: agentName, system: agentSystem, tools: agentTools, toolAliases, behavior: agentBehavior, execution, mcpServers, session, skills: agentSkills, _mcpConnector }) {
992
996
  const hooks = createHooks();
993
- const harness = harnessOption ?? noTools;
994
997
  const executionContext = execution ?? createProcessContext();
998
+ const sourceTools = agentTools ?? {};
995
999
  let abortController;
996
1000
  let running = false;
997
1001
  let idleResolve;
998
1002
  let idlePromise;
999
1003
  let executionHandle = null;
1000
1004
  let mcpConnection = null;
1001
- const allMcpServers = [...harness.mcpServers ?? [], ...mcpServers ?? []];
1005
+ const allMcpServers = mcpServers ?? [];
1002
1006
  const steeringQueue = [];
1003
1007
  const followUpQueue = [];
1004
1008
  let conversationTurns = session?.turns.slice() ?? [];
1005
1009
  let runCounter = session?.runs.length ?? 0;
1006
- const mergedSkillsConfig = mergeSkillsConfig(harness.skills, agentSkills);
1007
- const skillsEnabledValue = mergedSkillsConfig?.enabled;
1010
+ const skillsConfig = agentSkills;
1011
+ const skillsEnabledValue = skillsConfig?.enabled;
1008
1012
  const skillsDisabled = skillsEnabledValue === false || Array.isArray(skillsEnabledValue) && skillsEnabledValue.length === 0;
1009
1013
  let resolvedSkills = null;
1010
1014
  let skillsCatalog = null;
1011
1015
  const skillActivationState = createSkillActivationState({
1012
- maxActive: mergedSkillsConfig?.maxActive
1016
+ maxActive: skillsConfig?.maxActive
1013
1017
  });
1014
1018
  async function run(options) {
1015
1019
  if (running) {
@@ -1078,10 +1082,10 @@ function createAgent({ harness: harnessOption, provider, behavior: agentBehavior
1078
1082
  mcpConnection = await connectMcpServers(allMcpServers, void 0, hooks);
1079
1083
  }
1080
1084
  }
1081
- if (!skillsDisabled && mergedSkillsConfig && !resolvedSkills) {
1082
- resolvedSkills = await resolveSkills(mergedSkillsConfig);
1085
+ if (!skillsDisabled && skillsConfig && !resolvedSkills) {
1086
+ resolvedSkills = await resolveSkills(skillsConfig);
1083
1087
  await hooks.callHook("skills:resolve", { skills: resolvedSkills });
1084
- const skillsToolRegistered = mergedSkillsConfig?.tool !== false && resolvedSkills.length > 0;
1088
+ const skillsToolRegistered = skillsConfig?.tool !== false && resolvedSkills.length > 0;
1085
1089
  const catalogCtx = {
1086
1090
  catalog: buildCatalog(resolvedSkills, { skillsToolRegistered }),
1087
1091
  skills: resolvedSkills
@@ -1111,17 +1115,17 @@ function createAgent({ harness: harnessOption, provider, behavior: agentBehavior
1111
1115
  }
1112
1116
  const thinking = options.thinking ?? "off";
1113
1117
  const model = options.model ?? provider.meta.defaultModel;
1114
- const { toolExecution, maxTurns, maxTokens, thinkingBudget, schema } = resolveBehavior(harness.behavior, agentBehavior, options.behavior);
1115
- let system = options.system || harness.system || "You are a helpful assistant.";
1118
+ const { toolExecution, maxTurns, maxTokens, thinkingBudget, schema } = resolveBehavior(agentBehavior, options.behavior);
1119
+ let system = options.system || agentSystem || "You are a helpful assistant.";
1116
1120
  if (skillsCatalog) {
1117
1121
  system = `${system}
1118
1122
 
1119
1123
  ${skillsCatalog}`;
1120
1124
  }
1121
- const baseTools = options.tools !== void 0 ? options.tools : mcpConnection ? { ...harness.tools, ...mcpConnection.tools } : harness.tools;
1122
- const shouldInjectSkillTools = options.tools === void 0 && !!resolvedSkills && resolvedSkills.length > 0 && mergedSkillsConfig?.tool !== false;
1125
+ const runBaseTools = options.tools !== void 0 ? options.tools : mcpConnection ? { ...sourceTools, ...mcpConnection.tools } : sourceTools;
1126
+ const shouldInjectSkillTools = options.tools === void 0 && !!resolvedSkills && resolvedSkills.length > 0 && skillsConfig?.tool !== false;
1123
1127
  const mergedWithSkills = shouldInjectSkillTools ? {
1124
- // Auto-injected first so harness + MCP tools can override by name.
1128
+ // Auto-injected first so agent + MCP tools can override by name.
1125
1129
  skills_use: createSkillsUseTool({
1126
1130
  catalog: resolvedSkills,
1127
1131
  state: skillActivationState,
@@ -1134,15 +1138,15 @@ ${skillsCatalog}`;
1134
1138
  skills_run_script: createSkillsRunScriptTool({
1135
1139
  catalog: resolvedSkills,
1136
1140
  state: skillActivationState,
1137
- scriptTimeoutMs: mergedSkillsConfig?.scriptTimeoutMs
1141
+ scriptTimeoutMs: skillsConfig?.scriptTimeoutMs
1138
1142
  }),
1139
- ...baseTools
1140
- } : baseTools;
1143
+ ...runBaseTools
1144
+ } : runBaseTools;
1141
1145
  const tools = {};
1142
1146
  for (const tool of Object.values(mergedWithSkills)) {
1143
1147
  tools[tool.spec.name] = tool;
1144
1148
  }
1145
- const aliasMaps = buildAliasMaps(harness.toolAliases, Object.keys(tools));
1149
+ const aliasMaps = buildAliasMaps(toolAliases, Object.keys(tools));
1146
1150
  const toolSpecs = Object.values(tools).map(
1147
1151
  (t) => ({
1148
1152
  name: aliasMaps.aliasByCanonical.get(t.spec.name) ?? t.spec.name,
@@ -1211,7 +1215,13 @@ ${skillsCatalog}`;
1211
1215
  const stats = await runLoop({
1212
1216
  provider,
1213
1217
  hooks,
1214
- harness,
1218
+ agentName,
1219
+ agentSystem,
1220
+ agentTools: sourceTools,
1221
+ agentToolAliases: toolAliases,
1222
+ agentMcpServers: mcpServers,
1223
+ agentSkills,
1224
+ agentBehavior,
1215
1225
  tools,
1216
1226
  formattedTools,
1217
1227
  aliasMaps,
@@ -1322,7 +1332,7 @@ ${skillsCatalog}`;
1322
1332
  const outcome = skillActivationState.activate(skill, "explicit");
1323
1333
  if (outcome === "cap-reached") {
1324
1334
  throw new Error(
1325
- `Cannot activate skill "${name}" \u2014 the maxActive cap of ${mergedSkillsConfig?.maxActive} has been reached.`
1335
+ `Cannot activate skill "${name}" \u2014 the maxActive cap of ${skillsConfig?.maxActive} has been reached.`
1326
1336
  );
1327
1337
  }
1328
1338
  if (outcome === "ok")
@@ -1534,8 +1544,18 @@ function createSpawnTool(options = {}) {
1534
1544
  let result = "";
1535
1545
  let unbubble;
1536
1546
  try {
1547
+ const parentPreset = {
1548
+ ...ctx.name !== void 0 ? { name: ctx.name } : {},
1549
+ ...ctx.system !== void 0 ? { system: ctx.system } : {},
1550
+ tools: ctx.tools,
1551
+ ...ctx.toolAliases !== void 0 ? { toolAliases: ctx.toolAliases } : {},
1552
+ ...ctx.mcpServers !== void 0 ? { mcpServers: ctx.mcpServers } : {},
1553
+ ...ctx.skills !== void 0 ? { skills: ctx.skills } : {},
1554
+ ...ctx.behavior !== void 0 ? { behavior: ctx.behavior } : {}
1555
+ };
1537
1556
  const agent = createAgent({
1538
- harness: options.harness ?? ctx.harness,
1557
+ ...parentPreset,
1558
+ ...options.preset,
1539
1559
  provider: ctx.provider,
1540
1560
  execution: ctx.execution,
1541
1561
  // Share the parent's session on opt-in. Child turns get appended to
@@ -4,29 +4,23 @@ import {
4
4
  shell,
5
5
  spawn,
6
6
  writeFile
7
- } from "./chunk-AWDWJ2YJ.js";
7
+ } from "./chunk-F5UBXERT.js";
8
8
 
9
- // src/harnesses/basic.ts
9
+ // src/presets/basic.ts
10
10
  var basicTools = { shell, readFile, writeFile, listFiles };
11
- var basic_default = defineHarness({
11
+ var basic_default = definePreset({
12
12
  name: "basic",
13
13
  system: "You are a helpful assistant with access to shell, file reading, file writing, directory listing, and sub-agent spawning tools. Use them to accomplish tasks in the project directory.",
14
14
  tools: { ...basicTools, spawn }
15
15
  });
16
16
 
17
- // src/harnesses/index.ts
18
- function defineHarness(config) {
17
+ // src/presets/index.ts
18
+ function definePreset(config) {
19
19
  return config;
20
20
  }
21
- var noTools = defineHarness({
22
- name: "none",
23
- system: "You are a helpful assistant.",
24
- tools: {}
25
- });
26
21
 
27
22
  export {
28
23
  basicTools,
29
24
  basic_default,
30
- defineHarness,
31
- noTools
25
+ definePreset
32
26
  };
@@ -768,26 +768,6 @@ async function resolveSkills(config) {
768
768
  }
769
769
  return filtered;
770
770
  }
771
- function mergeSkillsConfig(harness, agent) {
772
- if (!harness && !agent)
773
- return void 0;
774
- if (!harness)
775
- return agent;
776
- if (!agent)
777
- return harness;
778
- return {
779
- // Agent-level takes precedence when explicitly set
780
- enabled: agent.enabled !== void 0 ? agent.enabled : harness.enabled,
781
- scan: [...harness.scan ?? [], ...agent.scan ?? []],
782
- write: [...harness.write ?? [], ...agent.write ?? []],
783
- exclude: [.../* @__PURE__ */ new Set([...harness.exclude ?? [], ...agent.exclude ?? []])],
784
- skipDefaultPaths: agent.skipDefaultPaths ?? harness.skipDefaultPaths,
785
- tool: agent.tool ?? harness.tool,
786
- maxActive: agent.maxActive ?? harness.maxActive,
787
- scriptTimeoutMs: agent.scriptTimeoutMs ?? harness.scriptTimeoutMs,
788
- trustProjectSkills: agent.trustProjectSkills ?? harness.trustProjectSkills
789
- };
790
- }
791
771
 
792
772
  // src/skills/interpolate.ts
793
773
  var SHELL_INTERPOLATION_RE = /!`([^`]+)`/g;
@@ -836,6 +816,5 @@ export {
836
816
  writeSkillToDisk,
837
817
  writeSkillsToDisk,
838
818
  resolveSkills,
839
- mergeSkillsConfig,
840
819
  interpolateShellCommands
841
820
  };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
- import { d as AgentHooks } from './agent-DFkSTVKm.js';
2
- export { ad as ActivationVia, ae 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, af as DeactivationReason, ag as FileMapAdapter, ah as FileMapStoreOptions, H as Harness, p as HarnessConfig, I as ImageContent, M as McpConnection, q as McpServerConfig, r as McpToolHookContext, O as OAuthRefreshHookContext, ai as OpenAICompatAuthHeader, aj as OpenAICompatHttpError, ak as OpenAICompatParams, 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, al as SkillActivationState, am as SkillActivationStateOptions, N as SkillConfig, an as SkillDiagnostic, Q as SkillResource, ao as SkillSource, 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, ap as anthropic, aq as autoDetectAndConvert, ar as cerebras, as as classifyOpenAICompatError, at as connectMcpServers, au as createAgent, av as createFileMapStore, aw as createMemoryStore, ax as createRemoteStore, ay as createSession, az as createSkillActivationState, aA as defineHarness, aB as fromAnthropic, aC as fromOpenAI, aD as loadSession, aE as mapOAIFinishReason, ab as matchesContextExceeded, aF as noTools, aG as normalizeMcpBlocks, aH as normalizeMcpServers, aI as openai, aJ as openaiCompat, aK as openrouter, aL as resultToString, aM as toAnthropic, aN as toOpenAI, aO as toTypedError, ac as toolResultToText } from './agent-DFkSTVKm.js';
1
+ import { d as AgentHooks } from './agent-vPBFXnu-.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, I as ImageContent, 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, J as SessionTurn, aj as SkillActivationState, ak as SkillActivationStateOptions, K as SkillConfig, al as SkillDiagnostic, L as SkillResource, am 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, 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, a9 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, aa as toolResultToText } from './agent-vPBFXnu-.js';
3
3
  export { createDockerContext, createProcessContext } from './contexts.js';
4
4
  export { S as SandboxProvider, c as createSandboxContext } from './sandbox-CW72eLDP.js';
5
5
  export { C as ContextCapabilities, a as ContextType, E as ExecResult, b as ExecutionContext, c as ExecutionHandle, S as SpawnConfig } from './types-BpvTmawk.js';
6
- export { IMPLICITLY_ALLOWED_SKILL_TOOLS, SkillValidationIssue, SkillValidationResult, SourcedScanPath, buildCatalog, defineSkill, discoverSkills, installAllowedToolsGate, interpolateShellCommands, isToolAllowedByUnion, matchesAllowedTool, mergeSkillsConfig, parseAllowedToolPattern, parseSkillFile, resolveSkills, validateResourcePath, validateSkillForWrite, validateSkillName, writeSkillToDisk, writeSkillsToDisk } from './skills.js';
7
- 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-DWprxufr.js';
8
- export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState, c as createInteractionTool, b as createSpawnTool, s as spawn } from './spawn-CW5GEK-T.js';
6
+ export { Preset, basic, basicTools, definePreset } from './presets.js';
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, g as glob } from './skills-use-39cCsA7_.js';
9
+ export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState, c as createInteractionTool, b as createSpawnTool, s as spawn } from './spawn-Czx3owjX.js';
9
10
  import { Hookable } from 'hookable';
10
11
  import '@modelcontextprotocol/sdk/client/index.js';
11
12
 
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  defineSkill
3
- } from "./chunk-HJUB63VE.js";
3
+ } from "./chunk-BW3WTFIR.js";
4
4
  import {
5
5
  toolResultToText
6
6
  } from "./chunk-MYWDHD7C.js";
@@ -11,9 +11,10 @@ import {
11
11
  openrouter
12
12
  } from "./chunk-CDRXC7A7.js";
13
13
  import {
14
- defineHarness,
15
- noTools
16
- } from "./chunk-VUVLOTEY.js";
14
+ basicTools,
15
+ basic_default,
16
+ definePreset
17
+ } from "./chunk-SP5NA6WF.js";
17
18
  import {
18
19
  createAgent,
19
20
  createInteractionTool,
@@ -23,7 +24,7 @@ import {
23
24
  createSpawnTool,
24
25
  glob,
25
26
  spawn
26
- } from "./chunk-AWDWJ2YJ.js";
27
+ } from "./chunk-F5UBXERT.js";
27
28
  import {
28
29
  IMPLICITLY_ALLOWED_SKILL_TOOLS,
29
30
  buildCatalog,
@@ -33,7 +34,6 @@ import {
33
34
  interpolateShellCommands,
34
35
  isToolAllowedByUnion,
35
36
  matchesAllowedTool,
36
- mergeSkillsConfig,
37
37
  parseAllowedToolPattern,
38
38
  parseSkillFile,
39
39
  resolveSkills,
@@ -42,7 +42,7 @@ import {
42
42
  validateSkillName,
43
43
  writeSkillToDisk,
44
44
  writeSkillsToDisk
45
- } from "./chunk-DCYJYM3E.js";
45
+ } from "./chunk-TPXPVEH6.js";
46
46
  import {
47
47
  createDockerContext,
48
48
  createProcessContext,
@@ -53,7 +53,7 @@ import {
53
53
  normalizeMcpBlocks,
54
54
  normalizeMcpServers,
55
55
  resultToString
56
- } from "./chunk-IJORSHFI.js";
56
+ } from "./chunk-37GD7NL3.js";
57
57
  import {
58
58
  createFileMapStore,
59
59
  createMemoryStore,
@@ -204,6 +204,8 @@ export {
204
204
  OpenAICompatHttpError,
205
205
  anthropic,
206
206
  autoDetectAndConvert,
207
+ basic_default as basic,
208
+ basicTools,
207
209
  buildCatalog,
208
210
  cerebras,
209
211
  classifyOpenAICompatError,
@@ -223,7 +225,7 @@ export {
223
225
  createSkillsUseTool,
224
226
  createSpawnTool,
225
227
  createTracingHooks,
226
- defineHarness,
228
+ definePreset,
227
229
  defineSkill,
228
230
  discoverSkills,
229
231
  fromAnthropic,
@@ -236,8 +238,6 @@ export {
236
238
  mapOAIFinishReason,
237
239
  matchesAllowedTool,
238
240
  matchesContextExceeded,
239
- mergeSkillsConfig,
240
- noTools,
241
241
  normalizeMcpBlocks,
242
242
  normalizeMcpServers,
243
243
  openai,
package/dist/mcp.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import 'hookable';
2
- export { M as McpConnection, q as McpServerConfig, at as connectMcpServers, aG as normalizeMcpBlocks, aH as normalizeMcpServers, aL as resultToString } from './agent-DFkSTVKm.js';
2
+ export { M as McpConnection, p as McpServerConfig, ar as connectMcpServers, aC as normalizeMcpBlocks, aD as normalizeMcpServers, aH as resultToString } from './agent-vPBFXnu-.js';
3
3
  import '@modelcontextprotocol/sdk/client/index.js';
4
4
  import './types-BpvTmawk.js';
package/dist/mcp.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  normalizeMcpBlocks,
4
4
  normalizeMcpServers,
5
5
  resultToString
6
- } from "./chunk-IJORSHFI.js";
6
+ } from "./chunk-37GD7NL3.js";
7
7
  export {
8
8
  connectMcpServers,
9
9
  normalizeMcpBlocks,
@@ -0,0 +1,33 @@
1
+ import { Z as ToolDef, e as AgentOptions } from './agent-vPBFXnu-.js';
2
+ import 'hookable';
3
+ import './types-BpvTmawk.js';
4
+ import '@modelcontextprotocol/sdk/client/index.js';
5
+
6
+ /** Core tools available in every basic preset (without spawn) */
7
+ declare const basicTools: {
8
+ shell: ToolDef;
9
+ readFile: ToolDef;
10
+ writeFile: ToolDef;
11
+ listFiles: ToolDef;
12
+ };
13
+ declare const _default: Preset;
14
+
15
+ /**
16
+ * A preset is a reusable slice of `AgentOptions` — spread it into `createAgent()`
17
+ * to configure tools, a default system prompt, aliases, and behavior defaults.
18
+ *
19
+ * `provider`, `execution`, `session`, and internal fields are excluded so presets
20
+ * remain shareable and composable.
21
+ *
22
+ * ```ts
23
+ * import { basic } from 'zidane/presets'
24
+ * createAgent({ ...basic, provider })
25
+ * ```
26
+ */
27
+ type Preset = Omit<Partial<AgentOptions>, 'provider' | 'execution' | 'session' | '_mcpConnector'>;
28
+ /**
29
+ * Identity helper for type inference when defining a preset.
30
+ */
31
+ declare function definePreset(config: Preset): Preset;
32
+
33
+ export { type Preset, _default as basic, basicTools, definePreset };
@@ -0,0 +1,15 @@
1
+ import {
2
+ basicTools,
3
+ basic_default,
4
+ definePreset
5
+ } from "./chunk-SP5NA6WF.js";
6
+ import "./chunk-F5UBXERT.js";
7
+ import "./chunk-TPXPVEH6.js";
8
+ import "./chunk-2EQT4EHD.js";
9
+ import "./chunk-37GD7NL3.js";
10
+ import "./chunk-LNN5UTS2.js";
11
+ export {
12
+ basic_default as basic,
13
+ basicTools,
14
+ definePreset
15
+ };
@@ -1,4 +1,4 @@
1
- export { j as AnthropicParams, k as CerebrasParams, ai as OpenAICompatAuthHeader, aj as OpenAICompatHttpError, ak as OpenAICompatParams, s as OpenAIParams, t as OpenRouterParams, x as Provider, y as ProviderCapabilities, V as StreamCallbacks, X as StreamOptions, Z as ToolCall, a3 as ToolResult, a7 as ToolSpec, a9 as TurnResult, ap as anthropic, ar as cerebras, as as classifyOpenAICompatError, aE as mapOAIFinishReason, aI as openai, aJ as openaiCompat, aK as openrouter } from './agent-DFkSTVKm.js';
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, T as StreamCallbacks, V as StreamOptions, X as ToolCall, a1 as ToolResult, a5 as ToolSpec, a7 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-vPBFXnu-.js';
2
2
  import 'hookable';
3
3
  import './types-BpvTmawk.js';
4
4
  import '@modelcontextprotocol/sdk/client/index.js';
@@ -1,4 +1,4 @@
1
- import { K as SessionStore } from '../agent-DFkSTVKm.js';
1
+ import { H as SessionStore } from '../agent-vPBFXnu-.js';
2
2
  import 'hookable';
3
3
  import '../types-BpvTmawk.js';
4
4
  import '@modelcontextprotocol/sdk/client/index.js';
package/dist/session.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { o as CreateSessionOptions, ag as FileMapAdapter, ah as FileMapStoreOptions, R as RemoteStoreOptions, S as Session, B as SessionContentBlock, D as SessionData, G as SessionMessage, J as SessionRun, K as SessionStore, L as SessionTurn, aq as autoDetectAndConvert, av as createFileMapStore, aw as createMemoryStore, ax as createRemoteStore, ay as createSession, aB as fromAnthropic, aC as fromOpenAI, aD as loadSession, aM as toAnthropic, aN as toOpenAI } from './agent-DFkSTVKm.js';
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, J 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-vPBFXnu-.js';
2
2
  import 'hookable';
3
3
  import './types-BpvTmawk.js';
4
4
  import '@modelcontextprotocol/sdk/client/index.js';
@@ -1,4 +1,4 @@
1
- import { $ as ToolDef, N as SkillConfig, al as SkillActivationState, d as AgentHooks } from './agent-DFkSTVKm.js';
1
+ import { Z as ToolDef, K as SkillConfig, aj as SkillActivationState, d as AgentHooks } from './agent-vPBFXnu-.js';
2
2
  import { Hookable } from 'hookable';
3
3
 
4
4
  declare const glob: ToolDef;
@@ -40,9 +40,9 @@ declare function createSkillsRunScriptTool(options: SkillsRunScriptToolOptions):
40
40
  *
41
41
  * Implements tier 2 of progressive disclosure per the Agent Skills spec.
42
42
  * Body is frontmatter-stripped (the model gets the markdown only, wrapped in
43
- * `<skill_content>` tags so the harness can identify it during context
44
- * management). Shell-interpolation (`!` `` `cmd` ``) runs per-activation rather
45
- * than once per agent, so values like `gh pr diff` reflect the current state.
43
+ * `<skill_content>` tags so downstream context management can identify it).
44
+ * Shell-interpolation (`!` `` `cmd` ``) runs per-activation rather than once
45
+ * per agent, so values like `gh pr diff` reflect the current state.
46
46
  */
47
47
 
48
48
  interface SkillsUseToolOptions {
package/dist/skills.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { d as AgentHooks, al as SkillActivationState, N as SkillConfig, ao as SkillSource, an as SkillDiagnostic, T as SkillsConfig } from './agent-DFkSTVKm.js';
2
- export { ad as ActivationVia, ae as ActiveSkill, af as DeactivationReason, am as SkillActivationStateOptions, Q as SkillResource, az as createSkillActivationState } from './agent-DFkSTVKm.js';
1
+ import { d as AgentHooks, aj as SkillActivationState, K as SkillConfig, am as SkillSource, al as SkillDiagnostic, N as SkillsConfig } from './agent-vPBFXnu-.js';
2
+ export { ab as ActivationVia, ac as ActiveSkill, ad as DeactivationReason, ak as SkillActivationStateOptions, L as SkillResource, ax as createSkillActivationState } from './agent-vPBFXnu-.js';
3
3
  import { Hookable } from 'hookable';
4
4
  import { b as ExecutionContext, c as ExecutionHandle } from './types-BpvTmawk.js';
5
5
  import '@modelcontextprotocol/sdk/client/index.js';
@@ -267,12 +267,6 @@ declare function interpolateShellCommands(instructions: string, execution: Execu
267
267
  * 4. Apply filters: `exclude`, `enabled` allowlist, optional project-skill trust gate
268
268
  */
269
269
  declare function resolveSkills(config: SkillsConfig): Promise<SkillConfig[]>;
270
- /**
271
- * Merge harness-level and agent-level SkillsConfig.
272
- * Agent-level settings take precedence for scalar fields.
273
- * Arrays (scan, write, exclude) are concatenated.
274
- */
275
- declare function mergeSkillsConfig(harness?: SkillsConfig, agent?: SkillsConfig): SkillsConfig | undefined;
276
270
 
277
271
  /**
278
272
  * Skill writer — materializes inline SkillConfig objects to disk as proper
@@ -307,4 +301,4 @@ declare function defineSkill(config: Omit<SkillConfig, 'source'> & {
307
301
  source?: SkillConfig['source'];
308
302
  }): SkillConfig;
309
303
 
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 };
304
+ 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, parseAllowedToolPattern, parseFrontmatter, parseSkillFile, resolveSkills, validateResourcePath, validateSkillForWrite, validateSkillName, writeSkillToDisk, writeSkillsToDisk };
package/dist/skills.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  defineSkill
3
- } from "./chunk-HJUB63VE.js";
3
+ } from "./chunk-BW3WTFIR.js";
4
4
  import {
5
5
  IMPLICITLY_ALLOWED_SKILL_TOOLS,
6
6
  buildCatalog,
@@ -12,7 +12,6 @@ import {
12
12
  interpolateShellCommands,
13
13
  isToolAllowedByUnion,
14
14
  matchesAllowedTool,
15
- mergeSkillsConfig,
16
15
  parseAllowedToolPattern,
17
16
  parseFrontmatter,
18
17
  parseSkillFile,
@@ -22,7 +21,7 @@ import {
22
21
  validateSkillName,
23
22
  writeSkillToDisk,
24
23
  writeSkillsToDisk
25
- } from "./chunk-DCYJYM3E.js";
24
+ } from "./chunk-TPXPVEH6.js";
26
25
  import "./chunk-LNN5UTS2.js";
27
26
  export {
28
27
  IMPLICITLY_ALLOWED_SKILL_TOOLS,
@@ -36,7 +35,6 @@ export {
36
35
  interpolateShellCommands,
37
36
  isToolAllowedByUnion,
38
37
  matchesAllowedTool,
39
- mergeSkillsConfig,
40
38
  parseAllowedToolPattern,
41
39
  parseFrontmatter,
42
40
  parseSkillFile,
@@ -1,9 +1,10 @@
1
- import { _ as ToolContext, $ as ToolDef, p as HarnessConfig, h as AgentStats, l as ChildRunStats } from './agent-DFkSTVKm.js';
1
+ import { Y as ToolContext, Z as ToolDef, h as AgentStats, l as ChildRunStats } from './agent-vPBFXnu-.js';
2
+ import { Preset } from './presets.js';
2
3
 
3
4
  /**
4
5
  * Interaction tool — lets the agent request structured input from the outside world.
5
6
  *
6
- * Not included in any harness by default. Add it explicitly:
7
+ * Not included in any preset by default. Add it explicitly:
7
8
  *
8
9
  * import { createInteractionTool } from 'zidane'
9
10
  *
@@ -15,7 +16,7 @@ import { _ as ToolContext, $ as ToolDef, p as HarnessConfig, h as AgentStats, l
15
16
  * },
16
17
  * })
17
18
  *
18
- * const harness = defineHarness({ name: 'interactive', tools: { ...basicTools, ask_user: askUser } })
19
+ * const preset = definePreset({ name: 'interactive', tools: { ...basicTools, ask_user: askUser } })
19
20
  */
20
21
 
21
22
  interface InteractionToolOptions {
@@ -40,12 +41,13 @@ declare function createInteractionTool(options: InteractionToolOptions): ToolDef
40
41
  /**
41
42
  * Spawn tool — create sub-agents from a parent agent.
42
43
  *
43
- * A configurable factory that reads provider + harness from ToolContext.
44
+ * A configurable factory that reads the parent's preset-y fields from ToolContext.
44
45
  *
45
46
  * Usage — default (stateless, safe across parent agents):
46
47
  * ```ts
47
48
  * import { spawn } from 'zidane'
48
- * const harness = defineHarness({ name: 'orchestrator', tools: { ...basicTools, spawn } })
49
+ * import { definePreset, basicTools } from 'zidane/presets'
50
+ * const preset = definePreset({ name: 'orchestrator', tools: { ...basicTools, spawn } })
49
51
  * ```
50
52
  *
51
53
  * Usage — with shared state (telemetry, lifecycle callbacks):
@@ -98,8 +100,8 @@ interface SpawnToolOptions {
98
100
  system?: string;
99
101
  /** Child thinking level. */
100
102
  thinking?: 'off' | 'minimal' | 'low' | 'medium' | 'high';
101
- /** Harness override for children. Defaults to the parent's harness. */
102
- harness?: HarnessConfig;
103
+ /** Preset override for children. Shallow-merged over the parent's preset (parent fields still win for anything left unset). */
104
+ preset?: Preset;
103
105
  /**
104
106
  * Per-child timeout, in milliseconds. When the child exceeds it the spawn
105
107
  * tool returns a timeout marker, fires `spawn:error`, and destroys the
package/dist/tools.d.ts CHANGED
@@ -1,8 +1,10 @@
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-DWprxufr.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-CW5GEK-T.js';
3
- import { $ as ToolDef } from './agent-DFkSTVKm.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-39cCsA7_.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-Czx3owjX.js';
3
+ import { Z as ToolDef } from './agent-vPBFXnu-.js';
4
+ export { Y as ToolContext, a0 as ToolMap } from './agent-vPBFXnu-.js';
4
5
  export { V as ValidationResult, v as validateToolArgs } from './validation-DOY_k7lW.js';
5
6
  import 'hookable';
7
+ import './presets.js';
6
8
  import './types-BpvTmawk.js';
7
9
  import '@modelcontextprotocol/sdk/client/index.js';
8
10
 
@@ -14,4 +16,4 @@ declare const shell: ToolDef;
14
16
 
15
17
  declare const writeFile: ToolDef;
16
18
 
17
- export { listFiles, readFile, shell, writeFile };
19
+ export { ToolDef, listFiles, readFile, shell, writeFile };
package/dist/tools.js CHANGED
@@ -11,10 +11,10 @@ import {
11
11
  spawn,
12
12
  validateToolArgs,
13
13
  writeFile
14
- } from "./chunk-AWDWJ2YJ.js";
15
- import "./chunk-DCYJYM3E.js";
14
+ } from "./chunk-F5UBXERT.js";
15
+ import "./chunk-TPXPVEH6.js";
16
16
  import "./chunk-2EQT4EHD.js";
17
- import "./chunk-IJORSHFI.js";
17
+ import "./chunk-37GD7NL3.js";
18
18
  import "./chunk-LNN5UTS2.js";
19
19
  export {
20
20
  createInteractionTool,
package/dist/types.d.ts CHANGED
@@ -1,7 +1,8 @@
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-DFkSTVKm.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, 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 toolResultToText } from './agent-vPBFXnu-.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 { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState } from './spawn-CW5GEK-T.js';
4
+ export { Preset } from './presets.js';
5
+ export { C as ChildAgent, I as InteractionToolOptions, S as SpawnToolOptions, a as SpawnToolState } from './spawn-Czx3owjX.js';
5
6
  export { V as ValidationResult } from './validation-DOY_k7lW.js';
6
7
  import 'hookable';
7
8
  import '@modelcontextprotocol/sdk/client/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zidane",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "an agent that goes straight to the goal",
5
5
  "type": "module",
6
6
  "private": false,
@@ -30,9 +30,9 @@
30
30
  "import": "./dist/tools.js",
31
31
  "types": "./dist/tools.d.ts"
32
32
  },
33
- "./harnesses": {
34
- "import": "./dist/harnesses.js",
35
- "types": "./dist/harnesses.d.ts"
33
+ "./presets": {
34
+ "import": "./dist/presets.js",
35
+ "types": "./dist/presets.d.ts"
36
36
  },
37
37
  "./contexts": {
38
38
  "import": "./dist/contexts.js",
@@ -1,4 +0,0 @@
1
- import 'hookable';
2
- export { H as Harness, p as HarnessConfig, _ as ToolContext, $ as ToolDef, a2 as ToolMap, aP as basic, aQ as basicTools, aA as defineHarness, aF as noTools } from './agent-DFkSTVKm.js';
3
- import './types-BpvTmawk.js';
4
- import '@modelcontextprotocol/sdk/client/index.js';
package/dist/harnesses.js DELETED
@@ -1,17 +0,0 @@
1
- import {
2
- basicTools,
3
- basic_default,
4
- defineHarness,
5
- noTools
6
- } from "./chunk-VUVLOTEY.js";
7
- import "./chunk-AWDWJ2YJ.js";
8
- import "./chunk-DCYJYM3E.js";
9
- import "./chunk-2EQT4EHD.js";
10
- import "./chunk-IJORSHFI.js";
11
- import "./chunk-LNN5UTS2.js";
12
- export {
13
- basic_default as basic,
14
- basicTools,
15
- defineHarness,
16
- noTools
17
- };