@langwatch/scenario 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -521,6 +521,22 @@ interface JudgeAgentConfig extends TestingAgentConfig {
521
521
  * Optional span collector for telemetry. Defaults to global singleton.
522
522
  */
523
523
  spanCollector?: JudgeSpanCollector;
524
+ /**
525
+ * Token threshold for switching to structure-only trace rendering.
526
+ * When the full trace digest exceeds this estimated token count,
527
+ * the judge receives a structure-only view with expand_trace and
528
+ * grep_trace tools for progressive discovery.
529
+ *
530
+ * @default 8192
531
+ */
532
+ tokenThreshold?: number;
533
+ /**
534
+ * Maximum number of tool-calling steps for progressive trace discovery.
535
+ * Only applies when the trace exceeds the token threshold.
536
+ *
537
+ * @default 10
538
+ */
539
+ maxDiscoverySteps?: number;
524
540
  }
525
541
  /**
526
542
  * Agent that evaluates conversations against success criteria.
@@ -535,6 +551,8 @@ declare class JudgeAgent extends JudgeAgentAdapter {
535
551
  private readonly cfg;
536
552
  private logger;
537
553
  private readonly spanCollector;
554
+ private readonly tokenThreshold;
555
+ private readonly maxDiscoverySteps;
538
556
  role: AgentRole;
539
557
  criteria: string[];
540
558
  /**
@@ -543,7 +561,19 @@ declare class JudgeAgent extends JudgeAgentAdapter {
543
561
  invokeLLM: (params: InvokeLLMParams) => Promise<InvokeLLMResult>;
544
562
  constructor(cfg: JudgeAgentConfig);
545
563
  call(input: AgentInput): Promise<JudgeResult | null>;
546
- private getOpenTelemetryTracesDigest;
564
+ /**
565
+ * Builds the trace digest, choosing between full inline rendering
566
+ * and structure-only mode based on estimated token count.
567
+ */
568
+ private buildTraceDigest;
569
+ /**
570
+ * Invokes the LLM, enabling multi-step tool execution for large traces.
571
+ * In multi-step mode, the AI SDK loops automatically: the judge can call
572
+ * expand_trace/grep_trace tools multiple times before reaching a terminal
573
+ * tool (finish_test/continue_test) or hitting the step limit.
574
+ */
575
+ private invokeLLMWithDiscovery;
576
+ private parseToolCalls;
547
577
  }
548
578
  /**
549
579
  * Factory function for creating JudgeAgent instances.
@@ -604,6 +634,15 @@ declare const judgeAgent: (cfg?: JudgeAgentConfig) => JudgeAgent;
604
634
  declare class JudgeSpanDigestFormatter {
605
635
  private readonly logger;
606
636
  private readonly deduplicator;
637
+ /**
638
+ * Formats spans into a structure-only digest showing span tree hierarchy
639
+ * without attributes, events, or content. Used for large traces that
640
+ * exceed the token threshold, paired with expand_trace/grep_trace tools.
641
+ *
642
+ * @param spans - All spans for a thread
643
+ * @returns Plain text digest with only structural information
644
+ */
645
+ formatStructureOnly(spans: ReadableSpan[]): string;
607
646
  /**
608
647
  * Formats spans into a complete digest with full content and nesting.
609
648
  * @param spans - All spans for a thread
@@ -612,20 +651,18 @@ declare class JudgeSpanDigestFormatter {
612
651
  format(spans: ReadableSpan[]): string;
613
652
  private sortByStartTime;
614
653
  private buildHierarchy;
654
+ private renderStructureNode;
615
655
  private renderNode;
616
656
  private getTreePrefix;
617
657
  private getAttrIndent;
618
- private cleanAttributes;
619
- private formatValue;
620
- private transformValue;
621
- private transformString;
622
- private looksLikeJson;
623
- private hrTimeToMs;
624
- private calculateSpanDuration;
658
+ /**
659
+ * Formats a value with deduplication applied. Used by the `format()` method
660
+ * to reduce token usage by replacing repeated strings with markers.
661
+ */
662
+ private formatValueWithDedup;
663
+ private transformValueWithDedup;
664
+ private transformStringWithDedup;
625
665
  private calculateTotalDuration;
626
- private formatDuration;
627
- private formatTimestamp;
628
- private getStatusIndicator;
629
666
  private collectErrors;
630
667
  }
631
668
  /**
@@ -633,6 +670,45 @@ declare class JudgeSpanDigestFormatter {
633
670
  */
