@proofhound/core 0.1.7 → 0.1.9

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 (199) hide show
  1. package/dist/server/channels/mcp/annotation.tools.d.ts.map +1 -1
  2. package/dist/server/channels/mcp/annotation.tools.js +18 -5
  3. package/dist/server/channels/mcp/annotation.tools.js.map +1 -1
  4. package/dist/server/channels/mcp/canary-release.tools.d.ts.map +1 -1
  5. package/dist/server/channels/mcp/canary-release.tools.js +2 -1
  6. package/dist/server/channels/mcp/canary-release.tools.js.map +1 -1
  7. package/dist/server/channels/mcp/dataset.tools.d.ts.map +1 -1
  8. package/dist/server/channels/mcp/dataset.tools.js +49 -1
  9. package/dist/server/channels/mcp/dataset.tools.js.map +1 -1
  10. package/dist/server/channels/mcp/mcp-server.factory.d.ts +9 -1
  11. package/dist/server/channels/mcp/mcp-server.factory.d.ts.map +1 -1
  12. package/dist/server/channels/mcp/mcp-server.factory.js +28 -3
  13. package/dist/server/channels/mcp/mcp-server.factory.js.map +1 -1
  14. package/dist/server/channels/mcp/prompt.tools.d.ts.map +1 -1
  15. package/dist/server/channels/mcp/prompt.tools.js +34 -2
  16. package/dist/server/channels/mcp/prompt.tools.js.map +1 -1
  17. package/dist/server/channels/mcp/release-line.tools.d.ts.map +1 -1
  18. package/dist/server/channels/mcp/release-line.tools.js +292 -4
  19. package/dist/server/channels/mcp/release-line.tools.js.map +1 -1
  20. package/dist/server/channels/mcp/run-result.tools.d.ts.map +1 -1
  21. package/dist/server/channels/mcp/run-result.tools.js +7 -5
  22. package/dist/server/channels/mcp/run-result.tools.js.map +1 -1
  23. package/dist/server/common/contracts/index.d.ts +1 -0
  24. package/dist/server/common/contracts/index.d.ts.map +1 -1
  25. package/dist/server/common/contracts/index.js +1 -0
  26. package/dist/server/common/contracts/index.js.map +1 -1
  27. package/dist/server/common/contracts/local-contracts.module.d.ts.map +1 -1
  28. package/dist/server/common/contracts/local-contracts.module.js +3 -0
  29. package/dist/server/common/contracts/local-contracts.module.js.map +1 -1
  30. package/dist/server/common/contracts/usage-metering.hook.d.ts +33 -0
  31. package/dist/server/common/contracts/usage-metering.hook.d.ts.map +1 -0
  32. package/dist/server/common/contracts/usage-metering.hook.js +43 -0
  33. package/dist/server/common/contracts/usage-metering.hook.js.map +1 -0
  34. package/dist/server/infrastructure/llm/run-result-writer.d.ts +4 -1
  35. package/dist/server/infrastructure/llm/run-result-writer.d.ts.map +1 -1
  36. package/dist/server/infrastructure/llm/run-result-writer.js +66 -14
  37. package/dist/server/infrastructure/llm/run-result-writer.js.map +1 -1
  38. package/dist/server/modules/annotation/annotation.controller.d.ts +28 -13
  39. package/dist/server/modules/annotation/annotation.controller.d.ts.map +1 -1
  40. package/dist/server/modules/annotation/annotation.repository.d.ts +6 -2
  41. package/dist/server/modules/annotation/annotation.repository.d.ts.map +1 -1
  42. package/dist/server/modules/annotation/annotation.repository.js +340 -96
  43. package/dist/server/modules/annotation/annotation.repository.js.map +1 -1
  44. package/dist/server/modules/annotation/annotation.service.d.ts.map +1 -1
  45. package/dist/server/modules/annotation/annotation.service.js +62 -10
  46. package/dist/server/modules/annotation/annotation.service.js.map +1 -1
  47. package/dist/server/modules/canary-release/canary-release.controller.d.ts +63 -42
  48. package/dist/server/modules/canary-release/canary-release.controller.d.ts.map +1 -1
  49. package/dist/server/modules/canary-release/canary-release.repository.d.ts +23 -5
  50. package/dist/server/modules/canary-release/canary-release.repository.d.ts.map +1 -1
  51. package/dist/server/modules/canary-release/canary-release.repository.js +28 -12
  52. package/dist/server/modules/canary-release/canary-release.repository.js.map +1 -1
  53. package/dist/server/modules/canary-release/canary-release.service.d.ts.map +1 -1
  54. package/dist/server/modules/canary-release/canary-release.service.js +32 -10
  55. package/dist/server/modules/canary-release/canary-release.service.js.map +1 -1
  56. package/dist/server/modules/canary-release/canary-runtime.d.ts +11 -1
  57. package/dist/server/modules/canary-release/canary-runtime.d.ts.map +1 -1
  58. package/dist/server/modules/canary-release/canary-runtime.js +63 -8
  59. package/dist/server/modules/canary-release/canary-runtime.js.map +1 -1
  60. package/dist/server/modules/dataset/dataset-deletion.hook.d.ts +16 -0
  61. package/dist/server/modules/dataset/dataset-deletion.hook.d.ts.map +1 -0
  62. package/dist/server/modules/dataset/dataset-deletion.hook.js +57 -0
  63. package/dist/server/modules/dataset/dataset-deletion.hook.js.map +1 -0
  64. package/dist/server/modules/dataset/dataset-import.controller.d.ts +2 -0
  65. package/dist/server/modules/dataset/dataset-import.controller.d.ts.map +1 -1
  66. package/dist/server/modules/dataset/dataset-import.service.d.ts.map +1 -1
  67. package/dist/server/modules/dataset/dataset-import.service.js +7 -0
  68. package/dist/server/modules/dataset/dataset-import.service.js.map +1 -1
  69. package/dist/server/modules/dataset/dataset.controller.d.ts +98 -0
  70. package/dist/server/modules/dataset/dataset.controller.d.ts.map +1 -1
  71. package/dist/server/modules/dataset/dataset.controller.js +36 -0
  72. package/dist/server/modules/dataset/dataset.controller.js.map +1 -1
  73. package/dist/server/modules/dataset/dataset.module.d.ts.map +1 -1
  74. package/dist/server/modules/dataset/dataset.module.js +8 -1
  75. package/dist/server/modules/dataset/dataset.module.js.map +1 -1
  76. package/dist/server/modules/dataset/dataset.repository.d.ts +19 -0
  77. package/dist/server/modules/dataset/dataset.repository.d.ts.map +1 -1
  78. package/dist/server/modules/dataset/dataset.repository.js +248 -9
  79. package/dist/server/modules/dataset/dataset.repository.js.map +1 -1
  80. package/dist/server/modules/dataset/dataset.service.d.ts +45 -1
  81. package/dist/server/modules/dataset/dataset.service.d.ts.map +1 -1
  82. package/dist/server/modules/dataset/dataset.service.js +132 -7
  83. package/dist/server/modules/dataset/dataset.service.js.map +1 -1
  84. package/dist/server/modules/experiment/experiment.controller.d.ts +8 -8
  85. package/dist/server/modules/experiment/experiment.repository.d.ts.map +1 -1
  86. package/dist/server/modules/experiment/experiment.repository.js +28 -0
  87. package/dist/server/modules/experiment/experiment.repository.js.map +1 -1
  88. package/dist/server/modules/experiment/experiment.service.d.ts.map +1 -1
  89. package/dist/server/modules/experiment/experiment.service.js +6 -3
  90. package/dist/server/modules/experiment/experiment.service.js.map +1 -1
  91. package/dist/server/modules/model/model.service.d.ts +5 -1
  92. package/dist/server/modules/model/model.service.d.ts.map +1 -1
  93. package/dist/server/modules/model/model.service.js +65 -3
  94. package/dist/server/modules/model/model.service.js.map +1 -1
  95. package/dist/server/modules/model/project-model.controller.d.ts +5 -5
  96. package/dist/server/modules/monitoring/monitoring.repository.js +1 -1
  97. package/dist/server/modules/optimization/optimization.controller.d.ts +12 -12
  98. package/dist/server/modules/optimization/optimization.repository.d.ts +6 -0
  99. package/dist/server/modules/optimization/optimization.repository.d.ts.map +1 -1
  100. package/dist/server/modules/optimization/optimization.repository.js +96 -4
  101. package/dist/server/modules/optimization/optimization.repository.js.map +1 -1
  102. package/dist/server/modules/optimization/optimization.service.d.ts.map +1 -1
  103. package/dist/server/modules/optimization/optimization.service.js +13 -4
  104. package/dist/server/modules/optimization/optimization.service.js.map +1 -1
  105. package/dist/server/modules/optimization/optimization.workflow.js +1 -1
  106. package/dist/server/modules/optimization/optimization.workflow.js.map +1 -1
  107. package/dist/server/modules/production-release/production-release.controller.d.ts +12 -9
  108. package/dist/server/modules/production-release/production-release.controller.d.ts.map +1 -1
  109. package/dist/server/modules/production-release/production-release.repository.d.ts +2 -1
  110. package/dist/server/modules/production-release/production-release.repository.d.ts.map +1 -1
  111. package/dist/server/modules/production-release/production-release.repository.js +3 -1
  112. package/dist/server/modules/production-release/production-release.repository.js.map +1 -1
  113. package/dist/server/modules/production-release/production-release.service.d.ts.map +1 -1
  114. package/dist/server/modules/production-release/production-release.service.js +10 -1
  115. package/dist/server/modules/production-release/production-release.service.js.map +1 -1
  116. package/dist/server/modules/prompt/prompt-deletion.hook.d.ts +18 -0
  117. package/dist/server/modules/prompt/prompt-deletion.hook.d.ts.map +1 -0
  118. package/dist/server/modules/prompt/prompt-deletion.hook.js +69 -0
  119. package/dist/server/modules/prompt/prompt-deletion.hook.js.map +1 -0
  120. package/dist/server/modules/prompt/prompt.controller.d.ts +146 -38
  121. package/dist/server/modules/prompt/prompt.controller.d.ts.map +1 -1
  122. package/dist/server/modules/prompt/prompt.controller.js +24 -0
  123. package/dist/server/modules/prompt/prompt.controller.js.map +1 -1
  124. package/dist/server/modules/prompt/prompt.module.d.ts.map +1 -1
  125. package/dist/server/modules/prompt/prompt.module.js +7 -1
  126. package/dist/server/modules/prompt/prompt.module.js.map +1 -1
  127. package/dist/server/modules/prompt/prompt.repository.d.ts +33 -3
  128. package/dist/server/modules/prompt/prompt.repository.d.ts.map +1 -1
  129. package/dist/server/modules/prompt/prompt.repository.js +267 -39
  130. package/dist/server/modules/prompt/prompt.repository.js.map +1 -1
  131. package/dist/server/modules/prompt/prompt.service.d.ts +78 -6
  132. package/dist/server/modules/prompt/prompt.service.d.ts.map +1 -1
  133. package/dist/server/modules/prompt/prompt.service.js +79 -49
  134. package/dist/server/modules/prompt/prompt.service.js.map +1 -1
  135. package/dist/server/modules/quick-start/quick-start.controller.d.ts +1 -1
  136. package/dist/server/modules/quick-start/quick-start.service.d.ts +1 -1
  137. package/dist/server/modules/release-line/release-line-deletion.hook.d.ts +16 -0
  138. package/dist/server/modules/release-line/release-line-deletion.hook.d.ts.map +1 -0
  139. package/dist/server/modules/release-line/release-line-deletion.hook.js +60 -0
  140. package/dist/server/modules/release-line/release-line-deletion.hook.js.map +1 -0
  141. package/dist/server/modules/release-line/release-line.controller.d.ts +2503 -82
  142. package/dist/server/modules/release-line/release-line.controller.d.ts.map +1 -1
  143. package/dist/server/modules/release-line/release-line.controller.js +169 -0
  144. package/dist/server/modules/release-line/release-line.controller.js.map +1 -1
  145. package/dist/server/modules/release-line/release-line.module.d.ts.map +1 -1
  146. package/dist/server/modules/release-line/release-line.module.js +8 -1
  147. package/dist/server/modules/release-line/release-line.module.js.map +1 -1
  148. package/dist/server/modules/release-line/release-line.repository.d.ts +55 -3
  149. package/dist/server/modules/release-line/release-line.repository.d.ts.map +1 -1
  150. package/dist/server/modules/release-line/release-line.repository.js +797 -111
  151. package/dist/server/modules/release-line/release-line.repository.js.map +1 -1
  152. package/dist/server/modules/release-line/release-line.service.d.ts +25 -5
  153. package/dist/server/modules/release-line/release-line.service.d.ts.map +1 -1
  154. package/dist/server/modules/release-line/release-line.service.js +312 -4
  155. package/dist/server/modules/release-line/release-line.service.js.map +1 -1
  156. package/dist/server/modules/release-line/release-runner.repository.d.ts +2 -1
  157. package/dist/server/modules/release-line/release-runner.repository.d.ts.map +1 -1
  158. package/dist/server/modules/release-line/release-runner.repository.js +14 -10
  159. package/dist/server/modules/release-line/release-runner.repository.js.map +1 -1
  160. package/dist/server/modules/release-line/release-runner.service.d.ts +6 -2
  161. package/dist/server/modules/release-line/release-runner.service.d.ts.map +1 -1
  162. package/dist/server/modules/release-line/release-runner.service.js +138 -11
  163. package/dist/server/modules/release-line/release-runner.service.js.map +1 -1
  164. package/dist/server/modules/release-line/release-variable-mapping.d.ts +9 -0
  165. package/dist/server/modules/release-line/release-variable-mapping.d.ts.map +1 -0
  166. package/dist/server/modules/release-line/release-variable-mapping.js +83 -0
  167. package/dist/server/modules/release-line/release-variable-mapping.js.map +1 -0
  168. package/dist/server/modules/run-result/run-result.controller.d.ts +10 -7
  169. package/dist/server/modules/run-result/run-result.controller.d.ts.map +1 -1
  170. package/dist/server/modules/run-result/run-result.repository.d.ts.map +1 -1
  171. package/dist/server/modules/run-result/run-result.repository.js +43 -18
  172. package/dist/server/modules/run-result/run-result.repository.js.map +1 -1
  173. package/dist/webhook/channels/webhook/webhook.controller.d.ts +4 -0
  174. package/dist/webhook/channels/webhook/webhook.controller.d.ts.map +1 -1
  175. package/dist/webhook/channels/webhook/webhook.service.d.ts +2 -0
  176. package/dist/webhook/channels/webhook/webhook.service.d.ts.map +1 -1
  177. package/dist/webhook/channels/webhook/webhook.service.js +6 -0
  178. package/dist/webhook/channels/webhook/webhook.service.js.map +1 -1
  179. package/dist/worker/consumers/llm.consumer.d.ts +4 -1
  180. package/dist/worker/consumers/llm.consumer.d.ts.map +1 -1
  181. package/dist/worker/consumers/llm.consumer.js +41 -6
  182. package/dist/worker/consumers/llm.consumer.js.map +1 -1
  183. package/dist/worker/consumers/probe.consumer.d.ts +4 -1
  184. package/dist/worker/consumers/probe.consumer.d.ts.map +1 -1
  185. package/dist/worker/consumers/probe.consumer.js +35 -3
  186. package/dist/worker/consumers/probe.consumer.js.map +1 -1
  187. package/dist/worker/runners/llm-runner.d.ts +3 -1
  188. package/dist/worker/runners/llm-runner.d.ts.map +1 -1
  189. package/dist/worker/runners/llm-runner.js +110 -55
  190. package/dist/worker/runners/llm-runner.js.map +1 -1
  191. package/dist/worker/runners/probe-runner.d.ts +9 -2
  192. package/dist/worker/runners/probe-runner.d.ts.map +1 -1
  193. package/dist/worker/runners/probe-runner.js +46 -2
  194. package/dist/worker/runners/probe-runner.js.map +1 -1
  195. package/dist/worker/runners/run-result-writer.d.ts +4 -1
  196. package/dist/worker/runners/run-result-writer.d.ts.map +1 -1
  197. package/dist/worker/runners/run-result-writer.js +63 -13
  198. package/dist/worker/runners/run-result-writer.js.map +1 -1
  199. package/package.json +12 -12
