@prismatic-io/lux 0.0.1

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 (636) hide show
  1. package/LICENSE +21 -0
  2. package/lib/answerers/claude-code/index.d.ts +17 -0
  3. package/lib/answerers/claude-code/index.d.ts.map +1 -0
  4. package/lib/answerers/claude-code/index.js +280 -0
  5. package/lib/answerers/claude-code/index.js.map +1 -0
  6. package/lib/answerers/persona/index.d.ts +40 -0
  7. package/lib/answerers/persona/index.d.ts.map +1 -0
  8. package/lib/answerers/persona/index.js +265 -0
  9. package/lib/answerers/persona/index.js.map +1 -0
  10. package/lib/answerers/scripted/index.d.ts +8 -0
  11. package/lib/answerers/scripted/index.d.ts.map +1 -0
  12. package/lib/answerers/scripted/index.js +163 -0
  13. package/lib/answerers/scripted/index.js.map +1 -0
  14. package/lib/answerers/shared.d.ts +13 -0
  15. package/lib/answerers/shared.d.ts.map +1 -0
  16. package/lib/answerers/shared.js +17 -0
  17. package/lib/answerers/shared.js.map +1 -0
  18. package/lib/answerers/terminal/index.d.ts +9 -0
  19. package/lib/answerers/terminal/index.d.ts.map +1 -0
  20. package/lib/answerers/terminal/index.js +97 -0
  21. package/lib/answerers/terminal/index.js.map +1 -0
  22. package/lib/assertions/core/command-exits-zero.d.ts +21 -0
  23. package/lib/assertions/core/command-exits-zero.d.ts.map +1 -0
  24. package/lib/assertions/core/command-exits-zero.js +87 -0
  25. package/lib/assertions/core/command-exits-zero.js.map +1 -0
  26. package/lib/assertions/core/event-checks.d.ts +57 -0
  27. package/lib/assertions/core/event-checks.d.ts.map +1 -0
  28. package/lib/assertions/core/event-checks.js +123 -0
  29. package/lib/assertions/core/event-checks.js.map +1 -0
  30. package/lib/assertions/core/file-checks.d.ts +103 -0
  31. package/lib/assertions/core/file-checks.d.ts.map +1 -0
  32. package/lib/assertions/core/file-checks.js +288 -0
  33. package/lib/assertions/core/file-checks.js.map +1 -0
  34. package/lib/assertions/core/helpers.d.ts +66 -0
  35. package/lib/assertions/core/helpers.d.ts.map +1 -0
  36. package/lib/assertions/core/helpers.js +170 -0
  37. package/lib/assertions/core/helpers.js.map +1 -0
  38. package/lib/assertions/core/index.d.ts +15 -0
  39. package/lib/assertions/core/index.d.ts.map +1 -0
  40. package/lib/assertions/core/index.js +56 -0
  41. package/lib/assertions/core/index.js.map +1 -0
  42. package/lib/assertions/core/json-pointer-equals.d.ts +19 -0
  43. package/lib/assertions/core/json-pointer-equals.d.ts.map +1 -0
  44. package/lib/assertions/core/json-pointer-equals.js +71 -0
  45. package/lib/assertions/core/json-pointer-equals.js.map +1 -0
  46. package/lib/assertions/core/output-checks.d.ts +46 -0
  47. package/lib/assertions/core/output-checks.d.ts.map +1 -0
  48. package/lib/assertions/core/output-checks.js +121 -0
  49. package/lib/assertions/core/output-checks.js.map +1 -0
  50. package/lib/assertions/core/predicate.d.ts +14 -0
  51. package/lib/assertions/core/predicate.d.ts.map +1 -0
  52. package/lib/assertions/core/predicate.js +55 -0
  53. package/lib/assertions/core/predicate.js.map +1 -0
  54. package/lib/assertions/core/resource-checks.d.ts +71 -0
  55. package/lib/assertions/core/resource-checks.d.ts.map +1 -0
  56. package/lib/assertions/core/resource-checks.js +159 -0
  57. package/lib/assertions/core/resource-checks.js.map +1 -0
  58. package/lib/assertions/core/safe-regex.d.ts +23 -0
  59. package/lib/assertions/core/safe-regex.d.ts.map +1 -0
  60. package/lib/assertions/core/safe-regex.js +102 -0
  61. package/lib/assertions/core/safe-regex.js.map +1 -0
  62. package/lib/assertions/core/tool-called-with.d.ts +21 -0
  63. package/lib/assertions/core/tool-called-with.d.ts.map +1 -0
  64. package/lib/assertions/core/tool-called-with.js +69 -0
  65. package/lib/assertions/core/tool-called-with.js.map +1 -0
  66. package/lib/assertions/core/tool-calls.d.ts +22 -0
  67. package/lib/assertions/core/tool-calls.d.ts.map +1 -0
  68. package/lib/assertions/core/tool-calls.js +17 -0
  69. package/lib/assertions/core/tool-calls.js.map +1 -0
  70. package/lib/assertions/core/tool-invocation.d.ts +36 -0
  71. package/lib/assertions/core/tool-invocation.d.ts.map +1 -0
  72. package/lib/assertions/core/tool-invocation.js +170 -0
  73. package/lib/assertions/core/tool-invocation.js.map +1 -0
  74. package/lib/assertions/core/tool-result-checks.d.ts +59 -0
  75. package/lib/assertions/core/tool-result-checks.d.ts.map +1 -0
  76. package/lib/assertions/core/tool-result-checks.js +193 -0
  77. package/lib/assertions/core/tool-result-checks.js.map +1 -0
  78. package/lib/assertions/mcp/discovery-checks.d.ts +36 -0
  79. package/lib/assertions/mcp/discovery-checks.d.ts.map +1 -0
  80. package/lib/assertions/mcp/discovery-checks.js +122 -0
  81. package/lib/assertions/mcp/discovery-checks.js.map +1 -0
  82. package/lib/assertions/mcp/index.d.ts +10 -0
  83. package/lib/assertions/mcp/index.d.ts.map +1 -0
  84. package/lib/assertions/mcp/index.js +25 -0
  85. package/lib/assertions/mcp/index.js.map +1 -0
  86. package/lib/assertions/rubric/index.d.ts +104 -0
  87. package/lib/assertions/rubric/index.d.ts.map +1 -0
  88. package/lib/assertions/rubric/index.js +191 -0
  89. package/lib/assertions/rubric/index.js.map +1 -0
  90. package/lib/assertions/rubric/internal.d.ts +14 -0
  91. package/lib/assertions/rubric/internal.d.ts.map +1 -0
  92. package/lib/assertions/rubric/internal.js +335 -0
  93. package/lib/assertions/rubric/internal.js.map +1 -0
  94. package/lib/authoring.d.ts +3 -0
  95. package/lib/authoring.d.ts.map +1 -0
  96. package/lib/authoring.js +3 -0
  97. package/lib/authoring.js.map +1 -0
  98. package/lib/cli/bin.d.ts +3 -0
  99. package/lib/cli/bin.d.ts.map +1 -0
  100. package/lib/cli/bin.js +15 -0
  101. package/lib/cli/bin.js.map +1 -0
  102. package/lib/cli/command-runtime.d.ts +5 -0
  103. package/lib/cli/command-runtime.d.ts.map +1 -0
  104. package/lib/cli/command-runtime.js +30 -0
  105. package/lib/cli/command-runtime.js.map +1 -0
  106. package/lib/cli/init.d.ts +21 -0
  107. package/lib/cli/init.d.ts.map +1 -0
  108. package/lib/cli/init.js +340 -0
  109. package/lib/cli/init.js.map +1 -0
  110. package/lib/cli/program.d.ts +22 -0
  111. package/lib/cli/program.d.ts.map +1 -0
  112. package/lib/cli/program.js +757 -0
  113. package/lib/cli/program.js.map +1 -0
  114. package/lib/cli/render/format.d.ts +14 -0
  115. package/lib/cli/render/format.d.ts.map +1 -0
  116. package/lib/cli/render/format.js +71 -0
  117. package/lib/cli/render/format.js.map +1 -0
  118. package/lib/cli/render/reporter.d.ts +73 -0
  119. package/lib/cli/render/reporter.d.ts.map +1 -0
  120. package/lib/cli/render/reporter.js +519 -0
  121. package/lib/cli/render/reporter.js.map +1 -0
  122. package/lib/cli/render/tty.d.ts +77 -0
  123. package/lib/cli/render/tty.d.ts.map +1 -0
  124. package/lib/cli/render/tty.js +283 -0
  125. package/lib/cli/render/tty.js.map +1 -0
  126. package/lib/cli/run-options.d.ts +27 -0
  127. package/lib/cli/run-options.d.ts.map +1 -0
  128. package/lib/cli/run-options.js +58 -0
  129. package/lib/cli/run-options.js.map +1 -0
  130. package/lib/cli/skills.d.ts +38 -0
  131. package/lib/cli/skills.d.ts.map +1 -0
  132. package/lib/cli/skills.js +84 -0
  133. package/lib/cli/skills.js.map +1 -0
  134. package/lib/core/annotation.d.ts +56 -0
  135. package/lib/core/annotation.d.ts.map +1 -0
  136. package/lib/core/annotation.js +92 -0
  137. package/lib/core/annotation.js.map +1 -0
  138. package/lib/core/answerer.d.ts +68 -0
  139. package/lib/core/answerer.d.ts.map +1 -0
  140. package/lib/core/answerer.js +17 -0
  141. package/lib/core/answerer.js.map +1 -0
  142. package/lib/core/artifact-evidence.d.ts +50 -0
  143. package/lib/core/artifact-evidence.d.ts.map +1 -0
  144. package/lib/core/artifact-evidence.js +185 -0
  145. package/lib/core/artifact-evidence.js.map +1 -0
  146. package/lib/core/artifact-snapshot.d.ts +37 -0
  147. package/lib/core/artifact-snapshot.d.ts.map +1 -0
  148. package/lib/core/artifact-snapshot.js +339 -0
  149. package/lib/core/artifact-snapshot.js.map +1 -0
  150. package/lib/core/assertion.d.ts +129 -0
  151. package/lib/core/assertion.d.ts.map +1 -0
  152. package/lib/core/assertion.js +75 -0
  153. package/lib/core/assertion.js.map +1 -0
  154. package/lib/core/case.d.ts +79 -0
  155. package/lib/core/case.d.ts.map +1 -0
  156. package/lib/core/case.js +90 -0
  157. package/lib/core/case.js.map +1 -0
  158. package/lib/core/conversation-turn.d.ts +23 -0
  159. package/lib/core/conversation-turn.d.ts.map +1 -0
  160. package/lib/core/conversation-turn.js +31 -0
  161. package/lib/core/conversation-turn.js.map +1 -0
  162. package/lib/core/driver.d.ts +64 -0
  163. package/lib/core/driver.d.ts.map +1 -0
  164. package/lib/core/driver.js +18 -0
  165. package/lib/core/driver.js.map +1 -0
  166. package/lib/core/emitter.d.ts +20 -0
  167. package/lib/core/emitter.d.ts.map +1 -0
  168. package/lib/core/emitter.js +34 -0
  169. package/lib/core/emitter.js.map +1 -0
  170. package/lib/core/events.d.ts +202 -0
  171. package/lib/core/events.d.ts.map +1 -0
  172. package/lib/core/events.js +107 -0
  173. package/lib/core/events.js.map +1 -0
  174. package/lib/core/exec.d.ts +82 -0
  175. package/lib/core/exec.d.ts.map +1 -0
  176. package/lib/core/exec.js +168 -0
  177. package/lib/core/exec.js.map +1 -0
  178. package/lib/core/experiment.d.ts +285 -0
  179. package/lib/core/experiment.d.ts.map +1 -0
  180. package/lib/core/experiment.js +389 -0
  181. package/lib/core/experiment.js.map +1 -0
  182. package/lib/core/glob.d.ts +3 -0
  183. package/lib/core/glob.d.ts.map +1 -0
  184. package/lib/core/glob.js +32 -0
  185. package/lib/core/glob.js.map +1 -0
  186. package/lib/core/hash.d.ts +8 -0
  187. package/lib/core/hash.d.ts.map +1 -0
  188. package/lib/core/hash.js +214 -0
  189. package/lib/core/hash.js.map +1 -0
  190. package/lib/core/index.d.ts +29 -0
  191. package/lib/core/index.d.ts.map +1 -0
  192. package/lib/core/index.js +29 -0
  193. package/lib/core/index.js.map +1 -0
  194. package/lib/core/lifecycle-fixtures.d.ts +20 -0
  195. package/lib/core/lifecycle-fixtures.d.ts.map +1 -0
  196. package/lib/core/lifecycle-fixtures.js +109 -0
  197. package/lib/core/lifecycle-fixtures.js.map +1 -0
  198. package/lib/core/lifecycle-hooks.d.ts +52 -0
  199. package/lib/core/lifecycle-hooks.d.ts.map +1 -0
  200. package/lib/core/lifecycle-hooks.js +42 -0
  201. package/lib/core/lifecycle-hooks.js.map +1 -0
  202. package/lib/core/mcp-events.d.ts +44 -0
  203. package/lib/core/mcp-events.d.ts.map +1 -0
  204. package/lib/core/mcp-events.js +23 -0
  205. package/lib/core/mcp-events.js.map +1 -0
  206. package/lib/core/model-cli.d.ts +57 -0
  207. package/lib/core/model-cli.d.ts.map +1 -0
  208. package/lib/core/model-cli.js +237 -0
  209. package/lib/core/model-cli.js.map +1 -0
  210. package/lib/core/observer.d.ts +31 -0
  211. package/lib/core/observer.d.ts.map +1 -0
  212. package/lib/core/observer.js +25 -0
  213. package/lib/core/observer.js.map +1 -0
  214. package/lib/core/platform-process.d.ts +33 -0
  215. package/lib/core/platform-process.d.ts.map +1 -0
  216. package/lib/core/platform-process.js +214 -0
  217. package/lib/core/platform-process.js.map +1 -0
  218. package/lib/core/registry.d.ts +22 -0
  219. package/lib/core/registry.d.ts.map +1 -0
  220. package/lib/core/registry.js +45 -0
  221. package/lib/core/registry.js.map +1 -0
  222. package/lib/core/rubric.d.ts +18 -0
  223. package/lib/core/rubric.d.ts.map +1 -0
  224. package/lib/core/rubric.js +49 -0
  225. package/lib/core/rubric.js.map +1 -0
  226. package/lib/core/run.d.ts +419 -0
  227. package/lib/core/run.d.ts.map +1 -0
  228. package/lib/core/run.js +126 -0
  229. package/lib/core/run.js.map +1 -0
  230. package/lib/core/statistics.d.ts +39 -0
  231. package/lib/core/statistics.d.ts.map +1 -0
  232. package/lib/core/statistics.js +163 -0
  233. package/lib/core/statistics.js.map +1 -0
  234. package/lib/core/subject.d.ts +4 -0
  235. package/lib/core/subject.d.ts.map +1 -0
  236. package/lib/core/subject.js +46 -0
  237. package/lib/core/subject.js.map +1 -0
  238. package/lib/core/tool-events.d.ts +69 -0
  239. package/lib/core/tool-events.d.ts.map +1 -0
  240. package/lib/core/tool-events.js +242 -0
  241. package/lib/core/tool-events.js.map +1 -0
  242. package/lib/core/usage.d.ts +78 -0
  243. package/lib/core/usage.d.ts.map +1 -0
  244. package/lib/core/usage.js +104 -0
  245. package/lib/core/usage.js.map +1 -0
  246. package/lib/core/wire.d.ts +83 -0
  247. package/lib/core/wire.d.ts.map +1 -0
  248. package/lib/core/wire.js +101 -0
  249. package/lib/core/wire.js.map +1 -0
  250. package/lib/core/zod.d.ts +10 -0
  251. package/lib/core/zod.d.ts.map +1 -0
  252. package/lib/core/zod.js +18 -0
  253. package/lib/core/zod.js.map +1 -0
  254. package/lib/drivers/claude-code/index.d.ts +55 -0
  255. package/lib/drivers/claude-code/index.d.ts.map +1 -0
  256. package/lib/drivers/claude-code/index.js +779 -0
  257. package/lib/drivers/claude-code/index.js.map +1 -0
  258. package/lib/drivers/claude-code/parse-events.d.ts +46 -0
  259. package/lib/drivers/claude-code/parse-events.d.ts.map +1 -0
  260. package/lib/drivers/claude-code/parse-events.js +387 -0
  261. package/lib/drivers/claude-code/parse-events.js.map +1 -0
  262. package/lib/drivers/codex/app-events.d.ts +16 -0
  263. package/lib/drivers/codex/app-events.d.ts.map +1 -0
  264. package/lib/drivers/codex/app-events.js +184 -0
  265. package/lib/drivers/codex/app-events.js.map +1 -0
  266. package/lib/drivers/codex/config.d.ts +55 -0
  267. package/lib/drivers/codex/config.d.ts.map +1 -0
  268. package/lib/drivers/codex/config.js +125 -0
  269. package/lib/drivers/codex/config.js.map +1 -0
  270. package/lib/drivers/codex/index.d.ts +8 -0
  271. package/lib/drivers/codex/index.d.ts.map +1 -0
  272. package/lib/drivers/codex/index.js +904 -0
  273. package/lib/drivers/codex/index.js.map +1 -0
  274. package/lib/drivers/mcp/index.d.ts +52 -0
  275. package/lib/drivers/mcp/index.d.ts.map +1 -0
  276. package/lib/drivers/mcp/index.js +282 -0
  277. package/lib/drivers/mcp/index.js.map +1 -0
  278. package/lib/drivers/mcp/transport.d.ts +50 -0
  279. package/lib/drivers/mcp/transport.d.ts.map +1 -0
  280. package/lib/drivers/mcp/transport.js +190 -0
  281. package/lib/drivers/mcp/transport.js.map +1 -0
  282. package/lib/drivers/shared/artifacts.d.ts +4 -0
  283. package/lib/drivers/shared/artifacts.d.ts.map +1 -0
  284. package/lib/drivers/shared/artifacts.js +81 -0
  285. package/lib/drivers/shared/artifacts.js.map +1 -0
  286. package/lib/drivers/shared/secure-copy.d.ts +2 -0
  287. package/lib/drivers/shared/secure-copy.d.ts.map +1 -0
  288. package/lib/drivers/shared/secure-copy.js +35 -0
  289. package/lib/drivers/shared/secure-copy.js.map +1 -0
  290. package/lib/drivers/subprocess/index.d.ts +24 -0
  291. package/lib/drivers/subprocess/index.d.ts.map +1 -0
  292. package/lib/drivers/subprocess/index.js +451 -0
  293. package/lib/drivers/subprocess/index.js.map +1 -0
  294. package/lib/index.d.ts +40 -0
  295. package/lib/index.d.ts.map +1 -0
  296. package/lib/index.js +48 -0
  297. package/lib/index.js.map +1 -0
  298. package/lib/optimization/reflective.d.ts +27 -0
  299. package/lib/optimization/reflective.d.ts.map +1 -0
  300. package/lib/optimization/reflective.js +257 -0
  301. package/lib/optimization/reflective.js.map +1 -0
  302. package/lib/orchestrator/annotation-loader.d.ts +65 -0
  303. package/lib/orchestrator/annotation-loader.d.ts.map +1 -0
  304. package/lib/orchestrator/annotation-loader.js +73 -0
  305. package/lib/orchestrator/annotation-loader.js.map +1 -0
  306. package/lib/orchestrator/annotation-store.d.ts +3 -0
  307. package/lib/orchestrator/annotation-store.d.ts.map +1 -0
  308. package/lib/orchestrator/annotation-store.js +100 -0
  309. package/lib/orchestrator/annotation-store.js.map +1 -0
  310. package/lib/orchestrator/authored-dependencies.d.ts +3 -0
  311. package/lib/orchestrator/authored-dependencies.d.ts.map +1 -0
  312. package/lib/orchestrator/authored-dependencies.js +146 -0
  313. package/lib/orchestrator/authored-dependencies.js.map +1 -0
  314. package/lib/orchestrator/campaign-lifecycle.d.ts +105 -0
  315. package/lib/orchestrator/campaign-lifecycle.d.ts.map +1 -0
  316. package/lib/orchestrator/campaign-lifecycle.js +141 -0
  317. package/lib/orchestrator/campaign-lifecycle.js.map +1 -0
  318. package/lib/orchestrator/candidate-integrity.d.ts +4 -0
  319. package/lib/orchestrator/candidate-integrity.d.ts.map +1 -0
  320. package/lib/orchestrator/candidate-integrity.js +14 -0
  321. package/lib/orchestrator/candidate-integrity.js.map +1 -0
  322. package/lib/orchestrator/candidates.d.ts +13 -0
  323. package/lib/orchestrator/candidates.d.ts.map +1 -0
  324. package/lib/orchestrator/candidates.js +577 -0
  325. package/lib/orchestrator/candidates.js.map +1 -0
  326. package/lib/orchestrator/compare.d.ts +80 -0
  327. package/lib/orchestrator/compare.d.ts.map +1 -0
  328. package/lib/orchestrator/compare.js +270 -0
  329. package/lib/orchestrator/compare.js.map +1 -0
  330. package/lib/orchestrator/comparison-identity.d.ts +10 -0
  331. package/lib/orchestrator/comparison-identity.d.ts.map +1 -0
  332. package/lib/orchestrator/comparison-identity.js +39 -0
  333. package/lib/orchestrator/comparison-identity.js.map +1 -0
  334. package/lib/orchestrator/config.d.ts +121 -0
  335. package/lib/orchestrator/config.d.ts.map +1 -0
  336. package/lib/orchestrator/config.js +176 -0
  337. package/lib/orchestrator/config.js.map +1 -0
  338. package/lib/orchestrator/content-bound-json.d.ts +5 -0
  339. package/lib/orchestrator/content-bound-json.d.ts.map +1 -0
  340. package/lib/orchestrator/content-bound-json.js +59 -0
  341. package/lib/orchestrator/content-bound-json.js.map +1 -0
  342. package/lib/orchestrator/discover.d.ts +45 -0
  343. package/lib/orchestrator/discover.d.ts.map +1 -0
  344. package/lib/orchestrator/discover.js +98 -0
  345. package/lib/orchestrator/discover.js.map +1 -0
  346. package/lib/orchestrator/doctor.d.ts +141 -0
  347. package/lib/orchestrator/doctor.d.ts.map +1 -0
  348. package/lib/orchestrator/doctor.js +525 -0
  349. package/lib/orchestrator/doctor.js.map +1 -0
  350. package/lib/orchestrator/driver-session.d.ts +177 -0
  351. package/lib/orchestrator/driver-session.d.ts.map +1 -0
  352. package/lib/orchestrator/driver-session.js +396 -0
  353. package/lib/orchestrator/driver-session.js.map +1 -0
  354. package/lib/orchestrator/evaluator-identity.d.ts +7 -0
  355. package/lib/orchestrator/evaluator-identity.d.ts.map +1 -0
  356. package/lib/orchestrator/evaluator-identity.js +42 -0
  357. package/lib/orchestrator/evaluator-identity.js.map +1 -0
  358. package/lib/orchestrator/experiment-budget.d.ts +11 -0
  359. package/lib/orchestrator/experiment-budget.d.ts.map +1 -0
  360. package/lib/orchestrator/experiment-budget.js +51 -0
  361. package/lib/orchestrator/experiment-budget.js.map +1 -0
  362. package/lib/orchestrator/experiment-context.d.ts +43 -0
  363. package/lib/orchestrator/experiment-context.d.ts.map +1 -0
  364. package/lib/orchestrator/experiment-context.js +9 -0
  365. package/lib/orchestrator/experiment-context.js.map +1 -0
  366. package/lib/orchestrator/experiment-contracts.d.ts +290 -0
  367. package/lib/orchestrator/experiment-contracts.d.ts.map +1 -0
  368. package/lib/orchestrator/experiment-contracts.js +38 -0
  369. package/lib/orchestrator/experiment-contracts.js.map +1 -0
  370. package/lib/orchestrator/experiment-corpus.d.ts +21 -0
  371. package/lib/orchestrator/experiment-corpus.d.ts.map +1 -0
  372. package/lib/orchestrator/experiment-corpus.js +276 -0
  373. package/lib/orchestrator/experiment-corpus.js.map +1 -0
  374. package/lib/orchestrator/experiment-evaluation.d.ts +44 -0
  375. package/lib/orchestrator/experiment-evaluation.d.ts.map +1 -0
  376. package/lib/orchestrator/experiment-evaluation.js +542 -0
  377. package/lib/orchestrator/experiment-evaluation.js.map +1 -0
  378. package/lib/orchestrator/experiment-finish.d.ts +6 -0
  379. package/lib/orchestrator/experiment-finish.d.ts.map +1 -0
  380. package/lib/orchestrator/experiment-finish.js +19 -0
  381. package/lib/orchestrator/experiment-finish.js.map +1 -0
  382. package/lib/orchestrator/experiment-identity.d.ts +6 -0
  383. package/lib/orchestrator/experiment-identity.d.ts.map +1 -0
  384. package/lib/orchestrator/experiment-identity.js +257 -0
  385. package/lib/orchestrator/experiment-identity.js.map +1 -0
  386. package/lib/orchestrator/experiment-loader.d.ts +175 -0
  387. package/lib/orchestrator/experiment-loader.d.ts.map +1 -0
  388. package/lib/orchestrator/experiment-loader.js +77 -0
  389. package/lib/orchestrator/experiment-loader.js.map +1 -0
  390. package/lib/orchestrator/experiment-report.d.ts +450 -0
  391. package/lib/orchestrator/experiment-report.d.ts.map +1 -0
  392. package/lib/orchestrator/experiment-report.js +570 -0
  393. package/lib/orchestrator/experiment-report.js.map +1 -0
  394. package/lib/orchestrator/experiment-runs.d.ts +379 -0
  395. package/lib/orchestrator/experiment-runs.d.ts.map +1 -0
  396. package/lib/orchestrator/experiment-runs.js +796 -0
  397. package/lib/orchestrator/experiment-runs.js.map +1 -0
  398. package/lib/orchestrator/experiment-runtime-identity.d.ts +41 -0
  399. package/lib/orchestrator/experiment-runtime-identity.d.ts.map +1 -0
  400. package/lib/orchestrator/experiment-runtime-identity.js +411 -0
  401. package/lib/orchestrator/experiment-runtime-identity.js.map +1 -0
  402. package/lib/orchestrator/experiment-selection.d.ts +25 -0
  403. package/lib/orchestrator/experiment-selection.d.ts.map +1 -0
  404. package/lib/orchestrator/experiment-selection.js +286 -0
  405. package/lib/orchestrator/experiment-selection.js.map +1 -0
  406. package/lib/orchestrator/experiment.d.ts +11 -0
  407. package/lib/orchestrator/experiment.d.ts.map +1 -0
  408. package/lib/orchestrator/experiment.js +639 -0
  409. package/lib/orchestrator/experiment.js.map +1 -0
  410. package/lib/orchestrator/fixture-identity.d.ts +7 -0
  411. package/lib/orchestrator/fixture-identity.d.ts.map +1 -0
  412. package/lib/orchestrator/fixture-identity.js +55 -0
  413. package/lib/orchestrator/fixture-identity.js.map +1 -0
  414. package/lib/orchestrator/fs-read.d.ts +19 -0
  415. package/lib/orchestrator/fs-read.d.ts.map +1 -0
  416. package/lib/orchestrator/fs-read.js +113 -0
  417. package/lib/orchestrator/fs-read.js.map +1 -0
  418. package/lib/orchestrator/grader-experiment.d.ts +190 -0
  419. package/lib/orchestrator/grader-experiment.d.ts.map +1 -0
  420. package/lib/orchestrator/grader-experiment.js +579 -0
  421. package/lib/orchestrator/grader-experiment.js.map +1 -0
  422. package/lib/orchestrator/grading.d.ts +31 -0
  423. package/lib/orchestrator/grading.d.ts.map +1 -0
  424. package/lib/orchestrator/grading.js +186 -0
  425. package/lib/orchestrator/grading.js.map +1 -0
  426. package/lib/orchestrator/index.d.ts +22 -0
  427. package/lib/orchestrator/index.d.ts.map +1 -0
  428. package/lib/orchestrator/index.js +30 -0
  429. package/lib/orchestrator/index.js.map +1 -0
  430. package/lib/orchestrator/lifecycle-hook-execution.d.ts +4 -0
  431. package/lib/orchestrator/lifecycle-hook-execution.d.ts.map +1 -0
  432. package/lib/orchestrator/lifecycle-hook-execution.js +67 -0
  433. package/lib/orchestrator/lifecycle-hook-execution.js.map +1 -0
  434. package/lib/orchestrator/list-runs.d.ts +33 -0
  435. package/lib/orchestrator/list-runs.d.ts.map +1 -0
  436. package/lib/orchestrator/list-runs.js +308 -0
  437. package/lib/orchestrator/list-runs.js.map +1 -0
  438. package/lib/orchestrator/loader.d.ts +3 -0
  439. package/lib/orchestrator/loader.d.ts.map +1 -0
  440. package/lib/orchestrator/loader.js +17 -0
  441. package/lib/orchestrator/loader.js.map +1 -0
  442. package/lib/orchestrator/optimization-lifecycle.d.ts +12 -0
  443. package/lib/orchestrator/optimization-lifecycle.d.ts.map +1 -0
  444. package/lib/orchestrator/optimization-lifecycle.js +92 -0
  445. package/lib/orchestrator/optimization-lifecycle.js.map +1 -0
  446. package/lib/orchestrator/orchestrator.d.ts +144 -0
  447. package/lib/orchestrator/orchestrator.d.ts.map +1 -0
  448. package/lib/orchestrator/orchestrator.js +632 -0
  449. package/lib/orchestrator/orchestrator.js.map +1 -0
  450. package/lib/orchestrator/owned-lock.d.ts +17 -0
  451. package/lib/orchestrator/owned-lock.d.ts.map +1 -0
  452. package/lib/orchestrator/owned-lock.js +149 -0
  453. package/lib/orchestrator/owned-lock.js.map +1 -0
  454. package/lib/orchestrator/package-version.d.ts +2 -0
  455. package/lib/orchestrator/package-version.d.ts.map +1 -0
  456. package/lib/orchestrator/package-version.js +4 -0
  457. package/lib/orchestrator/package-version.js.map +1 -0
  458. package/lib/orchestrator/provenance.d.ts +5 -0
  459. package/lib/orchestrator/provenance.d.ts.map +1 -0
  460. package/lib/orchestrator/provenance.js +137 -0
  461. package/lib/orchestrator/provenance.js.map +1 -0
  462. package/lib/orchestrator/regrade.d.ts +80 -0
  463. package/lib/orchestrator/regrade.d.ts.map +1 -0
  464. package/lib/orchestrator/regrade.js +433 -0
  465. package/lib/orchestrator/regrade.js.map +1 -0
  466. package/lib/orchestrator/rubric-loader.d.ts +7 -0
  467. package/lib/orchestrator/rubric-loader.d.ts.map +1 -0
  468. package/lib/orchestrator/rubric-loader.js +65 -0
  469. package/lib/orchestrator/rubric-loader.js.map +1 -0
  470. package/lib/orchestrator/run-dir.d.ts +40 -0
  471. package/lib/orchestrator/run-dir.d.ts.map +1 -0
  472. package/lib/orchestrator/run-dir.js +161 -0
  473. package/lib/orchestrator/run-dir.js.map +1 -0
  474. package/lib/orchestrator/run-execution.d.ts +30 -0
  475. package/lib/orchestrator/run-execution.d.ts.map +1 -0
  476. package/lib/orchestrator/run-execution.js +531 -0
  477. package/lib/orchestrator/run-execution.js.map +1 -0
  478. package/lib/orchestrator/run-lifecycle.d.ts +115 -0
  479. package/lib/orchestrator/run-lifecycle.d.ts.map +1 -0
  480. package/lib/orchestrator/run-lifecycle.js +136 -0
  481. package/lib/orchestrator/run-lifecycle.js.map +1 -0
  482. package/lib/orchestrator/suite-compare.d.ts +76 -0
  483. package/lib/orchestrator/suite-compare.d.ts.map +1 -0
  484. package/lib/orchestrator/suite-compare.js +159 -0
  485. package/lib/orchestrator/suite-compare.js.map +1 -0
  486. package/lib/orchestrator/suite-lifecycle.d.ts +157 -0
  487. package/lib/orchestrator/suite-lifecycle.d.ts.map +1 -0
  488. package/lib/orchestrator/suite-lifecycle.js +253 -0
  489. package/lib/orchestrator/suite-lifecycle.js.map +1 -0
  490. package/lib/orchestrator/suite-runs.d.ts +91 -0
  491. package/lib/orchestrator/suite-runs.d.ts.map +1 -0
  492. package/lib/orchestrator/suite-runs.js +157 -0
  493. package/lib/orchestrator/suite-runs.js.map +1 -0
  494. package/lib/orchestrator/suite-summary.d.ts +109 -0
  495. package/lib/orchestrator/suite-summary.d.ts.map +1 -0
  496. package/lib/orchestrator/suite-summary.js +213 -0
  497. package/lib/orchestrator/suite-summary.js.map +1 -0
  498. package/lib/orchestrator/trace-limits.d.ts +20 -0
  499. package/lib/orchestrator/trace-limits.d.ts.map +1 -0
  500. package/lib/orchestrator/trace-limits.js +28 -0
  501. package/lib/orchestrator/trace-limits.js.map +1 -0
  502. package/lib/orchestrator/validate-plugin-config.d.ts +10 -0
  503. package/lib/orchestrator/validate-plugin-config.d.ts.map +1 -0
  504. package/lib/orchestrator/validate-plugin-config.js +26 -0
  505. package/lib/orchestrator/validate-plugin-config.js.map +1 -0
  506. package/package.json +84 -0
  507. package/skills/lux/SKILL.md +85 -0
  508. package/skills/lux/references/cli.md +102 -0
  509. package/skills/lux/references/eval-authoring.md +105 -0
  510. package/skills/lux-answerer/SKILL.md +169 -0
  511. package/src/answerers/claude-code/index.ts +342 -0
  512. package/src/answerers/persona/index.ts +327 -0
  513. package/src/answerers/scripted/index.ts +186 -0
  514. package/src/answerers/shared.ts +23 -0
  515. package/src/answerers/terminal/index.ts +117 -0
  516. package/src/assertions/core/command-exits-zero.ts +94 -0
  517. package/src/assertions/core/event-checks.ts +138 -0
  518. package/src/assertions/core/file-checks.ts +336 -0
  519. package/src/assertions/core/helpers.ts +203 -0
  520. package/src/assertions/core/index.ts +80 -0
  521. package/src/assertions/core/json-pointer-equals.ts +84 -0
  522. package/src/assertions/core/output-checks.ts +134 -0
  523. package/src/assertions/core/predicate.ts +67 -0
  524. package/src/assertions/core/resource-checks.ts +180 -0
  525. package/src/assertions/core/safe-regex.ts +196 -0
  526. package/src/assertions/core/tool-called-with.ts +68 -0
  527. package/src/assertions/core/tool-calls.ts +28 -0
  528. package/src/assertions/core/tool-invocation.ts +198 -0
  529. package/src/assertions/core/tool-result-checks.ts +211 -0
  530. package/src/assertions/mcp/discovery-checks.ts +139 -0
  531. package/src/assertions/mcp/index.ts +37 -0
  532. package/src/assertions/rubric/index.ts +258 -0
  533. package/src/assertions/rubric/internal.ts +367 -0
  534. package/src/authoring.ts +2 -0
  535. package/src/cli/bin.ts +14 -0
  536. package/src/cli/command-runtime.ts +34 -0
  537. package/src/cli/init.ts +410 -0
  538. package/src/cli/program.ts +992 -0
  539. package/src/cli/render/format.ts +69 -0
  540. package/src/cli/render/reporter.ts +643 -0
  541. package/src/cli/render/tty.ts +314 -0
  542. package/src/cli/run-options.ts +82 -0
  543. package/src/cli/skills.ts +129 -0
  544. package/src/core/annotation.ts +104 -0
  545. package/src/core/answerer.ts +75 -0
  546. package/src/core/artifact-evidence.ts +249 -0
  547. package/src/core/artifact-snapshot.ts +429 -0
  548. package/src/core/assertion.ts +156 -0
  549. package/src/core/case.ts +103 -0
  550. package/src/core/conversation-turn.ts +47 -0
  551. package/src/core/driver.ts +75 -0
  552. package/src/core/emitter.ts +38 -0
  553. package/src/core/events.ts +135 -0
  554. package/src/core/exec.ts +263 -0
  555. package/src/core/experiment.ts +467 -0
  556. package/src/core/glob.ts +31 -0
  557. package/src/core/hash.ts +237 -0
  558. package/src/core/index.ts +28 -0
  559. package/src/core/lifecycle-fixtures.ts +145 -0
  560. package/src/core/lifecycle-hooks.ts +101 -0
  561. package/src/core/mcp-events.ts +57 -0
  562. package/src/core/model-cli.ts +271 -0
  563. package/src/core/observer.ts +50 -0
  564. package/src/core/platform-process.ts +284 -0
  565. package/src/core/registry.ts +57 -0
  566. package/src/core/rubric.ts +52 -0
  567. package/src/core/run.ts +144 -0
  568. package/src/core/statistics.ts +194 -0
  569. package/src/core/subject.ts +50 -0
  570. package/src/core/tool-events.ts +292 -0
  571. package/src/core/usage.ts +123 -0
  572. package/src/core/wire.ts +135 -0
  573. package/src/core/zod.ts +20 -0
  574. package/src/drivers/claude-code/index.ts +866 -0
  575. package/src/drivers/claude-code/parse-events.ts +464 -0
  576. package/src/drivers/codex/app-events.ts +218 -0
  577. package/src/drivers/codex/config.ts +128 -0
  578. package/src/drivers/codex/index.ts +995 -0
  579. package/src/drivers/mcp/index.ts +351 -0
  580. package/src/drivers/mcp/transport.ts +222 -0
  581. package/src/drivers/shared/artifacts.ts +86 -0
  582. package/src/drivers/shared/secure-copy.ts +40 -0
  583. package/src/drivers/subprocess/index.ts +490 -0
  584. package/src/index.ts +594 -0
  585. package/src/optimization/reflective.ts +319 -0
  586. package/src/orchestrator/annotation-loader.ts +97 -0
  587. package/src/orchestrator/annotation-store.ts +112 -0
  588. package/src/orchestrator/authored-dependencies.ts +193 -0
  589. package/src/orchestrator/campaign-lifecycle.ts +181 -0
  590. package/src/orchestrator/candidate-integrity.ts +18 -0
  591. package/src/orchestrator/candidates.ts +683 -0
  592. package/src/orchestrator/compare.ts +358 -0
  593. package/src/orchestrator/comparison-identity.ts +45 -0
  594. package/src/orchestrator/config.ts +205 -0
  595. package/src/orchestrator/content-bound-json.ts +71 -0
  596. package/src/orchestrator/discover.ts +132 -0
  597. package/src/orchestrator/doctor.ts +781 -0
  598. package/src/orchestrator/driver-session.ts +507 -0
  599. package/src/orchestrator/evaluator-identity.ts +45 -0
  600. package/src/orchestrator/experiment-budget.ts +61 -0
  601. package/src/orchestrator/experiment-context.ts +41 -0
  602. package/src/orchestrator/experiment-contracts.ts +43 -0
  603. package/src/orchestrator/experiment-corpus.ts +416 -0
  604. package/src/orchestrator/experiment-evaluation.ts +749 -0
  605. package/src/orchestrator/experiment-finish.ts +33 -0
  606. package/src/orchestrator/experiment-identity.ts +356 -0
  607. package/src/orchestrator/experiment-loader.ts +105 -0
  608. package/src/orchestrator/experiment-report.ts +788 -0
  609. package/src/orchestrator/experiment-runs.ts +960 -0
  610. package/src/orchestrator/experiment-runtime-identity.ts +465 -0
  611. package/src/orchestrator/experiment-selection.ts +467 -0
  612. package/src/orchestrator/experiment.ts +991 -0
  613. package/src/orchestrator/fixture-identity.ts +67 -0
  614. package/src/orchestrator/fs-read.ts +126 -0
  615. package/src/orchestrator/grader-experiment.ts +856 -0
  616. package/src/orchestrator/grading.ts +260 -0
  617. package/src/orchestrator/index.ts +186 -0
  618. package/src/orchestrator/lifecycle-hook-execution.ts +90 -0
  619. package/src/orchestrator/list-runs.ts +384 -0
  620. package/src/orchestrator/loader.ts +19 -0
  621. package/src/orchestrator/optimization-lifecycle.ts +126 -0
  622. package/src/orchestrator/orchestrator.ts +919 -0
  623. package/src/orchestrator/owned-lock.ts +147 -0
  624. package/src/orchestrator/package-version.ts +5 -0
  625. package/src/orchestrator/provenance.ts +140 -0
  626. package/src/orchestrator/regrade.ts +580 -0
  627. package/src/orchestrator/rubric-loader.ts +74 -0
  628. package/src/orchestrator/run-dir.ts +209 -0
  629. package/src/orchestrator/run-execution.ts +694 -0
  630. package/src/orchestrator/run-lifecycle.ts +174 -0
  631. package/src/orchestrator/suite-compare.ts +195 -0
  632. package/src/orchestrator/suite-lifecycle.ts +335 -0
  633. package/src/orchestrator/suite-runs.ts +202 -0
  634. package/src/orchestrator/suite-summary.ts +276 -0
  635. package/src/orchestrator/trace-limits.ts +65 -0
  636. package/src/orchestrator/validate-plugin-config.ts +34 -0