634
671
  declare const judgeSpanDigestFormatter: JudgeSpanDigestFormatter;
635
672
 
673
+ /**
674
+ * Default token threshold for switching to structure-only trace rendering.
675
+ * Traces exceeding this estimated token count will be rendered in
676
+ * structure-only mode with expand/grep tools available to the judge.
677
+ *
678
+ */
679
+ declare const DEFAULT_TOKEN_THRESHOLD = 8192;
680
+ /**
681
+ * Estimates the number of tokens in a text string using a byte-based heuristic.
682
+ * Uses UTF-8 byte length divided by 4, which accounts for multi-byte characters
683
+ * (emojis, CJK, etc.) that typically consume more tokens than ASCII text.
684
+ *
685
+ * @param text - The text to estimate token count for
686
+ * @returns Estimated token count
687
+ */
688
+ declare function estimateTokens(text: string): number;
689
+
690
+ /**
691
+ * Expands one or more spans from a trace, returning their full details
692
+ * (attributes, events, status) with tree position context.
693
+ *
694
+ * @param spans - The full array of ReadableSpan objects for the trace
695
+ * @param options - Either a single `index` or a `range` string like "10-15"
696
+ * @returns Formatted string with full span details, truncated to ~4000 tokens
697
+ */
698
+ declare function expandTrace(spans: ReadableSpan[], { index, range }: {
699
+ index?: number;
700
+ range?: string;
701
+ }): string;
702
+ /**
703
+ * Searches across all span attributes, events, and content for a pattern.
704
+ * Returns matching spans with their tree position and matching content.
705
+ *
706
+ * @param spans - The full array of ReadableSpan objects for the trace
707
+ * @param pattern - Case-insensitive search pattern
708
+ * @returns Formatted string with matches, limited to 20 results and ~4000 tokens
709
+ */
710
+ declare function grepTrace(spans: ReadableSpan[], pattern: string): string;
711
+
636
712
  declare class UserSimulatorAgent extends UserSimulatorAgentAdapter {
637
713
  private readonly cfg?;
638
714
  private logger;
@@ -881,6 +957,7 @@ declare class RealtimeAgentAdapter extends AgentAdapter {
881
957
  }
882
958
 
883
959
  type agents_AudioResponseEvent = AudioResponseEvent;
960
+ declare const agents_DEFAULT_TOKEN_THRESHOLD: typeof DEFAULT_TOKEN_THRESHOLD;
884
961
  type agents_FinishTestArgs = FinishTestArgs;
885
962
  type agents_InvokeLLMParams = InvokeLLMParams;
886
963
  type agents_InvokeLLMResult = InvokeLLMResult;
@@ -894,12 +971,15 @@ type agents_RealtimeAgentAdapter = RealtimeAgentAdapter;
894
971
  declare const agents_RealtimeAgentAdapter: typeof RealtimeAgentAdapter;
895
972
  type agents_RealtimeAgentAdapterConfig = RealtimeAgentAdapterConfig;
896
973
  type agents_TestingAgentConfig = TestingAgentConfig;
974
+ declare const agents_estimateTokens: typeof estimateTokens;
975
+ declare const agents_expandTrace: typeof expandTrace;
976
+ declare const agents_grepTrace: typeof grepTrace;
897
977
  declare const agents_judgeAgent: typeof judgeAgent;
898
978
  declare const agents_judgeSpanCollector: typeof judgeSpanCollector;
899
979
  declare const agents_judgeSpanDigestFormatter: typeof judgeSpanDigestFormatter;
900
980
  declare const agents_userSimulatorAgent: typeof userSimulatorAgent;
901
981
  declare namespace agents {
902
- export { type agents_AudioResponseEvent as AudioResponseEvent, type agents_FinishTestArgs as FinishTestArgs, type agents_InvokeLLMParams as InvokeLLMParams, type agents_InvokeLLMResult as InvokeLLMResult, type agents_JudgeAgentConfig as JudgeAgentConfig, type agents_JudgeResult as JudgeResult, agents_JudgeSpanCollector as JudgeSpanCollector, agents_JudgeSpanDigestFormatter as JudgeSpanDigestFormatter, agents_RealtimeAgentAdapter as RealtimeAgentAdapter, type agents_RealtimeAgentAdapterConfig as RealtimeAgentAdapterConfig, type agents_TestingAgentConfig as TestingAgentConfig, agents_judgeAgent as judgeAgent, agents_judgeSpanCollector as judgeSpanCollector, agents_judgeSpanDigestFormatter as judgeSpanDigestFormatter, agents_userSimulatorAgent as userSimulatorAgent };
982
+ export { type agents_AudioResponseEvent as AudioResponseEvent, agents_DEFAULT_TOKEN_THRESHOLD as DEFAULT_TOKEN_THRESHOLD, type agents_FinishTestArgs as FinishTestArgs, type agents_InvokeLLMParams as InvokeLLMParams, type agents_InvokeLLMResult as InvokeLLMResult, type agents_JudgeAgentConfig as JudgeAgentConfig, type agents_JudgeResult as JudgeResult, agents_JudgeSpanCollector as JudgeSpanCollector, agents_JudgeSpanDigestFormatter as JudgeSpanDigestFormatter, agents_RealtimeAgentAdapter as RealtimeAgentAdapter, type agents_RealtimeAgentAdapterConfig as RealtimeAgentAdapterConfig, type agents_TestingAgentConfig as TestingAgentConfig, agents_estimateTokens as estimateTokens, agents_expandTrace as expandTrace, agents_grepTrace as grepTrace, agents_judgeAgent as judgeAgent, agents_judgeSpanCollector as judgeSpanCollector, agents_judgeSpanDigestFormatter as judgeSpanDigestFormatter, agents_userSimulatorAgent as userSimulatorAgent };
903
983
  }
904
984
 
905
985
  /**
@@ -2227,4 +2307,4 @@ declare function withCustomScopes(...scopes: string[]): TraceFilter[];
2227
2307
  type ScenarioApi = typeof agents & typeof domain & typeof execution & typeof runner & typeof script;
2228
2308
  declare const scenario: ScenarioApi;
2229
2309
 
2230
- export { AgentAdapter, type AgentInput, type AgentReturnTypes, AgentRole, type AudioResponseEvent, DEFAULT_MAX_TURNS, DEFAULT_VERBOSE, type FinishTestArgs, type InvokeLLMParams, type InvokeLLMResult, JudgeAgentAdapter, type JudgeAgentConfig, type JudgeResult, JudgeSpanCollector, JudgeSpanDigestFormatter, type JudgmentRequest, type LangwatchConfig, RealtimeAgentAdapter, type RealtimeAgentAdapterConfig, type RunOptions, type ScenarioConfig, type ScenarioConfigFinal, ScenarioExecution, type ScenarioExecutionLike, ScenarioExecutionState, type ScenarioExecutionStateLike, type ScenarioProjectConfig, type ScenarioResult, type ScriptStep, type StateChangeEvent, StateChangeEventType, type TestingAgentConfig, UserSimulatorAgentAdapter, agent, allAgentRoles, scenario as default, defineConfig, fail, judge, judgeAgent, judgeSpanCollector, judgeSpanDigestFormatter, message, proceed, run, scenario, scenarioOnly, scenarioProjectConfigSchema, setupScenarioTracing, succeed, user, userSimulatorAgent, withCustomScopes };
2310
+ export { AgentAdapter, type AgentInput, type AgentReturnTypes, AgentRole, type AudioResponseEvent, DEFAULT_MAX_TURNS, DEFAULT_TOKEN_THRESHOLD, DEFAULT_VERBOSE, type FinishTestArgs, type InvokeLLMParams, type InvokeLLMResult, JudgeAgentAdapter, type JudgeAgentConfig, type JudgeResult, JudgeSpanCollector, JudgeSpanDigestFormatter, type JudgmentRequest, type LangwatchConfig, RealtimeAgentAdapter, type RealtimeAgentAdapterConfig, type RunOptions, type ScenarioConfig, type ScenarioConfigFinal, ScenarioExecution, type ScenarioExecutionLike, ScenarioExecutionState, type ScenarioExecutionStateLike, type ScenarioProjectConfig, type ScenarioResult, type ScriptStep, type StateChangeEvent, StateChangeEventType, type TestingAgentConfig, UserSimulatorAgentAdapter, agent, allAgentRoles, scenario as default, defineConfig, estimateTokens, expandTrace, fail, grepTrace, judge, judgeAgent, judgeSpanCollector, judgeSpanDigestFormatter, message, proceed, run, scenario, scenarioOnly, scenarioProjectConfigSchema, setupScenarioTracing, succeed, user, userSimulatorAgent, withCustomScopes };
package/dist/index.d.ts CHANGED
@@ -521,6 +521,22 @@ interface JudgeAgentConfig extends TestingAgentConfig {
521
521
  * Optional span collector for telemetry. Defaults to global singleton.
522
522
  */
523
523
  spanCollector?: JudgeSpanCollector;
524
+ /**
525
+ * Token threshold for switching to structure-only trace rendering.
526
+ * When the full trace digest exceeds this estimated token count,
527
+ * the judge receives a structure-only view with expand_trace and
528
+ * grep_trace tools for progressive discovery.
529
+ *
530
+ * @default 8192
531
+ */
532
+ tokenThreshold?: number;
533
+ /**
534
+ * Maximum number of tool-calling steps for progressive trace discovery.
535
+ * Only applies when the trace exceeds the token threshold.
536
+ *
537
+ * @default 10
538
+ */
539
+ maxDiscoverySteps?: number;
524
540
  }
