@plune-ai/cli 0.35.0 → 0.37.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/dist/index.cjs CHANGED
@@ -1138,7 +1138,9 @@ var providerConfigSchema = import_zod.z.object({
1138
1138
  max_tokens: import_zod.z.number().int().positive().optional(),
1139
1139
  concurrency: import_zod.z.number().int().positive().optional(),
1140
1140
  timeout: import_zod.z.number().int().positive().optional(),
1141
- max_retries: import_zod.z.number().int().min(0).optional()
1141
+ max_retries: import_zod.z.number().int().min(0).optional(),
1142
+ // The values the OpenAI SDK's Chat Completions `reasoning_effort` accepts; only `openai` sends it.
1143
+ reasoning_effort: import_zod.z.enum(["none", "minimal", "low", "medium", "high", "xhigh"]).optional()
1142
1144
  });
1143
1145
  var modelPriceSchema = import_zod.z.object({
1144
1146
  input_per_1k_usd: import_zod.z.number().nonnegative(),
@@ -1215,7 +1217,7 @@ var toolCallAssertionSchemas = [
1215
1217
  import_zod.z.object({
1216
1218
  type: import_zod.z.literal("tool-args"),
1217
1219
  tool: toolName,
1218
- args: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()),
1220
+ args: import_zod.z.union([import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()), import_zod.z.array(import_zod.z.record(import_zod.z.string(), import_zod.z.unknown())).min(1)]),
1219
1221
  match: import_zod.z.enum(["partial", "exact", "ignore"]).optional(),
1220
1222
  min_count: count.optional()
1221
1223
  }),
@@ -1613,6 +1615,41 @@ var STOP = {
1613
1615
  end_turn: "stop",
1614
1616
  max_tokens: "length"
1615
1617
  };
1618
+ var TAKES_TEMPERATURE = [
1619
+ "claude-opus-4-6",
1620
+ "claude-sonnet-4-6",
1621
+ "claude-opus-4-5",
1622
+ "claude-sonnet-4-5",
1623
+ "claude-haiku-4-5",
1624
+ "claude-opus-4-1",
1625
+ "claude-opus-4-0",
1626
+ "claude-sonnet-4-0",
1627
+ "claude-opus-4-2025",
1628
+ "claude-sonnet-4-2025",
1629
+ "claude-3"
1630
+ ];
1631
+ var warnedNoTemperature = /* @__PURE__ */ new Set();
1632
+ function temperatureFor(model, temperature) {
1633
+ if (temperature === void 0) return {};
1634
+ if (TAKES_TEMPERATURE.some((prefix) => model.startsWith(prefix))) return { temperature };
1635
+ if (!warnedNoTemperature.has(model)) {
1636
+ warnedNoTemperature.add(model);
1637
+ process.stderr.write(
1638
+ `warning: ${model} does not take a temperature; the configured temperature ${temperature} is not sent
1639
+ `
1640
+ );
1641
+ }
1642
+ return {};
1643
+ }
1644
+ var warnedNoReasoningEffort = /* @__PURE__ */ new Set();
1645
+ function warnReasoningEffortNotSent(model, effort) {
1646
+ if (effort === void 0 || warnedNoReasoningEffort.has(model)) return;
1647
+ warnedNoReasoningEffort.add(model);
1648
+ process.stderr.write(
1649
+ `warning: ${model} does not take reasoning_effort; the configured value ${effort} is not sent
1650
+ `
1651
+ );
1652
+ }
1616
1653
  var isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
1617
1654
  function toAnthropicMessages(messages) {
1618
1655
  return messages.map((m) => {
@@ -1655,6 +1692,7 @@ function makeAnthropicProvider(config, env, pricing) {
1655
1692
  ...config.timeout !== void 0 ? { timeout: config.timeout } : {}
1656
1693
  });
1657
1694
  const maxRetries = config.max_retries ?? DEFAULT_MAX_RETRIES;
1695
+ warnReasoningEffortNotSent(config.model, config.reasoning_effort);
1658
1696
  return {
1659
1697
  async complete(req) {
1660
1698
  try {
@@ -1662,7 +1700,7 @@ function makeAnthropicProvider(config, env, pricing) {
1662
1700
  () => client.messages.create({
1663
1701
  model: req.model,
1664
1702
  max_tokens: req.max_tokens,
1665
- ...req.temperature !== void 0 ? { temperature: req.temperature } : {},
1703
+ ...temperatureFor(req.model, req.temperature),
1666
1704
  messages: [{ role: "user", content: req.prompt_resolved }]
1667
1705
  }),
1668
1706
  { max_retries: maxRetries }
@@ -1686,7 +1724,7 @@ function makeAnthropicProvider(config, env, pricing) {
1686
1724
  () => client.messages.create({
1687
1725
  model: req.model,
1688
1726
  max_tokens: req.max_tokens,
1689
- ...req.temperature !== void 0 ? { temperature: req.temperature } : {},
1727
+ ...temperatureFor(req.model, req.temperature),
1690
1728
  messages: toAnthropicMessages(req.messages),
1691
1729
  tools: req.tools.map((t) => ({
1692
1730
  name: t.name,
@@ -1751,7 +1789,8 @@ function parseToolArguments(id, name, raw) {
1751
1789
  }
1752
1790
  var DEFAULT_MAX_RETRIES2 = 2;
1753
1791
  function makeOpenAiCompatibleProvider(opts) {
1754
- const { config, env, pricing, apiKeyEnv, baseURL, reportsCost } = opts;
1792
+ const { config, env, pricing, apiKeyEnv, baseURL, reportsCost, maxCompletionTokens, sendsReasoningEffort } = opts;
1793
+ const reasoning = sendsReasoningEffort && config.reasoning_effort !== void 0 ? { reasoning_effort: config.reasoning_effort } : {};
1755
1794
  const apiKey = env[apiKeyEnv];
1756
1795
  if (apiKey === void 0 || apiKey.trim() === "") {
1757
1796
  throw new AuthError(
@@ -1774,7 +1813,8 @@ function makeOpenAiCompatibleProvider(opts) {
1774
1813
  () => client.chat.completions.create({
1775
1814
  model: req.model,
1776
1815
  ...req.temperature !== void 0 ? { temperature: req.temperature } : {},
1777
- max_tokens: req.max_tokens,
1816
+ ...maxCompletionTokens ? { max_completion_tokens: req.max_tokens } : { max_tokens: req.max_tokens },
1817
+ ...reasoning,
1778
1818
  messages: [{ role: "user", content: req.prompt_resolved }],
1779
1819
  // OpenRouter extension: ask it to include the call's actual cost in `usage` (ADR-PRC02).
1780
1820
  ...reportsCost ? { usage: { include: true } } : {}
@@ -1803,7 +1843,8 @@ function makeOpenAiCompatibleProvider(opts) {
1803
1843
  () => client.chat.completions.create({
1804
1844
  model: req.model,
1805
1845
  ...req.temperature !== void 0 ? { temperature: req.temperature } : {},
1806
- max_tokens: req.max_tokens,
1846
+ ...maxCompletionTokens ? { max_completion_tokens: req.max_tokens } : { max_tokens: req.max_tokens },
1847
+ ...reasoning,
1807
1848
  messages: toOpenAiMessages(req.messages),
1808
1849
  tools: req.tools.map((t) => ({
1809
1850
  type: "function",
@@ -1842,7 +1883,14 @@ function makeOpenAiCompatibleProvider(opts) {
1842
1883
  };
1843
1884
  }
1844
1885
  function makeOpenAiProvider(config, env, pricing) {
1845
- return makeOpenAiCompatibleProvider({ config, env, pricing, apiKeyEnv: "OPENAI_API_KEY" });
1886
+ return makeOpenAiCompatibleProvider({
1887
+ config,
1888
+ env,
1889
+ pricing,
1890
+ apiKeyEnv: "OPENAI_API_KEY",
1891
+ maxCompletionTokens: true,
1892
+ sendsReasoningEffort: true
1893
+ });
1846
1894
  }
1847
1895
 
1848
1896
  // src/providers/openrouter.ts
@@ -2658,8 +2706,9 @@ function checkNames(type, t, names) {
2658
2706
  `${type}: no tool "${unknown}" was offered to the model; offered: ${list}.${AFTER}`
2659
2707
  );
2660
2708
  }
2661
- function absence(type, t, what) {
2662
- if (t.collection === "complete") return pass;
2709
+ function absence(type, t, what, reads) {
2710
+ if (t.collection === "complete" || reads === "calls" && t.stop.reason === "complete")
2711
+ return pass;
2663
2712
  const why = t.stop.reason === "limit" ? `the loop was stopped by ${t.stop.limit ?? "a limit"}` : "the transcript is partial (a stored excerpt was cut)";
2664
2713
  throw unmeasured(
2665
2714
  type,
@@ -2701,7 +2750,7 @@ var toolNotCalled = check((ctx) => {
2701
2750
  const t = transcriptOf("tool-not-called", ctx);
2702
2751
  checkNames("tool-not-called", t, [tool]);
2703
2752
  const calls = callsFor(t, tool);
2704
- if (calls.length === 0) return absence("tool-not-called", t, `a call to "${tool}"`);
2753
+ if (calls.length === 0) return absence("tool-not-called", t, `a call to "${tool}"`, "calls");
2705
2754
  return fail(
2706
2755
  `expected "${tool}" never called; got ${plural(calls.length, "call")}: ${describeCalls(calls)}; check what in the prompt or the tool list led the model to it`
2707
2756
  );
@@ -2724,13 +2773,15 @@ var toolArgs = check((ctx) => {
2724
2773
  const { tool, match = "partial", min_count: min = 1 } = ctx.params;
2725
2774
  const t = transcriptOf("tool-args", ctx);
2726
2775
  checkNames("tool-args", t, [tool]);
2727
- const args = interpolateDeep(ctx.params.args, ctx);
2728
- const matches = (actual) => match === "ignore" || (match === "exact" ? sameJson(args, actual) : partialMatch(args, actual));
2776
+ const sets = (Array.isArray(ctx.params.args) ? ctx.params.args : [ctx.params.args]).map(
2777
+ (a) => interpolateDeep(a, ctx)
2778
+ );
2779
+ const matches = (actual) => match === "ignore" || sets.some((args) => match === "exact" ? sameJson(args, actual) : partialMatch(args, actual));
2729
2780
  const calls = callsFor(t, tool);
2730
2781
  const hits = calls.filter((c) => matches(c.call.args)).length;
2731
2782
  if (hits >= min) return pass;
2732
2783
  return fail(
2733
- `expected a call to "${tool}" with arguments ${describeArgs(args)} (${match}) at least ${plural(min, "time")}; got ${hits} of ${plural(calls.length, "call")}: ${describeCalls(calls)}; check the argument names and values against the tool's input schema`
2784
+ `expected a call to "${tool}" with arguments ${sets.map(describeArgs).join(" or ")} (${match}) at least ${plural(min, "time")}; got ${hits} of ${plural(calls.length, "call")}: ${describeCalls(calls)}; check the argument names and values against the tool's input schema`
2734
2785
  );
2735
2786
  });
2736
2787
  var onlyTools = check((ctx) => {
@@ -2738,7 +2789,7 @@ var onlyTools = check((ctx) => {
2738
2789
  const t = transcriptOf("only-tools", ctx);
2739
2790
  checkNames("only-tools", t, tools);
2740
2791
  const off = callsOf(t).filter((c) => !tools.includes(c.call.name));
2741
- if (off.length === 0) return absence("only-tools", t, "a call to another tool");
2792
+ if (off.length === 0) return absence("only-tools", t, "a call to another tool", "calls");
2742
2793
  const allowed = tools.length > 0 ? `only ${tools.join(", ")} called` : "no tool call";
2743
2794
  return fail(
2744
2795
  `expected ${allowed}; got ${describeCalls(off)}; check whether allowed_tools should leave the others out`
@@ -2807,7 +2858,7 @@ var noToolErrors = check((ctx) => {
2807
2858
  const t = transcriptOf("no-tool-errors", ctx);
2808
2859
  checkNames("no-tool-errors", t, [tool]);
2809
2860
  const errors = callsFor(t, tool).filter((c) => c.call.is_error);
2810
- if (errors.length === 0) return absence("no-tool-errors", t, "a call with an error");
2861
+ if (errors.length === 0) return absence("no-tool-errors", t, "a call with an error", "calls");
2811
2862
  return fail(
2812
2863
  `expected no tool call with an error; got ${describeCalls(errors, (c) => `${describeCall(c)} (${c.call.error_kind ?? "error"})`)}; check the arguments the model sent against the tool's input schema`
2813
2864
  );
@@ -2831,7 +2882,8 @@ var noDestructiveTool = check((ctx) => {
2831
2882
  const why = riskOf(c.call.name, listed.get(c.call.name));
2832
2883
  if (why !== void 0) risky.push({ c, why });
2833
2884
  }
2834
- if (risky.length === 0) return absence("no-destructive-tool", t, "a call to a destructive tool");
2885
+ if (risky.length === 0)
2886
+ return absence("no-destructive-tool", t, "a call to a destructive tool", "calls");
2835
2887
  return fail(
2836
2888
  `expected no call to a tool that may be destructive; got ${failedOn(risky)}; the hints are the server's own claim, so check them on the server`
2837
2889
  );
@@ -3273,30 +3325,49 @@ async function runAgentRow(p) {
3273
3325
  if (err instanceof LimitStop) throw err;
3274
3326
  throw new AgentError("MCP_CONNECT", err.message);
3275
3327
  }
3276
- let listed;
3277
- try {
3278
- listed = listedTools(await bounded(session.listTools(limits.tool_timeout_ms)));
3279
- } catch (err) {
3280
- if (err instanceof LimitStop) throw err;
3281
- throw new AgentError("MCP_LIST_TOOLS", `tools/list failed: ${err.message}`);
3282
- }
3283
- const offered = listed.filter(
3284
- (t) => p.allowedTools === void 0 || p.allowedTools.includes(t.name)
3285
- );
3286
- transcript.tools = listed.map((t) => ({
3287
- name: t.name,
3288
- offered: offered.includes(t),
3289
- ...isRecord2(t.annotations) ? { annotations: t.annotations } : {}
3290
- }));
3291
- const names = wireNames(offered.map((t) => t.name));
3292
- const tools = offered.map((t) => ({
3293
- name: names.toWire.get(t.name),
3294
- ...typeof t.description === "string" ? { description: t.description } : {},
3295
- input_schema: isRecord2(t.inputSchema) ? t.inputSchema : { type: "object" }
3296
- }));
3328
+ const open2 = session;
3329
+ let names = wireNames([]);
3330
+ let tools = [];
3331
+ let offeredNames = [];
3332
+ const list = async () => {
3333
+ let listed;
3334
+ try {
3335
+ listed = listedTools(await bounded(open2.listTools(limits.tool_timeout_ms)));
3336
+ } catch (err) {
3337
+ if (err instanceof LimitStop) throw err;
3338
+ throw new AgentError("MCP_LIST_TOOLS", `tools/list failed: ${err.message}`);
3339
+ }
3340
+ const offered = listed.filter(
3341
+ (t) => p.allowedTools === void 0 || p.allowedTools.includes(t.name)
3342
+ );
3343
+ for (const t of listed) {
3344
+ const isOffered = offered.includes(t);
3345
+ const known = transcript.tools.find((k) => k.name === t.name);
3346
+ if (known !== void 0) known.offered ||= isOffered;
3347
+ else
3348
+ transcript.tools.push({
3349
+ name: t.name,
3350
+ offered: isOffered,
3351
+ ...isRecord2(t.annotations) ? { annotations: t.annotations } : {}
3352
+ });
3353
+ }
3354
+ const now = offered.map((t) => t.name);
3355
+ const added = now.filter((n) => !offeredNames.includes(n));
3356
+ const removed = offeredNames.filter((n) => !now.includes(n));
3357
+ offeredNames = now;
3358
+ names = wireNames(now);
3359
+ tools = offered.map((t) => ({
3360
+ name: names.toWire.get(t.name),
3361
+ ...typeof t.description === "string" ? { description: t.description } : {},
3362
+ input_schema: isRecord2(t.inputSchema) ? t.inputSchema : { type: "object" }
3363
+ }));
3364
+ return added.length + removed.length > 0 ? { added, removed } : void 0;
3365
+ };
3366
+ await list();
3297
3367
  const messages = [{ role: "user", content: prompt5 }];
3298
3368
  let calls = 0;
3299
3369
  let tokens = 0;
3370
+ let changed;
3300
3371
  for (let index = 1; ; index++) {
3301
3372
  const res = await bounded(
3302
3373
  respond({
@@ -3327,8 +3398,10 @@ async function runAgentRow(p) {
3327
3398
  text: kept.cut(res.text).text,
3328
3399
  ...res.finish_reason !== void 0 ? { finish_reason: res.finish_reason } : {},
3329
3400
  usage: usage2,
3330
- calls: records2
3401
+ calls: records2,
3402
+ ...changed !== void 0 ? { offered_changed: changed } : {}
3331
3403
  };
3404
+ changed = void 0;
3332
3405
  transcript.steps.push(step);
3333
3406
  if (res.finish_reason === "error")
3334
3407
  throw new AgentError(
@@ -3345,6 +3418,7 @@ async function runAgentRow(p) {
3345
3418
  if (tokens > limits.max_total_tokens) throw new LimitStop("max_total_tokens");
3346
3419
  const results = [];
3347
3420
  const answer = (rec, c, content) => results.push({ id: c.id, content, is_error: rec.is_error });
3421
+ let succeeded = false;
3348
3422
  for (const [i, c] of res.tool_calls.entries()) {
3349
3423
  const rec = records2[i];
3350
3424
  if (calls >= limits.max_tool_calls) throw new LimitStop("max_tool_calls");
@@ -3373,6 +3447,7 @@ async function runAgentRow(p) {
3373
3447
  if (got.kind === "error") Object.assign(rec, { is_error: true, error_kind: "protocol" });
3374
3448
  else if (isRecord2(got.result) && got.result.isError === true)
3375
3449
  Object.assign(rec, { is_error: true, error_kind: "content" });
3450
+ succeeded ||= !rec.is_error;
3376
3451
  rec.result = kept.cut(text);
3377
3452
  answer(rec, c, text);
3378
3453
  }
@@ -3380,6 +3455,7 @@ async function runAgentRow(p) {
3380
3455
  { role: "assistant", text: res.text, tool_calls: res.tool_calls },
3381
3456
  { role: "tool", results }
3382
3457
  );
3458
+ if (succeeded) changed = await list();
3383
3459
  }
3384
3460
  } catch (err) {
3385
3461
  if (err instanceof LimitStop) transcript.stop = { reason: "limit", limit: err.limit };
@@ -4080,7 +4156,9 @@ var rowResultSchema = import_zod3.z.object({
4080
4156
  duration_ms: import_zod3.z.number().optional(),
4081
4157
  result: import_zod3.z.object({ text: import_zod3.z.string(), bytes: import_zod3.z.number(), truncated: import_zod3.z.boolean() }).optional()
4082
4158
  })
4083
- )
4159
+ ),
4160
+ /** Optional and additive: the step whose request first offered a changed list. */
4161
+ offered_changed: import_zod3.z.object({ added: import_zod3.z.array(import_zod3.z.string()), removed: import_zod3.z.array(import_zod3.z.string()) }).optional()
4084
4162
  })
4085
4163
  ),
4086
4164
  stop: import_zod3.z.object({
package/dist/index.d.cts CHANGED
@@ -189,11 +189,19 @@ interface AgentStep {
189
189
  usage: Usage;
190
190
  /** In the order the model asked for them; they run one after another. */
191
191
  calls: AgentCall[];
192
+ /**
193
+ * Present on the step whose request first offered a changed set of tools: the server's list changed after a call of
194
+ * the step before, by these names (within `allowed_tools`). Optional and additive.
195
+ */
196
+ offered_changed?: {
197
+ added: string[];
198
+ removed: string[];
199
+ };
192
200
  }
193
201
  interface AgentTranscript {
194
202
  /** The name in `mcp.servers`. */
195
203
  server: string;
196
- /** Every tool the server listed, and whether the model was offered it (`allowed_tools`). */
204
+ /** Every tool the server listed at any point of the row, and whether the model was ever offered it (`allowed_tools`). */
197
205
  tools: {
198
206
  name: string;
199
207
  offered: boolean;
@@ -232,6 +240,8 @@ interface ProviderConfig {
232
240
  concurrency?: number;
233
241
  timeout?: number;
234
242
  max_retries?: number;
243
+ /** Sent as is by `openai` only (Chat Completions `reasoning_effort`); `anthropic` warns and drops it, `openrouter` drops it. */
244
+ reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
235
245
  }
236
246
  interface ModelPrice {
237
247
  input_per_1k_usd: number;
@@ -312,7 +322,8 @@ interface ToolNotCalledAssertion {
312
322
  interface ToolArgsAssertion {
313
323
  type: 'tool-args';
314
324
  tool: string;
315
- args: Record<string, unknown>;
325
+ /** A list is alternatives: a call that fits any one of them matches. */
326
+ args: Record<string, unknown> | Record<string, unknown>[];
316
327
  /** `partial` (default): every expected key, deeply; `exact`: the same arguments; `ignore`: any arguments. */
317
328
  match?: 'partial' | 'exact' | 'ignore';
318
329
  /** Default 1. */
@@ -716,6 +727,14 @@ declare const assertionConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
716
727
  concurrency: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
717
728
  timeout: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
718
729
  max_retries: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
730
+ reasoning_effort: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
731
+ none: "none";
732
+ minimal: "minimal";
733
+ low: "low";
734
+ medium: "medium";
735
+ high: "high";
736
+ xhigh: "xhigh";
737
+ }>>>;
719
738
  }, z.core.$strip>>;
720
739
  pass_threshold: z.ZodOptional<z.ZodNumber>;
721
740
  }, z.core.$strip>, z.ZodObject<{
@@ -745,7 +764,7 @@ declare const assertionConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
745
764
  }, z.core.$strip>, z.ZodObject<{
746
765
  type: z.ZodLiteral<"tool-args">;
747
766
  tool: z.ZodString;
748
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
767
+ args: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>]>;
749
768
  match: z.ZodOptional<z.ZodEnum<{
750
769
  partial: "partial";
751
770
  exact: "exact";
@@ -966,6 +985,10 @@ declare const runResultSchema: z.ZodObject<{
966
985
  truncated: z.ZodBoolean;
967
986
  }, z.core.$strip>>;
968
987
  }, z.core.$strip>>;
988
+ offered_changed: z.ZodOptional<z.ZodObject<{
989
+ added: z.ZodArray<z.ZodString>;
990
+ removed: z.ZodArray<z.ZodString>;
991
+ }, z.core.$strip>>;
969
992
  }, z.core.$strip>>;
970
993
  stop: z.ZodObject<{
971
994
  reason: z.ZodEnum<{
package/dist/index.d.ts CHANGED
@@ -189,11 +189,19 @@ interface AgentStep {
189
189
  usage: Usage;
190
190
  /** In the order the model asked for them; they run one after another. */
191
191
  calls: AgentCall[];
192
+ /**
193
+ * Present on the step whose request first offered a changed set of tools: the server's list changed after a call of
194
+ * the step before, by these names (within `allowed_tools`). Optional and additive.
195
+ */
196
+ offered_changed?: {
197
+ added: string[];
198
+ removed: string[];
199
+ };
192
200
  }
193
201
  interface AgentTranscript {
194
202
  /** The name in `mcp.servers`. */
195
203
  server: string;
196
- /** Every tool the server listed, and whether the model was offered it (`allowed_tools`). */
204
+ /** Every tool the server listed at any point of the row, and whether the model was ever offered it (`allowed_tools`). */
197
205
  tools: {
198
206
  name: string;
199
207
  offered: boolean;
@@ -232,6 +240,8 @@ interface ProviderConfig {
232
240
  concurrency?: number;
233
241
  timeout?: number;
234
242
  max_retries?: number;
243
+ /** Sent as is by `openai` only (Chat Completions `reasoning_effort`); `anthropic` warns and drops it, `openrouter` drops it. */
244
+ reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
235
245
  }
236
246
  interface ModelPrice {
237
247
  input_per_1k_usd: number;
@@ -312,7 +322,8 @@ interface ToolNotCalledAssertion {
312
322
  interface ToolArgsAssertion {
313
323
  type: 'tool-args';
314
324
  tool: string;
315
- args: Record<string, unknown>;
325
+ /** A list is alternatives: a call that fits any one of them matches. */
326
+ args: Record<string, unknown> | Record<string, unknown>[];
316
327
  /** `partial` (default): every expected key, deeply; `exact`: the same arguments; `ignore`: any arguments. */
317
328
  match?: 'partial' | 'exact' | 'ignore';
318
329
  /** Default 1. */
@@ -716,6 +727,14 @@ declare const assertionConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
716
727
  concurrency: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
717
728
  timeout: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
718
729
  max_retries: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
730
+ reasoning_effort: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
731
+ none: "none";
732
+ minimal: "minimal";
733
+ low: "low";
734
+ medium: "medium";
735
+ high: "high";
736
+ xhigh: "xhigh";
737
+ }>>>;
719
738
  }, z.core.$strip>>;
720
739
  pass_threshold: z.ZodOptional<z.ZodNumber>;
721
740
  }, z.core.$strip>, z.ZodObject<{
@@ -745,7 +764,7 @@ declare const assertionConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
745
764
  }, z.core.$strip>, z.ZodObject<{
746
765
  type: z.ZodLiteral<"tool-args">;
747
766
  tool: z.ZodString;
748
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
767
+ args: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>]>;
749
768
  match: z.ZodOptional<z.ZodEnum<{
750
769
  partial: "partial";
751
770
  exact: "exact";
@@ -966,6 +985,10 @@ declare const runResultSchema: z.ZodObject<{
966
985
  truncated: z.ZodBoolean;
967
986
  }, z.core.$strip>>;
968
987
  }, z.core.$strip>>;
988
+ offered_changed: z.ZodOptional<z.ZodObject<{
989
+ added: z.ZodArray<z.ZodString>;
990
+ removed: z.ZodArray<z.ZodString>;
991
+ }, z.core.$strip>>;
969
992
  }, z.core.$strip>>;
970
993
  stop: z.ZodObject<{
971
994
  reason: z.ZodEnum<{