@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
@@ -1,539 +1,6 @@
1
- import { z } from "zod";
2
- import { COMPILED_ZONE_KINDS, } from "./workflow-primitives.js";
3
- const JsonRecordSchema = z.record(z.string(), z.unknown());
4
- const COMPILED_RELATIVE_PATH_SEGMENT = /^(?!\.{1,2}$)[^/\\]+$/;
5
- function isCompiledRelativePath(value) {
6
- if (value.length === 0)
7
- return false;
8
- if (value.startsWith("/") || value.startsWith("\\"))
9
- return false;
10
- return value
11
- .split(/[\\/]+/)
12
- .every((segment) => COMPILED_RELATIVE_PATH_SEGMENT.test(segment));
13
- }
14
- export const RuntimeTargetTypeSchema = z.enum(["compiled"]);
15
- export const TestTargetTypeSchema = z.enum(["compiled", "raw"]);
16
- export const WorkflowIdPattern = /^[a-z0-9][a-z0-9-]{0,79}$/;
17
- export const RuntimeStageSchema = z.string().regex(WorkflowIdPattern);
18
- export const RuntimeContractTypeSchema = z.string().regex(WorkflowIdPattern);
19
- export const WorkflowIdSchema = z.string().regex(WorkflowIdPattern);
20
- export const WorkflowZoneIdSchema = z.string().regex(WorkflowIdPattern);
21
- export const WorkflowCompiledZoneKindSchema = z.enum(COMPILED_ZONE_KINDS);
22
- export const CompiledStageStatusSchema = z.enum(["idle", "running", "succeeded", "failed"]);
23
- export const CompiledStageStateSchema = z.object({
24
- contract_type: RuntimeContractTypeSchema.optional(),
25
- status: CompiledStageStatusSchema.optional(),
26
- started_at: z.string().nullable().optional(),
27
- finished_at: z.string().nullable().optional(),
28
- counts: z.record(z.string(), z.number()).optional(),
29
- zone_counts: z.record(z.string(), z.number()).optional(),
30
- artifacts: z.array(z.string()).optional(),
31
- summary: z.string().nullable().optional(),
32
- run_id: z.string().nullable().optional(),
33
- });
34
- export const CompiledStateSchema = z.object({
35
- version: z.number().int().min(1),
36
- pending: z.array(z.string()),
37
- stages: z.record(z.string().regex(WorkflowIdPattern), CompiledStageStateSchema).optional(),
38
- last_add: z.string().nullable().optional(),
39
- last_compile: z.string().nullable().optional(),
40
- inventory_complete: z.boolean().optional(),
41
- abstracts_read: z.number().optional(),
42
- full_reads: z.number().optional(),
43
- entity_count: z.number().optional(),
44
- claim_count: z.number().optional(),
45
- warning_count: z.number().optional(),
46
- error_count: z.number().optional(),
47
- }).strict();
48
- export const ViewSectionSchema = z.object({
49
- id: z.string(),
50
- type: z.enum(["status", "cards", "graph", "documents", "table"]),
51
- title: z.string(),
52
- path: z.string().optional(),
53
- paths: z.array(z.string()).optional(),
54
- });
55
- export const ViewCardSchema = z.object({
56
- id: z.string(),
57
- label: z.string(),
58
- metric: z.string(),
59
- denominator_metric: z.string().optional(),
60
- format: z.enum(["number", "fraction", "timestamp"]),
61
- });
62
- export const CompiledHealthSchema = z.object({
63
- kind: z.literal("compiled-health"),
64
- version: z.number().int().min(1),
65
- generated_at: z.string(),
66
- target_name: z.string(),
67
- status: z.enum(["idle", "running", "compiled", "stale", "failed"]),
68
- stage: z.union([
69
- z.enum(["idle", "compiled", "failed"]),
70
- RuntimeStageSchema,
71
- ]),
72
- summary: z.string(),
73
- metrics: z.record(z.string(), z.number()),
74
- checks: z.record(z.string(), z.boolean()),
75
- });
76
- export const CompiledViewSpecSchema = z.object({
77
- kind: z.literal("compiled-view-spec"),
78
- version: z.number().int().min(1),
79
- generated_at: z.string(),
80
- target_name: z.string(),
81
- health_source: z.string(),
82
- state_source: z.string(),
83
- default_note: z.string().nullable(),
84
- graph_scope: z.array(z.string()),
85
- cards: z.array(ViewCardSchema),
86
- sections: z.array(ViewSectionSchema),
87
- });
88
- export const CompiledRawSnapshotSchema = z.object({
89
- kind: z.literal("compiled-raw-snapshot"),
90
- version: z.literal(1),
91
- generated_at: z.string(),
92
- target_name: z.string(),
93
- source_root: z.string(),
94
- raw_root: z.string(),
95
- source_total: z.number(),
96
- sample_files: z.array(z.string()),
97
- });
98
- export const WorkflowCompiledZoneSchema = z.object({
99
- id: WorkflowZoneIdSchema,
100
- path: z.string().min(1).refine(isCompiledRelativePath, {
101
- message: "Zone paths must stay inside the compiled root",
102
- }),
103
- kind: WorkflowCompiledZoneKindSchema,
104
- required: z.boolean(),
105
- owned_by: z.array(z.string().regex(WorkflowIdPattern)),
106
- description: z.string().min(1),
107
- });
108
- export const WorkflowCompiledSchemaSchema = z.object({
109
- kind: z.literal("compiled-schema"),
110
- version: z.literal(1),
111
- target_type: z.literal("compiled"),
112
- label: z.string().min(1),
113
- zones: z.array(WorkflowCompiledZoneSchema).min(1),
114
- });
115
- export const WorkflowCompilerApiSchema = z.object({
116
- kind: z.literal("compiled"),
117
- version: z.literal(1),
118
- });
119
- export const WorkflowStageZoneAccessSchema = z.array(WorkflowZoneIdSchema).min(1);
120
- export const ExecutionShellZoneMountSchema = z.object({
121
- zone_id: WorkflowZoneIdSchema,
122
- compiled_path: z.string(),
123
- shell_root_path: z.string(),
124
- input_mount_path: z.string().nullable(),
125
- output_mount_path: z.string().nullable(),
126
- });
127
- export const ExecutionShellPathsSchema = z.object({
128
- kind: z.literal("interf-execution-shell"),
129
- version: z.literal(1),
130
- workflow: WorkflowIdSchema,
131
- stage: RuntimeStageSchema,
132
- reads: z.array(ExecutionShellZoneMountSchema),
133
- writes: z.array(ExecutionShellZoneMountSchema),
134
- });
135
- export const RuntimeExecutorInfoSchema = z.object({
136
- kind: z.enum(["local-agent", "connected-provider", "managed"]),
137
- name: z.string(),
138
- display_name: z.string(),
139
- command: z.string().nullable(),
140
- model: z.string().nullable().optional(),
141
- effort: z.string().nullable().optional(),
142
- profile: z.string().nullable().optional(),
143
- timeout_ms: z.number().nullable().optional(),
144
- });
145
- export const RuntimeStageInstructionsSchema = z.object({
146
- stage_skill_dir: z.string().regex(WorkflowIdPattern),
147
- effective_mode: z.enum(["builtin", "extend", "override"]),
148
- local_mode: z.enum(["extend", "override"]).nullable(),
149
- local_docs: z.array(z.string()),
150
- mode_sources: z.array(z.string()),
151
- }).strict();
152
- export const RuntimeStageAcceptanceSchema = z.object({
153
- artifacts_exist: z.array(z.string()).optional(),
154
- stage_truthy: z.array(z.string()).optional(),
155
- stage_equals_counts: z.record(z.string(), z.string()).optional(),
156
- stage_at_least: z.record(z.string(), z.number()).optional(),
157
- stage_at_least_counts: z.record(z.string(), z.string()).optional(),
158
- zone_counts_at_least: z.record(z.string().regex(WorkflowIdPattern), z.number()).optional(),
159
- zone_counts_at_least_counts: z.record(z.string().regex(WorkflowIdPattern), z.string()).optional(),
160
- markdown_frontmatter_valid_zones: z.array(WorkflowZoneIdSchema).optional(),
161
- markdown_abstract_valid_zones: z.array(WorkflowZoneIdSchema).optional(),
162
- wikilinks_valid_in_zones: z.array(WorkflowZoneIdSchema).optional(),
163
- artifacts_must_not_contain: z.record(z.string(), z.array(z.string().min(1))).optional(),
164
- }).strict();
165
- export const RuntimeStageContractSchema = z.object({
166
- kind: z.literal("interf-stage-contract"),
167
- version: z.literal(1),
168
- generated_at: z.string(),
169
- run_id: z.string(),
170
- target_type: RuntimeTargetTypeSchema,
171
- target_name: z.string(),
172
- workflow: z.object({
173
- id: WorkflowIdSchema,
174
- stage_index: z.number().nullable(),
175
- stage_total: z.number(),
176
- stages: z.array(RuntimeStageSchema),
177
- }),
178
- stage: RuntimeStageSchema,
179
- stage_label: z.string(),
180
- contract_type: RuntimeContractTypeSchema,
181
- executor: RuntimeExecutorInfoSchema,
182
- instructions: RuntimeStageInstructionsSchema,
183
- counts: z.record(z.string(), z.number()),
184
- acceptance: RuntimeStageAcceptanceSchema.optional(),
185
- artifacts: z.object({
186
- reads: z.array(z.string()),
187
- writes: z.array(z.string()),
188
- verifies: z.array(z.string()).optional(),
189
- }),
190
- policies: z.object({
191
- execution_mode: z.literal("deterministic"),
192
- status_prefixes: z.array(z.string()),
193
- notes: z.array(z.string()),
194
- evidence_weighting: z.object({
195
- required_fields: z.array(z.string()),
196
- preserve_tiers: z.boolean(),
197
- }).optional(),
198
- working_set: z.object({
199
- target_context_fraction: z.number(),
200
- strategy: z.string(),
201
- }).optional(),
202
- }),
203
- });
204
- export const RuntimeRunSchema = z.object({
205
- kind: z.literal("interf-run"),
206
- version: z.literal(1),
207
- run_id: z.string(),
208
- target_type: RuntimeTargetTypeSchema,
209
- target_name: z.string(),
210
- workflow: WorkflowIdSchema,
211
- stage: RuntimeStageSchema,
212
- stage_label: z.string(),
213
- contract_type: RuntimeContractTypeSchema,
214
- status: z.enum(["running", "succeeded", "failed"]),
215
- executor: RuntimeExecutorInfoSchema,
216
- started_at: z.string(),
217
- updated_at: z.string(),
218
- finished_at: z.string().nullable(),
219
- contract_path: z.string(),
220
- execution_path: z.string().optional(),
221
- counts: z.record(z.string(), z.number()),
222
- output_artifacts: z.array(z.string()),
223
- logs: z.object({
224
- prompt_path: z.string(),
225
- event_stream_path: z.string(),
226
- status_path: z.string().optional(),
227
- }).optional(),
228
- summary: z.string(),
229
- exit_code: z.number().nullable(),
230
- error: z.string().nullable(),
231
- });
232
- export const CompiledInventoryEntrySchema = z.object({
233
- input_zone: WorkflowZoneIdSchema,
234
- input_path: z.string().min(1),
235
- output_zone: WorkflowZoneIdSchema,
236
- output_path: z.string().min(1),
237
- state: z.string().min(1).optional(),
238
- metadata: JsonRecordSchema.optional(),
239
- }).strict();
240
- export const CompiledInventorySchema = z.object({
241
- kind: z.literal("compiled-runtime-ledger").optional(),
242
- version: z.number().int().min(1).optional(),
243
- stage: RuntimeStageSchema.optional(),
244
- entries: z.array(CompiledInventoryEntrySchema),
245
- total: z.number().int().nonnegative(),
246
- });
247
- export const TestCaseExpectSchema = z.object({
248
- must_include: z.array(z.string().min(1)).optional(),
249
- must_include_one_of: z.array(z.array(z.string().min(1)).min(1)).optional(),
250
- must_not_include: z.array(z.string().min(1)).optional(),
251
- min_words: z.number().int().nonnegative().optional(),
252
- max_words: z.number().int().nonnegative().optional(),
253
- }).refine((value) => value.min_words === undefined ||
254
- value.max_words === undefined ||
255
- value.max_words >= value.min_words, {
256
- message: "max_words must be greater than or equal to min_words",
257
- }).refine((value) => (value.must_include?.length ?? 0) > 0 ||
258
- (value.must_include_one_of?.length ?? 0) > 0 ||
259
- (value.must_not_include?.length ?? 0) > 0 ||
260
- value.min_words !== undefined ||
261
- value.max_words !== undefined, {
262
- message: "Test expectations must include at least one check",
263
- });
264
- const TestCaseCoreSchema = z.object({
265
- id: z.string().regex(/^[a-z0-9][a-z0-9-]{0,79}$/),
266
- question: z.string().min(1),
267
- file: z.string().min(1).optional(),
268
- answer: z.string().min(1).optional(),
269
- expect: TestCaseExpectSchema.optional(),
270
- strictness: z.string().min(1).optional(),
271
- }).superRefine((value, ctx) => {
272
- if (!value.file && !value.answer && !value.expect) {
273
- ctx.addIssue({
274
- code: z.ZodIssueCode.custom,
275
- message: "Test cases need at least one of file, answer, or expect.",
276
- });
277
- }
278
- });
279
- export const TestCaseSchema = TestCaseCoreSchema;
280
- const TestSpecCoreSchema = z.object({
281
- type: TestTargetTypeSchema,
282
- name: z.string().min(1),
283
- description: z.string().min(1).optional(),
284
- cases: z.array(TestCaseSchema).min(1),
285
- });
286
- export const TestSpecSchema = TestSpecCoreSchema;
287
- export const SourceTruthCheckSchema = z.object({
288
- id: z.string().regex(WorkflowIdPattern).optional(),
289
- question: z.string().min(1),
290
- answer: z.string().min(1).optional(),
291
- expect: TestCaseExpectSchema.optional(),
292
- strictness: z.string().min(1).optional(),
293
- }).strict().superRefine((value, ctx) => {
294
- if (!value.answer && !value.expect) {
295
- ctx.addIssue({
296
- code: z.ZodIssueCode.custom,
297
- path: ["answer"],
298
- message: "Truth checks need `answer` or `expect`.",
299
- });
300
- }
301
- });
302
- export const SourceCompiledMaxAttemptsSchema = z.number().int().min(1).max(5);
303
- export const SourceCompiledMaxLoopsSchema = z.number().int().min(1).max(3);
304
- const DatasetNamePattern = /^[a-z0-9][a-z0-9-]*$/;
305
- const RESERVED_DATASET_NAMES = new Set(["tests", "workflows"]);
306
- export const DatasetNameSchema = z
307
- .string()
308
- .regex(DatasetNamePattern, "Dataset names must use lowercase letters, numbers, and dashes only.")
309
- .refine((value) => !RESERVED_DATASET_NAMES.has(value), "Dataset name is reserved.");
310
- export const SourceDatasetConfigSchema = z.object({
311
- id: z.string().regex(WorkflowIdPattern).optional(),
312
- name: DatasetNameSchema,
313
- path: z.string().min(1).default("."),
314
- about: z.string().min(1).optional(),
315
- workflow: WorkflowIdSchema.optional(),
316
- max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
317
- max_loops: SourceCompiledMaxLoopsSchema.optional(),
318
- checks: z.array(SourceTruthCheckSchema).default([]),
319
- }).strict();
320
- export const CompiledInterfConfigSchema = z.object({
321
- type: z.literal("compiled"),
322
- name: DatasetNameSchema,
323
- about: z.string().optional(),
324
- workflow: WorkflowIdSchema,
325
- max_attempts: SourceCompiledMaxAttemptsSchema.optional(),
326
- max_loops: SourceCompiledMaxLoopsSchema.optional(),
327
- checks: z.array(SourceTruthCheckSchema).default([]),
328
- workflow_origin: z.object({
329
- selected: WorkflowIdSchema,
330
- local_draft: z.boolean().optional(),
331
- }).optional(),
332
- source: z.object({
333
- path: z.string(),
334
- control_path: z.string().optional(),
335
- dataset_path: z.string(),
336
- }),
337
- }).passthrough();
338
- export const InterfConfigSchema = CompiledInterfConfigSchema;
339
- export const WorkflowImprovementLoopSummarySchema = z.object({
340
- variation: z.number().int().min(1),
341
- kind: z.enum(["baseline", "edited"]),
342
- attempts_run: z.number().int().min(1),
343
- passed: z.boolean(),
344
- passed_questions: z.number().int().min(0),
345
- total_questions: z.number().int().min(0),
346
- failed_stage: z.string().nullable().optional(),
347
- test_run_path: z.string().nullable().optional(),
348
- test_sandbox_path: z.string().nullable().optional(),
349
- summary: z.string().min(1),
350
- });
351
- export const WorkflowImprovementContextSchema = z.object({
352
- kind: z.literal("interf-workflow-improvement-loop"),
353
- version: z.literal(1),
354
- generated_at: z.string(),
355
- target_name: z.string(),
356
- workflow_id: WorkflowIdSchema,
357
- loop_index: z.number().int().min(1),
358
- max_loops: SourceCompiledMaxLoopsSchema,
359
- max_attempts: SourceCompiledMaxAttemptsSchema,
360
- review_paths: z.object({
361
- workflow_root: z.string(),
362
- compiled_runtime: z.string().nullable(),
363
- test_comparisons: z.string().nullable(),
364
- execution_shells: z.string().nullable(),
365
- test_runs: z.string().nullable(),
366
- test_sandboxes: z.string().nullable(),
367
- }),
368
- truth_checks: z.object({
369
- count: z.number().int().min(0),
370
- questions: z.array(z.object({
371
- id: z.string(),
372
- question: z.string(),
373
- })),
374
- }),
375
- previous_variations: z.array(WorkflowImprovementLoopSummarySchema),
376
- latest_failure: WorkflowImprovementLoopSummarySchema.nullable(),
377
- });
378
- export const PreservedShellTypeSchema = z.enum([
379
- "stage-execution",
380
- "workflow-improvement",
381
- ]);
382
- export const PreservedShellSnapshotSchema = z.object({
383
- kind: z.literal("interf-preserved-shell"),
384
- version: z.literal(1),
385
- shell_type: PreservedShellTypeSchema,
386
- generated_at: z.string(),
387
- root_path: z.string(),
388
- materialized_symlinks: z.number().int().min(0),
389
- });
390
- export const WorkflowPackageValidationSchema = z.object({
391
- ok: z.boolean(),
392
- summary: z.string(),
393
- errors: z.array(z.string()),
394
- counts: z.record(z.string(), z.number()),
395
- });
396
- export const WorkflowImprovementLoopRecordSchema = z.object({
397
- kind: z.literal("interf-workflow-improvement-loop-record"),
398
- version: z.literal(1),
399
- recorded_at: z.string(),
400
- run_id: z.string(),
401
- loop_index: z.number().int().min(1),
402
- target_name: z.string(),
403
- workflow_id: WorkflowIdSchema,
404
- result: z.enum(["updated", "no-change", "invalid", "executor-failed"]),
405
- changed: z.boolean(),
406
- applied: z.boolean(),
407
- summary: z.string(),
408
- shell_path: z.string(),
409
- loop_root_path: z.string(),
410
- context_path: z.string(),
411
- workflow_before_path: z.string(),
412
- workflow_after_path: z.string(),
413
- prompt_log_path: z.string(),
414
- event_log_path: z.string(),
415
- status_log_path: z.string(),
416
- preserved_shell_manifest_path: z.string().nullable(),
417
- validation: WorkflowPackageValidationSchema.nullable(),
418
- });
419
- export const WorkflowImprovementRunLedgerSchema = z.object({
420
- kind: z.literal("interf-workflow-improvement-run"),
421
- version: z.literal(1),
422
- generated_at: z.string(),
423
- updated_at: z.string(),
424
- run_id: z.string(),
425
- target_name: z.string(),
426
- workflow_id: WorkflowIdSchema,
427
- max_loops: SourceCompiledMaxLoopsSchema,
428
- max_attempts: SourceCompiledMaxAttemptsSchema,
429
- loops: z.array(WorkflowImprovementLoopRecordSchema),
430
- });
431
- export const SourceFolderConfigSchema = z.object({
432
- datasets: z.array(SourceDatasetConfigSchema).optional(),
433
- }).strict().superRefine((value, ctx) => {
434
- if ((value.datasets?.length ?? 0) === 0) {
435
- ctx.addIssue({
436
- code: z.ZodIssueCode.custom,
437
- message: "Interf project config needs at least one dataset.",
438
- });
439
- }
440
- });
441
- export const TestCheckResultSchema = z.object({
442
- label: z.string(),
443
- ok: z.boolean(),
444
- detail: z.string(),
445
- });
446
- export const TestCaseResultSchema = z.object({
447
- caseId: z.string(),
448
- question: z.string(),
449
- file: z.string().optional(),
450
- ok: z.boolean(),
451
- wordCount: z.number(),
452
- passedChecks: z.number(),
453
- totalChecks: z.number(),
454
- checks: z.array(TestCheckResultSchema),
455
- answer: z.string().optional(),
456
- trace: JsonRecordSchema.nullable().optional(),
457
- });
458
- export const TestTargetResultSchema = z.object({
459
- target: z.object({
460
- type: TestTargetTypeSchema,
461
- name: z.string(),
462
- path: z.string(),
463
- workflow: z.string(),
464
- }),
465
- sandbox_path: z.string().optional(),
466
- ok: z.boolean(),
467
- passedCases: z.number(),
468
- totalCases: z.number(),
469
- passedChecks: z.number(),
470
- totalChecks: z.number(),
471
- caseResults: z.array(TestCaseResultSchema),
472
- });
473
- export const TestTargetRunSchema = z.object({
474
- kind: z.literal("interf-test-target-run"),
475
- version: z.literal(1),
476
- generated_at: z.string(),
477
- spec: z.object({
478
- id: z.string(),
479
- name: z.string(),
480
- type: TestTargetTypeSchema,
481
- file: z.string(),
482
- description: z.string().optional(),
483
- case_count: z.number(),
484
- cases: z.array(z.object({
485
- id: z.string(),
486
- question: z.string(),
487
- file: z.string().optional(),
488
- answer: z.string().optional(),
489
- strictness: z.string().optional(),
490
- expect: TestCaseExpectSchema.optional(),
491
- })),
492
- }),
493
- source_path: z.string(),
494
- executor: RuntimeExecutorInfoSchema.optional(),
495
- target_count: z.number(),
496
- results: z.array(TestTargetResultSchema),
497
- });
498
- export const TestRunModeSchema = z.enum(["raw", "compiled", "both"]);
499
- export const TestRunTargetSummarySchema = z.object({
500
- label: z.string(),
501
- run_path: z.string(),
502
- ok: z.boolean(),
503
- passed_cases: z.number(),
504
- total_cases: z.number(),
505
- passed_checks: z.number(),
506
- total_checks: z.number(),
507
- target: z.object({
508
- type: TestTargetTypeSchema,
509
- name: z.string(),
510
- path: z.string(),
511
- workflow: z.string(),
512
- }),
513
- });
514
- export const TestRunComparisonSchema = z.object({
515
- kind: z.literal("interf-test-run"),
516
- version: z.literal(1),
517
- generated_at: z.string(),
518
- mode: TestRunModeSchema,
519
- source_path: z.string(),
520
- checks_fingerprint: z.string().min(1).optional(),
521
- dataset: z.object({
522
- name: DatasetNameSchema,
523
- compiled_path: z.string().nullable(),
524
- }),
525
- raw: TestRunTargetSummarySchema.nullable(),
526
- compiled: TestRunTargetSummarySchema.nullable(),
527
- summary: z.object({
528
- raw_pass_rate: z.number().nullable(),
529
- compiled_pass_rate: z.number().nullable(),
530
- pass_rate_delta: z.number().nullable(),
531
- }),
532
- });
533
- export const InterfUserConfigSchema = z.object({
534
- agent: z.string(),
535
- agentCommand: z.string(),
536
- skillsInstalled: z.boolean(),
537
- viewer: z.enum(["plain", "obsidian"]).optional(),
538
- initialized: z.string(),
539
- });
1
+ // Compatibility barrel for historical `src/lib/schema.ts` imports.
2
+ // Source-of-truth schemas live in package-owned modules under `src/packages/*/lib/schema.ts`.
3
+ export * from "../packages/compiler/lib/schema.js";
4
+ export * from "../packages/project-model/lib/schema.js";
5
+ export * from "../packages/testing/lib/schema.js";
6
+ export * from "../packages/agents/lib/schema.js";
@@ -1,39 +1 @@
1
- import { type InterfConfig, type TestSpec, type TestTargetType, type SourceTruthCheck, type SourceDatasetConfig, type SourceFolderConfig } from "./schema.js";
2
- export declare const SOURCE_FOLDER_CONFIG_FILE = "interf.json";
3
- export interface LoadedSourceTestSpec extends TestSpec {
4
- id: string;
5
- filePath: string;
6
- }
7
- export declare function fingerprintTruthChecks(checks: SourceTruthCheck[]): string;
8
- export declare function loadSourceFolderConfig(sourcePath: string): SourceFolderConfig | null;
9
- export interface WritableSourceProjectConfig {
10
- datasets?: Array<Omit<SourceDatasetConfig, "path"> & {
11
- path?: string;
12
- }>;
13
- }
14
- export declare function listSourceDatasetConfigs(config: SourceFolderConfig | null): SourceDatasetConfig[];
15
- export declare function resolveDatasetCompileMaxAttempts(datasetConfig: Pick<SourceDatasetConfig, "max_attempts">, override?: number | null): number | null;
16
- export declare function resolveDatasetCompileMaxLoops(datasetConfig: Pick<SourceDatasetConfig, "max_loops">, override?: number | null): number | null;
17
- export declare function getDefaultSourceDatasetConfig(config: SourceFolderConfig | null): SourceDatasetConfig | null;
18
- export declare function findSourceDatasetConfig(config: SourceFolderConfig | null, datasetName: string): SourceDatasetConfig | null;
19
- export declare function saveSourceFolderConfig(sourcePath: string, config: WritableSourceProjectConfig): void;
20
- export declare function appendSourceDatasetChecks(sourcePath: string, datasetName: string, checks: SourceTruthCheck[]): void;
21
- export declare function upsertSourceDatasetConfig(sourcePath: string, datasetConfig: SourceDatasetConfig, options?: {
22
- matchName?: string;
23
- }): void;
24
- export declare function compiledMaxAttempts(maxAttempts: number | null | undefined): number | undefined;
25
- export declare function compiledMaxLoops(maxLoops: number | null | undefined): number | undefined;
26
- export declare function sourceDatasetConfigFromInterfConfig(config: InterfConfig, datasetPath?: string): SourceDatasetConfig;
27
- export declare function loadCompiledDatasetConfig(compiledPath: string): SourceDatasetConfig | null;
28
- export declare function saveCompiledInterfConfig(compiledPath: string, config: InterfConfig): InterfConfig;
29
- export declare function syncCompiledInterfConfigFromSourceDatasetConfig(compiledPath: string, datasetConfig: SourceDatasetConfig): InterfConfig;
30
- export declare function buildTestSpecFromSourceFolderConfig(options: {
31
- sourcePath: string;
32
- targetName?: string | null;
33
- targetType?: TestTargetType;
34
- }): LoadedSourceTestSpec | null;
35
- export declare function buildTestSpecFromCompiledDatasetConfig(options: {
36
- compiledPath: string;
37
- targetType?: TestTargetType;
38
- }): LoadedSourceTestSpec | null;
39
- export declare function resolveSourceDatasetPath(projectPath: string, datasetConfig: Pick<SourceDatasetConfig, "path">): string;
1
+ export * from "../packages/project-model/source-config.js";