@interf/compiler 0.5.1 → 0.6.3

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 (353) hide show
  1. package/README.md +160 -201
  2. package/builtin-workflows/interf/README.md +22 -10
  3. package/builtin-workflows/interf/compile/stages/shape/SKILL.md +8 -5
  4. package/builtin-workflows/interf/compile/stages/structure/SKILL.md +3 -0
  5. package/builtin-workflows/interf/compile/stages/summarize/SKILL.md +18 -2
  6. package/builtin-workflows/interf/improve/SKILL.md +4 -4
  7. package/builtin-workflows/interf/use/query/SKILL.md +1 -1
  8. package/builtin-workflows/interf/workflow.json +19 -5
  9. package/builtin-workflows/interf/{compiled.schema.json → workflow.schema.json} +10 -3
  10. package/dist/bin.js +2 -28
  11. package/dist/{commands → cli/commands}/check-draft.d.ts +2 -2
  12. package/dist/{commands → cli/commands}/check-draft.js +13 -13
  13. package/dist/{commands → cli/commands}/compile-controller.d.ts +3 -3
  14. package/dist/{commands → cli/commands}/compile-controller.js +39 -44
  15. package/dist/cli/commands/compile.d.ts +33 -0
  16. package/dist/{commands → cli/commands}/compile.js +107 -33
  17. package/dist/{commands → cli/commands}/compiled-flow.d.ts +3 -4
  18. package/dist/{commands → cli/commands}/compiled-flow.js +9 -14
  19. package/dist/{commands → cli/commands}/create-workflow-wizard.d.ts +20 -2
  20. package/dist/cli/commands/create-workflow-wizard.js +288 -0
  21. package/dist/{commands → cli/commands}/create.d.ts +2 -2
  22. package/dist/cli/commands/create.js +166 -0
  23. package/dist/cli/commands/dataset-selection.d.ts +6 -0
  24. package/dist/cli/commands/dataset-selection.js +11 -0
  25. package/dist/{commands → cli/commands}/default.js +5 -5
  26. package/dist/{commands → cli/commands}/doctor.js +12 -13
  27. package/dist/{commands → cli/commands}/executor-flow.d.ts +2 -2
  28. package/dist/{commands → cli/commands}/executor-flow.js +17 -17
  29. package/dist/cli/commands/init.d.ts +11 -0
  30. package/dist/{commands → cli/commands}/init.js +202 -109
  31. package/dist/{commands → cli/commands}/list.js +9 -6
  32. package/dist/{commands → cli/commands}/reset.js +5 -5
  33. package/dist/{commands → cli/commands}/source-config-wizard.d.ts +10 -5
  34. package/dist/{commands → cli/commands}/source-config-wizard.js +202 -95
  35. package/dist/{commands → cli/commands}/status.js +20 -11
  36. package/dist/{commands → cli/commands}/test-flow.d.ts +13 -4
  37. package/dist/{commands → cli/commands}/test-flow.js +30 -26
  38. package/dist/cli/commands/test.d.ts +14 -0
  39. package/dist/{commands → cli/commands}/test.js +48 -40
  40. package/dist/{commands → cli/commands}/verify.js +4 -4
  41. package/dist/cli/index.d.ts +21 -0
  42. package/dist/cli/index.js +33 -0
  43. package/dist/index.d.ts +22 -11
  44. package/dist/index.js +15 -6
  45. package/dist/lib/agent-args.d.ts +1 -3
  46. package/dist/lib/agent-args.js +1 -42
  47. package/dist/lib/agent-constants.d.ts +1 -5
  48. package/dist/lib/agent-constants.js +1 -28
  49. package/dist/lib/agent-detection.d.ts +1 -7
  50. package/dist/lib/agent-detection.js +1 -65
  51. package/dist/lib/agent-execution.d.ts +1 -2
  52. package/dist/lib/agent-execution.js +1 -242
  53. package/dist/lib/agent-logs.d.ts +1 -2
  54. package/dist/lib/agent-logs.js +1 -17
  55. package/dist/lib/agent-preflight.d.ts +1 -7
  56. package/dist/lib/agent-preflight.js +1 -76
  57. package/dist/lib/agent-render.d.ts +1 -8
  58. package/dist/lib/agent-render.js +1 -218
  59. package/dist/lib/agent-shells.d.ts +1 -44
  60. package/dist/lib/agent-shells.js +1 -847
  61. package/dist/lib/agent-status.d.ts +1 -3
  62. package/dist/lib/agent-status.js +1 -58
  63. package/dist/lib/agent-types.d.ts +1 -30
  64. package/dist/lib/agent-types.js +1 -1
  65. package/dist/lib/agents.d.ts +1 -6
  66. package/dist/lib/agents.js +1 -5
  67. package/dist/lib/builtin-compiled-workflow.d.ts +1 -129
  68. package/dist/lib/builtin-compiled-workflow.js +1 -153
  69. package/dist/lib/compiled-compile.d.ts +1 -52
  70. package/dist/lib/compiled-compile.js +1 -274
  71. package/dist/lib/compiled-paths.d.ts +1 -39
  72. package/dist/lib/compiled-paths.js +3 -103
  73. package/dist/lib/compiled-raw.d.ts +1 -49
  74. package/dist/lib/compiled-raw.js +3 -102
  75. package/dist/lib/compiled-reset.d.ts +1 -1
  76. package/dist/lib/compiled-reset.js +3 -44
  77. package/dist/lib/compiled-schema.d.ts +1 -27
  78. package/dist/lib/compiled-schema.js +1 -110
  79. package/dist/lib/discovery.d.ts +1 -1
  80. package/dist/lib/discovery.js +2 -2
  81. package/dist/lib/execution-profile.d.ts +1 -17
  82. package/dist/lib/execution-profile.js +1 -84
  83. package/dist/lib/executors.d.ts +1 -32
  84. package/dist/lib/executors.js +1 -43
  85. package/dist/lib/interf-bootstrap.d.ts +1 -3
  86. package/dist/lib/interf-bootstrap.js +3 -18
  87. package/dist/lib/interf-detect.d.ts +1 -33
  88. package/dist/lib/interf-detect.js +3 -176
  89. package/dist/lib/interf-scaffold.d.ts +1 -2
  90. package/dist/lib/interf-scaffold.js +3 -121
  91. package/dist/lib/interf-workflow-package.d.ts +1 -20
  92. package/dist/lib/interf-workflow-package.js +1 -276
  93. package/dist/lib/interf.d.ts +1 -5
  94. package/dist/lib/interf.js +3 -4
  95. package/dist/lib/local-workflows.d.ts +1 -53
  96. package/dist/lib/local-workflows.js +1 -399
  97. package/dist/lib/package-root.d.ts +1 -0
  98. package/dist/lib/package-root.js +1 -0
  99. package/dist/lib/project-paths.d.ts +1 -11
  100. package/dist/lib/project-paths.js +3 -32
  101. package/dist/lib/runtime-acceptance.d.ts +1 -9
  102. package/dist/lib/runtime-acceptance.js +1 -257
  103. package/dist/lib/runtime-contracts.d.ts +1 -2
  104. package/dist/lib/runtime-contracts.js +1 -47
  105. package/dist/lib/runtime-inventory.d.ts +1 -7
  106. package/dist/lib/runtime-inventory.js +1 -29
  107. package/dist/lib/runtime-paths.d.ts +1 -7
  108. package/dist/lib/runtime-paths.js +1 -23
  109. package/dist/lib/runtime-prompt.d.ts +1 -2
  110. package/dist/lib/runtime-prompt.js +1 -46
  111. package/dist/lib/runtime-reconcile.d.ts +1 -2
  112. package/dist/lib/runtime-reconcile.js +1 -156
  113. package/dist/lib/runtime-runs.d.ts +1 -11
  114. package/dist/lib/runtime-runs.js +1 -250
  115. package/dist/lib/runtime-types.d.ts +1 -43
  116. package/dist/lib/runtime-types.js +1 -1
  117. package/dist/lib/runtime.d.ts +1 -6
  118. package/dist/lib/runtime.js +1 -5
  119. package/dist/lib/schema.d.ts +4 -1016
  120. package/dist/lib/schema.js +6 -539
  121. package/dist/lib/source-config.d.ts +1 -39
  122. package/dist/lib/source-config.js +3 -293
  123. package/dist/lib/state-artifacts.d.ts +1 -8
  124. package/dist/lib/state-artifacts.js +1 -13
  125. package/dist/lib/state-health.d.ts +1 -4
  126. package/dist/lib/state-health.js +1 -132
  127. package/dist/lib/state-io.d.ts +1 -10
  128. package/dist/lib/state-io.js +1 -76
  129. package/dist/lib/state-paths.d.ts +1 -4
  130. package/dist/lib/state-paths.js +1 -13
  131. package/dist/lib/state-view.d.ts +1 -4
  132. package/dist/lib/state-view.js +1 -103
  133. package/dist/lib/state.d.ts +1 -6
  134. package/dist/lib/state.js +1 -5
  135. package/dist/lib/test-execution.d.ts +1 -14
  136. package/dist/lib/test-execution.js +3 -525
  137. package/dist/lib/test-matrices.d.ts +1 -90
  138. package/dist/lib/test-matrices.js +3 -96
  139. package/dist/lib/test-paths.d.ts +1 -12
  140. package/dist/lib/test-paths.js +3 -59
  141. package/dist/lib/test-profile-presets.d.ts +1 -57
  142. package/dist/lib/test-profile-presets.js +3 -50
  143. package/dist/lib/test-sandbox.d.ts +1 -11
  144. package/dist/lib/test-sandbox.js +3 -105
  145. package/dist/lib/test-specs.d.ts +1 -7
  146. package/dist/lib/test-specs.js +3 -114
  147. package/dist/lib/test-targets.d.ts +1 -5
  148. package/dist/lib/test-targets.js +3 -38
  149. package/dist/lib/test-types.d.ts +1 -17
  150. package/dist/lib/test-types.js +3 -1
  151. package/dist/lib/test.d.ts +1 -4
  152. package/dist/lib/test.js +3 -3
  153. package/dist/lib/validate-compiled.d.ts +1 -27
  154. package/dist/lib/validate-compiled.js +1 -238
  155. package/dist/lib/validate-helpers.d.ts +1 -12
  156. package/dist/lib/validate-helpers.js +1 -41
  157. package/dist/lib/validate.d.ts +1 -19
  158. package/dist/lib/validate.js +1 -256
  159. package/dist/lib/workflow-authoring.d.ts +1 -0
  160. package/dist/lib/workflow-authoring.js +1 -0
  161. package/dist/lib/workflow-definitions.d.ts +1 -68
  162. package/dist/lib/workflow-definitions.js +1 -206
  163. package/dist/lib/workflow-edit-session.d.ts +1 -0
  164. package/dist/lib/workflow-edit-session.js +1 -0
  165. package/dist/lib/workflow-edit-utils.d.ts +1 -0
  166. package/dist/lib/workflow-edit-utils.js +1 -0
  167. package/dist/lib/workflow-helpers.d.ts +1 -38
  168. package/dist/lib/workflow-helpers.js +1 -167
  169. package/dist/lib/workflow-improvement.d.ts +1 -22
  170. package/dist/lib/workflow-improvement.js +1 -396
  171. package/dist/lib/workflow-primitives.d.ts +1 -2
  172. package/dist/lib/workflow-primitives.js +1 -5
  173. package/dist/lib/workflow-review-paths.d.ts +1 -10
  174. package/dist/lib/workflow-review-paths.js +1 -27
  175. package/dist/lib/workflow-stage-policy.d.ts +1 -0
  176. package/dist/lib/workflow-stage-policy.js +1 -0
  177. package/dist/lib/workflow-stage-runner.d.ts +1 -41
  178. package/dist/lib/workflow-stage-runner.js +1 -109
  179. package/dist/lib/workflows.d.ts +1 -15
  180. package/dist/lib/workflows.js +1 -31
  181. package/dist/packages/agents/index.d.ts +17 -0
  182. package/dist/packages/agents/index.js +15 -0
  183. package/dist/packages/agents/lib/agents.d.ts +6 -0
  184. package/dist/packages/agents/lib/agents.js +5 -0
  185. package/dist/packages/agents/lib/args.d.ts +4 -0
  186. package/dist/packages/agents/lib/args.js +52 -0
  187. package/dist/packages/agents/lib/constants.d.ts +5 -0
  188. package/dist/packages/agents/lib/constants.js +28 -0
  189. package/dist/packages/agents/lib/detection.d.ts +7 -0
  190. package/dist/packages/agents/lib/detection.js +65 -0
  191. package/dist/packages/agents/lib/execution-profile.d.ts +17 -0
  192. package/dist/packages/agents/lib/execution-profile.js +84 -0
  193. package/dist/packages/agents/lib/execution.d.ts +2 -0
  194. package/dist/packages/agents/lib/execution.js +243 -0
  195. package/dist/packages/agents/lib/executors.d.ts +32 -0
  196. package/dist/packages/agents/lib/executors.js +45 -0
  197. package/dist/packages/agents/lib/logs.d.ts +2 -0
  198. package/dist/packages/agents/lib/logs.js +17 -0
  199. package/dist/packages/agents/lib/preflight.d.ts +7 -0
  200. package/dist/packages/agents/lib/preflight.js +77 -0
  201. package/dist/packages/agents/lib/render.d.ts +8 -0
  202. package/dist/packages/agents/lib/render.js +218 -0
  203. package/dist/packages/agents/lib/schema.d.ts +8 -0
  204. package/dist/packages/agents/lib/schema.js +7 -0
  205. package/dist/packages/agents/lib/shells.d.ts +69 -0
  206. package/dist/packages/agents/lib/shells.js +1021 -0
  207. package/dist/packages/agents/lib/status.d.ts +3 -0
  208. package/dist/packages/agents/lib/status.js +58 -0
  209. package/dist/packages/agents/lib/types.d.ts +30 -0
  210. package/dist/packages/agents/lib/types.js +1 -0
  211. package/dist/{lib → packages/agents/lib}/user-config.d.ts +1 -0
  212. package/dist/{lib → packages/agents/lib}/user-config.js +3 -2
  213. package/dist/packages/compiler/compiled-compile.d.ts +48 -0
  214. package/dist/packages/compiler/compiled-compile.js +256 -0
  215. package/dist/packages/compiler/compiled-schema.d.ts +31 -0
  216. package/dist/packages/compiler/compiled-schema.js +141 -0
  217. package/dist/packages/compiler/index.d.ts +24 -0
  218. package/dist/packages/compiler/index.js +23 -0
  219. package/dist/packages/compiler/lib/schema.d.ts +684 -0
  220. package/dist/packages/compiler/lib/schema.js +361 -0
  221. package/dist/packages/compiler/runtime-acceptance.d.ts +9 -0
  222. package/dist/packages/compiler/runtime-acceptance.js +269 -0
  223. package/dist/packages/compiler/runtime-contracts.d.ts +2 -0
  224. package/dist/packages/compiler/runtime-contracts.js +48 -0
  225. package/dist/packages/compiler/runtime-inventory.d.ts +7 -0
  226. package/dist/packages/compiler/runtime-inventory.js +29 -0
  227. package/dist/packages/compiler/runtime-paths.d.ts +8 -0
  228. package/dist/packages/compiler/runtime-paths.js +26 -0
  229. package/dist/packages/compiler/runtime-prompt.d.ts +2 -0
  230. package/dist/packages/compiler/runtime-prompt.js +48 -0
  231. package/dist/packages/compiler/runtime-reconcile.d.ts +2 -0
  232. package/dist/packages/compiler/runtime-reconcile.js +193 -0
  233. package/dist/packages/compiler/runtime-runs.d.ts +11 -0
  234. package/dist/packages/compiler/runtime-runs.js +262 -0
  235. package/dist/packages/compiler/runtime-types.d.ts +43 -0
  236. package/dist/packages/compiler/runtime-types.js +1 -0
  237. package/dist/packages/compiler/runtime.d.ts +6 -0
  238. package/dist/packages/compiler/runtime.js +5 -0
  239. package/dist/packages/compiler/state-artifacts.d.ts +8 -0
  240. package/dist/packages/compiler/state-artifacts.js +13 -0
  241. package/dist/packages/compiler/state-health.d.ts +4 -0
  242. package/dist/packages/compiler/state-health.js +132 -0
  243. package/dist/packages/compiler/state-io.d.ts +10 -0
  244. package/dist/packages/compiler/state-io.js +76 -0
  245. package/dist/packages/compiler/state-paths.d.ts +4 -0
  246. package/dist/packages/compiler/state-paths.js +13 -0
  247. package/dist/packages/compiler/state-view.d.ts +4 -0
  248. package/dist/packages/compiler/state-view.js +103 -0
  249. package/dist/packages/compiler/state.d.ts +7 -0
  250. package/dist/packages/compiler/state.js +12 -0
  251. package/dist/packages/compiler/validate-compiled.d.ts +27 -0
  252. package/dist/packages/compiler/validate-compiled.js +241 -0
  253. package/dist/packages/compiler/validate-helpers.d.ts +12 -0
  254. package/dist/packages/compiler/validate-helpers.js +41 -0
  255. package/dist/packages/compiler/validate.d.ts +21 -0
  256. package/dist/packages/compiler/validate.js +249 -0
  257. package/dist/packages/compiler/workflow-primitives.d.ts +2 -0
  258. package/dist/packages/compiler/workflow-primitives.js +5 -0
  259. package/dist/packages/compiler/workflows.d.ts +15 -0
  260. package/dist/packages/compiler/workflows.js +31 -0
  261. package/dist/packages/project-model/compiled-paths.d.ts +40 -0
  262. package/dist/packages/project-model/compiled-paths.js +106 -0
  263. package/dist/packages/project-model/compiled-raw.d.ts +49 -0
  264. package/dist/packages/project-model/compiled-raw.js +102 -0
  265. package/dist/packages/project-model/compiled-reset.d.ts +2 -0
  266. package/dist/packages/project-model/compiled-reset.js +72 -0
  267. package/dist/packages/project-model/index.d.ts +11 -0
  268. package/dist/packages/project-model/index.js +10 -0
  269. package/dist/packages/project-model/interf-bootstrap.d.ts +3 -0
  270. package/dist/packages/project-model/interf-bootstrap.js +18 -0
  271. package/dist/packages/project-model/interf-detect.d.ts +33 -0
  272. package/dist/packages/project-model/interf-detect.js +176 -0
  273. package/dist/packages/project-model/interf-scaffold.d.ts +2 -0
  274. package/dist/packages/project-model/interf-scaffold.js +124 -0
  275. package/dist/packages/project-model/interf.d.ts +5 -0
  276. package/dist/packages/project-model/interf.js +4 -0
  277. package/dist/packages/project-model/lib/schema.d.ts +125 -0
  278. package/dist/packages/project-model/lib/schema.js +62 -0
  279. package/dist/packages/project-model/project-paths.d.ts +11 -0
  280. package/dist/packages/project-model/project-paths.js +32 -0
  281. package/dist/packages/project-model/source-config.d.ts +38 -0
  282. package/dist/packages/project-model/source-config.js +297 -0
  283. package/dist/packages/testing/index.d.ts +13 -0
  284. package/dist/packages/testing/index.js +10 -0
  285. package/dist/packages/testing/lib/schema.d.ts +261 -0
  286. package/dist/packages/testing/lib/schema.js +119 -0
  287. package/dist/packages/testing/test-execution.d.ts +14 -0
  288. package/dist/packages/testing/test-execution.js +525 -0
  289. package/dist/packages/testing/test-matrices.d.ts +90 -0
  290. package/dist/packages/testing/test-matrices.js +96 -0
  291. package/dist/packages/testing/test-paths.d.ts +12 -0
  292. package/dist/packages/testing/test-paths.js +59 -0
  293. package/dist/packages/testing/test-profile-presets.d.ts +57 -0
  294. package/dist/packages/testing/test-profile-presets.js +50 -0
  295. package/dist/packages/testing/test-sandbox.d.ts +11 -0
  296. package/dist/packages/testing/test-sandbox.js +105 -0
  297. package/dist/packages/testing/test-specs.d.ts +7 -0
  298. package/dist/packages/testing/test-specs.js +114 -0
  299. package/dist/packages/testing/test-targets.d.ts +5 -0
  300. package/dist/packages/testing/test-targets.js +38 -0
  301. package/dist/packages/testing/test-types.d.ts +16 -0
  302. package/dist/packages/testing/test-types.js +1 -0
  303. package/dist/packages/testing/test.d.ts +4 -0
  304. package/dist/packages/testing/test.js +3 -0
  305. package/dist/packages/workflow-authoring/index.d.ts +4 -0
  306. package/dist/packages/workflow-authoring/index.js +4 -0
  307. package/dist/packages/workflow-authoring/lib/workflow-edit-utils.d.ts +10 -0
  308. package/dist/packages/workflow-authoring/lib/workflow-edit-utils.js +39 -0
  309. package/dist/packages/workflow-authoring/workflow-authoring.d.ts +26 -0
  310. package/dist/packages/workflow-authoring/workflow-authoring.js +120 -0
  311. package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +16 -0
  312. package/dist/packages/workflow-authoring/workflow-edit-session.js +57 -0
  313. package/dist/packages/workflow-authoring/workflow-improvement.d.ts +23 -0
  314. package/dist/packages/workflow-authoring/workflow-improvement.js +209 -0
  315. package/dist/packages/workflow-package/builtin-compiled-workflow.d.ts +38 -0
  316. package/dist/packages/workflow-package/builtin-compiled-workflow.js +94 -0
  317. package/dist/packages/workflow-package/index.d.ts +9 -0
  318. package/dist/packages/workflow-package/index.js +9 -0
  319. package/dist/packages/workflow-package/interf-workflow-package.d.ts +25 -0
  320. package/dist/packages/workflow-package/interf-workflow-package.js +342 -0
  321. package/dist/{lib/config.d.ts → packages/workflow-package/lib/package-root.d.ts} +0 -1
  322. package/dist/packages/workflow-package/lib/package-root.js +6 -0
  323. package/dist/packages/workflow-package/local-workflows.d.ts +54 -0
  324. package/dist/packages/workflow-package/local-workflows.js +422 -0
  325. package/dist/packages/workflow-package/workflow-definitions.d.ts +78 -0
  326. package/dist/packages/workflow-package/workflow-definitions.js +203 -0
  327. package/dist/packages/workflow-package/workflow-helpers.d.ts +38 -0
  328. package/dist/packages/workflow-package/workflow-helpers.js +167 -0
  329. package/dist/packages/workflow-package/workflow-review-paths.d.ts +10 -0
  330. package/dist/packages/workflow-package/workflow-review-paths.js +27 -0
  331. package/dist/packages/workflow-package/workflow-stage-policy.d.ts +5 -0
  332. package/dist/packages/workflow-package/workflow-stage-policy.js +31 -0
  333. package/dist/packages/workflow-package/workflow-stage-runner.d.ts +41 -0
  334. package/dist/packages/workflow-package/workflow-stage-runner.js +109 -0
  335. package/package.json +44 -21
  336. package/dist/commands/compile.d.ts +0 -15
  337. package/dist/commands/create-workflow-wizard.js +0 -125
  338. package/dist/commands/create.js +0 -162
  339. package/dist/commands/init.d.ts +0 -3
  340. package/dist/commands/test.d.ts +0 -9
  341. package/dist/lib/compiled-home.d.ts +0 -5
  342. package/dist/lib/compiled-home.js +0 -32
  343. package/dist/lib/config.js +0 -9
  344. package/dist/lib/obsidian.d.ts +0 -1
  345. package/dist/lib/obsidian.js +0 -15
  346. package/dist/lib/summarize-plan.d.ts +0 -17
  347. package/dist/lib/summarize-plan.js +0 -120
  348. /package/dist/{commands → cli/commands}/default.d.ts +0 -0
  349. /package/dist/{commands → cli/commands}/doctor.d.ts +0 -0
  350. /package/dist/{commands → cli/commands}/list.d.ts +0 -0
  351. /package/dist/{commands → cli/commands}/reset.d.ts +0 -0
  352. /package/dist/{commands → cli/commands}/status.d.ts +0 -0
  353. /package/dist/{commands → cli/commands}/verify.d.ts +0 -0