525
541
  /**
526
542
  * Agent that evaluates conversations against success criteria.
@@ -535,6 +551,8 @@ declare class JudgeAgent extends JudgeAgentAdapter {
535
551
  private readonly cfg;
536
552
  private logger;
537
553
  private readonly spanCollector;
554
+ private readonly tokenThreshold;
555
+ private readonly maxDiscoverySteps;
538
556
  role: AgentRole;
539
557
  criteria: string[];
540
558
  /**
@@ -543,7 +561,19 @@ declare class JudgeAgent extends JudgeAgentAdapter {
543
561
  invokeLLM: (params: InvokeLLMParams) => Promise<InvokeLLMResult>;
544
562
  constructor(cfg: JudgeAgentConfig);
545
563
  call(input: AgentInput): Promise<JudgeResult | null>;
546
- private getOpenTelemetryTracesDigest;
564
+ /**
565
+ * Builds the trace digest, choosing between full inline rendering
566
+ * and structure-only mode based on estimated token count.
567
+ */
568
+ private buildTraceDigest;
569
+ /**
570
+ * Invokes the LLM, enabling multi-step tool execution for large traces.
571
+ * In multi-step mode, the AI SDK loops automatically: the judge can call
572
+ * expand_trace/grep_trace tools multiple times before reaching a terminal
573
+ * tool (finish_test/continue_test) or hitting the step limit.
574
+ */
575
+ private invokeLLMWithDiscovery;
576
+ private parseToolCalls;
547
577
  }