@@ -0,0 +1,80 @@
1
+ import { type GradingReport, type PersistedCase, type RunMetadata, type RunUsage } from "../core/index.js";
2
+ export type ComparisonInput = {
3
+ pathA: string;
4
+ pathB: string;
5
+ };
6
+ export type RunBundle = {
7
+ path: string;
8
+ caseJson: PersistedCase | null;
9
+ runJson: RunMetadata | null;
10
+ grading: GradingReport | null;
11
+ /** Relative artifact path → sha256 of its bytes. */
12
+ fileTree: Map<string, string>;
13
+ };
14
+ export type GradingDelta = {
15
+ id: string;
16
+ type: string;
17
+ name: string;
18
+ before: {
19
+ passed: boolean;
20
+ score: number;
21
+ } | null;
22
+ after: {
23
+ passed: boolean;
24
+ score: number;
25
+ } | null;
26
+ status: "added" | "removed" | "improved" | "regressed" | "unchanged";
27
+ };
28
+ export type RunComparison = {
29
+ pathA: string;
30
+ pathB: string;
31
+ caseMismatch: {
32
+ field: string;
33
+ a: unknown;
34
+ b: unknown;
35
+ }[];
36
+ runDelta: {
37
+ exitReason: {
38
+ a: string;
39
+ b: string;
40
+ };
41
+ durationMsA: number | null;
42
+ durationMsB: number | null;
43
+ interruptCounts: {
44
+ a: {
45
+ ask: number;
46
+ approve: number;
47
+ custom: number;
48
+ };
49
+ b: {
50
+ ask: number;
51
+ approve: number;
52
+ custom: number;
53
+ };
54
+ };
55
+ usage: {
56
+ a: RunUsage;
57
+ b: RunUsage;
58
+ };
59
+ } | null;
60
+ grading: {
61
+ casePassedA: boolean | null;
62
+ casePassedB: boolean | null;
63
+ caseScoreA: number | null;
64
+ caseScoreB: number | null;
65
+ deltas: GradingDelta[];
66
+ improvements: number;
67
+ regressions: number;
68
+ };
69
+ artifactsDelta: {
70
+ added: string[];
71
+ removed: string[];
72
+ changed: string[];
73
+ unchanged: string[];
74
+ };
75
+ };
76
+ export declare const loadRunBundle: (path: string) => Promise<RunBundle>;
77
+ export declare const compareRuns: (input: ComparisonInput) => Promise<RunComparison>;
78
+ export declare const hasRegression: (cmp: RunComparison) => boolean;
79
+ export declare const formatComparisonText: (cmp: RunComparison) => string;
80
+ //# sourceMappingURL=compare.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../src/orchestrator/compare.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,aAAa,EAGlB,KA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2
+ import { readFile } from "node:fs/promises";
3
+ import { join } from "node:path";
4
+ import { emptyRunUsage, GradingReportSchema, harnessUsage, PersistedCaseSchema, RunMetadataSchema, stableJson, totalTokens, } from "../core/index.js";
5
+ import { stableDriverIdentity } from "./comparison-identity.js";
6
+ import { safeReadJson, walkFiles } from "./fs-read.js";
7
+ // Content hashes, not sizes: a same-size edit must still read as changed.
8
+ const hashFileTree = async (root) => {
9
+ const out = new Map();
10
+ for (const rel of await walkFiles(root)) {
11
+ out.set(rel, createHash("sha256")
12
+ .update(await readFile(join(root, rel)))
13
+ .digest("hex"));
14
+ }
15
+ return out;
16
+ };
17
+ export const loadRunBundle = async (path) => ({
18
+ path,
19
+ caseJson: await safeReadJson(join(path, "case.json"), PersistedCaseSchema),
20
+ runJson: await safeReadJson(join(path, "run.json"), RunMetadataSchema),
21
+ grading: await safeReadJson(join(path, "grading.json"), GradingReportSchema),
22
+ fileTree: await hashFileTree(join(path, "artifacts")),
23
+ });
24
+ const durationFromMeta = (m) => {
25
+ if (!m)
26
+ return null;
27
+ const a = Date.parse(m.startedAt);
28
+ const b = Date.parse(m.endedAt);
29
+ if (Number.isNaN(a) || Number.isNaN(b))
30
+ return null;
31
+ return b - a;
32
+ };
33
+ const computeFileDelta = (a, b) => {
34
+ const added = [];
35
+ const removed = [];
36
+ const changed = [];
37
+ const unchanged = [];
38
+ for (const [path, hashB] of b) {
39
+ if (!a.has(path)) {
40
+ added.push(path);
41
+ }
42
+ else if (a.get(path) !== hashB) {
43
+ changed.push(path);
44
+ }
45
+ else {
46
+ unchanged.push(path);
47
+ }
48
+ }
49
+ for (const path of a.keys()) {
50
+ if (!b.has(path))
51
+ removed.push(path);
52
+ }
53
+ return {
54
+ added: added.sort(),
55
+ removed: removed.sort(),
56
+ changed: changed.sort(),
57
+ unchanged: unchanged.sort(),
58
+ };
59
+ };
60
+ // Duplicate assertion names would collapse into one map entry and silently
61
+ // drop deltas; later occurrences get an index suffix so each keeps its row.
62
+ const assertionsByIdentity = (report) => {
63
+ const occurrences = new Map();
64
+ const out = new Map();
65
+ for (const x of report?.assertions ?? []) {
66
+ if (x.id) {
67
+ out.set(x.id, x);
68
+ continue;
69
+ }
70
+ const n = (occurrences.get(x.name) ?? 0) + 1;
71
+ occurrences.set(x.name, n);
72
+ out.set(n === 1 ? x.name : `${x.name} (#${n})`, x);
73
+ }
74
+ return out;
75
+ };
76
+ const computeGradingDeltas = (a, b) => {
77
+ const aByName = assertionsByIdentity(a);
78
+ const bByName = assertionsByIdentity(b);
79
+ const all = new Set([...aByName.keys(), ...bByName.keys()]);
80
+ const deltas = [];
81
+ let improvements = 0;
82
+ let regressions = 0;
83
+ for (const name of [...all].sort()) {
84
+ const ax = aByName.get(name);
85
+ const bx = bByName.get(name);
86
+ let status;
87
+ if (!ax && bx)
88
+ status = "added";
89
+ else if (ax && !bx)
90
+ status = "removed";
91
+ else if (ax && bx) {
92
+ if (ax.passed === bx.passed && ax.score === bx.score)
93
+ status = "unchanged";
94
+ // A pass/fail flip dominates any score movement.
95
+ else if (ax.passed !== bx.passed)
96
+ status = bx.passed ? "improved" : "regressed";
97
+ else
98
+ status = ax.score < bx.score ? "improved" : "regressed";
99
+ }
100
+ else {
101
+ status = "unchanged";
102
+ }
103
+ if (status === "improved")
104
+ improvements++;
105
+ if (status === "regressed")
106
+ regressions++;
107
+ deltas.push({
108
+ id: name,
109
+ type: ax?.type ?? bx?.type ?? "unknown",
110
+ name: ax?.id || bx?.id ? (ax?.name ?? bx?.name ?? name) : name,
111
+ before: ax ? { passed: ax.passed, score: ax.score } : null,
112
+ after: bx ? { passed: bx.passed, score: bx.score } : null,
113
+ status,
114
+ });
115
+ }
116
+ return { deltas, improvements, regressions };
117
+ };
118
+ export const compareRuns = async (input) => {
119
+ const [a, b] = await Promise.all([loadRunBundle(input.pathA), loadRunBundle(input.pathB)]);
120
+ const caseMismatch = [];
121
+ for (const field of ["id", "prompt", "persona"]) {
122
+ const av = a.caseJson?.[field];
123
+ const bv = b.caseJson?.[field];
124
+ if (av !== bv)
125
+ caseMismatch.push({ field, a: av, b: bv });
126
+ }
127
+ for (const field of ["fixtures", "assertions"]) {
128
+ const av = a.caseJson?.[field];
129
+ const bv = b.caseJson?.[field];
130
+ if (stableJson(av) !== stableJson(bv))
131
+ caseMismatch.push({ field, a: av, b: bv });
132
+ }
133
+ const fixturesHashA = a.runJson?.provenance?.fixturesHash;
134
+ const fixturesHashB = b.runJson?.provenance?.fixturesHash;
135
+ if (fixturesHashA !== fixturesHashB) {
136
+ caseMismatch.push({ field: "fixturesHash", a: fixturesHashA, b: fixturesHashB });
137
+ }
138
+ const assertionsHashA = a.runJson?.provenance?.assertionsHash;
139
+ const assertionsHashB = b.runJson?.provenance?.assertionsHash;
140
+ if (assertionsHashA !== assertionsHashB) {
141
+ caseMismatch.push({ field: "assertionsHash", a: assertionsHashA, b: assertionsHashB });
142
+ }
143
+ for (const field of [
144
+ "caseHash",
145
+ "driverConfigHash",
146
+ "answererConfigHash",
147
+ "evaluatorConfigHash",
148
+ ]) {
149
+ const av = a.runJson?.provenance?.[field];
150
+ const bv = b.runJson?.provenance?.[field];
151
+ if (av !== bv)
152
+ caseMismatch.push({ field, a: av, b: bv });
153
+ }
154
+ const runtimeA = a.runJson?.provenance?.runtime;
155
+ const runtimeB = b.runJson?.provenance?.runtime;
156
+ if (stableJson(runtimeA) !== stableJson(runtimeB)) {
157
+ caseMismatch.push({ field: "runtime", a: runtimeA, b: runtimeB });
158
+ }
159
+ const sourceA = a.runJson?.provenance?.source;
160
+ const sourceB = b.runJson?.provenance?.source;
161
+ const sourceHashUnavailable = (sourceA?.git?.dirty === true && !sourceA.git.workingTreeHash) ||
162
+ (sourceB?.git?.dirty === true && !sourceB.git.workingTreeHash);
163
+ if (sourceHashUnavailable) {
164
+ caseMismatch.push({
165
+ field: "sourceWorkingTreeHash",
166
+ a: sourceA?.git?.workingTreeHash,
167
+ b: sourceB?.git?.workingTreeHash,
168
+ });
169
+ }
170
+ else if (stableJson(sourceA) !== stableJson(sourceB)) {
171
+ caseMismatch.push({ field: "source", a: sourceA, b: sourceB });
172
+ }
173
+ const driverA = a.runJson ? stableDriverIdentity(a.runJson.driver) : undefined;
174
+ const driverB = b.runJson ? stableDriverIdentity(b.runJson.driver) : undefined;
175
+ if (stableJson(driverA) !== stableJson(driverB)) {
176
+ caseMismatch.push({ field: "driver", a: driverA, b: driverB });
177
+ }
178
+ const answererA = a.runJson?.answerer;
179
+ const answererB = b.runJson?.answerer;
180
+ if (stableJson(answererA) !== stableJson(answererB)) {
181
+ caseMismatch.push({ field: "answerer", a: answererA, b: answererB });
182
+ }
183
+ const runDelta = a.runJson || b.runJson
184
+ ? {
185
+ exitReason: {
186
+ a: a.runJson?.exitReason ?? "unknown",
187
+ b: b.runJson?.exitReason ?? "unknown",
188
+ },
189
+ durationMsA: durationFromMeta(a.runJson),
190
+ durationMsB: durationFromMeta(b.runJson),
191
+ interruptCounts: {
192
+ a: a.runJson?.interruptCounts ?? { ask: 0, approve: 0, custom: 0 },
193
+ b: b.runJson?.interruptCounts ?? { ask: 0, approve: 0, custom: 0 },
194
+ },
195
+ usage: {
196
+ a: a.runJson?.usage ?? emptyRunUsage(),
197
+ b: b.runJson?.usage ?? emptyRunUsage(),
198
+ },
199
+ }
200
+ : null;
201
+ const grading = computeGradingDeltas(a.grading, b.grading);
202
+ return {
203
+ pathA: input.pathA,
204
+ pathB: input.pathB,
205
+ caseMismatch,
206
+ runDelta,
207
+ grading: {
208
+ casePassedA: a.grading?.casePassed ?? null,
209
+ casePassedB: b.grading?.casePassed ?? null,
210
+ caseScoreA: a.grading?.caseScore ?? null,
211
+ caseScoreB: b.grading?.caseScore ?? null,
212
+ ...grading,
213
+ },
214
+ artifactsDelta: computeFileDelta(a.fileTree, b.fileTree),
215
+ };
216
+ };
217
+ // The CI gate. Per-assertion counting alone misses whole-run regressions: a
218
+ // candidate that crashed before grading has every assertion "removed" (0
219
+ // regressed), and one downgraded by `incomplete` keeps all assertions passing
220
+ // — so a case that went from passed to anything-but-passed must also gate.
221
+ export const hasRegression = (cmp) => cmp.caseMismatch.length > 0 ||
222
+ cmp.grading.regressions > 0 ||
223
+ cmp.grading.deltas.some((delta) => delta.status === "removed") ||
224
+ (cmp.grading.casePassedA === true && cmp.grading.casePassedB !== true);
225
+ const formatMismatchValue = (value) => {
226
+ const rendered = JSON.stringify(value) ?? String(value);
227
+ return rendered.length > 500 ? `${rendered.slice(0, 499)}…` : rendered;
228
+ };
229
+ export const formatComparisonText = (cmp) => {
230
+ const lines = [];
231
+ lines.push(`A: ${cmp.pathA}`);
232
+ lines.push(`B: ${cmp.pathB}`);
233
+ lines.push("");
234
+ if (cmp.caseMismatch.length > 0) {
235
+ lines.push("Case mismatch:");
236
+ for (const mismatch of cmp.caseMismatch) {
237
+ lines.push(` ${mismatch.field}: A=${formatMismatchValue(mismatch.a)} | B=${formatMismatchValue(mismatch.b)}`);
238
+ }
239
+ lines.push("");
240
+ }
241
+ if (cmp.runDelta) {
242
+ lines.push("Run delta:");
243
+ lines.push(` exit: ${cmp.runDelta.exitReason.a} → ${cmp.runDelta.exitReason.b}`);
244
+ lines.push(` duration ms: ${cmp.runDelta.durationMsA ?? "?"} → ${cmp.runDelta.durationMsB ?? "?"}`);
245
+ const ai = cmp.runDelta.interruptCounts.a;
246
+ const bi = cmp.runDelta.interruptCounts.b;
247
+ lines.push(` interrupts: ask=${ai.ask}/approve=${ai.approve}/custom=${ai.custom} → ` +
248
+ `ask=${bi.ask}/approve=${bi.approve}/custom=${bi.custom}`);
249
+ const au = cmp.runDelta.usage.a;
250
+ const bu = cmp.runDelta.usage.b;
251
+ lines.push(` agent tokens: ${totalTokens(au.agent)} → ${totalTokens(bu.agent)}`);
252
+ lines.push(` harness tokens: ${totalTokens(harnessUsage(au))} → ${totalTokens(harnessUsage(bu))}`);
253
+ lines.push("");
254
+ }
255
+ lines.push("Grading:");
256
+ lines.push(` passed: ${String(cmp.grading.casePassedA)} → ${String(cmp.grading.casePassedB)}; ` +
257
+ `score: ${cmp.grading.caseScoreA ?? "?"} → ${cmp.grading.caseScoreB ?? "?"}`);
258
+ lines.push(` ${cmp.grading.improvements} improved, ${cmp.grading.regressions} regressed`);
259
+ for (const d of cmp.grading.deltas) {
260
+ if (d.status === "unchanged")
261
+ continue;
262
+ const arrow = { added: "+", removed: "-", improved: "↑", regressed: "↓" }[d.status];
263
+ lines.push(` ${arrow} ${d.name}`);
264
+ }
265
+ lines.push("");
266
+ lines.push("Artifacts:");
267
+ lines.push(` +${cmp.artifactsDelta.added.length} -${cmp.artifactsDelta.removed.length} ~${cmp.artifactsDelta.changed.length}`);
268
+ return lines.join("\n");
269
+ };
270
+ //# sourceMappingURL=compare.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compare.js","sourceRoot":"","sources":["../../src/orchestrator/compare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,aAAa,EAEb,mBAAmB,EACnB,YAAY,EAEZ,mBAAmB,EAEnB,iBAAiB,EAEjB,UAAU,EACV,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAwDvD,0EAA0E;AAC1E,MAAM,YAAY,GAAG,KAAK,EAAE,IAAY,EAAgC,EAAE;IACxE,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,MAAM,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,GAAG,CAAC,GAAG,CACL,GAAG,EACH,UAAU,CAAC,QAAQ,CAAC;aACjB,MAAM,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,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IACF,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC,YAAY,cAAc,GAAG,CAAC,OAAO,CAAC,WAAW,YAAY,CAAC,CAAC;IAC3F,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QACnC,IAAI,CAAC,CAAC,MAAM,KAAK,WAAW;YAAE,SAAS;QACvC,MAAM,KAAK,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACpF,KAAK,CAAC,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACzB,KAAK,CAAC,IAAI,CACR,MAAM,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,CACpH,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { RunMetadata } from "../core/index.js";
2
+ declare const stableDriverIdentity: (driver: RunMetadata["driver"]) => unknown;
3
+ /**
4
+ * Identity that must match before suite samples can be treated as repeated
5
+ * measurements. Subject/candidate hashes are intentionally excluded: those
6
+ * are the independent variable a comparison is meant to evaluate.
7
+ */
8
+ export declare const runComparisonIdentity: (metadata: RunMetadata) => string;
9
+ export { stableDriverIdentity };
10
+ //# sourceMappingURL=comparison-identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comparison-identity.d.ts","sourceRoot":"","sources":["../../src/orchestrator/comparison-identity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGpD,QAAA,MAAM,oBAAoB,WAAY,WAAW,CAAC,QAAQ,CAAC,KAAG,OAW7D,CAAC;AAUF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,aAAc,WAAW,KAAG,MAa1D,CAAC;AAEL,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { valueHash } from "../core/index.js";
2
+ const stableDriverIdentity = (driver) => {
3
+ const { detail: _detail, ...identity } = driver;
4
+ const detail = driver.detail
5
+ ? Object.fromEntries(Object.entries(driver.detail).filter(([key]) => key !== "sessionId" && key !== "threadId"))
6
+ : undefined;
7
+ return {
8
+ ...identity,
9
+ ...(detail && Object.keys(detail).length > 0 ? { detail } : {}),
10
+ };
11
+ };
12
+ const sourceIdentity = (metadata) => {
13
+ const source = metadata.provenance?.source;
14
+ if (!source?.git?.dirty || source.git.workingTreeHash)
15
+ return source;
16
+ // Old or oversized dirty runs have no content identity. Keep them from
17
+ // becoming false repetitions merely because commit + `dirty: true` match.
18
+ return { ...source, dirtySnapshotUnavailableForRun: metadata.startedAt };
19
+ };
20
+ /**
21
+ * Identity that must match before suite samples can be treated as repeated
22
+ * measurements. Subject/candidate hashes are intentionally excluded: those
23
+ * are the independent variable a comparison is meant to evaluate.
24
+ */
25
+ export const runComparisonIdentity = (metadata) => valueHash({
26
+ source: sourceIdentity(metadata),
27
+ runtime: metadata.provenance?.runtime,
28
+ caseHash: metadata.provenance?.caseHash,
29
+ assertionsHash: metadata.provenance?.assertionsHash,
30
+ fixturesHash: metadata.provenance?.fixturesHash,
31
+ profileId: metadata.provenance?.profileId,
32
+ driverConfigHash: metadata.provenance?.driverConfigHash,
33
+ answererConfigHash: metadata.provenance?.answererConfigHash,
34
+ evaluatorConfigHash: metadata.provenance?.evaluatorConfigHash,
35
+ driver: stableDriverIdentity(metadata.driver),
36
+ answerer: metadata.answerer,
37
+ });
38
+ export { stableDriverIdentity };
39
+ //# sourceMappingURL=comparison-identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comparison-identity.js","sourceRoot":"","sources":["../../src/orchestrator/comparison-identity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,oBAAoB,GAAG,CAAC,MAA6B,EAAW,EAAE;IACtE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,GAAG,MAAM,CAAC;IAChD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM;QAC1B,CAAC,CAAC,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,UAAU,CAAC,CAC3F;QACH,CAAC,CAAC,SAAS,CAAC;IACd,OAAO;QACL,GAAG,QAAQ;QACX,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,QAAqB,EAAW,EAAE;IACxD,MAAM,MAAM,GAAG,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC3C,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,IAAI,MAAM,CAAC,GAAG,CAAC,eAAe;QAAE,OAAO,MAAM,CAAC;IACrE,uEAAuE;IACvE,0EAA0E;IAC1E,OAAO,EAAE,GAAG,MAAM,EAAE,8BAA8B,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;AAC3E,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAAqB,EAAU,EAAE,CACrE,SAAS,CAAC;IACR,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC;IAChC,OAAO,EAAE,QAAQ,CAAC,UAAU,EAAE,OAAO;IACrC,QAAQ,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ;IACvC,cAAc,EAAE,QAAQ,CAAC,UAAU,EAAE,cAAc;IACnD,YAAY,EAAE,QAAQ,CAAC,UAAU,EAAE,YAAY;IAC/C,SAAS,EAAE,QAAQ,CAAC,UAAU,EAAE,SAAS;IACzC,gBAAgB,EAAE,QAAQ,CAAC,UAAU,EAAE,gBAAgB;IACvD,kBAAkB,EAAE,QAAQ,CAAC,UAAU,EAAE,kBAAkB;IAC3D,mBAAmB,EAAE,QAAQ,CAAC,UAAU,EAAE,mBAAmB;IAC7D,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC7C,QAAQ,EAAE,QAAQ,CAAC,QAAQ;CAC5B,CAAC,CAAC;AAEL,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,121 @@
1
+ import { z } from "zod";
2
+ import { type AnswererPlugin, type AssertionPlugin, type DriverPlugin, type LifecycleHooksPlugin, Registry } from "../core/index.js";
3
+ export declare const ExperimentProfileSchema: z.ZodObject<{
4
+ driver: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
5
+ name: z.ZodString;
6
+ config: z.ZodOptional<z.ZodUnknown>;
7
+ }, z.core.$strict>]>>;
8
+ answerer: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
9
+ name: z.ZodString;
10
+ config: z.ZodOptional<z.ZodUnknown>;
11
+ }, z.core.$strict>]>>;
12
+ harness: z.ZodOptional<z.ZodObject<{
13
+ provider: z.ZodEnum<{
14
+ "claude-code": "claude-code";
15
+ codex: "codex";
16
+ }>;
17
+ model: z.ZodString;
18
+ command: z.ZodOptional<z.ZodString>;
19
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
20
+ high: "high";
21
+ low: "low";
22
+ medium: "medium";
23
+ minimal: "minimal";
24
+ none: "none";
25
+ xhigh: "xhigh";
26
+ }>>;
27
+ }, z.core.$strict>>;
28
+ }, z.core.$strict>;
29
+ export type ExperimentProfile = z.infer<typeof ExperimentProfileSchema>;
30
+ declare const LuxConfigSchema: z.ZodObject<{
31
+ casesRoot: z.ZodOptional<z.ZodString>;
32
+ fixturesRoot: z.ZodOptional<z.ZodString>;
33
+ runsRoot: z.ZodDefault<z.ZodString>;
34
+ subjectRoot: z.ZodOptional<z.ZodString>;
35
+ defaultAnswerer: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
36
+ name: z.ZodString;
37
+ config: z.ZodOptional<z.ZodUnknown>;
38
+ }, z.core.$strict>]>>;
39
+ defaultDriver: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
40
+ name: z.ZodString;
41
+ config: z.ZodOptional<z.ZodUnknown>;
42
+ }, z.core.$strict>]>>;
43
+ harness: z.ZodOptional<z.ZodObject<{
44
+ provider: z.ZodEnum<{
45
+ "claude-code": "claude-code";
46
+ codex: "codex";
47
+ }>;
48
+ model: z.ZodString;
49
+ command: z.ZodOptional<z.ZodString>;
50
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
51
+ high: "high";
52
+ low: "low";
53
+ medium: "medium";
54
+ minimal: "minimal";
55
+ none: "none";
56
+ xhigh: "xhigh";
57
+ }>>;
58
+ }, z.core.$strict>>;
59
+ concurrency: z.ZodDefault<z.ZodNumber>;
60
+ profiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
61
+ driver: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
62
+ name: z.ZodString;
63
+ config: z.ZodOptional<z.ZodUnknown>;
64
+ }, z.core.$strict>]>>;
65
+ answerer: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
66
+ name: z.ZodString;
67
+ config: z.ZodOptional<z.ZodUnknown>;
68
+ }, z.core.$strict>]>>;
69
+ harness: z.ZodOptional<z.ZodObject<{
70
+ provider: z.ZodEnum<{
71
+ "claude-code": "claude-code";
72
+ codex: "codex";
73
+ }>;
74
+ model: z.ZodString;
75
+ command: z.ZodOptional<z.ZodString>;
76
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
77
+ high: "high";
78
+ low: "low";
79
+ medium: "medium";
80
+ minimal: "minimal";
81
+ none: "none";
82
+ xhigh: "xhigh";
83
+ }>>;
84
+ }, z.core.$strict>>;
85
+ }, z.core.$strict>>>;
86
+ drivers: z.ZodOptional<z.ZodArray<z.ZodCustom<DriverPlugin<never>, DriverPlugin<never>>>>;
87
+ answerers: z.ZodOptional<z.ZodArray<z.ZodCustom<AnswererPlugin<never>, AnswererPlugin<never>>>>;
88
+ assertions: z.ZodOptional<z.ZodArray<z.ZodCustom<AssertionPlugin<{
89
+ [x: string]: unknown;
90
+ id?: string | undefined;
91
+ type: string;
92
+ name?: string | undefined;
93
+ weight?: number | undefined;
94
+ threshold?: number | undefined;
95
+ }>, AssertionPlugin<{
96
+ [x: string]: unknown;
97
+ id?: string | undefined;
98
+ type: string;
99
+ name?: string | undefined;
100
+ weight?: number | undefined;
101
+ threshold?: number | undefined;
102
+ }>>>>;
103
+ lifecycleFixtures: z.ZodOptional<z.ZodArray<z.ZodCustom<LifecycleHooksPlugin, LifecycleHooksPlugin>>>;
104
+ }, z.core.$strict>;
105
+ /**
106
+ * Author-facing config before schema defaults are applied.
107
+ *
108
+ * Keep this as the schema input: using `z.infer`/`z.output` here makes
109
+ * defaulted fields look required in otherwise-valid `lux.config.ts` files.
110
+ */
111
+ export type LuxConfig = z.input<typeof LuxConfigSchema>;
112
+ type ParsedLuxConfig = z.output<typeof LuxConfigSchema>;
113
+ export type ResolvedLuxConfig = ParsedLuxConfig & {
114
+ configPath: string | null;
115
+ rootDir: string;
116
+ };
117
+ export declare const findConfigFile: (cwd: string) => string | null;
118
+ export declare const loadLuxConfig: (cwd?: string) => Promise<ResolvedLuxConfig>;
119
+ export declare const buildRegistryFromConfig: (config: ResolvedLuxConfig) => Registry;
120
+ export {};
121
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/orchestrator/config.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,OAAO,EACL,KAAK,cAAc,EAGnB,KAAK,eAAe,EAEpB,KAAK,YAAY,EAIjB,KAAK,oBAAoB,EAEzB,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAW1B,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;kBAMzB,CAAC;AACZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AA4BxE,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAqCV,CAAC;AAEZ;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,KAAK,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG;IAChD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAIF,eAAO,MAAM,cAAc,QAAS,MAAM,KAAG,MAAM,GAAG,IAMrD,CAAC;AAEF,eAAO,MAAM,aAAa,SAAe,MAAM,KAAmB,OAAO,CAAC,iBAAiB,CAwC1F,CAAC;AAcF,eAAO,MAAM,uBAAuB,WAAY,iBAAiB,KAAG,QAiBnE,CAAC"}