@coval/sdk 0.7.2 → 0.9.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.
Files changed (124) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +5 -0
  3. package/README.md +2 -2
  4. package/dist/CovalClient.d.ts +3 -2
  5. package/dist/CovalClient.d.ts.map +1 -1
  6. package/dist/CovalClient.js +4 -1
  7. package/dist/CovalClient.js.map +1 -1
  8. package/dist/generated/apis/PythonMetricsApi.d.ts +290 -0
  9. package/dist/generated/apis/PythonMetricsApi.d.ts.map +1 -0
  10. package/dist/generated/apis/PythonMetricsApi.js +291 -0
  11. package/dist/generated/apis/PythonMetricsApi.js.map +1 -0
  12. package/dist/generated/apis/SimulatedConversationsApi.d.ts +4 -4
  13. package/dist/generated/apis/SimulatedConversationsApi.js +2 -2
  14. package/dist/generated/apis/index.d.ts +1 -0
  15. package/dist/generated/apis/index.d.ts.map +1 -1
  16. package/dist/generated/apis/index.js +1 -0
  17. package/dist/generated/apis/index.js.map +1 -1
  18. package/dist/generated/models/CovalMetricsAPIMetricType.d.ts +2 -0
  19. package/dist/generated/models/CovalMetricsAPIMetricType.d.ts.map +1 -1
  20. package/dist/generated/models/CovalMetricsAPIMetricType.js +2 -0
  21. package/dist/generated/models/CovalMetricsAPIMetricType.js.map +1 -1
  22. package/dist/generated/models/CovalPersonasAPICreatePersonaRequest.d.ts +10 -1
  23. package/dist/generated/models/CovalPersonasAPICreatePersonaRequest.d.ts.map +1 -1
  24. package/dist/generated/models/CovalPersonasAPICreatePersonaRequest.js +2 -0
  25. package/dist/generated/models/CovalPersonasAPICreatePersonaRequest.js.map +1 -1
  26. package/dist/generated/models/CovalPersonasAPIPersonaResource.d.ts +9 -0
  27. package/dist/generated/models/CovalPersonasAPIPersonaResource.d.ts.map +1 -1
  28. package/dist/generated/models/CovalPersonasAPIPersonaResource.js +2 -0
  29. package/dist/generated/models/CovalPersonasAPIPersonaResource.js.map +1 -1
  30. package/dist/generated/models/CovalPersonasAPIUpdatePersonaRequest.d.ts +11 -1
  31. package/dist/generated/models/CovalPersonasAPIUpdatePersonaRequest.d.ts.map +1 -1
  32. package/dist/generated/models/CovalPersonasAPIUpdatePersonaRequest.js +2 -0
  33. package/dist/generated/models/CovalPersonasAPIUpdatePersonaRequest.js.map +1 -1
  34. package/dist/generated/models/CovalReviewsAPIReviewProjectResource.d.ts +1 -1
  35. package/dist/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.d.ts +1 -1
  36. package/dist/generated/models/CovalUploadedConversationsAPISubmitUploadedConversationRequest.d.ts +8 -2
  37. package/dist/generated/models/CovalUploadedConversationsAPISubmitUploadedConversationRequest.d.ts.map +1 -1
  38. package/dist/generated/models/CovalUploadedConversationsAPISubmitUploadedConversationRequest.js.map +1 -1
  39. package/dist/generated/models/CovalUploadedConversationsAPITranscriptMessage.d.ts +53 -0
  40. package/dist/generated/models/CovalUploadedConversationsAPITranscriptMessage.d.ts.map +1 -1
  41. package/dist/generated/models/CovalUploadedConversationsAPITranscriptMessage.js +17 -0
  42. package/dist/generated/models/CovalUploadedConversationsAPITranscriptMessage.js.map +1 -1
  43. package/dist/generated/models/CovalUploadedConversationsAPIUploadedConversationResource.d.ts +4 -1
  44. package/dist/generated/models/CovalUploadedConversationsAPIUploadedConversationResource.d.ts.map +1 -1
  45. package/dist/generated/models/CovalUploadedConversationsAPIUploadedConversationResource.js.map +1 -1
  46. package/dist/generated/models/PythonMetricsAPICreatePythonMetricDraftRequest.d.ts +84 -0
  47. package/dist/generated/models/PythonMetricsAPICreatePythonMetricDraftRequest.d.ts.map +1 -0
  48. package/dist/generated/models/PythonMetricsAPICreatePythonMetricDraftRequest.js +70 -0
  49. package/dist/generated/models/PythonMetricsAPICreatePythonMetricDraftRequest.js.map +1 -0
  50. package/dist/generated/models/PythonMetricsAPIInputRequirements.d.ts +45 -0
  51. package/dist/generated/models/PythonMetricsAPIInputRequirements.d.ts.map +1 -0
  52. package/dist/generated/models/PythonMetricsAPIInputRequirements.js +46 -0
  53. package/dist/generated/models/PythonMetricsAPIInputRequirements.js.map +1 -0
  54. package/dist/generated/models/PythonMetricsAPIPreviewPythonMetricBody.d.ts +33 -0
  55. package/dist/generated/models/PythonMetricsAPIPreviewPythonMetricBody.d.ts.map +1 -0
  56. package/dist/generated/models/PythonMetricsAPIPreviewPythonMetricBody.js +44 -0
  57. package/dist/generated/models/PythonMetricsAPIPreviewPythonMetricBody.js.map +1 -0
  58. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricBody.d.ts +39 -0
  59. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricBody.d.ts.map +1 -0
  60. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricBody.js +48 -0
  61. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricBody.js.map +1 -0
  62. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricResponse.d.ts +39 -0
  63. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricResponse.d.ts.map +1 -0
  64. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricResponse.js +48 -0
  65. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricResponse.js.map +1 -0
  66. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResource.d.ts +108 -0
  67. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResource.d.ts.map +1 -0
  68. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResource.js +92 -0
  69. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResource.js.map +1 -0
  70. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResponse.d.ts +34 -0
  71. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResponse.d.ts.map +1 -0
  72. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResponse.js +45 -0
  73. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResponse.js.map +1 -0
  74. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResource.d.ts +64 -0
  75. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResource.d.ts.map +1 -0
  76. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResource.js +59 -0
  77. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResource.js.map +1 -0
  78. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResourceValue.d.ts +27 -0
  79. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResourceValue.d.ts.map +1 -0
  80. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResourceValue.js +32 -0
  81. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResourceValue.js.map +1 -0
  82. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewsResponse.d.ts +34 -0
  83. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewsResponse.d.ts.map +1 -0
  84. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewsResponse.js +45 -0
  85. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewsResponse.js.map +1 -0
  86. package/dist/generated/models/index.d.ts +10 -2
  87. package/dist/generated/models/index.d.ts.map +1 -1
  88. package/dist/generated/models/index.js +10 -2
  89. package/dist/generated/models/index.js.map +1 -1
  90. package/package.json +7 -5
  91. package/src/CovalClient.ts +4 -0
  92. package/src/generated/apis/PythonMetricsApi.ts +627 -0
  93. package/src/generated/apis/SimulatedConversationsApi.ts +4 -4
  94. package/src/generated/apis/index.ts +1 -0
  95. package/src/generated/models/CovalMetricsAPIMetricType.ts +2 -0
  96. package/src/generated/models/CovalPersonasAPICreatePersonaRequest.ts +12 -15
  97. package/src/generated/models/CovalPersonasAPIPersonaResource.ts +11 -0
  98. package/src/generated/models/CovalPersonasAPIUpdatePersonaRequest.ts +13 -1
  99. package/src/generated/models/CovalReviewsAPIReviewProjectResource.ts +1 -1
  100. package/src/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.ts +1 -1
  101. package/src/generated/models/CovalUploadedConversationsAPISubmitUploadedConversationRequest.ts +8 -2
  102. package/src/generated/models/CovalUploadedConversationsAPITranscriptMessage.ts +64 -0
  103. package/src/generated/models/CovalUploadedConversationsAPIUploadedConversationResource.ts +4 -1
  104. package/src/generated/models/PythonMetricsAPICreatePythonMetricDraftRequest.ts +143 -0
  105. package/src/generated/models/PythonMetricsAPIInputRequirements.ts +81 -0
  106. package/src/generated/models/PythonMetricsAPIPreviewPythonMetricBody.ts +66 -0
  107. package/src/generated/models/PythonMetricsAPIPublishPythonMetricBody.ts +75 -0
  108. package/src/generated/models/PythonMetricsAPIPublishPythonMetricResponse.ts +75 -0
  109. package/src/generated/models/PythonMetricsAPIPythonMetricDraftResource.ts +182 -0
  110. package/src/generated/models/PythonMetricsAPIPythonMetricDraftResponse.ts +74 -0
  111. package/src/generated/models/PythonMetricsAPIPythonMetricPreviewResource.ts +116 -0
  112. package/src/generated/models/PythonMetricsAPIPythonMetricPreviewResourceValue.ts +46 -0
  113. package/src/generated/models/PythonMetricsAPIPythonMetricPreviewsResponse.ts +74 -0
  114. package/src/generated/models/index.ts +10 -2
  115. package/dist/generated/models/PersonaWithPrompt.d.ts +0 -33
  116. package/dist/generated/models/PersonaWithPrompt.d.ts.map +0 -1
  117. package/dist/generated/models/PersonaWithPrompt.js +0 -44
  118. package/dist/generated/models/PersonaWithPrompt.js.map +0 -1
  119. package/dist/generated/models/SilentPersona.d.ts +0 -40
  120. package/dist/generated/models/SilentPersona.d.ts.map +0 -1
  121. package/dist/generated/models/SilentPersona.js +0 -50
  122. package/dist/generated/models/SilentPersona.js.map +0 -1
  123. package/src/generated/models/PersonaWithPrompt.ts +0 -66
  124. package/src/generated/models/SilentPersona.ts +0 -76
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Coval Agents API
5
+ * Manage configurations for simulations and evaluations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@coval.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface PythonMetricsAPIPublishPythonMetricBody
20
+ */
21
+ export interface PythonMetricsAPIPublishPythonMetricBody {
22
+ /**
23
+ * Successful previews of this exact draft to approve for publication.
24
+ * @type {Array<string>}
25
+ * @memberof PythonMetricsAPIPublishPythonMetricBody
26
+ */
27
+ preview_ids: Array<string>;
28
+ /**
29
+ * Fingerprint of the source and configuration the user approved.
30
+ * @type {string}
31
+ * @memberof PythonMetricsAPIPublishPythonMetricBody
32
+ */
33
+ fingerprint: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the PythonMetricsAPIPublishPythonMetricBody interface.
38
+ */
39
+ export function instanceOfPythonMetricsAPIPublishPythonMetricBody(value: object): value is PythonMetricsAPIPublishPythonMetricBody {
40
+ if (!('preview_ids' in value) || value['preview_ids'] === undefined) return false;
41
+ if (!('fingerprint' in value) || value['fingerprint'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function PythonMetricsAPIPublishPythonMetricBodyFromJSON(json: any): PythonMetricsAPIPublishPythonMetricBody {
46
+ return PythonMetricsAPIPublishPythonMetricBodyFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function PythonMetricsAPIPublishPythonMetricBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): PythonMetricsAPIPublishPythonMetricBody {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'preview_ids': json['preview_ids'],
56
+ 'fingerprint': json['fingerprint'],
57
+ };
58
+ }
59
+
60
+ export function PythonMetricsAPIPublishPythonMetricBodyToJSON(json: any): PythonMetricsAPIPublishPythonMetricBody {
61
+ return PythonMetricsAPIPublishPythonMetricBodyToJSONTyped(json, false);
62
+ }
63
+
64
+ export function PythonMetricsAPIPublishPythonMetricBodyToJSONTyped(value?: PythonMetricsAPIPublishPythonMetricBody | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'preview_ids': value['preview_ids'],
72
+ 'fingerprint': value['fingerprint'],
73
+ };
74
+ }
75
+
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Coval Agents API
5
+ * Manage configurations for simulations and evaluations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@coval.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface PythonMetricsAPIPublishPythonMetricResponse
20
+ */
21
+ export interface PythonMetricsAPIPublishPythonMetricResponse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof PythonMetricsAPIPublishPythonMetricResponse
26
+ */
27
+ metric_id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof PythonMetricsAPIPublishPythonMetricResponse
32
+ */
33
+ version_id: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the PythonMetricsAPIPublishPythonMetricResponse interface.
38
+ */
39
+ export function instanceOfPythonMetricsAPIPublishPythonMetricResponse(value: object): value is PythonMetricsAPIPublishPythonMetricResponse {
40
+ if (!('metric_id' in value) || value['metric_id'] === undefined) return false;
41
+ if (!('version_id' in value) || value['version_id'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function PythonMetricsAPIPublishPythonMetricResponseFromJSON(json: any): PythonMetricsAPIPublishPythonMetricResponse {
46
+ return PythonMetricsAPIPublishPythonMetricResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function PythonMetricsAPIPublishPythonMetricResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PythonMetricsAPIPublishPythonMetricResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'metric_id': json['metric_id'],
56
+ 'version_id': json['version_id'],
57
+ };
58
+ }
59
+
60
+ export function PythonMetricsAPIPublishPythonMetricResponseToJSON(json: any): PythonMetricsAPIPublishPythonMetricResponse {
61
+ return PythonMetricsAPIPublishPythonMetricResponseToJSONTyped(json, false);
62
+ }
63
+
64
+ export function PythonMetricsAPIPublishPythonMetricResponseToJSONTyped(value?: PythonMetricsAPIPublishPythonMetricResponse | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'metric_id': value['metric_id'],
72
+ 'version_id': value['version_id'],
73
+ };
74
+ }
75
+
@@ -0,0 +1,182 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Coval Agents API
5
+ * Manage configurations for simulations and evaluations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@coval.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { PythonMetricsAPIInputRequirements } from './PythonMetricsAPIInputRequirements.js';
17
+ import {
18
+ PythonMetricsAPIInputRequirementsFromJSON,
19
+ PythonMetricsAPIInputRequirementsFromJSONTyped,
20
+ PythonMetricsAPIInputRequirementsToJSON,
21
+ PythonMetricsAPIInputRequirementsToJSONTyped,
22
+ } from './PythonMetricsAPIInputRequirements.js';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface PythonMetricsAPIPythonMetricDraftResource
28
+ */
29
+ export interface PythonMetricsAPIPythonMetricDraftResource {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof PythonMetricsAPIPythonMetricDraftResource
34
+ */
35
+ draft_id: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof PythonMetricsAPIPythonMetricDraftResource
40
+ */
41
+ version_id: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof PythonMetricsAPIPythonMetricDraftResource
46
+ */
47
+ display_name: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof PythonMetricsAPIPythonMetricDraftResource
52
+ */
53
+ description: string;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof PythonMetricsAPIPythonMetricDraftResource
58
+ */
59
+ source: string;
60
+ /**
61
+ *
62
+ * @type {PythonMetricsAPIPythonMetricDraftResourceOutputTypeEnum}
63
+ * @memberof PythonMetricsAPIPythonMetricDraftResource
64
+ */
65
+ output_type: PythonMetricsAPIPythonMetricDraftResourceOutputTypeEnum;
66
+ /**
67
+ *
68
+ * @type {string}
69
+ * @memberof PythonMetricsAPIPythonMetricDraftResource
70
+ */
71
+ unit: string | null;
72
+ /**
73
+ *
74
+ * @type {PythonMetricsAPIInputRequirements}
75
+ * @memberof PythonMetricsAPIPythonMetricDraftResource
76
+ */
77
+ requirements: PythonMetricsAPIInputRequirements;
78
+ /**
79
+ *
80
+ * @type {string}
81
+ * @memberof PythonMetricsAPIPythonMetricDraftResource
82
+ */
83
+ fingerprint: string;
84
+ /**
85
+ *
86
+ * @type {string}
87
+ * @memberof PythonMetricsAPIPythonMetricDraftResource
88
+ */
89
+ target_metric_id?: string | null;
90
+ /**
91
+ *
92
+ * @type {string}
93
+ * @memberof PythonMetricsAPIPythonMetricDraftResource
94
+ */
95
+ target_version_id?: string | null;
96
+ /**
97
+ *
98
+ * @type {boolean}
99
+ * @memberof PythonMetricsAPIPythonMetricDraftResource
100
+ */
101
+ published: boolean;
102
+ }
103
+
104
+
105
+ /**
106
+ * @export
107
+ */
108
+ export const PythonMetricsAPIPythonMetricDraftResourceOutputTypeEnum = {
109
+ Number: 'number',
110
+ Boolean: 'boolean'
111
+ } as const;
112
+ export type PythonMetricsAPIPythonMetricDraftResourceOutputTypeEnum = typeof PythonMetricsAPIPythonMetricDraftResourceOutputTypeEnum[keyof typeof PythonMetricsAPIPythonMetricDraftResourceOutputTypeEnum];
113
+
114
+
115
+ /**
116
+ * Check if a given object implements the PythonMetricsAPIPythonMetricDraftResource interface.
117
+ */
118
+ export function instanceOfPythonMetricsAPIPythonMetricDraftResource(value: object): value is PythonMetricsAPIPythonMetricDraftResource {
119
+ if (!('draft_id' in value) || value['draft_id'] === undefined) return false;
120
+ if (!('version_id' in value) || value['version_id'] === undefined) return false;
121
+ if (!('display_name' in value) || value['display_name'] === undefined) return false;
122
+ if (!('description' in value) || value['description'] === undefined) return false;
123
+ if (!('source' in value) || value['source'] === undefined) return false;
124
+ if (!('output_type' in value) || value['output_type'] === undefined) return false;
125
+ if (!('unit' in value) || value['unit'] === undefined) return false;
126
+ if (!('requirements' in value) || value['requirements'] === undefined) return false;
127
+ if (!('fingerprint' in value) || value['fingerprint'] === undefined) return false;
128
+ if (!('published' in value) || value['published'] === undefined) return false;
129
+ return true;
130
+ }
131
+
132
+ export function PythonMetricsAPIPythonMetricDraftResourceFromJSON(json: any): PythonMetricsAPIPythonMetricDraftResource {
133
+ return PythonMetricsAPIPythonMetricDraftResourceFromJSONTyped(json, false);
134
+ }
135
+
136
+ export function PythonMetricsAPIPythonMetricDraftResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PythonMetricsAPIPythonMetricDraftResource {
137
+ if (json == null) {
138
+ return json;
139
+ }
140
+ return {
141
+
142
+ 'draft_id': json['draft_id'],
143
+ 'version_id': json['version_id'],
144
+ 'display_name': json['display_name'],
145
+ 'description': json['description'],
146
+ 'source': json['source'],
147
+ 'output_type': json['output_type'],
148
+ 'unit': json['unit'],
149
+ 'requirements': PythonMetricsAPIInputRequirementsFromJSON(json['requirements']),
150
+ 'fingerprint': json['fingerprint'],
151
+ 'target_metric_id': json['target_metric_id'] == null ? undefined : json['target_metric_id'],
152
+ 'target_version_id': json['target_version_id'] == null ? undefined : json['target_version_id'],
153
+ 'published': json['published'],
154
+ };
155
+ }
156
+
157
+ export function PythonMetricsAPIPythonMetricDraftResourceToJSON(json: any): PythonMetricsAPIPythonMetricDraftResource {
158
+ return PythonMetricsAPIPythonMetricDraftResourceToJSONTyped(json, false);
159
+ }
160
+
161
+ export function PythonMetricsAPIPythonMetricDraftResourceToJSONTyped(value?: PythonMetricsAPIPythonMetricDraftResource | null, ignoreDiscriminator: boolean = false): any {
162
+ if (value == null) {
163
+ return value;
164
+ }
165
+
166
+ return {
167
+
168
+ 'draft_id': value['draft_id'],
169
+ 'version_id': value['version_id'],
170
+ 'display_name': value['display_name'],
171
+ 'description': value['description'],
172
+ 'source': value['source'],
173
+ 'output_type': value['output_type'],
174
+ 'unit': value['unit'],
175
+ 'requirements': PythonMetricsAPIInputRequirementsToJSON(value['requirements']),
176
+ 'fingerprint': value['fingerprint'],
177
+ 'target_metric_id': value['target_metric_id'],
178
+ 'target_version_id': value['target_version_id'],
179
+ 'published': value['published'],
180
+ };
181
+ }
182
+
@@ -0,0 +1,74 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Coval Agents API
5
+ * Manage configurations for simulations and evaluations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@coval.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { PythonMetricsAPIPythonMetricDraftResource } from './PythonMetricsAPIPythonMetricDraftResource.js';
17
+ import {
18
+ PythonMetricsAPIPythonMetricDraftResourceFromJSON,
19
+ PythonMetricsAPIPythonMetricDraftResourceFromJSONTyped,
20
+ PythonMetricsAPIPythonMetricDraftResourceToJSON,
21
+ PythonMetricsAPIPythonMetricDraftResourceToJSONTyped,
22
+ } from './PythonMetricsAPIPythonMetricDraftResource.js';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface PythonMetricsAPIPythonMetricDraftResponse
28
+ */
29
+ export interface PythonMetricsAPIPythonMetricDraftResponse {
30
+ /**
31
+ *
32
+ * @type {PythonMetricsAPIPythonMetricDraftResource}
33
+ * @memberof PythonMetricsAPIPythonMetricDraftResponse
34
+ */
35
+ draft: PythonMetricsAPIPythonMetricDraftResource;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the PythonMetricsAPIPythonMetricDraftResponse interface.
40
+ */
41
+ export function instanceOfPythonMetricsAPIPythonMetricDraftResponse(value: object): value is PythonMetricsAPIPythonMetricDraftResponse {
42
+ if (!('draft' in value) || value['draft'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function PythonMetricsAPIPythonMetricDraftResponseFromJSON(json: any): PythonMetricsAPIPythonMetricDraftResponse {
47
+ return PythonMetricsAPIPythonMetricDraftResponseFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function PythonMetricsAPIPythonMetricDraftResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PythonMetricsAPIPythonMetricDraftResponse {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'draft': PythonMetricsAPIPythonMetricDraftResourceFromJSON(json['draft']),
57
+ };
58
+ }
59
+
60
+ export function PythonMetricsAPIPythonMetricDraftResponseToJSON(json: any): PythonMetricsAPIPythonMetricDraftResponse {
61
+ return PythonMetricsAPIPythonMetricDraftResponseToJSONTyped(json, false);
62
+ }
63
+
64
+ export function PythonMetricsAPIPythonMetricDraftResponseToJSONTyped(value?: PythonMetricsAPIPythonMetricDraftResponse | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'draft': PythonMetricsAPIPythonMetricDraftResourceToJSON(value['draft']),
72
+ };
73
+ }
74
+
@@ -0,0 +1,116 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Coval Agents API
5
+ * Manage configurations for simulations and evaluations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@coval.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { PythonMetricsAPIPythonMetricPreviewResourceValue } from './PythonMetricsAPIPythonMetricPreviewResourceValue.js';
17
+ import {
18
+ PythonMetricsAPIPythonMetricPreviewResourceValueFromJSON,
19
+ PythonMetricsAPIPythonMetricPreviewResourceValueFromJSONTyped,
20
+ PythonMetricsAPIPythonMetricPreviewResourceValueToJSON,
21
+ PythonMetricsAPIPythonMetricPreviewResourceValueToJSONTyped,
22
+ } from './PythonMetricsAPIPythonMetricPreviewResourceValue.js';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface PythonMetricsAPIPythonMetricPreviewResource
28
+ */
29
+ export interface PythonMetricsAPIPythonMetricPreviewResource {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof PythonMetricsAPIPythonMetricPreviewResource
34
+ */
35
+ preview_id: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof PythonMetricsAPIPythonMetricPreviewResource
40
+ */
41
+ simulation_output_id: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof PythonMetricsAPIPythonMetricPreviewResource
46
+ */
47
+ status: string;
48
+ /**
49
+ *
50
+ * @type {PythonMetricsAPIPythonMetricPreviewResourceValue}
51
+ * @memberof PythonMetricsAPIPythonMetricPreviewResource
52
+ */
53
+ value?: PythonMetricsAPIPythonMetricPreviewResourceValue | null;
54
+ /**
55
+ * Explanation returned by the Python code; null before success.
56
+ * @type {string}
57
+ * @memberof PythonMetricsAPIPythonMetricPreviewResource
58
+ */
59
+ explanation?: string | null;
60
+ /**
61
+ * Failure or unavailable-input reason; null when absent.
62
+ * @type {string}
63
+ * @memberof PythonMetricsAPIPythonMetricPreviewResource
64
+ */
65
+ error?: string | null;
66
+ }
67
+
68
+ /**
69
+ * Check if a given object implements the PythonMetricsAPIPythonMetricPreviewResource interface.
70
+ */
71
+ export function instanceOfPythonMetricsAPIPythonMetricPreviewResource(value: object): value is PythonMetricsAPIPythonMetricPreviewResource {
72
+ if (!('preview_id' in value) || value['preview_id'] === undefined) return false;
73
+ if (!('simulation_output_id' in value) || value['simulation_output_id'] === undefined) return false;
74
+ if (!('status' in value) || value['status'] === undefined) return false;
75
+ return true;
76
+ }
77
+
78
+ export function PythonMetricsAPIPythonMetricPreviewResourceFromJSON(json: any): PythonMetricsAPIPythonMetricPreviewResource {
79
+ return PythonMetricsAPIPythonMetricPreviewResourceFromJSONTyped(json, false);
80
+ }
81
+
82
+ export function PythonMetricsAPIPythonMetricPreviewResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PythonMetricsAPIPythonMetricPreviewResource {
83
+ if (json == null) {
84
+ return json;
85
+ }
86
+ return {
87
+
88
+ 'preview_id': json['preview_id'],
89
+ 'simulation_output_id': json['simulation_output_id'],
90
+ 'status': json['status'],
91
+ 'value': json['value'] == null ? undefined : PythonMetricsAPIPythonMetricPreviewResourceValueFromJSON(json['value']),
92
+ 'explanation': json['explanation'] == null ? undefined : json['explanation'],
93
+ 'error': json['error'] == null ? undefined : json['error'],
94
+ };
95
+ }
96
+
97
+ export function PythonMetricsAPIPythonMetricPreviewResourceToJSON(json: any): PythonMetricsAPIPythonMetricPreviewResource {
98
+ return PythonMetricsAPIPythonMetricPreviewResourceToJSONTyped(json, false);
99
+ }
100
+
101
+ export function PythonMetricsAPIPythonMetricPreviewResourceToJSONTyped(value?: PythonMetricsAPIPythonMetricPreviewResource | null, ignoreDiscriminator: boolean = false): any {
102
+ if (value == null) {
103
+ return value;
104
+ }
105
+
106
+ return {
107
+
108
+ 'preview_id': value['preview_id'],
109
+ 'simulation_output_id': value['simulation_output_id'],
110
+ 'status': value['status'],
111
+ 'value': PythonMetricsAPIPythonMetricPreviewResourceValueToJSON(value['value']),
112
+ 'explanation': value['explanation'],
113
+ 'error': value['error'],
114
+ };
115
+ }
116
+
@@ -0,0 +1,46 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Coval Agents API
5
+ * Manage configurations for simulations and evaluations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@coval.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ /**
17
+ * Successful scalar result; null until a successful result exists.
18
+ * @export
19
+ * @interface PythonMetricsAPIPythonMetricPreviewResourceValue
20
+ */
21
+ export interface PythonMetricsAPIPythonMetricPreviewResourceValue {
22
+ }
23
+
24
+ /**
25
+ * Check if a given object implements the PythonMetricsAPIPythonMetricPreviewResourceValue interface.
26
+ */
27
+ export function instanceOfPythonMetricsAPIPythonMetricPreviewResourceValue(value: object): value is PythonMetricsAPIPythonMetricPreviewResourceValue {
28
+ return true;
29
+ }
30
+
31
+ export function PythonMetricsAPIPythonMetricPreviewResourceValueFromJSON(json: any): PythonMetricsAPIPythonMetricPreviewResourceValue {
32
+ return PythonMetricsAPIPythonMetricPreviewResourceValueFromJSONTyped(json, false);
33
+ }
34
+
35
+ export function PythonMetricsAPIPythonMetricPreviewResourceValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): PythonMetricsAPIPythonMetricPreviewResourceValue {
36
+ return json;
37
+ }
38
+
39
+ export function PythonMetricsAPIPythonMetricPreviewResourceValueToJSON(json: any): PythonMetricsAPIPythonMetricPreviewResourceValue {
40
+ return PythonMetricsAPIPythonMetricPreviewResourceValueToJSONTyped(json, false);
41
+ }
42
+
43
+ export function PythonMetricsAPIPythonMetricPreviewResourceValueToJSONTyped(value?: PythonMetricsAPIPythonMetricPreviewResourceValue | null, ignoreDiscriminator: boolean = false): any {
44
+ return value;
45
+ }
46
+
@@ -0,0 +1,74 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Coval Agents API
5
+ * Manage configurations for simulations and evaluations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@coval.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { PythonMetricsAPIPythonMetricPreviewResource } from './PythonMetricsAPIPythonMetricPreviewResource.js';
17
+ import {
18
+ PythonMetricsAPIPythonMetricPreviewResourceFromJSON,
19
+ PythonMetricsAPIPythonMetricPreviewResourceFromJSONTyped,
20
+ PythonMetricsAPIPythonMetricPreviewResourceToJSON,
21
+ PythonMetricsAPIPythonMetricPreviewResourceToJSONTyped,
22
+ } from './PythonMetricsAPIPythonMetricPreviewResource.js';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface PythonMetricsAPIPythonMetricPreviewsResponse
28
+ */
29
+ export interface PythonMetricsAPIPythonMetricPreviewsResponse {
30
+ /**
31
+ *
32
+ * @type {Array<PythonMetricsAPIPythonMetricPreviewResource>}
33
+ * @memberof PythonMetricsAPIPythonMetricPreviewsResponse
34
+ */
35
+ previews: Array<PythonMetricsAPIPythonMetricPreviewResource>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the PythonMetricsAPIPythonMetricPreviewsResponse interface.
40
+ */
41
+ export function instanceOfPythonMetricsAPIPythonMetricPreviewsResponse(value: object): value is PythonMetricsAPIPythonMetricPreviewsResponse {
42
+ if (!('previews' in value) || value['previews'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function PythonMetricsAPIPythonMetricPreviewsResponseFromJSON(json: any): PythonMetricsAPIPythonMetricPreviewsResponse {
47
+ return PythonMetricsAPIPythonMetricPreviewsResponseFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function PythonMetricsAPIPythonMetricPreviewsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PythonMetricsAPIPythonMetricPreviewsResponse {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'previews': ((json['previews'] as Array<any>).map(PythonMetricsAPIPythonMetricPreviewResourceFromJSON)),
57
+ };
58
+ }
59
+
60
+ export function PythonMetricsAPIPythonMetricPreviewsResponseToJSON(json: any): PythonMetricsAPIPythonMetricPreviewsResponse {
61
+ return PythonMetricsAPIPythonMetricPreviewsResponseToJSONTyped(json, false);
62
+ }
63
+
64
+ export function PythonMetricsAPIPythonMetricPreviewsResponseToJSONTyped(value?: PythonMetricsAPIPythonMetricPreviewsResponse | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'previews': ((value['previews'] as Array<any>).map(PythonMetricsAPIPythonMetricPreviewResourceToJSON)),
72
+ };
73
+ }
74
+
@@ -524,11 +524,19 @@ export * from './ListTestCases200Response.js';
524
524
  export * from './ListTestSets200Response.js';
525
525
  export * from './ListUploadedConversations200Response.js';
526
526
  export * from './NonSCRIPTTestCase.js';
527
- export * from './PersonaWithPrompt.js';
527
+ export * from './PythonMetricsAPICreatePythonMetricDraftRequest.js';
528
+ export * from './PythonMetricsAPIInputRequirements.js';
529
+ export * from './PythonMetricsAPIPreviewPythonMetricBody.js';
530
+ export * from './PythonMetricsAPIPublishPythonMetricBody.js';
531
+ export * from './PythonMetricsAPIPublishPythonMetricResponse.js';
532
+ export * from './PythonMetricsAPIPythonMetricDraftResource.js';
533
+ export * from './PythonMetricsAPIPythonMetricDraftResponse.js';
534
+ export * from './PythonMetricsAPIPythonMetricPreviewResource.js';
535
+ export * from './PythonMetricsAPIPythonMetricPreviewResourceValue.js';
536
+ export * from './PythonMetricsAPIPythonMetricPreviewsResponse.js';
528
537
  export * from './SCRIPTTestCaseWithLegacyNestedTurns.js';
529
538
  export * from './SCRIPTTestCaseWithLegacyNestedTurnsSimulationMetadataInput.js';
530
539
  export * from './SCRIPTTestCaseWithTopLevelTurns.js';
531
- export * from './SilentPersona.js';
532
540
  export * from './SimulationsGetMetric200Response.js';
533
541
  export * from './SubmitConversation200Response.js';
534
542
  export * from './SubmitUploadedConversation200Response.js';