548
578
  /**
549
579
  * Factory function for creating JudgeAgent instances.
@@ -604,6 +634,15 @@ declare const judgeAgent: (cfg?: JudgeAgentConfig) => JudgeAgent;
604
634
  declare class JudgeSpanDigestFormatter {
605
635
  private readonly logger;
606
636
  private readonly deduplicator;
637
+ /**
638
+ * Formats spans into a structure-only digest showing span tree hierarchy
639
+ * without attributes, events, or content. Used for large traces that
640
+ * exceed the token threshold, paired with expand_trace/grep_trace tools.
641
+ *
642
+ * @param spans - All spans for a thread
643
+ * @returns Plain text digest with only structural information
644
+ */
645
+ formatStructureOnly(spans: ReadableSpan[]): string;
607
646
  /**
608
647
  * Formats spans into a complete digest with full content and nesting.
609
648
  * @param spans - All spans for a thread
@@ -612,20 +651,18 @@ declare class JudgeSpanDigestFormatter {
612
651
  format(spans: ReadableSpan[]): string;
613
652
  private sortByStartTime;
614
653
  private buildHierarchy;
654
+ private renderStructureNode;
615
655
  private renderNode;
616
656
  private getTreePrefix;
617
657
  private getAttrIndent;
618
- private cleanAttributes;
619
- private formatValue;
620
- private transformValue;
621
- private transformString;
622
- private looksLikeJson;
623
- private hrTimeToMs;
624
- private calculateSpanDuration;
658
+ /**
659
+ * Formats a value with deduplication applied. Used by the `format()` method
660
+ * to reduce token usage by replacing repeated strings with markers.
661
+ */
662
+ private formatValueWithDedup;
663
+ private transformValueWithDedup;
664
+ private transformStringWithDedup;
625
665
  private calculateTotalDuration;
626
- private formatDuration;
627
- private formatTimestamp;
628
- private getStatusIndicator;
629
666
  private collectErrors;
630
667
  }
631
668
  /**
@@ -633,6 +670,45 @@ declare class JudgeSpanDigestFormatter {
633
670
  */
