@mcoda/mswarm 0.1.57 → 0.1.61

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 (250) hide show
  1. package/README.md +19 -0
  2. package/dist/codali-executor.d.ts +278 -0
  3. package/dist/codali-executor.d.ts.map +1 -0
  4. package/dist/codali-executor.js +243 -0
  5. package/dist/codali-executor.js.map +1 -0
  6. package/dist/runtime.d.ts +46 -1
  7. package/dist/runtime.d.ts.map +1 -1
  8. package/dist/runtime.js +298 -30
  9. package/dist/runtime.js.map +1 -1
  10. package/dist/server.d.ts.map +1 -1
  11. package/dist/server.js +66 -1
  12. package/dist/server.js.map +1 -1
  13. package/dist/vendor/codali/agents/AgentProtocol.d.ts +287 -0
  14. package/dist/vendor/codali/agents/AgentProtocol.d.ts.map +1 -0
  15. package/dist/vendor/codali/agents/AgentProtocol.js +365 -0
  16. package/dist/vendor/codali/agents/AgentResolver.d.ts +23 -0
  17. package/dist/vendor/codali/agents/AgentResolver.d.ts.map +1 -0
  18. package/dist/vendor/codali/agents/AgentResolver.js +77 -0
  19. package/dist/vendor/codali/agents/PhaseAgentSelector.d.ts +23 -0
  20. package/dist/vendor/codali/agents/PhaseAgentSelector.d.ts.map +1 -0
  21. package/dist/vendor/codali/agents/PhaseAgentSelector.js +287 -0
  22. package/dist/vendor/codali/cli/EvalCommand.d.ts +37 -0
  23. package/dist/vendor/codali/cli/EvalCommand.d.ts.map +1 -0
  24. package/dist/vendor/codali/cli/EvalCommand.js +333 -0
  25. package/dist/vendor/codali/cli/FeedbackCommand.d.ts +22 -0
  26. package/dist/vendor/codali/cli/FeedbackCommand.d.ts.map +1 -0
  27. package/dist/vendor/codali/cli/FeedbackCommand.js +163 -0
  28. package/dist/vendor/codali/cli/RunCommand.d.ts +78 -0
  29. package/dist/vendor/codali/cli/RunCommand.d.ts.map +1 -0
  30. package/dist/vendor/codali/cli/RunCommand.js +2261 -0
  31. package/dist/vendor/codali/cli.d.ts +3 -0
  32. package/dist/vendor/codali/cli.d.ts.map +1 -0
  33. package/dist/vendor/codali/cli.js +109 -0
  34. package/dist/vendor/codali/cognitive/ArchitectPlanner.d.ts +107 -0
  35. package/dist/vendor/codali/cognitive/ArchitectPlanner.d.ts.map +1 -0
  36. package/dist/vendor/codali/cognitive/ArchitectPlanner.js +1726 -0
  37. package/dist/vendor/codali/cognitive/BuilderOutputParser.d.ts +25 -0
  38. package/dist/vendor/codali/cognitive/BuilderOutputParser.d.ts.map +1 -0
  39. package/dist/vendor/codali/cognitive/BuilderOutputParser.js +164 -0
  40. package/dist/vendor/codali/cognitive/BuilderRunner.d.ts +76 -0
  41. package/dist/vendor/codali/cognitive/BuilderRunner.d.ts.map +1 -0
  42. package/dist/vendor/codali/cognitive/BuilderRunner.js +1159 -0
  43. package/dist/vendor/codali/cognitive/ContextAssembler.d.ts +91 -0
  44. package/dist/vendor/codali/cognitive/ContextAssembler.d.ts.map +1 -0
  45. package/dist/vendor/codali/cognitive/ContextAssembler.js +4547 -0
  46. package/dist/vendor/codali/cognitive/ContextBudget.d.ts +19 -0
  47. package/dist/vendor/codali/cognitive/ContextBudget.d.ts.map +1 -0
  48. package/dist/vendor/codali/cognitive/ContextBudget.js +35 -0
  49. package/dist/vendor/codali/cognitive/ContextFileLoader.d.ts +30 -0
  50. package/dist/vendor/codali/cognitive/ContextFileLoader.d.ts.map +1 -0
  51. package/dist/vendor/codali/cognitive/ContextFileLoader.js +307 -0
  52. package/dist/vendor/codali/cognitive/ContextManager.d.ts +47 -0
  53. package/dist/vendor/codali/cognitive/ContextManager.d.ts.map +1 -0
  54. package/dist/vendor/codali/cognitive/ContextManager.js +272 -0
  55. package/dist/vendor/codali/cognitive/ContextRedactor.d.ts +18 -0
  56. package/dist/vendor/codali/cognitive/ContextRedactor.d.ts.map +1 -0
  57. package/dist/vendor/codali/cognitive/ContextRedactor.js +53 -0
  58. package/dist/vendor/codali/cognitive/ContextSelector.d.ts +22 -0
  59. package/dist/vendor/codali/cognitive/ContextSelector.d.ts.map +1 -0
  60. package/dist/vendor/codali/cognitive/ContextSelector.js +431 -0
  61. package/dist/vendor/codali/cognitive/ContextSerializer.d.ts +8 -0
  62. package/dist/vendor/codali/cognitive/ContextSerializer.d.ts.map +1 -0
  63. package/dist/vendor/codali/cognitive/ContextSerializer.js +882 -0
  64. package/dist/vendor/codali/cognitive/ContextStore.d.ts +27 -0
  65. package/dist/vendor/codali/cognitive/ContextStore.d.ts.map +1 -0
  66. package/dist/vendor/codali/cognitive/ContextStore.js +79 -0
  67. package/dist/vendor/codali/cognitive/ContextSummarizer.d.ts +16 -0
  68. package/dist/vendor/codali/cognitive/ContextSummarizer.d.ts.map +1 -0
  69. package/dist/vendor/codali/cognitive/ContextSummarizer.js +45 -0
  70. package/dist/vendor/codali/cognitive/CostEstimator.d.ts +31 -0
  71. package/dist/vendor/codali/cognitive/CostEstimator.d.ts.map +1 -0
  72. package/dist/vendor/codali/cognitive/CostEstimator.js +66 -0
  73. package/dist/vendor/codali/cognitive/CriticEvaluator.d.ts +32 -0
  74. package/dist/vendor/codali/cognitive/CriticEvaluator.d.ts.map +1 -0
  75. package/dist/vendor/codali/cognitive/CriticEvaluator.js +297 -0
  76. package/dist/vendor/codali/cognitive/EvidenceGate.d.ts +9 -0
  77. package/dist/vendor/codali/cognitive/EvidenceGate.d.ts.map +1 -0
  78. package/dist/vendor/codali/cognitive/EvidenceGate.js +75 -0
  79. package/dist/vendor/codali/cognitive/GoldenExampleIndexer.d.ts +12 -0
  80. package/dist/vendor/codali/cognitive/GoldenExampleIndexer.d.ts.map +1 -0
  81. package/dist/vendor/codali/cognitive/GoldenExampleIndexer.js +34 -0
  82. package/dist/vendor/codali/cognitive/GoldenSetStore.d.ts +33 -0
  83. package/dist/vendor/codali/cognitive/GoldenSetStore.d.ts.map +1 -0
  84. package/dist/vendor/codali/cognitive/GoldenSetStore.js +159 -0
  85. package/dist/vendor/codali/cognitive/IntentSignals.d.ts +7 -0
  86. package/dist/vendor/codali/cognitive/IntentSignals.d.ts.map +1 -0
  87. package/dist/vendor/codali/cognitive/IntentSignals.js +285 -0
  88. package/dist/vendor/codali/cognitive/LearningGovernance.d.ts +100 -0
  89. package/dist/vendor/codali/cognitive/LearningGovernance.d.ts.map +1 -0
  90. package/dist/vendor/codali/cognitive/LearningGovernance.js +276 -0
  91. package/dist/vendor/codali/cognitive/MemoryWriteback.d.ts +64 -0
  92. package/dist/vendor/codali/cognitive/MemoryWriteback.d.ts.map +1 -0
  93. package/dist/vendor/codali/cognitive/MemoryWriteback.js +287 -0
  94. package/dist/vendor/codali/cognitive/PatchApplier.d.ts +49 -0
  95. package/dist/vendor/codali/cognitive/PatchApplier.d.ts.map +1 -0
  96. package/dist/vendor/codali/cognitive/PatchApplier.js +199 -0
  97. package/dist/vendor/codali/cognitive/PatchInterpreter.d.ts +35 -0
  98. package/dist/vendor/codali/cognitive/PatchInterpreter.d.ts.map +1 -0
  99. package/dist/vendor/codali/cognitive/PatchInterpreter.js +100 -0
  100. package/dist/vendor/codali/cognitive/PatchOutputNormalizer.d.ts +7 -0
  101. package/dist/vendor/codali/cognitive/PatchOutputNormalizer.d.ts.map +1 -0
  102. package/dist/vendor/codali/cognitive/PatchOutputNormalizer.js +59 -0
  103. package/dist/vendor/codali/cognitive/PostMortemAnalyzer.d.ts +17 -0
  104. package/dist/vendor/codali/cognitive/PostMortemAnalyzer.d.ts.map +1 -0
  105. package/dist/vendor/codali/cognitive/PostMortemAnalyzer.js +131 -0
  106. package/dist/vendor/codali/cognitive/PreferenceExtraction.d.ts +3 -0
  107. package/dist/vendor/codali/cognitive/PreferenceExtraction.d.ts.map +1 -0
  108. package/dist/vendor/codali/cognitive/PreferenceExtraction.js +85 -0
  109. package/dist/vendor/codali/cognitive/Prompts.d.ts +15 -0
  110. package/dist/vendor/codali/cognitive/Prompts.d.ts.map +1 -0
  111. package/dist/vendor/codali/cognitive/Prompts.js +326 -0
  112. package/dist/vendor/codali/cognitive/ProviderRouting.d.ts +16 -0
  113. package/dist/vendor/codali/cognitive/ProviderRouting.d.ts.map +1 -0
  114. package/dist/vendor/codali/cognitive/ProviderRouting.js +24 -0
  115. package/dist/vendor/codali/cognitive/QueryExtraction.d.ts +12 -0
  116. package/dist/vendor/codali/cognitive/QueryExtraction.d.ts.map +1 -0
  117. package/dist/vendor/codali/cognitive/QueryExtraction.js +262 -0
  118. package/dist/vendor/codali/cognitive/RunHistoryIndexer.d.ts +13 -0
  119. package/dist/vendor/codali/cognitive/RunHistoryIndexer.d.ts.map +1 -0
  120. package/dist/vendor/codali/cognitive/RunHistoryIndexer.js +125 -0
  121. package/dist/vendor/codali/cognitive/SmartPipeline.d.ts +92 -0
  122. package/dist/vendor/codali/cognitive/SmartPipeline.d.ts.map +1 -0
  123. package/dist/vendor/codali/cognitive/SmartPipeline.js +4804 -0
  124. package/dist/vendor/codali/cognitive/Types.d.ts +474 -0
  125. package/dist/vendor/codali/cognitive/Types.d.ts.map +1 -0
  126. package/dist/vendor/codali/cognitive/Types.js +7 -0
  127. package/dist/vendor/codali/cognitive/ValidationRunner.d.ts +57 -0
  128. package/dist/vendor/codali/cognitive/ValidationRunner.d.ts.map +1 -0
  129. package/dist/vendor/codali/cognitive/ValidationRunner.js +515 -0
  130. package/dist/vendor/codali/config/Config.d.ts +249 -0
  131. package/dist/vendor/codali/config/Config.d.ts.map +1 -0
  132. package/dist/vendor/codali/config/Config.js +200 -0
  133. package/dist/vendor/codali/config/ConfigLoader.d.ts +56 -0
  134. package/dist/vendor/codali/config/ConfigLoader.d.ts.map +1 -0
  135. package/dist/vendor/codali/config/ConfigLoader.js +1246 -0
  136. package/dist/vendor/codali/docdex/DocdexClient.d.ts +158 -0
  137. package/dist/vendor/codali/docdex/DocdexClient.d.ts.map +1 -0
  138. package/dist/vendor/codali/docdex/DocdexClient.js +785 -0
  139. package/dist/vendor/codali/eval/EvalRunner.d.ts +35 -0
  140. package/dist/vendor/codali/eval/EvalRunner.d.ts.map +1 -0
  141. package/dist/vendor/codali/eval/EvalRunner.js +38 -0
  142. package/dist/vendor/codali/eval/EvalTaskExecutor.d.ts +81 -0
  143. package/dist/vendor/codali/eval/EvalTaskExecutor.d.ts.map +1 -0
  144. package/dist/vendor/codali/eval/EvalTaskExecutor.js +371 -0
  145. package/dist/vendor/codali/eval/GateEvaluator.d.ts +31 -0
  146. package/dist/vendor/codali/eval/GateEvaluator.d.ts.map +1 -0
  147. package/dist/vendor/codali/eval/GateEvaluator.js +134 -0
  148. package/dist/vendor/codali/eval/MetricTypes.d.ts +28 -0
  149. package/dist/vendor/codali/eval/MetricTypes.d.ts.map +1 -0
  150. package/dist/vendor/codali/eval/MetricTypes.js +1 -0
  151. package/dist/vendor/codali/eval/MetricsAggregator.d.ts +4 -0
  152. package/dist/vendor/codali/eval/MetricsAggregator.d.ts.map +1 -0
  153. package/dist/vendor/codali/eval/MetricsAggregator.js +97 -0
  154. package/dist/vendor/codali/eval/RegressionComparator.d.ts +29 -0
  155. package/dist/vendor/codali/eval/RegressionComparator.d.ts.map +1 -0
  156. package/dist/vendor/codali/eval/RegressionComparator.js +155 -0
  157. package/dist/vendor/codali/eval/ReportInputAdapter.d.ts +52 -0
  158. package/dist/vendor/codali/eval/ReportInputAdapter.d.ts.map +1 -0
  159. package/dist/vendor/codali/eval/ReportInputAdapter.js +229 -0
  160. package/dist/vendor/codali/eval/ReportSerializer.d.ts +32 -0
  161. package/dist/vendor/codali/eval/ReportSerializer.d.ts.map +1 -0
  162. package/dist/vendor/codali/eval/ReportSerializer.js +33 -0
  163. package/dist/vendor/codali/eval/ReportStore.d.ts +18 -0
  164. package/dist/vendor/codali/eval/ReportStore.d.ts.map +1 -0
  165. package/dist/vendor/codali/eval/ReportStore.js +96 -0
  166. package/dist/vendor/codali/eval/SuiteLoader.d.ts +12 -0
  167. package/dist/vendor/codali/eval/SuiteLoader.d.ts.map +1 -0
  168. package/dist/vendor/codali/eval/SuiteLoader.js +51 -0
  169. package/dist/vendor/codali/eval/SuiteSchema.d.ts +56 -0
  170. package/dist/vendor/codali/eval/SuiteSchema.d.ts.map +1 -0
  171. package/dist/vendor/codali/eval/SuiteSchema.js +357 -0
  172. package/dist/vendor/codali/index.d.ts +11 -0
  173. package/dist/vendor/codali/index.d.ts.map +1 -0
  174. package/dist/vendor/codali/index.js +5 -0
  175. package/dist/vendor/codali/providers/CodexCliProvider.d.ts +8 -0
  176. package/dist/vendor/codali/providers/CodexCliProvider.d.ts.map +1 -0
  177. package/dist/vendor/codali/providers/CodexCliProvider.js +282 -0
  178. package/dist/vendor/codali/providers/OllamaRemoteProvider.d.ts +8 -0
  179. package/dist/vendor/codali/providers/OllamaRemoteProvider.d.ts.map +1 -0
  180. package/dist/vendor/codali/providers/OllamaRemoteProvider.js +300 -0
  181. package/dist/vendor/codali/providers/OpenAiCompatibleProvider.d.ts +8 -0
  182. package/dist/vendor/codali/providers/OpenAiCompatibleProvider.d.ts.map +1 -0
  183. package/dist/vendor/codali/providers/OpenAiCompatibleProvider.js +192 -0
  184. package/dist/vendor/codali/providers/ProviderRegistry.d.ts +12 -0
  185. package/dist/vendor/codali/providers/ProviderRegistry.d.ts.map +1 -0
  186. package/dist/vendor/codali/providers/ProviderRegistry.js +28 -0
  187. package/dist/vendor/codali/providers/ProviderTypes.d.ts +81 -0
  188. package/dist/vendor/codali/providers/ProviderTypes.d.ts.map +1 -0
  189. package/dist/vendor/codali/providers/ProviderTypes.js +1 -0
  190. package/dist/vendor/codali/runtime/CodaliRuntime.d.ts +189 -0
  191. package/dist/vendor/codali/runtime/CodaliRuntime.d.ts.map +1 -0
  192. package/dist/vendor/codali/runtime/CodaliRuntime.js +1435 -0
  193. package/dist/vendor/codali/runtime/DeepInvestigationErrors.d.ts +39 -0
  194. package/dist/vendor/codali/runtime/DeepInvestigationErrors.d.ts.map +1 -0
  195. package/dist/vendor/codali/runtime/DeepInvestigationErrors.js +57 -0
  196. package/dist/vendor/codali/runtime/RunContext.d.ts +27 -0
  197. package/dist/vendor/codali/runtime/RunContext.d.ts.map +1 -0
  198. package/dist/vendor/codali/runtime/RunContext.js +51 -0
  199. package/dist/vendor/codali/runtime/RunLogQuery.d.ts +48 -0
  200. package/dist/vendor/codali/runtime/RunLogQuery.d.ts.map +1 -0
  201. package/dist/vendor/codali/runtime/RunLogQuery.js +36 -0
  202. package/dist/vendor/codali/runtime/RunLogReader.d.ts +19 -0
  203. package/dist/vendor/codali/runtime/RunLogReader.d.ts.map +1 -0
  204. package/dist/vendor/codali/runtime/RunLogReader.js +361 -0
  205. package/dist/vendor/codali/runtime/RunLogger.d.ts +71 -0
  206. package/dist/vendor/codali/runtime/RunLogger.d.ts.map +1 -0
  207. package/dist/vendor/codali/runtime/RunLogger.js +100 -0
  208. package/dist/vendor/codali/runtime/RunTelemetryTypes.d.ts +117 -0
  209. package/dist/vendor/codali/runtime/RunTelemetryTypes.d.ts.map +1 -0
  210. package/dist/vendor/codali/runtime/RunTelemetryTypes.js +299 -0
  211. package/dist/vendor/codali/runtime/Runner.d.ts +66 -0
  212. package/dist/vendor/codali/runtime/Runner.d.ts.map +1 -0
  213. package/dist/vendor/codali/runtime/Runner.js +215 -0
  214. package/dist/vendor/codali/runtime/StoragePaths.d.ts +3 -0
  215. package/dist/vendor/codali/runtime/StoragePaths.d.ts.map +1 -0
  216. package/dist/vendor/codali/runtime/StoragePaths.js +19 -0
  217. package/dist/vendor/codali/runtime/WorkspaceLock.d.ts +30 -0
  218. package/dist/vendor/codali/runtime/WorkspaceLock.d.ts.map +1 -0
  219. package/dist/vendor/codali/runtime/WorkspaceLock.js +141 -0
  220. package/dist/vendor/codali/session/InstructionLoader.d.ts +14 -0
  221. package/dist/vendor/codali/session/InstructionLoader.d.ts.map +1 -0
  222. package/dist/vendor/codali/session/InstructionLoader.js +107 -0
  223. package/dist/vendor/codali/session/SessionStore.d.ts +81 -0
  224. package/dist/vendor/codali/session/SessionStore.d.ts.map +1 -0
  225. package/dist/vendor/codali/session/SessionStore.js +244 -0
  226. package/dist/vendor/codali/subagents/SubagentOrchestrator.d.ts +68 -0
  227. package/dist/vendor/codali/subagents/SubagentOrchestrator.d.ts.map +1 -0
  228. package/dist/vendor/codali/subagents/SubagentOrchestrator.js +150 -0
  229. package/dist/vendor/codali/tools/ToolRegistry.d.ts +9 -0
  230. package/dist/vendor/codali/tools/ToolRegistry.d.ts.map +1 -0
  231. package/dist/vendor/codali/tools/ToolRegistry.js +293 -0
  232. package/dist/vendor/codali/tools/ToolTypes.d.ts +66 -0
  233. package/dist/vendor/codali/tools/ToolTypes.d.ts.map +1 -0
  234. package/dist/vendor/codali/tools/ToolTypes.js +40 -0
  235. package/dist/vendor/codali/tools/diff/DiffTool.d.ts +3 -0
  236. package/dist/vendor/codali/tools/diff/DiffTool.d.ts.map +1 -0
  237. package/dist/vendor/codali/tools/diff/DiffTool.js +34 -0
  238. package/dist/vendor/codali/tools/docdex/DocdexTools.d.ts +4 -0
  239. package/dist/vendor/codali/tools/docdex/DocdexTools.d.ts.map +1 -0
  240. package/dist/vendor/codali/tools/docdex/DocdexTools.js +490 -0
  241. package/dist/vendor/codali/tools/filesystem/FileTools.d.ts +3 -0
  242. package/dist/vendor/codali/tools/filesystem/FileTools.d.ts.map +1 -0
  243. package/dist/vendor/codali/tools/filesystem/FileTools.js +141 -0
  244. package/dist/vendor/codali/tools/search/SearchTool.d.ts +3 -0
  245. package/dist/vendor/codali/tools/search/SearchTool.d.ts.map +1 -0
  246. package/dist/vendor/codali/tools/search/SearchTool.js +46 -0
  247. package/dist/vendor/codali/tools/shell/ShellTool.d.ts +3 -0
  248. package/dist/vendor/codali/tools/shell/ShellTool.d.ts.map +1 -0
  249. package/dist/vendor/codali/tools/shell/ShellTool.js +104 -0
  250. package/package.json +5 -3
