@sanity/ailf-studio 1.13.0 → 1.15.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +19 -12
  2. package/dist/index.js +416 -334
  3. package/package.json +2 -1
package/dist/index.d.ts CHANGED
@@ -325,8 +325,15 @@ interface ComparisonData {
325
325
  docLift: number;
326
326
  overall: number;
327
327
  actualDelta?: number;
328
- /** Per-area score deltas — e.g. `{ "GROQ": 5.2, "Functions": -2.1 }` */
329
- perArea?: Record<string, number>;
328
+ /** Per-area score deltas — e.g. `[{ area: "GROQ", delta: 5.2 }, …]`
329
+ *
330
+ * Reshaped from a keyed map to an array in W0137 / D0041 to stop minting
331
+ * a new Sanity attribute path for every feature area. Use
332
+ * `perArea.find((p) => p.area === name)?.delta` to look up a value. */
333
+ perArea?: {
334
+ area: string;
335
+ delta: number;
336
+ }[];
330
337
  retrievalGapDelta?: number;
331
338
  infrastructureEfficiencyDelta?: number;
332
339
  };
@@ -549,13 +556,13 @@ interface ScoreItem {
549
556
  ceilingScore?: number;
550
557
  }
551
558
  /**
552
- * A single row in `ArtifactRef.entries[]`. W0051 adds optional `preview` +
559
+ * A single row in `StudioArtifactRef.entries[]`. W0051 adds optional `preview` +
553
560
  * `association` + `truncated` so list-view renderers can consume the
554
561
  * descriptor-extracted preview without fetching the external payload.
555
562
  * Older manifests (pre-W0051) carry only `{ key, bytes }`; readers treat
556
563
  * missing fields as absent data, not as errors.
557
564
  */
558
- interface ArtifactRefEntry {
565
+ interface StudioArtifactRefEntry {
559
566
  key: string;
560
567
  bytes: number;
561
568
  association?: Record<string, string | number>;
@@ -563,7 +570,7 @@ interface ArtifactRefEntry {
563
570
  preview?: unknown;
564
571
  }
565
572
  /** Reference to an artifact stored in an external object store. */
566
- interface ArtifactRef {
573
+ interface StudioArtifactRef {
567
574
  store: "gcs" | "local";
568
575
  bucket: string;
569
576
  path: string;
@@ -575,7 +582,7 @@ interface ArtifactRef {
575
582
  */
576
583
  layout?: "bulk" | "per-entry";
577
584
  /** Per-entry index (populated for `layout: "per-entry"` refs only). */
578
- entries?: ArtifactRefEntry[];
585
+ entries?: StudioArtifactRefEntry[];
579
586
  truncated?: boolean;
580
587
  preview?: unknown;
581
588
  /**
@@ -713,12 +720,12 @@ interface SummaryData {
713
720
  agentBehavior?: FeatureAgentBehaviorData[] | null;
714
721
  /** External artifact references — present when pipeline uploads to GCS (D0032) */
715
722
  artifactManifest?: {
716
- testOutputs?: ArtifactRef;
717
- renderedPrompts?: ArtifactRef;
718
- rawResults?: ArtifactRef;
719
- graderPrompts?: ArtifactRef;
720
- traces?: ArtifactRef;
721
- pipelineContext?: ArtifactRef;
723
+ testOutputs?: StudioArtifactRef;
724
+ renderedPrompts?: StudioArtifactRef;
725
+ rawResults?: StudioArtifactRef;
726
+ graderPrompts?: StudioArtifactRef;
727
+ traces?: StudioArtifactRef;
728
+ pipelineContext?: StudioArtifactRef;
722
729
  };
723
730
  belowCritical: string[];
724
731
  /** All Sanity documents used across the entire evaluation */