evalution 2.0.4 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/{check-BKU5_IhU.d.ts → check-BTQoueDx.d.ts} +10 -2
  2. package/dist/checks/index.d.ts +1 -1
  3. package/dist/cli/index.js +18 -6
  4. package/dist/client/assets/{DatasetView-B1KoSX7p.js → DatasetView-DGDsJxna.js} +12 -12
  5. package/dist/client/assets/{EvalRunView-By5RN8fo.js → EvalRunView-BN9V0ARc.js} +1 -1
  6. package/dist/client/assets/{EvalView-BW2qyhFj.js → EvalView-BQBrzhCH.js} +1 -1
  7. package/dist/client/assets/{data-grid-overlay-editor-CQsCX66k.js → data-grid-overlay-editor-5rXbIGLa.js} +1 -1
  8. package/dist/client/assets/{highlighted-body-KPVGNVTW-D7b_g0Y9.js → highlighted-body-KPVGNVTW-_PBSQg1b.js} +1 -1
  9. package/dist/client/assets/{index-BDqLFfPf.js → index-B5TkxPbo.js} +131 -131
  10. package/dist/client/assets/{number-overlay-editor-lGaIg9Iu.js → number-overlay-editor-DsFqIfVX.js} +1 -1
  11. package/dist/client/index.html +1 -1
  12. package/dist/{cost-fetching-trace-sink-BEqbMdt1.js → cost-fetching-trace-sink-X0hvDGGH.js} +1 -1
  13. package/dist/{dataset-types-D-Fsbg8B.d.ts → dataset-types-0N5KYU1i.d.ts} +10 -2
  14. package/dist/index.d.ts +29 -7
  15. package/dist/index.js +11 -6
  16. package/dist/ingest.d.ts +1 -1
  17. package/dist/ingest.js +2 -2
  18. package/dist/{local-database-trace-provider-BHe2hLFA.js → local-database-trace-provider-Ygd0PVZQ.js} +96 -19
  19. package/dist/{trace-BLjFYF9G.d.ts → trace-BEwHfdpe.d.ts} +1 -1
  20. package/dist/{trace-event-ingestor-fjlL_FYB.js → trace-event-ingestor-Bu2FKHC4.js} +243 -148
  21. package/dist/{trace-event-ingestor-JNpe-OrX.d.ts → trace-event-ingestor-D2zmkQm1.d.ts} +1 -1
  22. package/dist/views/datasets/index.d.ts +1 -1
  23. package/dist/views/datasets/index.js +5 -0
  24. package/dist/views/index.d.ts +2 -2
  25. package/dist/views/react/index.d.ts +1 -1
  26. package/package.json +7 -7