@@ -0,0 +1,229 @@
1
+ const asRecord = (value) => {
2
+ if (!value || typeof value !== "object" || Array.isArray(value))
3
+ return undefined;
4
+ return value;
5
+ };
6
+ const asString = (value) => {
7
+ if (typeof value !== "string")
8
+ return undefined;
9
+ const trimmed = value.trim();
10
+ return trimmed.length ? trimmed : undefined;
11
+ };
12
+ const asBoolean = (value) => {
13
+ if (typeof value === "boolean")
14
+ return value;
15
+ if (value === null)
16
+ return null;
17
+ return null;
18
+ };
19
+ const asNumber = (value) => {
20
+ if (typeof value !== "number" || !Number.isFinite(value))
21
+ return null;
22
+ return value;
23
+ };
24
+ const uniqueSortedStrings = (value) => {
25
+ if (!Array.isArray(value))
26
+ return [];
27
+ return Array.from(new Set(value
28
+ .filter((entry) => typeof entry === "string")
29
+ .map((entry) => entry.trim())
30
+ .filter((entry) => entry.length > 0))).sort((left, right) => left.localeCompare(right));
31
+ };
32
+ const normalizeRunStatus = (value) => {
33
+ if (value === "pass" || value === "fail" || value === "degraded")
34
+ return value;
35
+ return "unknown";
36
+ };
37
+ const normalizePhaseStatus = (value) => {
38
+ if (value === "available" || value === "missing" || value === "degraded")
39
+ return value;
40
+ return "missing";
41
+ };
42
+ const normalizeVerificationOutcome = (value) => {
43
+ if (value === "verified_passed"
44
+ || value === "verified_failed"
45
+ || value === "unverified_with_reason") {
46
+ return value;
47
+ }
48
+ return null;
49
+ };
50
+ const normalizeArtifactReferences = (value) => {
51
+ if (!Array.isArray(value))
52
+ return [];
53
+ const results = [];
54
+ for (const entry of value) {
55
+ const record = asRecord(entry);
56
+ if (!record)
57
+ continue;
58
+ const phase = asString(record.phase);
59
+ const kind = asString(record.kind);
60
+ if (!phase || !kind)
61
+ continue;
62
+ results.push({
63
+ phase,
64
+ kind,
65
+ status: record.status === "missing" ? "missing" : "present",
66
+ path: asString(record.path) ?? null,
67
+ reason_code: asString(record.reason_code) ?? null,
68
+ });
69
+ }
70
+ return results.sort((left, right) => `${left.phase}:${left.kind}:${left.path ?? ""}`.localeCompare(`${right.phase}:${right.kind}:${right.path ?? ""}`));
71
+ };
72
+ const normalizePhaseTelemetry = (value) => {
73
+ if (!Array.isArray(value))
74
+ return [];
75
+ const sources = [];
76
+ for (const entry of value) {
77
+ const record = asRecord(entry);
78
+ if (!record)
79
+ continue;
80
+ const phase = asString(record.phase);
81
+ if (!phase)
82
+ continue;
83
+ const usage = asRecord(record.usage);
84
+ const cost = asRecord(record.cost);
85
+ const inputTokens = asNumber(usage?.input_tokens);
86
+ const outputTokens = asNumber(usage?.output_tokens);
87
+ const totalTokens = asNumber(usage?.total_tokens)
88
+ ?? (inputTokens !== null || outputTokens !== null
89
+ ? (inputTokens ?? 0) + (outputTokens ?? 0)
90
+ : null);
91
+ sources.push({
92
+ phase,
93
+ duration_ms: asNumber(record.duration_ms),
94
+ provider: asString(record.provider) ?? null,
95
+ model: asString(record.model) ?? null,
96
+ input_tokens: inputTokens,
97
+ output_tokens: outputTokens,
98
+ total_tokens: totalTokens,
99
+ cost_usd: asNumber(cost?.usd),
100
+ cost_source: asString(cost?.source) ?? null,
101
+ missing_usage_reason: asString(record.missing_usage_reason) ?? null,
102
+ missing_cost_reason: asString(record.missing_cost_reason) ?? null,
103
+ });
104
+ }
105
+ return sources.sort((left, right) => left.phase.localeCompare(right.phase));
106
+ };
107
+ const phaseKeyToSummaryPhase = (key) => {
108
+ if (key === "plan")
109
+ return "plan";
110
+ if (key === "retrieval")
111
+ return "retrieve";
112
+ if (key === "patch")
113
+ return "act";
114
+ if (key === "verification")
115
+ return "verify";
116
+ return undefined;
117
+ };
118
+ const buildPhaseOutcomes = (runSummary, telemetry) => {
119
+ const quality = asRecord(runSummary.quality_dimensions);
120
+ const phaseStatus = new Map();
121
+ if (quality) {
122
+ for (const [key, rawValue] of Object.entries(quality)) {
123
+ const phase = phaseKeyToSummaryPhase(key);
124
+ if (!phase)
125
+ continue;
126
+ phaseStatus.set(phase, normalizePhaseStatus(rawValue));
127
+ }
128
+ }
129
+ for (const entry of telemetry) {
130
+ if (!phaseStatus.has(entry.phase)) {
131
+ phaseStatus.set(entry.phase, "missing");
132
+ }
133
+ }
134
+ if (phaseStatus.size === 0) {
135
+ for (const phase of ["plan", "retrieve", "act", "verify"]) {
136
+ phaseStatus.set(phase, "missing");
137
+ }
138
+ }
139
+ const telemetryByPhase = new Map();
140
+ for (const entry of telemetry) {
141
+ telemetryByPhase.set(entry.phase, entry);
142
+ }
143
+ const outcomes = [];
144
+ for (const [phase, status] of phaseStatus.entries()) {
145
+ const source = telemetryByPhase.get(phase);
146
+ outcomes.push({
147
+ phase,
148
+ status,
149
+ duration_ms: source?.duration_ms ?? null,
150
+ provider: source?.provider ?? null,
151
+ model: source?.model ?? null,
152
+ input_tokens: source?.input_tokens ?? null,
153
+ output_tokens: source?.output_tokens ?? null,
154
+ total_tokens: source?.total_tokens ?? null,
155
+ cost_usd: source?.cost_usd ?? null,
156
+ cost_source: source?.cost_source ?? null,
157
+ missing_usage_reason: source?.missing_usage_reason ?? null,
158
+ missing_cost_reason: source?.missing_cost_reason ?? null,
159
+ });
160
+ }
161
+ return outcomes.sort((left, right) => left.phase.localeCompare(right.phase));
162
+ };
163
+ const sumNullable = (values) => {
164
+ const present = values.filter((entry) => entry !== null);
165
+ if (!present.length)
166
+ return null;
167
+ return present.reduce((sum, value) => sum + value, 0);
168
+ };
169
+ export const adaptRunSummaryForReport = (input = {}) => {
170
+ const runSummary = asRecord(input.runSummary);
171
+ const finalDisposition = asRecord(runSummary?.final_disposition);
172
+ const artifactReferences = normalizeArtifactReferences(runSummary?.artifact_references);
173
+ const phaseTelemetry = normalizePhaseTelemetry(runSummary?.phase_telemetry);
174
+ const phaseOutcomes = buildPhaseOutcomes(runSummary ?? {}, phaseTelemetry);
175
+ const topLevelUsage = asRecord(runSummary?.usage);
176
+ const topLevelTotalTokens = asNumber(topLevelUsage?.totalTokens)
177
+ ?? (asNumber(topLevelUsage?.inputTokens) !== null || asNumber(topLevelUsage?.outputTokens) !== null
178
+ ? (asNumber(topLevelUsage?.inputTokens) ?? 0) + (asNumber(topLevelUsage?.outputTokens) ?? 0)
179
+ : null);
180
+ const usageTokensTotal = topLevelTotalTokens ?? sumNullable(phaseOutcomes.map((phase) => phase.total_tokens));
181
+ const topLevelCost = asNumber(runSummary?.actualCost);
182
+ const phaseCost = sumNullable(phaseOutcomes.map((phase) => phase.cost_usd));
183
+ const costUsd = topLevelCost ?? phaseCost;
184
+ const missingArtifacts = uniqueSortedStrings(runSummary?.missing_artifacts
185
+ ?? artifactReferences
186
+ .filter((entry) => entry.status === "missing")
187
+ .map((entry) => `${entry.phase}:${entry.kind}`));
188
+ const verificationRecord = asRecord(runSummary?.verification);
189
+ const verificationOutcome = normalizeVerificationOutcome(input.verificationOutcome)
190
+ ?? normalizeVerificationOutcome(verificationRecord?.outcome);
191
+ const markers = new Set();
192
+ if (!runSummary)
193
+ markers.add("run_summary_missing");
194
+ if (!asString(runSummary?.run_id ?? runSummary?.runId ?? input.runId))
195
+ markers.add("run_id_missing");
196
+ if (!finalDisposition)
197
+ markers.add("final_disposition_missing");
198
+ if (!phaseTelemetry.length)
199
+ markers.add("phase_telemetry_missing");
200
+ if (verificationOutcome === null)
201
+ markers.add("verification_outcome_missing");
202
+ if (usageTokensTotal === null)
203
+ markers.add("usage_tokens_missing");
204
+ if (costUsd === null)
205
+ markers.add("cost_missing");
206
+ const touchedFiles = Array.from(new Set([
207
+ ...uniqueSortedStrings(runSummary?.touchedFiles),
208
+ ...(Array.isArray(input.touchedFiles) ? input.touchedFiles : []),
209
+ ])).sort((left, right) => left.localeCompare(right));
210
+ return {
211
+ schema_version: 1,
212
+ run_id: asString(runSummary?.run_id ?? runSummary?.runId ?? input.runId) ?? null,
213
+ task_id: asString(runSummary?.task_id ?? runSummary?.taskId ?? input.taskId) ?? null,
214
+ fingerprint: asString(runSummary?.fingerprint) ?? null,
215
+ duration_ms: asNumber(runSummary?.durationMs),
216
+ final_status: normalizeRunStatus(finalDisposition?.status),
217
+ failure_class: asString(finalDisposition?.failure_class ?? finalDisposition?.failureClass) ?? null,
218
+ reason_codes: uniqueSortedStrings(finalDisposition?.reason_codes ?? finalDisposition?.reasons),
219
+ retryable: asBoolean(finalDisposition?.retryable),
220
+ verification_outcome: verificationOutcome,
221
+ touched_files: touchedFiles,
222
+ artifact_references: artifactReferences,
223
+ missing_artifacts: missingArtifacts,
224
+ phase_outcomes: phaseOutcomes,
225
+ usage_tokens_total: usageTokensTotal,
226
+ cost_usd: costUsd,
227
+ missing_data_markers: Array.from(markers).sort((left, right) => left.localeCompare(right)),
228
+ };
229
+ };
@@ -0,0 +1,32 @@
1
+ import type { EvalGateResult } from "./GateEvaluator.js";
2
+ import type { EvalMetrics } from "./MetricTypes.js";
3
+ import type { EvalRegressionComparison } from "./RegressionComparator.js";
4
+ import type { EvalRunResult } from "./EvalRunner.js";
5
+ export interface EvalReport {
6
+ schema_version: 1;
7
+ report_id: string;
8
+ created_at: string;
9
+ suite: {
10
+ suite_id: string;
11
+ suite_name: string;
12
+ suite_path: string;
13
+ suite_fingerprint: string;
14
+ task_count: number;
15
+ };
16
+ summary: {
17
+ exit_code: number;
18
+ passed: boolean;
19
+ gate_passed: boolean;
20
+ task_total: number;
21
+ task_passed: number;
22
+ task_failed: number;
23
+ execution_errors: number;
24
+ };
25
+ run: EvalRunResult;
26
+ metrics: EvalMetrics;
27
+ regression: EvalRegressionComparison;
28
+ gates: EvalGateResult;
29
+ }
30
+ export declare const serializeEvalReport: (report: EvalReport, pretty?: boolean) => string;
31
+ export declare const parseEvalReport: (content: string) => EvalReport;
32
+ //# sourceMappingURL=ReportSerializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReportSerializer.d.ts","sourceRoot":"","sources":["../../src/eval/ReportSerializer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,UAAU;IACzB,cAAc,EAAE,CAAC,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,OAAO,CAAC;QAChB,WAAW,EAAE,OAAO,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,GAAG,EAAE,aAAa,CAAC;IACnB,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,wBAAwB,CAAC;IACrC,KAAK,EAAE,cAAc,CAAC;CACvB;AAOD,eAAO,MAAM,mBAAmB,GAAI,QAAQ,UAAU,EAAE,gBAAa,KAAG,MAKvE,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,KAAG,UAkBjD,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { stableJsonStringify } from "./SuiteSchema.js";
2
+ const asRecord = (value) => {
3
+ if (!value || typeof value !== "object" || Array.isArray(value))
4
+ return undefined;
5
+ return value;
6
+ };
7
+ export const serializeEvalReport = (report, pretty = true) => {
8
+ const stable = stableJsonStringify(report);
9
+ if (!pretty)
10
+ return stable;
11
+ const parsed = JSON.parse(stable);
12
+ return `${JSON.stringify(parsed, null, 2)}\n`;
13
+ };
14
+ export const parseEvalReport = (content) => {
15
+ let parsed;
16
+ try {
17
+ parsed = JSON.parse(content);
18
+ }
19
+ catch (error) {
20
+ throw new Error(`Report JSON parse failed: ${error instanceof Error ? error.message : String(error)}`);
21
+ }
22
+ const report = asRecord(parsed);
23
+ if (!report) {
24
+ throw new Error("Report payload must be an object.");
25
+ }
26
+ if (report.schema_version !== 1) {
27
+ throw new Error("Unsupported report schema_version.");
28
+ }
29
+ if (typeof report.report_id !== "string" || !report.report_id.trim()) {
30
+ throw new Error("Report report_id is required.");
31
+ }
32
+ return report;
33
+ };
@@ -0,0 +1,18 @@
1
+ import { type EvalReport } from "./ReportSerializer.js";
2
+ export declare class ReportStore {
3
+ readonly report_dir: string;
4
+ constructor(workspaceRoot: string, reportDir?: string);
5
+ private ensureDir;
6
+ save(report: EvalReport): Promise<string>;
7
+ read(reportPath: string): Promise<EvalReport>;
8
+ resolvePath(reportPath: string, cwd: string): Promise<string>;
9
+ listReports(): Promise<string[]>;
10
+ findLatestForSuite(params: {
11
+ suite_fingerprint: string;
12
+ exclude_report_id?: string;
13
+ }): Promise<{
14
+ path: string;
15
+ report: EvalReport;
16
+ } | undefined>;
17
+ }
18
+ //# sourceMappingURL=ReportStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReportStore.d.ts","sourceRoot":"","sources":["../../src/eval/ReportStore.ts"],"names":[],"mappings":"AAIA,OAAO,EAAwC,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAuC9F,qBAAa,WAAW;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAEhB,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;YAKvC,SAAS;IAIjB,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAUzC,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAK7C,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAK7D,WAAW,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAmBhC,kBAAkB,CAAC,MAAM,EAAE;QAC/B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,UAAU,CAAA;KAAE,GAAG,SAAS,CAAC;CAe9D"}
@@ -0,0 +1,96 @@
1
+ import { mkdir, readdir, readFile, stat, writeFile } from "node:fs/promises";
2
+ import path from "node:path";
3
+ import { getGlobalWorkspaceDir } from "../runtime/StoragePaths.js";
4
+ import { DEFAULT_LOG_DIR } from "../config/Config.js";
5
+ import { parseEvalReport, serializeEvalReport } from "./ReportSerializer.js";
6
+ const sanitize = (value) => value
7
+ .trim()
8
+ .replace(/[^a-z0-9._-]+/gi, "-")
9
+ .replace(/-+/g, "-")
10
+ .replace(/^-|-$/g, "")
11
+ .toLowerCase() || "suite";
12
+ const fileTimestamp = (filePath) => {
13
+ const match = /-(\d{13})-[a-z0-9._-]+\.json$/i.exec(path.basename(filePath));
14
+ if (!match)
15
+ return undefined;
16
+ const parsed = Number(match[1]);
17
+ return Number.isFinite(parsed) ? parsed : undefined;
18
+ };
19
+ const reportSortKey = async (filePath) => {
20
+ let mtimeMs = 0;
21
+ try {
22
+ const info = await stat(filePath);
23
+ mtimeMs = info.mtimeMs;
24
+ }
25
+ catch {
26
+ mtimeMs = 0;
27
+ }
28
+ return {
29
+ // Prefer timestamp encoded in the report filename to avoid OS-specific mtime granularity.
30
+ timestamp: fileTimestamp(filePath) ?? Math.floor(mtimeMs),
31
+ mtimeMs,
32
+ fileName: path.basename(filePath).toLowerCase(),
33
+ };
34
+ };
35
+ export class ReportStore {
36
+ constructor(workspaceRoot, reportDir) {
37
+ const storageRoot = getGlobalWorkspaceDir(workspaceRoot);
38
+ this.report_dir = path.resolve(storageRoot, reportDir ?? path.join(DEFAULT_LOG_DIR, "eval"));
39
+ }
40
+ async ensureDir() {
41
+ await mkdir(this.report_dir, { recursive: true });
42
+ }
43
+ async save(report) {
44
+ await this.ensureDir();
45
+ const suiteId = sanitize(report.suite.suite_id);
46
+ const timestamp = Date.now();
47
+ const fileName = `${suiteId}-${timestamp}-${sanitize(report.report_id)}.json`;
48
+ const filePath = path.join(this.report_dir, fileName);
49
+ await writeFile(filePath, serializeEvalReport(report, true), "utf8");
50
+ return filePath;
51
+ }
52
+ async read(reportPath) {
53
+ const content = await readFile(reportPath, "utf8");
54
+ return parseEvalReport(content);
55
+ }
56
+ async resolvePath(reportPath, cwd) {
57
+ const candidate = path.isAbsolute(reportPath) ? reportPath : path.resolve(cwd, reportPath);
58
+ return path.resolve(candidate);
59
+ }
60
+ async listReports() {
61
+ await this.ensureDir();
62
+ const entries = await readdir(this.report_dir);
63
+ const jsonEntries = entries
64
+ .filter((entry) => entry.endsWith(".json"))
65
+ .map((entry) => path.join(this.report_dir, entry));
66
+ const withKeys = await Promise.all(jsonEntries.map(async (entry) => ({ entry, key: await reportSortKey(entry) })));
67
+ withKeys.sort((left, right) => {
68
+ const byTimestamp = right.key.timestamp - left.key.timestamp;
69
+ if (byTimestamp !== 0)
70
+ return byTimestamp;
71
+ const byMtime = right.key.mtimeMs - left.key.mtimeMs;
72
+ if (byMtime !== 0)
73
+ return byMtime;
74
+ return right.key.fileName.localeCompare(left.key.fileName);
75
+ });
76
+ return withKeys.map((entry) => entry.entry);
77
+ }
78
+ async findLatestForSuite(params) {
79
+ const reportFiles = await this.listReports();
80
+ for (const reportFile of reportFiles) {
81
+ let parsed;
82
+ try {
83
+ parsed = await this.read(reportFile);
84
+ }
85
+ catch {
86
+ continue;
87
+ }
88
+ if (parsed.suite.suite_fingerprint !== params.suite_fingerprint)
89
+ continue;
90
+ if (params.exclude_report_id && parsed.report_id === params.exclude_report_id)
91
+ continue;
92
+ return { path: reportFile, report: parsed };
93
+ }
94
+ return undefined;
95
+ }
96
+ }
@@ -0,0 +1,12 @@
1
+ import { type EvalSuiteDefinition, type EvalTaskDefinition } from "./SuiteSchema.js";
2
+ export interface LoadedEvalSuite {
3
+ suite_path: string;
4
+ suite_dir: string;
5
+ suite_fingerprint: string;
6
+ suite: EvalSuiteDefinition;
7
+ }
8
+ export declare const hashSuiteDefinition: (suite: EvalSuiteDefinition) => string;
9
+ export declare const resolveSuitePath: (suitePath: string, cwd: string) => string;
10
+ export declare const resolveTaskFilePath: (task: EvalTaskDefinition, suiteDir: string, workspaceRoot: string) => string | undefined;
11
+ export declare const loadSuiteFromFile: (suitePath: string, cwd?: string) => Promise<LoadedEvalSuite>;
12
+ //# sourceMappingURL=SuiteLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuiteLoader.d.ts","sourceRoot":"","sources":["../../src/eval/SuiteLoader.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,mBAAmB,CAAC;CAC5B;AAgBD,eAAO,MAAM,mBAAmB,GAAI,OAAO,mBAAmB,KAAG,MACc,CAAC;AAEhF,eAAO,MAAM,gBAAgB,GAAI,WAAW,MAAM,EAAE,KAAK,MAAM,KAAG,MAMjE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,MAAM,kBAAkB,EACxB,UAAU,MAAM,EAChB,eAAe,MAAM,KACpB,MAAM,GAAG,SAMX,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,WAAW,MAAM,EACjB,YAAmB,KAClB,OAAO,CAAC,eAAe,CAiCzB,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { createHash } from "node:crypto";
2
+ import { readFile } from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { normalizeSuiteDefinition, stableJsonStringify, SuiteValidationError, } from "./SuiteSchema.js";
5
+ const toSuiteValidationError = (label, message, code, pathLabel = label) => new SuiteValidationError(`${label} validation failed.`, [
6
+ {
7
+ path: pathLabel,
8
+ code,
9
+ message,
10
+ },
11
+ ]);
12
+ export const hashSuiteDefinition = (suite) => createHash("sha256").update(stableJsonStringify(suite), "utf8").digest("hex");
13
+ export const resolveSuitePath = (suitePath, cwd) => {
14
+ const trimmed = suitePath.trim();
15
+ if (!trimmed) {
16
+ throw toSuiteValidationError("suite", "Suite path must be non-empty.", "missing_suite_path");
17
+ }
18
+ return path.resolve(cwd, trimmed);
19
+ };
20
+ export const resolveTaskFilePath = (task, suiteDir, workspaceRoot) => {
21
+ if (!task.task_file)
22
+ return undefined;
23
+ const candidate = path.isAbsolute(task.task_file)
24
+ ? task.task_file
25
+ : path.resolve(suiteDir, task.task_file);
26
+ return path.resolve(workspaceRoot, path.relative(workspaceRoot, candidate));
27
+ };
28
+ export const loadSuiteFromFile = async (suitePath, cwd = process.cwd()) => {
29
+ const resolvedPath = resolveSuitePath(suitePath, cwd);
30
+ let content = "";
31
+ try {
32
+ content = await readFile(resolvedPath, "utf8");
33
+ }
34
+ catch (error) {
35
+ throw toSuiteValidationError("suite", `Unable to read suite file: ${error instanceof Error ? error.message : String(error)}`, "suite_read_failed", resolvedPath);
36
+ }
37
+ let raw;
38
+ try {
39
+ raw = JSON.parse(content);
40
+ }
41
+ catch (error) {
42
+ throw toSuiteValidationError("suite", `Suite file is not valid JSON: ${error instanceof Error ? error.message : String(error)}`, "suite_invalid_json", resolvedPath);
43
+ }
44
+ const suite = normalizeSuiteDefinition(raw, resolvedPath);
45
+ return {
46
+ suite_path: resolvedPath,
47
+ suite_dir: path.dirname(resolvedPath),
48
+ suite_fingerprint: hashSuiteDefinition(suite),
49
+ suite,
50
+ };
51
+ };
@@ -0,0 +1,56 @@
1
+ export declare const EVAL_COMMANDS: readonly ["run", "fix", "review", "explain", "test"];
2
+ export type EvalCommandName = (typeof EVAL_COMMANDS)[number];
3
+ export declare const EVAL_VERIFICATION_EXPECTATIONS: readonly ["verified_passed", "verified_failed", "unverified_with_reason", "any"];
4
+ export type EvalVerificationExpectation = (typeof EVAL_VERIFICATION_EXPECTATIONS)[number];
5
+ export interface EvalGateThresholds {
6
+ patch_apply_drop_max: number;
7
+ verification_pass_rate_min: number;
8
+ hallucination_rate_max: number;
9
+ scope_violation_rate_max: number;
10
+ }
11
+ export interface EvalSuiteBaseline {
12
+ mode: "previous" | "none";
13
+ report_path?: string;
14
+ }
15
+ export interface EvalTaskAssertions {
16
+ expect_success: boolean;
17
+ expect_exit_code?: number;
18
+ expect_patch_apply?: boolean;
19
+ expect_verification?: EvalVerificationExpectation;
20
+ max_latency_ms?: number;
21
+ max_cost_usd?: number;
22
+ allow_hallucination: boolean;
23
+ allow_scope_violation: boolean;
24
+ }
25
+ export interface EvalTaskDefinition {
26
+ id: string;
27
+ title: string;
28
+ description?: string;
29
+ mode: "success" | "failure";
30
+ command: EvalCommandName;
31
+ task_file?: string;
32
+ inline_task?: string;
33
+ args: string[];
34
+ assertions: EvalTaskAssertions;
35
+ }
36
+ export interface EvalSuiteDefinition {
37
+ schema_version: 1;
38
+ suite_id: string;
39
+ name: string;
40
+ description?: string;
41
+ thresholds?: Partial<EvalGateThresholds>;
42
+ baseline?: EvalSuiteBaseline;
43
+ tasks: EvalTaskDefinition[];
44
+ }
45
+ export interface SuiteValidationIssue {
46
+ path: string;
47
+ code: string;
48
+ message: string;
49
+ }
50
+ export declare class SuiteValidationError extends Error {
51
+ readonly issues: SuiteValidationIssue[];
52
+ constructor(message: string, issues: SuiteValidationIssue[]);
53
+ }
54
+ export declare const normalizeSuiteDefinition: (raw: unknown, label?: string) => EvalSuiteDefinition;
55
+ export declare const stableJsonStringify: (value: unknown) => string;
56
+ //# sourceMappingURL=SuiteSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuiteSchema.d.ts","sourceRoot":"","sources":["../../src/eval/SuiteSchema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,sDAAuD,CAAC;AAClF,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,eAAO,MAAM,8BAA8B,kFAKjC,CAAC;AACX,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1F,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,0BAA0B,EAAE,MAAM,CAAC;IACnC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,wBAAwB,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,mBAAmB,CAAC,EAAE,2BAA2B,CAAC;IAClD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,OAAO,EAAE,eAAe,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,kBAAkB,CAAC;CAChC;AAED,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,CAAC,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,KAAK,EAAE,kBAAkB,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC;gBAE5B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE;CAK5D;AAsUD,eAAO,MAAM,wBAAwB,GAAI,KAAK,OAAO,EAAE,cAAe,KAAG,mBAyExE,CAAC;AAYF,eAAO,MAAM,mBAAmB,GAAI,OAAO,OAAO,KAAG,MAClB,CAAC"}