@@ -20,21 +20,24 @@ export declare class ReleaseLineController {
20
20
  inputConnectorName: string | null;
21
21
  inputConnectorType: string | null;
22
22
  inputConnectorSnapshot: Record<string, unknown>;
23
- status: "production" | "canary" | "stopped" | "archived" | "production_with_canary";
23
+ status: "running" | "stopped" | "archived";
24
24
  currentProductionEventId: string | null;
25
25
  activeCanaryEventId: string | null;
26
26
  currentProductionEvent: {
27
27
  id: string;
28
28
  projectId: string;
29
29
  releaseLineId: string;
30
- releaseVariantId: string | null;
31
- releaseVariantNumber: number | null;
32
- releaseVariantLabel: string | null;
30
+ releaseVersionId: string | null;
31
+ releaseVersionKind: "production" | "candidate" | null;
32
+ releaseVersionLabel: string | null;
33
+ releaseVersionProductionNumber: number | null;
34
+ releaseVersionTargetProductionNumber: number | null;
35
+ releaseVersionCandidateNumber: number | null;
33
36
  annotationTaskId: string | null;
34
- laneType: "production" | "canary";
35
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
36
- status: "failed" | "running" | "stopped" | "cancelled" | "completed" | "archived";
37
- terminalReason: "error" | "cancelled" | "archived" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
37
+ laneType: "canary" | "production";
38
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
39
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
40
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
38
41
  sourceEventId: string | null;
39
42
  sourceLegacySource: "canary_release" | "production_release_event" | null;
40
43
  sourceLegacyId: string | null;
@@ -70,7 +73,8 @@ export declare class ReleaseLineController {
70
73
  variableMapping: unknown;
71
74
  outputMapping: unknown;
72
75
  filterRules: unknown;
73
- recordMode: "all" | "correct_only";
76
+ recordMode: "all" | "selected_categories" | "correct_only";
77
+ recordCategories: string[];
74
78
  externalIdField: string | null;
75
79
  retentionDays: number | null;
76
80
  sourceExperimentId: string | null;
@@ -93,14 +97,17 @@ export declare class ReleaseLineController {
93
97
  id: string;
94
98
  projectId: string;
95
99
  releaseLineId: string;
96
- releaseVariantId: string | null;
97
- releaseVariantNumber: number | null;
98
- releaseVariantLabel: string | null;
100
+ releaseVersionId: string | null;
101
+ releaseVersionKind: "production" | "candidate" | null;
102
+ releaseVersionLabel: string | null;
103
+ releaseVersionProductionNumber: number | null;
104
+ releaseVersionTargetProductionNumber: number | null;
105
+ releaseVersionCandidateNumber: number | null;
99
106
  annotationTaskId: string | null;
100
- laneType: "production" | "canary";
101
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
102
- status: "failed" | "running" | "stopped" | "cancelled" | "completed" | "archived";
103
- terminalReason: "error" | "cancelled" | "archived" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
107
+ laneType: "canary" | "production";
108
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
109
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
110
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
104
111
  sourceEventId: string | null;
105
112
  sourceLegacySource: "canary_release" | "production_release_event" | null;
106
113
  sourceLegacyId: string | null;
@@ -136,7 +143,8 @@ export declare class ReleaseLineController {
136
143
  variableMapping: unknown;
137
144
  outputMapping: unknown;
138
145
  filterRules: unknown;
139
- recordMode: "all" | "correct_only";
146
+ recordMode: "all" | "selected_categories" | "correct_only";
147
+ recordCategories: string[];
140
148
  externalIdField: string | null;
141
149
  retentionDays: number | null;
142
150
  sourceExperimentId: string | null;
@@ -155,11 +163,15 @@ export declare class ReleaseLineController {
155
163
  createdAt: string;
156
164
  updatedAt: string;
157
165
  } | null;
158
- variants: {
166
+ versions: {
159
167
  id: string;
160
168
  projectId: string;
161
169
  releaseLineId: string;
162
- variantNumber: number;
170
+ kind: "production" | "candidate";
171
+ productionVersionNumber: number | null;
172
+ targetProductionVersionNumber: number;
173
+ candidateNumber: number | null;
174
+ promotedFromReleaseVersionId: string | null;
163
175
  label: string;
164
176
  promptId: string | null;
165
177
  promptName: string;
@@ -185,14 +197,17 @@ export declare class ReleaseLineController {
185
197
  id: string;
186
198
  projectId: string;
187
199
  releaseLineId: string;
188
- releaseVariantId: string | null;
189
- releaseVariantNumber: number | null;
190
- releaseVariantLabel: string | null;
200
+ releaseVersionId: string | null;
201
+ releaseVersionKind: "production" | "candidate" | null;
202
+ releaseVersionLabel: string | null;
203
+ releaseVersionProductionNumber: number | null;
204
+ releaseVersionTargetProductionNumber: number | null;
205
+ releaseVersionCandidateNumber: number | null;
191
206
  annotationTaskId: string | null;
192
- laneType: "production" | "canary";
193
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
194
- status: "failed" | "running" | "stopped" | "cancelled" | "completed" | "archived";
195
- terminalReason: "error" | "cancelled" | "archived" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
207
+ laneType: "canary" | "production";
208
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
209
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
210
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
196
211
  sourceEventId: string | null;
197
212
  sourceLegacySource: "canary_release" | "production_release_event" | null;
198
213
  sourceLegacyId: string | null;
@@ -228,7 +243,8 @@ export declare class ReleaseLineController {
228
243
  variableMapping: unknown;
229
244
  outputMapping: unknown;
230
245
  filterRules: unknown;
231
- recordMode: "all" | "correct_only";
246
+ recordMode: "all" | "selected_categories" | "correct_only";
247
+ recordCategories: string[];
232
248
  externalIdField: string | null;
233
249
  retentionDays: number | null;
234
250
  sourceExperimentId: string | null;
@@ -256,6 +272,36 @@ export declare class ReleaseLineController {
256
272
  data: import("@proofhound/shared").ReleaseLineEventDto[];
257
273
  total: number;
258
274
  }>;
275
+ deleteImpact(releaseLineId: string, actor: CurrentUserPayload, project: ProjectContext): Promise<{
276
+ releaseLineId: string;
277
+ lineName: string;
278
+ events: {
279
+ id: string;
280
+ kind: "version" | "event" | "annotation_task";
281
+ name: string | null;
282
+ status: string | null;
283
+ detail: string | null;
284
+ createdAt: string | null;
285
+ }[];
286
+ versions: {
287
+ id: string;
288
+ kind: "version" | "event" | "annotation_task";
289
+ name: string | null;
290
+ status: string | null;
291
+ detail: string | null;
292
+ createdAt: string | null;
293
+ }[];
294
+ annotationTasks: {
295
+ id: string;
296
+ kind: "version" | "event" | "annotation_task";
297
+ name: string | null;
298
+ status: string | null;
299
+ detail: string | null;
300
+ createdAt: string | null;
301
+ }[];
302
+ runResults: number;
303
+ total: number;
304
+ }>;
259
305
  updateTrafficRatio(releaseLineId: string, rawBody: unknown, actor: CurrentUserPayload, project: ProjectContext): Promise<{
260
306
  id: string;
261
307
  projectId: string;
@@ -268,21 +314,24 @@ export declare class ReleaseLineController {
268
314
  inputConnectorName: string | null;
269
315
  inputConnectorType: string | null;
270
316
  inputConnectorSnapshot: Record<string, unknown>;
271
- status: "production" | "canary" | "stopped" | "archived" | "production_with_canary";
317
+ status: "running" | "stopped" | "archived";
272
318
  currentProductionEventId: string | null;
273
319
  activeCanaryEventId: string | null;
274
320
  currentProductionEvent: {
275
321
  id: string;
276
322
  projectId: string;
277
323
  releaseLineId: string;
278
- releaseVariantId: string | null;
279
- releaseVariantNumber: number | null;
280
- releaseVariantLabel: string | null;
324
+ releaseVersionId: string | null;
325
+ releaseVersionKind: "production" | "candidate" | null;
326
+ releaseVersionLabel: string | null;
327
+ releaseVersionProductionNumber: number | null;
328
+ releaseVersionTargetProductionNumber: number | null;
329
+ releaseVersionCandidateNumber: number | null;
281
330
  annotationTaskId: string | null;
282
- laneType: "production" | "canary";
283
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
284
- status: "failed" | "running" | "stopped" | "cancelled" | "completed" | "archived";
285
- terminalReason: "error" | "cancelled" | "archived" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
331
+ laneType: "canary" | "production";
332
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
333
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
334
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
286
335
  sourceEventId: string | null;
287
336
  sourceLegacySource: "canary_release" | "production_release_event" | null;
288
337
  sourceLegacyId: string | null;
@@ -318,7 +367,8 @@ export declare class ReleaseLineController {
318
367
  variableMapping: unknown;
319
368
  outputMapping: unknown;
320
369
  filterRules: unknown;
321
- recordMode: "all" | "correct_only";
370
+ recordMode: "all" | "selected_categories" | "correct_only";
371
+ recordCategories: string[];
322
372
  externalIdField: string | null;
323
373
  retentionDays: number | null;
324
374
  sourceExperimentId: string | null;
@@ -341,14 +391,17 @@ export declare class ReleaseLineController {
341
391
  id: string;
342
392
  projectId: string;
343
393
  releaseLineId: string;
344
- releaseVariantId: string | null;
345
- releaseVariantNumber: number | null;
346
- releaseVariantLabel: string | null;
394
+ releaseVersionId: string | null;
395
+ releaseVersionKind: "production" | "candidate" | null;
396
+ releaseVersionLabel: string | null;
397
+ releaseVersionProductionNumber: number | null;
398
+ releaseVersionTargetProductionNumber: number | null;
399
+ releaseVersionCandidateNumber: number | null;
347
400
  annotationTaskId: string | null;
348
- laneType: "production" | "canary";
349
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
350
- status: "failed" | "running" | "stopped" | "cancelled" | "completed" | "archived";
351
- terminalReason: "error" | "cancelled" | "archived" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
401
+ laneType: "canary" | "production";
402
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
403
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
404
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
352
405
  sourceEventId: string | null;
353
406
  sourceLegacySource: "canary_release" | "production_release_event" | null;
354
407
  sourceLegacyId: string | null;
@@ -384,7 +437,8 @@ export declare class ReleaseLineController {
384
437
  variableMapping: unknown;
385
438
  outputMapping: unknown;
386
439
  filterRules: unknown;
387
- recordMode: "all" | "correct_only";
440
+ recordMode: "all" | "selected_categories" | "correct_only";
441
+ recordCategories: string[];
388
442
  externalIdField: string | null;
389
443
  retentionDays: number | null;
390
444
  sourceExperimentId: string | null;
@@ -403,11 +457,15 @@ export declare class ReleaseLineController {
403
457
  createdAt: string;
404
458
  updatedAt: string;
405
459
  } | null;
406
- variants: {
460
+ versions: {
407
461
  id: string;
408
462
  projectId: string;
409
463
  releaseLineId: string;
410
- variantNumber: number;
464
+ kind: "production" | "candidate";
465
+ productionVersionNumber: number | null;
466
+ targetProductionVersionNumber: number;
467
+ candidateNumber: number | null;
468
+ promotedFromReleaseVersionId: string | null;
411
469
  label: string;
412
470
  promptId: string | null;
413
471
  promptName: string;
@@ -433,14 +491,17 @@ export declare class ReleaseLineController {
433
491
  id: string;
434
492
  projectId: string;
435
493
  releaseLineId: string;
436
- releaseVariantId: string | null;
437
- releaseVariantNumber: number | null;
438
- releaseVariantLabel: string | null;
494
+ releaseVersionId: string | null;
495
+ releaseVersionKind: "production" | "candidate" | null;
496
+ releaseVersionLabel: string | null;
497
+ releaseVersionProductionNumber: number | null;
498
+ releaseVersionTargetProductionNumber: number | null;
499
+ releaseVersionCandidateNumber: number | null;
439
500
  annotationTaskId: string | null;
440
- laneType: "production" | "canary";
441
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
442
- status: "failed" | "running" | "stopped" | "cancelled" | "completed" | "archived";
443
- terminalReason: "error" | "cancelled" | "archived" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
501
+ laneType: "canary" | "production";
502
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
503
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
504
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
444
505
  sourceEventId: string | null;
445
506
  sourceLegacySource: "canary_release" | "production_release_event" | null;
446
507
  sourceLegacyId: string | null;
@@ -476,7 +537,8 @@ export declare class ReleaseLineController {
476
537
  variableMapping: unknown;
477
538
  outputMapping: unknown;
478
539
  filterRules: unknown;
479
- recordMode: "all" | "correct_only";
540
+ recordMode: "all" | "selected_categories" | "correct_only";
541
+ recordCategories: string[];
480
542
  externalIdField: string | null;
481
543
  retentionDays: number | null;
482
544
  sourceExperimentId: string | null;
@@ -500,7 +562,2350 @@ export declare class ReleaseLineController {
500
562
  updatedAt: string;
501
563
  archivedAt: string | null;
502
564
  }>;
503
- updateRunConfig(releaseLineId: string, rawBody: unknown, actor: CurrentUserPayload, project: ProjectContext): Promise<{
565
+ promoteCanary(releaseLineId: string, actor: CurrentUserPayload, project: ProjectContext): Promise<{
566
+ id: string;
567
+ projectId: string;
568
+ name: string;
569
+ description: string | null;
570
+ promptId: string | null;
571
+ promptName: string;
572
+ promptSnapshot: Record<string, unknown>;
573
+ inputConnectorId: string | null;
574
+ inputConnectorName: string | null;
575
+ inputConnectorType: string | null;
576
+ inputConnectorSnapshot: Record<string, unknown>;
577
+ status: "running" | "stopped" | "archived";
578
+ currentProductionEventId: string | null;
579
+ activeCanaryEventId: string | null;
580
+ currentProductionEvent: {
581
+ id: string;
582
+ projectId: string;
583
+ releaseLineId: string;
584
+ releaseVersionId: string | null;
585
+ releaseVersionKind: "production" | "candidate" | null;
586
+ releaseVersionLabel: string | null;
587
+ releaseVersionProductionNumber: number | null;
588
+ releaseVersionTargetProductionNumber: number | null;
589
+ releaseVersionCandidateNumber: number | null;
590
+ annotationTaskId: string | null;
591
+ laneType: "canary" | "production";
592
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
593
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
594
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
595
+ sourceEventId: string | null;
596
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
597
+ sourceLegacyId: string | null;
598
+ supersedesEventId: string | null;
599
+ rollbackTargetEventId: string | null;
600
+ legacySource: "canary_release" | "production_release_event" | null;
601
+ legacySourceId: string | null;
602
+ promptId: string | null;
603
+ promptName: string;
604
+ promptVersionId: string | null;
605
+ promptVersionNumber: number | null;
606
+ promptVersionLabel: string | null;
607
+ promptSnapshot: Record<string, unknown>;
608
+ promptVersionSnapshot: Record<string, unknown>;
609
+ modelId: string | null;
610
+ modelName: string | null;
611
+ modelProvider: string | null;
612
+ modelSnapshot: Record<string, unknown>;
613
+ inputConnectorId: string | null;
614
+ inputConnectorName: string | null;
615
+ inputConnectorType: string | null;
616
+ inputConnectorSnapshot: Record<string, unknown>;
617
+ outputConnectorIds: string[];
618
+ outputConnectors: {
619
+ id: string;
620
+ name: string;
621
+ type: string;
622
+ }[];
623
+ outputConnectorSnapshots: Record<string, unknown>[];
624
+ trafficMode: "split" | "dual_run" | null;
625
+ trafficRatio: number | null;
626
+ runConfig: Record<string, unknown>;
627
+ variableMapping: unknown;
628
+ outputMapping: unknown;
629
+ filterRules: unknown;
630
+ recordMode: "all" | "selected_categories" | "correct_only";
631
+ recordCategories: string[];
632
+ externalIdField: string | null;
633
+ retentionDays: number | null;
634
+ sourceExperimentId: string | null;
635
+ submitReason: string;
636
+ metrics: Record<string, unknown> | null;
637
+ totalReceived: number;
638
+ totalProcessed: number;
639
+ totalFiltered: number;
640
+ totalCorrect: number;
641
+ totalErrors: number;
642
+ controlState: string | null;
643
+ controlStatePayload: Record<string, unknown> | null;
644
+ startedAt: string | null;
645
+ finishedAt: string | null;
646
+ createdBy: string;
647
+ createdAt: string;
648
+ updatedAt: string;
649
+ } | null;
650
+ activeCanaryEvent: {
651
+ id: string;
652
+ projectId: string;
653
+ releaseLineId: string;
654
+ releaseVersionId: string | null;
655
+ releaseVersionKind: "production" | "candidate" | null;
656
+ releaseVersionLabel: string | null;
657
+ releaseVersionProductionNumber: number | null;
658
+ releaseVersionTargetProductionNumber: number | null;
659
+ releaseVersionCandidateNumber: number | null;
660
+ annotationTaskId: string | null;
661
+ laneType: "canary" | "production";
662
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
663
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
664
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
665
+ sourceEventId: string | null;
666
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
667
+ sourceLegacyId: string | null;
668
+ supersedesEventId: string | null;
669
+ rollbackTargetEventId: string | null;
670
+ legacySource: "canary_release" | "production_release_event" | null;
671
+ legacySourceId: string | null;
672
+ promptId: string | null;
673
+ promptName: string;
674
+ promptVersionId: string | null;
675
+ promptVersionNumber: number | null;
676
+ promptVersionLabel: string | null;
677
+ promptSnapshot: Record<string, unknown>;
678
+ promptVersionSnapshot: Record<string, unknown>;
679
+ modelId: string | null;
680
+ modelName: string | null;
681
+ modelProvider: string | null;
682
+ modelSnapshot: Record<string, unknown>;
683
+ inputConnectorId: string | null;
684
+ inputConnectorName: string | null;
685
+ inputConnectorType: string | null;
686
+ inputConnectorSnapshot: Record<string, unknown>;
687
+ outputConnectorIds: string[];
688
+ outputConnectors: {
689
+ id: string;
690
+ name: string;
691
+ type: string;
692
+ }[];
693
+ outputConnectorSnapshots: Record<string, unknown>[];
694
+ trafficMode: "split" | "dual_run" | null;
695
+ trafficRatio: number | null;
696
+ runConfig: Record<string, unknown>;
697
+ variableMapping: unknown;
698
+ outputMapping: unknown;
699
+ filterRules: unknown;
700
+ recordMode: "all" | "selected_categories" | "correct_only";
701
+ recordCategories: string[];
702
+ externalIdField: string | null;
703
+ retentionDays: number | null;
704
+ sourceExperimentId: string | null;
705
+ submitReason: string;
706
+ metrics: Record<string, unknown> | null;
707
+ totalReceived: number;
708
+ totalProcessed: number;
709
+ totalFiltered: number;
710
+ totalCorrect: number;
711
+ totalErrors: number;
712
+ controlState: string | null;
713
+ controlStatePayload: Record<string, unknown> | null;
714
+ startedAt: string | null;
715
+ finishedAt: string | null;
716
+ createdBy: string;
717
+ createdAt: string;
718
+ updatedAt: string;
719
+ } | null;
720
+ versions: {
721
+ id: string;
722
+ projectId: string;
723
+ releaseLineId: string;
724
+ kind: "production" | "candidate";
725
+ productionVersionNumber: number | null;
726
+ targetProductionVersionNumber: number;
727
+ candidateNumber: number | null;
728
+ promotedFromReleaseVersionId: string | null;
729
+ label: string;
730
+ promptId: string | null;
731
+ promptName: string;
732
+ promptVersionId: string;
733
+ promptVersionNumber: number | null;
734
+ promptVersionLabel: string | null;
735
+ promptSnapshot: Record<string, unknown>;
736
+ promptVersionSnapshot: Record<string, unknown>;
737
+ modelId: string;
738
+ modelName: string | null;
739
+ modelProvider: string | null;
740
+ modelSnapshot: Record<string, unknown>;
741
+ createdBy: string;
742
+ createdAt: string;
743
+ updatedAt: string;
744
+ }[];
745
+ outputConnectors: {
746
+ id: string;
747
+ name: string;
748
+ type: string;
749
+ }[];
750
+ latestEvent: {
751
+ id: string;
752
+ projectId: string;
753
+ releaseLineId: string;
754
+ releaseVersionId: string | null;
755
+ releaseVersionKind: "production" | "candidate" | null;
756
+ releaseVersionLabel: string | null;
757
+ releaseVersionProductionNumber: number | null;
758
+ releaseVersionTargetProductionNumber: number | null;
759
+ releaseVersionCandidateNumber: number | null;
760
+ annotationTaskId: string | null;
761
+ laneType: "canary" | "production";
762
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
763
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
764
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
765
+ sourceEventId: string | null;
766
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
767
+ sourceLegacyId: string | null;
768
+ supersedesEventId: string | null;
769
+ rollbackTargetEventId: string | null;
770
+ legacySource: "canary_release" | "production_release_event" | null;
771
+ legacySourceId: string | null;
772
+ promptId: string | null;
773
+ promptName: string;
774
+ promptVersionId: string | null;
775
+ promptVersionNumber: number | null;
776
+ promptVersionLabel: string | null;
777
+ promptSnapshot: Record<string, unknown>;
778
+ promptVersionSnapshot: Record<string, unknown>;
779
+ modelId: string | null;
780
+ modelName: string | null;
781
+ modelProvider: string | null;
782
+ modelSnapshot: Record<string, unknown>;
783
+ inputConnectorId: string | null;
784
+ inputConnectorName: string | null;
785
+ inputConnectorType: string | null;
786
+ inputConnectorSnapshot: Record<string, unknown>;
787
+ outputConnectorIds: string[];
788
+ outputConnectors: {
789
+ id: string;
790
+ name: string;
791
+ type: string;
792
+ }[];
793
+ outputConnectorSnapshots: Record<string, unknown>[];
794
+ trafficMode: "split" | "dual_run" | null;
795
+ trafficRatio: number | null;
796
+ runConfig: Record<string, unknown>;
797
+ variableMapping: unknown;
798
+ outputMapping: unknown;
799
+ filterRules: unknown;
800
+ recordMode: "all" | "selected_categories" | "correct_only";
801
+ recordCategories: string[];
802
+ externalIdField: string | null;
803
+ retentionDays: number | null;
804
+ sourceExperimentId: string | null;
805
+ submitReason: string;
806
+ metrics: Record<string, unknown> | null;
807
+ totalReceived: number;
808
+ totalProcessed: number;
809
+ totalFiltered: number;
810
+ totalCorrect: number;
811
+ totalErrors: number;
812
+ controlState: string | null;
813
+ controlStatePayload: Record<string, unknown> | null;
814
+ startedAt: string | null;
815
+ finishedAt: string | null;
816
+ createdBy: string;
817
+ createdAt: string;
818
+ updatedAt: string;
819
+ } | null;
820
+ createdBy: string;
821
+ createdAt: string;
822
+ updatedAt: string;
823
+ archivedAt: string | null;
824
+ }>;
825
+ stopLine(releaseLineId: string, rawBody: unknown, actor: CurrentUserPayload, project: ProjectContext): Promise<{
826
+ id: string;
827
+ projectId: string;
828
+ name: string;
829
+ description: string | null;
830
+ promptId: string | null;
831
+ promptName: string;
832
+ promptSnapshot: Record<string, unknown>;
833
+ inputConnectorId: string | null;
834
+ inputConnectorName: string | null;
835
+ inputConnectorType: string | null;
836
+ inputConnectorSnapshot: Record<string, unknown>;
837
+ status: "running" | "stopped" | "archived";
838
+ currentProductionEventId: string | null;
839
+ activeCanaryEventId: string | null;
840
+ currentProductionEvent: {
841
+ id: string;
842
+ projectId: string;
843
+ releaseLineId: string;
844
+ releaseVersionId: string | null;
845
+ releaseVersionKind: "production" | "candidate" | null;
846
+ releaseVersionLabel: string | null;
847
+ releaseVersionProductionNumber: number | null;
848
+ releaseVersionTargetProductionNumber: number | null;
849
+ releaseVersionCandidateNumber: number | null;
850
+ annotationTaskId: string | null;
851
+ laneType: "canary" | "production";
852
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
853
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
854
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
855
+ sourceEventId: string | null;
856
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
857
+ sourceLegacyId: string | null;
858
+ supersedesEventId: string | null;
859
+ rollbackTargetEventId: string | null;
860
+ legacySource: "canary_release" | "production_release_event" | null;
861
+ legacySourceId: string | null;
862
+ promptId: string | null;
863
+ promptName: string;
864
+ promptVersionId: string | null;
865
+ promptVersionNumber: number | null;
866
+ promptVersionLabel: string | null;
867
+ promptSnapshot: Record<string, unknown>;
868
+ promptVersionSnapshot: Record<string, unknown>;
869
+ modelId: string | null;
870
+ modelName: string | null;
871
+ modelProvider: string | null;
872
+ modelSnapshot: Record<string, unknown>;
873
+ inputConnectorId: string | null;
874
+ inputConnectorName: string | null;
875
+ inputConnectorType: string | null;
876
+ inputConnectorSnapshot: Record<string, unknown>;
877
+ outputConnectorIds: string[];
878
+ outputConnectors: {
879
+ id: string;
880
+ name: string;
881
+ type: string;
882
+ }[];
883
+ outputConnectorSnapshots: Record<string, unknown>[];
884
+ trafficMode: "split" | "dual_run" | null;
885
+ trafficRatio: number | null;
886
+ runConfig: Record<string, unknown>;
887
+ variableMapping: unknown;
888
+ outputMapping: unknown;
889
+ filterRules: unknown;
890
+ recordMode: "all" | "selected_categories" | "correct_only";
891
+ recordCategories: string[];
892
+ externalIdField: string | null;
893
+ retentionDays: number | null;
894
+ sourceExperimentId: string | null;
895
+ submitReason: string;
896
+ metrics: Record<string, unknown> | null;
897
+ totalReceived: number;
898
+ totalProcessed: number;
899
+ totalFiltered: number;
900
+ totalCorrect: number;
901
+ totalErrors: number;
902
+ controlState: string | null;
903
+ controlStatePayload: Record<string, unknown> | null;
904
+ startedAt: string | null;
905
+ finishedAt: string | null;
906
+ createdBy: string;
907
+ createdAt: string;
908
+ updatedAt: string;
909
+ } | null;
910
+ activeCanaryEvent: {
911
+ id: string;
912
+ projectId: string;
913
+ releaseLineId: string;
914
+ releaseVersionId: string | null;
915
+ releaseVersionKind: "production" | "candidate" | null;
916
+ releaseVersionLabel: string | null;
917
+ releaseVersionProductionNumber: number | null;
918
+ releaseVersionTargetProductionNumber: number | null;
919
+ releaseVersionCandidateNumber: number | null;
920
+ annotationTaskId: string | null;
921
+ laneType: "canary" | "production";
922
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
923
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
924
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
925
+ sourceEventId: string | null;
926
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
927
+ sourceLegacyId: string | null;
928
+ supersedesEventId: string | null;
929
+ rollbackTargetEventId: string | null;
930
+ legacySource: "canary_release" | "production_release_event" | null;
931
+ legacySourceId: string | null;
932
+ promptId: string | null;
933
+ promptName: string;
934
+ promptVersionId: string | null;
935
+ promptVersionNumber: number | null;
936
+ promptVersionLabel: string | null;
937
+ promptSnapshot: Record<string, unknown>;
938
+ promptVersionSnapshot: Record<string, unknown>;
939
+ modelId: string | null;
940
+ modelName: string | null;
941
+ modelProvider: string | null;
942
+ modelSnapshot: Record<string, unknown>;
943
+ inputConnectorId: string | null;
944
+ inputConnectorName: string | null;
945
+ inputConnectorType: string | null;
946
+ inputConnectorSnapshot: Record<string, unknown>;
947
+ outputConnectorIds: string[];
948
+ outputConnectors: {
949
+ id: string;
950
+ name: string;
951
+ type: string;
952
+ }[];
953
+ outputConnectorSnapshots: Record<string, unknown>[];
954
+ trafficMode: "split" | "dual_run" | null;
955
+ trafficRatio: number | null;
956
+ runConfig: Record<string, unknown>;
957
+ variableMapping: unknown;
958
+ outputMapping: unknown;
959
+ filterRules: unknown;
960
+ recordMode: "all" | "selected_categories" | "correct_only";
961
+ recordCategories: string[];
962
+ externalIdField: string | null;
963
+ retentionDays: number | null;
964
+ sourceExperimentId: string | null;
965
+ submitReason: string;
966
+ metrics: Record<string, unknown> | null;
967
+ totalReceived: number;
968
+ totalProcessed: number;
969
+ totalFiltered: number;
970
+ totalCorrect: number;
971
+ totalErrors: number;
972
+ controlState: string | null;
973
+ controlStatePayload: Record<string, unknown> | null;
974
+ startedAt: string | null;
975
+ finishedAt: string | null;
976
+ createdBy: string;
977
+ createdAt: string;
978
+ updatedAt: string;
979
+ } | null;
980
+ versions: {
981
+ id: string;
982
+ projectId: string;
983
+ releaseLineId: string;
984
+ kind: "production" | "candidate";
985
+ productionVersionNumber: number | null;
986
+ targetProductionVersionNumber: number;
987
+ candidateNumber: number | null;
988
+ promotedFromReleaseVersionId: string | null;
989
+ label: string;
990
+ promptId: string | null;
991
+ promptName: string;
992
+ promptVersionId: string;
993
+ promptVersionNumber: number | null;
994
+ promptVersionLabel: string | null;
995
+ promptSnapshot: Record<string, unknown>;
996
+ promptVersionSnapshot: Record<string, unknown>;
997
+ modelId: string;
998
+ modelName: string | null;
999
+ modelProvider: string | null;
1000
+ modelSnapshot: Record<string, unknown>;
1001
+ createdBy: string;
1002
+ createdAt: string;
1003
+ updatedAt: string;
1004
+ }[];
1005
+ outputConnectors: {
1006
+ id: string;
1007
+ name: string;
1008
+ type: string;
1009
+ }[];
1010
+ latestEvent: {
1011
+ id: string;
1012
+ projectId: string;
1013
+ releaseLineId: string;
1014
+ releaseVersionId: string | null;
1015
+ releaseVersionKind: "production" | "candidate" | null;
1016
+ releaseVersionLabel: string | null;
1017
+ releaseVersionProductionNumber: number | null;
1018
+ releaseVersionTargetProductionNumber: number | null;
1019
+ releaseVersionCandidateNumber: number | null;
1020
+ annotationTaskId: string | null;
1021
+ laneType: "canary" | "production";
1022
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1023
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
1024
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
1025
+ sourceEventId: string | null;
1026
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1027
+ sourceLegacyId: string | null;
1028
+ supersedesEventId: string | null;
1029
+ rollbackTargetEventId: string | null;
1030
+ legacySource: "canary_release" | "production_release_event" | null;
1031
+ legacySourceId: string | null;
1032
+ promptId: string | null;
1033
+ promptName: string;
1034
+ promptVersionId: string | null;
1035
+ promptVersionNumber: number | null;
1036
+ promptVersionLabel: string | null;
1037
+ promptSnapshot: Record<string, unknown>;
1038
+ promptVersionSnapshot: Record<string, unknown>;
1039
+ modelId: string | null;
1040
+ modelName: string | null;
1041
+ modelProvider: string | null;
1042
+ modelSnapshot: Record<string, unknown>;
1043
+ inputConnectorId: string | null;
1044
+ inputConnectorName: string | null;
1045
+ inputConnectorType: string | null;
1046
+ inputConnectorSnapshot: Record<string, unknown>;
1047
+ outputConnectorIds: string[];
1048
+ outputConnectors: {
1049
+ id: string;
1050
+ name: string;
1051
+ type: string;
1052
+ }[];
1053
+ outputConnectorSnapshots: Record<string, unknown>[];
1054
+ trafficMode: "split" | "dual_run" | null;
1055
+ trafficRatio: number | null;
1056
+ runConfig: Record<string, unknown>;
1057
+ variableMapping: unknown;
1058
+ outputMapping: unknown;
1059
+ filterRules: unknown;
1060
+ recordMode: "all" | "selected_categories" | "correct_only";
1061
+ recordCategories: string[];
1062
+ externalIdField: string | null;
1063
+ retentionDays: number | null;
1064
+ sourceExperimentId: string | null;
1065
+ submitReason: string;
1066
+ metrics: Record<string, unknown> | null;
1067
+ totalReceived: number;
1068
+ totalProcessed: number;
1069
+ totalFiltered: number;
1070
+ totalCorrect: number;
1071
+ totalErrors: number;
1072
+ controlState: string | null;
1073
+ controlStatePayload: Record<string, unknown> | null;
1074
+ startedAt: string | null;
1075
+ finishedAt: string | null;
1076
+ createdBy: string;
1077
+ createdAt: string;
1078
+ updatedAt: string;
1079
+ } | null;
1080
+ createdBy: string;
1081
+ createdAt: string;
1082
+ updatedAt: string;
1083
+ archivedAt: string | null;
1084
+ }>;
1085
+ startLine(releaseLineId: string, rawBody: unknown, actor: CurrentUserPayload, project: ProjectContext): Promise<{
1086
+ id: string;
1087
+ projectId: string;
1088
+ name: string;
1089
+ description: string | null;
1090
+ promptId: string | null;
1091
+ promptName: string;
1092
+ promptSnapshot: Record<string, unknown>;
1093
+ inputConnectorId: string | null;
1094
+ inputConnectorName: string | null;
1095
+ inputConnectorType: string | null;
1096
+ inputConnectorSnapshot: Record<string, unknown>;
1097
+ status: "running" | "stopped" | "archived";
1098
+ currentProductionEventId: string | null;
1099
+ activeCanaryEventId: string | null;
1100
+ currentProductionEvent: {
1101
+ id: string;
1102
+ projectId: string;
1103
+ releaseLineId: string;
1104
+ releaseVersionId: string | null;
1105
+ releaseVersionKind: "production" | "candidate" | null;
1106
+ releaseVersionLabel: string | null;
1107
+ releaseVersionProductionNumber: number | null;
1108
+ releaseVersionTargetProductionNumber: number | null;
1109
+ releaseVersionCandidateNumber: number | null;
1110
+ annotationTaskId: string | null;
1111
+ laneType: "canary" | "production";
1112
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1113
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
1114
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
1115
+ sourceEventId: string | null;
1116
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1117
+ sourceLegacyId: string | null;
1118
+ supersedesEventId: string | null;
1119
+ rollbackTargetEventId: string | null;
1120
+ legacySource: "canary_release" | "production_release_event" | null;
1121
+ legacySourceId: string | null;
1122
+ promptId: string | null;
1123
+ promptName: string;
1124
+ promptVersionId: string | null;
1125
+ promptVersionNumber: number | null;
1126
+ promptVersionLabel: string | null;
1127
+ promptSnapshot: Record<string, unknown>;
1128
+ promptVersionSnapshot: Record<string, unknown>;
1129
+ modelId: string | null;
1130
+ modelName: string | null;
1131
+ modelProvider: string | null;
1132
+ modelSnapshot: Record<string, unknown>;
1133
+ inputConnectorId: string | null;
1134
+ inputConnectorName: string | null;
1135
+ inputConnectorType: string | null;
1136
+ inputConnectorSnapshot: Record<string, unknown>;
1137
+ outputConnectorIds: string[];
1138
+ outputConnectors: {
1139
+ id: string;
1140
+ name: string;
1141
+ type: string;
1142
+ }[];
1143
+ outputConnectorSnapshots: Record<string, unknown>[];
1144
+ trafficMode: "split" | "dual_run" | null;
1145
+ trafficRatio: number | null;
1146
+ runConfig: Record<string, unknown>;
1147
+ variableMapping: unknown;
1148
+ outputMapping: unknown;
1149
+ filterRules: unknown;
1150
+ recordMode: "all" | "selected_categories" | "correct_only";
1151
+ recordCategories: string[];
1152
+ externalIdField: string | null;
1153
+ retentionDays: number | null;
1154
+ sourceExperimentId: string | null;
1155
+ submitReason: string;
1156
+ metrics: Record<string, unknown> | null;
1157
+ totalReceived: number;
1158
+ totalProcessed: number;
1159
+ totalFiltered: number;
1160
+ totalCorrect: number;
1161
+ totalErrors: number;
1162
+ controlState: string | null;
1163
+ controlStatePayload: Record<string, unknown> | null;
1164
+ startedAt: string | null;
1165
+ finishedAt: string | null;
1166
+ createdBy: string;
1167
+ createdAt: string;
1168
+ updatedAt: string;
1169
+ } | null;
1170
+ activeCanaryEvent: {
1171
+ id: string;
1172
+ projectId: string;
1173
+ releaseLineId: string;
1174
+ releaseVersionId: string | null;
1175
+ releaseVersionKind: "production" | "candidate" | null;
1176
+ releaseVersionLabel: string | null;
1177
+ releaseVersionProductionNumber: number | null;
1178
+ releaseVersionTargetProductionNumber: number | null;
1179
+ releaseVersionCandidateNumber: number | null;
1180
+ annotationTaskId: string | null;
1181
+ laneType: "canary" | "production";
1182
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1183
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
1184
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
1185
+ sourceEventId: string | null;
1186
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1187
+ sourceLegacyId: string | null;
1188
+ supersedesEventId: string | null;
1189
+ rollbackTargetEventId: string | null;
1190
+ legacySource: "canary_release" | "production_release_event" | null;
1191
+ legacySourceId: string | null;
1192
+ promptId: string | null;
1193
+ promptName: string;
1194
+ promptVersionId: string | null;
1195
+ promptVersionNumber: number | null;
1196
+ promptVersionLabel: string | null;
1197
+ promptSnapshot: Record<string, unknown>;
1198
+ promptVersionSnapshot: Record<string, unknown>;
1199
+ modelId: string | null;
1200
+ modelName: string | null;
1201
+ modelProvider: string | null;
1202
+ modelSnapshot: Record<string, unknown>;
1203
+ inputConnectorId: string | null;
1204
+ inputConnectorName: string | null;
1205
+ inputConnectorType: string | null;
1206
+ inputConnectorSnapshot: Record<string, unknown>;
1207
+ outputConnectorIds: string[];
1208
+ outputConnectors: {
1209
+ id: string;
1210
+ name: string;
1211
+ type: string;
1212
+ }[];
1213
+ outputConnectorSnapshots: Record<string, unknown>[];
1214
+ trafficMode: "split" | "dual_run" | null;
1215
+ trafficRatio: number | null;
1216
+ runConfig: Record<string, unknown>;
1217
+ variableMapping: unknown;
1218
+ outputMapping: unknown;
1219
+ filterRules: unknown;
1220
+ recordMode: "all" | "selected_categories" | "correct_only";
1221
+ recordCategories: string[];
1222
+ externalIdField: string | null;
1223
+ retentionDays: number | null;
1224
+ sourceExperimentId: string | null;
1225
+ submitReason: string;
1226
+ metrics: Record<string, unknown> | null;
1227
+ totalReceived: number;
1228
+ totalProcessed: number;
1229
+ totalFiltered: number;
1230
+ totalCorrect: number;
1231
+ totalErrors: number;
1232
+ controlState: string | null;
1233
+ controlStatePayload: Record<string, unknown> | null;
1234
+ startedAt: string | null;
1235
+ finishedAt: string | null;
1236
+ createdBy: string;
1237
+ createdAt: string;
1238
+ updatedAt: string;
1239
+ } | null;
1240
+ versions: {
1241
+ id: string;
1242
+ projectId: string;
1243
+ releaseLineId: string;
1244
+ kind: "production" | "candidate";
1245
+ productionVersionNumber: number | null;
1246
+ targetProductionVersionNumber: number;
1247
+ candidateNumber: number | null;
1248
+ promotedFromReleaseVersionId: string | null;
1249
+ label: string;
1250
+ promptId: string | null;
1251
+ promptName: string;
1252
+ promptVersionId: string;
1253
+ promptVersionNumber: number | null;
1254
+ promptVersionLabel: string | null;
1255
+ promptSnapshot: Record<string, unknown>;
1256
+ promptVersionSnapshot: Record<string, unknown>;
1257
+ modelId: string;
1258
+ modelName: string | null;
1259
+ modelProvider: string | null;
1260
+ modelSnapshot: Record<string, unknown>;
1261
+ createdBy: string;
1262
+ createdAt: string;
1263
+ updatedAt: string;
1264
+ }[];
1265
+ outputConnectors: {
1266
+ id: string;
1267
+ name: string;
1268
+ type: string;
1269
+ }[];
1270
+ latestEvent: {
1271
+ id: string;
1272
+ projectId: string;
1273
+ releaseLineId: string;
1274
+ releaseVersionId: string | null;
1275
+ releaseVersionKind: "production" | "candidate" | null;
1276
+ releaseVersionLabel: string | null;
1277
+ releaseVersionProductionNumber: number | null;
1278
+ releaseVersionTargetProductionNumber: number | null;
1279
+ releaseVersionCandidateNumber: number | null;
1280
+ annotationTaskId: string | null;
1281
+ laneType: "canary" | "production";
1282
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1283
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
1284
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
1285
+ sourceEventId: string | null;
1286
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1287
+ sourceLegacyId: string | null;
1288
+ supersedesEventId: string | null;
1289
+ rollbackTargetEventId: string | null;
1290
+ legacySource: "canary_release" | "production_release_event" | null;
1291
+ legacySourceId: string | null;
1292
+ promptId: string | null;
1293
+ promptName: string;
1294
+ promptVersionId: string | null;
1295
+ promptVersionNumber: number | null;
1296
+ promptVersionLabel: string | null;
1297
+ promptSnapshot: Record<string, unknown>;
1298
+ promptVersionSnapshot: Record<string, unknown>;
1299
+ modelId: string | null;
1300
+ modelName: string | null;
1301
+ modelProvider: string | null;
1302
+ modelSnapshot: Record<string, unknown>;
1303
+ inputConnectorId: string | null;
1304
+ inputConnectorName: string | null;
1305
+ inputConnectorType: string | null;
1306
+ inputConnectorSnapshot: Record<string, unknown>;
1307
+ outputConnectorIds: string[];
1308
+ outputConnectors: {
1309
+ id: string;
1310
+ name: string;
1311
+ type: string;
1312
+ }[];
1313
+ outputConnectorSnapshots: Record<string, unknown>[];
1314
+ trafficMode: "split" | "dual_run" | null;
1315
+ trafficRatio: number | null;
1316
+ runConfig: Record<string, unknown>;
1317
+ variableMapping: unknown;
1318
+ outputMapping: unknown;
1319
+ filterRules: unknown;
1320
+ recordMode: "all" | "selected_categories" | "correct_only";
1321
+ recordCategories: string[];
1322
+ externalIdField: string | null;
1323
+ retentionDays: number | null;
1324
+ sourceExperimentId: string | null;
1325
+ submitReason: string;
1326
+ metrics: Record<string, unknown> | null;
1327
+ totalReceived: number;
1328
+ totalProcessed: number;
1329
+ totalFiltered: number;
1330
+ totalCorrect: number;
1331
+ totalErrors: number;
1332
+ controlState: string | null;
1333
+ controlStatePayload: Record<string, unknown> | null;
1334
+ startedAt: string | null;
1335
+ finishedAt: string | null;
1336
+ createdBy: string;
1337
+ createdAt: string;
1338
+ updatedAt: string;
1339
+ } | null;
1340
+ createdBy: string;
1341
+ createdAt: string;
1342
+ updatedAt: string;
1343
+ archivedAt: string | null;
1344
+ }>;
1345
+ archiveLine(releaseLineId: string, rawBody: unknown, actor: CurrentUserPayload, project: ProjectContext): Promise<{
1346
+ id: string;
1347
+ projectId: string;
1348
+ name: string;
1349
+ description: string | null;
1350
+ promptId: string | null;
1351
+ promptName: string;
1352
+ promptSnapshot: Record<string, unknown>;
1353
+ inputConnectorId: string | null;
1354
+ inputConnectorName: string | null;
1355
+ inputConnectorType: string | null;
1356
+ inputConnectorSnapshot: Record<string, unknown>;
1357
+ status: "running" | "stopped" | "archived";
1358
+ currentProductionEventId: string | null;
1359
+ activeCanaryEventId: string | null;
1360
+ currentProductionEvent: {
1361
+ id: string;
1362
+ projectId: string;
1363
+ releaseLineId: string;
1364
+ releaseVersionId: string | null;
1365
+ releaseVersionKind: "production" | "candidate" | null;
1366
+ releaseVersionLabel: string | null;
1367
+ releaseVersionProductionNumber: number | null;
1368
+ releaseVersionTargetProductionNumber: number | null;
1369
+ releaseVersionCandidateNumber: number | null;
1370
+ annotationTaskId: string | null;
1371
+ laneType: "canary" | "production";
1372
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1373
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
1374
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
1375
+ sourceEventId: string | null;
1376
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1377
+ sourceLegacyId: string | null;
1378
+ supersedesEventId: string | null;
1379
+ rollbackTargetEventId: string | null;
1380
+ legacySource: "canary_release" | "production_release_event" | null;
1381
+ legacySourceId: string | null;
1382
+ promptId: string | null;
1383
+ promptName: string;
1384
+ promptVersionId: string | null;
1385
+ promptVersionNumber: number | null;
1386
+ promptVersionLabel: string | null;
1387
+ promptSnapshot: Record<string, unknown>;
1388
+ promptVersionSnapshot: Record<string, unknown>;
1389
+ modelId: string | null;
1390
+ modelName: string | null;
1391
+ modelProvider: string | null;
1392
+ modelSnapshot: Record<string, unknown>;
1393
+ inputConnectorId: string | null;
1394
+ inputConnectorName: string | null;
1395
+ inputConnectorType: string | null;
1396
+ inputConnectorSnapshot: Record<string, unknown>;
1397
+ outputConnectorIds: string[];
1398
+ outputConnectors: {
1399
+ id: string;
1400
+ name: string;
1401
+ type: string;
1402
+ }[];
1403
+ outputConnectorSnapshots: Record<string, unknown>[];
1404
+ trafficMode: "split" | "dual_run" | null;
1405
+ trafficRatio: number | null;
1406
+ runConfig: Record<string, unknown>;
1407
+ variableMapping: unknown;
1408
+ outputMapping: unknown;
1409
+ filterRules: unknown;
1410
+ recordMode: "all" | "selected_categories" | "correct_only";
1411
+ recordCategories: string[];
1412
+ externalIdField: string | null;
1413
+ retentionDays: number | null;
1414
+ sourceExperimentId: string | null;
1415
+ submitReason: string;
1416
+ metrics: Record<string, unknown> | null;
1417
+ totalReceived: number;
1418
+ totalProcessed: number;
1419
+ totalFiltered: number;
1420
+ totalCorrect: number;
1421
+ totalErrors: number;
1422
+ controlState: string | null;
1423
+ controlStatePayload: Record<string, unknown> | null;
1424
+ startedAt: string | null;
1425
+ finishedAt: string | null;
1426
+ createdBy: string;
1427
+ createdAt: string;
1428
+ updatedAt: string;
1429
+ } | null;
1430
+ activeCanaryEvent: {
1431
+ id: string;
1432
+ projectId: string;
1433
+ releaseLineId: string;
1434
+ releaseVersionId: string | null;
1435
+ releaseVersionKind: "production" | "candidate" | null;
1436
+ releaseVersionLabel: string | null;
1437
+ releaseVersionProductionNumber: number | null;
1438
+ releaseVersionTargetProductionNumber: number | null;
1439
+ releaseVersionCandidateNumber: number | null;
1440
+ annotationTaskId: string | null;
1441
+ laneType: "canary" | "production";
1442
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1443
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
1444
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
1445
+ sourceEventId: string | null;
1446
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1447
+ sourceLegacyId: string | null;
1448
+ supersedesEventId: string | null;
1449
+ rollbackTargetEventId: string | null;
1450
+ legacySource: "canary_release" | "production_release_event" | null;
1451
+ legacySourceId: string | null;
1452
+ promptId: string | null;
1453
+ promptName: string;
1454
+ promptVersionId: string | null;
1455
+ promptVersionNumber: number | null;
1456
+ promptVersionLabel: string | null;
1457
+ promptSnapshot: Record<string, unknown>;
1458
+ promptVersionSnapshot: Record<string, unknown>;
1459
+ modelId: string | null;
1460
+ modelName: string | null;
1461
+ modelProvider: string | null;
1462
+ modelSnapshot: Record<string, unknown>;
1463
+ inputConnectorId: string | null;
1464
+ inputConnectorName: string | null;
1465
+ inputConnectorType: string | null;
1466
+ inputConnectorSnapshot: Record<string, unknown>;
1467
+ outputConnectorIds: string[];
1468
+ outputConnectors: {
1469
+ id: string;
1470
+ name: string;
1471
+ type: string;
1472
+ }[];
1473
+ outputConnectorSnapshots: Record<string, unknown>[];
1474
+ trafficMode: "split" | "dual_run" | null;
1475
+ trafficRatio: number | null;
1476
+ runConfig: Record<string, unknown>;
1477
+ variableMapping: unknown;
1478
+ outputMapping: unknown;
1479
+ filterRules: unknown;
1480
+ recordMode: "all" | "selected_categories" | "correct_only";
1481
+ recordCategories: string[];
1482
+ externalIdField: string | null;
1483
+ retentionDays: number | null;
1484
+ sourceExperimentId: string | null;
1485
+ submitReason: string;
1486
+ metrics: Record<string, unknown> | null;
1487
+ totalReceived: number;
1488
+ totalProcessed: number;
1489
+ totalFiltered: number;
1490
+ totalCorrect: number;
1491
+ totalErrors: number;
1492
+ controlState: string | null;
1493
+ controlStatePayload: Record<string, unknown> | null;
1494
+ startedAt: string | null;
1495
+ finishedAt: string | null;
1496
+ createdBy: string;
1497
+ createdAt: string;
1498
+ updatedAt: string;
1499
+ } | null;
1500
+ versions: {
1501
+ id: string;
1502
+ projectId: string;
1503
+ releaseLineId: string;
1504
+ kind: "production" | "candidate";
1505
+ productionVersionNumber: number | null;
1506
+ targetProductionVersionNumber: number;
1507
+ candidateNumber: number | null;
1508
+ promotedFromReleaseVersionId: string | null;
1509
+ label: string;
1510
+ promptId: string | null;
1511
+ promptName: string;
1512
+ promptVersionId: string;
1513
+ promptVersionNumber: number | null;
1514
+ promptVersionLabel: string | null;
1515
+ promptSnapshot: Record<string, unknown>;
1516
+ promptVersionSnapshot: Record<string, unknown>;
1517
+ modelId: string;
1518
+ modelName: string | null;
1519
+ modelProvider: string | null;
1520
+ modelSnapshot: Record<string, unknown>;
1521
+ createdBy: string;
1522
+ createdAt: string;
1523
+ updatedAt: string;
1524
+ }[];
1525
+ outputConnectors: {
1526
+ id: string;
1527
+ name: string;
1528
+ type: string;
1529
+ }[];
1530
+ latestEvent: {
1531
+ id: string;
1532
+ projectId: string;
1533
+ releaseLineId: string;
1534
+ releaseVersionId: string | null;
1535
+ releaseVersionKind: "production" | "candidate" | null;
1536
+ releaseVersionLabel: string | null;
1537
+ releaseVersionProductionNumber: number | null;
1538
+ releaseVersionTargetProductionNumber: number | null;
1539
+ releaseVersionCandidateNumber: number | null;
1540
+ annotationTaskId: string | null;
1541
+ laneType: "canary" | "production";
1542
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1543
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
1544
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
1545
+ sourceEventId: string | null;
1546
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1547
+ sourceLegacyId: string | null;
1548
+ supersedesEventId: string | null;
1549
+ rollbackTargetEventId: string | null;
1550
+ legacySource: "canary_release" | "production_release_event" | null;
1551
+ legacySourceId: string | null;
1552
+ promptId: string | null;
1553
+ promptName: string;
1554
+ promptVersionId: string | null;
1555
+ promptVersionNumber: number | null;
1556
+ promptVersionLabel: string | null;
1557
+ promptSnapshot: Record<string, unknown>;
1558
+ promptVersionSnapshot: Record<string, unknown>;
1559
+ modelId: string | null;
1560
+ modelName: string | null;
1561
+ modelProvider: string | null;
1562
+ modelSnapshot: Record<string, unknown>;
1563
+ inputConnectorId: string | null;
1564
+ inputConnectorName: string | null;
1565
+ inputConnectorType: string | null;
1566
+ inputConnectorSnapshot: Record<string, unknown>;
1567
+ outputConnectorIds: string[];
1568
+ outputConnectors: {
1569
+ id: string;
1570
+ name: string;
1571
+ type: string;
1572
+ }[];
1573
+ outputConnectorSnapshots: Record<string, unknown>[];
1574
+ trafficMode: "split" | "dual_run" | null;
1575
+ trafficRatio: number | null;
1576
+ runConfig: Record<string, unknown>;
1577
+ variableMapping: unknown;
1578
+ outputMapping: unknown;
1579
+ filterRules: unknown;
1580
+ recordMode: "all" | "selected_categories" | "correct_only";
1581
+ recordCategories: string[];
1582
+ externalIdField: string | null;
1583
+ retentionDays: number | null;
1584
+ sourceExperimentId: string | null;
1585
+ submitReason: string;
1586
+ metrics: Record<string, unknown> | null;
1587
+ totalReceived: number;
1588
+ totalProcessed: number;
1589
+ totalFiltered: number;
1590
+ totalCorrect: number;
1591
+ totalErrors: number;
1592
+ controlState: string | null;
1593
+ controlStatePayload: Record<string, unknown> | null;
1594
+ startedAt: string | null;
1595
+ finishedAt: string | null;
1596
+ createdBy: string;
1597
+ createdAt: string;
1598
+ updatedAt: string;
1599
+ } | null;
1600
+ createdBy: string;
1601
+ createdAt: string;
1602
+ updatedAt: string;
1603
+ archivedAt: string | null;
1604
+ }>;
1605
+ unarchiveLine(releaseLineId: string, rawBody: unknown, actor: CurrentUserPayload, project: ProjectContext): Promise<{
1606
+ id: string;
1607
+ projectId: string;
1608
+ name: string;
1609
+ description: string | null;
1610
+ promptId: string | null;
1611
+ promptName: string;
1612
+ promptSnapshot: Record<string, unknown>;
1613
+ inputConnectorId: string | null;
1614
+ inputConnectorName: string | null;
1615
+ inputConnectorType: string | null;
1616
+ inputConnectorSnapshot: Record<string, unknown>;
1617
+ status: "running" | "stopped" | "archived";
1618
+ currentProductionEventId: string | null;
1619
+ activeCanaryEventId: string | null;
1620
+ currentProductionEvent: {
1621
+ id: string;
1622
+ projectId: string;
1623
+ releaseLineId: string;
1624
+ releaseVersionId: string | null;
1625
+ releaseVersionKind: "production" | "candidate" | null;
1626
+ releaseVersionLabel: string | null;
1627
+ releaseVersionProductionNumber: number | null;
1628
+ releaseVersionTargetProductionNumber: number | null;
1629
+ releaseVersionCandidateNumber: number | null;
1630
+ annotationTaskId: string | null;
1631
+ laneType: "canary" | "production";
1632
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1633
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
1634
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
1635
+ sourceEventId: string | null;
1636
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1637
+ sourceLegacyId: string | null;
1638
+ supersedesEventId: string | null;
1639
+ rollbackTargetEventId: string | null;
1640
+ legacySource: "canary_release" | "production_release_event" | null;
1641
+ legacySourceId: string | null;
1642
+ promptId: string | null;
1643
+ promptName: string;
1644
+ promptVersionId: string | null;
1645
+ promptVersionNumber: number | null;
1646
+ promptVersionLabel: string | null;
1647
+ promptSnapshot: Record<string, unknown>;
1648
+ promptVersionSnapshot: Record<string, unknown>;
1649
+ modelId: string | null;
1650
+ modelName: string | null;
1651
+ modelProvider: string | null;
1652
+ modelSnapshot: Record<string, unknown>;
1653
+ inputConnectorId: string | null;
1654
+ inputConnectorName: string | null;
1655
+ inputConnectorType: string | null;
1656
+ inputConnectorSnapshot: Record<string, unknown>;
1657
+ outputConnectorIds: string[];
1658
+ outputConnectors: {
1659
+ id: string;
1660
+ name: string;
1661
+ type: string;
1662
+ }[];
1663
+ outputConnectorSnapshots: Record<string, unknown>[];
1664
+ trafficMode: "split" | "dual_run" | null;
1665
+ trafficRatio: number | null;
1666
+ runConfig: Record<string, unknown>;
1667
+ variableMapping: unknown;
1668
+ outputMapping: unknown;
1669
+ filterRules: unknown;
1670
+ recordMode: "all" | "selected_categories" | "correct_only";
1671
+ recordCategories: string[];
1672
+ externalIdField: string | null;
1673
+ retentionDays: number | null;
1674
+ sourceExperimentId: string | null;
1675
+ submitReason: string;
1676
+ metrics: Record<string, unknown> | null;
1677
+ totalReceived: number;
1678
+ totalProcessed: number;
1679
+ totalFiltered: number;
1680
+ totalCorrect: number;
1681
+ totalErrors: number;
1682
+ controlState: string | null;
1683
+ controlStatePayload: Record<string, unknown> | null;
1684
+ startedAt: string | null;
1685
+ finishedAt: string | null;
1686
+ createdBy: string;
1687
+ createdAt: string;
1688
+ updatedAt: string;
1689
+ } | null;
1690
+ activeCanaryEvent: {
1691
+ id: string;
1692
+ projectId: string;
1693
+ releaseLineId: string;
1694
+ releaseVersionId: string | null;
1695
+ releaseVersionKind: "production" | "candidate" | null;
1696
+ releaseVersionLabel: string | null;
1697
+ releaseVersionProductionNumber: number | null;
1698
+ releaseVersionTargetProductionNumber: number | null;
1699
+ releaseVersionCandidateNumber: number | null;
1700
+ annotationTaskId: string | null;
1701
+ laneType: "canary" | "production";
1702
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1703
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
1704
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
1705
+ sourceEventId: string | null;
1706
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1707
+ sourceLegacyId: string | null;
1708
+ supersedesEventId: string | null;
1709
+ rollbackTargetEventId: string | null;
1710
+ legacySource: "canary_release" | "production_release_event" | null;
1711
+ legacySourceId: string | null;
1712
+ promptId: string | null;
1713
+ promptName: string;
1714
+ promptVersionId: string | null;
1715
+ promptVersionNumber: number | null;
1716
+ promptVersionLabel: string | null;
1717
+ promptSnapshot: Record<string, unknown>;
1718
+ promptVersionSnapshot: Record<string, unknown>;
1719
+ modelId: string | null;
1720
+ modelName: string | null;
1721
+ modelProvider: string | null;
1722
+ modelSnapshot: Record<string, unknown>;
1723
+ inputConnectorId: string | null;
1724
+ inputConnectorName: string | null;
1725
+ inputConnectorType: string | null;
1726
+ inputConnectorSnapshot: Record<string, unknown>;
1727
+ outputConnectorIds: string[];
1728
+ outputConnectors: {
1729
+ id: string;
1730
+ name: string;
1731
+ type: string;
1732
+ }[];
1733
+ outputConnectorSnapshots: Record<string, unknown>[];
1734
+ trafficMode: "split" | "dual_run" | null;
1735
+ trafficRatio: number | null;
1736
+ runConfig: Record<string, unknown>;
1737
+ variableMapping: unknown;
1738
+ outputMapping: unknown;
1739
+ filterRules: unknown;
1740
+ recordMode: "all" | "selected_categories" | "correct_only";
1741
+ recordCategories: string[];
1742
+ externalIdField: string | null;
1743
+ retentionDays: number | null;
1744
+ sourceExperimentId: string | null;
1745
+ submitReason: string;
1746
+ metrics: Record<string, unknown> | null;
1747
+ totalReceived: number;
1748
+ totalProcessed: number;
1749
+ totalFiltered: number;
1750
+ totalCorrect: number;
1751
+ totalErrors: number;
1752
+ controlState: string | null;
1753
+ controlStatePayload: Record<string, unknown> | null;
1754
+ startedAt: string | null;
1755
+ finishedAt: string | null;
1756
+ createdBy: string;
1757
+ createdAt: string;
1758
+ updatedAt: string;
1759
+ } | null;
1760
+ versions: {
1761
+ id: string;
1762
+ projectId: string;
1763
+ releaseLineId: string;
1764
+ kind: "production" | "candidate";
1765
+ productionVersionNumber: number | null;
1766
+ targetProductionVersionNumber: number;
1767
+ candidateNumber: number | null;
1768
+ promotedFromReleaseVersionId: string | null;
1769
+ label: string;
1770
+ promptId: string | null;
1771
+ promptName: string;
1772
+ promptVersionId: string;
1773
+ promptVersionNumber: number | null;
1774
+ promptVersionLabel: string | null;
1775
+ promptSnapshot: Record<string, unknown>;
1776
+ promptVersionSnapshot: Record<string, unknown>;
1777
+ modelId: string;
1778
+ modelName: string | null;
1779
+ modelProvider: string | null;
1780
+ modelSnapshot: Record<string, unknown>;
1781
+ createdBy: string;
1782
+ createdAt: string;
1783
+ updatedAt: string;
1784
+ }[];
1785
+ outputConnectors: {
1786
+ id: string;
1787
+ name: string;
1788
+ type: string;
1789
+ }[];
1790
+ latestEvent: {
1791
+ id: string;
1792
+ projectId: string;
1793
+ releaseLineId: string;
1794
+ releaseVersionId: string | null;
1795
+ releaseVersionKind: "production" | "candidate" | null;
1796
+ releaseVersionLabel: string | null;
1797
+ releaseVersionProductionNumber: number | null;
1798
+ releaseVersionTargetProductionNumber: number | null;
1799
+ releaseVersionCandidateNumber: number | null;
1800
+ annotationTaskId: string | null;
1801
+ laneType: "canary" | "production";
1802
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1803
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
1804
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
1805
+ sourceEventId: string | null;
1806
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1807
+ sourceLegacyId: string | null;
1808
+ supersedesEventId: string | null;
1809
+ rollbackTargetEventId: string | null;
1810
+ legacySource: "canary_release" | "production_release_event" | null;
1811
+ legacySourceId: string | null;
1812
+ promptId: string | null;
1813
+ promptName: string;
1814
+ promptVersionId: string | null;
1815
+ promptVersionNumber: number | null;
1816
+ promptVersionLabel: string | null;
1817
+ promptSnapshot: Record<string, unknown>;
1818
+ promptVersionSnapshot: Record<string, unknown>;
1819
+ modelId: string | null;
1820
+ modelName: string | null;
1821
+ modelProvider: string | null;
1822
+ modelSnapshot: Record<string, unknown>;
1823
+ inputConnectorId: string | null;
1824
+ inputConnectorName: string | null;
1825
+ inputConnectorType: string | null;
1826
+ inputConnectorSnapshot: Record<string, unknown>;
1827
+ outputConnectorIds: string[];
1828
+ outputConnectors: {
1829
+ id: string;
1830
+ name: string;
1831
+ type: string;
1832
+ }[];
1833
+ outputConnectorSnapshots: Record<string, unknown>[];
1834
+ trafficMode: "split" | "dual_run" | null;
1835
+ trafficRatio: number | null;
1836
+ runConfig: Record<string, unknown>;
1837
+ variableMapping: unknown;
1838
+ outputMapping: unknown;
1839
+ filterRules: unknown;
1840
+ recordMode: "all" | "selected_categories" | "correct_only";
1841
+ recordCategories: string[];
1842
+ externalIdField: string | null;
1843
+ retentionDays: number | null;
1844
+ sourceExperimentId: string | null;
1845
+ submitReason: string;
1846
+ metrics: Record<string, unknown> | null;
1847
+ totalReceived: number;
1848
+ totalProcessed: number;
1849
+ totalFiltered: number;
1850
+ totalCorrect: number;
1851
+ totalErrors: number;
1852
+ controlState: string | null;
1853
+ controlStatePayload: Record<string, unknown> | null;
1854
+ startedAt: string | null;
1855
+ finishedAt: string | null;
1856
+ createdBy: string;
1857
+ createdAt: string;
1858
+ updatedAt: string;
1859
+ } | null;
1860
+ createdBy: string;
1861
+ createdAt: string;
1862
+ updatedAt: string;
1863
+ archivedAt: string | null;
1864
+ }>;
1865
+ restoreHistoryToProduction(releaseLineId: string, rawBody: unknown, actor: CurrentUserPayload, project: ProjectContext): Promise<{
1866
+ id: string;
1867
+ projectId: string;
1868
+ name: string;
1869
+ description: string | null;
1870
+ promptId: string | null;
1871
+ promptName: string;
1872
+ promptSnapshot: Record<string, unknown>;
1873
+ inputConnectorId: string | null;
1874
+ inputConnectorName: string | null;
1875
+ inputConnectorType: string | null;
1876
+ inputConnectorSnapshot: Record<string, unknown>;
1877
+ status: "running" | "stopped" | "archived";
1878
+ currentProductionEventId: string | null;
1879
+ activeCanaryEventId: string | null;
1880
+ currentProductionEvent: {
1881
+ id: string;
1882
+ projectId: string;
1883
+ releaseLineId: string;
1884
+ releaseVersionId: string | null;
1885
+ releaseVersionKind: "production" | "candidate" | null;
1886
+ releaseVersionLabel: string | null;
1887
+ releaseVersionProductionNumber: number | null;
1888
+ releaseVersionTargetProductionNumber: number | null;
1889
+ releaseVersionCandidateNumber: number | null;
1890
+ annotationTaskId: string | null;
1891
+ laneType: "canary" | "production";
1892
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1893
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
1894
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
1895
+ sourceEventId: string | null;
1896
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1897
+ sourceLegacyId: string | null;
1898
+ supersedesEventId: string | null;
1899
+ rollbackTargetEventId: string | null;
1900
+ legacySource: "canary_release" | "production_release_event" | null;
1901
+ legacySourceId: string | null;
1902
+ promptId: string | null;
1903
+ promptName: string;
1904
+ promptVersionId: string | null;
1905
+ promptVersionNumber: number | null;
1906
+ promptVersionLabel: string | null;
1907
+ promptSnapshot: Record<string, unknown>;
1908
+ promptVersionSnapshot: Record<string, unknown>;
1909
+ modelId: string | null;
1910
+ modelName: string | null;
1911
+ modelProvider: string | null;
1912
+ modelSnapshot: Record<string, unknown>;
1913
+ inputConnectorId: string | null;
1914
+ inputConnectorName: string | null;
1915
+ inputConnectorType: string | null;
1916
+ inputConnectorSnapshot: Record<string, unknown>;
1917
+ outputConnectorIds: string[];
1918
+ outputConnectors: {
1919
+ id: string;
1920
+ name: string;
1921
+ type: string;
1922
+ }[];
1923
+ outputConnectorSnapshots: Record<string, unknown>[];
1924
+ trafficMode: "split" | "dual_run" | null;
1925
+ trafficRatio: number | null;
1926
+ runConfig: Record<string, unknown>;
1927
+ variableMapping: unknown;
1928
+ outputMapping: unknown;
1929
+ filterRules: unknown;
1930
+ recordMode: "all" | "selected_categories" | "correct_only";
1931
+ recordCategories: string[];
1932
+ externalIdField: string | null;
1933
+ retentionDays: number | null;
1934
+ sourceExperimentId: string | null;
1935
+ submitReason: string;
1936
+ metrics: Record<string, unknown> | null;
1937
+ totalReceived: number;
1938
+ totalProcessed: number;
1939
+ totalFiltered: number;
1940
+ totalCorrect: number;
1941
+ totalErrors: number;
1942
+ controlState: string | null;
1943
+ controlStatePayload: Record<string, unknown> | null;
1944
+ startedAt: string | null;
1945
+ finishedAt: string | null;
1946
+ createdBy: string;
1947
+ createdAt: string;
1948
+ updatedAt: string;
1949
+ } | null;
1950
+ activeCanaryEvent: {
1951
+ id: string;
1952
+ projectId: string;
1953
+ releaseLineId: string;
1954
+ releaseVersionId: string | null;
1955
+ releaseVersionKind: "production" | "candidate" | null;
1956
+ releaseVersionLabel: string | null;
1957
+ releaseVersionProductionNumber: number | null;
1958
+ releaseVersionTargetProductionNumber: number | null;
1959
+ releaseVersionCandidateNumber: number | null;
1960
+ annotationTaskId: string | null;
1961
+ laneType: "canary" | "production";
1962
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
1963
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
1964
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
1965
+ sourceEventId: string | null;
1966
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
1967
+ sourceLegacyId: string | null;
1968
+ supersedesEventId: string | null;
1969
+ rollbackTargetEventId: string | null;
1970
+ legacySource: "canary_release" | "production_release_event" | null;
1971
+ legacySourceId: string | null;
1972
+ promptId: string | null;
1973
+ promptName: string;
1974
+ promptVersionId: string | null;
1975
+ promptVersionNumber: number | null;
1976
+ promptVersionLabel: string | null;
1977
+ promptSnapshot: Record<string, unknown>;
1978
+ promptVersionSnapshot: Record<string, unknown>;
1979
+ modelId: string | null;
1980
+ modelName: string | null;
1981
+ modelProvider: string | null;
1982
+ modelSnapshot: Record<string, unknown>;
1983
+ inputConnectorId: string | null;
1984
+ inputConnectorName: string | null;
1985
+ inputConnectorType: string | null;
1986
+ inputConnectorSnapshot: Record<string, unknown>;
1987
+ outputConnectorIds: string[];
1988
+ outputConnectors: {
1989
+ id: string;
1990
+ name: string;
1991
+ type: string;
1992
+ }[];
1993
+ outputConnectorSnapshots: Record<string, unknown>[];
1994
+ trafficMode: "split" | "dual_run" | null;
1995
+ trafficRatio: number | null;
1996
+ runConfig: Record<string, unknown>;
1997
+ variableMapping: unknown;
1998
+ outputMapping: unknown;
1999
+ filterRules: unknown;
2000
+ recordMode: "all" | "selected_categories" | "correct_only";
2001
+ recordCategories: string[];
2002
+ externalIdField: string | null;
2003
+ retentionDays: number | null;
2004
+ sourceExperimentId: string | null;
2005
+ submitReason: string;
2006
+ metrics: Record<string, unknown> | null;
2007
+ totalReceived: number;
2008
+ totalProcessed: number;
2009
+ totalFiltered: number;
2010
+ totalCorrect: number;
2011
+ totalErrors: number;
2012
+ controlState: string | null;
2013
+ controlStatePayload: Record<string, unknown> | null;
2014
+ startedAt: string | null;
2015
+ finishedAt: string | null;
2016
+ createdBy: string;
2017
+ createdAt: string;
2018
+ updatedAt: string;
2019
+ } | null;
2020
+ versions: {
2021
+ id: string;
2022
+ projectId: string;
2023
+ releaseLineId: string;
2024
+ kind: "production" | "candidate";
2025
+ productionVersionNumber: number | null;
2026
+ targetProductionVersionNumber: number;
2027
+ candidateNumber: number | null;
2028
+ promotedFromReleaseVersionId: string | null;
2029
+ label: string;
2030
+ promptId: string | null;
2031
+ promptName: string;
2032
+ promptVersionId: string;
2033
+ promptVersionNumber: number | null;
2034
+ promptVersionLabel: string | null;
2035
+ promptSnapshot: Record<string, unknown>;
2036
+ promptVersionSnapshot: Record<string, unknown>;
2037
+ modelId: string;
2038
+ modelName: string | null;
2039
+ modelProvider: string | null;
2040
+ modelSnapshot: Record<string, unknown>;
2041
+ createdBy: string;
2042
+ createdAt: string;
2043
+ updatedAt: string;
2044
+ }[];
2045
+ outputConnectors: {
2046
+ id: string;
2047
+ name: string;
2048
+ type: string;
2049
+ }[];
2050
+ latestEvent: {
2051
+ id: string;
2052
+ projectId: string;
2053
+ releaseLineId: string;
2054
+ releaseVersionId: string | null;
2055
+ releaseVersionKind: "production" | "candidate" | null;
2056
+ releaseVersionLabel: string | null;
2057
+ releaseVersionProductionNumber: number | null;
2058
+ releaseVersionTargetProductionNumber: number | null;
2059
+ releaseVersionCandidateNumber: number | null;
2060
+ annotationTaskId: string | null;
2061
+ laneType: "canary" | "production";
2062
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2063
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
2064
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
2065
+ sourceEventId: string | null;
2066
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2067
+ sourceLegacyId: string | null;
2068
+ supersedesEventId: string | null;
2069
+ rollbackTargetEventId: string | null;
2070
+ legacySource: "canary_release" | "production_release_event" | null;
2071
+ legacySourceId: string | null;
2072
+ promptId: string | null;
2073
+ promptName: string;
2074
+ promptVersionId: string | null;
2075
+ promptVersionNumber: number | null;
2076
+ promptVersionLabel: string | null;
2077
+ promptSnapshot: Record<string, unknown>;
2078
+ promptVersionSnapshot: Record<string, unknown>;
2079
+ modelId: string | null;
2080
+ modelName: string | null;
2081
+ modelProvider: string | null;
2082
+ modelSnapshot: Record<string, unknown>;
2083
+ inputConnectorId: string | null;
2084
+ inputConnectorName: string | null;
2085
+ inputConnectorType: string | null;
2086
+ inputConnectorSnapshot: Record<string, unknown>;
2087
+ outputConnectorIds: string[];
2088
+ outputConnectors: {
2089
+ id: string;
2090
+ name: string;
2091
+ type: string;
2092
+ }[];
2093
+ outputConnectorSnapshots: Record<string, unknown>[];
2094
+ trafficMode: "split" | "dual_run" | null;
2095
+ trafficRatio: number | null;
2096
+ runConfig: Record<string, unknown>;
2097
+ variableMapping: unknown;
2098
+ outputMapping: unknown;
2099
+ filterRules: unknown;
2100
+ recordMode: "all" | "selected_categories" | "correct_only";
2101
+ recordCategories: string[];
2102
+ externalIdField: string | null;
2103
+ retentionDays: number | null;
2104
+ sourceExperimentId: string | null;
2105
+ submitReason: string;
2106
+ metrics: Record<string, unknown> | null;
2107
+ totalReceived: number;
2108
+ totalProcessed: number;
2109
+ totalFiltered: number;
2110
+ totalCorrect: number;
2111
+ totalErrors: number;
2112
+ controlState: string | null;
2113
+ controlStatePayload: Record<string, unknown> | null;
2114
+ startedAt: string | null;
2115
+ finishedAt: string | null;
2116
+ createdBy: string;
2117
+ createdAt: string;
2118
+ updatedAt: string;
2119
+ } | null;
2120
+ createdBy: string;
2121
+ createdAt: string;
2122
+ updatedAt: string;
2123
+ archivedAt: string | null;
2124
+ }>;
2125
+ restoreHistoryToCanary(releaseLineId: string, rawBody: unknown, actor: CurrentUserPayload, project: ProjectContext): Promise<{
2126
+ id: string;
2127
+ projectId: string;
2128
+ name: string;
2129
+ description: string | null;
2130
+ promptId: string | null;
2131
+ promptName: string;
2132
+ promptSnapshot: Record<string, unknown>;
2133
+ inputConnectorId: string | null;
2134
+ inputConnectorName: string | null;
2135
+ inputConnectorType: string | null;
2136
+ inputConnectorSnapshot: Record<string, unknown>;
2137
+ status: "running" | "stopped" | "archived";
2138
+ currentProductionEventId: string | null;
2139
+ activeCanaryEventId: string | null;
2140
+ currentProductionEvent: {
2141
+ id: string;
2142
+ projectId: string;
2143
+ releaseLineId: string;
2144
+ releaseVersionId: string | null;
2145
+ releaseVersionKind: "production" | "candidate" | null;
2146
+ releaseVersionLabel: string | null;
2147
+ releaseVersionProductionNumber: number | null;
2148
+ releaseVersionTargetProductionNumber: number | null;
2149
+ releaseVersionCandidateNumber: number | null;
2150
+ annotationTaskId: string | null;
2151
+ laneType: "canary" | "production";
2152
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2153
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
2154
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
2155
+ sourceEventId: string | null;
2156
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2157
+ sourceLegacyId: string | null;
2158
+ supersedesEventId: string | null;
2159
+ rollbackTargetEventId: string | null;
2160
+ legacySource: "canary_release" | "production_release_event" | null;
2161
+ legacySourceId: string | null;
2162
+ promptId: string | null;
2163
+ promptName: string;
2164
+ promptVersionId: string | null;
2165
+ promptVersionNumber: number | null;
2166
+ promptVersionLabel: string | null;
2167
+ promptSnapshot: Record<string, unknown>;
2168
+ promptVersionSnapshot: Record<string, unknown>;
2169
+ modelId: string | null;
2170
+ modelName: string | null;
2171
+ modelProvider: string | null;
2172
+ modelSnapshot: Record<string, unknown>;
2173
+ inputConnectorId: string | null;
2174
+ inputConnectorName: string | null;
2175
+ inputConnectorType: string | null;
2176
+ inputConnectorSnapshot: Record<string, unknown>;
2177
+ outputConnectorIds: string[];
2178
+ outputConnectors: {
2179
+ id: string;
2180
+ name: string;
2181
+ type: string;
2182
+ }[];
2183
+ outputConnectorSnapshots: Record<string, unknown>[];
2184
+ trafficMode: "split" | "dual_run" | null;
2185
+ trafficRatio: number | null;
2186
+ runConfig: Record<string, unknown>;
2187
+ variableMapping: unknown;
2188
+ outputMapping: unknown;
2189
+ filterRules: unknown;
2190
+ recordMode: "all" | "selected_categories" | "correct_only";
2191
+ recordCategories: string[];
2192
+ externalIdField: string | null;
2193
+ retentionDays: number | null;
2194
+ sourceExperimentId: string | null;
2195
+ submitReason: string;
2196
+ metrics: Record<string, unknown> | null;
2197
+ totalReceived: number;
2198
+ totalProcessed: number;
2199
+ totalFiltered: number;
2200
+ totalCorrect: number;
2201
+ totalErrors: number;
2202
+ controlState: string | null;
2203
+ controlStatePayload: Record<string, unknown> | null;
2204
+ startedAt: string | null;
2205
+ finishedAt: string | null;
2206
+ createdBy: string;
2207
+ createdAt: string;
2208
+ updatedAt: string;
2209
+ } | null;
2210
+ activeCanaryEvent: {
2211
+ id: string;
2212
+ projectId: string;
2213
+ releaseLineId: string;
2214
+ releaseVersionId: string | null;
2215
+ releaseVersionKind: "production" | "candidate" | null;
2216
+ releaseVersionLabel: string | null;
2217
+ releaseVersionProductionNumber: number | null;
2218
+ releaseVersionTargetProductionNumber: number | null;
2219
+ releaseVersionCandidateNumber: number | null;
2220
+ annotationTaskId: string | null;
2221
+ laneType: "canary" | "production";
2222
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2223
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
2224
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
2225
+ sourceEventId: string | null;
2226
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2227
+ sourceLegacyId: string | null;
2228
+ supersedesEventId: string | null;
2229
+ rollbackTargetEventId: string | null;
2230
+ legacySource: "canary_release" | "production_release_event" | null;
2231
+ legacySourceId: string | null;
2232
+ promptId: string | null;
2233
+ promptName: string;
2234
+ promptVersionId: string | null;
2235
+ promptVersionNumber: number | null;
2236
+ promptVersionLabel: string | null;
2237
+ promptSnapshot: Record<string, unknown>;
2238
+ promptVersionSnapshot: Record<string, unknown>;
2239
+ modelId: string | null;
2240
+ modelName: string | null;
2241
+ modelProvider: string | null;
2242
+ modelSnapshot: Record<string, unknown>;
2243
+ inputConnectorId: string | null;
2244
+ inputConnectorName: string | null;
2245
+ inputConnectorType: string | null;
2246
+ inputConnectorSnapshot: Record<string, unknown>;
2247
+ outputConnectorIds: string[];
2248
+ outputConnectors: {
2249
+ id: string;
2250
+ name: string;
2251
+ type: string;
2252
+ }[];
2253
+ outputConnectorSnapshots: Record<string, unknown>[];
2254
+ trafficMode: "split" | "dual_run" | null;
2255
+ trafficRatio: number | null;
2256
+ runConfig: Record<string, unknown>;
2257
+ variableMapping: unknown;
2258
+ outputMapping: unknown;
2259
+ filterRules: unknown;
2260
+ recordMode: "all" | "selected_categories" | "correct_only";
2261
+ recordCategories: string[];
2262
+ externalIdField: string | null;
2263
+ retentionDays: number | null;
2264
+ sourceExperimentId: string | null;
2265
+ submitReason: string;
2266
+ metrics: Record<string, unknown> | null;
2267
+ totalReceived: number;
2268
+ totalProcessed: number;
2269
+ totalFiltered: number;
2270
+ totalCorrect: number;
2271
+ totalErrors: number;
2272
+ controlState: string | null;
2273
+ controlStatePayload: Record<string, unknown> | null;
2274
+ startedAt: string | null;
2275
+ finishedAt: string | null;
2276
+ createdBy: string;
2277
+ createdAt: string;
2278
+ updatedAt: string;
2279
+ } | null;
2280
+ versions: {
2281
+ id: string;
2282
+ projectId: string;
2283
+ releaseLineId: string;
2284
+ kind: "production" | "candidate";
2285
+ productionVersionNumber: number | null;
2286
+ targetProductionVersionNumber: number;
2287
+ candidateNumber: number | null;
2288
+ promotedFromReleaseVersionId: string | null;
2289
+ label: string;
2290
+ promptId: string | null;
2291
+ promptName: string;
2292
+ promptVersionId: string;
2293
+ promptVersionNumber: number | null;
2294
+ promptVersionLabel: string | null;
2295
+ promptSnapshot: Record<string, unknown>;
2296
+ promptVersionSnapshot: Record<string, unknown>;
2297
+ modelId: string;
2298
+ modelName: string | null;
2299
+ modelProvider: string | null;
2300
+ modelSnapshot: Record<string, unknown>;
2301
+ createdBy: string;
2302
+ createdAt: string;
2303
+ updatedAt: string;
2304
+ }[];
2305
+ outputConnectors: {
2306
+ id: string;
2307
+ name: string;
2308
+ type: string;
2309
+ }[];
2310
+ latestEvent: {
2311
+ id: string;
2312
+ projectId: string;
2313
+ releaseLineId: string;
2314
+ releaseVersionId: string | null;
2315
+ releaseVersionKind: "production" | "candidate" | null;
2316
+ releaseVersionLabel: string | null;
2317
+ releaseVersionProductionNumber: number | null;
2318
+ releaseVersionTargetProductionNumber: number | null;
2319
+ releaseVersionCandidateNumber: number | null;
2320
+ annotationTaskId: string | null;
2321
+ laneType: "canary" | "production";
2322
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2323
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
2324
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
2325
+ sourceEventId: string | null;
2326
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2327
+ sourceLegacyId: string | null;
2328
+ supersedesEventId: string | null;
2329
+ rollbackTargetEventId: string | null;
2330
+ legacySource: "canary_release" | "production_release_event" | null;
2331
+ legacySourceId: string | null;
2332
+ promptId: string | null;
2333
+ promptName: string;
2334
+ promptVersionId: string | null;
2335
+ promptVersionNumber: number | null;
2336
+ promptVersionLabel: string | null;
2337
+ promptSnapshot: Record<string, unknown>;
2338
+ promptVersionSnapshot: Record<string, unknown>;
2339
+ modelId: string | null;
2340
+ modelName: string | null;
2341
+ modelProvider: string | null;
2342
+ modelSnapshot: Record<string, unknown>;
2343
+ inputConnectorId: string | null;
2344
+ inputConnectorName: string | null;
2345
+ inputConnectorType: string | null;
2346
+ inputConnectorSnapshot: Record<string, unknown>;
2347
+ outputConnectorIds: string[];
2348
+ outputConnectors: {
2349
+ id: string;
2350
+ name: string;
2351
+ type: string;
2352
+ }[];
2353
+ outputConnectorSnapshots: Record<string, unknown>[];
2354
+ trafficMode: "split" | "dual_run" | null;
2355
+ trafficRatio: number | null;
2356
+ runConfig: Record<string, unknown>;
2357
+ variableMapping: unknown;
2358
+ outputMapping: unknown;
2359
+ filterRules: unknown;
2360
+ recordMode: "all" | "selected_categories" | "correct_only";
2361
+ recordCategories: string[];
2362
+ externalIdField: string | null;
2363
+ retentionDays: number | null;
2364
+ sourceExperimentId: string | null;
2365
+ submitReason: string;
2366
+ metrics: Record<string, unknown> | null;
2367
+ totalReceived: number;
2368
+ totalProcessed: number;
2369
+ totalFiltered: number;
2370
+ totalCorrect: number;
2371
+ totalErrors: number;
2372
+ controlState: string | null;
2373
+ controlStatePayload: Record<string, unknown> | null;
2374
+ startedAt: string | null;
2375
+ finishedAt: string | null;
2376
+ createdBy: string;
2377
+ createdAt: string;
2378
+ updatedAt: string;
2379
+ } | null;
2380
+ createdBy: string;
2381
+ createdAt: string;
2382
+ updatedAt: string;
2383
+ archivedAt: string | null;
2384
+ }>;
2385
+ deleteLine(releaseLineId: string, rawBody: unknown, actor: CurrentUserPayload, project: ProjectContext): Promise<{
2386
+ ok: boolean;
2387
+ }>;
2388
+ updateRunConfig(releaseLineId: string, rawBody: unknown, actor: CurrentUserPayload, project: ProjectContext): Promise<{
2389
+ id: string;
2390
+ projectId: string;
2391
+ name: string;
2392
+ description: string | null;
2393
+ promptId: string | null;
2394
+ promptName: string;
2395
+ promptSnapshot: Record<string, unknown>;
2396
+ inputConnectorId: string | null;
2397
+ inputConnectorName: string | null;
2398
+ inputConnectorType: string | null;
2399
+ inputConnectorSnapshot: Record<string, unknown>;
2400
+ status: "running" | "stopped" | "archived";
2401
+ currentProductionEventId: string | null;
2402
+ activeCanaryEventId: string | null;
2403
+ currentProductionEvent: {
2404
+ id: string;
2405
+ projectId: string;
2406
+ releaseLineId: string;
2407
+ releaseVersionId: string | null;
2408
+ releaseVersionKind: "production" | "candidate" | null;
2409
+ releaseVersionLabel: string | null;
2410
+ releaseVersionProductionNumber: number | null;
2411
+ releaseVersionTargetProductionNumber: number | null;
2412
+ releaseVersionCandidateNumber: number | null;
2413
+ annotationTaskId: string | null;
2414
+ laneType: "canary" | "production";
2415
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2416
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
2417
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
2418
+ sourceEventId: string | null;
2419
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2420
+ sourceLegacyId: string | null;
2421
+ supersedesEventId: string | null;
2422
+ rollbackTargetEventId: string | null;
2423
+ legacySource: "canary_release" | "production_release_event" | null;
2424
+ legacySourceId: string | null;
2425
+ promptId: string | null;
2426
+ promptName: string;
2427
+ promptVersionId: string | null;
2428
+ promptVersionNumber: number | null;
2429
+ promptVersionLabel: string | null;
2430
+ promptSnapshot: Record<string, unknown>;
2431
+ promptVersionSnapshot: Record<string, unknown>;
2432
+ modelId: string | null;
2433
+ modelName: string | null;
2434
+ modelProvider: string | null;
2435
+ modelSnapshot: Record<string, unknown>;
2436
+ inputConnectorId: string | null;
2437
+ inputConnectorName: string | null;
2438
+ inputConnectorType: string | null;
2439
+ inputConnectorSnapshot: Record<string, unknown>;
2440
+ outputConnectorIds: string[];
2441
+ outputConnectors: {
2442
+ id: string;
2443
+ name: string;
2444
+ type: string;
2445
+ }[];
2446
+ outputConnectorSnapshots: Record<string, unknown>[];
2447
+ trafficMode: "split" | "dual_run" | null;
2448
+ trafficRatio: number | null;
2449
+ runConfig: Record<string, unknown>;
2450
+ variableMapping: unknown;
2451
+ outputMapping: unknown;
2452
+ filterRules: unknown;
2453
+ recordMode: "all" | "selected_categories" | "correct_only";
2454
+ recordCategories: string[];
2455
+ externalIdField: string | null;
2456
+ retentionDays: number | null;
2457
+ sourceExperimentId: string | null;
2458
+ submitReason: string;
2459
+ metrics: Record<string, unknown> | null;
2460
+ totalReceived: number;
2461
+ totalProcessed: number;
2462
+ totalFiltered: number;
2463
+ totalCorrect: number;
2464
+ totalErrors: number;
2465
+ controlState: string | null;
2466
+ controlStatePayload: Record<string, unknown> | null;
2467
+ startedAt: string | null;
2468
+ finishedAt: string | null;
2469
+ createdBy: string;
2470
+ createdAt: string;
2471
+ updatedAt: string;
2472
+ } | null;
2473
+ activeCanaryEvent: {
2474
+ id: string;
2475
+ projectId: string;
2476
+ releaseLineId: string;
2477
+ releaseVersionId: string | null;
2478
+ releaseVersionKind: "production" | "candidate" | null;
2479
+ releaseVersionLabel: string | null;
2480
+ releaseVersionProductionNumber: number | null;
2481
+ releaseVersionTargetProductionNumber: number | null;
2482
+ releaseVersionCandidateNumber: number | null;
2483
+ annotationTaskId: string | null;
2484
+ laneType: "canary" | "production";
2485
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2486
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
2487
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
2488
+ sourceEventId: string | null;
2489
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2490
+ sourceLegacyId: string | null;
2491
+ supersedesEventId: string | null;
2492
+ rollbackTargetEventId: string | null;
2493
+ legacySource: "canary_release" | "production_release_event" | null;
2494
+ legacySourceId: string | null;
2495
+ promptId: string | null;
2496
+ promptName: string;
2497
+ promptVersionId: string | null;
2498
+ promptVersionNumber: number | null;
2499
+ promptVersionLabel: string | null;
2500
+ promptSnapshot: Record<string, unknown>;
2501
+ promptVersionSnapshot: Record<string, unknown>;
2502
+ modelId: string | null;
2503
+ modelName: string | null;
2504
+ modelProvider: string | null;
2505
+ modelSnapshot: Record<string, unknown>;
2506
+ inputConnectorId: string | null;
2507
+ inputConnectorName: string | null;
2508
+ inputConnectorType: string | null;
2509
+ inputConnectorSnapshot: Record<string, unknown>;
2510
+ outputConnectorIds: string[];
2511
+ outputConnectors: {
2512
+ id: string;
2513
+ name: string;
2514
+ type: string;
2515
+ }[];
2516
+ outputConnectorSnapshots: Record<string, unknown>[];
2517
+ trafficMode: "split" | "dual_run" | null;
2518
+ trafficRatio: number | null;
2519
+ runConfig: Record<string, unknown>;
2520
+ variableMapping: unknown;
2521
+ outputMapping: unknown;
2522
+ filterRules: unknown;
2523
+ recordMode: "all" | "selected_categories" | "correct_only";
2524
+ recordCategories: string[];
2525
+ externalIdField: string | null;
2526
+ retentionDays: number | null;
2527
+ sourceExperimentId: string | null;
2528
+ submitReason: string;
2529
+ metrics: Record<string, unknown> | null;
2530
+ totalReceived: number;
2531
+ totalProcessed: number;
2532
+ totalFiltered: number;
2533
+ totalCorrect: number;
2534
+ totalErrors: number;
2535
+ controlState: string | null;
2536
+ controlStatePayload: Record<string, unknown> | null;
2537
+ startedAt: string | null;
2538
+ finishedAt: string | null;
2539
+ createdBy: string;
2540
+ createdAt: string;
2541
+ updatedAt: string;
2542
+ } | null;
2543
+ versions: {
2544
+ id: string;
2545
+ projectId: string;
2546
+ releaseLineId: string;
2547
+ kind: "production" | "candidate";
2548
+ productionVersionNumber: number | null;
2549
+ targetProductionVersionNumber: number;
2550
+ candidateNumber: number | null;
2551
+ promotedFromReleaseVersionId: string | null;
2552
+ label: string;
2553
+ promptId: string | null;
2554
+ promptName: string;
2555
+ promptVersionId: string;
2556
+ promptVersionNumber: number | null;
2557
+ promptVersionLabel: string | null;
2558
+ promptSnapshot: Record<string, unknown>;
2559
+ promptVersionSnapshot: Record<string, unknown>;
2560
+ modelId: string;
2561
+ modelName: string | null;
2562
+ modelProvider: string | null;
2563
+ modelSnapshot: Record<string, unknown>;
2564
+ createdBy: string;
2565
+ createdAt: string;
2566
+ updatedAt: string;
2567
+ }[];
2568
+ outputConnectors: {
2569
+ id: string;
2570
+ name: string;
2571
+ type: string;
2572
+ }[];
2573
+ latestEvent: {
2574
+ id: string;
2575
+ projectId: string;
2576
+ releaseLineId: string;
2577
+ releaseVersionId: string | null;
2578
+ releaseVersionKind: "production" | "candidate" | null;
2579
+ releaseVersionLabel: string | null;
2580
+ releaseVersionProductionNumber: number | null;
2581
+ releaseVersionTargetProductionNumber: number | null;
2582
+ releaseVersionCandidateNumber: number | null;
2583
+ annotationTaskId: string | null;
2584
+ laneType: "canary" | "production";
2585
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2586
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
2587
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
2588
+ sourceEventId: string | null;
2589
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2590
+ sourceLegacyId: string | null;
2591
+ supersedesEventId: string | null;
2592
+ rollbackTargetEventId: string | null;
2593
+ legacySource: "canary_release" | "production_release_event" | null;
2594
+ legacySourceId: string | null;
2595
+ promptId: string | null;
2596
+ promptName: string;
2597
+ promptVersionId: string | null;
2598
+ promptVersionNumber: number | null;
2599
+ promptVersionLabel: string | null;
2600
+ promptSnapshot: Record<string, unknown>;
2601
+ promptVersionSnapshot: Record<string, unknown>;
2602
+ modelId: string | null;
2603
+ modelName: string | null;
2604
+ modelProvider: string | null;
2605
+ modelSnapshot: Record<string, unknown>;
2606
+ inputConnectorId: string | null;
2607
+ inputConnectorName: string | null;
2608
+ inputConnectorType: string | null;
2609
+ inputConnectorSnapshot: Record<string, unknown>;
2610
+ outputConnectorIds: string[];
2611
+ outputConnectors: {
2612
+ id: string;
2613
+ name: string;
2614
+ type: string;
2615
+ }[];
2616
+ outputConnectorSnapshots: Record<string, unknown>[];
2617
+ trafficMode: "split" | "dual_run" | null;
2618
+ trafficRatio: number | null;
2619
+ runConfig: Record<string, unknown>;
2620
+ variableMapping: unknown;
2621
+ outputMapping: unknown;
2622
+ filterRules: unknown;
2623
+ recordMode: "all" | "selected_categories" | "correct_only";
2624
+ recordCategories: string[];
2625
+ externalIdField: string | null;
2626
+ retentionDays: number | null;
2627
+ sourceExperimentId: string | null;
2628
+ submitReason: string;
2629
+ metrics: Record<string, unknown> | null;
2630
+ totalReceived: number;
2631
+ totalProcessed: number;
2632
+ totalFiltered: number;
2633
+ totalCorrect: number;
2634
+ totalErrors: number;
2635
+ controlState: string | null;
2636
+ controlStatePayload: Record<string, unknown> | null;
2637
+ startedAt: string | null;
2638
+ finishedAt: string | null;
2639
+ createdBy: string;
2640
+ createdAt: string;
2641
+ updatedAt: string;
2642
+ } | null;
2643
+ createdBy: string;
2644
+ createdAt: string;
2645
+ updatedAt: string;
2646
+ archivedAt: string | null;
2647
+ }>;
2648
+ updateOutputRoute(releaseLineId: string, rawBody: unknown, actor: CurrentUserPayload, project: ProjectContext): Promise<{
2649
+ id: string;
2650
+ projectId: string;
2651
+ name: string;
2652
+ description: string | null;
2653
+ promptId: string | null;
2654
+ promptName: string;
2655
+ promptSnapshot: Record<string, unknown>;
2656
+ inputConnectorId: string | null;
2657
+ inputConnectorName: string | null;
2658
+ inputConnectorType: string | null;
2659
+ inputConnectorSnapshot: Record<string, unknown>;
2660
+ status: "running" | "stopped" | "archived";
2661
+ currentProductionEventId: string | null;
2662
+ activeCanaryEventId: string | null;
2663
+ currentProductionEvent: {
2664
+ id: string;
2665
+ projectId: string;
2666
+ releaseLineId: string;
2667
+ releaseVersionId: string | null;
2668
+ releaseVersionKind: "production" | "candidate" | null;
2669
+ releaseVersionLabel: string | null;
2670
+ releaseVersionProductionNumber: number | null;
2671
+ releaseVersionTargetProductionNumber: number | null;
2672
+ releaseVersionCandidateNumber: number | null;
2673
+ annotationTaskId: string | null;
2674
+ laneType: "canary" | "production";
2675
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2676
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
2677
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
2678
+ sourceEventId: string | null;
2679
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2680
+ sourceLegacyId: string | null;
2681
+ supersedesEventId: string | null;
2682
+ rollbackTargetEventId: string | null;
2683
+ legacySource: "canary_release" | "production_release_event" | null;
2684
+ legacySourceId: string | null;
2685
+ promptId: string | null;
2686
+ promptName: string;
2687
+ promptVersionId: string | null;
2688
+ promptVersionNumber: number | null;
2689
+ promptVersionLabel: string | null;
2690
+ promptSnapshot: Record<string, unknown>;
2691
+ promptVersionSnapshot: Record<string, unknown>;
2692
+ modelId: string | null;
2693
+ modelName: string | null;
2694
+ modelProvider: string | null;
2695
+ modelSnapshot: Record<string, unknown>;
2696
+ inputConnectorId: string | null;
2697
+ inputConnectorName: string | null;
2698
+ inputConnectorType: string | null;
2699
+ inputConnectorSnapshot: Record<string, unknown>;
2700
+ outputConnectorIds: string[];
2701
+ outputConnectors: {
2702
+ id: string;
2703
+ name: string;
2704
+ type: string;
2705
+ }[];
2706
+ outputConnectorSnapshots: Record<string, unknown>[];
2707
+ trafficMode: "split" | "dual_run" | null;
2708
+ trafficRatio: number | null;
2709
+ runConfig: Record<string, unknown>;
2710
+ variableMapping: unknown;
2711
+ outputMapping: unknown;
2712
+ filterRules: unknown;
2713
+ recordMode: "all" | "selected_categories" | "correct_only";
2714
+ recordCategories: string[];
2715
+ externalIdField: string | null;
2716
+ retentionDays: number | null;
2717
+ sourceExperimentId: string | null;
2718
+ submitReason: string;
2719
+ metrics: Record<string, unknown> | null;
2720
+ totalReceived: number;
2721
+ totalProcessed: number;
2722
+ totalFiltered: number;
2723
+ totalCorrect: number;
2724
+ totalErrors: number;
2725
+ controlState: string | null;
2726
+ controlStatePayload: Record<string, unknown> | null;
2727
+ startedAt: string | null;
2728
+ finishedAt: string | null;
2729
+ createdBy: string;
2730
+ createdAt: string;
2731
+ updatedAt: string;
2732
+ } | null;
2733
+ activeCanaryEvent: {
2734
+ id: string;
2735
+ projectId: string;
2736
+ releaseLineId: string;
2737
+ releaseVersionId: string | null;
2738
+ releaseVersionKind: "production" | "candidate" | null;
2739
+ releaseVersionLabel: string | null;
2740
+ releaseVersionProductionNumber: number | null;
2741
+ releaseVersionTargetProductionNumber: number | null;
2742
+ releaseVersionCandidateNumber: number | null;
2743
+ annotationTaskId: string | null;
2744
+ laneType: "canary" | "production";
2745
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2746
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
2747
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
2748
+ sourceEventId: string | null;
2749
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2750
+ sourceLegacyId: string | null;
2751
+ supersedesEventId: string | null;
2752
+ rollbackTargetEventId: string | null;
2753
+ legacySource: "canary_release" | "production_release_event" | null;
2754
+ legacySourceId: string | null;
2755
+ promptId: string | null;
2756
+ promptName: string;
2757
+ promptVersionId: string | null;
2758
+ promptVersionNumber: number | null;
2759
+ promptVersionLabel: string | null;
2760
+ promptSnapshot: Record<string, unknown>;
2761
+ promptVersionSnapshot: Record<string, unknown>;
2762
+ modelId: string | null;
2763
+ modelName: string | null;
2764
+ modelProvider: string | null;
2765
+ modelSnapshot: Record<string, unknown>;
2766
+ inputConnectorId: string | null;
2767
+ inputConnectorName: string | null;
2768
+ inputConnectorType: string | null;
2769
+ inputConnectorSnapshot: Record<string, unknown>;
2770
+ outputConnectorIds: string[];
2771
+ outputConnectors: {
2772
+ id: string;
2773
+ name: string;
2774
+ type: string;
2775
+ }[];
2776
+ outputConnectorSnapshots: Record<string, unknown>[];
2777
+ trafficMode: "split" | "dual_run" | null;
2778
+ trafficRatio: number | null;
2779
+ runConfig: Record<string, unknown>;
2780
+ variableMapping: unknown;
2781
+ outputMapping: unknown;
2782
+ filterRules: unknown;
2783
+ recordMode: "all" | "selected_categories" | "correct_only";
2784
+ recordCategories: string[];
2785
+ externalIdField: string | null;
2786
+ retentionDays: number | null;
2787
+ sourceExperimentId: string | null;
2788
+ submitReason: string;
2789
+ metrics: Record<string, unknown> | null;
2790
+ totalReceived: number;
2791
+ totalProcessed: number;
2792
+ totalFiltered: number;
2793
+ totalCorrect: number;
2794
+ totalErrors: number;
2795
+ controlState: string | null;
2796
+ controlStatePayload: Record<string, unknown> | null;
2797
+ startedAt: string | null;
2798
+ finishedAt: string | null;
2799
+ createdBy: string;
2800
+ createdAt: string;
2801
+ updatedAt: string;
2802
+ } | null;
2803
+ versions: {
2804
+ id: string;
2805
+ projectId: string;
2806
+ releaseLineId: string;
2807
+ kind: "production" | "candidate";
2808
+ productionVersionNumber: number | null;
2809
+ targetProductionVersionNumber: number;
2810
+ candidateNumber: number | null;
2811
+ promotedFromReleaseVersionId: string | null;
2812
+ label: string;
2813
+ promptId: string | null;
2814
+ promptName: string;
2815
+ promptVersionId: string;
2816
+ promptVersionNumber: number | null;
2817
+ promptVersionLabel: string | null;
2818
+ promptSnapshot: Record<string, unknown>;
2819
+ promptVersionSnapshot: Record<string, unknown>;
2820
+ modelId: string;
2821
+ modelName: string | null;
2822
+ modelProvider: string | null;
2823
+ modelSnapshot: Record<string, unknown>;
2824
+ createdBy: string;
2825
+ createdAt: string;
2826
+ updatedAt: string;
2827
+ }[];
2828
+ outputConnectors: {
2829
+ id: string;
2830
+ name: string;
2831
+ type: string;
2832
+ }[];
2833
+ latestEvent: {
2834
+ id: string;
2835
+ projectId: string;
2836
+ releaseLineId: string;
2837
+ releaseVersionId: string | null;
2838
+ releaseVersionKind: "production" | "candidate" | null;
2839
+ releaseVersionLabel: string | null;
2840
+ releaseVersionProductionNumber: number | null;
2841
+ releaseVersionTargetProductionNumber: number | null;
2842
+ releaseVersionCandidateNumber: number | null;
2843
+ annotationTaskId: string | null;
2844
+ laneType: "canary" | "production";
2845
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2846
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
2847
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
2848
+ sourceEventId: string | null;
2849
+ sourceLegacySource: "canary_release" | "production_release_event" | null;
2850
+ sourceLegacyId: string | null;
2851
+ supersedesEventId: string | null;
2852
+ rollbackTargetEventId: string | null;
2853
+ legacySource: "canary_release" | "production_release_event" | null;
2854
+ legacySourceId: string | null;
2855
+ promptId: string | null;
2856
+ promptName: string;
2857
+ promptVersionId: string | null;
2858
+ promptVersionNumber: number | null;
2859
+ promptVersionLabel: string | null;
2860
+ promptSnapshot: Record<string, unknown>;
2861
+ promptVersionSnapshot: Record<string, unknown>;
2862
+ modelId: string | null;
2863
+ modelName: string | null;
2864
+ modelProvider: string | null;
2865
+ modelSnapshot: Record<string, unknown>;
2866
+ inputConnectorId: string | null;
2867
+ inputConnectorName: string | null;
2868
+ inputConnectorType: string | null;
2869
+ inputConnectorSnapshot: Record<string, unknown>;
2870
+ outputConnectorIds: string[];
2871
+ outputConnectors: {
2872
+ id: string;
2873
+ name: string;
2874
+ type: string;
2875
+ }[];
2876
+ outputConnectorSnapshots: Record<string, unknown>[];
2877
+ trafficMode: "split" | "dual_run" | null;
2878
+ trafficRatio: number | null;
2879
+ runConfig: Record<string, unknown>;
2880
+ variableMapping: unknown;
2881
+ outputMapping: unknown;
2882
+ filterRules: unknown;
2883
+ recordMode: "all" | "selected_categories" | "correct_only";
2884
+ recordCategories: string[];
2885
+ externalIdField: string | null;
2886
+ retentionDays: number | null;
2887
+ sourceExperimentId: string | null;
2888
+ submitReason: string;
2889
+ metrics: Record<string, unknown> | null;
2890
+ totalReceived: number;
2891
+ totalProcessed: number;
2892
+ totalFiltered: number;
2893
+ totalCorrect: number;
2894
+ totalErrors: number;
2895
+ controlState: string | null;
2896
+ controlStatePayload: Record<string, unknown> | null;
2897
+ startedAt: string | null;
2898
+ finishedAt: string | null;
2899
+ createdBy: string;
2900
+ createdAt: string;
2901
+ updatedAt: string;
2902
+ } | null;
2903
+ createdBy: string;
2904
+ createdAt: string;
2905
+ updatedAt: string;
2906
+ archivedAt: string | null;
2907
+ }>;
2908
+ updateInputRoute(releaseLineId: string, rawBody: unknown, actor: CurrentUserPayload, project: ProjectContext): Promise<{
504
2909
  id: string;
505
2910
  projectId: string;
506
2911
  name: string;
@@ -512,21 +2917,24 @@ export declare class ReleaseLineController {
512
2917
  inputConnectorName: string | null;
513
2918
  inputConnectorType: string | null;
514
2919
  inputConnectorSnapshot: Record<string, unknown>;
515
- status: "production" | "canary" | "stopped" | "archived" | "production_with_canary";
2920
+ status: "running" | "stopped" | "archived";
516
2921
  currentProductionEventId: string | null;
517
2922
  activeCanaryEventId: string | null;
518
2923
  currentProductionEvent: {
519
2924
  id: string;
520
2925
  projectId: string;
521
2926
  releaseLineId: string;
522
- releaseVariantId: string | null;
523
- releaseVariantNumber: number | null;
524
- releaseVariantLabel: string | null;
2927
+ releaseVersionId: string | null;
2928
+ releaseVersionKind: "production" | "candidate" | null;
2929
+ releaseVersionLabel: string | null;
2930
+ releaseVersionProductionNumber: number | null;
2931
+ releaseVersionTargetProductionNumber: number | null;
2932
+ releaseVersionCandidateNumber: number | null;
525
2933
  annotationTaskId: string | null;
526
- laneType: "production" | "canary";
527
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
528
- status: "failed" | "running" | "stopped" | "cancelled" | "completed" | "archived";
529
- terminalReason: "error" | "cancelled" | "archived" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
2934
+ laneType: "canary" | "production";
2935
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
2936
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
2937
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
530
2938
  sourceEventId: string | null;
531
2939
  sourceLegacySource: "canary_release" | "production_release_event" | null;
532
2940
  sourceLegacyId: string | null;
@@ -562,7 +2970,8 @@ export declare class ReleaseLineController {
562
2970
  variableMapping: unknown;
563
2971
  outputMapping: unknown;
564
2972
  filterRules: unknown;
565
- recordMode: "all" | "correct_only";
2973
+ recordMode: "all" | "selected_categories" | "correct_only";
2974
+ recordCategories: string[];
566
2975
  externalIdField: string | null;
567
2976
  retentionDays: number | null;
568
2977
  sourceExperimentId: string | null;
@@ -585,14 +2994,17 @@ export declare class ReleaseLineController {
585
2994
  id: string;
586
2995
  projectId: string;
587
2996
  releaseLineId: string;
588
- releaseVariantId: string | null;
589
- releaseVariantNumber: number | null;
590
- releaseVariantLabel: string | null;
2997
+ releaseVersionId: string | null;
2998
+ releaseVersionKind: "production" | "candidate" | null;
2999
+ releaseVersionLabel: string | null;
3000
+ releaseVersionProductionNumber: number | null;
3001
+ releaseVersionTargetProductionNumber: number | null;
3002
+ releaseVersionCandidateNumber: number | null;
591
3003
  annotationTaskId: string | null;
592
- laneType: "production" | "canary";
593
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
594
- status: "failed" | "running" | "stopped" | "cancelled" | "completed" | "archived";
595
- terminalReason: "error" | "cancelled" | "archived" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
3004
+ laneType: "canary" | "production";
3005
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
3006
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
3007
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
596
3008
  sourceEventId: string | null;
597
3009
  sourceLegacySource: "canary_release" | "production_release_event" | null;
598
3010
  sourceLegacyId: string | null;
@@ -628,7 +3040,8 @@ export declare class ReleaseLineController {
628
3040
  variableMapping: unknown;
629
3041
  outputMapping: unknown;
630
3042
  filterRules: unknown;
631
- recordMode: "all" | "correct_only";
3043
+ recordMode: "all" | "selected_categories" | "correct_only";
3044
+ recordCategories: string[];
632
3045
  externalIdField: string | null;
633
3046
  retentionDays: number | null;
634
3047
  sourceExperimentId: string | null;
@@ -647,11 +3060,15 @@ export declare class ReleaseLineController {
647
3060
  createdAt: string;
648
3061
  updatedAt: string;
649
3062
  } | null;
650
- variants: {
3063
+ versions: {
651
3064
  id: string;
652
3065
  projectId: string;
653
3066
  releaseLineId: string;
654
- variantNumber: number;
3067
+ kind: "production" | "candidate";
3068
+ productionVersionNumber: number | null;
3069
+ targetProductionVersionNumber: number;
3070
+ candidateNumber: number | null;
3071
+ promotedFromReleaseVersionId: string | null;
655
3072
  label: string;
656
3073
  promptId: string | null;
657
3074
  promptName: string;
@@ -677,14 +3094,17 @@ export declare class ReleaseLineController {
677
3094
  id: string;
678
3095
  projectId: string;
679
3096
  releaseLineId: string;
680
- releaseVariantId: string | null;
681
- releaseVariantNumber: number | null;
682
- releaseVariantLabel: string | null;
3097
+ releaseVersionId: string | null;
3098
+ releaseVersionKind: "production" | "candidate" | null;
3099
+ releaseVersionLabel: string | null;
3100
+ releaseVersionProductionNumber: number | null;
3101
+ releaseVersionTargetProductionNumber: number | null;
3102
+ releaseVersionCandidateNumber: number | null;
683
3103
  annotationTaskId: string | null;
684
- laneType: "production" | "canary";
685
- operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "archive_line";
686
- status: "failed" | "running" | "stopped" | "cancelled" | "completed" | "archived";
687
- terminalReason: "error" | "cancelled" | "archived" | "replaced" | "rolled_back" | "force_stopped" | "promoted" | null;
3104
+ laneType: "canary" | "production";
3105
+ operation: "rollback" | "force_stop" | "create_production" | "create_production_from_experiment" | "create_canary" | "traffic_updated" | "mode_updated" | "config_changed" | "stop_lane" | "resume_lane" | "cancel_canary" | "promote_canary" | "restore_to_production" | "restore_to_canary" | "archive_line" | "unarchive_line";
3106
+ status: "running" | "failed" | "stopped" | "cancelled" | "archived" | "completed";
3107
+ terminalReason: "error" | "cancelled" | "archived" | "force_stopped" | "replaced" | "rolled_back" | "promoted" | null;
688
3108
  sourceEventId: string | null;
689
3109
  sourceLegacySource: "canary_release" | "production_release_event" | null;
690
3110
  sourceLegacyId: string | null;
@@ -720,7 +3140,8 @@ export declare class ReleaseLineController {
720
3140
  variableMapping: unknown;
721
3141
  outputMapping: unknown;
722
3142
  filterRules: unknown;
723
- recordMode: "all" | "correct_only";
3143
+ recordMode: "all" | "selected_categories" | "correct_only";
3144
+ recordCategories: string[];
724
3145
  externalIdField: string | null;
725
3146
  retentionDays: number | null;
726
3147
  sourceExperimentId: string | null;