634
671
  declare const judgeSpanDigestFormatter: JudgeSpanDigestFormatter;
635
672
 
673
+ /**
674
+ * Default token threshold for switching to structure-only trace rendering.
675
+ * Traces exceeding this estimated token count will be rendered in
676
+ * structure-only mode with expand/grep tools available to the judge.
677
+ *
678
+ */
679
+ declare const DEFAULT_TOKEN_THRESHOLD = 8192;
680
+ /**
681
+ * Estimates the number of tokens in a text string using a byte-based heuristic.
682
+ * Uses UTF-8 byte length divided by 4, which accounts for multi-byte characters
683
+ * (emojis, CJK, etc.) that typically consume more tokens than ASCII text.
684
+ *
685
+ * @param text - The text to estimate token count for
686
+ * @returns Estimated token count
687
+ */
688
+ declare function estimateTokens(text: string): number;
689
+
690
+ /**
691
+ * Expands one or more spans from a trace, returning their full details
692
+ * (attributes, events, status) with tree position context.
693
+ *
694
+ * @param spans - The full array of ReadableSpan objects for the trace
695
+ * @param options - Either a single `index` or a `range` string like "10-15"
696
+ * @returns Formatted string with full span details, truncated to ~4000 tokens
697
+ */
698
+ declare function expandTrace(spans: ReadableSpan[], { index, range }: {
699
+ index?: number;
700
+ range?: string;
701
+ }): string;
702
+ /**
703
+ * Searches across all span attributes, events, and content for a pattern.
704
+ * Returns matching spans with their tree position and matching content.
705
+ *
706
+ * @param spans - The full array of ReadableSpan objects for the trace
707
+ * @param pattern - Case-insensitive search pattern
708
+ * @returns Formatted string with matches, limited to 20 results and ~4000 tokens
709
+ */
710
+ declare function grepTrace(spans: ReadableSpan[], pattern: string): string;
711
+
636
712
  declare class UserSimulatorAgent extends UserSimulatorAgentAdapter {
637
713
  private readonly cfg?;
638
714
  private logger;
@@ -881,6 +957,7 @@ declare class RealtimeAgentAdapter extends AgentAdapter {
881
957
  }
882
958
 
883
959
  type agents_AudioResponseEvent = AudioResponseEvent;
960
+ declare const agents_DEFAULT_TOKEN_THRESHOLD: typeof DEFAULT_TOKEN_THRESHOLD;
884
961
  type agents_FinishTestArgs = FinishTestArgs;
885
962
  type agents_InvokeLLMParams = InvokeLLMParams;
886
963
  type agents_InvokeLLMResult = InvokeLLMResult;
@@ -894,12 +971,15 @@ type agents_RealtimeAgentAdapter = RealtimeAgentAdapter;
894
971
  declare const agents_RealtimeAgentAdapter: typeof RealtimeAgentAdapter;
895
972
  type agents_RealtimeAgentAdapterConfig = RealtimeAgentAdapterConfig;
896
973
  type agents_TestingAgentConfig = TestingAgentConfig;
974
+ declare const agents_estimateTokens: typeof estimateTokens;
975
+ declare const agents_expandTrace: typeof expandTrace;
976
+ declare const agents_grepTrace: typeof grepTrace;
897
977
  declare const agents_judgeAgent: typeof judgeAgent;
898
978
  declare const agents_judgeSpanCollector: typeof judgeSpanCollector;
899
979
  declare const agents_judgeSpanDigestFormatter: typeof judgeSpanDigestFormatter;
900
980
  declare const agents_userSimulatorAgent: typeof userSimulatorAgent;
901
981
  declare namespace agents {
902
- export { type agents_AudioResponseEvent as AudioResponseEvent, type agents_FinishTestArgs as FinishTestArgs, type agents_InvokeLLMParams as InvokeLLMParams, type agents_InvokeLLMResult as InvokeLLMResult, type agents_JudgeAgentConfig as JudgeAgentConfig, type agents_JudgeResult as JudgeResult, agents_JudgeSpanCollector as JudgeSpanCollector, agents_JudgeSpanDigestFormatter as JudgeSpanDigestFormatter, agents_RealtimeAgentAdapter as RealtimeAgentAdapter, type agents_RealtimeAgentAdapterConfig as RealtimeAgentAdapterConfig, type agents_TestingAgentConfig as TestingAgentConfig, agents_judgeAgent as judgeAgent, agents_judgeSpanCollector as judgeSpanCollector, agents_judgeSpanDigestFormatter as judgeSpanDigestFormatter, agents_userSimulatorAgent as userSimulatorAgent };
982
+ export { type agents_AudioResponseEvent as AudioResponseEvent, agents_DEFAULT_TOKEN_THRESHOLD as DEFAULT_TOKEN_THRESHOLD, type agents_FinishTestArgs as FinishTestArgs, type agents_InvokeLLMParams as InvokeLLMParams, type agents_InvokeLLMResult as InvokeLLMResult, type agents_JudgeAgentConfig as JudgeAgentConfig, type agents_JudgeResult as JudgeResult, agents_JudgeSpanCollector as JudgeSpanCollector, agents_JudgeSpanDigestFormatter as JudgeSpanDigestFormatter, agents_RealtimeAgentAdapter as RealtimeAgentAdapter, type agents_RealtimeAgentAdapterConfig as RealtimeAgentAdapterConfig, type agents_TestingAgentConfig as TestingAgentConfig, agents_estimateTokens as estimateTokens, agents_expandTrace as expandTrace, agents_grepTrace as grepTrace, agents_judgeAgent as judgeAgent, agents_judgeSpanCollector as judgeSpanCollector, agents_judgeSpanDigestFormatter as judgeSpanDigestFormatter, agents_userSimulatorAgent as userSimulatorAgent };
903
983
  }
904
984
 
905
985
  /**
@@ -2227,4 +2307,4 @@ declare function withCustomScopes(...scopes: string[]): TraceFilter[];
2227
2307
  type ScenarioApi = typeof agents & typeof domain & typeof execution & typeof runner & typeof script;
2228
2308
  declare const scenario: ScenarioApi;
2229
2309
 
2230
- export { AgentAdapter, type AgentInput, type AgentReturnTypes, AgentRole, type AudioResponseEvent, DEFAULT_MAX_TURNS, DEFAULT_VERBOSE, type FinishTestArgs, type InvokeLLMParams, type InvokeLLMResult, JudgeAgentAdapter, type JudgeAgentConfig, type JudgeResult, JudgeSpanCollector, JudgeSpanDigestFormatter, type JudgmentRequest, type LangwatchConfig, RealtimeAgentAdapter, type RealtimeAgentAdapterConfig, type RunOptions, type ScenarioConfig, type ScenarioConfigFinal, ScenarioExecution, type ScenarioExecutionLike, ScenarioExecutionState, type ScenarioExecutionStateLike, type ScenarioProjectConfig, type ScenarioResult, type ScriptStep, type StateChangeEvent, StateChangeEventType, type TestingAgentConfig, UserSimulatorAgentAdapter, agent, allAgentRoles, scenario as default, defineConfig, fail, judge, judgeAgent, judgeSpanCollector, judgeSpanDigestFormatter, message, proceed, run, scenario, scenarioOnly, scenarioProjectConfigSchema, setupScenarioTracing, succeed, user, userSimulatorAgent, withCustomScopes };
2310
+ export { AgentAdapter, type AgentInput, type AgentReturnTypes, AgentRole, type AudioResponseEvent, DEFAULT_MAX_TURNS, DEFAULT_TOKEN_THRESHOLD, DEFAULT_VERBOSE, type FinishTestArgs, type InvokeLLMParams, type InvokeLLMResult, JudgeAgentAdapter, type JudgeAgentConfig, type JudgeResult, JudgeSpanCollector, JudgeSpanDigestFormatter, type JudgmentRequest, type LangwatchConfig, RealtimeAgentAdapter, type RealtimeAgentAdapterConfig, type RunOptions, type ScenarioConfig, type ScenarioConfigFinal, ScenarioExecution, type ScenarioExecutionLike, ScenarioExecutionState, type ScenarioExecutionStateLike, type ScenarioProjectConfig, type ScenarioResult, type ScriptStep, type StateChangeEvent, StateChangeEventType, type TestingAgentConfig, UserSimulatorAgentAdapter, agent, allAgentRoles, scenario as default, defineConfig, estimateTokens, expandTrace, fail, grepTrace, judge, judgeAgent, judgeSpanCollector, judgeSpanDigestFormatter, message, proceed, run, scenario, scenarioOnly, scenarioProjectConfigSchema, setupScenarioTracing, succeed, user, userSimulatorAgent, withCustomScopes };