raindrop-ai 1.0.6 → 1.0.7

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.
@@ -20442,7 +20442,6 @@ declare const EvalContextSchema: z$1.ZodObject<{
20442
20442
  }>>;
20443
20443
  rowMetadata: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
20444
20444
  }, "strip", z$1.ZodTypeAny, {
20445
- rowMetadata: Record<string, string>;
20446
20445
  trace: {
20447
20446
  event: {
20448
20447
  properties: Record<string, unknown> | null;
@@ -21077,6 +21076,7 @@ declare const EvalContextSchema: z$1.ZodObject<{
21077
21076
  } | undefined;
21078
21077
  } | undefined;
21079
21078
  };
21079
+ rowMetadata: Record<string, string>;
21080
21080
  referenceTrace?: {
21081
21081
  event: {
21082
21082
  properties: Record<string, unknown> | null;
@@ -21713,7 +21713,6 @@ declare const EvalContextSchema: z$1.ZodObject<{
21713
21713
  } | undefined;
21714
21714
  expectedOutput?: JsonValue | undefined;
21715
21715
  }, {
21716
- rowMetadata: Record<string, string>;
21717
21716
  trace: {
21718
21717
  event: {
21719
21718
  properties: Record<string, unknown> | null;
@@ -22348,6 +22347,7 @@ declare const EvalContextSchema: z$1.ZodObject<{
22348
22347
  } | undefined;
22349
22348
  } | undefined;
22350
22349
  };
22350
+ rowMetadata: Record<string, string>;
22351
22351
  referenceTrace?: {
22352
22352
  event: {
22353
22353
  properties: Record<string, unknown> | null;
@@ -27467,11 +27467,6 @@ declare const PublishEvalDatasetVersionInputSchema: z.ZodObject<{
27467
27467
  name: string;
27468
27468
  id: string;
27469
27469
  output?: JsonValue | undefined;
27470
- expectation?: {
27471
- description: string;
27472
- reference?: string | undefined;
27473
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
27474
- } | undefined;
27475
27470
  referenceTrace?: {
27476
27471
  event: {
27477
27472
  properties: Record<string, unknown> | null;
@@ -27875,6 +27870,11 @@ declare const PublishEvalDatasetVersionInputSchema: z.ZodObject<{
27875
27870
  sourceEventId: string;
27876
27871
  sourceEventTimestamp?: string | undefined;
27877
27872
  } | undefined;
27873
+ expectation?: {
27874
+ description: string;
27875
+ reference?: string | undefined;
27876
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
27877
+ } | undefined;
27878
27878
  expectedVerdict?: {
27879
27879
  pass: boolean;
27880
27880
  } | {
@@ -27888,11 +27888,6 @@ declare const PublishEvalDatasetVersionInputSchema: z.ZodObject<{
27888
27888
  name: string;
27889
27889
  id: string;
27890
27890
  output?: JsonValue | undefined;
27891
- expectation?: {
27892
- description: string;
27893
- reference?: string | undefined;
27894
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
27895
- } | undefined;
27896
27891
  referenceTrace?: {
27897
27892
  event: {
27898
27893
  properties: Record<string, unknown> | null;
@@ -28296,6 +28291,11 @@ declare const PublishEvalDatasetVersionInputSchema: z.ZodObject<{
28296
28291
  sourceEventId: string;
28297
28292
  sourceEventTimestamp?: string | undefined;
28298
28293
  } | undefined;
28294
+ expectation?: {
28295
+ description: string;
28296
+ reference?: string | undefined;
28297
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
28298
+ } | undefined;
28299
28299
  expectedVerdict?: {
28300
28300
  pass: boolean;
28301
28301
  } | {
@@ -28309,11 +28309,6 @@ declare const PublishEvalDatasetVersionInputSchema: z.ZodObject<{
28309
28309
  name: string;
28310
28310
  id: string;
28311
28311
  output?: JsonValue | undefined;
28312
- expectation?: {
28313
- description: string;
28314
- reference?: string | undefined;
28315
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
28316
- } | undefined;
28317
28312
  referenceTrace?: {
28318
28313
  event: {
28319
28314
  properties: Record<string, unknown> | null;
@@ -28717,6 +28712,11 @@ declare const PublishEvalDatasetVersionInputSchema: z.ZodObject<{
28717
28712
  sourceEventId: string;
28718
28713
  sourceEventTimestamp?: string | undefined;
28719
28714
  } | undefined;
28715
+ expectation?: {
28716
+ description: string;
28717
+ reference?: string | undefined;
28718
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
28719
+ } | undefined;
28720
28720
  expectedVerdict?: {
28721
28721
  pass: boolean;
28722
28722
  } | {
@@ -28730,11 +28730,6 @@ declare const PublishEvalDatasetVersionInputSchema: z.ZodObject<{
28730
28730
  name: string;
28731
28731
  id: string;
28732
28732
  output?: JsonValue | undefined;
28733
- expectation?: {
28734
- description: string;
28735
- reference?: string | undefined;
28736
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
28737
- } | undefined;
28738
28733
  referenceTrace?: {
28739
28734
  event: {
28740
28735
  properties: Record<string, unknown> | null;
@@ -29138,6 +29133,11 @@ declare const PublishEvalDatasetVersionInputSchema: z.ZodObject<{
29138
29133
  sourceEventId: string;
29139
29134
  sourceEventTimestamp?: string | undefined;
29140
29135
  } | undefined;
29136
+ expectation?: {
29137
+ description: string;
29138
+ reference?: string | undefined;
29139
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
29140
+ } | undefined;
29141
29141
  expectedVerdict?: {
29142
29142
  pass: boolean;
29143
29143
  } | {
@@ -29157,11 +29157,6 @@ declare const PublishEvalDatasetVersionInputSchema: z.ZodObject<{
29157
29157
  name: string;
29158
29158
  id: string;
29159
29159
  output?: JsonValue | undefined;
29160
- expectation?: {
29161
- description: string;
29162
- reference?: string | undefined;
29163
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
29164
- } | undefined;
29165
29160
  referenceTrace?: {
29166
29161
  event: {
29167
29162
  properties: Record<string, unknown> | null;
@@ -29565,6 +29560,11 @@ declare const PublishEvalDatasetVersionInputSchema: z.ZodObject<{
29565
29560
  sourceEventId: string;
29566
29561
  sourceEventTimestamp?: string | undefined;
29567
29562
  } | undefined;
29563
+ expectation?: {
29564
+ description: string;
29565
+ reference?: string | undefined;
29566
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
29567
+ } | undefined;
29568
29568
  expectedVerdict?: {
29569
29569
  pass: boolean;
29570
29570
  } | {
@@ -29584,11 +29584,6 @@ declare const PublishEvalDatasetVersionInputSchema: z.ZodObject<{
29584
29584
  name: string;
29585
29585
  id: string;
29586
29586
  output?: JsonValue | undefined;
29587
- expectation?: {
29588
- description: string;
29589
- reference?: string | undefined;
29590
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
29591
- } | undefined;
29592
29587
  referenceTrace?: {
29593
29588
  event: {
29594
29589
  properties: Record<string, unknown> | null;
@@ -29992,6 +29987,11 @@ declare const PublishEvalDatasetVersionInputSchema: z.ZodObject<{
29992
29987
  sourceEventId: string;
29993
29988
  sourceEventTimestamp?: string | undefined;
29994
29989
  } | undefined;
29990
+ expectation?: {
29991
+ description: string;
29992
+ reference?: string | undefined;
29993
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
29994
+ } | undefined;
29995
29995
  expectedVerdict?: {
29996
29996
  pass: boolean;
29997
29997
  } | {
@@ -34473,11 +34473,6 @@ declare const EvalDatasetManifestSchema: z.ZodObject<{
34473
34473
  name: string;
34474
34474
  id: string;
34475
34475
  output?: JsonValue | undefined;
34476
- expectation?: {
34477
- description: string;
34478
- reference?: string | undefined;
34479
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
34480
- } | undefined;
34481
34476
  referenceTrace?: {
34482
34477
  event: {
34483
34478
  properties: Record<string, unknown> | null;
@@ -34881,6 +34876,11 @@ declare const EvalDatasetManifestSchema: z.ZodObject<{
34881
34876
  sourceEventId: string;
34882
34877
  sourceEventTimestamp?: string | undefined;
34883
34878
  } | undefined;
34879
+ expectation?: {
34880
+ description: string;
34881
+ reference?: string | undefined;
34882
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
34883
+ } | undefined;
34884
34884
  expectedVerdict?: {
34885
34885
  pass: boolean;
34886
34886
  } | {
@@ -34895,11 +34895,6 @@ declare const EvalDatasetManifestSchema: z.ZodObject<{
34895
34895
  name: string;
34896
34896
  id: string;
34897
34897
  output?: JsonValue | undefined;
34898
- expectation?: {
34899
- description: string;
34900
- reference?: string | undefined;
34901
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
34902
- } | undefined;
34903
34898
  referenceTrace?: {
34904
34899
  event: {
34905
34900
  properties: Record<string, unknown> | null;
@@ -35303,6 +35298,11 @@ declare const EvalDatasetManifestSchema: z.ZodObject<{
35303
35298
  sourceEventId: string;
35304
35299
  sourceEventTimestamp?: string | undefined;
35305
35300
  } | undefined;
35301
+ expectation?: {
35302
+ description: string;
35303
+ reference?: string | undefined;
35304
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
35305
+ } | undefined;
35306
35306
  expectedVerdict?: {
35307
35307
  pass: boolean;
35308
35308
  } | {
@@ -39823,16 +39823,16 @@ declare const EvalDatasetManifestSchema: z.ZodObject<{
39823
39823
  name: string;
39824
39824
  id: string;
39825
39825
  output?: JsonValue | undefined;
39826
- expectation?: {
39827
- description: string;
39828
- reference?: string | undefined;
39829
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
39830
- } | undefined;
39831
39826
  referenceCapture?: {
39832
39827
  id: string;
39833
39828
  sourceEventId: string;
39834
39829
  sourceEventTimestamp?: string | undefined;
39835
39830
  } | undefined;
39831
+ expectation?: {
39832
+ description: string;
39833
+ reference?: string | undefined;
39834
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
39835
+ } | undefined;
39836
39836
  expectedVerdict?: {
39837
39837
  pass: boolean;
39838
39838
  } | {
@@ -39847,16 +39847,16 @@ declare const EvalDatasetManifestSchema: z.ZodObject<{
39847
39847
  name: string;
39848
39848
  id: string;
39849
39849
  output?: JsonValue | undefined;
39850
- expectation?: {
39851
- description: string;
39852
- reference?: string | undefined;
39853
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
39854
- } | undefined;
39855
39850
  referenceCapture?: {
39856
39851
  id: string;
39857
39852
  sourceEventId: string;
39858
39853
  sourceEventTimestamp?: string | undefined;
39859
39854
  } | undefined;
39855
+ expectation?: {
39856
+ description: string;
39857
+ reference?: string | undefined;
39858
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
39859
+ } | undefined;
39860
39860
  expectedVerdict?: {
39861
39861
  pass: boolean;
39862
39862
  } | {
@@ -39879,16 +39879,16 @@ declare const EvalDatasetManifestSchema: z.ZodObject<{
39879
39879
  name: string;
39880
39880
  id: string;
39881
39881
  output?: JsonValue | undefined;
39882
- expectation?: {
39883
- description: string;
39884
- reference?: string | undefined;
39885
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
39886
- } | undefined;
39887
39882
  referenceCapture?: {
39888
39883
  id: string;
39889
39884
  sourceEventId: string;
39890
39885
  sourceEventTimestamp?: string | undefined;
39891
39886
  } | undefined;
39887
+ expectation?: {
39888
+ description: string;
39889
+ reference?: string | undefined;
39890
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
39891
+ } | undefined;
39892
39892
  expectedVerdict?: {
39893
39893
  pass: boolean;
39894
39894
  } | {
@@ -39918,16 +39918,16 @@ declare const EvalDatasetManifestSchema: z.ZodObject<{
39918
39918
  name: string;
39919
39919
  id: string;
39920
39920
  output?: JsonValue | undefined;
39921
- expectation?: {
39922
- description: string;
39923
- reference?: string | undefined;
39924
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
39925
- } | undefined;
39926
39921
  referenceCapture?: {
39927
39922
  id: string;
39928
39923
  sourceEventId: string;
39929
39924
  sourceEventTimestamp?: string | undefined;
39930
39925
  } | undefined;
39926
+ expectation?: {
39927
+ description: string;
39928
+ reference?: string | undefined;
39929
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
39930
+ } | undefined;
39931
39931
  expectedVerdict?: {
39932
39932
  pass: boolean;
39933
39933
  } | {
@@ -49477,404 +49477,6 @@ declare const EvalCaseTracePairSchema: z.ZodObject<{
49477
49477
  } | undefined;
49478
49478
  }>;
49479
49479
  }, "strip", z.ZodTypeAny, {
49480
- snapshot: {
49481
- event: {
49482
- properties: Record<string, unknown> | null;
49483
- timestamp: string;
49484
- userId: string;
49485
- name: string;
49486
- id: string;
49487
- _raindropDatabaseId: string;
49488
- receivedAt: string;
49489
- aiData: {
49490
- model?: string | null | undefined;
49491
- convoId?: string | null | undefined;
49492
- input?: string | null | undefined;
49493
- output?: string | null | undefined;
49494
- };
49495
- inputAttachments: {
49496
- value: string;
49497
- attachment_id: string;
49498
- name: string;
49499
- attachment_type: "text" | "image" | "iframe";
49500
- }[];
49501
- outputAttachments: {
49502
- value: string;
49503
- attachment_id: string;
49504
- name: string;
49505
- attachment_type: "text" | "image" | "iframe";
49506
- }[];
49507
- featureFlags?: Record<string, string> | null | undefined;
49508
- projectId?: string | undefined;
49509
- customEventId?: string | null | undefined;
49510
- occurrencesInWindow?: number | undefined;
49511
- lensInfo?: {
49512
- lensId: number;
49513
- sourceId: string;
49514
- categoryId: number;
49515
- source?: string | undefined;
49516
- }[] | undefined;
49517
- topics?: string[] | undefined;
49518
- categories?: [string, string | null, number | null][] | undefined;
49519
- categoryLog?: {
49520
- lensId: number;
49521
- categoryId: string;
49522
- action: "add_category" | "remove_category" | "skip_category";
49523
- }[] | undefined;
49524
- signals?: {
49525
- timestamp: string;
49526
- name: string;
49527
- properties?: any;
49528
- score?: number | undefined;
49529
- id?: string | undefined;
49530
- attachmentId?: string | undefined;
49531
- signalType?: string | undefined;
49532
- }[] | undefined;
49533
- errorSpans?: {
49534
- status?: string | undefined;
49535
- span_id?: string | undefined;
49536
- started_at?: string | undefined;
49537
- duration_ms?: number | undefined;
49538
- span_type?: string | undefined;
49539
- span_name?: string | undefined;
49540
- output_payload?: any;
49541
- }[] | undefined;
49542
- regexSignals?: string[] | undefined;
49543
- toolCalls?: any[] | undefined;
49544
- toolCallNames?: string[] | undefined;
49545
- richInteraction?: {
49546
- eventId: string;
49547
- entries: ({
49548
- type: "system";
49549
- role: "system" | "developer";
49550
- id: string;
49551
- source: {
49552
- spanIds: string[];
49553
- adapter: string;
49554
- confidence: "high" | "medium" | "low";
49555
- parentSpanIds: string[];
49556
- attributeKeys: string[];
49557
- };
49558
- order: number;
49559
- startMs: number | null;
49560
- endMs: number | null;
49561
- content: {
49562
- type: "text";
49563
- text: string;
49564
- annotations?: {
49565
- type: "event" | "url" | "file" | "user" | "signal";
49566
- text?: string | undefined;
49567
- url?: string | undefined;
49568
- id?: string | undefined;
49569
- startIndex?: number | undefined;
49570
- endIndex?: number | undefined;
49571
- }[] | undefined;
49572
- };
49573
- collapsed: true;
49574
- tokenEstimate: number | null;
49575
- } | {
49576
- type: "user_message";
49577
- role: "user";
49578
- id: string;
49579
- source: {
49580
- spanIds: string[];
49581
- adapter: string;
49582
- confidence: "high" | "medium" | "low";
49583
- parentSpanIds: string[];
49584
- attributeKeys: string[];
49585
- };
49586
- order: number;
49587
- startMs: number | null;
49588
- endMs: number | null;
49589
- content: ({
49590
- type: "text";
49591
- text: string;
49592
- annotations?: {
49593
- type: "event" | "url" | "file" | "user" | "signal";
49594
- text?: string | undefined;
49595
- url?: string | undefined;
49596
- id?: string | undefined;
49597
- startIndex?: number | undefined;
49598
- endIndex?: number | undefined;
49599
- }[] | undefined;
49600
- } | {
49601
- type: "json";
49602
- raw: string | null;
49603
- value?: unknown;
49604
- } | {
49605
- type: "image" | "file";
49606
- name?: string | undefined;
49607
- url?: string | undefined;
49608
- mimeType?: string | undefined;
49609
- fileId?: string | undefined;
49610
- } | {
49611
- type: "reference";
49612
- label: string;
49613
- refType: "stored_tool_result" | "external";
49614
- href?: string | undefined;
49615
- metadata?: Record<string, unknown> | undefined;
49616
- })[];
49617
- } | {
49618
- type: "assistant_text";
49619
- role: "assistant";
49620
- id: string;
49621
- source: {
49622
- spanIds: string[];
49623
- adapter: string;
49624
- confidence: "high" | "medium" | "low";
49625
- parentSpanIds: string[];
49626
- attributeKeys: string[];
49627
- };
49628
- order: number;
49629
- startMs: number | null;
49630
- endMs: number | null;
49631
- content: ({
49632
- type: "text";
49633
- text: string;
49634
- annotations?: {
49635
- type: "event" | "url" | "file" | "user" | "signal";
49636
- text?: string | undefined;
49637
- url?: string | undefined;
49638
- id?: string | undefined;
49639
- startIndex?: number | undefined;
49640
- endIndex?: number | undefined;
49641
- }[] | undefined;
49642
- } | {
49643
- type: "json";
49644
- raw: string | null;
49645
- value?: unknown;
49646
- } | {
49647
- type: "image" | "file";
49648
- name?: string | undefined;
49649
- url?: string | undefined;
49650
- mimeType?: string | undefined;
49651
- fileId?: string | undefined;
49652
- } | {
49653
- type: "reference";
49654
- label: string;
49655
- refType: "stored_tool_result" | "external";
49656
- href?: string | undefined;
49657
- metadata?: Record<string, unknown> | undefined;
49658
- })[];
49659
- format: "text" | "markdown";
49660
- final: boolean;
49661
- } | {
49662
- type: "reasoning";
49663
- id: string;
49664
- source: {
49665
- spanIds: string[];
49666
- adapter: string;
49667
- confidence: "high" | "medium" | "low";
49668
- parentSpanIds: string[];
49669
- attributeKeys: string[];
49670
- };
49671
- order: number;
49672
- startMs: number | null;
49673
- endMs: number | null;
49674
- content: {
49675
- type: "text";
49676
- text: string;
49677
- annotations?: {
49678
- type: "event" | "url" | "file" | "user" | "signal";
49679
- text?: string | undefined;
49680
- url?: string | undefined;
49681
- id?: string | undefined;
49682
- startIndex?: number | undefined;
49683
- endIndex?: number | undefined;
49684
- }[] | undefined;
49685
- };
49686
- format: "text";
49687
- visibility: "collapsed" | "expanded";
49688
- capturedAs: "unknown" | "provider_reasoning" | "reasoning_summary" | "thinking";
49689
- } | {
49690
- type: "tool_call";
49691
- status: "pending" | "unknown" | "error" | "completed";
49692
- input: {
49693
- raw: string | null;
49694
- kind: "text" | "json" | "reference" | "empty";
49695
- truncated: boolean;
49696
- sizeChars: number | null;
49697
- };
49698
- output: {
49699
- raw: string | null;
49700
- kind: "text" | "json" | "reference" | "empty";
49701
- truncated: boolean;
49702
- sizeChars: number | null;
49703
- } | null;
49704
- name: string;
49705
- durationMs: number | null;
49706
- id: string;
49707
- error: {
49708
- raw: string | null;
49709
- kind: "text" | "json" | "reference" | "empty";
49710
- truncated: boolean;
49711
- sizeChars: number | null;
49712
- } | null;
49713
- source: {
49714
- spanIds: string[];
49715
- adapter: string;
49716
- confidence: "high" | "medium" | "low";
49717
- parentSpanIds: string[];
49718
- attributeKeys: string[];
49719
- };
49720
- order: number;
49721
- startMs: number | null;
49722
- endMs: number | null;
49723
- callId: string | null;
49724
- } | {
49725
- type: "sub_agent";
49726
- status: "unknown" | "error" | "ok";
49727
- model: string | null;
49728
- name: string;
49729
- durationMs: number | null;
49730
- id: string;
49731
- spanIds: string[];
49732
- source: {
49733
- spanIds: string[];
49734
- adapter: string;
49735
- confidence: "high" | "medium" | "low";
49736
- parentSpanIds: string[];
49737
- attributeKeys: string[];
49738
- };
49739
- order: number;
49740
- startMs: number | null;
49741
- endMs: number | null;
49742
- rootSpanId: string;
49743
- toolCount: number;
49744
- llmCount: number;
49745
- inputPreview: string | null;
49746
- outputPreview: string | null;
49747
- totalInputTokens: number | null;
49748
- totalOutputTokens: number | null;
49749
- } | {
49750
- type: "detached_sub_agent";
49751
- status: "unknown" | "error" | "ok";
49752
- name: string;
49753
- durationMs: number | null;
49754
- id: string;
49755
- source: {
49756
- spanIds: string[];
49757
- adapter: string;
49758
- confidence: "high" | "medium" | "low";
49759
- parentSpanIds: string[];
49760
- attributeKeys: string[];
49761
- };
49762
- order: number;
49763
- startMs: number | null;
49764
- endMs: number | null;
49765
- rootSpanId: string;
49766
- inputPreview: string | null;
49767
- outputPreview: string | null;
49768
- childEventId: string;
49769
- } | {
49770
- type: "agent_handoff";
49771
- reason: string | null;
49772
- id: string;
49773
- source: {
49774
- spanIds: string[];
49775
- adapter: string;
49776
- confidence: "high" | "medium" | "low";
49777
- parentSpanIds: string[];
49778
- attributeKeys: string[];
49779
- };
49780
- order: number;
49781
- startMs: number | null;
49782
- endMs: number | null;
49783
- fromAgent: string;
49784
- toAgent: string;
49785
- } | {
49786
- type: "unknown_span";
49787
- name: string;
49788
- id: string;
49789
- source: {
49790
- spanIds: string[];
49791
- adapter: string;
49792
- confidence: "high" | "medium" | "low";
49793
- parentSpanIds: string[];
49794
- attributeKeys: string[];
49795
- };
49796
- order: number;
49797
- startMs: number | null;
49798
- endMs: number | null;
49799
- spanType: string | null;
49800
- hiddenByDefault: true;
49801
- })[];
49802
- status: "complete" | "partial" | "missing_spans";
49803
- durationMs: number | null;
49804
- stats: {
49805
- agentCount: number;
49806
- llmCallCount: number;
49807
- toolCallCount: number;
49808
- errorCount: number;
49809
- agentNames: string[];
49810
- };
49811
- schemaVersion: "2026-05-20";
49812
- traceIds: string[];
49813
- rootSpanIds: string[];
49814
- startedAt: string | null;
49815
- endedAt: string | null;
49816
- spans: {
49817
- provider: string | null;
49818
- status: string | null;
49819
- model: string | null;
49820
- name: string;
49821
- durationMs: number | null;
49822
- traceId: string;
49823
- startMs: number | null;
49824
- endMs: number | null;
49825
- spanType: string | null;
49826
- spanId: string;
49827
- parentSpanId: string | null;
49828
- rendered: boolean;
49829
- }[];
49830
- diagnostics: {
49831
- extractionVersion: "rich-interaction/1";
49832
- warnings: {
49833
- code: "no_spans" | "missing_llm_input" | "missing_llm_output" | "duplicate_output_suppressed" | "tool_call_unmatched" | "payload_truncated" | "unknown_span_shape";
49834
- message: string;
49835
- spanIds?: string[] | undefined;
49836
- }[];
49837
- unrenderedSpanCount: number;
49838
- };
49839
- } | null | undefined;
49840
- _ai_output_words?: number | undefined;
49841
- _ai_input_words?: number | undefined;
49842
- userTraits?: Record<string, unknown> | null | undefined;
49843
- userCreatedAt?: string | null | undefined;
49844
- userPlan?: string | null | undefined;
49845
- userLastPlan?: string | null | undefined;
49846
- userPlanChangeTs?: string | null | undefined;
49847
- isPending?: boolean | undefined;
49848
- };
49849
- spans: {
49850
- timestamp: string;
49851
- provider: string;
49852
- status: "UNSET" | "OK" | "ERROR";
49853
- model: string;
49854
- event_id: string;
49855
- user_id: string;
49856
- convo_id: string;
49857
- trace_id: string;
49858
- span_id: string;
49859
- span_type: "INTERNAL" | "LLM_GENERATION" | "LLM_GENERATION_STREAM" | "TOOL_CALL";
49860
- span_name: string;
49861
- output_payload: string;
49862
- project_id: string;
49863
- custom_event_id: string;
49864
- parent_span_id: string;
49865
- input_payload: string;
49866
- start_unix_ns: string;
49867
- end_unix_ns: string;
49868
- duration_ns: string;
49869
- input_tokens: number;
49870
- output_tokens: number;
49871
- attributes_string: Record<string, string>;
49872
- attributes_num: Record<string, number>;
49873
- org_public_id: string;
49874
- end_timestamp: string;
49875
- _inserted_at: string;
49876
- }[];
49877
- };
49878
49480
  trace: {
49879
49481
  event: {
49880
49482
  properties: Record<string, unknown> | null;
@@ -50509,7 +50111,6 @@ declare const EvalCaseTracePairSchema: z.ZodObject<{
50509
50111
  } | undefined;
50510
50112
  } | undefined;
50511
50113
  };
50512
- }, {
50513
50114
  snapshot: {
50514
50115
  event: {
50515
50116
  properties: Record<string, unknown> | null;
@@ -50525,6 +50126,18 @@ declare const EvalCaseTracePairSchema: z.ZodObject<{
50525
50126
  input?: string | null | undefined;
50526
50127
  output?: string | null | undefined;
50527
50128
  };
50129
+ inputAttachments: {
50130
+ value: string;
50131
+ attachment_id: string;
50132
+ name: string;
50133
+ attachment_type: "text" | "image" | "iframe";
50134
+ }[];
50135
+ outputAttachments: {
50136
+ value: string;
50137
+ attachment_id: string;
50138
+ name: string;
50139
+ attachment_type: "text" | "image" | "iframe";
50140
+ }[];
50528
50141
  featureFlags?: Record<string, string> | null | undefined;
50529
50142
  projectId?: string | undefined;
50530
50143
  customEventId?: string | null | undefined;
@@ -50542,22 +50155,10 @@ declare const EvalCaseTracePairSchema: z.ZodObject<{
50542
50155
  categoryId: string;
50543
50156
  action: "add_category" | "remove_category" | "skip_category";
50544
50157
  }[] | undefined;
50545
- inputAttachments?: (string | {
50546
- value: string;
50547
- attachment_id: string;
50548
- name?: string | undefined;
50549
- attachment_type?: "text" | "image" | "iframe" | undefined;
50550
- })[] | undefined;
50551
- outputAttachments?: (string | {
50552
- value: string;
50553
- attachment_id: string;
50554
- name?: string | undefined;
50555
- attachment_type?: "text" | "image" | "iframe" | undefined;
50556
- })[] | undefined;
50557
50158
  signals?: {
50558
- properties: string | Record<string, unknown>;
50559
50159
  timestamp: string;
50560
50160
  name: string;
50161
+ properties?: any;
50561
50162
  score?: number | undefined;
50562
50163
  id?: string | undefined;
50563
50164
  attachmentId?: string | undefined;
@@ -50908,6 +50509,7 @@ declare const EvalCaseTracePairSchema: z.ZodObject<{
50908
50509
  _inserted_at: string;
50909
50510
  }[];
50910
50511
  };
50512
+ }, {
50911
50513
  trace: {
50912
50514
  event: {
50913
50515
  properties: Record<string, unknown> | null;
@@ -51542,6 +51144,404 @@ declare const EvalCaseTracePairSchema: z.ZodObject<{
51542
51144
  } | undefined;
51543
51145
  } | undefined;
51544
51146
  };
51147
+ snapshot: {
51148
+ event: {
51149
+ properties: Record<string, unknown> | null;
51150
+ timestamp: string;
51151
+ userId: string;
51152
+ name: string;
51153
+ id: string;
51154
+ _raindropDatabaseId: string;
51155
+ receivedAt: string;
51156
+ aiData: {
51157
+ model?: string | null | undefined;
51158
+ convoId?: string | null | undefined;
51159
+ input?: string | null | undefined;
51160
+ output?: string | null | undefined;
51161
+ };
51162
+ featureFlags?: Record<string, string> | null | undefined;
51163
+ projectId?: string | undefined;
51164
+ customEventId?: string | null | undefined;
51165
+ occurrencesInWindow?: number | undefined;
51166
+ lensInfo?: {
51167
+ lensId: number;
51168
+ sourceId: string;
51169
+ categoryId: number;
51170
+ source?: string | undefined;
51171
+ }[] | undefined;
51172
+ topics?: string[] | undefined;
51173
+ categories?: [string, string | null, number | null][] | undefined;
51174
+ categoryLog?: {
51175
+ lensId: number;
51176
+ categoryId: string;
51177
+ action: "add_category" | "remove_category" | "skip_category";
51178
+ }[] | undefined;
51179
+ inputAttachments?: (string | {
51180
+ value: string;
51181
+ attachment_id: string;
51182
+ name?: string | undefined;
51183
+ attachment_type?: "text" | "image" | "iframe" | undefined;
51184
+ })[] | undefined;
51185
+ outputAttachments?: (string | {
51186
+ value: string;
51187
+ attachment_id: string;
51188
+ name?: string | undefined;
51189
+ attachment_type?: "text" | "image" | "iframe" | undefined;
51190
+ })[] | undefined;
51191
+ signals?: {
51192
+ properties: string | Record<string, unknown>;
51193
+ timestamp: string;
51194
+ name: string;
51195
+ score?: number | undefined;
51196
+ id?: string | undefined;
51197
+ attachmentId?: string | undefined;
51198
+ signalType?: string | undefined;
51199
+ }[] | undefined;
51200
+ errorSpans?: {
51201
+ status?: string | undefined;
51202
+ span_id?: string | undefined;
51203
+ started_at?: string | undefined;
51204
+ duration_ms?: number | undefined;
51205
+ span_type?: string | undefined;
51206
+ span_name?: string | undefined;
51207
+ output_payload?: any;
51208
+ }[] | undefined;
51209
+ regexSignals?: string[] | undefined;
51210
+ toolCalls?: any[] | undefined;
51211
+ toolCallNames?: string[] | undefined;
51212
+ richInteraction?: {
51213
+ eventId: string;
51214
+ entries: ({
51215
+ type: "system";
51216
+ role: "system" | "developer";
51217
+ id: string;
51218
+ source: {
51219
+ spanIds: string[];
51220
+ adapter: string;
51221
+ confidence: "high" | "medium" | "low";
51222
+ parentSpanIds: string[];
51223
+ attributeKeys: string[];
51224
+ };
51225
+ order: number;
51226
+ startMs: number | null;
51227
+ endMs: number | null;
51228
+ content: {
51229
+ type: "text";
51230
+ text: string;
51231
+ annotations?: {
51232
+ type: "event" | "url" | "file" | "user" | "signal";
51233
+ text?: string | undefined;
51234
+ url?: string | undefined;
51235
+ id?: string | undefined;
51236
+ startIndex?: number | undefined;
51237
+ endIndex?: number | undefined;
51238
+ }[] | undefined;
51239
+ };
51240
+ collapsed: true;
51241
+ tokenEstimate: number | null;
51242
+ } | {
51243
+ type: "user_message";
51244
+ role: "user";
51245
+ id: string;
51246
+ source: {
51247
+ spanIds: string[];
51248
+ adapter: string;
51249
+ confidence: "high" | "medium" | "low";
51250
+ parentSpanIds: string[];
51251
+ attributeKeys: string[];
51252
+ };
51253
+ order: number;
51254
+ startMs: number | null;
51255
+ endMs: number | null;
51256
+ content: ({
51257
+ type: "text";
51258
+ text: string;
51259
+ annotations?: {
51260
+ type: "event" | "url" | "file" | "user" | "signal";
51261
+ text?: string | undefined;
51262
+ url?: string | undefined;
51263
+ id?: string | undefined;
51264
+ startIndex?: number | undefined;
51265
+ endIndex?: number | undefined;
51266
+ }[] | undefined;
51267
+ } | {
51268
+ type: "json";
51269
+ raw: string | null;
51270
+ value?: unknown;
51271
+ } | {
51272
+ type: "image" | "file";
51273
+ name?: string | undefined;
51274
+ url?: string | undefined;
51275
+ mimeType?: string | undefined;
51276
+ fileId?: string | undefined;
51277
+ } | {
51278
+ type: "reference";
51279
+ label: string;
51280
+ refType: "stored_tool_result" | "external";
51281
+ href?: string | undefined;
51282
+ metadata?: Record<string, unknown> | undefined;
51283
+ })[];
51284
+ } | {
51285
+ type: "assistant_text";
51286
+ role: "assistant";
51287
+ id: string;
51288
+ source: {
51289
+ spanIds: string[];
51290
+ adapter: string;
51291
+ confidence: "high" | "medium" | "low";
51292
+ parentSpanIds: string[];
51293
+ attributeKeys: string[];
51294
+ };
51295
+ order: number;
51296
+ startMs: number | null;
51297
+ endMs: number | null;
51298
+ content: ({
51299
+ type: "text";
51300
+ text: string;
51301
+ annotations?: {
51302
+ type: "event" | "url" | "file" | "user" | "signal";
51303
+ text?: string | undefined;
51304
+ url?: string | undefined;
51305
+ id?: string | undefined;
51306
+ startIndex?: number | undefined;
51307
+ endIndex?: number | undefined;
51308
+ }[] | undefined;
51309
+ } | {
51310
+ type: "json";
51311
+ raw: string | null;
51312
+ value?: unknown;
51313
+ } | {
51314
+ type: "image" | "file";
51315
+ name?: string | undefined;
51316
+ url?: string | undefined;
51317
+ mimeType?: string | undefined;
51318
+ fileId?: string | undefined;
51319
+ } | {
51320
+ type: "reference";
51321
+ label: string;
51322
+ refType: "stored_tool_result" | "external";
51323
+ href?: string | undefined;
51324
+ metadata?: Record<string, unknown> | undefined;
51325
+ })[];
51326
+ format: "text" | "markdown";
51327
+ final: boolean;
51328
+ } | {
51329
+ type: "reasoning";
51330
+ id: string;
51331
+ source: {
51332
+ spanIds: string[];
51333
+ adapter: string;
51334
+ confidence: "high" | "medium" | "low";
51335
+ parentSpanIds: string[];
51336
+ attributeKeys: string[];
51337
+ };
51338
+ order: number;
51339
+ startMs: number | null;
51340
+ endMs: number | null;
51341
+ content: {
51342
+ type: "text";
51343
+ text: string;
51344
+ annotations?: {
51345
+ type: "event" | "url" | "file" | "user" | "signal";
51346
+ text?: string | undefined;
51347
+ url?: string | undefined;
51348
+ id?: string | undefined;
51349
+ startIndex?: number | undefined;
51350
+ endIndex?: number | undefined;
51351
+ }[] | undefined;
51352
+ };
51353
+ format: "text";
51354
+ visibility: "collapsed" | "expanded";
51355
+ capturedAs: "unknown" | "provider_reasoning" | "reasoning_summary" | "thinking";
51356
+ } | {
51357
+ type: "tool_call";
51358
+ status: "pending" | "unknown" | "error" | "completed";
51359
+ input: {
51360
+ raw: string | null;
51361
+ kind: "text" | "json" | "reference" | "empty";
51362
+ truncated: boolean;
51363
+ sizeChars: number | null;
51364
+ };
51365
+ output: {
51366
+ raw: string | null;
51367
+ kind: "text" | "json" | "reference" | "empty";
51368
+ truncated: boolean;
51369
+ sizeChars: number | null;
51370
+ } | null;
51371
+ name: string;
51372
+ durationMs: number | null;
51373
+ id: string;
51374
+ error: {
51375
+ raw: string | null;
51376
+ kind: "text" | "json" | "reference" | "empty";
51377
+ truncated: boolean;
51378
+ sizeChars: number | null;
51379
+ } | null;
51380
+ source: {
51381
+ spanIds: string[];
51382
+ adapter: string;
51383
+ confidence: "high" | "medium" | "low";
51384
+ parentSpanIds: string[];
51385
+ attributeKeys: string[];
51386
+ };
51387
+ order: number;
51388
+ startMs: number | null;
51389
+ endMs: number | null;
51390
+ callId: string | null;
51391
+ } | {
51392
+ type: "sub_agent";
51393
+ status: "unknown" | "error" | "ok";
51394
+ model: string | null;
51395
+ name: string;
51396
+ durationMs: number | null;
51397
+ id: string;
51398
+ spanIds: string[];
51399
+ source: {
51400
+ spanIds: string[];
51401
+ adapter: string;
51402
+ confidence: "high" | "medium" | "low";
51403
+ parentSpanIds: string[];
51404
+ attributeKeys: string[];
51405
+ };
51406
+ order: number;
51407
+ startMs: number | null;
51408
+ endMs: number | null;
51409
+ rootSpanId: string;
51410
+ toolCount: number;
51411
+ llmCount: number;
51412
+ inputPreview: string | null;
51413
+ outputPreview: string | null;
51414
+ totalInputTokens: number | null;
51415
+ totalOutputTokens: number | null;
51416
+ } | {
51417
+ type: "detached_sub_agent";
51418
+ status: "unknown" | "error" | "ok";
51419
+ name: string;
51420
+ durationMs: number | null;
51421
+ id: string;
51422
+ source: {
51423
+ spanIds: string[];
51424
+ adapter: string;
51425
+ confidence: "high" | "medium" | "low";
51426
+ parentSpanIds: string[];
51427
+ attributeKeys: string[];
51428
+ };
51429
+ order: number;
51430
+ startMs: number | null;
51431
+ endMs: number | null;
51432
+ rootSpanId: string;
51433
+ inputPreview: string | null;
51434
+ outputPreview: string | null;
51435
+ childEventId: string;
51436
+ } | {
51437
+ type: "agent_handoff";
51438
+ reason: string | null;
51439
+ id: string;
51440
+ source: {
51441
+ spanIds: string[];
51442
+ adapter: string;
51443
+ confidence: "high" | "medium" | "low";
51444
+ parentSpanIds: string[];
51445
+ attributeKeys: string[];
51446
+ };
51447
+ order: number;
51448
+ startMs: number | null;
51449
+ endMs: number | null;
51450
+ fromAgent: string;
51451
+ toAgent: string;
51452
+ } | {
51453
+ type: "unknown_span";
51454
+ name: string;
51455
+ id: string;
51456
+ source: {
51457
+ spanIds: string[];
51458
+ adapter: string;
51459
+ confidence: "high" | "medium" | "low";
51460
+ parentSpanIds: string[];
51461
+ attributeKeys: string[];
51462
+ };
51463
+ order: number;
51464
+ startMs: number | null;
51465
+ endMs: number | null;
51466
+ spanType: string | null;
51467
+ hiddenByDefault: true;
51468
+ })[];
51469
+ status: "complete" | "partial" | "missing_spans";
51470
+ durationMs: number | null;
51471
+ stats: {
51472
+ agentCount: number;
51473
+ llmCallCount: number;
51474
+ toolCallCount: number;
51475
+ errorCount: number;
51476
+ agentNames: string[];
51477
+ };
51478
+ schemaVersion: "2026-05-20";
51479
+ traceIds: string[];
51480
+ rootSpanIds: string[];
51481
+ startedAt: string | null;
51482
+ endedAt: string | null;
51483
+ spans: {
51484
+ provider: string | null;
51485
+ status: string | null;
51486
+ model: string | null;
51487
+ name: string;
51488
+ durationMs: number | null;
51489
+ traceId: string;
51490
+ startMs: number | null;
51491
+ endMs: number | null;
51492
+ spanType: string | null;
51493
+ spanId: string;
51494
+ parentSpanId: string | null;
51495
+ rendered: boolean;
51496
+ }[];
51497
+ diagnostics: {
51498
+ extractionVersion: "rich-interaction/1";
51499
+ warnings: {
51500
+ code: "no_spans" | "missing_llm_input" | "missing_llm_output" | "duplicate_output_suppressed" | "tool_call_unmatched" | "payload_truncated" | "unknown_span_shape";
51501
+ message: string;
51502
+ spanIds?: string[] | undefined;
51503
+ }[];
51504
+ unrenderedSpanCount: number;
51505
+ };
51506
+ } | null | undefined;
51507
+ _ai_output_words?: number | undefined;
51508
+ _ai_input_words?: number | undefined;
51509
+ userTraits?: Record<string, unknown> | null | undefined;
51510
+ userCreatedAt?: string | null | undefined;
51511
+ userPlan?: string | null | undefined;
51512
+ userLastPlan?: string | null | undefined;
51513
+ userPlanChangeTs?: string | null | undefined;
51514
+ isPending?: boolean | undefined;
51515
+ };
51516
+ spans: {
51517
+ timestamp: string;
51518
+ provider: string;
51519
+ status: "UNSET" | "OK" | "ERROR";
51520
+ model: string;
51521
+ event_id: string;
51522
+ user_id: string;
51523
+ convo_id: string;
51524
+ trace_id: string;
51525
+ span_id: string;
51526
+ span_type: "INTERNAL" | "LLM_GENERATION" | "LLM_GENERATION_STREAM" | "TOOL_CALL";
51527
+ span_name: string;
51528
+ output_payload: string;
51529
+ project_id: string;
51530
+ custom_event_id: string;
51531
+ parent_span_id: string;
51532
+ input_payload: string;
51533
+ start_unix_ns: string;
51534
+ end_unix_ns: string;
51535
+ duration_ns: string;
51536
+ input_tokens: number;
51537
+ output_tokens: number;
51538
+ attributes_string: Record<string, string>;
51539
+ attributes_num: Record<string, number>;
51540
+ org_public_id: string;
51541
+ end_timestamp: string;
51542
+ _inserted_at: string;
51543
+ }[];
51544
+ };
51545
51545
  }>;
51546
51546
  } & {
51547
51547
  reference: z.ZodOptional<z.ZodObject<{
@@ -63134,409 +63134,11 @@ declare const EvalCaseTracePairSchema: z.ZodObject<{
63134
63134
  end_timestamp: string;
63135
63135
  _inserted_at: string;
63136
63136
  }[];
63137
- } | undefined;
63138
- }>>;
63139
- }, "strip", z.ZodTypeAny, {
63140
- caseId: string;
63141
- candidate: {
63142
- snapshot: {
63143
- event: {
63144
- properties: Record<string, unknown> | null;
63145
- timestamp: string;
63146
- userId: string;
63147
- name: string;
63148
- id: string;
63149
- _raindropDatabaseId: string;
63150
- receivedAt: string;
63151
- aiData: {
63152
- model?: string | null | undefined;
63153
- convoId?: string | null | undefined;
63154
- input?: string | null | undefined;
63155
- output?: string | null | undefined;
63156
- };
63157
- inputAttachments: {
63158
- value: string;
63159
- attachment_id: string;
63160
- name: string;
63161
- attachment_type: "text" | "image" | "iframe";
63162
- }[];
63163
- outputAttachments: {
63164
- value: string;
63165
- attachment_id: string;
63166
- name: string;
63167
- attachment_type: "text" | "image" | "iframe";
63168
- }[];
63169
- featureFlags?: Record<string, string> | null | undefined;
63170
- projectId?: string | undefined;
63171
- customEventId?: string | null | undefined;
63172
- occurrencesInWindow?: number | undefined;
63173
- lensInfo?: {
63174
- lensId: number;
63175
- sourceId: string;
63176
- categoryId: number;
63177
- source?: string | undefined;
63178
- }[] | undefined;
63179
- topics?: string[] | undefined;
63180
- categories?: [string, string | null, number | null][] | undefined;
63181
- categoryLog?: {
63182
- lensId: number;
63183
- categoryId: string;
63184
- action: "add_category" | "remove_category" | "skip_category";
63185
- }[] | undefined;
63186
- signals?: {
63187
- timestamp: string;
63188
- name: string;
63189
- properties?: any;
63190
- score?: number | undefined;
63191
- id?: string | undefined;
63192
- attachmentId?: string | undefined;
63193
- signalType?: string | undefined;
63194
- }[] | undefined;
63195
- errorSpans?: {
63196
- status?: string | undefined;
63197
- span_id?: string | undefined;
63198
- started_at?: string | undefined;
63199
- duration_ms?: number | undefined;
63200
- span_type?: string | undefined;
63201
- span_name?: string | undefined;
63202
- output_payload?: any;
63203
- }[] | undefined;
63204
- regexSignals?: string[] | undefined;
63205
- toolCalls?: any[] | undefined;
63206
- toolCallNames?: string[] | undefined;
63207
- richInteraction?: {
63208
- eventId: string;
63209
- entries: ({
63210
- type: "system";
63211
- role: "system" | "developer";
63212
- id: string;
63213
- source: {
63214
- spanIds: string[];
63215
- adapter: string;
63216
- confidence: "high" | "medium" | "low";
63217
- parentSpanIds: string[];
63218
- attributeKeys: string[];
63219
- };
63220
- order: number;
63221
- startMs: number | null;
63222
- endMs: number | null;
63223
- content: {
63224
- type: "text";
63225
- text: string;
63226
- annotations?: {
63227
- type: "event" | "url" | "file" | "user" | "signal";
63228
- text?: string | undefined;
63229
- url?: string | undefined;
63230
- id?: string | undefined;
63231
- startIndex?: number | undefined;
63232
- endIndex?: number | undefined;
63233
- }[] | undefined;
63234
- };
63235
- collapsed: true;
63236
- tokenEstimate: number | null;
63237
- } | {
63238
- type: "user_message";
63239
- role: "user";
63240
- id: string;
63241
- source: {
63242
- spanIds: string[];
63243
- adapter: string;
63244
- confidence: "high" | "medium" | "low";
63245
- parentSpanIds: string[];
63246
- attributeKeys: string[];
63247
- };
63248
- order: number;
63249
- startMs: number | null;
63250
- endMs: number | null;
63251
- content: ({
63252
- type: "text";
63253
- text: string;
63254
- annotations?: {
63255
- type: "event" | "url" | "file" | "user" | "signal";
63256
- text?: string | undefined;
63257
- url?: string | undefined;
63258
- id?: string | undefined;
63259
- startIndex?: number | undefined;
63260
- endIndex?: number | undefined;
63261
- }[] | undefined;
63262
- } | {
63263
- type: "json";
63264
- raw: string | null;
63265
- value?: unknown;
63266
- } | {
63267
- type: "image" | "file";
63268
- name?: string | undefined;
63269
- url?: string | undefined;
63270
- mimeType?: string | undefined;
63271
- fileId?: string | undefined;
63272
- } | {
63273
- type: "reference";
63274
- label: string;
63275
- refType: "stored_tool_result" | "external";
63276
- href?: string | undefined;
63277
- metadata?: Record<string, unknown> | undefined;
63278
- })[];
63279
- } | {
63280
- type: "assistant_text";
63281
- role: "assistant";
63282
- id: string;
63283
- source: {
63284
- spanIds: string[];
63285
- adapter: string;
63286
- confidence: "high" | "medium" | "low";
63287
- parentSpanIds: string[];
63288
- attributeKeys: string[];
63289
- };
63290
- order: number;
63291
- startMs: number | null;
63292
- endMs: number | null;
63293
- content: ({
63294
- type: "text";
63295
- text: string;
63296
- annotations?: {
63297
- type: "event" | "url" | "file" | "user" | "signal";
63298
- text?: string | undefined;
63299
- url?: string | undefined;
63300
- id?: string | undefined;
63301
- startIndex?: number | undefined;
63302
- endIndex?: number | undefined;
63303
- }[] | undefined;
63304
- } | {
63305
- type: "json";
63306
- raw: string | null;
63307
- value?: unknown;
63308
- } | {
63309
- type: "image" | "file";
63310
- name?: string | undefined;
63311
- url?: string | undefined;
63312
- mimeType?: string | undefined;
63313
- fileId?: string | undefined;
63314
- } | {
63315
- type: "reference";
63316
- label: string;
63317
- refType: "stored_tool_result" | "external";
63318
- href?: string | undefined;
63319
- metadata?: Record<string, unknown> | undefined;
63320
- })[];
63321
- format: "text" | "markdown";
63322
- final: boolean;
63323
- } | {
63324
- type: "reasoning";
63325
- id: string;
63326
- source: {
63327
- spanIds: string[];
63328
- adapter: string;
63329
- confidence: "high" | "medium" | "low";
63330
- parentSpanIds: string[];
63331
- attributeKeys: string[];
63332
- };
63333
- order: number;
63334
- startMs: number | null;
63335
- endMs: number | null;
63336
- content: {
63337
- type: "text";
63338
- text: string;
63339
- annotations?: {
63340
- type: "event" | "url" | "file" | "user" | "signal";
63341
- text?: string | undefined;
63342
- url?: string | undefined;
63343
- id?: string | undefined;
63344
- startIndex?: number | undefined;
63345
- endIndex?: number | undefined;
63346
- }[] | undefined;
63347
- };
63348
- format: "text";
63349
- visibility: "collapsed" | "expanded";
63350
- capturedAs: "unknown" | "provider_reasoning" | "reasoning_summary" | "thinking";
63351
- } | {
63352
- type: "tool_call";
63353
- status: "pending" | "unknown" | "error" | "completed";
63354
- input: {
63355
- raw: string | null;
63356
- kind: "text" | "json" | "reference" | "empty";
63357
- truncated: boolean;
63358
- sizeChars: number | null;
63359
- };
63360
- output: {
63361
- raw: string | null;
63362
- kind: "text" | "json" | "reference" | "empty";
63363
- truncated: boolean;
63364
- sizeChars: number | null;
63365
- } | null;
63366
- name: string;
63367
- durationMs: number | null;
63368
- id: string;
63369
- error: {
63370
- raw: string | null;
63371
- kind: "text" | "json" | "reference" | "empty";
63372
- truncated: boolean;
63373
- sizeChars: number | null;
63374
- } | null;
63375
- source: {
63376
- spanIds: string[];
63377
- adapter: string;
63378
- confidence: "high" | "medium" | "low";
63379
- parentSpanIds: string[];
63380
- attributeKeys: string[];
63381
- };
63382
- order: number;
63383
- startMs: number | null;
63384
- endMs: number | null;
63385
- callId: string | null;
63386
- } | {
63387
- type: "sub_agent";
63388
- status: "unknown" | "error" | "ok";
63389
- model: string | null;
63390
- name: string;
63391
- durationMs: number | null;
63392
- id: string;
63393
- spanIds: string[];
63394
- source: {
63395
- spanIds: string[];
63396
- adapter: string;
63397
- confidence: "high" | "medium" | "low";
63398
- parentSpanIds: string[];
63399
- attributeKeys: string[];
63400
- };
63401
- order: number;
63402
- startMs: number | null;
63403
- endMs: number | null;
63404
- rootSpanId: string;
63405
- toolCount: number;
63406
- llmCount: number;
63407
- inputPreview: string | null;
63408
- outputPreview: string | null;
63409
- totalInputTokens: number | null;
63410
- totalOutputTokens: number | null;
63411
- } | {
63412
- type: "detached_sub_agent";
63413
- status: "unknown" | "error" | "ok";
63414
- name: string;
63415
- durationMs: number | null;
63416
- id: string;
63417
- source: {
63418
- spanIds: string[];
63419
- adapter: string;
63420
- confidence: "high" | "medium" | "low";
63421
- parentSpanIds: string[];
63422
- attributeKeys: string[];
63423
- };
63424
- order: number;
63425
- startMs: number | null;
63426
- endMs: number | null;
63427
- rootSpanId: string;
63428
- inputPreview: string | null;
63429
- outputPreview: string | null;
63430
- childEventId: string;
63431
- } | {
63432
- type: "agent_handoff";
63433
- reason: string | null;
63434
- id: string;
63435
- source: {
63436
- spanIds: string[];
63437
- adapter: string;
63438
- confidence: "high" | "medium" | "low";
63439
- parentSpanIds: string[];
63440
- attributeKeys: string[];
63441
- };
63442
- order: number;
63443
- startMs: number | null;
63444
- endMs: number | null;
63445
- fromAgent: string;
63446
- toAgent: string;
63447
- } | {
63448
- type: "unknown_span";
63449
- name: string;
63450
- id: string;
63451
- source: {
63452
- spanIds: string[];
63453
- adapter: string;
63454
- confidence: "high" | "medium" | "low";
63455
- parentSpanIds: string[];
63456
- attributeKeys: string[];
63457
- };
63458
- order: number;
63459
- startMs: number | null;
63460
- endMs: number | null;
63461
- spanType: string | null;
63462
- hiddenByDefault: true;
63463
- })[];
63464
- status: "complete" | "partial" | "missing_spans";
63465
- durationMs: number | null;
63466
- stats: {
63467
- agentCount: number;
63468
- llmCallCount: number;
63469
- toolCallCount: number;
63470
- errorCount: number;
63471
- agentNames: string[];
63472
- };
63473
- schemaVersion: "2026-05-20";
63474
- traceIds: string[];
63475
- rootSpanIds: string[];
63476
- startedAt: string | null;
63477
- endedAt: string | null;
63478
- spans: {
63479
- provider: string | null;
63480
- status: string | null;
63481
- model: string | null;
63482
- name: string;
63483
- durationMs: number | null;
63484
- traceId: string;
63485
- startMs: number | null;
63486
- endMs: number | null;
63487
- spanType: string | null;
63488
- spanId: string;
63489
- parentSpanId: string | null;
63490
- rendered: boolean;
63491
- }[];
63492
- diagnostics: {
63493
- extractionVersion: "rich-interaction/1";
63494
- warnings: {
63495
- code: "no_spans" | "missing_llm_input" | "missing_llm_output" | "duplicate_output_suppressed" | "tool_call_unmatched" | "payload_truncated" | "unknown_span_shape";
63496
- message: string;
63497
- spanIds?: string[] | undefined;
63498
- }[];
63499
- unrenderedSpanCount: number;
63500
- };
63501
- } | null | undefined;
63502
- _ai_output_words?: number | undefined;
63503
- _ai_input_words?: number | undefined;
63504
- userTraits?: Record<string, unknown> | null | undefined;
63505
- userCreatedAt?: string | null | undefined;
63506
- userPlan?: string | null | undefined;
63507
- userLastPlan?: string | null | undefined;
63508
- userPlanChangeTs?: string | null | undefined;
63509
- isPending?: boolean | undefined;
63510
- };
63511
- spans: {
63512
- timestamp: string;
63513
- provider: string;
63514
- status: "UNSET" | "OK" | "ERROR";
63515
- model: string;
63516
- event_id: string;
63517
- user_id: string;
63518
- convo_id: string;
63519
- trace_id: string;
63520
- span_id: string;
63521
- span_type: "INTERNAL" | "LLM_GENERATION" | "LLM_GENERATION_STREAM" | "TOOL_CALL";
63522
- span_name: string;
63523
- output_payload: string;
63524
- project_id: string;
63525
- custom_event_id: string;
63526
- parent_span_id: string;
63527
- input_payload: string;
63528
- start_unix_ns: string;
63529
- end_unix_ns: string;
63530
- duration_ns: string;
63531
- input_tokens: number;
63532
- output_tokens: number;
63533
- attributes_string: Record<string, string>;
63534
- attributes_num: Record<string, number>;
63535
- org_public_id: string;
63536
- end_timestamp: string;
63537
- _inserted_at: string;
63538
- }[];
63539
- };
63137
+ } | undefined;
63138
+ }>>;
63139
+ }, "strip", z.ZodTypeAny, {
63140
+ caseId: string;
63141
+ candidate: {
63540
63142
  trace: {
63541
63143
  event: {
63542
63144
  properties: Record<string, unknown> | null;
@@ -64171,9 +63773,406 @@ declare const EvalCaseTracePairSchema: z.ZodObject<{
64171
63773
  } | undefined;
64172
63774
  } | undefined;
64173
63775
  };
63776
+ snapshot: {
63777
+ event: {
63778
+ properties: Record<string, unknown> | null;
63779
+ timestamp: string;
63780
+ userId: string;
63781
+ name: string;
63782
+ id: string;
63783
+ _raindropDatabaseId: string;
63784
+ receivedAt: string;
63785
+ aiData: {
63786
+ model?: string | null | undefined;
63787
+ convoId?: string | null | undefined;
63788
+ input?: string | null | undefined;
63789
+ output?: string | null | undefined;
63790
+ };
63791
+ inputAttachments: {
63792
+ value: string;
63793
+ attachment_id: string;
63794
+ name: string;
63795
+ attachment_type: "text" | "image" | "iframe";
63796
+ }[];
63797
+ outputAttachments: {
63798
+ value: string;
63799
+ attachment_id: string;
63800
+ name: string;
63801
+ attachment_type: "text" | "image" | "iframe";
63802
+ }[];
63803
+ featureFlags?: Record<string, string> | null | undefined;
63804
+ projectId?: string | undefined;
63805
+ customEventId?: string | null | undefined;
63806
+ occurrencesInWindow?: number | undefined;
63807
+ lensInfo?: {
63808
+ lensId: number;
63809
+ sourceId: string;
63810
+ categoryId: number;
63811
+ source?: string | undefined;
63812
+ }[] | undefined;
63813
+ topics?: string[] | undefined;
63814
+ categories?: [string, string | null, number | null][] | undefined;
63815
+ categoryLog?: {
63816
+ lensId: number;
63817
+ categoryId: string;
63818
+ action: "add_category" | "remove_category" | "skip_category";
63819
+ }[] | undefined;
63820
+ signals?: {
63821
+ timestamp: string;
63822
+ name: string;
63823
+ properties?: any;
63824
+ score?: number | undefined;
63825
+ id?: string | undefined;
63826
+ attachmentId?: string | undefined;
63827
+ signalType?: string | undefined;
63828
+ }[] | undefined;
63829
+ errorSpans?: {
63830
+ status?: string | undefined;
63831
+ span_id?: string | undefined;
63832
+ started_at?: string | undefined;
63833
+ duration_ms?: number | undefined;
63834
+ span_type?: string | undefined;
63835
+ span_name?: string | undefined;
63836
+ output_payload?: any;
63837
+ }[] | undefined;
63838
+ regexSignals?: string[] | undefined;
63839
+ toolCalls?: any[] | undefined;
63840
+ toolCallNames?: string[] | undefined;
63841
+ richInteraction?: {
63842
+ eventId: string;
63843
+ entries: ({
63844
+ type: "system";
63845
+ role: "system" | "developer";
63846
+ id: string;
63847
+ source: {
63848
+ spanIds: string[];
63849
+ adapter: string;
63850
+ confidence: "high" | "medium" | "low";
63851
+ parentSpanIds: string[];
63852
+ attributeKeys: string[];
63853
+ };
63854
+ order: number;
63855
+ startMs: number | null;
63856
+ endMs: number | null;
63857
+ content: {
63858
+ type: "text";
63859
+ text: string;
63860
+ annotations?: {
63861
+ type: "event" | "url" | "file" | "user" | "signal";
63862
+ text?: string | undefined;
63863
+ url?: string | undefined;
63864
+ id?: string | undefined;
63865
+ startIndex?: number | undefined;
63866
+ endIndex?: number | undefined;
63867
+ }[] | undefined;
63868
+ };
63869
+ collapsed: true;
63870
+ tokenEstimate: number | null;
63871
+ } | {
63872
+ type: "user_message";
63873
+ role: "user";
63874
+ id: string;
63875
+ source: {
63876
+ spanIds: string[];
63877
+ adapter: string;
63878
+ confidence: "high" | "medium" | "low";
63879
+ parentSpanIds: string[];
63880
+ attributeKeys: string[];
63881
+ };
63882
+ order: number;
63883
+ startMs: number | null;
63884
+ endMs: number | null;
63885
+ content: ({
63886
+ type: "text";
63887
+ text: string;
63888
+ annotations?: {
63889
+ type: "event" | "url" | "file" | "user" | "signal";
63890
+ text?: string | undefined;
63891
+ url?: string | undefined;
63892
+ id?: string | undefined;
63893
+ startIndex?: number | undefined;
63894
+ endIndex?: number | undefined;
63895
+ }[] | undefined;
63896
+ } | {
63897
+ type: "json";
63898
+ raw: string | null;
63899
+ value?: unknown;
63900
+ } | {
63901
+ type: "image" | "file";
63902
+ name?: string | undefined;
63903
+ url?: string | undefined;
63904
+ mimeType?: string | undefined;
63905
+ fileId?: string | undefined;
63906
+ } | {
63907
+ type: "reference";
63908
+ label: string;
63909
+ refType: "stored_tool_result" | "external";
63910
+ href?: string | undefined;
63911
+ metadata?: Record<string, unknown> | undefined;
63912
+ })[];
63913
+ } | {
63914
+ type: "assistant_text";
63915
+ role: "assistant";
63916
+ id: string;
63917
+ source: {
63918
+ spanIds: string[];
63919
+ adapter: string;
63920
+ confidence: "high" | "medium" | "low";
63921
+ parentSpanIds: string[];
63922
+ attributeKeys: string[];
63923
+ };
63924
+ order: number;
63925
+ startMs: number | null;
63926
+ endMs: number | null;
63927
+ content: ({
63928
+ type: "text";
63929
+ text: string;
63930
+ annotations?: {
63931
+ type: "event" | "url" | "file" | "user" | "signal";
63932
+ text?: string | undefined;
63933
+ url?: string | undefined;
63934
+ id?: string | undefined;
63935
+ startIndex?: number | undefined;
63936
+ endIndex?: number | undefined;
63937
+ }[] | undefined;
63938
+ } | {
63939
+ type: "json";
63940
+ raw: string | null;
63941
+ value?: unknown;
63942
+ } | {
63943
+ type: "image" | "file";
63944
+ name?: string | undefined;
63945
+ url?: string | undefined;
63946
+ mimeType?: string | undefined;
63947
+ fileId?: string | undefined;
63948
+ } | {
63949
+ type: "reference";
63950
+ label: string;
63951
+ refType: "stored_tool_result" | "external";
63952
+ href?: string | undefined;
63953
+ metadata?: Record<string, unknown> | undefined;
63954
+ })[];
63955
+ format: "text" | "markdown";
63956
+ final: boolean;
63957
+ } | {
63958
+ type: "reasoning";
63959
+ id: string;
63960
+ source: {
63961
+ spanIds: string[];
63962
+ adapter: string;
63963
+ confidence: "high" | "medium" | "low";
63964
+ parentSpanIds: string[];
63965
+ attributeKeys: string[];
63966
+ };
63967
+ order: number;
63968
+ startMs: number | null;
63969
+ endMs: number | null;
63970
+ content: {
63971
+ type: "text";
63972
+ text: string;
63973
+ annotations?: {
63974
+ type: "event" | "url" | "file" | "user" | "signal";
63975
+ text?: string | undefined;
63976
+ url?: string | undefined;
63977
+ id?: string | undefined;
63978
+ startIndex?: number | undefined;
63979
+ endIndex?: number | undefined;
63980
+ }[] | undefined;
63981
+ };
63982
+ format: "text";
63983
+ visibility: "collapsed" | "expanded";
63984
+ capturedAs: "unknown" | "provider_reasoning" | "reasoning_summary" | "thinking";
63985
+ } | {
63986
+ type: "tool_call";
63987
+ status: "pending" | "unknown" | "error" | "completed";
63988
+ input: {
63989
+ raw: string | null;
63990
+ kind: "text" | "json" | "reference" | "empty";
63991
+ truncated: boolean;
63992
+ sizeChars: number | null;
63993
+ };
63994
+ output: {
63995
+ raw: string | null;
63996
+ kind: "text" | "json" | "reference" | "empty";
63997
+ truncated: boolean;
63998
+ sizeChars: number | null;
63999
+ } | null;
64000
+ name: string;
64001
+ durationMs: number | null;
64002
+ id: string;
64003
+ error: {
64004
+ raw: string | null;
64005
+ kind: "text" | "json" | "reference" | "empty";
64006
+ truncated: boolean;
64007
+ sizeChars: number | null;
64008
+ } | null;
64009
+ source: {
64010
+ spanIds: string[];
64011
+ adapter: string;
64012
+ confidence: "high" | "medium" | "low";
64013
+ parentSpanIds: string[];
64014
+ attributeKeys: string[];
64015
+ };
64016
+ order: number;
64017
+ startMs: number | null;
64018
+ endMs: number | null;
64019
+ callId: string | null;
64020
+ } | {
64021
+ type: "sub_agent";
64022
+ status: "unknown" | "error" | "ok";
64023
+ model: string | null;
64024
+ name: string;
64025
+ durationMs: number | null;
64026
+ id: string;
64027
+ spanIds: string[];
64028
+ source: {
64029
+ spanIds: string[];
64030
+ adapter: string;
64031
+ confidence: "high" | "medium" | "low";
64032
+ parentSpanIds: string[];
64033
+ attributeKeys: string[];
64034
+ };
64035
+ order: number;
64036
+ startMs: number | null;
64037
+ endMs: number | null;
64038
+ rootSpanId: string;
64039
+ toolCount: number;
64040
+ llmCount: number;
64041
+ inputPreview: string | null;
64042
+ outputPreview: string | null;
64043
+ totalInputTokens: number | null;
64044
+ totalOutputTokens: number | null;
64045
+ } | {
64046
+ type: "detached_sub_agent";
64047
+ status: "unknown" | "error" | "ok";
64048
+ name: string;
64049
+ durationMs: number | null;
64050
+ id: string;
64051
+ source: {
64052
+ spanIds: string[];
64053
+ adapter: string;
64054
+ confidence: "high" | "medium" | "low";
64055
+ parentSpanIds: string[];
64056
+ attributeKeys: string[];
64057
+ };
64058
+ order: number;
64059
+ startMs: number | null;
64060
+ endMs: number | null;
64061
+ rootSpanId: string;
64062
+ inputPreview: string | null;
64063
+ outputPreview: string | null;
64064
+ childEventId: string;
64065
+ } | {
64066
+ type: "agent_handoff";
64067
+ reason: string | null;
64068
+ id: string;
64069
+ source: {
64070
+ spanIds: string[];
64071
+ adapter: string;
64072
+ confidence: "high" | "medium" | "low";
64073
+ parentSpanIds: string[];
64074
+ attributeKeys: string[];
64075
+ };
64076
+ order: number;
64077
+ startMs: number | null;
64078
+ endMs: number | null;
64079
+ fromAgent: string;
64080
+ toAgent: string;
64081
+ } | {
64082
+ type: "unknown_span";
64083
+ name: string;
64084
+ id: string;
64085
+ source: {
64086
+ spanIds: string[];
64087
+ adapter: string;
64088
+ confidence: "high" | "medium" | "low";
64089
+ parentSpanIds: string[];
64090
+ attributeKeys: string[];
64091
+ };
64092
+ order: number;
64093
+ startMs: number | null;
64094
+ endMs: number | null;
64095
+ spanType: string | null;
64096
+ hiddenByDefault: true;
64097
+ })[];
64098
+ status: "complete" | "partial" | "missing_spans";
64099
+ durationMs: number | null;
64100
+ stats: {
64101
+ agentCount: number;
64102
+ llmCallCount: number;
64103
+ toolCallCount: number;
64104
+ errorCount: number;
64105
+ agentNames: string[];
64106
+ };
64107
+ schemaVersion: "2026-05-20";
64108
+ traceIds: string[];
64109
+ rootSpanIds: string[];
64110
+ startedAt: string | null;
64111
+ endedAt: string | null;
64112
+ spans: {
64113
+ provider: string | null;
64114
+ status: string | null;
64115
+ model: string | null;
64116
+ name: string;
64117
+ durationMs: number | null;
64118
+ traceId: string;
64119
+ startMs: number | null;
64120
+ endMs: number | null;
64121
+ spanType: string | null;
64122
+ spanId: string;
64123
+ parentSpanId: string | null;
64124
+ rendered: boolean;
64125
+ }[];
64126
+ diagnostics: {
64127
+ extractionVersion: "rich-interaction/1";
64128
+ warnings: {
64129
+ code: "no_spans" | "missing_llm_input" | "missing_llm_output" | "duplicate_output_suppressed" | "tool_call_unmatched" | "payload_truncated" | "unknown_span_shape";
64130
+ message: string;
64131
+ spanIds?: string[] | undefined;
64132
+ }[];
64133
+ unrenderedSpanCount: number;
64134
+ };
64135
+ } | null | undefined;
64136
+ _ai_output_words?: number | undefined;
64137
+ _ai_input_words?: number | undefined;
64138
+ userTraits?: Record<string, unknown> | null | undefined;
64139
+ userCreatedAt?: string | null | undefined;
64140
+ userPlan?: string | null | undefined;
64141
+ userLastPlan?: string | null | undefined;
64142
+ userPlanChangeTs?: string | null | undefined;
64143
+ isPending?: boolean | undefined;
64144
+ };
64145
+ spans: {
64146
+ timestamp: string;
64147
+ provider: string;
64148
+ status: "UNSET" | "OK" | "ERROR";
64149
+ model: string;
64150
+ event_id: string;
64151
+ user_id: string;
64152
+ convo_id: string;
64153
+ trace_id: string;
64154
+ span_id: string;
64155
+ span_type: "INTERNAL" | "LLM_GENERATION" | "LLM_GENERATION_STREAM" | "TOOL_CALL";
64156
+ span_name: string;
64157
+ output_payload: string;
64158
+ project_id: string;
64159
+ custom_event_id: string;
64160
+ parent_span_id: string;
64161
+ input_payload: string;
64162
+ start_unix_ns: string;
64163
+ end_unix_ns: string;
64164
+ duration_ns: string;
64165
+ input_tokens: number;
64166
+ output_tokens: number;
64167
+ attributes_string: Record<string, string>;
64168
+ attributes_num: Record<string, number>;
64169
+ org_public_id: string;
64170
+ end_timestamp: string;
64171
+ _inserted_at: string;
64172
+ }[];
64173
+ };
64174
64174
  };
64175
64175
  output?: JsonValue | undefined;
64176
- rowMetadata?: Record<string, string> | undefined;
64177
64176
  reference?: {
64178
64177
  trace: {
64179
64178
  event: {
@@ -65208,10 +65207,11 @@ declare const EvalCaseTracePairSchema: z.ZodObject<{
65208
65207
  }[];
65209
65208
  } | undefined;
65210
65209
  } | undefined;
65210
+ rowMetadata?: Record<string, string> | undefined;
65211
65211
  }, {
65212
65212
  caseId: string;
65213
65213
  candidate: {
65214
- snapshot: {
65214
+ trace: {
65215
65215
  event: {
65216
65216
  properties: Record<string, unknown> | null;
65217
65217
  timestamp: string;
@@ -65580,36 +65580,272 @@ declare const EvalCaseTracePairSchema: z.ZodObject<{
65580
65580
  userPlanChangeTs?: string | null | undefined;
65581
65581
  isPending?: boolean | undefined;
65582
65582
  };
65583
- spans: {
65584
- timestamp: string;
65585
- provider: string;
65586
- status: "UNSET" | "OK" | "ERROR";
65587
- model: string;
65588
- event_id: string;
65589
- user_id: string;
65590
- convo_id: string;
65591
- trace_id: string;
65592
- span_id: string;
65593
- span_type: "INTERNAL" | "LLM_GENERATION" | "LLM_GENERATION_STREAM" | "TOOL_CALL";
65594
- span_name: string;
65595
- output_payload: string;
65596
- project_id: string;
65597
- custom_event_id: string;
65598
- parent_span_id: string;
65599
- input_payload: string;
65600
- start_unix_ns: string;
65601
- end_unix_ns: string;
65602
- duration_ns: string;
65603
- input_tokens: number;
65604
- output_tokens: number;
65605
- attributes_string: Record<string, string>;
65606
- attributes_num: Record<string, number>;
65607
- org_public_id: string;
65608
- end_timestamp: string;
65609
- _inserted_at: string;
65610
- }[];
65583
+ entries: ({
65584
+ type: "system";
65585
+ role: "system" | "developer";
65586
+ id: string;
65587
+ source: {
65588
+ spanIds: string[];
65589
+ adapter: string;
65590
+ confidence: "high" | "medium" | "low";
65591
+ parentSpanIds: string[];
65592
+ attributeKeys: string[];
65593
+ };
65594
+ order: number;
65595
+ startMs: number | null;
65596
+ endMs: number | null;
65597
+ content: {
65598
+ type: "text";
65599
+ text: string;
65600
+ annotations?: {
65601
+ type: "event" | "url" | "file" | "user" | "signal";
65602
+ text?: string | undefined;
65603
+ url?: string | undefined;
65604
+ id?: string | undefined;
65605
+ startIndex?: number | undefined;
65606
+ endIndex?: number | undefined;
65607
+ }[] | undefined;
65608
+ };
65609
+ collapsed: true;
65610
+ tokenEstimate: number | null;
65611
+ } | {
65612
+ type: "user_message";
65613
+ role: "user";
65614
+ id: string;
65615
+ source: {
65616
+ spanIds: string[];
65617
+ adapter: string;
65618
+ confidence: "high" | "medium" | "low";
65619
+ parentSpanIds: string[];
65620
+ attributeKeys: string[];
65621
+ };
65622
+ order: number;
65623
+ startMs: number | null;
65624
+ endMs: number | null;
65625
+ content: ({
65626
+ type: "text";
65627
+ text: string;
65628
+ annotations?: {
65629
+ type: "event" | "url" | "file" | "user" | "signal";
65630
+ text?: string | undefined;
65631
+ url?: string | undefined;
65632
+ id?: string | undefined;
65633
+ startIndex?: number | undefined;
65634
+ endIndex?: number | undefined;
65635
+ }[] | undefined;
65636
+ } | {
65637
+ type: "json";
65638
+ raw: string | null;
65639
+ value?: unknown;
65640
+ } | {
65641
+ type: "image" | "file";
65642
+ name?: string | undefined;
65643
+ url?: string | undefined;
65644
+ mimeType?: string | undefined;
65645
+ fileId?: string | undefined;
65646
+ } | {
65647
+ type: "reference";
65648
+ label: string;
65649
+ refType: "stored_tool_result" | "external";
65650
+ href?: string | undefined;
65651
+ metadata?: Record<string, unknown> | undefined;
65652
+ })[];
65653
+ } | {
65654
+ type: "assistant_text";
65655
+ role: "assistant";
65656
+ id: string;
65657
+ source: {
65658
+ spanIds: string[];
65659
+ adapter: string;
65660
+ confidence: "high" | "medium" | "low";
65661
+ parentSpanIds: string[];
65662
+ attributeKeys: string[];
65663
+ };
65664
+ order: number;
65665
+ startMs: number | null;
65666
+ endMs: number | null;
65667
+ content: ({
65668
+ type: "text";
65669
+ text: string;
65670
+ annotations?: {
65671
+ type: "event" | "url" | "file" | "user" | "signal";
65672
+ text?: string | undefined;
65673
+ url?: string | undefined;
65674
+ id?: string | undefined;
65675
+ startIndex?: number | undefined;
65676
+ endIndex?: number | undefined;
65677
+ }[] | undefined;
65678
+ } | {
65679
+ type: "json";
65680
+ raw: string | null;
65681
+ value?: unknown;
65682
+ } | {
65683
+ type: "image" | "file";
65684
+ name?: string | undefined;
65685
+ url?: string | undefined;
65686
+ mimeType?: string | undefined;
65687
+ fileId?: string | undefined;
65688
+ } | {
65689
+ type: "reference";
65690
+ label: string;
65691
+ refType: "stored_tool_result" | "external";
65692
+ href?: string | undefined;
65693
+ metadata?: Record<string, unknown> | undefined;
65694
+ })[];
65695
+ format: "text" | "markdown";
65696
+ final: boolean;
65697
+ } | {
65698
+ type: "reasoning";
65699
+ id: string;
65700
+ source: {
65701
+ spanIds: string[];
65702
+ adapter: string;
65703
+ confidence: "high" | "medium" | "low";
65704
+ parentSpanIds: string[];
65705
+ attributeKeys: string[];
65706
+ };
65707
+ order: number;
65708
+ startMs: number | null;
65709
+ endMs: number | null;
65710
+ content: {
65711
+ type: "text";
65712
+ text: string;
65713
+ annotations?: {
65714
+ type: "event" | "url" | "file" | "user" | "signal";
65715
+ text?: string | undefined;
65716
+ url?: string | undefined;
65717
+ id?: string | undefined;
65718
+ startIndex?: number | undefined;
65719
+ endIndex?: number | undefined;
65720
+ }[] | undefined;
65721
+ };
65722
+ format: "text";
65723
+ visibility: "collapsed" | "expanded";
65724
+ capturedAs: "unknown" | "provider_reasoning" | "reasoning_summary" | "thinking";
65725
+ } | {
65726
+ type: "tool_call";
65727
+ status: "pending" | "unknown" | "error" | "completed";
65728
+ input: {
65729
+ raw: string | null;
65730
+ kind: "text" | "json" | "reference" | "empty";
65731
+ truncated: boolean;
65732
+ sizeChars: number | null;
65733
+ };
65734
+ output: {
65735
+ raw: string | null;
65736
+ kind: "text" | "json" | "reference" | "empty";
65737
+ truncated: boolean;
65738
+ sizeChars: number | null;
65739
+ } | null;
65740
+ name: string;
65741
+ durationMs: number | null;
65742
+ id: string;
65743
+ error: {
65744
+ raw: string | null;
65745
+ kind: "text" | "json" | "reference" | "empty";
65746
+ truncated: boolean;
65747
+ sizeChars: number | null;
65748
+ } | null;
65749
+ source: {
65750
+ spanIds: string[];
65751
+ adapter: string;
65752
+ confidence: "high" | "medium" | "low";
65753
+ parentSpanIds: string[];
65754
+ attributeKeys: string[];
65755
+ };
65756
+ order: number;
65757
+ startMs: number | null;
65758
+ endMs: number | null;
65759
+ callId: string | null;
65760
+ } | {
65761
+ type: "sub_agent";
65762
+ status: "unknown" | "error" | "ok";
65763
+ model: string | null;
65764
+ name: string;
65765
+ durationMs: number | null;
65766
+ id: string;
65767
+ spanIds: string[];
65768
+ source: {
65769
+ spanIds: string[];
65770
+ adapter: string;
65771
+ confidence: "high" | "medium" | "low";
65772
+ parentSpanIds: string[];
65773
+ attributeKeys: string[];
65774
+ };
65775
+ order: number;
65776
+ startMs: number | null;
65777
+ endMs: number | null;
65778
+ rootSpanId: string;
65779
+ toolCount: number;
65780
+ llmCount: number;
65781
+ inputPreview: string | null;
65782
+ outputPreview: string | null;
65783
+ totalInputTokens: number | null;
65784
+ totalOutputTokens: number | null;
65785
+ } | {
65786
+ type: "detached_sub_agent";
65787
+ status: "unknown" | "error" | "ok";
65788
+ name: string;
65789
+ durationMs: number | null;
65790
+ id: string;
65791
+ source: {
65792
+ spanIds: string[];
65793
+ adapter: string;
65794
+ confidence: "high" | "medium" | "low";
65795
+ parentSpanIds: string[];
65796
+ attributeKeys: string[];
65797
+ };
65798
+ order: number;
65799
+ startMs: number | null;
65800
+ endMs: number | null;
65801
+ rootSpanId: string;
65802
+ inputPreview: string | null;
65803
+ outputPreview: string | null;
65804
+ childEventId: string;
65805
+ } | {
65806
+ type: "agent_handoff";
65807
+ reason: string | null;
65808
+ id: string;
65809
+ source: {
65810
+ spanIds: string[];
65811
+ adapter: string;
65812
+ confidence: "high" | "medium" | "low";
65813
+ parentSpanIds: string[];
65814
+ attributeKeys: string[];
65815
+ };
65816
+ order: number;
65817
+ startMs: number | null;
65818
+ endMs: number | null;
65819
+ fromAgent: string;
65820
+ toAgent: string;
65821
+ } | {
65822
+ type: "unknown_span";
65823
+ name: string;
65824
+ id: string;
65825
+ source: {
65826
+ spanIds: string[];
65827
+ adapter: string;
65828
+ confidence: "high" | "medium" | "low";
65829
+ parentSpanIds: string[];
65830
+ attributeKeys: string[];
65831
+ };
65832
+ order: number;
65833
+ startMs: number | null;
65834
+ endMs: number | null;
65835
+ spanType: string | null;
65836
+ hiddenByDefault: true;
65837
+ })[];
65838
+ origin: "replay" | "dataset";
65839
+ caseContext?: {
65840
+ caseId: string;
65841
+ expectation?: {
65842
+ description: string;
65843
+ reference?: string | undefined;
65844
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
65845
+ } | undefined;
65846
+ } | undefined;
65611
65847
  };
65612
- trace: {
65848
+ snapshot: {
65613
65849
  event: {
65614
65850
  properties: Record<string, unknown> | null;
65615
65851
  timestamp: string;
@@ -65978,274 +66214,37 @@ declare const EvalCaseTracePairSchema: z.ZodObject<{
65978
66214
  userPlanChangeTs?: string | null | undefined;
65979
66215
  isPending?: boolean | undefined;
65980
66216
  };
65981
- entries: ({
65982
- type: "system";
65983
- role: "system" | "developer";
65984
- id: string;
65985
- source: {
65986
- spanIds: string[];
65987
- adapter: string;
65988
- confidence: "high" | "medium" | "low";
65989
- parentSpanIds: string[];
65990
- attributeKeys: string[];
65991
- };
65992
- order: number;
65993
- startMs: number | null;
65994
- endMs: number | null;
65995
- content: {
65996
- type: "text";
65997
- text: string;
65998
- annotations?: {
65999
- type: "event" | "url" | "file" | "user" | "signal";
66000
- text?: string | undefined;
66001
- url?: string | undefined;
66002
- id?: string | undefined;
66003
- startIndex?: number | undefined;
66004
- endIndex?: number | undefined;
66005
- }[] | undefined;
66006
- };
66007
- collapsed: true;
66008
- tokenEstimate: number | null;
66009
- } | {
66010
- type: "user_message";
66011
- role: "user";
66012
- id: string;
66013
- source: {
66014
- spanIds: string[];
66015
- adapter: string;
66016
- confidence: "high" | "medium" | "low";
66017
- parentSpanIds: string[];
66018
- attributeKeys: string[];
66019
- };
66020
- order: number;
66021
- startMs: number | null;
66022
- endMs: number | null;
66023
- content: ({
66024
- type: "text";
66025
- text: string;
66026
- annotations?: {
66027
- type: "event" | "url" | "file" | "user" | "signal";
66028
- text?: string | undefined;
66029
- url?: string | undefined;
66030
- id?: string | undefined;
66031
- startIndex?: number | undefined;
66032
- endIndex?: number | undefined;
66033
- }[] | undefined;
66034
- } | {
66035
- type: "json";
66036
- raw: string | null;
66037
- value?: unknown;
66038
- } | {
66039
- type: "image" | "file";
66040
- name?: string | undefined;
66041
- url?: string | undefined;
66042
- mimeType?: string | undefined;
66043
- fileId?: string | undefined;
66044
- } | {
66045
- type: "reference";
66046
- label: string;
66047
- refType: "stored_tool_result" | "external";
66048
- href?: string | undefined;
66049
- metadata?: Record<string, unknown> | undefined;
66050
- })[];
66051
- } | {
66052
- type: "assistant_text";
66053
- role: "assistant";
66054
- id: string;
66055
- source: {
66056
- spanIds: string[];
66057
- adapter: string;
66058
- confidence: "high" | "medium" | "low";
66059
- parentSpanIds: string[];
66060
- attributeKeys: string[];
66061
- };
66062
- order: number;
66063
- startMs: number | null;
66064
- endMs: number | null;
66065
- content: ({
66066
- type: "text";
66067
- text: string;
66068
- annotations?: {
66069
- type: "event" | "url" | "file" | "user" | "signal";
66070
- text?: string | undefined;
66071
- url?: string | undefined;
66072
- id?: string | undefined;
66073
- startIndex?: number | undefined;
66074
- endIndex?: number | undefined;
66075
- }[] | undefined;
66076
- } | {
66077
- type: "json";
66078
- raw: string | null;
66079
- value?: unknown;
66080
- } | {
66081
- type: "image" | "file";
66082
- name?: string | undefined;
66083
- url?: string | undefined;
66084
- mimeType?: string | undefined;
66085
- fileId?: string | undefined;
66086
- } | {
66087
- type: "reference";
66088
- label: string;
66089
- refType: "stored_tool_result" | "external";
66090
- href?: string | undefined;
66091
- metadata?: Record<string, unknown> | undefined;
66092
- })[];
66093
- format: "text" | "markdown";
66094
- final: boolean;
66095
- } | {
66096
- type: "reasoning";
66097
- id: string;
66098
- source: {
66099
- spanIds: string[];
66100
- adapter: string;
66101
- confidence: "high" | "medium" | "low";
66102
- parentSpanIds: string[];
66103
- attributeKeys: string[];
66104
- };
66105
- order: number;
66106
- startMs: number | null;
66107
- endMs: number | null;
66108
- content: {
66109
- type: "text";
66110
- text: string;
66111
- annotations?: {
66112
- type: "event" | "url" | "file" | "user" | "signal";
66113
- text?: string | undefined;
66114
- url?: string | undefined;
66115
- id?: string | undefined;
66116
- startIndex?: number | undefined;
66117
- endIndex?: number | undefined;
66118
- }[] | undefined;
66119
- };
66120
- format: "text";
66121
- visibility: "collapsed" | "expanded";
66122
- capturedAs: "unknown" | "provider_reasoning" | "reasoning_summary" | "thinking";
66123
- } | {
66124
- type: "tool_call";
66125
- status: "pending" | "unknown" | "error" | "completed";
66126
- input: {
66127
- raw: string | null;
66128
- kind: "text" | "json" | "reference" | "empty";
66129
- truncated: boolean;
66130
- sizeChars: number | null;
66131
- };
66132
- output: {
66133
- raw: string | null;
66134
- kind: "text" | "json" | "reference" | "empty";
66135
- truncated: boolean;
66136
- sizeChars: number | null;
66137
- } | null;
66138
- name: string;
66139
- durationMs: number | null;
66140
- id: string;
66141
- error: {
66142
- raw: string | null;
66143
- kind: "text" | "json" | "reference" | "empty";
66144
- truncated: boolean;
66145
- sizeChars: number | null;
66146
- } | null;
66147
- source: {
66148
- spanIds: string[];
66149
- adapter: string;
66150
- confidence: "high" | "medium" | "low";
66151
- parentSpanIds: string[];
66152
- attributeKeys: string[];
66153
- };
66154
- order: number;
66155
- startMs: number | null;
66156
- endMs: number | null;
66157
- callId: string | null;
66158
- } | {
66159
- type: "sub_agent";
66160
- status: "unknown" | "error" | "ok";
66161
- model: string | null;
66162
- name: string;
66163
- durationMs: number | null;
66164
- id: string;
66165
- spanIds: string[];
66166
- source: {
66167
- spanIds: string[];
66168
- adapter: string;
66169
- confidence: "high" | "medium" | "low";
66170
- parentSpanIds: string[];
66171
- attributeKeys: string[];
66172
- };
66173
- order: number;
66174
- startMs: number | null;
66175
- endMs: number | null;
66176
- rootSpanId: string;
66177
- toolCount: number;
66178
- llmCount: number;
66179
- inputPreview: string | null;
66180
- outputPreview: string | null;
66181
- totalInputTokens: number | null;
66182
- totalOutputTokens: number | null;
66183
- } | {
66184
- type: "detached_sub_agent";
66185
- status: "unknown" | "error" | "ok";
66186
- name: string;
66187
- durationMs: number | null;
66188
- id: string;
66189
- source: {
66190
- spanIds: string[];
66191
- adapter: string;
66192
- confidence: "high" | "medium" | "low";
66193
- parentSpanIds: string[];
66194
- attributeKeys: string[];
66195
- };
66196
- order: number;
66197
- startMs: number | null;
66198
- endMs: number | null;
66199
- rootSpanId: string;
66200
- inputPreview: string | null;
66201
- outputPreview: string | null;
66202
- childEventId: string;
66203
- } | {
66204
- type: "agent_handoff";
66205
- reason: string | null;
66206
- id: string;
66207
- source: {
66208
- spanIds: string[];
66209
- adapter: string;
66210
- confidence: "high" | "medium" | "low";
66211
- parentSpanIds: string[];
66212
- attributeKeys: string[];
66213
- };
66214
- order: number;
66215
- startMs: number | null;
66216
- endMs: number | null;
66217
- fromAgent: string;
66218
- toAgent: string;
66219
- } | {
66220
- type: "unknown_span";
66221
- name: string;
66222
- id: string;
66223
- source: {
66224
- spanIds: string[];
66225
- adapter: string;
66226
- confidence: "high" | "medium" | "low";
66227
- parentSpanIds: string[];
66228
- attributeKeys: string[];
66229
- };
66230
- order: number;
66231
- startMs: number | null;
66232
- endMs: number | null;
66233
- spanType: string | null;
66234
- hiddenByDefault: true;
66235
- })[];
66236
- origin: "replay" | "dataset";
66237
- caseContext?: {
66238
- caseId: string;
66239
- expectation?: {
66240
- description: string;
66241
- reference?: string | undefined;
66242
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
66243
- } | undefined;
66244
- } | undefined;
66217
+ spans: {
66218
+ timestamp: string;
66219
+ provider: string;
66220
+ status: "UNSET" | "OK" | "ERROR";
66221
+ model: string;
66222
+ event_id: string;
66223
+ user_id: string;
66224
+ convo_id: string;
66225
+ trace_id: string;
66226
+ span_id: string;
66227
+ span_type: "INTERNAL" | "LLM_GENERATION" | "LLM_GENERATION_STREAM" | "TOOL_CALL";
66228
+ span_name: string;
66229
+ output_payload: string;
66230
+ project_id: string;
66231
+ custom_event_id: string;
66232
+ parent_span_id: string;
66233
+ input_payload: string;
66234
+ start_unix_ns: string;
66235
+ end_unix_ns: string;
66236
+ duration_ns: string;
66237
+ input_tokens: number;
66238
+ output_tokens: number;
66239
+ attributes_string: Record<string, string>;
66240
+ attributes_num: Record<string, number>;
66241
+ org_public_id: string;
66242
+ end_timestamp: string;
66243
+ _inserted_at: string;
66244
+ }[];
66245
66245
  };
66246
66246
  };
66247
66247
  output?: JsonValue | undefined;
66248
- rowMetadata?: Record<string, string> | undefined;
66249
66248
  reference?: {
66250
66249
  trace: {
66251
66250
  event: {
@@ -67280,6 +67279,7 @@ declare const EvalCaseTracePairSchema: z.ZodObject<{
67280
67279
  }[];
67281
67280
  } | undefined;
67282
67281
  } | undefined;
67282
+ rowMetadata?: Record<string, string> | undefined;
67283
67283
  }>;
67284
67284
  type EvalCaseTracePair = z.infer<typeof EvalCaseTracePairSchema>;
67285
67285
 
@@ -73095,11 +73095,6 @@ declare const EvalDatasetRowInputSchema: z.ZodObject<{
73095
73095
  name: string;
73096
73096
  id: string;
73097
73097
  output?: JsonValue | undefined;
73098
- expectation?: {
73099
- description: string;
73100
- reference?: string | undefined;
73101
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
73102
- } | undefined;
73103
73098
  referenceTrace?: {
73104
73099
  event: {
73105
73100
  properties: Record<string, unknown> | null;
@@ -73503,6 +73498,11 @@ declare const EvalDatasetRowInputSchema: z.ZodObject<{
73503
73498
  sourceEventId: string;
73504
73499
  sourceEventTimestamp?: string | undefined;
73505
73500
  } | undefined;
73501
+ expectation?: {
73502
+ description: string;
73503
+ reference?: string | undefined;
73504
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
73505
+ } | undefined;
73506
73506
  expectedVerdict?: {
73507
73507
  pass: boolean;
73508
73508
  } | {
@@ -73516,11 +73516,6 @@ declare const EvalDatasetRowInputSchema: z.ZodObject<{
73516
73516
  name: string;
73517
73517
  id: string;
73518
73518
  output?: JsonValue | undefined;
73519
- expectation?: {
73520
- description: string;
73521
- reference?: string | undefined;
73522
- basis?: "code" | "human" | "policy" | "inferred" | undefined;
73523
- } | undefined;
73524
73519
  referenceTrace?: {
73525
73520
  event: {
73526
73521
  properties: Record<string, unknown> | null;
@@ -73924,6 +73919,11 @@ declare const EvalDatasetRowInputSchema: z.ZodObject<{
73924
73919
  sourceEventId: string;
73925
73920
  sourceEventTimestamp?: string | undefined;
73926
73921
  } | undefined;
73922
+ expectation?: {
73923
+ description: string;
73924
+ reference?: string | undefined;
73925
+ basis?: "code" | "human" | "policy" | "inferred" | undefined;
73926
+ } | undefined;
73927
73927
  expectedVerdict?: {
73928
73928
  pass: boolean;
73929
73929
  } | {
@@ -74608,7 +74608,9 @@ interface AnalyticsConfig {
74608
74608
  appGit?: AppGitOptions | false;
74609
74609
  wizardSession?: string;
74610
74610
  /**
74611
- * Raindrop write key. When omitted (or empty), the SDK runs in local-only mode:
74611
+ * Raindrop write key (`writeKey`). No key yet? Agents can create one now, without a browser: run `npx -y create-raindrop --org-name '<project name>'` and give the user the claim link. Steps: https://www.raindrop.ai/auth.md
74612
+ *
74613
+ * When omitted (or empty), the SDK runs in local-only mode:
74612
74614
  * cloud requests are skipped and only the Workshop / local-debugger mirror fires
74613
74615
  * (when `localWorkshopUrl` resolves to a URL). Useful for local development where
74614
74616
  * you only want events to land in Workshop without provisioning a write key.