@fonoster/types 0.17.1 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,9 +73,25 @@ type EvaluateIntelligenceRequest = {
73
73
  config: Record<string, unknown>;
74
74
  };
75
75
  };
76
- type EvaluateIntelligenceResponse = {
77
- results: ScenarioEvaluationReport[];
76
+ /** Streaming event: one step result for a scenario */
77
+ type StepEvaluationResultEvent = {
78
+ type: "stepResult";
79
+ scenarioRef: string;
80
+ stepResult: StepEvaluationReport;
81
+ };
82
+ /** Streaming event: scenario completed summary */
83
+ type ScenarioSummaryEvent = {
84
+ type: "scenarioSummary";
85
+ scenarioRef: string;
86
+ overallPassed: boolean;
87
+ };
88
+ /** Streaming event: eval error */
89
+ type EvalErrorEvent = {
90
+ type: "evalError";
91
+ message: string;
78
92
  };
93
+ /** Single event in the EvaluateIntelligence server stream */
94
+ type EvaluateIntelligenceEvent = StepEvaluationResultEvent | ScenarioSummaryEvent | EvalErrorEvent;
79
95
  type ScenarioEvaluationReport = {
80
96
  scenarioRef: string;
81
97
  overallPassed: boolean;
@@ -106,4 +122,4 @@ type CreateTestTokenResponse = {
106
122
  username: string;
107
123
  token: string;
108
124
  };
109
- export { Application, ApplicationType, CreateApplicationRequest, CreateTestTokenResponse, ListApplicationsRequest, ListApplicationsResponse, UpdateApplicationRequest, EvaluateIntelligenceRequest, EvaluateIntelligenceResponse, ScenarioEvaluationReport, StepEvaluationReport, ToolEvaluationReport, ExpectedTextType };
125
+ export { Application, ApplicationType, CreateApplicationRequest, CreateTestTokenResponse, ListApplicationsRequest, ListApplicationsResponse, UpdateApplicationRequest, EvaluateIntelligenceRequest, EvaluateIntelligenceEvent, ScenarioEvaluationReport, StepEvaluationReport, ToolEvaluationReport, ExpectedTextType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/types",
3
- "version": "0.17.1",
3
+ "version": "0.18.0",
4
4
  "description": "Common types for Fonoster projects",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/fonoster#readme",
@@ -29,5 +29,5 @@
29
29
  "bugs": {
30
30
  "url": "https://github.com/fonoster/fonoster/issues"
31
31
  },
32
- "gitHead": "404c745620283a15fd16b96e160c5fcd755e545e"
32
+ "gitHead": "051f172b266db965cf1d1366f563da995a29a93d"
33
33
  }