@@ -286,13 +286,21 @@ type ExecutionInput = /** A value typed into the panel. */{
286
286
  /**
287
287
  * An object assembled from per-property inputs, so a resource can fill one
288
288
  * field of an otherwise hand-edited object — `toolsContext`'s `db` beside
289
- * its typed-in ids. Only objects nest: an array of resources isn't a case
290
- * any slot has yet.
289
+ * its typed-in ids.
291
290
  */
292
291
  | {
293
292
  kind: "object";
294
293
  properties: Record<string, ExecutionInput>;
295
294
  }
295
+ /**
296
+ * An array assembled from per-element inputs, so a resource can fill one
297
+ * element of an otherwise hand-edited array — a seeded task's `taskId`
298
+ * beside typed-in ids.
299
+ */
300
+ | {
301
+ kind: "array";
302
+ elements: ExecutionInput[];
303
+ }
296
304
  /**
297
305
  * One of the run's named resource instances ({@link RunResources}), or one
298
306
  * of its outputs — created by the provider at run time, once per run
@@ -1,4 +1,4 @@
1
- import { i as CheckRun, q as CheckInfo, t as Check } from "../check-BKU5_IhU.js";
1
+ import { i as CheckRun, q as CheckInfo, t as Check } from "../check-BTQoueDx.js";
2
2
  import { TraceWithSpans } from "@evalution/sdk";
3
3
  import { StandardSchemaV1 } from "@standard-schema/spec";
4
4
 
package/dist/cli/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { $ as InputResolutionError, A as isPathColumn, B as emptyCounts, Ct as registerFreshImportHook, D as DEFAULT_QUERY_TIMEOUT_MS, F as DatasetNotFoundError, G as parseBinding, H as evalProblems, I as DatasetValidationError, J as primitiveBase, K as parseCell, M as parseColumnSpecs, N as pathField, O as SqlQueryError, P as pathInstance, Q as portableDef, R as EvalRunRefusedError, S as VariationConflictError, T as EvalNotFoundError, U as InvalidCellError, V as CheckScopeTraceSink, W as fitsPrimitiveBase, X as fieldsForPrompt, Y as PRIMITIVE_FIELD_TYPES, Z as isPrimitiveFieldType, a as CloudTraceProvider, b as rollupSpans, c as LocalEvalProvider, ct as instanceNames, et as runPrompt, f as LocalDirectoryDatasetProvider, j as parseColumnPath, k as InvalidColumnPathError, o as WorkspaceSync, q as parseResources, t as LocalDatabaseTraceProvider, wt as registerBundlerResolutionFallback, x as datasetQueryColumns, xt as registerVariationLoaderHook, y as mkdirSelfIgnoring, yt as LocalFileProvider, z as EvalRunner } from "../local-database-trace-provider-BHe2hLFA.js";
1
+ import { $ as InputResolutionError, A as isPathColumn, B as emptyCounts, Ct as registerFreshImportHook, D as DEFAULT_QUERY_TIMEOUT_MS, F as DatasetNotFoundError, G as parseBinding, H as evalProblems, I as DatasetValidationError, J as primitiveBase, K as parseCell, M as parseColumnSpecs, N as pathField, O as SqlQueryError, P as pathInstance, Q as portableDef, R as EvalRunRefusedError, S as VariationConflictError, T as EvalNotFoundError, U as InvalidCellError, V as CheckScopeTraceSink, W as fitsPrimitiveBase, X as fieldsForPrompt, Y as PRIMITIVE_FIELD_TYPES, Z as isPrimitiveFieldType, a as CloudTraceProvider, b as rollupSpans, c as LocalEvalProvider, ct as instanceNames, et as runPrompt, f as LocalDirectoryDatasetProvider, j as parseColumnPath, k as InvalidColumnPathError, o as WorkspaceSync, q as parseResources, t as LocalDatabaseTraceProvider, wt as registerBundlerResolutionFallback, x as datasetQueryColumns, xt as registerVariationLoaderHook, y as mkdirSelfIgnoring, yt as LocalFileProvider, z as EvalRunner } from "../local-database-trace-provider-Ygd0PVZQ.js";
2
2
  import { r as builtinCheckInfos } from "../checks-Cq97JU-h.js";
3
- import { d as isPromptStyle, n as OtlpTraceIngestor, t as TraceEventIngestor, u as isNonEmptyStringArray } from "../trace-event-ingestor-fjlL_FYB.js";
4
- import { n as handleTraceEvents, r as handleOtlpTraces, t as CostFetchingTraceSink } from "../cost-fetching-trace-sink-BEqbMdt1.js";
3
+ import { d as isPromptStyle, n as OtlpTraceIngestor, t as TraceEventIngestor, u as isNonEmptyStringArray } from "../trace-event-ingestor-Bu2FKHC4.js";
4
+ import { n as handleTraceEvents, r as handleOtlpTraces, t as CostFetchingTraceSink } from "../cost-fetching-trace-sink-X0hvDGGH.js";
5
5
  import module, { builtinModules } from "node:module";
6
6
  import path, { join, resolve } from "node:path";
7
7
  import net from "node:net";
@@ -29,7 +29,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
29
29
  import { execFile, spawn } from "node:child_process";
30
30
  import { promisify } from "node:util";
31
31
  //#region package.json
32
- var version = "2.0.4";
32
+ var version = "2.0.6";
33
33
  //#endregion
34
34
  //#region src/shared/links.ts
35
35
  /**
@@ -3136,7 +3136,7 @@ function describeRow(row, fields) {
3136
3136
  /** A tool parameter naming one of several providers of `kind`. */
3137
3137
  const providerIdParam = (kind) => z.string().optional().describe(`The ${kind} provider's id. Optional when only one is configured.`);
3138
3138
  /** An unresolved input, as a tool parameter. */
3139
- const executionInput = z.record(z.string(), z.unknown()).describe("An unresolved input: {kind: \"value\", value: PropValue}, {kind: \"object\", properties: {...}}, or {kind: \"instance\", name, output?} naming one of the run's resource instances (or an output of it).");
3139
+ const executionInput = z.record(z.string(), z.unknown()).describe("An unresolved input: {kind: \"value\", value: PropValue}, {kind: \"object\", properties: {...}}, {kind: \"array\", elements: [...]}, or {kind: \"instance\", name, output?} naming one of the run's resource instances (or an output of it).");
3140
3140
  /** One named resource instance, as a tool parameter. */
3141
3141
  const resourceInstance = z.object({
3142
3142
  uri: z.string().describe("The resource's uri (`<module>#<export>`), never an output's."),
@@ -3179,6 +3179,14 @@ function bindingFrom(value, fields, path) {
3179
3179
  properties: Object.fromEntries(Object.entries(properties).map(([k, v]) => [k, bindingFrom(v, fields, `${path}.properties.${k}`)]))
3180
3180
  };
3181
3181
  }
3182
+ case "array": {
3183
+ const elements = binding.elements;
3184
+ if (!Array.isArray(elements)) throw new ToolError(`${path}.elements must be an array`);
3185
+ return {
3186
+ kind: "array",
3187
+ elements: elements.map((v, i) => bindingFrom(v, fields, `${path}.elements.${i}`))
3188
+ };
3189
+ }
3182
3190
  default: return binding;
3183
3191
  }
3184
3192
  }
