@plune-ai/cli 0.36.0 → 0.38.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.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;
@@ -213,6 +221,28 @@ interface EvalResult {
213
221
  tags: string[];
214
222
  rows: RowResult[];
215
223
  passed: boolean;
224
+ /**
225
+ * What the eval measured, so `plune diff` compares an overall pass rate only between runs that
226
+ * measured the same thing. `rows_hash` is over the rows' canonical `vars`, order aside;
227
+ * `assertions_hash` over the checks with their parameters; `model` is `<provider type>/<model>`.
228
+ * The prompt text is left out on purpose. Optional and additive: absent in older runs, which the
229
+ * diff reads as an unknown population. `schemaVersion` stays 1.
230
+ */
231
+ measured?: {
232
+ runs: number;
233
+ rows: number;
234
+ rows_hash: string;
235
+ assertions_hash: string;
236
+ model?: string;
237
+ };
238
+ /**
239
+ * The type and model this result ran on. Written only when the config lists several models, where `id` is
240
+ * `<eval id>@<model>`; absent for a single model, whose id is the eval id. Optional and additive.
241
+ */
242
+ provider?: {
243
+ type: string;
244
+ model: string;
245
+ };
216
246
  }
217
247
  interface RunResult {
218
248
  schemaVersion: 1;
@@ -220,6 +250,12 @@ interface RunResult {
220
250
  started_at: string;
221
251
  finished_at: string;
222
252
  config_hash: string;
253
+ /**
254
+ * plune-ai/cli#244. `true` on the result of `--dry-run`: the rows were priced and none was run. No
255
+ * row is passed, failed or errored (each is `inconclusive: 'skipped'`), no eval is `passed`, and
256
+ * `cost_usd` is an estimate. Optional and additive: absent on a measured run, `schemaVersion` stays 1.
257
+ */
258
+ dry_run?: boolean;
223
259
  summary: Summary;
224
260
  evals: EvalResult[];
225
261
  }
@@ -232,6 +268,8 @@ interface ProviderConfig {
232
268
  concurrency?: number;
233
269
  timeout?: number;
234
270
  max_retries?: number;
271
+ /** Sent as is by `openai` only (Chat Completions `reasoning_effort`); `anthropic` warns and drops it, `openrouter` drops it. */
272
+ reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
235
273
  }
236
274
  interface ModelPrice {
237
275
  input_per_1k_usd: number;
@@ -312,7 +350,8 @@ interface ToolNotCalledAssertion {
312
350
  interface ToolArgsAssertion {
313
351
  type: 'tool-args';
314
352
  tool: string;
315
- args: Record<string, unknown>;
353
+ /** A list is alternatives: a call that fits any one of them matches. */
354
+ args: Record<string, unknown> | Record<string, unknown>[];
316
355
  /** `partial` (default): every expected key, deeply; `exact`: the same arguments; `ignore`: any arguments. */
317
356
  match?: 'partial' | 'exact' | 'ignore';
318
357
  /** Default 1. */
@@ -421,6 +460,8 @@ interface EvalMcpConfig {
421
460
  interface Config {
422
461
  version: 1;
423
462
  provider: ProviderConfig;
463
+ /** Set only when the config lists several models, in config order; `provider` is the first of them. */
464
+ providers?: ProviderConfig[];
424
465
  defaults?: {
425
466
  assertions?: AssertionConfig[];
426
467
  };
@@ -614,6 +655,8 @@ interface RunOptions {
614
655
  cacheMaxAgeMs?: number;
615
656
  /** `--runs`: every row runs this many times (1–100), over `runs` in the config. */
616
657
  runs?: number;
658
+ /** `--tool-description`, each as typed: `<tool>=<text>` or `<tool>=@<file>`. */
659
+ toolDescription?: string[];
617
660
  }
618
661
  declare function handleRun(options: RunOptions, depsFactory?: (config: Config, baseDir: string) => RunDeps): Promise<RunResult>;
619
662
 
@@ -716,6 +759,14 @@ declare const assertionConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
716
759
  concurrency: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
717
760
  timeout: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
718
761
  max_retries: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
762
+ reasoning_effort: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
763
+ none: "none";
764
+ minimal: "minimal";
765
+ low: "low";
766
+ medium: "medium";
767
+ high: "high";
768
+ xhigh: "xhigh";
769
+ }>>>;
719
770
  }, z.core.$strip>>;
720
771
  pass_threshold: z.ZodOptional<z.ZodNumber>;
721
772
  }, z.core.$strip>, z.ZodObject<{
@@ -745,7 +796,7 @@ declare const assertionConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
745
796
  }, z.core.$strip>, z.ZodObject<{
746
797
  type: z.ZodLiteral<"tool-args">;
747
798
  tool: z.ZodString;
748
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
799
+ args: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>]>;
749
800
  match: z.ZodOptional<z.ZodEnum<{
750
801
  partial: "partial";
751
802
  exact: "exact";
@@ -834,6 +885,7 @@ declare const runResultSchema: z.ZodObject<{
834
885
  started_at: z.ZodString;
835
886
  finished_at: z.ZodString;
836
887
  config_hash: z.ZodString;
888
+ dry_run: z.ZodOptional<z.ZodBoolean>;
837
889
  summary: z.ZodObject<{
838
890
  total: z.ZodNumber;
839
891
  passed: z.ZodNumber;
@@ -966,6 +1018,10 @@ declare const runResultSchema: z.ZodObject<{
966
1018
  truncated: z.ZodBoolean;
967
1019
  }, z.core.$strip>>;
968
1020
  }, z.core.$strip>>;
1021
+ offered_changed: z.ZodOptional<z.ZodObject<{
1022
+ added: z.ZodArray<z.ZodString>;
1023
+ removed: z.ZodArray<z.ZodString>;
1024
+ }, z.core.$strip>>;
969
1025
  }, z.core.$strip>>;
970
1026
  stop: z.ZodObject<{
971
1027
  reason: z.ZodEnum<{
@@ -988,10 +1044,29 @@ declare const runResultSchema: z.ZodObject<{
988
1044
  advice: z.ZodOptional<z.ZodArray<z.ZodObject<{
989
1045
  type: z.ZodString;
990
1046
  reason: z.ZodString;
1047
+ tool: z.ZodOptional<z.ZodString>;
1048
+ steps: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
1049
+ count: z.ZodOptional<z.ZodNumber>;
1050
+ paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
1051
+ }, z.core.$strip>>>;
1052
+ description_overrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
1053
+ tool: z.ZodString;
1054
+ sha256: z.ZodString;
991
1055
  }, z.core.$strip>>>;
992
1056
  }, z.core.$strip>>;
993
1057
  }, z.core.$strip>>;
994
1058
  passed: z.ZodBoolean;
1059
+ measured: z.ZodOptional<z.ZodObject<{
1060
+ runs: z.ZodNumber;
1061
+ rows: z.ZodNumber;
1062
+ rows_hash: z.ZodString;
1063
+ assertions_hash: z.ZodString;
1064
+ model: z.ZodOptional<z.ZodString>;
1065
+ }, z.core.$strip>>;
1066
+ provider: z.ZodOptional<z.ZodObject<{
1067
+ type: z.ZodString;
1068
+ model: z.ZodString;
1069
+ }, z.core.$strip>>;
995
1070
  }, z.core.$strip>>;
996
1071
  }, z.core.$strip>;
997
1072
  /**
@@ -1161,7 +1236,7 @@ declare function formatIngestResult(r: IngestResult): string;
1161
1236
 
1162
1237
  /** The payload version the Plune ingest endpoint validates — ours, not Cairn's. */
1163
1238
  declare const INGEST_SCHEMA_VERSION = 1;
1164
- type CairnRunMode = 'explore' | 'design' | 'api';
1239
+ type CairnRunMode = 'explore' | 'design' | 'api' | 'mcp';
1165
1240
  type CairnExecution = 'auto' | 'manual';
1166
1241
  /**
1167
1242
  * `blocked` (plune-ai/plune#1327): the case's request got no answer — Cairn's evidence records a transport error
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;
@@ -213,6 +221,28 @@ interface EvalResult {
213
221
  tags: string[];
214
222
  rows: RowResult[];
215
223
  passed: boolean;
224
+ /**
225
+ * What the eval measured, so `plune diff` compares an overall pass rate only between runs that
226
+ * measured the same thing. `rows_hash` is over the rows' canonical `vars`, order aside;
227
+ * `assertions_hash` over the checks with their parameters; `model` is `<provider type>/<model>`.
228
+ * The prompt text is left out on purpose. Optional and additive: absent in older runs, which the
229
+ * diff reads as an unknown population. `schemaVersion` stays 1.
230
+ */
231
+ measured?: {
232
+ runs: number;
233
+ rows: number;
234
+ rows_hash: string;
235
+ assertions_hash: string;
236
+ model?: string;
237
+ };
238
+ /**
239
+ * The type and model this result ran on. Written only when the config lists several models, where `id` is
240
+ * `<eval id>@<model>`; absent for a single model, whose id is the eval id. Optional and additive.
241
+ */
242
+ provider?: {
243
+ type: string;
244
+ model: string;
245
+ };
216
246
  }
217
247
  interface RunResult {
218
248
  schemaVersion: 1;
@@ -220,6 +250,12 @@ interface RunResult {
220
250
  started_at: string;
221
251
  finished_at: string;
222
252
  config_hash: string;
253
+ /**
254
+ * plune-ai/cli#244. `true` on the result of `--dry-run`: the rows were priced and none was run. No
255
+ * row is passed, failed or errored (each is `inconclusive: 'skipped'`), no eval is `passed`, and
256
+ * `cost_usd` is an estimate. Optional and additive: absent on a measured run, `schemaVersion` stays 1.
257
+ */
258
+ dry_run?: boolean;
223
259
  summary: Summary;
224
260
  evals: EvalResult[];
225
261
  }
@@ -232,6 +268,8 @@ interface ProviderConfig {
232
268
  concurrency?: number;
233
269
  timeout?: number;
234
270
  max_retries?: number;
271
+ /** Sent as is by `openai` only (Chat Completions `reasoning_effort`); `anthropic` warns and drops it, `openrouter` drops it. */
272
+ reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
235
273
  }
236
274
  interface ModelPrice {
237
275
  input_per_1k_usd: number;
@@ -312,7 +350,8 @@ interface ToolNotCalledAssertion {
312
350
  interface ToolArgsAssertion {
313
351
  type: 'tool-args';
314
352
  tool: string;
315
- args: Record<string, unknown>;
353
+ /** A list is alternatives: a call that fits any one of them matches. */
354
+ args: Record<string, unknown> | Record<string, unknown>[];
316
355
  /** `partial` (default): every expected key, deeply; `exact`: the same arguments; `ignore`: any arguments. */
317
356
  match?: 'partial' | 'exact' | 'ignore';
318
357
  /** Default 1. */
@@ -421,6 +460,8 @@ interface EvalMcpConfig {
421
460
  interface Config {
422
461
  version: 1;
423
462
  provider: ProviderConfig;
463
+ /** Set only when the config lists several models, in config order; `provider` is the first of them. */
464
+ providers?: ProviderConfig[];
424
465
  defaults?: {
425
466
  assertions?: AssertionConfig[];
426
467
  };
@@ -614,6 +655,8 @@ interface RunOptions {
614
655
  cacheMaxAgeMs?: number;
615
656
  /** `--runs`: every row runs this many times (1–100), over `runs` in the config. */
616
657
  runs?: number;
658
+ /** `--tool-description`, each as typed: `<tool>=<text>` or `<tool>=@<file>`. */
659
+ toolDescription?: string[];
617
660
  }
618
661
  declare function handleRun(options: RunOptions, depsFactory?: (config: Config, baseDir: string) => RunDeps): Promise<RunResult>;
619
662
 
@@ -716,6 +759,14 @@ declare const assertionConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
716
759
  concurrency: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
717
760
  timeout: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
718
761
  max_retries: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
762
+ reasoning_effort: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
763
+ none: "none";
764
+ minimal: "minimal";
765
+ low: "low";
766
+ medium: "medium";
767
+ high: "high";
768
+ xhigh: "xhigh";
769
+ }>>>;
719
770
  }, z.core.$strip>>;
720
771
  pass_threshold: z.ZodOptional<z.ZodNumber>;
721
772
  }, z.core.$strip>, z.ZodObject<{
@@ -745,7 +796,7 @@ declare const assertionConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
745
796
  }, z.core.$strip>, z.ZodObject<{
746
797
  type: z.ZodLiteral<"tool-args">;
747
798
  tool: z.ZodString;
748
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
799
+ args: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>]>;
749
800
  match: z.ZodOptional<z.ZodEnum<{
750
801
  partial: "partial";
751
802
  exact: "exact";
@@ -834,6 +885,7 @@ declare const runResultSchema: z.ZodObject<{
834
885
  started_at: z.ZodString;
835
886
  finished_at: z.ZodString;
836
887
  config_hash: z.ZodString;
888
+ dry_run: z.ZodOptional<z.ZodBoolean>;
837
889
  summary: z.ZodObject<{
838
890
  total: z.ZodNumber;
839
891
  passed: z.ZodNumber;
@@ -966,6 +1018,10 @@ declare const runResultSchema: z.ZodObject<{
966
1018
  truncated: z.ZodBoolean;
967
1019
  }, z.core.$strip>>;
968
1020
  }, z.core.$strip>>;
1021
+ offered_changed: z.ZodOptional<z.ZodObject<{
1022
+ added: z.ZodArray<z.ZodString>;
1023
+ removed: z.ZodArray<z.ZodString>;
1024
+ }, z.core.$strip>>;
969
1025
  }, z.core.$strip>>;
970
1026
  stop: z.ZodObject<{
971
1027
  reason: z.ZodEnum<{
@@ -988,10 +1044,29 @@ declare const runResultSchema: z.ZodObject<{
988
1044
  advice: z.ZodOptional<z.ZodArray<z.ZodObject<{
989
1045
  type: z.ZodString;
990
1046
  reason: z.ZodString;
1047
+ tool: z.ZodOptional<z.ZodString>;
1048
+ steps: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
1049
+ count: z.ZodOptional<z.ZodNumber>;
1050
+ paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
1051
+ }, z.core.$strip>>>;
1052
+ description_overrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
1053
+ tool: z.ZodString;
1054
+ sha256: z.ZodString;
991
1055
  }, z.core.$strip>>>;
992
1056
  }, z.core.$strip>>;
993
1057
  }, z.core.$strip>>;
994
1058
  passed: z.ZodBoolean;
1059
+ measured: z.ZodOptional<z.ZodObject<{
1060
+ runs: z.ZodNumber;
1061
+ rows: z.ZodNumber;
1062
+ rows_hash: z.ZodString;
1063
+ assertions_hash: z.ZodString;
1064
+ model: z.ZodOptional<z.ZodString>;
1065
+ }, z.core.$strip>>;
1066
+ provider: z.ZodOptional<z.ZodObject<{
1067
+ type: z.ZodString;
1068
+ model: z.ZodString;
1069
+ }, z.core.$strip>>;
995
1070
  }, z.core.$strip>>;
996
1071
  }, z.core.$strip>;
997
1072
  /**
@@ -1161,7 +1236,7 @@ declare function formatIngestResult(r: IngestResult): string;
1161
1236
 
1162
1237
  /** The payload version the Plune ingest endpoint validates — ours, not Cairn's. */
1163
1238
  declare const INGEST_SCHEMA_VERSION = 1;
1164
- type CairnRunMode = 'explore' | 'design' | 'api';
1239
+ type CairnRunMode = 'explore' | 'design' | 'api' | 'mcp';
1165
1240
  type CairnExecution = 'auto' | 'manual';
1166
1241
  /**
1167
1242
  * `blocked` (plune-ai/plune#1327): the case's request got no answer — Cairn's evidence records a transport error