@@ -0,0 +1,297 @@
1
+ import { createHash } from "node:crypto";
2
+ import { existsSync, mkdirSync, writeFileSync } from "node:fs";
3
+ import { join, relative, resolve, sep } from "node:path";
4
+ import { readInterfConfig, refreshCompiledBootstrapGuidance, } from "./interf.js";
5
+ import { seedCompiledWorkflowPackage } from "../workflow-package/interf-workflow-package.js";
6
+ import { readJsonFileWithSchema } from "../../lib/parse.js";
7
+ import { getCompiledWorkflow } from "../workflow-package/workflow-definitions.js";
8
+ import { SourceFolderConfigSchema, } from "./lib/schema.js";
9
+ import { slugify } from "../../lib/util.js";
10
+ import { assertPathWithinRoot } from "../../lib/util.js";
11
+ import { defaultControlPathForCompiled, resolveSourceControlPathForCompiled, compiledInterfConfigPath, compiledInterfRoot, } from "./compiled-paths.js";
12
+ export const SOURCE_FOLDER_CONFIG_FILE = "interf.json";
13
+ function sourceConfigPath(sourcePath) {
14
+ return join(sourcePath, SOURCE_FOLDER_CONFIG_FILE);
15
+ }
16
+ function normalizeTruthChecks(cases) {
17
+ const seen = new Set();
18
+ return cases.map((caseSpec, index) => {
19
+ const baseId = slugify(caseSpec.id ?? caseSpec.question) || `check-${index + 1}`;
20
+ let id = baseId;
21
+ let suffix = 2;
22
+ while (seen.has(id)) {
23
+ id = `${baseId}-${suffix}`;
24
+ suffix += 1;
25
+ }
26
+ seen.add(id);
27
+ return {
28
+ id,
29
+ question: caseSpec.question.trim(),
30
+ ...(caseSpec.answer ? { answer: caseSpec.answer.trim() } : {}),
31
+ ...(caseSpec.strictness ? { strictness: caseSpec.strictness.trim() } : {}),
32
+ ...(caseSpec.expect ? { expect: caseSpec.expect } : {}),
33
+ };
34
+ });
35
+ }
36
+ export function fingerprintTruthChecks(checks) {
37
+ const normalized = checks.map((check) => ({
38
+ question: check.question.trim(),
39
+ ...(check.answer ? { answer: check.answer.trim() } : {}),
40
+ ...(check.strictness ? { strictness: check.strictness.trim() } : {}),
41
+ ...(check.expect ? { expect: check.expect } : {}),
42
+ }));
43
+ return createHash("sha256")
44
+ .update(JSON.stringify(normalized))
45
+ .digest("hex")
46
+ .slice(0, 16);
47
+ }
48
+ export function loadSourceFolderConfig(sourcePath) {
49
+ const filePath = sourceConfigPath(sourcePath);
50
+ if (!existsSync(filePath))
51
+ return null;
52
+ return readJsonFileWithSchema(filePath, "Interf project config", SourceFolderConfigSchema);
53
+ }
54
+ export function listSourceDatasetConfigs(config) {
55
+ return config?.datasets ?? [];
56
+ }
57
+ export function resolveDatasetCompileMaxAttempts(datasetConfig, override = null) {
58
+ const configured = override ?? datasetConfig.max_attempts ?? null;
59
+ if (configured == null)
60
+ return null;
61
+ const normalized = Math.trunc(configured);
62
+ if (!Number.isFinite(normalized) || normalized < 1)
63
+ return 1;
64
+ return Math.min(5, normalized);
65
+ }
66
+ export function resolveDatasetCompileMaxLoops(datasetConfig, override = null) {
67
+ const configured = override ?? datasetConfig.max_loops ?? null;
68
+ if (configured == null)
69
+ return null;
70
+ const normalized = Math.trunc(configured);
71
+ if (!Number.isFinite(normalized) || normalized < 1)
72
+ return 1;
73
+ return Math.min(3, normalized);
74
+ }
75
+ export function getDefaultSourceDatasetConfig(config) {
76
+ const datasets = listSourceDatasetConfigs(config);
77
+ return datasets[0] ?? null;
78
+ }
79
+ export function findSourceDatasetConfig(config, datasetName) {
80
+ return listSourceDatasetConfigs(config).find((dataset) => dataset.name === datasetName) ?? null;
81
+ }
82
+ function toWritableSourceProjectConfig(config) {
83
+ const datasets = config?.datasets ?? [];
84
+ if (datasets.length > 0) {
85
+ return {
86
+ datasets: datasets.map((dataset) => toWritableSourceDatasetConfig(dataset)),
87
+ };
88
+ }
89
+ return {};
90
+ }
91
+ function toWritableSourceDatasetConfig(dataset) {
92
+ return {
93
+ name: dataset.name,
94
+ path: dataset.path,
95
+ ...(dataset.about ? { about: dataset.about } : {}),
96
+ ...(dataset.workflow && dataset.workflow !== "interf" ? { workflow: dataset.workflow } : {}),
97
+ ...(typeof dataset.max_attempts === "number" ? { max_attempts: dataset.max_attempts } : {}),
98
+ ...(typeof dataset.max_loops === "number" ? { max_loops: dataset.max_loops } : {}),
99
+ checks: dataset.checks,
100
+ };
101
+ }
102
+ export function saveSourceFolderConfig(sourcePath, config) {
103
+ writeFileSync(sourceConfigPath(sourcePath), JSON.stringify(toWritableSourceProjectConfig(config), null, 2) + "\n");
104
+ }
105
+ export function appendSourceDatasetChecks(sourcePath, datasetName, checks) {
106
+ const existing = loadSourceFolderConfig(sourcePath);
107
+ const currentDataset = findSourceDatasetConfig(existing, datasetName);
108
+ const otherDatasets = listSourceDatasetConfigs(existing).filter((dataset) => dataset.name !== datasetName);
109
+ const currentChecks = currentDataset?.checks ?? [];
110
+ const nextDataset = {
111
+ ...toWritableSourceDatasetConfig(currentDataset ?? {
112
+ name: datasetName,
113
+ path: `./${datasetName}`,
114
+ checks: [],
115
+ }),
116
+ checks: [...currentChecks, ...checks],
117
+ };
118
+ saveSourceFolderConfig(sourcePath, {
119
+ datasets: [
120
+ nextDataset,
121
+ ...otherDatasets,
122
+ ],
123
+ });
124
+ }
125
+ export function upsertSourceDatasetConfig(sourcePath, datasetConfig, options = {}) {
126
+ const existing = loadSourceFolderConfig(sourcePath);
127
+ const datasets = listSourceDatasetConfigs(existing);
128
+ const candidateNames = Array.from(new Set([datasetConfig.name, options.matchName].filter((value) => Boolean(value))));
129
+ const existingIndex = datasets.findIndex((entry) => candidateNames.includes(entry.name));
130
+ if (existingIndex >= 0) {
131
+ datasets[existingIndex] = datasetConfig;
132
+ }
133
+ else {
134
+ datasets.push(datasetConfig);
135
+ }
136
+ saveSourceFolderConfig(sourcePath, {
137
+ datasets,
138
+ });
139
+ }
140
+ export function compiledMaxAttempts(maxAttempts) {
141
+ if (maxAttempts == null)
142
+ return undefined;
143
+ return resolveDatasetCompileMaxAttempts({ max_attempts: maxAttempts }, null) ?? 1;
144
+ }
145
+ export function compiledMaxLoops(maxLoops) {
146
+ if (maxLoops == null)
147
+ return undefined;
148
+ return resolveDatasetCompileMaxLoops({ max_loops: maxLoops }, null) ?? 1;
149
+ }
150
+ export function sourceDatasetConfigFromInterfConfig(config, datasetPath = `./${config.name}`) {
151
+ return {
152
+ name: config.name,
153
+ path: datasetPath,
154
+ ...(config.about ? { about: config.about } : {}),
155
+ ...(config.workflow ? { workflow: config.workflow } : {}),
156
+ ...(typeof config.max_attempts === "number"
157
+ ? { max_attempts: config.max_attempts }
158
+ : {}),
159
+ ...(typeof config.max_loops === "number"
160
+ ? { max_loops: config.max_loops }
161
+ : {}),
162
+ checks: config.checks ?? [],
163
+ };
164
+ }
165
+ export function loadCompiledDatasetConfig(compiledPath) {
166
+ const config = readInterfConfig(compiledPath);
167
+ if (!config)
168
+ return null;
169
+ const projectPath = resolveSourceControlPathForCompiled(compiledPath);
170
+ const configuredDatasets = listSourceDatasetConfigs(loadSourceFolderConfig(projectPath));
171
+ const fallbackDatasetPath = configuredDatasets.length === 1
172
+ ? configuredDatasets[0].path
173
+ : `./${config.name}`;
174
+ const datasetPath = typeof config.source?.dataset_path === "string" && config.source.dataset_path.length > 0
175
+ ? relative(projectPath, assertPathWithinRoot(projectPath, resolve(compiledPath, config.source.dataset_path), "Compiled context source path")).split(sep).join("/") || fallbackDatasetPath
176
+ : fallbackDatasetPath;
177
+ return sourceDatasetConfigFromInterfConfig(config, datasetPath);
178
+ }
179
+ export function saveCompiledInterfConfig(compiledPath, config) {
180
+ mkdirSync(compiledInterfRoot(compiledPath), { recursive: true });
181
+ writeFileSync(compiledInterfConfigPath(compiledPath), JSON.stringify(config, null, 2) + "\n");
182
+ return config;
183
+ }
184
+ export function syncCompiledInterfConfigFromSourceDatasetConfig(compiledPath, datasetConfig) {
185
+ const current = readInterfConfig(compiledPath);
186
+ const projectPath = resolveSourceControlPathForCompiled(compiledPath);
187
+ const datasetAbsolutePath = resolve(projectPath, datasetConfig.path);
188
+ const datasetRelativePath = relative(compiledPath, datasetAbsolutePath).split(sep).join("/") || ".";
189
+ const workflowId = datasetConfig.workflow ?? current?.workflow ?? "interf";
190
+ const workflowChanged = current?.workflow !== undefined && current.workflow !== workflowId;
191
+ const workflowOrigin = workflowChanged || !current?.workflow_origin
192
+ ? {
193
+ selected: workflowId,
194
+ local_draft: false,
195
+ }
196
+ : current.workflow_origin;
197
+ const { type: _ignoredType, name: _ignoredName, about: _ignoredAbout, workflow: _ignoredWorkflow, max_attempts: _ignoredMaxAttempts, max_loops: _ignoredMaxLoops, checks: _ignoredChecks, workflow_origin: _ignoredWorkflowOrigin, source: _ignoredSource, ...passthrough } = current ?? {};
198
+ const nextConfig = {
199
+ ...passthrough,
200
+ ...(!current ? {
201
+ type: "compiled",
202
+ source: {
203
+ path: "./raw",
204
+ },
205
+ } : {}),
206
+ type: "compiled",
207
+ name: datasetConfig.name,
208
+ ...(datasetConfig.about ? { about: datasetConfig.about } : {}),
209
+ workflow: workflowId,
210
+ ...(typeof datasetConfig.max_attempts === "number"
211
+ ? { max_attempts: datasetConfig.max_attempts }
212
+ : {}),
213
+ ...(typeof datasetConfig.max_loops === "number"
214
+ ? { max_loops: datasetConfig.max_loops }
215
+ : {}),
216
+ checks: datasetConfig.checks,
217
+ workflow_origin: workflowOrigin,
218
+ source: {
219
+ path: current?.source?.path ?? "./raw",
220
+ control_path: defaultControlPathForCompiled(compiledPath),
221
+ dataset_path: datasetRelativePath,
222
+ },
223
+ };
224
+ const saved = saveCompiledInterfConfig(compiledPath, nextConfig);
225
+ if (workflowChanged) {
226
+ const sourcePath = projectPath;
227
+ const selectedWorkflow = getCompiledWorkflow(workflowId, { sourcePath });
228
+ seedCompiledWorkflowPackage({
229
+ compiledPath,
230
+ sourcePath,
231
+ workflowId: selectedWorkflow.id,
232
+ });
233
+ }
234
+ refreshCompiledBootstrapGuidance(compiledPath);
235
+ return saved;
236
+ }
237
+ function buildLoadedTestSpec(options) {
238
+ if (options.checks.length === 0)
239
+ return null;
240
+ const testId = options.id ?? slugify(options.name);
241
+ return {
242
+ id: options.targetType === "raw" ? `${testId}-raw` : testId,
243
+ filePath: options.filePath,
244
+ type: options.targetType,
245
+ name: options.name,
246
+ description: options.about ?? options.fallbackDescription,
247
+ cases: normalizeTruthChecks(options.checks),
248
+ };
249
+ }
250
+ export function buildTestSpecFromSourceFolderConfig(options) {
251
+ const { sourcePath, targetName, targetType = "compiled" } = options;
252
+ const config = loadSourceFolderConfig(sourcePath);
253
+ if (!config)
254
+ return null;
255
+ const datasets = listSourceDatasetConfigs(config);
256
+ if (datasets.length === 0)
257
+ return null;
258
+ const match = targetName
259
+ ? datasets.find((entry) => entry.name === targetName)
260
+ : datasets.length === 1
261
+ ? datasets[0]
262
+ : getDefaultSourceDatasetConfig(config);
263
+ if (!match)
264
+ return null;
265
+ const configPath = sourceConfigPath(sourcePath);
266
+ return buildLoadedTestSpec({
267
+ id: match.id,
268
+ name: match.name,
269
+ about: match.about,
270
+ checks: match.checks,
271
+ targetType,
272
+ filePath: targetType === "raw"
273
+ ? `${configPath}#datasets/${match.name}:file-as-is`
274
+ : `${configPath}#datasets/${match.name}:compiled`,
275
+ fallbackDescription: `Derived from saved dataset checks in ${SOURCE_FOLDER_CONFIG_FILE}`,
276
+ });
277
+ }
278
+ export function buildTestSpecFromCompiledDatasetConfig(options) {
279
+ const { compiledPath, targetType = "compiled" } = options;
280
+ const config = readInterfConfig(compiledPath);
281
+ const configPath = compiledInterfConfigPath(compiledPath);
282
+ if (!config)
283
+ return null;
284
+ return buildLoadedTestSpec({
285
+ name: config.name,
286
+ about: config.about,
287
+ checks: config.checks ?? [],
288
+ targetType,
289
+ filePath: targetType === "raw"
290
+ ? `${configPath}#checks:file-as-is`
291
+ : `${configPath}#checks:compiled`,
292
+ fallbackDescription: "Derived from checks in the compiled context config.",
293
+ });
294
+ }
295
+ export function resolveSourceDatasetPath(projectPath, datasetConfig) {
296
+ return assertPathWithinRoot(projectPath, resolve(projectPath, datasetConfig.path), "Dataset path");
297
+ }
@@ -0,0 +1,13 @@
1
+ export * as schema from "./lib/schema.js";
2
+ export * as test from "./test.js";
3
+ export * as execution from "./test-execution.js";
4
+ export * as matrices from "./test-matrices.js";
5
+ export * as paths from "./test-paths.js";
6
+ export * as profilePresets from "./test-profile-presets.js";
7
+ export * as sandbox from "./test-sandbox.js";
8
+ export * as specs from "./test-specs.js";
9
+ export * as targets from "./test-targets.js";
10
+ export * as types from "./test-types.js";
11
+ export type { TestCase, TestCaseExpect, TestCheckResult, TestCaseResult, TestSpec, TestTargetResult, TestTargetRun, TestRunComparison, TestTargetType, } from "./lib/schema.js";
12
+ export type { LoadedTestSpec, TestTargetCandidate, } from "./test-types.js";
13
+ export type { TestSandboxRetentionMode, } from "./test-sandbox.js";
@@ -0,0 +1,10 @@
1
+ export * as schema from "./lib/schema.js";
2
+ export * as test from "./test.js";
3
+ export * as execution from "./test-execution.js";
4
+ export * as matrices from "./test-matrices.js";
5
+ export * as paths from "./test-paths.js";
6
+ export * as profilePresets from "./test-profile-presets.js";
7
+ export * as sandbox from "./test-sandbox.js";
8
+ export * as specs from "./test-specs.js";
9
+ export * as targets from "./test-targets.js";
10
+ export * as types from "./test-types.js";
@@ -0,0 +1,261 @@
1
+ import { z } from "zod";
2
+ import { type TestCaseExpect, type TestTargetType } from "../../compiler/lib/schema.js";
3
+ export declare const TestCaseSchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ question: z.ZodString;
6
+ file: z.ZodOptional<z.ZodString>;
7
+ answer: z.ZodOptional<z.ZodString>;
8
+ expect: z.ZodOptional<z.ZodObject<{
9
+ must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
10
+ must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
11
+ must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
+ min_words: z.ZodOptional<z.ZodNumber>;
13
+ max_words: z.ZodOptional<z.ZodNumber>;
14
+ }, z.core.$strip>>;
15
+ strictness: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ export declare const TestSpecSchema: z.ZodObject<{
18
+ type: z.ZodEnum<{
19
+ compiled: "compiled";
20
+ raw: "raw";
21
+ }>;
22
+ name: z.ZodString;
23
+ description: z.ZodOptional<z.ZodString>;
24
+ cases: z.ZodArray<z.ZodObject<{
25
+ id: z.ZodString;
26
+ question: z.ZodString;
27
+ file: z.ZodOptional<z.ZodString>;
28
+ answer: z.ZodOptional<z.ZodString>;
29
+ expect: z.ZodOptional<z.ZodObject<{
30
+ must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
+ must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
32
+ must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
33
+ min_words: z.ZodOptional<z.ZodNumber>;
34
+ max_words: z.ZodOptional<z.ZodNumber>;
35
+ }, z.core.$strip>>;
36
+ strictness: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strip>>;
38
+ }, z.core.$strip>;
39
+ export declare const TestCheckResultSchema: z.ZodObject<{
40
+ label: z.ZodString;
41
+ ok: z.ZodBoolean;
42
+ detail: z.ZodString;
43
+ }, z.core.$strip>;
44
+ export declare const TestCaseResultSchema: z.ZodObject<{
45
+ caseId: z.ZodString;
46
+ question: z.ZodString;
47
+ file: z.ZodOptional<z.ZodString>;
48
+ ok: z.ZodBoolean;
49
+ wordCount: z.ZodNumber;
50
+ passedChecks: z.ZodNumber;
51
+ totalChecks: z.ZodNumber;
52
+ checks: z.ZodArray<z.ZodObject<{
53
+ label: z.ZodString;
54
+ ok: z.ZodBoolean;
55
+ detail: z.ZodString;
56
+ }, z.core.$strip>>;
57
+ answer: z.ZodOptional<z.ZodString>;
58
+ trace: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
59
+ }, z.core.$strip>;
60
+ export declare const TestTargetResultSchema: z.ZodObject<{
61
+ target: z.ZodObject<{
62
+ type: z.ZodEnum<{
63
+ compiled: "compiled";
64
+ raw: "raw";
65
+ }>;
66
+ name: z.ZodString;
67
+ path: z.ZodString;
68
+ workflow: z.ZodString;
69
+ }, z.core.$strip>;
70
+ sandbox_path: z.ZodOptional<z.ZodString>;
71
+ ok: z.ZodBoolean;
72
+ passedCases: z.ZodNumber;
73
+ totalCases: z.ZodNumber;
74
+ passedChecks: z.ZodNumber;
75
+ totalChecks: z.ZodNumber;
76
+ caseResults: z.ZodArray<z.ZodObject<{
77
+ caseId: z.ZodString;
78
+ question: z.ZodString;
79
+ file: z.ZodOptional<z.ZodString>;
80
+ ok: z.ZodBoolean;
81
+ wordCount: z.ZodNumber;
82
+ passedChecks: z.ZodNumber;
83
+ totalChecks: z.ZodNumber;
84
+ checks: z.ZodArray<z.ZodObject<{
85
+ label: z.ZodString;
86
+ ok: z.ZodBoolean;
87
+ detail: z.ZodString;
88
+ }, z.core.$strip>>;
89
+ answer: z.ZodOptional<z.ZodString>;
90
+ trace: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
91
+ }, z.core.$strip>>;
92
+ }, z.core.$strip>;
93
+ export declare const TestTargetRunSchema: z.ZodObject<{
94
+ kind: z.ZodLiteral<"interf-test-target-run">;
95
+ version: z.ZodLiteral<1>;
96
+ generated_at: z.ZodString;
97
+ spec: z.ZodObject<{
98
+ id: z.ZodString;
99
+ name: z.ZodString;
100
+ type: z.ZodEnum<{
101
+ compiled: "compiled";
102
+ raw: "raw";
103
+ }>;
104
+ file: z.ZodString;
105
+ description: z.ZodOptional<z.ZodString>;
106
+ case_count: z.ZodNumber;
107
+ cases: z.ZodArray<z.ZodObject<{
108
+ id: z.ZodString;
109
+ question: z.ZodString;
110
+ file: z.ZodOptional<z.ZodString>;
111
+ answer: z.ZodOptional<z.ZodString>;
112
+ strictness: z.ZodOptional<z.ZodString>;
113
+ expect: z.ZodOptional<z.ZodObject<{
114
+ must_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
115
+ must_include_one_of: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
116
+ must_not_include: z.ZodOptional<z.ZodArray<z.ZodString>>;
117
+ min_words: z.ZodOptional<z.ZodNumber>;
118
+ max_words: z.ZodOptional<z.ZodNumber>;
119
+ }, z.core.$strip>>;
120
+ }, z.core.$strip>>;
121
+ }, z.core.$strip>;
122
+ source_path: z.ZodString;
123
+ executor: z.ZodOptional<z.ZodObject<{
124
+ kind: z.ZodEnum<{
125
+ "local-agent": "local-agent";
126
+ "connected-provider": "connected-provider";
127
+ managed: "managed";
128
+ }>;
129
+ name: z.ZodString;
130
+ display_name: z.ZodString;
131
+ command: z.ZodNullable<z.ZodString>;
132
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
133
+ effort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
134
+ profile: z.ZodOptional<z.ZodNullable<z.ZodString>>;
135
+ timeout_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
136
+ }, z.core.$strip>>;
137
+ target_count: z.ZodNumber;
138
+ results: z.ZodArray<z.ZodObject<{
139
+ target: z.ZodObject<{
140
+ type: z.ZodEnum<{
141
+ compiled: "compiled";
142
+ raw: "raw";
143
+ }>;
144
+ name: z.ZodString;
145
+ path: z.ZodString;
146
+ workflow: z.ZodString;
147
+ }, z.core.$strip>;
148
+ sandbox_path: z.ZodOptional<z.ZodString>;
149
+ ok: z.ZodBoolean;
150
+ passedCases: z.ZodNumber;
151
+ totalCases: z.ZodNumber;
152
+ passedChecks: z.ZodNumber;
153
+ totalChecks: z.ZodNumber;
154
+ caseResults: z.ZodArray<z.ZodObject<{
155
+ caseId: z.ZodString;
156
+ question: z.ZodString;
157
+ file: z.ZodOptional<z.ZodString>;
158
+ ok: z.ZodBoolean;
159
+ wordCount: z.ZodNumber;
160
+ passedChecks: z.ZodNumber;
161
+ totalChecks: z.ZodNumber;
162
+ checks: z.ZodArray<z.ZodObject<{
163
+ label: z.ZodString;
164
+ ok: z.ZodBoolean;
165
+ detail: z.ZodString;
166
+ }, z.core.$strip>>;
167
+ answer: z.ZodOptional<z.ZodString>;
168
+ trace: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
169
+ }, z.core.$strip>>;
170
+ }, z.core.$strip>>;
171
+ }, z.core.$strip>;
172
+ export declare const TestRunModeSchema: z.ZodEnum<{
173
+ compiled: "compiled";
174
+ raw: "raw";
175
+ both: "both";
176
+ }>;
177
+ export declare const TestRunTargetSummarySchema: z.ZodObject<{
178
+ label: z.ZodString;
179
+ run_path: z.ZodString;
180
+ ok: z.ZodBoolean;
181
+ passed_cases: z.ZodNumber;
182
+ total_cases: z.ZodNumber;
183
+ passed_checks: z.ZodNumber;
184
+ total_checks: z.ZodNumber;
185
+ target: z.ZodObject<{
186
+ type: z.ZodEnum<{
187
+ compiled: "compiled";
188
+ raw: "raw";
189
+ }>;
190
+ name: z.ZodString;
191
+ path: z.ZodString;
192
+ workflow: z.ZodString;
193
+ }, z.core.$strip>;
194
+ }, z.core.$strip>;
195
+ export declare const TestRunComparisonSchema: z.ZodObject<{
196
+ kind: z.ZodLiteral<"interf-test-run">;
197
+ version: z.ZodLiteral<1>;
198
+ generated_at: z.ZodString;
199
+ mode: z.ZodEnum<{
200
+ compiled: "compiled";
201
+ raw: "raw";
202
+ both: "both";
203
+ }>;
204
+ source_path: z.ZodString;
205
+ checks_fingerprint: z.ZodOptional<z.ZodString>;
206
+ dataset: z.ZodObject<{
207
+ name: z.ZodString;
208
+ compiled_path: z.ZodNullable<z.ZodString>;
209
+ }, z.core.$strip>;
210
+ raw: z.ZodNullable<z.ZodObject<{
211
+ label: z.ZodString;
212
+ run_path: z.ZodString;
213
+ ok: z.ZodBoolean;
214
+ passed_cases: z.ZodNumber;
215
+ total_cases: z.ZodNumber;
216
+ passed_checks: z.ZodNumber;
217
+ total_checks: z.ZodNumber;
218
+ target: z.ZodObject<{
219
+ type: z.ZodEnum<{
220
+ compiled: "compiled";
221
+ raw: "raw";
222
+ }>;
223
+ name: z.ZodString;
224
+ path: z.ZodString;
225
+ workflow: z.ZodString;
226
+ }, z.core.$strip>;
227
+ }, z.core.$strip>>;
228
+ compiled: z.ZodNullable<z.ZodObject<{
229
+ label: z.ZodString;
230
+ run_path: z.ZodString;
231
+ ok: z.ZodBoolean;
232
+ passed_cases: z.ZodNumber;
233
+ total_cases: z.ZodNumber;
234
+ passed_checks: z.ZodNumber;
235
+ total_checks: z.ZodNumber;
236
+ target: z.ZodObject<{
237
+ type: z.ZodEnum<{
238
+ compiled: "compiled";
239
+ raw: "raw";
240
+ }>;
241
+ name: z.ZodString;
242
+ path: z.ZodString;
243
+ workflow: z.ZodString;
244
+ }, z.core.$strip>;
245
+ }, z.core.$strip>>;
246
+ summary: z.ZodObject<{
247
+ raw_pass_rate: z.ZodNullable<z.ZodNumber>;
248
+ compiled_pass_rate: z.ZodNullable<z.ZodNumber>;
249
+ pass_rate_delta: z.ZodNullable<z.ZodNumber>;
250
+ }, z.core.$strip>;
251
+ }, z.core.$strip>;
252
+ export type { TestCaseExpect, TestTargetType };
253
+ export type TestCase = z.infer<typeof TestCaseSchema>;
254
+ export type TestSpec = z.infer<typeof TestSpecSchema>;
255
+ export type TestCheckResult = z.infer<typeof TestCheckResultSchema>;
256
+ export type TestCaseResult = z.infer<typeof TestCaseResultSchema>;
257
+ export type TestTargetResult = z.infer<typeof TestTargetResultSchema>;
258
+ export type TestTargetRun = z.infer<typeof TestTargetRunSchema>;
259
+ export type TestRunMode = z.infer<typeof TestRunModeSchema>;
260
+ export type TestRunTargetSummary = z.infer<typeof TestRunTargetSummarySchema>;
261
+ export type TestRunComparison = z.infer<typeof TestRunComparisonSchema>;