@@ -3198,6 +3206,10 @@ function describeBinding(input, fields) {
3198
3206
  kind: "object",
3199
3207
  properties: describeBindings(input.properties, fields)
3200
3208
  };
3209
+ case "array": return {
3210
+ kind: "array",
3211
+ elements: input.elements.map((e) => describeBinding(e, fields))
3212
+ };
3201
3213
  default: return input;
3202
3214
  }
3203
3215
  }
@@ -3229,7 +3241,7 @@ function checkIdFor(uri, taken) {
3229
3241
  taken.add(id);
3230
3242
  return id;
3231
3243
  }
3232
- const binding = z.record(z.string(), z.unknown()).describe("How to fill a slot: {column: \"<dataset field name>\"} for the row's value (a field sharing its name with an earlier one goes by its query column, e.g. \"city#3\"), {json: <plain JSON>} for a fixed value, {kind: \"value\", value: {kind: \"primitive\"}} for a value left undefined, {kind: \"input\", half: \"function\" | \"execute\", path} for what the run bound to one of the prompt's own slots, {kind: \"object\", properties: {name: binding}} to fill an object property by property, or {kind: \"instance\", name, output?} for one of the eval's (or each row's) named resource instances, or an output of it.");
3244
+ const binding = z.record(z.string(), z.unknown()).describe("How to fill a slot: {column: \"<dataset field name>\"} for the row's value (a field sharing its name with an earlier one goes by its query column, e.g. \"city#3\"), {json: <plain JSON>} for a fixed value, {kind: \"value\", value: {kind: \"primitive\"}} for a value left undefined, {kind: \"input\", half: \"function\" | \"execute\", path} for what the run bound to one of the prompt's own slots, {kind: \"object\", properties: {name: binding}} to fill an object property by property, {kind: \"array\", elements: [binding, ...]} to fill an array element by element, or {kind: \"instance\", name, output?} for one of the eval's (or each row's) named resource instances, or an output of it.");
3233
3245
  const bindings = z.record(z.string(), binding).describe("Parameter name → binding.");
3234
3246
  const resourceSpec = z.object({
3235
3247
  uri: z.string().describe("The resource's uri (`<module>#<export>`), never an output's."),