niceeval 0.16.3-canary.99 → 0.17.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 (258) hide show
  1. package/dist/cli/bootstrap.cjs +7 -1
  2. package/dist/cli/bootstrap.cjs.map +1 -1
  3. package/dist/cli/project-configuration.cjs +8 -11
  4. package/dist/cli/project-configuration.cjs.map +1 -1
  5. package/dist/expect/index.cjs.map +1 -1
  6. package/dist/expect/index.d.cts +2 -1
  7. package/dist/expect/index.d.mts +2 -1
  8. package/dist/expect/index.d.ts +2 -1
  9. package/dist/experiment/host/cli/contribution.cjs +6 -11
  10. package/dist/experiment/host/cli/contribution.cjs.map +1 -1
  11. package/dist/experiment/host/cli/contribution.d.cts +0 -16
  12. package/dist/experiment/host/cli/contribution.d.mts +0 -16
  13. package/dist/experiment/host/cli/contribution.d.ts +0 -16
  14. package/dist/experiment/host/operations.cjs +3 -3
  15. package/dist/experiment/host/operations.cjs.map +1 -1
  16. package/dist/experiment/host/types.cjs.map +1 -1
  17. package/dist/experiment/host/types.d.cts +0 -4
  18. package/dist/experiment/host/types.d.mts +0 -4
  19. package/dist/experiment/host/types.d.ts +0 -4
  20. package/dist/fresh-import.cjs +2 -2
  21. package/dist/fresh-import.cjs.map +1 -1
  22. package/dist/fresh-import.d.cts +3 -3
  23. package/dist/fresh-import.d.mts +3 -3
  24. package/dist/fresh-import.d.ts +3 -3
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +2 -1
  27. package/dist/index.d.mts +2 -1
  28. package/dist/index.d.ts +2 -1
  29. package/dist/inspection/codec.cjs.map +1 -1
  30. package/dist/inspection/codec.d.cts +1 -1
  31. package/dist/inspection/codec.d.mts +1 -1
  32. package/dist/inspection/codec.d.ts +1 -1
  33. package/dist/inspection/facts.cjs +66 -9
  34. package/dist/inspection/facts.cjs.map +1 -1
  35. package/dist/inspection/facts.d.cts +4 -0
  36. package/dist/inspection/facts.d.mts +4 -0
  37. package/dist/inspection/facts.d.ts +4 -0
  38. package/dist/inspection/facts.js +4 -2
  39. package/dist/inspection/index.cjs +1 -3
  40. package/dist/inspection/index.cjs.map +1 -1
  41. package/dist/inspection/index.d.cts +1 -1
  42. package/dist/inspection/index.d.mts +1 -1
  43. package/dist/inspection/index.d.ts +1 -1
  44. package/dist/inspection/index.js +44 -48
  45. package/dist/inspection/limits.cjs +3 -1
  46. package/dist/inspection/limits.cjs.map +1 -1
  47. package/dist/inspection/limits.d.cts +2 -0
  48. package/dist/inspection/limits.d.mts +2 -0
  49. package/dist/inspection/limits.d.ts +2 -0
  50. package/dist/inspection/limits.js +6 -4
  51. package/dist/inspection/project-source.cjs +4 -1
  52. package/dist/inspection/project-source.cjs.map +1 -1
  53. package/dist/inspection/protocol.cjs +10 -18
  54. package/dist/inspection/protocol.cjs.map +1 -1
  55. package/dist/inspection/protocol.d.cts +111 -173
  56. package/dist/inspection/protocol.d.mts +111 -173
  57. package/dist/inspection/protocol.d.ts +111 -173
  58. package/dist/inspection/public.mjs +73 -109
  59. package/dist/inspection/results.cjs +12 -48
  60. package/dist/inspection/results.cjs.map +1 -1
  61. package/dist/inspection/results.d.cts +124 -122
  62. package/dist/inspection/results.d.mts +124 -122
  63. package/dist/inspection/results.d.ts +124 -122
  64. package/dist/inspection/results.js +16 -20
  65. package/dist/inspection/select.cjs +80 -117
  66. package/dist/inspection/select.cjs.map +1 -1
  67. package/dist/inspection/source.cjs +14 -15
  68. package/dist/inspection/source.cjs.map +1 -1
  69. package/dist/inspection/source.d.cts +6 -3
  70. package/dist/inspection/source.d.mts +6 -3
  71. package/dist/inspection/source.d.ts +6 -3
  72. package/dist/inspection/trace.cjs +1 -1
  73. package/dist/inspection/trace.cjs.map +1 -1
  74. package/dist/load-config.cjs +17 -11
  75. package/dist/load-config.cjs.map +1 -1
  76. package/dist/load-config.d.cts +3 -2
  77. package/dist/load-config.d.mts +3 -2
  78. package/dist/load-config.d.ts +3 -2
  79. package/dist/o11y/adapter-usage-projection.cjs +5 -1
  80. package/dist/o11y/adapter-usage-projection.cjs.map +1 -1
  81. package/dist/o11y/adapter-usage-projection.d.cts +109 -1
  82. package/dist/o11y/adapter-usage-projection.d.mts +109 -1
  83. package/dist/o11y/adapter-usage-projection.d.ts +109 -1
  84. package/dist/o11y/cache-read.cjs +113 -0
  85. package/dist/o11y/cache-read.cjs.map +1 -0
  86. package/dist/o11y/cache-read.d.cts +80 -0
  87. package/dist/o11y/cache-read.d.mts +80 -0
  88. package/dist/o11y/cache-read.d.ts +80 -0
  89. package/dist/o11y/cache-read.js +8 -0
  90. package/dist/o11y/cache-read.js.map +1 -0
  91. package/dist/o11y/eval-usage.cjs +22 -1
  92. package/dist/o11y/eval-usage.cjs.map +1 -1
  93. package/dist/o11y/eval-usage.d.cts +9 -1
  94. package/dist/o11y/eval-usage.d.mts +9 -1
  95. package/dist/o11y/eval-usage.d.ts +9 -1
  96. package/dist/record/host/sqlite-host.cjs +188 -53
  97. package/dist/record/host/sqlite-host.cjs.map +1 -1
  98. package/dist/record/host/sqlite-host.d.cts +37 -1
  99. package/dist/record/host/sqlite-host.d.mts +37 -1
  100. package/dist/record/host/sqlite-host.d.ts +37 -1
  101. package/dist/record/host/sqlite-host.js +16 -8
  102. package/dist/record/maintenance/runtime.cjs +3 -3
  103. package/dist/record/maintenance/runtime.cjs.map +1 -1
  104. package/dist/record/sqlite/admission-repository.cjs +18 -18
  105. package/dist/record/sqlite/admission-repository.cjs.map +1 -1
  106. package/dist/record/sqlite/case-repository.cjs +6 -6
  107. package/dist/record/sqlite/case-repository.cjs.map +1 -1
  108. package/dist/record/sqlite/coordination-repository.cjs +25 -25
  109. package/dist/record/sqlite/coordination-repository.cjs.map +1 -1
  110. package/dist/record/sqlite/current-schema.cjs +115 -111
  111. package/dist/record/sqlite/current-schema.cjs.map +1 -1
  112. package/dist/record/sqlite/current-schema.d.cts +3 -3
  113. package/dist/record/sqlite/current-schema.d.mts +3 -3
  114. package/dist/record/sqlite/current-schema.d.ts +3 -3
  115. package/dist/record/sqlite/database.cjs +56 -53
  116. package/dist/record/sqlite/database.cjs.map +1 -1
  117. package/dist/record/sqlite/index.cjs +3 -1
  118. package/dist/record/sqlite/index.cjs.map +1 -1
  119. package/dist/record/sqlite/index.d.cts +5 -2
  120. package/dist/record/sqlite/index.d.mts +5 -2
  121. package/dist/record/sqlite/index.d.ts +5 -2
  122. package/dist/record/sqlite/legacy-schema-018.cjs +443 -0
  123. package/dist/record/sqlite/legacy-schema-018.cjs.map +1 -0
  124. package/dist/record/sqlite/legacy-schema-018.d.cts +6 -0
  125. package/dist/record/sqlite/legacy-schema-018.d.mts +6 -0
  126. package/dist/record/sqlite/legacy-schema-018.d.ts +6 -0
  127. package/dist/record/sqlite/legacy-schema-018.js +6 -0
  128. package/dist/record/sqlite/legacy-schema-018.js.map +1 -0
  129. package/dist/record/sqlite/migration.cjs +105 -46
  130. package/dist/record/sqlite/migration.cjs.map +1 -1
  131. package/dist/record/sqlite/migration.d.cts +2 -1
  132. package/dist/record/sqlite/migration.d.mts +2 -1
  133. package/dist/record/sqlite/migration.d.ts +2 -1
  134. package/dist/record/sqlite/portable-capture.cjs +13 -13
  135. package/dist/record/sqlite/portable-capture.cjs.map +1 -1
  136. package/dist/record/sqlite/registry-repository.cjs +22 -22
  137. package/dist/record/sqlite/registry-repository.cjs.map +1 -1
  138. package/dist/record/sqlite/schema.cjs +10 -2
  139. package/dist/record/sqlite/schema.cjs.map +1 -1
  140. package/dist/record/sqlite/schema.d.cts +4 -1
  141. package/dist/record/sqlite/schema.d.mts +4 -1
  142. package/dist/record/sqlite/schema.d.ts +4 -1
  143. package/dist/record/sqlite/schema.js +20 -14
  144. package/dist/record/sqlite/storage-worker.cjs +1 -1
  145. package/dist/record/sqlite/storage-worker.cjs.map +1 -1
  146. package/dist/record/sqlite/storage.cjs +316 -232
  147. package/dist/record/sqlite/storage.cjs.map +1 -1
  148. package/dist/record/sqlite/storage.d.cts +10 -2
  149. package/dist/record/sqlite/storage.d.mts +10 -2
  150. package/dist/record/sqlite/storage.d.ts +10 -2
  151. package/dist/record/sqlite/storage.js +54 -50
  152. package/dist/record/sqlite/types.cjs +1 -1
  153. package/dist/record/sqlite/types.cjs.map +1 -1
  154. package/dist/record/sqlite/types.d.cts +13 -1
  155. package/dist/record/sqlite/types.d.mts +13 -1
  156. package/dist/record/sqlite/types.d.ts +13 -1
  157. package/dist/run/cli/contribution.cjs +17 -12
  158. package/dist/run/cli/contribution.cjs.map +1 -1
  159. package/dist/run/host/lifecycle-adapter.cjs +1 -1
  160. package/dist/run/host/lifecycle-adapter.cjs.map +1 -1
  161. package/dist/run/storage/owner-identity.cjs +78 -16
  162. package/dist/run/storage/owner-identity.cjs.map +1 -1
  163. package/dist/run/storage/owner-identity.d.cts +2 -1
  164. package/dist/run/storage/owner-identity.d.mts +2 -1
  165. package/dist/run/storage/owner-identity.d.ts +2 -1
  166. package/dist/run/storage/sqlite.cjs +55 -55
  167. package/dist/run/storage/sqlite.cjs.map +1 -1
  168. package/dist/runner/accept.cjs +12 -42
  169. package/dist/runner/accept.cjs.map +1 -1
  170. package/dist/runner/accept.d.cts +2 -3
  171. package/dist/runner/accept.d.mts +2 -3
  172. package/dist/runner/accept.d.ts +2 -3
  173. package/dist/runner/adapter-usage.cjs +2 -2
  174. package/dist/runner/adapter-usage.cjs.map +1 -1
  175. package/dist/runner/adoption.cjs +14 -26
  176. package/dist/runner/adoption.cjs.map +1 -1
  177. package/dist/runner/adoption.d.cts +5 -13
  178. package/dist/runner/adoption.d.mts +5 -13
  179. package/dist/runner/adoption.d.ts +5 -13
  180. package/dist/runner/adoption.js +2 -4
  181. package/dist/runner/record.cjs +24 -18
  182. package/dist/runner/record.cjs.map +1 -1
  183. package/dist/runner/rename-experiment.cjs +5 -7
  184. package/dist/runner/rename-experiment.cjs.map +1 -1
  185. package/dist/runner/reuse-plan.cjs +37 -18
  186. package/dist/runner/reuse-plan.cjs.map +1 -1
  187. package/dist/runner/reuse-plan.d.cts +4 -1
  188. package/dist/runner/reuse-plan.d.mts +4 -1
  189. package/dist/runner/reuse-plan.d.ts +4 -1
  190. package/dist/runner/setup-prefix-plan.cjs +17 -12
  191. package/dist/runner/setup-prefix-plan.cjs.map +1 -1
  192. package/dist/runner/setup-prefix-plan.d.cts +0 -2
  193. package/dist/runner/setup-prefix-plan.d.mts +0 -2
  194. package/dist/runner/setup-prefix-plan.d.ts +0 -2
  195. package/dist/runner/setup-prefix-plan.js +8 -12
  196. package/dist/sandbox/backend.cjs +10 -1
  197. package/dist/sandbox/backend.cjs.map +1 -1
  198. package/dist/sandbox/backend.d.cts +16 -8
  199. package/dist/sandbox/backend.d.mts +16 -8
  200. package/dist/sandbox/backend.d.ts +16 -8
  201. package/dist/sandbox/backend.js +28 -26
  202. package/dist/sandbox/docker.cjs +7 -1
  203. package/dist/sandbox/docker.cjs.map +1 -1
  204. package/dist/sandbox/e2b-cache-repository.cjs +13 -3
  205. package/dist/sandbox/e2b-cache-repository.cjs.map +1 -1
  206. package/dist/sandbox/e2b-cache-repository.d.cts +3 -0
  207. package/dist/sandbox/e2b-cache-repository.d.mts +3 -0
  208. package/dist/sandbox/e2b-cache-repository.d.ts +3 -0
  209. package/dist/sandbox/e2b-cache-repository.js +16 -12
  210. package/dist/sandbox/e2b.cjs +2 -2
  211. package/dist/sandbox/e2b.cjs.map +1 -1
  212. package/dist/sandbox/incus/materialize.cjs +1 -1
  213. package/dist/sandbox/incus/materialize.cjs.map +1 -1
  214. package/dist/show/contribution.cjs +3 -3
  215. package/dist/show/contribution.cjs.map +1 -1
  216. package/dist/show/model.cjs +14 -13
  217. package/dist/show/model.cjs.map +1 -1
  218. package/dist/show/model.d.cts +7 -7
  219. package/dist/show/model.d.mts +7 -7
  220. package/dist/show/model.d.ts +7 -7
  221. package/dist/show/render.cjs +14 -0
  222. package/dist/show/render.cjs.map +1 -1
  223. package/dist/user-database/storage-worker.cjs +13 -3
  224. package/dist/user-database/storage-worker.cjs.map +1 -1
  225. package/dist/view/app-dist/.vite/manifest.json +2 -2
  226. package/dist/view/app-dist/assets/{index-CmVoXbwG.js → index-B3ijZRph.js} +17 -17
  227. package/dist/view/app-dist/assets/{quality-cost-scatter-BuLISaH4.js → quality-cost-scatter-B--DfJ9s.js} +1 -1
  228. package/dist/view/app-dist/index.html +1 -1
  229. package/dist/view/application-runtime.cjs +8 -0
  230. package/dist/view/application-runtime.cjs.map +1 -0
  231. package/dist/view/application-runtime.d.cts +9 -0
  232. package/dist/view/application-runtime.d.mts +9 -0
  233. package/dist/view/application-runtime.d.ts +9 -0
  234. package/dist/view/application-runtime.js +6 -0
  235. package/dist/view/application-runtime.js.map +1 -0
  236. package/dist/view/cli/contribution.cjs +5 -2
  237. package/dist/view/cli/contribution.cjs.map +1 -1
  238. package/dist/view/cli/contribution.d.cts +2 -1
  239. package/dist/view/cli/contribution.d.mts +2 -1
  240. package/dist/view/cli/contribution.d.ts +2 -1
  241. package/dist/view/function-runtime.mjs +1019 -456
  242. package/dist/view/http-protocol.d.cts +1 -9
  243. package/dist/view/http-protocol.d.mts +1 -9
  244. package/dist/view/http-protocol.d.ts +1 -9
  245. package/dist/view/inspection-host.cjs +39 -30
  246. package/dist/view/inspection-host.cjs.map +1 -1
  247. package/dist/view/inspection-host.d.cts +7545 -2
  248. package/dist/view/inspection-host.d.mts +7545 -2
  249. package/dist/view/inspection-host.d.ts +7545 -2
  250. package/dist/view/server.cjs +8 -5
  251. package/dist/view/server.cjs.map +1 -1
  252. package/dist/view/server.d.cts +4 -2
  253. package/dist/view/server.d.mts +4 -2
  254. package/dist/view/server.d.ts +4 -2
  255. package/docs-site/zh/reference/cli.mdx +1 -2
  256. package/docs-site/zh/tutorials/control-run-cost.mdx +61 -0
  257. package/docs-site/zh/tutorials/niceeval-taste-application.mdx +21 -0
  258. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["operations.ts"],"names":[],"mappings":";;AAmQA,0BAYC;AAqCD,kCA4CC;AACD,s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I,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;YAC5D,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,WAAW,EAAE,MAAM,CAAC,WAAW;SAClC,CAAC,CAAC,CAAC;KACP,CAAC,CAAC,CAAC,CAAC,CAAC;AACV,CAAC;AACD,SAAgB,cAAc,CAAC,KAAqC;IAChE,OAAO,cAAc,CAAC,QAAQ,EAAE,IAAA,qBAAS,EAAC,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,eAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;QAC7J,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,WAAW,EAAE,OAAO,CAAC,WAAW;KACnC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACZ,CAAC","sourcesContent":["import type { ExperimentHostRequirements } from \"./requirements.ts\";\nimport { resolve } from \"node:path\";\nimport { Clock, Data, Effect, Result } from \"effect\";\nimport { recordHost } from \"../../record/host/index.ts\";\nimport { makeRecordRoot, recordRootPaths, type RecordRoot } from \"../../record/platform/root.ts\";\nimport { ProjectStateDatabase } from \"../../record/sqlite/project-state-database.ts\";\nimport { acceptLocators, acceptRun, planAcceptRun } from \"../../runner/accept.ts\";\nimport { activateFeedbackSink, type FeedbackSink } from \"../../runner/feedback/sink.ts\";\nimport { computeExitCode } from \"../../runner/feedback/json.ts\";\nimport { discoverEvals, discoverExperiments } from \"../../runner/discover.ts\";\nimport { acquireFreshImportGeneration, type FreshImportGeneration } from \"../../fresh-import.ts\";\nimport { resolveExperimentEvals, splitByEvaluationKind } from \"../../runner/eval-selection.ts\";\nimport { planProjectTarget } from \"../../runner/fingerprint.ts\";\nimport { prepareRunnerRecordReuse, withRunnerCurrentReusePreview, } from \"../../runner/record.ts\";\nimport { projectCurrentReuseReadback } from \"../../runner/reuse-readback.ts\";\nimport type { ExecutionReusePlanSlot } from \"../../runner/reuse-plan.ts\";\nimport { runEvals } from \"../../runner/run.ts\";\nimport { readCaseLockEffect } from \"../../runner/lock.ts\";\nimport { JUnit } from \"../../runner/reporters/json.ts\";\nimport { listSessions, showSession, SessionTracker, } from \"../../runner/session.ts\";\nimport { linkRunSandboxes, recommendedConcurrencyForPreparedPairs, } from \"../../runner/sandbox-selection.ts\";\nimport { resolveRunTimeout } from \"../../runner/timeout.ts\";\nimport { ExperimentRenameError, planExperimentRename, renameExperiment, } from \"../../runner/rename-experiment.ts\";\nimport { resolveSandboxSetupCache, type AgentRun, type DiscoveredEval, type DiscoveredExperiment, type InvocationSummary, type SandboxSetupCache, } from \"../../runner/types.ts\";\nimport { evalPrefixPredicate, matchExperimentSelector } from \"../../shared/aggregate.ts\";\nimport { ExperimentHostError } from \"./types.ts\";\nimport { assembleInvocationCompletion, foldInvocationEvalStats } from \"./presentation.ts\";\nimport { firstLine, formatThrown } from \"../../util.ts\";\nimport type { ExperimentHostAcceptRequest, ExperimentHostAcceptRunPlan, ExperimentHostAcceptRunRequest, ExperimentHostAcceptedAttempt, ExperimentHostCatalog, ExperimentHostCheckRequest, ExperimentHostCheckResult, ExperimentHostDryComparison, ExperimentHostDryPlan, ExperimentHostDrySlot, ExperimentHostOperation, ExperimentHostExperimentSummary, ExperimentHostInvocationPlan, ExperimentHostInvocationPlanRequest, ExperimentHostInvocationPlanResult, ExperimentHostInvocationResult, ExperimentHostInvocationRunRequest, ExperimentHostInvocationShape, ExperimentHostInvocationSummary, ExperimentHostJsonValue, ExperimentHostInvocationStatusList, ExperimentHostInvocationStatusListRequest, ExperimentHostInvocationStatusShow, ExperimentHostInvocationStatusShowRequest, ExperimentHostRenamePlan, ExperimentHostRenameRequest, ExperimentHostRenameResult, ExperimentHostRunOverrides, ExperimentHostSelectionInput, ExperimentHostSelectionProblem, } from \"./types.ts\";\nfunction operationError(operation: ExperimentHostOperation, cause: unknown): ExperimentHostError {\n if (cause instanceof ExperimentHostError)\n return cause;\n const code = typeof cause === \"object\" && cause !== null && typeof Reflect.get(cause, \"code\") === \"string\"\n ? String(Reflect.get(cause, \"code\"))\n : \"experiment-host-operation-failed\";\n return new ExperimentHostError({\n operation,\n code,\n message: closedFailureMessage(cause),\n cause,\n });\n}\n/** Preserve one actionable message while closing private Runner error shapes. */\nfunction closedFailureMessage(cause: unknown): string {\n const diagnostic = closedRecordDiagnostic(cause);\n if (diagnostic !== undefined)\n return JSON.stringify(diagnostic);\n if (cause instanceof Error && cause.message.length > 0)\n return cause.message;\n if (typeof cause === \"object\" && cause !== null) {\n const direct = Reflect.get(cause, \"message\");\n if (typeof direct === \"string\" && direct.length > 0)\n return direct;\n const issue = Reflect.get(cause, \"issue\");\n if (typeof issue === \"object\" && issue !== null) {\n const nested = Reflect.get(issue, \"message\");\n if (typeof nested === \"string\" && nested.length > 0)\n return nested;\n }\n }\n return firstLine(formatThrown(cause));\n}\nfunction closedRecordDiagnostic(cause: unknown): unknown | undefined {\n if (typeof cause !== \"object\" || cause === null)\n return undefined;\n const code = Reflect.get(cause, \"code\");\n if (code === \"runner-record-attempt-publication-failed\") {\n const locator = Reflect.get(cause, \"locator\");\n const rawCause = Reflect.get(cause, \"cause\");\n const nested = closedRecordDiagnostic(rawCause) ?? closedDiagnosticMessage(rawCause);\n return Object.freeze({\n code,\n ...(typeof locator === \"string\" ? { locator } : {}),\n ...(nested === undefined ? {} : { cause: nested }),\n });\n }\n if (code !== \"record-attachment-encode-error\")\n return undefined;\n const family = Reflect.get(cause, \"family\");\n const issues = Reflect.get(cause, \"issues\");\n const schemaIssues = Reflect.get(cause, \"schemaIssues\");\n return Object.freeze({\n code,\n ...(typeof family === \"string\" ? { family } : {}),\n issues: closedDiagnosticIssues(issues, false),\n schemaIssues: closedDiagnosticIssues(schemaIssues, true),\n });\n}\nfunction closedDiagnosticMessage(cause: unknown): Readonly<{\n message: string;\n}> | undefined {\n const message = cause instanceof Error\n ? cause.message\n : typeof cause === \"object\" && cause !== null && typeof Reflect.get(cause, \"message\") === \"string\"\n ? String(Reflect.get(cause, \"message\"))\n : undefined;\n return message === undefined || message.length === 0\n ? undefined\n : Object.freeze({ message });\n}\nfunction closedDiagnosticIssues(value: unknown, includeMessage: boolean): readonly unknown[] {\n if (!Array.isArray(value))\n return Object.freeze([]);\n return Object.freeze(value.flatMap((entry) => {\n if (typeof entry !== \"object\" || entry === null)\n return [];\n const path = Reflect.get(entry, \"path\");\n const code = Reflect.get(entry, \"code\");\n const message = Reflect.get(entry, \"message\");\n return [Object.freeze({\n ...(typeof code === \"string\" ? { code } : {}),\n path: Array.isArray(path)\n ? Object.freeze(path.filter((segment): segment is string | number => typeof segment === \"string\" || typeof segment === \"number\"))\n : Object.freeze([]),\n ...(includeMessage && typeof message === \"string\" ? { message } : {}),\n })];\n }));\n}\nfunction closeOperation<A, E, R>(operation: ExperimentHostOperation, effect: Effect.Effect<A, E, R>): Effect.Effect<A, ExperimentHostError, R> {\n return effect.pipe(Effect.mapError((cause) => operationError(operation, cause)));\n}\ninterface ClosedSelection {\n readonly evals: readonly DiscoveredEval[];\n readonly experimentIds: readonly string[];\n readonly selections: readonly {\n readonly experiment: DiscoveredExperiment;\n readonly selectedEvalIds: readonly string[];\n readonly selectorEvalIds: readonly string[];\n }[];\n}\ninterface PreparedInvocationState {\n readonly evals: readonly DiscoveredEval[];\n readonly runs: readonly AgentRun[];\n readonly config: ExperimentHostInvocationPlanRequest[\"config\"];\n readonly recordRoot: RecordRoot;\n readonly coordinationRoot: string;\n readonly overrides: ExperimentHostRunOverrides;\n readonly shape: ExperimentHostInvocationShape;\n consumed: boolean;\n}\nclass ExperimentEvaluationKindAdmissionError extends Data.TaggedError(\"ExperimentEvaluationKindAdmissionError\")<{\n readonly code: \"experiment-evaluation-kind-mixed\";\n readonly message: string;\n readonly issues: readonly {\n readonly experimentId: string;\n readonly passEvalIds: readonly string[];\n readonly scoreEvalIds: readonly string[];\n }[];\n}> {\n}\ntype PreparedRuns = {\n readonly status: \"problem\";\n readonly selected: ClosedSelection;\n readonly problem: ExperimentHostSelectionProblem;\n} | {\n readonly status: \"ready\";\n readonly selected: ClosedSelection;\n readonly runs: readonly AgentRun[];\n};\nconst invocationPlans = new WeakMap<object, PreparedInvocationState>();\nfunction freezeArray<A>(values: Iterable<A>): readonly A[] {\n return Object.freeze([...values]);\n}\nfunction selectionProblem(input: ExperimentHostSelectionInput, selected: ClosedSelection): ExperimentHostSelectionProblem | undefined {\n if (input.experimentIds !== undefined) {\n const missing = input.experimentIds.find((id) => !selected.experimentIds.includes(id));\n if (missing !== undefined) {\n return Object.freeze({\n status: \"experiment-no-match\" as const,\n selector: missing,\n candidates: freezeArray([...selected.experimentIds].sort()),\n });\n }\n }\n if (input.experimentSelector !== undefined && selected.selections.length === 0) {\n return Object.freeze({\n status: \"experiment-no-match\" as const,\n selector: input.experimentSelector,\n candidates: freezeArray([...selected.experimentIds].sort()),\n });\n }\n const selectorEvalIds = freezeArray(new Set(selected.selections.flatMap((entry) => entry.selectorEvalIds)));\n for (const selector of input.evalSelectors ?? []) {\n if (selectorEvalIds.some((id) => evalPrefixPredicate([selector])(id)))\n continue;\n return Object.freeze({\n status: \"eval-no-match\" as const,\n selector,\n experimentIds: freezeArray(selected.selections.map(({ experiment }) => experiment.id)),\n candidates: freezeArray([...selectorEvalIds].sort()),\n });\n }\n if (selected.selections.every((entry) => entry.selectedEvalIds.length === 0)) {\n return Object.freeze({\n status: \"empty-selection\" as const,\n experimentIds: freezeArray(selected.selections.map(({ experiment }) => experiment.id)),\n candidates: freezeArray([...selected.experimentIds].sort()),\n });\n }\n return undefined;\n}\nfunction closeSelection(input: ExperimentHostSelectionInput, options: {\n readonly freshImport?: boolean;\n} = {}): Effect.Effect<ClosedSelection, unknown> {\n const selectWith = (generation?: FreshImportGeneration) => Effect.gen(function* () {\n if (input.experimentIds !== undefined && (input.experimentIds.length === 0 || input.experimentSelector !== undefined)) {\n return yield* Effect.fail(new TypeError(\"experimentIds must be non-empty and cannot be combined with experimentSelector\"));\n }\n const discovered = yield* discoverEvals(input.cwd, { generation });\n const evals = input.tag === undefined\n ? discovered\n : discovered.filter((definition) => definition.tags?.includes(input.tag!));\n const experiments = yield* discoverExperiments(input.cwd, { generation });\n const experimentIds = freezeArray(experiments.map((experiment) => experiment.id));\n const selectedIds = input.experimentIds !== undefined\n ? new Set(input.experimentIds)\n : input.experimentSelector === undefined\n ? undefined\n : new Set(matchExperimentSelector(experimentIds, input.experimentSelector));\n const selections = experiments\n .filter((experiment) => selectedIds === undefined || selectedIds.has(experiment.id))\n .map((experiment) => {\n const selection = resolveExperimentEvals({\n experimentId: experiment.id,\n selector: experiment.evals,\n cliPatterns: input.evalSelectors ?? [],\n evals,\n });\n return Object.freeze({\n experiment,\n selectedEvalIds: freezeArray(selection.selectedEvalIds),\n selectorEvalIds: freezeArray(selection.selectorEvals.map((definition) => definition.id)),\n });\n });\n return Object.freeze({\n evals: freezeArray(evals),\n experimentIds,\n selections: freezeArray(selections),\n });\n });\n return options.freshImport\n ? Effect.scoped(acquireFreshImportGeneration(input.cwd).pipe(Effect.flatMap(selectWith)))\n : selectWith();\n}\nfunction summaryOfExperiment(experiment: DiscoveredExperiment, evalIds: readonly string[]): ExperimentHostExperimentSummary {\n return Object.freeze({\n id: experiment.id,\n ...(experiment.description === undefined ? {} : { description: experiment.description }),\n adapter: experiment.adapter.name,\n ...(experiment.models === undefined ? {} : { models: experiment.models }),\n ...(experiment.model === undefined ? {} : { model: experiment.model }),\n attempts: experiment.attempts ?? 1,\n evalIds: freezeArray(evalIds),\n labels: Object.freeze({ ...(experiment.labels ?? {}) }),\n hasSetup: typeof experiment.setup === \"function\",\n hasTeardown: typeof experiment.teardown === \"function\",\n ...(experiment.sharedState === undefined ? {} : { sharedStateKey: experiment.sharedState.key }),\n });\n}\nexport function catalog(input: ExperimentHostSelectionInput): Effect.Effect<ExperimentHostCatalog, ExperimentHostError> {\n return closeOperation(\"catalog\", closeSelection(input).pipe(Effect.map((selected) => Object.freeze({\n status: \"listed\" as const,\n evals: freezeArray(selected.evals.map((definition) => Object.freeze({\n id: definition.id,\n ...(definition.description === undefined ? {} : { description: definition.description }),\n tags: freezeArray(definition.tags ?? []),\n evaluationKind: definition.evaluationKind,\n }))),\n experimentIds: selected.experimentIds,\n experiments: freezeArray(selected.selections.map(({ experiment, selectedEvalIds }) => summaryOfExperiment(experiment, selectedEvalIds))),\n }))));\n}\nfunction agentRunFromExperiment(experiment: DiscoveredExperiment, selectedEvalIds: readonly string[], config: ExperimentHostInvocationPlanRequest[\"config\"], overrides: ExperimentHostRunOverrides, sandboxSetupCacheOverride: SandboxSetupCache | undefined): AgentRun {\n return Object.freeze({\n adapter: experiment.adapter,\n ...(experiment.agent === undefined ? {} : { agent: experiment.agent }),\n ...(experiment.models === undefined ? {} : { models: experiment.models }),\n model: experiment.model,\n reasoningEffort: experiment.reasoningEffort,\n flags: experiment.flags ?? {},\n plugins: experiment.plugins,\n attempts: overrides.attempts ?? experiment.attempts ?? 1,\n earlyExit: overrides.earlyExit ?? experiment.earlyExit ?? false,\n sandboxSetupCache: resolveSandboxSetupCache(sandboxSetupCacheOverride, experiment.sandboxCache, config.sandboxCache),\n sandbox: experiment.sandbox,\n sandboxReuse: experiment.sandboxReuse,\n ...(experiment.sharedState === undefined ? {} : { sharedState: experiment.sharedState }),\n judgeRuntime: experiment.judgeRuntime,\n ...resolveRunTimeout(overrides.timeoutMs, experiment.timeoutMs),\n budget: overrides.budget ?? experiment.budget,\n selectedEvalIds: freezeArray(selectedEvalIds),\n experimentId: experiment.id,\n experimentBaseDir: experiment.baseDir,\n experimentSourcePath: experiment.sourcePath,\n description: experiment.description,\n labels: experiment.labels,\n maxConcurrency: experiment.maxConcurrency,\n setup: experiment.setup,\n teardown: experiment.teardown,\n classifyFailure: experiment.classifyFailure,\n });\n}\nfunction sandboxSetupCacheOverrideOf(overrides: ExperimentHostRunOverrides): SandboxSetupCache | undefined {\n const value: unknown = Reflect.get(overrides, \"sandboxSetupCache\");\n if (value === undefined || value === \"use\" || value === \"bypass\")\n return value;\n throw new TypeError(\"sandboxSetupCache override must be \\\"use\\\" or \\\"bypass\\\".\");\n}\nexport function prepareRuns(input: ExperimentHostSelectionInput & {\n readonly config: ExperimentHostInvocationPlanRequest[\"config\"];\n readonly overrides?: ExperimentHostRunOverrides;\n}, options: {\n readonly allowEmptySelection?: boolean;\n readonly freshImport?: boolean;\n} = {}): Effect.Effect<PreparedRuns, unknown> {\n return closeSelection(input, options).pipe(Effect.flatMap((selected): Effect.Effect<PreparedRuns, ExperimentEvaluationKindAdmissionError> => {\n const problem = selectionProblem(input, selected);\n if (problem !== undefined && !(options.allowEmptySelection === true && problem.status === \"empty-selection\")) {\n return Effect.succeed({ status: \"problem\", selected, problem } as const);\n }\n const evalsById = new Map(selected.evals.map((definition) => [definition.id, definition]));\n const issues = selected.selections.flatMap(({ experiment, selectedEvalIds }) => {\n const evaluationKinds = splitByEvaluationKind(selectedEvalIds.flatMap((id) => {\n const definition = evalsById.get(id);\n return definition === undefined ? [] : [definition];\n }));\n return evaluationKinds.pass.length === 0 || evaluationKinds.score.length === 0\n ? []\n : [{\n experimentId: experiment.id,\n passEvalIds: Object.freeze([...evaluationKinds.pass]),\n scoreEvalIds: Object.freeze([...evaluationKinds.score]),\n }];\n });\n if (issues.length > 0) {\n return Effect.fail(new ExperimentEvaluationKindAdmissionError({\n code: \"experiment-evaluation-kind-mixed\",\n message: issues.map((issue) => `Experiment ${JSON.stringify(issue.experimentId)} selects both pass and score Evals. ` +\n `pass (${issue.passEvalIds.length}): ${issue.passEvalIds.join(\", \")}; ` +\n `score (${issue.scoreEvalIds.length}): ${issue.scoreEvalIds.join(\", \")}. ` +\n \"Split the Experiment into one pass Experiment and one score Experiment, or narrow its Eval selection.\").join(\"\\n\"),\n issues: Object.freeze(issues.map((issue) => Object.freeze(issue))),\n }));\n }\n const overrides = input.overrides ?? {};\n const sandboxSetupCacheOverride = sandboxSetupCacheOverrideOf(overrides);\n return Effect.succeed({\n status: \"ready\",\n selected,\n runs: freezeArray(selected.selections.map(({ experiment, selectedEvalIds }) => agentRunFromExperiment(experiment, selectedEvalIds, input.config, overrides, sandboxSetupCacheOverride))),\n } as const);\n }));\n}\nexport function check(input: ExperimentHostCheckRequest): Effect.Effect<ExperimentHostCheckResult, ExperimentHostError> {\n return closeOperation(\"check\", Effect.gen(function* () {\n const prepared = yield* prepareRuns(input);\n if (prepared.status === \"problem\")\n return prepared.problem;\n const pairs = yield* linkRunSandboxes(prepared.selected.evals, prepared.runs);\n return Object.freeze({\n status: \"linked\" as const,\n experimentIds: freezeArray(prepared.runs.map((run) => run.experimentId!)),\n evalIds: freezeArray(new Set(prepared.runs.flatMap((run) => run.selectedEvalIds))),\n pairCount: pairs.length,\n });\n }));\n}\n/** Session data is intentionally presented as a closed, transient document. */\nexport function listInvocationStatus(input: ExperimentHostInvocationStatusListRequest): Effect.Effect<ExperimentHostInvocationStatusList, ExperimentHostError, ProjectStateDatabase> {\n return closeOperation(\"invocation-status-list\", listSessions(resolve(input.cwd, \".niceeval\"), {\n ...(input.all === true ? { all: true } : {}),\n ...(input.experimentSelector === undefined ? {} : { selector: input.experimentSelector }),\n }));\n}\nexport function showInvocationStatus(input: ExperimentHostInvocationStatusShowRequest): Effect.Effect<ExperimentHostInvocationStatusShow, ExperimentHostError, ProjectStateDatabase> {\n return closeOperation(\"invocation-status-show\", showSession(resolve(input.cwd, \".niceeval\"), input.invocationSelector));\n}\nfunction recordRoot(input: ExperimentHostInvocationPlanRequest) {\n // An ordinary Invocation is always anchored to its discovered project. A\n // Query/view source selection belongs to Inspection and can never be\n // promoted to the live writer through this request.\n return makeRecordRoot(resolve(input.cwd, \".niceeval\"));\n}\nfunction comparisonOf(slot: ExecutionReusePlanSlot): readonly ExperimentHostDryComparison[] {\n return freezeArray(slot.comparisons.map((comparison) => Object.freeze({ ...comparison })));\n}\nfunction jsonSnapshot(value: unknown): ExperimentHostJsonValue | undefined {\n try {\n return freezeJson(JSON.parse(JSON.stringify(value)) as ExperimentHostJsonValue);\n }\n catch {\n return undefined;\n }\n}\nfunction freezeJson(value: ExperimentHostJsonValue): ExperimentHostJsonValue {\n if (Array.isArray(value))\n return Object.freeze(value.map(freezeJson));\n if (typeof value === \"object\" && value !== null) {\n return Object.freeze(Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, freezeJson(entry)])));\n }\n return value;\n}\nfunction dryPlan(slots: readonly ExecutionReusePlanSlot[], readbacks: readonly ReturnType<typeof projectCurrentReuseReadback>[], lockedPairs: readonly string[], evalGroups: ReadonlyMap<string, {\n readonly id: string;\n readonly index: number;\n}>): ExperimentHostDryPlan {\n const projected: ExperimentHostDrySlot[] = slots.map((slot) => {\n const evalGroup = evalGroups.get(slot.evalId);\n const target = Object.freeze({\n runId: slot.runId,\n slotId: slot.slotId,\n experimentId: slot.experimentId,\n evalId: slot.evalId,\n executionIdentityDigest: slot.executionIdentityDigest,\n ...(evalGroup === undefined ? {} : { evalGroupId: evalGroup.id, evalGroupIndex: evalGroup.index }),\n attempt: slot.attempt,\n });\n if (slot.state === \"reuse\") {\n return Object.freeze({\n state: \"reuse\" as const,\n target,\n source: Object.freeze({\n attemptId: slot.source.attemptId,\n originRunId: slot.source.origin.runId,\n originSlotId: slot.source.origin.slotId,\n sourceRunId: slot.source.sourceBarrier.runId,\n }),\n comparisons: comparisonOf(slot),\n });\n }\n return Object.freeze({\n state: \"gap\" as const,\n target,\n reason: slot.reason,\n scope: slot.scope,\n issues: freezeArray(slot.issues.map((issue) => jsonSnapshot(issue) ?? Object.freeze({}))),\n comparisons: comparisonOf(slot),\n });\n });\n return Object.freeze({\n policy: Object.freeze({ name: \"project-target\" as const, version: 1 as const }),\n slots: freezeArray(projected),\n readbacks: freezeArray(readbacks),\n lockedPairs: freezeArray(lockedPairs),\n });\n}\nexport function planInvocation(input: ExperimentHostInvocationPlanRequest): Effect.Effect<ExperimentHostInvocationPlanResult, ExperimentHostError, ExperimentHostRequirements> {\n return closeOperation(\"invocation-plan\", Effect.gen(function* () {\n const prepared = yield* prepareRuns(input);\n if (prepared.status === \"problem\") {\n return Object.freeze({ ...prepared.problem });\n }\n const root = recordRoot(input);\n if (Result.isFailure(root))\n return yield* Effect.fail(root.failure);\n const config = Object.freeze({\n ...input.config,\n ...(input.config.reporters === undefined\n ? {}\n : { reporters: [...input.config.reporters] }),\n });\n const overrides = Object.freeze({ ...(input.overrides ?? {}) });\n const target = yield* planProjectTarget(prepared.selected.evals, prepared.runs, config.timeoutMs, {\n configJudge: config.judgeRuntime,\n ...(overrides.keepSandbox === undefined ? {} : { keepSandbox: overrides.keepSandbox }),\n });\n const maxConcurrency = overrides.maxConcurrency\n ?? config.maxConcurrency\n ?? recommendedConcurrencyForPreparedPairs([...target.preparedPairsByKey.values()]);\n const maxBuildConcurrency = overrides.maxBuildConcurrency\n ?? config.maxBuildConcurrency\n ?? 2;\n const maxSetupPrefixConcurrency = overrides.maxSetupPrefixConcurrency\n ?? config.maxSetupPrefixConcurrency\n ?? 2;\n if (!Number.isInteger(maxConcurrency) || maxConcurrency <= 0) {\n return yield* Effect.fail(new Error(`maxConcurrency must be a positive integer, got ${maxConcurrency}.`));\n }\n if (!Number.isInteger(maxBuildConcurrency) || maxBuildConcurrency <= 0) {\n return yield* Effect.fail(new Error(`maxBuildConcurrency must be a positive integer, got ${maxBuildConcurrency}.`));\n }\n if (!Number.isInteger(maxSetupPrefixConcurrency) || maxSetupPrefixConcurrency <= 0) {\n return yield* Effect.fail(new Error(`maxSetupPrefixConcurrency must be a positive integer, got ${maxSetupPrefixConcurrency}.`));\n }\n const uniqueEvalIds = new Set(prepared.runs.flatMap((run) => run.selectedEvalIds));\n const totalAttempts = prepared.runs.reduce((sum, run) => sum + run.selectedEvalIds.length * run.attempts, 0);\n const experimentConcurrency = Object.freeze(Object.fromEntries(prepared.runs.flatMap((run) => run.experimentId !== undefined && run.maxConcurrency !== undefined\n ? [[run.experimentId, run.maxConcurrency] as const]\n : [])));\n const shape: ExperimentHostInvocationShape = Object.freeze({\n experiments: prepared.runs.length,\n evals: uniqueEvalIds.size,\n configurations: prepared.runs.length,\n totalAttempts,\n attempts: Math.max(1, ...prepared.runs.map((run) => run.attempts)),\n maxConcurrency,\n maxBuildConcurrency,\n maxSetupPrefixConcurrency,\n experimentConcurrency,\n });\n const reuse = yield* prepareRunnerRecordReuse({\n evals: prepared.selected.evals,\n runs: prepared.runs,\n config: { timeoutMs: config.timeoutMs },\n plannedFingerprints: target.plannedFingerprints,\n renameFingerprintsByKey: target.renameFingerprintsByKey,\n plannedConfigHashes: target.plannedConfigHashes,\n ...(overrides.rerun === undefined ? {} : { rerun: overrides.rerun }),\n ...(overrides.keepSandbox === undefined ? {} : { keepSandbox: overrides.keepSandbox }),\n });\n const previewStartedAt = input.preview === true ? yield* Clock.currentTimeMillis : undefined;\n const preview = previewStartedAt !== undefined\n ? yield* Effect.scoped(withRunnerCurrentReusePreview({\n recordRoot: root.success,\n startedAt: previewStartedAt,\n evals: prepared.selected.evals,\n runs: prepared.runs,\n reuse,\n use: ({ reusePlan, readReadbacks }) => Effect.gen(function* () {\n const readbacks = yield* readReadbacks();\n const pairs = new Map(reusePlan.slots.map((slot) => [\n JSON.stringify([slot.experimentId, slot.evalId]),\n [slot.experimentId, slot.evalId] as const,\n ]));\n const projectDatabaseRoot = recordRootPaths(root.success)?.portableRoot;\n if (projectDatabaseRoot === undefined)\n return yield* Effect.fail(new Error(\"Record root is unavailable.\"));\n const locked = yield* Effect.all([...pairs].map(([key, [experimentId, evalId]]) => readCaseLockEffect(projectDatabaseRoot, experimentId, evalId).pipe(Effect.catch(() => Effect.succeed(undefined)), Effect.map((record) => record !== undefined ? key : undefined))), { concurrency: \"unbounded\" });\n return dryPlan(reusePlan.slots, readbacks.map(projectCurrentReuseReadback), locked.filter((key): key is string => key !== undefined), new Map(prepared.selected.evals.flatMap((definition) => definition.evalGroup === undefined\n ? []\n : [[definition.id, {\n id: definition.evalGroup.id,\n index: definition.evalGroup.evalIds.indexOf(definition.id),\n }] as const])));\n }),\n }))\n : undefined;\n const plan = Object.freeze({}) as ExperimentHostInvocationPlan;\n invocationPlans.set(plan, {\n evals: prepared.selected.evals,\n runs: prepared.runs,\n config,\n recordRoot: root.success,\n coordinationRoot: resolve(input.cwd, input.coordinationRoot ?? \".niceeval\"),\n overrides,\n shape,\n consumed: false,\n });\n const occurrenceAudits = new Map<string, ExperimentHostJsonValue>();\n for (const pair of target.preparedPairsByKey.values()) {\n for (const occurrence of pair.plugin.occurrences) {\n const audit = jsonSnapshot(occurrence.audit);\n if (audit !== undefined)\n occurrenceAudits.set(JSON.stringify(audit), audit);\n }\n }\n return Object.freeze({\n status: \"ready\" as const,\n plan,\n shape,\n experimentIds: freezeArray(prepared.runs.map((run) => run.experimentId!)),\n evalIds: freezeArray(uniqueEvalIds),\n pluginAudit: Object.freeze({ occurrences: freezeArray(occurrenceAudits.values()) }),\n ...(preview === undefined ? {} : { dry: preview }),\n });\n }));\n}\nfunction multiplexFeedbackSink(feedback: FeedbackSink | undefined, session: SessionTracker | undefined, isFeedbackStarted: () => boolean): FeedbackSink {\n const forward = <A extends unknown[]>(method: (sink: FeedbackSink, ...args: A) => void, ...args: A): void => {\n if (!isFeedbackStarted() || feedback === undefined)\n return;\n method(feedback, ...args);\n };\n return {\n activity: (detail) => forward((sink, value) => sink.activity(value), detail),\n diagnostic: (input) => forward((sink, value) => sink.diagnostic(value), input),\n interrupted: () => forward((sink) => sink.interrupted()),\n reporterError: (input) => forward((sink, value) => sink.reporterError(value), input),\n failure: (input) => forward((sink, value) => sink.failure(value), input),\n budgetExhausted: (input) => forward((sink, value) => sink.budgetExhausted(value), input),\n kept: (input) => forward((sink, value) => sink.kept(value), input),\n experimentHook: (input) => {\n session?.onInvocationEvent({ type: \"experiment-hook\", ...input });\n forward((sink, value) => sink.experimentHook(value), input);\n },\n precheck: (input) => forward((sink, value) => sink.precheck(value), input),\n lockWait: (input) => {\n session?.onInvocationEvent({ type: \"lock-wait\", ...input });\n forward((sink, value) => sink.lockWait(value), input);\n },\n runActivity: (input) => forward((sink, value) => sink.runActivity(value), input),\n experimentProgress: (input) => forward((sink, value) => sink.experimentProgress(value), input),\n lifecycle: (event) => {\n if (event.type === \"attempt:queued\" ||\n event.type === \"attempt:start\" ||\n event.type === \"attempt:complete\" ||\n event.type === \"attempt:early-exit\") {\n session?.onInvocationEvent(event);\n }\n forward((sink, value) => sink.lifecycle(value), event);\n },\n };\n}\nfunction summaryOf(summary: InvocationSummary): ExperimentHostInvocationSummary {\n return Object.freeze({\n total: summary.passed + summary.failed + summary.skipped + summary.errored,\n passed: summary.passed,\n failed: summary.failed,\n skipped: summary.skipped,\n errored: summary.errored,\n durationMs: summary.durationMs,\n ...(summary.usage?.inputTokens === undefined ? {} : { inputTokens: summary.usage.inputTokens }),\n ...(summary.usage?.outputTokens === undefined ? {} : { outputTokens: summary.usage.outputTokens }),\n ...(summary.estimatedCostUSD === undefined ? {} : { estimatedCostUSD: summary.estimatedCostUSD }),\n setupPrefixes: summary.setupPrefixes,\n });\n}\nexport function runInvocation(input: ExperimentHostInvocationRunRequest): Effect.Effect<ExperimentHostInvocationResult, ExperimentHostError, ExperimentHostRequirements> {\n return Effect.scoped(closeOperation(\"invocation-run\", Effect.gen(function* () {\n const state = invocationPlans.get(input.plan as object);\n if (state === undefined || state.consumed) {\n return yield* Effect.fail(new Error(\"Experiment Host invocation plan is forged, copied, or already consumed.\"));\n }\n state.consumed = true;\n let completedSummary: InvocationSummary | undefined;\n const reporters = [\n ...(input.junitPath === undefined ? [] : [{\n reporter: JUnit(input.junitPath),\n name: \"junit\",\n required: true,\n target: input.junitPath,\n }]),\n ...(state.config.reporters ?? []).map((reporter, index) => ({\n reporter,\n name: `config-reporter-${index}`,\n required: false,\n })),\n {\n name: \"experiment-host-summary\",\n required: false,\n reporter: { onInvocationComplete(summary: InvocationSummary) { completedSummary = summary; } },\n },\n ];\n // Session indexing is a Host-owned, project-local observation. Runner only\n // receives the private tracker mechanism; this enclosing Scope closes its\n // heartbeat worker on success, typed failure, or interruption.\n const projectDatabaseRoot = recordRootPaths(state.recordRoot)?.portableRoot;\n if (projectDatabaseRoot === undefined)\n return yield* Effect.fail(new Error(\"Record root is unavailable.\"));\n const projectStateDatabase = yield* ProjectStateDatabase;\n const session = new SessionTracker(projectDatabaseRoot, projectStateDatabase);\n let sessionClosed = false;\n let feedbackStarted = false;\n let feedbackFinished = false;\n // Registered first so LIFO Scope closure runs every business finalizer\n // (including the session heartbeat stop and fenced terminal write) before\n // shutting down the sole operational worker and entering the one portable gate.\n // Portability is best-effort during Scope release: an already-corrupt or\n // unavailable database must not replace the Invocation's primary outcome.\n // The explicit service operation remains typed for callers that need to\n // diagnose a gate failure directly.\n yield* Effect.addFinalizer(() => projectStateDatabase.closeInvocationPortable(projectDatabaseRoot).pipe(Effect.ignore));\n yield* Effect.addFinalizer(() => sessionClosed\n ? Effect.void\n : session.close({ status: \"incomplete\" }).pipe(Effect.ignore));\n yield* Effect.addFinalizer(() => !feedbackStarted || feedbackFinished || input.feedback === undefined\n ? Effect.void\n : Effect.tryPromise({\n try: () => input.feedback!.coordinator.stopDynamic(),\n catch: () => undefined,\n }).pipe(Effect.ignore));\n const feedback = input.feedback?.coordinator;\n const sink = multiplexFeedbackSink(feedback, session, () => feedbackStarted);\n const receipt = yield* Effect.acquireUseRelease(Effect.sync(() => activateFeedbackSink(sink)), () => runEvals({\n config: state.config,\n evals: state.evals,\n agentRuns: state.runs,\n reporters,\n maxConcurrency: state.shape.maxConcurrency,\n maxBuildConcurrency: state.shape.maxBuildConcurrency,\n maxSetupPrefixConcurrency: state.shape.maxSetupPrefixConcurrency,\n coordinationRoot: state.coordinationRoot,\n recordRoot: state.recordRoot,\n ...(state.overrides.keepSandbox === undefined ? {} : { keepSandbox: state.overrides.keepSandbox }),\n ...(state.overrides.rerun === undefined ? {} : { rerun: state.overrides.rerun }),\n session,\n ...(input.signal === undefined ? {} : { signal: input.signal }),\n onCurrentRecordReusePlan: (current) => Effect.sync(() => {\n if (feedback === undefined)\n return;\n feedback.start({\n shape: Object.freeze({\n evals: state.shape.evals,\n configs: state.shape.configurations,\n totalAttempts: state.shape.totalAttempts,\n maxConcurrency: state.shape.maxConcurrency,\n runIds: current.runIds,\n }),\n ...(Object.keys(state.shape.experimentConcurrency).length === 0\n ? {}\n : { experimentConcurrency: state.shape.experimentConcurrency }),\n reused: current.reused,\n ...(current.reusedFailures.length === 0\n ? {}\n : { reusedFailures: current.reusedFailures }),\n });\n feedbackStarted = true;\n }),\n }), (deactivate) => Effect.sync(deactivate));\n const summary = completedSummary;\n if (summary === undefined) {\n return yield* Effect.fail(new Error(\"Runner completed without an invocation summary.\"));\n }\n if (feedback !== undefined && !feedbackStarted) {\n return yield* Effect.fail(new Error(\"Runner completed without starting Experiment feedback.\"));\n }\n const completion = feedback === undefined\n ? undefined\n : assembleInvocationCompletion(feedback.state);\n yield* session.close({\n status: completion?.status ?? (receipt.completion === \"completed\"\n ? \"complete\"\n : receipt.completion === \"interrupted\"\n ? \"interrupted\"\n : \"incomplete\"),\n ...(completion === undefined ? {} : { completion }),\n receipt,\n ...(receipt.completedAt === undefined ? {} : { completedAt: receipt.completedAt }),\n });\n sessionClosed = true;\n if (feedback !== undefined && completion !== undefined) {\n yield* Effect.tryPromise({\n try: () => feedback.finish({ summary, completion, receipt }),\n catch: (cause) => cause,\n });\n feedbackFinished = true;\n }\n const foldedStats = completion === undefined ? undefined : foldInvocationEvalStats(summary);\n return Object.freeze({\n status: \"finished\" as const,\n receipt: Object.freeze({\n invocationId: receipt.invocationId,\n createdRunIds: freezeArray(receipt.createdRunIds),\n publicationCutoff: receipt.publicationCutoff,\n startedAt: receipt.startedAt,\n ...(receipt.completedAt === undefined ? {} : { completedAt: receipt.completedAt }),\n completion: receipt.completion,\n }),\n summary: summaryOf(summary),\n ...(completion === undefined ? {} : {\n completion,\n exitCode: computeExitCode({\n ...summary,\n failed: foldedStats!.failed,\n errored: foldedStats!.errored,\n }, completion),\n }),\n });\n })));\n}\nexport function planRename(input: ExperimentHostRenameRequest): Effect.Effect<ExperimentHostRenamePlan, ExperimentHostError, ExperimentHostRequirements> {\n return closeOperation(\"rename-plan\", planExperimentRename(input));\n}\nexport function applyRename(input: ExperimentHostRenameRequest): Effect.Effect<ExperimentHostRenameResult, ExperimentHostError, ExperimentHostRequirements> {\n return closeOperation(\"rename-apply\", Effect.gen(function* () {\n const outcome = yield* Effect.result(renameExperiment(input));\n if (Result.isFailure(outcome)) {\n if (!(outcome.failure instanceof ExperimentRenameError))\n return yield* Effect.fail(outcome.failure);\n const plan = outcome.failure.plan;\n return Object.freeze({ status: \"rejected\" as const, sourceRunId: plan.sourceRunId,\n oldId: plan.oldId, newId: plan.newId, reason: plan.blocked!.reason, detail: plan.blocked!.detail });\n }\n const done = outcome.success;\n return Object.freeze({ status: \"done\" as const, invocationId: done.invocationId,\n runId: done.runId, sourceRunId: done.sourceRunId, oldId: done.oldId, newId: done.newId,\n migrated: freezeArray(done.migrated.map(({ renamedFrom: _, ...entry }) => Object.freeze(entry))),\n });\n }));\n}\nexport function accept(input: ExperimentHostAcceptRequest): Effect.Effect<readonly ExperimentHostAcceptedAttempt[], ExperimentHostError, ExperimentHostRequirements> {\n return closeOperation(\"accept\", acceptLocators({ ...input, recordRoot: undefined }).pipe(Effect.map((receipts) => freezeArray(receipts.map((receipt) => Object.freeze({\n invocationId: receipt.invocationId,\n runId: receipt.runId,\n slotId: receipt.slotId,\n locator: receipt.locator,\n sourceLocator: receipt.sourceLocator,\n fingerprint: receipt.fingerprint,\n }))))));\n}\nexport function planRunAccept(input: ExperimentHostAcceptRunRequest): Effect.Effect<ExperimentHostAcceptRunPlan, ExperimentHostError, ExperimentHostRequirements> {\n return closeOperation(\"accept\", planAcceptRun({ ...input, recordRoot: undefined }).pipe(Effect.map((plan) => Object.freeze({\n sourceRunId: plan.sourceRunId,\n members: freezeArray(plan.members.map((member) => Object.freeze({\n locator: member.locator,\n experimentId: member.experimentId,\n evalId: member.evalId,\n attempt: member.attempt,\n fingerprint: member.fingerprint,\n }))),\n }))));\n}\nexport function applyRunAccept(input: ExperimentHostAcceptRunRequest): Effect.Effect<readonly ExperimentHostAcceptedAttempt[], ExperimentHostError, ExperimentHostRequirements> {\n return closeOperation(\"accept\", acceptRun({ ...input, recordRoot: undefined }).pipe(Effect.map((receipts) => freezeArray(receipts.map((receipt) => Object.freeze({\n invocationId: receipt.invocationId,\n runId: receipt.runId,\n slotId: receipt.slotId,\n locator: receipt.locator,\n sourceLocator: receipt.sourceLocator,\n fingerprint: receipt.fingerprint,\n }))))));\n}\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["operations.ts"],"names":[],"mappings":";;AAmQA,0BAYC;AAqCD,kCA4CC;AACD,sBAaC;AAED,oDAKC;AACD,oDAEC;AAsED,wCAwHC;AAmDD,sCA8IC;AACD,gCAEC;AACD,kCAgBC;AACD,wBASC;AACD,sCAWC;AACD,wCASC;AA1yBD,yCAAoC;AACpC,mCAAqD;AAErD,2DAAiG;AACjG,6FAAqF;AACrF,sDAAkF;AAClF,2DAAwF;AACxF,2DAAgE;AAChE,0DAA8E;AAC9E,2DAAiG;AACjG,sEAA+F;AAC/F,gEAAgE;AAChE,sDAAkG;AAClG,sEAA6E;AAE7E,gDAA+C;AAC/C,kDAA0D;AAC1D,4DAAuD;AACvD,wDAAqF;AACrF,4EAA8G;AAC9G,wDAA4D;AAC5D,4EAAmH;AACnH,o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,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;QAC/H,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,WAAW,EAAE,OAAO,CAAC,WAAW;KACnC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACZ,CAAC","sourcesContent":["import type { ExperimentHostRequirements } from \"./requirements.ts\";\nimport { resolve } from \"node:path\";\nimport { Clock, Data, Effect, Result } from \"effect\";\nimport { recordHost } from \"../../record/host/index.ts\";\nimport { makeRecordRoot, recordRootPaths, type RecordRoot } from \"../../record/platform/root.ts\";\nimport { ProjectStateDatabase } from \"../../record/sqlite/project-state-database.ts\";\nimport { acceptLocators, acceptRun, planAcceptRun } from \"../../runner/accept.ts\";\nimport { activateFeedbackSink, type FeedbackSink } from \"../../runner/feedback/sink.ts\";\nimport { computeExitCode } from \"../../runner/feedback/json.ts\";\nimport { discoverEvals, discoverExperiments } from \"../../runner/discover.ts\";\nimport { acquireFreshImportGeneration, type FreshImportGeneration } from \"../../fresh-import.ts\";\nimport { resolveExperimentEvals, splitByEvaluationKind } from \"../../runner/eval-selection.ts\";\nimport { planProjectTarget } from \"../../runner/fingerprint.ts\";\nimport { prepareRunnerRecordReuse, withRunnerCurrentReusePreview, } from \"../../runner/record.ts\";\nimport { projectCurrentReuseReadback } from \"../../runner/reuse-readback.ts\";\nimport type { ExecutionReusePlanSlot } from \"../../runner/reuse-plan.ts\";\nimport { runEvals } from \"../../runner/run.ts\";\nimport { readCaseLockEffect } from \"../../runner/lock.ts\";\nimport { JUnit } from \"../../runner/reporters/json.ts\";\nimport { listSessions, showSession, SessionTracker, } from \"../../runner/session.ts\";\nimport { linkRunSandboxes, recommendedConcurrencyForPreparedPairs, } from \"../../runner/sandbox-selection.ts\";\nimport { resolveRunTimeout } from \"../../runner/timeout.ts\";\nimport { ExperimentRenameError, planExperimentRename, renameExperiment, } from \"../../runner/rename-experiment.ts\";\nimport { resolveSandboxSetupCache, type AgentRun, type DiscoveredEval, type DiscoveredExperiment, type InvocationSummary, type SandboxSetupCache, } from \"../../runner/types.ts\";\nimport { evalPrefixPredicate, matchExperimentSelector } from \"../../shared/aggregate.ts\";\nimport { ExperimentHostError } from \"./types.ts\";\nimport { assembleInvocationCompletion, foldInvocationEvalStats } from \"./presentation.ts\";\nimport { firstLine, formatThrown } from \"../../util.ts\";\nimport type { ExperimentHostAcceptRequest, ExperimentHostAcceptRunPlan, ExperimentHostAcceptRunRequest, ExperimentHostAcceptedAttempt, ExperimentHostCatalog, ExperimentHostCheckRequest, ExperimentHostCheckResult, ExperimentHostDryComparison, ExperimentHostDryPlan, ExperimentHostDrySlot, ExperimentHostOperation, ExperimentHostExperimentSummary, ExperimentHostInvocationPlan, ExperimentHostInvocationPlanRequest, ExperimentHostInvocationPlanResult, ExperimentHostInvocationResult, ExperimentHostInvocationRunRequest, ExperimentHostInvocationShape, ExperimentHostInvocationSummary, ExperimentHostJsonValue, ExperimentHostInvocationStatusList, ExperimentHostInvocationStatusListRequest, ExperimentHostInvocationStatusShow, ExperimentHostInvocationStatusShowRequest, ExperimentHostRenamePlan, ExperimentHostRenameRequest, ExperimentHostRenameResult, ExperimentHostRunOverrides, ExperimentHostSelectionInput, ExperimentHostSelectionProblem, } from \"./types.ts\";\nfunction operationError(operation: ExperimentHostOperation, cause: unknown): ExperimentHostError {\n if (cause instanceof ExperimentHostError)\n return cause;\n const code = typeof cause === \"object\" && cause !== null && typeof Reflect.get(cause, \"code\") === \"string\"\n ? String(Reflect.get(cause, \"code\"))\n : \"experiment-host-operation-failed\";\n return new ExperimentHostError({\n operation,\n code,\n message: closedFailureMessage(cause),\n cause,\n });\n}\n/** Preserve one actionable message while closing private Runner error shapes. */\nfunction closedFailureMessage(cause: unknown): string {\n const diagnostic = closedRecordDiagnostic(cause);\n if (diagnostic !== undefined)\n return JSON.stringify(diagnostic);\n if (cause instanceof Error && cause.message.length > 0)\n return cause.message;\n if (typeof cause === \"object\" && cause !== null) {\n const direct = Reflect.get(cause, \"message\");\n if (typeof direct === \"string\" && direct.length > 0)\n return direct;\n const issue = Reflect.get(cause, \"issue\");\n if (typeof issue === \"object\" && issue !== null) {\n const nested = Reflect.get(issue, \"message\");\n if (typeof nested === \"string\" && nested.length > 0)\n return nested;\n }\n }\n return firstLine(formatThrown(cause));\n}\nfunction closedRecordDiagnostic(cause: unknown): unknown | undefined {\n if (typeof cause !== \"object\" || cause === null)\n return undefined;\n const code = Reflect.get(cause, \"code\");\n if (code === \"runner-record-attempt-publication-failed\") {\n const locator = Reflect.get(cause, \"locator\");\n const rawCause = Reflect.get(cause, \"cause\");\n const nested = closedRecordDiagnostic(rawCause) ?? closedDiagnosticMessage(rawCause);\n return Object.freeze({\n code,\n ...(typeof locator === \"string\" ? { locator } : {}),\n ...(nested === undefined ? {} : { cause: nested }),\n });\n }\n if (code !== \"record-attachment-encode-error\")\n return undefined;\n const family = Reflect.get(cause, \"family\");\n const issues = Reflect.get(cause, \"issues\");\n const schemaIssues = Reflect.get(cause, \"schemaIssues\");\n return Object.freeze({\n code,\n ...(typeof family === \"string\" ? { family } : {}),\n issues: closedDiagnosticIssues(issues, false),\n schemaIssues: closedDiagnosticIssues(schemaIssues, true),\n });\n}\nfunction closedDiagnosticMessage(cause: unknown): Readonly<{\n message: string;\n}> | undefined {\n const message = cause instanceof Error\n ? cause.message\n : typeof cause === \"object\" && cause !== null && typeof Reflect.get(cause, \"message\") === \"string\"\n ? String(Reflect.get(cause, \"message\"))\n : undefined;\n return message === undefined || message.length === 0\n ? undefined\n : Object.freeze({ message });\n}\nfunction closedDiagnosticIssues(value: unknown, includeMessage: boolean): readonly unknown[] {\n if (!Array.isArray(value))\n return Object.freeze([]);\n return Object.freeze(value.flatMap((entry) => {\n if (typeof entry !== \"object\" || entry === null)\n return [];\n const path = Reflect.get(entry, \"path\");\n const code = Reflect.get(entry, \"code\");\n const message = Reflect.get(entry, \"message\");\n return [Object.freeze({\n ...(typeof code === \"string\" ? { code } : {}),\n path: Array.isArray(path)\n ? Object.freeze(path.filter((segment): segment is string | number => typeof segment === \"string\" || typeof segment === \"number\"))\n : Object.freeze([]),\n ...(includeMessage && typeof message === \"string\" ? { message } : {}),\n })];\n }));\n}\nfunction closeOperation<A, E, R>(operation: ExperimentHostOperation, effect: Effect.Effect<A, E, R>): Effect.Effect<A, ExperimentHostError, R> {\n return effect.pipe(Effect.mapError((cause) => operationError(operation, cause)));\n}\ninterface ClosedSelection {\n readonly evals: readonly DiscoveredEval[];\n readonly experimentIds: readonly string[];\n readonly selections: readonly {\n readonly experiment: DiscoveredExperiment;\n readonly selectedEvalIds: readonly string[];\n readonly selectorEvalIds: readonly string[];\n }[];\n}\ninterface PreparedInvocationState {\n readonly evals: readonly DiscoveredEval[];\n readonly runs: readonly AgentRun[];\n readonly config: ExperimentHostInvocationPlanRequest[\"config\"];\n readonly recordRoot: RecordRoot;\n readonly coordinationRoot: string;\n readonly overrides: ExperimentHostRunOverrides;\n readonly shape: ExperimentHostInvocationShape;\n consumed: boolean;\n}\nclass ExperimentEvaluationKindAdmissionError extends Data.TaggedError(\"ExperimentEvaluationKindAdmissionError\")<{\n readonly code: \"experiment-evaluation-kind-mixed\";\n readonly message: string;\n readonly issues: readonly {\n readonly experimentId: string;\n readonly passEvalIds: readonly string[];\n readonly scoreEvalIds: readonly string[];\n }[];\n}> {\n}\ntype PreparedRuns = {\n readonly status: \"problem\";\n readonly selected: ClosedSelection;\n readonly problem: ExperimentHostSelectionProblem;\n} | {\n readonly status: \"ready\";\n readonly selected: ClosedSelection;\n readonly runs: readonly AgentRun[];\n};\nconst invocationPlans = new WeakMap<object, PreparedInvocationState>();\nfunction freezeArray<A>(values: Iterable<A>): readonly A[] {\n return Object.freeze([...values]);\n}\nfunction selectionProblem(input: ExperimentHostSelectionInput, selected: ClosedSelection): ExperimentHostSelectionProblem | undefined {\n if (input.experimentIds !== undefined) {\n const missing = input.experimentIds.find((id) => !selected.experimentIds.includes(id));\n if (missing !== undefined) {\n return Object.freeze({\n status: \"experiment-no-match\" as const,\n selector: missing,\n candidates: freezeArray([...selected.experimentIds].sort()),\n });\n }\n }\n if (input.experimentSelector !== undefined && selected.selections.length === 0) {\n return Object.freeze({\n status: \"experiment-no-match\" as const,\n selector: input.experimentSelector,\n candidates: freezeArray([...selected.experimentIds].sort()),\n });\n }\n const selectorEvalIds = freezeArray(new Set(selected.selections.flatMap((entry) => entry.selectorEvalIds)));\n for (const selector of input.evalSelectors ?? []) {\n if (selectorEvalIds.some((id) => evalPrefixPredicate([selector])(id)))\n continue;\n return Object.freeze({\n status: \"eval-no-match\" as const,\n selector,\n experimentIds: freezeArray(selected.selections.map(({ experiment }) => experiment.id)),\n candidates: freezeArray([...selectorEvalIds].sort()),\n });\n }\n if (selected.selections.every((entry) => entry.selectedEvalIds.length === 0)) {\n return Object.freeze({\n status: \"empty-selection\" as const,\n experimentIds: freezeArray(selected.selections.map(({ experiment }) => experiment.id)),\n candidates: freezeArray([...selected.experimentIds].sort()),\n });\n }\n return undefined;\n}\nfunction closeSelection(input: ExperimentHostSelectionInput, options: {\n readonly freshImport?: boolean;\n} = {}): Effect.Effect<ClosedSelection, unknown> {\n const selectWith = (generation?: FreshImportGeneration) => Effect.gen(function* () {\n if (input.experimentIds !== undefined && (input.experimentIds.length === 0 || input.experimentSelector !== undefined)) {\n return yield* Effect.fail(new TypeError(\"experimentIds must be non-empty and cannot be combined with experimentSelector\"));\n }\n const discovered = yield* discoverEvals(input.cwd, { generation });\n const evals = input.tag === undefined\n ? discovered\n : discovered.filter((definition) => definition.tags?.includes(input.tag!));\n const experiments = yield* discoverExperiments(input.cwd, { generation });\n const experimentIds = freezeArray(experiments.map((experiment) => experiment.id));\n const selectedIds = input.experimentIds !== undefined\n ? new Set(input.experimentIds)\n : input.experimentSelector === undefined\n ? undefined\n : new Set(matchExperimentSelector(experimentIds, input.experimentSelector));\n const selections = experiments\n .filter((experiment) => selectedIds === undefined || selectedIds.has(experiment.id))\n .map((experiment) => {\n const selection = resolveExperimentEvals({\n experimentId: experiment.id,\n selector: experiment.evals,\n cliPatterns: input.evalSelectors ?? [],\n evals,\n });\n return Object.freeze({\n experiment,\n selectedEvalIds: freezeArray(selection.selectedEvalIds),\n selectorEvalIds: freezeArray(selection.selectorEvals.map((definition) => definition.id)),\n });\n });\n return Object.freeze({\n evals: freezeArray(evals),\n experimentIds,\n selections: freezeArray(selections),\n });\n });\n return options.freshImport\n ? Effect.scoped(acquireFreshImportGeneration(input.cwd).pipe(Effect.flatMap(selectWith)))\n : selectWith();\n}\nfunction summaryOfExperiment(experiment: DiscoveredExperiment, evalIds: readonly string[]): ExperimentHostExperimentSummary {\n return Object.freeze({\n id: experiment.id,\n ...(experiment.description === undefined ? {} : { description: experiment.description }),\n adapter: experiment.adapter.name,\n ...(experiment.models === undefined ? {} : { models: experiment.models }),\n ...(experiment.model === undefined ? {} : { model: experiment.model }),\n attempts: experiment.attempts ?? 1,\n evalIds: freezeArray(evalIds),\n labels: Object.freeze({ ...(experiment.labels ?? {}) }),\n hasSetup: typeof experiment.setup === \"function\",\n hasTeardown: typeof experiment.teardown === \"function\",\n ...(experiment.sharedState === undefined ? {} : { sharedStateKey: experiment.sharedState.key }),\n });\n}\nexport function catalog(input: ExperimentHostSelectionInput): Effect.Effect<ExperimentHostCatalog, ExperimentHostError> {\n return closeOperation(\"catalog\", closeSelection(input).pipe(Effect.map((selected) => Object.freeze({\n status: \"listed\" as const,\n evals: freezeArray(selected.evals.map((definition) => Object.freeze({\n id: definition.id,\n ...(definition.description === undefined ? {} : { description: definition.description }),\n tags: freezeArray(definition.tags ?? []),\n evaluationKind: definition.evaluationKind,\n }))),\n experimentIds: selected.experimentIds,\n experiments: freezeArray(selected.selections.map(({ experiment, selectedEvalIds }) => summaryOfExperiment(experiment, selectedEvalIds))),\n }))));\n}\nfunction agentRunFromExperiment(experiment: DiscoveredExperiment, selectedEvalIds: readonly string[], config: ExperimentHostInvocationPlanRequest[\"config\"], overrides: ExperimentHostRunOverrides, sandboxSetupCacheOverride: SandboxSetupCache | undefined): AgentRun {\n return Object.freeze({\n adapter: experiment.adapter,\n ...(experiment.agent === undefined ? {} : { agent: experiment.agent }),\n ...(experiment.models === undefined ? {} : { models: experiment.models }),\n model: experiment.model,\n reasoningEffort: experiment.reasoningEffort,\n flags: experiment.flags ?? {},\n plugins: experiment.plugins,\n attempts: overrides.attempts ?? experiment.attempts ?? 1,\n earlyExit: overrides.earlyExit ?? experiment.earlyExit ?? false,\n sandboxSetupCache: resolveSandboxSetupCache(sandboxSetupCacheOverride, experiment.sandboxCache, config.sandboxCache),\n sandbox: experiment.sandbox,\n sandboxReuse: experiment.sandboxReuse,\n ...(experiment.sharedState === undefined ? {} : { sharedState: experiment.sharedState }),\n judgeRuntime: experiment.judgeRuntime,\n ...resolveRunTimeout(overrides.timeoutMs, experiment.timeoutMs),\n budget: overrides.budget ?? experiment.budget,\n selectedEvalIds: freezeArray(selectedEvalIds),\n experimentId: experiment.id,\n experimentBaseDir: experiment.baseDir,\n experimentSourcePath: experiment.sourcePath,\n description: experiment.description,\n labels: experiment.labels,\n maxConcurrency: experiment.maxConcurrency,\n setup: experiment.setup,\n teardown: experiment.teardown,\n classifyFailure: experiment.classifyFailure,\n });\n}\nfunction sandboxSetupCacheOverrideOf(overrides: ExperimentHostRunOverrides): SandboxSetupCache | undefined {\n const value: unknown = Reflect.get(overrides, \"sandboxSetupCache\");\n if (value === undefined || value === \"use\" || value === \"bypass\")\n return value;\n throw new TypeError(\"sandboxSetupCache override must be \\\"use\\\" or \\\"bypass\\\".\");\n}\nexport function prepareRuns(input: ExperimentHostSelectionInput & {\n readonly config: ExperimentHostInvocationPlanRequest[\"config\"];\n readonly overrides?: ExperimentHostRunOverrides;\n}, options: {\n readonly allowEmptySelection?: boolean;\n readonly freshImport?: boolean;\n} = {}): Effect.Effect<PreparedRuns, unknown> {\n return closeSelection(input, options).pipe(Effect.flatMap((selected): Effect.Effect<PreparedRuns, ExperimentEvaluationKindAdmissionError> => {\n const problem = selectionProblem(input, selected);\n if (problem !== undefined && !(options.allowEmptySelection === true && problem.status === \"empty-selection\")) {\n return Effect.succeed({ status: \"problem\", selected, problem } as const);\n }\n const evalsById = new Map(selected.evals.map((definition) => [definition.id, definition]));\n const issues = selected.selections.flatMap(({ experiment, selectedEvalIds }) => {\n const evaluationKinds = splitByEvaluationKind(selectedEvalIds.flatMap((id) => {\n const definition = evalsById.get(id);\n return definition === undefined ? [] : [definition];\n }));\n return evaluationKinds.pass.length === 0 || evaluationKinds.score.length === 0\n ? []\n : [{\n experimentId: experiment.id,\n passEvalIds: Object.freeze([...evaluationKinds.pass]),\n scoreEvalIds: Object.freeze([...evaluationKinds.score]),\n }];\n });\n if (issues.length > 0) {\n return Effect.fail(new ExperimentEvaluationKindAdmissionError({\n code: \"experiment-evaluation-kind-mixed\",\n message: issues.map((issue) => `Experiment ${JSON.stringify(issue.experimentId)} selects both pass and score Evals. ` +\n `pass (${issue.passEvalIds.length}): ${issue.passEvalIds.join(\", \")}; ` +\n `score (${issue.scoreEvalIds.length}): ${issue.scoreEvalIds.join(\", \")}. ` +\n \"Split the Experiment into one pass Experiment and one score Experiment, or narrow its Eval selection.\").join(\"\\n\"),\n issues: Object.freeze(issues.map((issue) => Object.freeze(issue))),\n }));\n }\n const overrides = input.overrides ?? {};\n const sandboxSetupCacheOverride = sandboxSetupCacheOverrideOf(overrides);\n return Effect.succeed({\n status: \"ready\",\n selected,\n runs: freezeArray(selected.selections.map(({ experiment, selectedEvalIds }) => agentRunFromExperiment(experiment, selectedEvalIds, input.config, overrides, sandboxSetupCacheOverride))),\n } as const);\n }));\n}\nexport function check(input: ExperimentHostCheckRequest): Effect.Effect<ExperimentHostCheckResult, ExperimentHostError> {\n return closeOperation(\"check\", Effect.gen(function* () {\n const prepared = yield* prepareRuns(input);\n if (prepared.status === \"problem\")\n return prepared.problem;\n const pairs = yield* linkRunSandboxes(prepared.selected.evals, prepared.runs);\n return Object.freeze({\n status: \"linked\" as const,\n experimentIds: freezeArray(prepared.runs.map((run) => run.experimentId!)),\n evalIds: freezeArray(new Set(prepared.runs.flatMap((run) => run.selectedEvalIds))),\n pairCount: pairs.length,\n });\n }));\n}\n/** Session data is intentionally presented as a closed, transient document. */\nexport function listInvocationStatus(input: ExperimentHostInvocationStatusListRequest): Effect.Effect<ExperimentHostInvocationStatusList, ExperimentHostError, ProjectStateDatabase> {\n return closeOperation(\"invocation-status-list\", listSessions(resolve(input.cwd, \".niceeval\"), {\n ...(input.all === true ? { all: true } : {}),\n ...(input.experimentSelector === undefined ? {} : { selector: input.experimentSelector }),\n }));\n}\nexport function showInvocationStatus(input: ExperimentHostInvocationStatusShowRequest): Effect.Effect<ExperimentHostInvocationStatusShow, ExperimentHostError, ProjectStateDatabase> {\n return closeOperation(\"invocation-status-show\", showSession(resolve(input.cwd, \".niceeval\"), input.invocationSelector));\n}\nfunction recordRoot(input: ExperimentHostInvocationPlanRequest) {\n // An ordinary Invocation is always anchored to its discovered project. A\n // Query/view source selection belongs to Inspection and can never be\n // promoted to the live writer through this request.\n return makeRecordRoot(resolve(input.cwd, \".niceeval\"));\n}\nfunction comparisonOf(slot: ExecutionReusePlanSlot): readonly ExperimentHostDryComparison[] {\n return freezeArray(slot.comparisons.map((comparison) => Object.freeze({ ...comparison })));\n}\nfunction jsonSnapshot(value: unknown): ExperimentHostJsonValue | undefined {\n try {\n return freezeJson(JSON.parse(JSON.stringify(value)) as ExperimentHostJsonValue);\n }\n catch {\n return undefined;\n }\n}\nfunction freezeJson(value: ExperimentHostJsonValue): ExperimentHostJsonValue {\n if (Array.isArray(value))\n return Object.freeze(value.map(freezeJson));\n if (typeof value === \"object\" && value !== null) {\n return Object.freeze(Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, freezeJson(entry)])));\n }\n return value;\n}\nfunction dryPlan(slots: readonly ExecutionReusePlanSlot[], readbacks: readonly ReturnType<typeof projectCurrentReuseReadback>[], lockedPairs: readonly string[], evalGroups: ReadonlyMap<string, {\n readonly id: string;\n readonly index: number;\n}>): ExperimentHostDryPlan {\n const projected: ExperimentHostDrySlot[] = slots.map((slot) => {\n const evalGroup = evalGroups.get(slot.evalId);\n const target = Object.freeze({\n runId: slot.runId,\n slotId: slot.slotId,\n experimentId: slot.experimentId,\n evalId: slot.evalId,\n executionIdentityDigest: slot.executionIdentityDigest,\n ...(evalGroup === undefined ? {} : { evalGroupId: evalGroup.id, evalGroupIndex: evalGroup.index }),\n attempt: slot.attempt,\n });\n if (slot.state === \"reuse\") {\n return Object.freeze({\n state: \"reuse\" as const,\n target,\n source: Object.freeze({\n attemptId: slot.source.attemptId,\n originRunId: slot.source.origin.runId,\n originSlotId: slot.source.origin.slotId,\n sourceRunId: slot.source.sourceBarrier.runId,\n }),\n comparisons: comparisonOf(slot),\n });\n }\n return Object.freeze({\n state: \"gap\" as const,\n target,\n reason: slot.reason,\n scope: slot.scope,\n issues: freezeArray(slot.issues.map((issue) => jsonSnapshot(issue) ?? Object.freeze({}))),\n comparisons: comparisonOf(slot),\n });\n });\n return Object.freeze({\n policy: Object.freeze({ name: \"project-target\" as const, version: 1 as const }),\n slots: freezeArray(projected),\n readbacks: freezeArray(readbacks),\n lockedPairs: freezeArray(lockedPairs),\n });\n}\nexport function planInvocation(input: ExperimentHostInvocationPlanRequest): Effect.Effect<ExperimentHostInvocationPlanResult, ExperimentHostError, ExperimentHostRequirements> {\n return closeOperation(\"invocation-plan\", Effect.gen(function* () {\n const prepared = yield* prepareRuns(input);\n if (prepared.status === \"problem\") {\n return Object.freeze({ ...prepared.problem });\n }\n const root = recordRoot(input);\n if (Result.isFailure(root))\n return yield* Effect.fail(root.failure);\n const config = Object.freeze({\n ...input.config,\n ...(input.config.reporters === undefined\n ? {}\n : { reporters: [...input.config.reporters] }),\n });\n const overrides = Object.freeze({ ...(input.overrides ?? {}) });\n const target = yield* planProjectTarget(prepared.selected.evals, prepared.runs, config.timeoutMs, {\n configJudge: config.judgeRuntime,\n ...(overrides.keepSandbox === undefined ? {} : { keepSandbox: overrides.keepSandbox }),\n });\n const maxConcurrency = overrides.maxConcurrency\n ?? config.maxConcurrency\n ?? recommendedConcurrencyForPreparedPairs([...target.preparedPairsByKey.values()]);\n const maxBuildConcurrency = overrides.maxBuildConcurrency\n ?? config.maxBuildConcurrency\n ?? 2;\n const maxSetupPrefixConcurrency = overrides.maxSetupPrefixConcurrency\n ?? config.maxSetupPrefixConcurrency\n ?? 2;\n if (!Number.isInteger(maxConcurrency) || maxConcurrency <= 0) {\n return yield* Effect.fail(new Error(`maxConcurrency must be a positive integer, got ${maxConcurrency}.`));\n }\n if (!Number.isInteger(maxBuildConcurrency) || maxBuildConcurrency <= 0) {\n return yield* Effect.fail(new Error(`maxBuildConcurrency must be a positive integer, got ${maxBuildConcurrency}.`));\n }\n if (!Number.isInteger(maxSetupPrefixConcurrency) || maxSetupPrefixConcurrency <= 0) {\n return yield* Effect.fail(new Error(`maxSetupPrefixConcurrency must be a positive integer, got ${maxSetupPrefixConcurrency}.`));\n }\n const uniqueEvalIds = new Set(prepared.runs.flatMap((run) => run.selectedEvalIds));\n const totalAttempts = prepared.runs.reduce((sum, run) => sum + run.selectedEvalIds.length * run.attempts, 0);\n const experimentConcurrency = Object.freeze(Object.fromEntries(prepared.runs.flatMap((run) => run.experimentId !== undefined && run.maxConcurrency !== undefined\n ? [[run.experimentId, run.maxConcurrency] as const]\n : [])));\n const shape: ExperimentHostInvocationShape = Object.freeze({\n experiments: prepared.runs.length,\n evals: uniqueEvalIds.size,\n configurations: prepared.runs.length,\n totalAttempts,\n attempts: Math.max(1, ...prepared.runs.map((run) => run.attempts)),\n maxConcurrency,\n maxBuildConcurrency,\n maxSetupPrefixConcurrency,\n experimentConcurrency,\n });\n const reuse = yield* prepareRunnerRecordReuse({\n evals: prepared.selected.evals,\n runs: prepared.runs,\n config: { timeoutMs: config.timeoutMs },\n plannedFingerprints: target.plannedFingerprints,\n renameFingerprintsByKey: target.renameFingerprintsByKey,\n plannedConfigHashes: target.plannedConfigHashes,\n ...(overrides.rerun === undefined ? {} : { rerun: overrides.rerun }),\n ...(overrides.keepSandbox === undefined ? {} : { keepSandbox: overrides.keepSandbox }),\n });\n const previewStartedAt = input.preview === true ? yield* Clock.currentTimeMillis : undefined;\n const preview = previewStartedAt !== undefined\n ? yield* Effect.scoped(withRunnerCurrentReusePreview({\n recordRoot: root.success,\n startedAt: previewStartedAt,\n evals: prepared.selected.evals,\n runs: prepared.runs,\n reuse,\n use: ({ reusePlan, readReadbacks }) => Effect.gen(function* () {\n const readbacks = yield* readReadbacks();\n const pairs = new Map(reusePlan.slots.map((slot) => [\n JSON.stringify([slot.experimentId, slot.evalId]),\n [slot.experimentId, slot.evalId] as const,\n ]));\n const projectDatabaseRoot = recordRootPaths(root.success)?.portableRoot;\n if (projectDatabaseRoot === undefined)\n return yield* Effect.fail(new Error(\"Record root is unavailable.\"));\n const locked = yield* Effect.all([...pairs].map(([key, [experimentId, evalId]]) => readCaseLockEffect(projectDatabaseRoot, experimentId, evalId).pipe(Effect.catch(() => Effect.succeed(undefined)), Effect.map((record) => record !== undefined ? key : undefined))), { concurrency: \"unbounded\" });\n return dryPlan(reusePlan.slots, readbacks.map(projectCurrentReuseReadback), locked.filter((key): key is string => key !== undefined), new Map(prepared.selected.evals.flatMap((definition) => definition.evalGroup === undefined\n ? []\n : [[definition.id, {\n id: definition.evalGroup.id,\n index: definition.evalGroup.evalIds.indexOf(definition.id),\n }] as const])));\n }),\n }))\n : undefined;\n const plan = Object.freeze({}) as ExperimentHostInvocationPlan;\n invocationPlans.set(plan, {\n evals: prepared.selected.evals,\n runs: prepared.runs,\n config,\n recordRoot: root.success,\n coordinationRoot: resolve(input.cwd, input.coordinationRoot ?? \".niceeval\"),\n overrides,\n shape,\n consumed: false,\n });\n const occurrenceAudits = new Map<string, ExperimentHostJsonValue>();\n for (const pair of target.preparedPairsByKey.values()) {\n for (const occurrence of pair.plugin.occurrences) {\n const audit = jsonSnapshot(occurrence.audit);\n if (audit !== undefined)\n occurrenceAudits.set(JSON.stringify(audit), audit);\n }\n }\n return Object.freeze({\n status: \"ready\" as const,\n plan,\n shape,\n experimentIds: freezeArray(prepared.runs.map((run) => run.experimentId!)),\n evalIds: freezeArray(uniqueEvalIds),\n pluginAudit: Object.freeze({ occurrences: freezeArray(occurrenceAudits.values()) }),\n ...(preview === undefined ? {} : { dry: preview }),\n });\n }));\n}\nfunction multiplexFeedbackSink(feedback: FeedbackSink | undefined, session: SessionTracker | undefined, isFeedbackStarted: () => boolean): FeedbackSink {\n const forward = <A extends unknown[]>(method: (sink: FeedbackSink, ...args: A) => void, ...args: A): void => {\n if (!isFeedbackStarted() || feedback === undefined)\n return;\n method(feedback, ...args);\n };\n return {\n activity: (detail) => forward((sink, value) => sink.activity(value), detail),\n diagnostic: (input) => forward((sink, value) => sink.diagnostic(value), input),\n interrupted: () => forward((sink) => sink.interrupted()),\n reporterError: (input) => forward((sink, value) => sink.reporterError(value), input),\n failure: (input) => forward((sink, value) => sink.failure(value), input),\n budgetExhausted: (input) => forward((sink, value) => sink.budgetExhausted(value), input),\n kept: (input) => forward((sink, value) => sink.kept(value), input),\n experimentHook: (input) => {\n session?.onInvocationEvent({ type: \"experiment-hook\", ...input });\n forward((sink, value) => sink.experimentHook(value), input);\n },\n precheck: (input) => forward((sink, value) => sink.precheck(value), input),\n lockWait: (input) => {\n session?.onInvocationEvent({ type: \"lock-wait\", ...input });\n forward((sink, value) => sink.lockWait(value), input);\n },\n runActivity: (input) => forward((sink, value) => sink.runActivity(value), input),\n experimentProgress: (input) => forward((sink, value) => sink.experimentProgress(value), input),\n lifecycle: (event) => {\n if (event.type === \"attempt:queued\" ||\n event.type === \"attempt:start\" ||\n event.type === \"attempt:complete\" ||\n event.type === \"attempt:early-exit\") {\n session?.onInvocationEvent(event);\n }\n forward((sink, value) => sink.lifecycle(value), event);\n },\n };\n}\nfunction summaryOf(summary: InvocationSummary): ExperimentHostInvocationSummary {\n return Object.freeze({\n total: summary.passed + summary.failed + summary.skipped + summary.errored,\n passed: summary.passed,\n failed: summary.failed,\n skipped: summary.skipped,\n errored: summary.errored,\n durationMs: summary.durationMs,\n ...(summary.usage?.inputTokens === undefined ? {} : { inputTokens: summary.usage.inputTokens }),\n ...(summary.usage?.outputTokens === undefined ? {} : { outputTokens: summary.usage.outputTokens }),\n ...(summary.estimatedCostUSD === undefined ? {} : { estimatedCostUSD: summary.estimatedCostUSD }),\n setupPrefixes: summary.setupPrefixes,\n });\n}\nexport function runInvocation(input: ExperimentHostInvocationRunRequest): Effect.Effect<ExperimentHostInvocationResult, ExperimentHostError, ExperimentHostRequirements> {\n return Effect.scoped(closeOperation(\"invocation-run\", Effect.gen(function* () {\n const state = invocationPlans.get(input.plan as object);\n if (state === undefined || state.consumed) {\n return yield* Effect.fail(new Error(\"Experiment Host invocation plan is forged, copied, or already consumed.\"));\n }\n state.consumed = true;\n let completedSummary: InvocationSummary | undefined;\n const reporters = [\n ...(input.junitPath === undefined ? [] : [{\n reporter: JUnit(input.junitPath),\n name: \"junit\",\n required: true,\n target: input.junitPath,\n }]),\n ...(state.config.reporters ?? []).map((reporter, index) => ({\n reporter,\n name: `config-reporter-${index}`,\n required: false,\n })),\n {\n name: \"experiment-host-summary\",\n required: false,\n reporter: { onInvocationComplete(summary: InvocationSummary) { completedSummary = summary; } },\n },\n ];\n // Session indexing is a Host-owned, project-local observation. Runner only\n // receives the private tracker mechanism; this enclosing Scope closes its\n // heartbeat worker on success, typed failure, or interruption.\n const projectDatabaseRoot = recordRootPaths(state.recordRoot)?.portableRoot;\n if (projectDatabaseRoot === undefined)\n return yield* Effect.fail(new Error(\"Record root is unavailable.\"));\n const projectStateDatabase = yield* ProjectStateDatabase;\n const session = new SessionTracker(projectDatabaseRoot, projectStateDatabase);\n let sessionClosed = false;\n let feedbackStarted = false;\n let feedbackFinished = false;\n // Registered first so LIFO Scope closure runs every business finalizer\n // (including the session heartbeat stop and fenced terminal write) before\n // shutting down the sole operational worker and entering the one portable gate.\n // Portability is best-effort during Scope release: an already-corrupt or\n // unavailable database must not replace the Invocation's primary outcome.\n // The explicit service operation remains typed for callers that need to\n // diagnose a gate failure directly.\n yield* Effect.addFinalizer(() => projectStateDatabase.closeInvocationPortable(projectDatabaseRoot).pipe(Effect.ignore));\n yield* Effect.addFinalizer(() => sessionClosed\n ? Effect.void\n : session.close({ status: \"incomplete\" }).pipe(Effect.ignore));\n yield* Effect.addFinalizer(() => !feedbackStarted || feedbackFinished || input.feedback === undefined\n ? Effect.void\n : Effect.tryPromise({\n try: () => input.feedback!.coordinator.stopDynamic(),\n catch: () => undefined,\n }).pipe(Effect.ignore));\n const feedback = input.feedback?.coordinator;\n const sink = multiplexFeedbackSink(feedback, session, () => feedbackStarted);\n const receipt = yield* Effect.acquireUseRelease(Effect.sync(() => activateFeedbackSink(sink)), () => runEvals({\n config: state.config,\n evals: state.evals,\n agentRuns: state.runs,\n reporters,\n maxConcurrency: state.shape.maxConcurrency,\n maxBuildConcurrency: state.shape.maxBuildConcurrency,\n maxSetupPrefixConcurrency: state.shape.maxSetupPrefixConcurrency,\n coordinationRoot: state.coordinationRoot,\n recordRoot: state.recordRoot,\n ...(state.overrides.keepSandbox === undefined ? {} : { keepSandbox: state.overrides.keepSandbox }),\n ...(state.overrides.rerun === undefined ? {} : { rerun: state.overrides.rerun }),\n session,\n ...(input.signal === undefined ? {} : { signal: input.signal }),\n onCurrentRecordReusePlan: (current) => Effect.sync(() => {\n if (feedback === undefined)\n return;\n feedback.start({\n shape: Object.freeze({\n evals: state.shape.evals,\n configs: state.shape.configurations,\n totalAttempts: state.shape.totalAttempts,\n maxConcurrency: state.shape.maxConcurrency,\n runIds: current.runIds,\n }),\n ...(Object.keys(state.shape.experimentConcurrency).length === 0\n ? {}\n : { experimentConcurrency: state.shape.experimentConcurrency }),\n reused: current.reused,\n ...(current.reusedFailures.length === 0\n ? {}\n : { reusedFailures: current.reusedFailures }),\n });\n feedbackStarted = true;\n }),\n }), (deactivate) => Effect.sync(deactivate));\n const summary = completedSummary;\n if (summary === undefined) {\n return yield* Effect.fail(new Error(\"Runner completed without an invocation summary.\"));\n }\n if (feedback !== undefined && !feedbackStarted) {\n return yield* Effect.fail(new Error(\"Runner completed without starting Experiment feedback.\"));\n }\n const completion = feedback === undefined\n ? undefined\n : assembleInvocationCompletion(feedback.state);\n yield* session.close({\n status: completion?.status ?? (receipt.completion === \"completed\"\n ? \"complete\"\n : receipt.completion === \"interrupted\"\n ? \"interrupted\"\n : \"incomplete\"),\n ...(completion === undefined ? {} : { completion }),\n receipt,\n ...(receipt.completedAt === undefined ? {} : { completedAt: receipt.completedAt }),\n });\n sessionClosed = true;\n if (feedback !== undefined && completion !== undefined) {\n yield* Effect.tryPromise({\n try: () => feedback.finish({ summary, completion, receipt }),\n catch: (cause) => cause,\n });\n feedbackFinished = true;\n }\n const foldedStats = completion === undefined ? undefined : foldInvocationEvalStats(summary);\n return Object.freeze({\n status: \"finished\" as const,\n receipt: Object.freeze({\n invocationId: receipt.invocationId,\n createdRunIds: freezeArray(receipt.createdRunIds),\n publicationCutoff: receipt.publicationCutoff,\n startedAt: receipt.startedAt,\n ...(receipt.completedAt === undefined ? {} : { completedAt: receipt.completedAt }),\n completion: receipt.completion,\n }),\n summary: summaryOf(summary),\n ...(completion === undefined ? {} : {\n completion,\n exitCode: computeExitCode({\n ...summary,\n failed: foldedStats!.failed,\n errored: foldedStats!.errored,\n }, completion),\n }),\n });\n })));\n}\nexport function planRename(input: ExperimentHostRenameRequest): Effect.Effect<ExperimentHostRenamePlan, ExperimentHostError, ExperimentHostRequirements> {\n return closeOperation(\"rename-plan\", planExperimentRename(input));\n}\nexport function applyRename(input: ExperimentHostRenameRequest): Effect.Effect<ExperimentHostRenameResult, ExperimentHostError, ExperimentHostRequirements> {\n return closeOperation(\"rename-apply\", Effect.gen(function* () {\n const outcome = yield* Effect.result(renameExperiment(input));\n if (Result.isFailure(outcome)) {\n if (!(outcome.failure instanceof ExperimentRenameError))\n return yield* Effect.fail(outcome.failure);\n const plan = outcome.failure.plan;\n return Object.freeze({ status: \"rejected\" as const, sourceRunId: plan.sourceRunId,\n oldId: plan.oldId, newId: plan.newId, reason: plan.blocked!.reason, detail: plan.blocked!.detail });\n }\n const done = outcome.success;\n return Object.freeze({ status: \"done\" as const, invocationId: done.invocationId,\n runId: done.runId, sourceRunId: done.sourceRunId, oldId: done.oldId, newId: done.newId,\n migrated: freezeArray(done.migrated.map(({ renamedFrom: _, ...entry }) => Object.freeze(entry))),\n });\n }));\n}\nexport function accept(input: ExperimentHostAcceptRequest): Effect.Effect<readonly ExperimentHostAcceptedAttempt[], ExperimentHostError, ExperimentHostRequirements> {\n return closeOperation(\"accept\", acceptLocators(input).pipe(Effect.map((receipts) => freezeArray(receipts.map((receipt) => Object.freeze({\n invocationId: receipt.invocationId,\n runId: receipt.runId,\n slotId: receipt.slotId,\n locator: receipt.locator,\n sourceLocator: receipt.sourceLocator,\n fingerprint: receipt.fingerprint,\n }))))));\n}\nexport function planRunAccept(input: ExperimentHostAcceptRunRequest): Effect.Effect<ExperimentHostAcceptRunPlan, ExperimentHostError, ExperimentHostRequirements> {\n return closeOperation(\"accept\", planAcceptRun(input).pipe(Effect.map((plan) => Object.freeze({\n sourceRunId: plan.sourceRunId,\n members: freezeArray(plan.members.map((member) => Object.freeze({\n locator: member.locator,\n experimentId: member.experimentId,\n evalId: member.evalId,\n attempt: member.attempt,\n fingerprint: member.fingerprint,\n }))),\n }))));\n}\nexport function applyRunAccept(input: ExperimentHostAcceptRunRequest): Effect.Effect<readonly ExperimentHostAcceptedAttempt[], ExperimentHostError, ExperimentHostRequirements> {\n return closeOperation(\"accept\", acceptRun(input).pipe(Effect.map((receipts) => freezeArray(receipts.map((receipt) => Object.freeze({\n invocationId: receipt.invocationId,\n runId: receipt.runId,\n slotId: receipt.slotId,\n locator: receipt.locator,\n sourceLocator: receipt.sourceLocator,\n fingerprint: receipt.fingerprint,\n }))))));\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":";;;AACA,mCAA2C;AAW3C,+EAA+E;AAC/E,MAAa,mBAAoB,SAAQ,aAAI,CAAC,WAAW,CAAC,qBAAqB,CAM7E;CACD;AAPD,kDAOC","sourcesContent":["import type { ResolvedModelSlots } from \"../../model-slots.ts\";\nimport { Data, type Effect } from \"effect\";\nimport type { Config } from \"../../types.ts\";\nimport type { FeedbackCoordinator } from \"../../runner/feedback/coordinator.ts\";\nimport type { InvocationCompletion } from \"../../runner/types.ts\";\nimport type { SessionListDocument, SessionShowDocument } from \"../../runner/session.ts\";\nimport type { CurrentReuseReadbackSnapshot } from \"../../runner/reuse-readback.ts\";\nimport type { SetupPrefixPreparationSummary } from \"../../runner/setup-prefix-preparation.ts\";\nexport type ExperimentHostJsonValue = null | boolean | number | string | readonly ExperimentHostJsonValue[] | {\n readonly [key: string]: ExperimentHostJsonValue;\n};\nexport type ExperimentHostOperation = \"catalog\" | \"check\" | \"debug\" | \"invocation-plan\" | \"invocation-run\" | \"rename-plan\" | \"rename-apply\" | \"accept\" | \"invocation-status-list\" | \"invocation-status-show\" | \"teardown-inspect\" | \"teardown-run\";\n/** Stable typed failure boundary; defects and interruption remain separate. */\nexport class ExperimentHostError extends Data.TaggedError(\"ExperimentHostError\")<{\n readonly operation: ExperimentHostOperation;\n readonly code: string;\n readonly message: string;\n /** Structured typed failure retained for application/CLI attribution. */\n readonly cause?: unknown;\n}> {\n}\n/** Inputs shared by discovery, link checking, and invocation planning. */\nexport interface ExperimentHostSelectionInput {\n readonly cwd: string;\n readonly experimentSelector?: string;\n /** Non-empty exact Experiment ID set; mutually exclusive with experimentSelector. */\n readonly experimentIds?: readonly string[];\n readonly evalSelectors?: readonly string[];\n readonly tag?: string;\n}\nexport interface ExperimentHostEvalSummary {\n readonly id: string;\n readonly description?: string;\n readonly tags: readonly string[];\n readonly evaluationKind: \"pass\" | \"score\";\n}\nexport interface ExperimentHostExperimentSummary {\n readonly models?: ResolvedModelSlots;\n readonly id: string;\n readonly description?: string;\n readonly adapter: string;\n readonly model?: string;\n readonly attempts: number;\n readonly evalIds: readonly string[];\n readonly labels: Readonly<Record<string, string | number>>;\n readonly hasSetup: boolean;\n readonly hasTeardown: boolean;\n readonly sharedStateKey?: string;\n}\nexport interface ExperimentHostCatalog {\n readonly status: \"listed\";\n readonly evals: readonly ExperimentHostEvalSummary[];\n readonly experimentIds: readonly string[];\n readonly experiments: readonly ExperimentHostExperimentSummary[];\n}\nexport type ExperimentHostSelectionProblem = {\n readonly status: \"experiment-no-match\";\n readonly selector: string;\n readonly candidates: readonly string[];\n} | {\n readonly status: \"eval-no-match\";\n readonly selector: string;\n readonly experimentIds: readonly string[];\n readonly candidates: readonly string[];\n} | {\n readonly status: \"empty-selection\";\n readonly experimentIds: readonly string[];\n readonly candidates: readonly string[];\n};\nexport interface ExperimentHostRunOverrides {\n readonly attempts?: number;\n readonly earlyExit?: boolean;\n readonly timeoutMs?: number;\n readonly budget?: number;\n readonly rerun?: \"failed\" | \"all\";\n readonly keepSandbox?: \"failed\" | \"all\";\n readonly maxConcurrency?: number;\n readonly maxBuildConcurrency?: number;\n readonly maxSetupPrefixConcurrency?: number;\n}\nexport interface ExperimentHostCheckRequest extends ExperimentHostSelectionInput {\n readonly config: Config;\n readonly overrides?: ExperimentHostRunOverrides;\n}\nexport type ExperimentHostCheckResult = ExperimentHostSelectionProblem | {\n readonly status: \"linked\";\n readonly experimentIds: readonly string[];\n readonly evalIds: readonly string[];\n readonly pairCount: number;\n};\ndeclare const invocationPlanBrand: unique symbol;\n/**\n * Opaque in-memory authority issued by `experimentHost.invocation.plan`.\n * Its Runner graph is held in Host-private storage and cannot be forged or\n * reconstructed by a CLI.\n */\nexport interface ExperimentHostInvocationPlan {\n readonly [invocationPlanBrand]: typeof invocationPlanBrand;\n}\nexport interface ExperimentHostInvocationShape {\n readonly experiments: number;\n readonly evals: number;\n readonly configurations: number;\n readonly totalAttempts: number;\n readonly attempts: number;\n readonly maxConcurrency: number;\n readonly maxBuildConcurrency: number;\n readonly maxSetupPrefixConcurrency: number;\n readonly experimentConcurrency: Readonly<Record<string, number>>;\n}\nexport interface ExperimentHostDrySlotTarget {\n readonly runId: string;\n readonly slotId: string;\n readonly experimentId: string;\n readonly evalId: string;\n readonly executionIdentityDigest: string;\n readonly evalGroupId?: string;\n readonly evalGroupIndex?: number;\n readonly attempt: number;\n}\nexport interface ExperimentHostDryComparison {\n readonly attachment: string;\n readonly recordedClaim: string;\n readonly sourceState: string;\n readonly result: string;\n readonly reason: string;\n}\nexport type ExperimentHostDrySlot = {\n readonly state: \"reuse\";\n readonly target: ExperimentHostDrySlotTarget;\n readonly source: {\n readonly attemptId: string;\n readonly originRunId: string;\n readonly originSlotId: string;\n readonly sourceRunId: string;\n };\n readonly comparisons: readonly ExperimentHostDryComparison[];\n} | {\n readonly state: \"gap\";\n readonly target: ExperimentHostDrySlotTarget;\n readonly reason: string;\n readonly scope: \"slot\" | \"experiment\" | \"target\";\n readonly issues: readonly ExperimentHostJsonValue[];\n readonly comparisons: readonly ExperimentHostDryComparison[];\n};\nexport interface ExperimentHostDryPlan {\n readonly policy: {\n readonly name: \"project-target\";\n readonly version: 1;\n };\n readonly slots: readonly ExperimentHostDrySlot[];\n readonly readbacks: readonly CurrentReuseReadbackSnapshot[];\n readonly lockedPairs: readonly string[];\n}\nexport type ExperimentHostInvocationPlanResult = ExperimentHostSelectionProblem | {\n readonly status: \"ready\";\n readonly plan: ExperimentHostInvocationPlan;\n readonly shape: ExperimentHostInvocationShape;\n readonly experimentIds: readonly string[];\n readonly evalIds: readonly string[];\n readonly pluginAudit: {\n readonly occurrences: readonly ExperimentHostJsonValue[];\n };\n readonly dry?: ExperimentHostDryPlan;\n};\nexport interface ExperimentHostInvocationPlanRequest extends ExperimentHostSelectionInput {\n readonly config: Config;\n /** @deprecated Ordinary Invocations always use cwd/.niceeval/record.sqlite. */\n readonly recordRoot?: string;\n /** Host path to process coordination state; defaults to cwd/.niceeval. */\n readonly coordinationRoot?: string;\n readonly overrides?: ExperimentHostRunOverrides;\n readonly preview?: boolean;\n}\n/** Lossless Experiment presentation owned by the calling Host surface. */\nexport interface ExperimentHostInvocationFeedback {\n readonly coordinator: FeedbackCoordinator;\n}\nexport interface ExperimentHostInvocationRunRequest {\n readonly plan: ExperimentHostInvocationPlan;\n readonly signal?: AbortSignal;\n readonly feedback?: ExperimentHostInvocationFeedback;\n /** Optional required JUnit reporter target, owned and invoked inside Host. */\n readonly junitPath?: string;\n}\n/**\n * Invocation status is project-local and ephemeral. It is an observation of\n * the coordination directory, not recoverable Record fact data.\n */\nexport interface ExperimentHostInvocationStatusListRequest {\n readonly cwd: string;\n readonly all?: boolean;\n readonly experimentSelector?: string;\n}\nexport interface ExperimentHostInvocationStatusShowRequest {\n readonly cwd: string;\n readonly invocationSelector: string;\n}\nexport type ExperimentHostInvocationStatusList = SessionListDocument;\nexport type ExperimentHostInvocationStatusShow = SessionShowDocument;\nexport interface ExperimentHostInvocationReceipt {\n readonly invocationId: string;\n readonly createdRunIds: readonly string[];\n readonly publicationCutoff: string;\n readonly startedAt: string;\n readonly completedAt?: string;\n readonly completion: \"completed\" | \"interrupted\" | \"failed\";\n}\nexport interface ExperimentHostInvocationSummary {\n readonly total: number;\n readonly passed: number;\n readonly failed: number;\n readonly skipped: number;\n readonly errored: number;\n readonly durationMs: number;\n readonly inputTokens?: number;\n readonly outputTokens?: number;\n readonly estimatedCostUSD?: number;\n readonly setupPrefixes: SetupPrefixPreparationSummary;\n}\nexport interface ExperimentHostInvocationResult {\n readonly status: \"finished\";\n readonly receipt: ExperimentHostInvocationReceipt;\n readonly summary: ExperimentHostInvocationSummary;\n /** Present when the caller supplied the one feedback reducer/presentation. */\n readonly completion?: InvocationCompletion;\n /** Exact CLI exit fold for the supplied presentation. */\n readonly exitCode?: number;\n}\n/** Adopt one exact historical Run into one current Experiment. */\nexport interface ExperimentHostRenameRequest {\n readonly cwd: string;\n readonly sourceRunId: string;\n readonly newId: string;\n readonly config?: Config;\n readonly operatorReason?: string;\n}\nexport type ExperimentHostRenameReason = import(\"../../runner/adoption.ts\").ExplicitAdoptionFailureCode;\nexport interface ExperimentHostRenamePlan {\n readonly status: \"plan\";\n readonly sourceRunId: string;\n readonly oldId: string | null;\n readonly newId: string;\n readonly migrations: readonly {\n readonly evalId: string;\n readonly attempt: number;\n readonly sourceLocator: string;\n readonly targetExperimentId: string;\n readonly fingerprint: string;\n }[];\n readonly blocked?: {\n readonly reason: ExperimentHostRenameReason;\n readonly detail: string;\n };\n}\nexport type ExperimentHostRenameResult = {\n readonly status: \"rejected\";\n readonly sourceRunId: string;\n readonly oldId: string | null;\n readonly newId: string;\n readonly reason: ExperimentHostRenameReason;\n readonly detail: string;\n} | {\n readonly status: \"done\";\n readonly invocationId: string;\n readonly runId: string;\n readonly sourceRunId: string;\n readonly oldId: string;\n readonly newId: string;\n readonly migrated: readonly {\n readonly evalId: string;\n readonly attempt: number;\n readonly sourceLocator: string;\n readonly locator: string;\n readonly fingerprint: string;\n readonly verdict: \"passed\" | \"failed\";\n }[];\n};\nexport interface ExperimentHostAcceptRequest {\n readonly cwd: string;\n readonly locators: readonly string[];\n /** @deprecated Accept is anchored to cwd/.niceeval/record.sqlite. */\n readonly recordRoot?: string;\n readonly config?: Config;\n readonly operatorReason?: string;\n}\nexport interface ExperimentHostAcceptedAttempt {\n readonly invocationId: string;\n readonly runId: string;\n readonly slotId: string;\n readonly locator: string;\n readonly sourceLocator: string;\n readonly fingerprint: string;\n}\nexport interface ExperimentHostAcceptRunRequest extends Omit<ExperimentHostAcceptRequest, \"locators\"> {\n readonly runId: string;\n}\nexport interface ExperimentHostAcceptRunPlan {\n readonly sourceRunId: string;\n readonly members: readonly {\n readonly locator: string;\n readonly experimentId: string;\n readonly evalId: string;\n readonly attempt: number;\n readonly fingerprint: string;\n }[];\n}\nexport interface ExperimentHostSharedStateEvidence {\n readonly key: string;\n readonly experimentId: string;\n readonly ownerToken: string;\n readonly host: string;\n readonly pid: number;\n readonly processIdentity: string;\n readonly heartbeatAt: string;\n}\nexport interface ExperimentHostTeardownInspectRequest {\n readonly cwd: string;\n readonly experimentSelector?: string;\n readonly coordinationRoot?: string;\n readonly currentHost: string;\n readonly recoveryKey?: string;\n}\nexport type ExperimentHostTeardownInspection = {\n readonly status: \"no-evidence\";\n readonly key: string;\n} | ExperimentHostSelectionProblem | {\n readonly status: \"selection-not-unique\";\n readonly experimentIds: readonly string[];\n readonly evidence: ExperimentHostSharedStateEvidence;\n} | {\n readonly status: \"experiment-mismatch\";\n readonly selectedExperimentId: string;\n readonly evidence: ExperimentHostSharedStateEvidence;\n} | {\n readonly status: \"teardown-required\";\n readonly experimentId: string;\n readonly evidence: ExperimentHostSharedStateEvidence;\n} | {\n readonly status: \"ready\";\n readonly experimentIds: readonly string[];\n readonly orphanedRegistrations: number;\n readonly evidence?: ExperimentHostSharedStateEvidence;\n};\nexport interface ExperimentHostTeardownRequest extends ExperimentHostTeardownInspectRequest {\n readonly observer?: ExperimentHostTeardownObserver;\n readonly signal?: AbortSignal;\n readonly ownerToken?: string;\n readonly confirmOwnerTerminated?: boolean;\n readonly confirmRemoteQuiesced?: boolean;\n}\nexport type ExperimentHostTeardownEvent = {\n readonly type: \"experiment-progress\";\n readonly experimentId: string;\n readonly detail: string;\n} | {\n readonly type: \"diagnostic\";\n readonly code: string;\n readonly level: \"info\" | \"warning\" | \"error\";\n readonly message: string;\n readonly data?: Readonly<Record<string, ExperimentHostJsonValue>>;\n} | {\n readonly type: \"experiment-hook\";\n readonly experimentId: string;\n readonly hook: \"teardown\";\n readonly status: \"started\" | \"done\" | \"failed\";\n readonly durationMs?: number;\n readonly recovery?: true;\n};\nexport interface ExperimentHostTeardownObserver {\n readonly observe: (event: ExperimentHostTeardownEvent) => void;\n}\nexport type ExperimentHostTeardownResult = ExperimentHostTeardownInspection | {\n readonly status: \"completed\";\n readonly experiments: readonly {\n readonly experimentId: string;\n readonly executions: number;\n readonly outcome: \"succeeded\" | \"failed\" | \"not-configured\";\n readonly error?: string;\n }[];\n} | {\n readonly status: \"recovered\" | \"already-released\";\n readonly key: string;\n readonly experimentId: string;\n readonly ownerToken: string;\n} | {\n readonly status: \"recovery-confirmation-required\";\n readonly evidence: ExperimentHostSharedStateEvidence;\n} | {\n readonly status: \"recovery-teardown-failed\";\n readonly evidence: ExperimentHostSharedStateEvidence;\n readonly error: string;\n};\nexport interface ExperimentHostHighLevelSDK {\n readonly catalog: (input: ExperimentHostSelectionInput) => Effect.Effect<ExperimentHostCatalog, ExperimentHostError>;\n readonly check: (input: ExperimentHostCheckRequest) => Effect.Effect<ExperimentHostCheckResult, ExperimentHostError>;\n readonly invocation: {\n readonly plan: (input: ExperimentHostInvocationPlanRequest) => Effect.Effect<ExperimentHostInvocationPlanResult, ExperimentHostError>;\n readonly run: (input: ExperimentHostInvocationRunRequest) => Effect.Effect<ExperimentHostInvocationResult, ExperimentHostError>;\n };\n readonly invocationStatus: {\n readonly list: (input: ExperimentHostInvocationStatusListRequest) => Effect.Effect<ExperimentHostInvocationStatusList, ExperimentHostError>;\n readonly show: (input: ExperimentHostInvocationStatusShowRequest) => Effect.Effect<ExperimentHostInvocationStatusShow, ExperimentHostError>;\n };\n readonly rename: {\n readonly plan: (input: ExperimentHostRenameRequest) => Effect.Effect<ExperimentHostRenamePlan, ExperimentHostError>;\n readonly apply: (input: ExperimentHostRenameRequest) => Effect.Effect<ExperimentHostRenameResult, ExperimentHostError>;\n };\n readonly teardown: {\n readonly inspect: (input: ExperimentHostTeardownInspectRequest) => Effect.Effect<ExperimentHostTeardownInspection, ExperimentHostError>;\n readonly run: (input: ExperimentHostTeardownRequest) => Effect.Effect<ExperimentHostTeardownResult, ExperimentHostError>;\n };\n readonly accept: (input: ExperimentHostAcceptRequest) => Effect.Effect<readonly ExperimentHostAcceptedAttempt[], ExperimentHostError>;\n readonly acceptRun: {\n readonly plan: (input: ExperimentHostAcceptRunRequest) => Effect.Effect<ExperimentHostAcceptRunPlan, ExperimentHostError>;\n readonly apply: (input: ExperimentHostAcceptRunRequest) => Effect.Effect<readonly ExperimentHostAcceptedAttempt[], ExperimentHostError>;\n };\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":";;;AACA,mCAA2C;AAW3C,+EAA+E;AAC/E,MAAa,mBAAoB,SAAQ,aAAI,CAAC,WAAW,CAAC,qBAAqB,CAM7E;CACD;AAPD,kDAOC","sourcesContent":["import type { ResolvedModelSlots } from \"../../model-slots.ts\";\nimport { Data, type Effect } from \"effect\";\nimport type { Config } from \"../../types.ts\";\nimport type { FeedbackCoordinator } from \"../../runner/feedback/coordinator.ts\";\nimport type { InvocationCompletion } from \"../../runner/types.ts\";\nimport type { SessionListDocument, SessionShowDocument } from \"../../runner/session.ts\";\nimport type { CurrentReuseReadbackSnapshot } from \"../../runner/reuse-readback.ts\";\nimport type { SetupPrefixPreparationSummary } from \"../../runner/setup-prefix-preparation.ts\";\nexport type ExperimentHostJsonValue = null | boolean | number | string | readonly ExperimentHostJsonValue[] | {\n readonly [key: string]: ExperimentHostJsonValue;\n};\nexport type ExperimentHostOperation = \"catalog\" | \"check\" | \"debug\" | \"invocation-plan\" | \"invocation-run\" | \"rename-plan\" | \"rename-apply\" | \"accept\" | \"invocation-status-list\" | \"invocation-status-show\" | \"teardown-inspect\" | \"teardown-run\";\n/** Stable typed failure boundary; defects and interruption remain separate. */\nexport class ExperimentHostError extends Data.TaggedError(\"ExperimentHostError\")<{\n readonly operation: ExperimentHostOperation;\n readonly code: string;\n readonly message: string;\n /** Structured typed failure retained for application/CLI attribution. */\n readonly cause?: unknown;\n}> {\n}\n/** Inputs shared by discovery, link checking, and invocation planning. */\nexport interface ExperimentHostSelectionInput {\n readonly cwd: string;\n readonly experimentSelector?: string;\n /** Non-empty exact Experiment ID set; mutually exclusive with experimentSelector. */\n readonly experimentIds?: readonly string[];\n readonly evalSelectors?: readonly string[];\n readonly tag?: string;\n}\nexport interface ExperimentHostEvalSummary {\n readonly id: string;\n readonly description?: string;\n readonly tags: readonly string[];\n readonly evaluationKind: \"pass\" | \"score\";\n}\nexport interface ExperimentHostExperimentSummary {\n readonly models?: ResolvedModelSlots;\n readonly id: string;\n readonly description?: string;\n readonly adapter: string;\n readonly model?: string;\n readonly attempts: number;\n readonly evalIds: readonly string[];\n readonly labels: Readonly<Record<string, string | number>>;\n readonly hasSetup: boolean;\n readonly hasTeardown: boolean;\n readonly sharedStateKey?: string;\n}\nexport interface ExperimentHostCatalog {\n readonly status: \"listed\";\n readonly evals: readonly ExperimentHostEvalSummary[];\n readonly experimentIds: readonly string[];\n readonly experiments: readonly ExperimentHostExperimentSummary[];\n}\nexport type ExperimentHostSelectionProblem = {\n readonly status: \"experiment-no-match\";\n readonly selector: string;\n readonly candidates: readonly string[];\n} | {\n readonly status: \"eval-no-match\";\n readonly selector: string;\n readonly experimentIds: readonly string[];\n readonly candidates: readonly string[];\n} | {\n readonly status: \"empty-selection\";\n readonly experimentIds: readonly string[];\n readonly candidates: readonly string[];\n};\nexport interface ExperimentHostRunOverrides {\n readonly attempts?: number;\n readonly earlyExit?: boolean;\n readonly timeoutMs?: number;\n readonly budget?: number;\n readonly rerun?: \"failed\" | \"all\";\n readonly keepSandbox?: \"failed\" | \"all\";\n readonly maxConcurrency?: number;\n readonly maxBuildConcurrency?: number;\n readonly maxSetupPrefixConcurrency?: number;\n}\nexport interface ExperimentHostCheckRequest extends ExperimentHostSelectionInput {\n readonly config: Config;\n readonly overrides?: ExperimentHostRunOverrides;\n}\nexport type ExperimentHostCheckResult = ExperimentHostSelectionProblem | {\n readonly status: \"linked\";\n readonly experimentIds: readonly string[];\n readonly evalIds: readonly string[];\n readonly pairCount: number;\n};\ndeclare const invocationPlanBrand: unique symbol;\n/**\n * Opaque in-memory authority issued by `experimentHost.invocation.plan`.\n * Its Runner graph is held in Host-private storage and cannot be forged or\n * reconstructed by a CLI.\n */\nexport interface ExperimentHostInvocationPlan {\n readonly [invocationPlanBrand]: typeof invocationPlanBrand;\n}\nexport interface ExperimentHostInvocationShape {\n readonly experiments: number;\n readonly evals: number;\n readonly configurations: number;\n readonly totalAttempts: number;\n readonly attempts: number;\n readonly maxConcurrency: number;\n readonly maxBuildConcurrency: number;\n readonly maxSetupPrefixConcurrency: number;\n readonly experimentConcurrency: Readonly<Record<string, number>>;\n}\nexport interface ExperimentHostDrySlotTarget {\n readonly runId: string;\n readonly slotId: string;\n readonly experimentId: string;\n readonly evalId: string;\n readonly executionIdentityDigest: string;\n readonly evalGroupId?: string;\n readonly evalGroupIndex?: number;\n readonly attempt: number;\n}\nexport interface ExperimentHostDryComparison {\n readonly attachment: string;\n readonly recordedClaim: string;\n readonly sourceState: string;\n readonly result: string;\n readonly reason: string;\n}\nexport type ExperimentHostDrySlot = {\n readonly state: \"reuse\";\n readonly target: ExperimentHostDrySlotTarget;\n readonly source: {\n readonly attemptId: string;\n readonly originRunId: string;\n readonly originSlotId: string;\n readonly sourceRunId: string;\n };\n readonly comparisons: readonly ExperimentHostDryComparison[];\n} | {\n readonly state: \"gap\";\n readonly target: ExperimentHostDrySlotTarget;\n readonly reason: string;\n readonly scope: \"slot\" | \"experiment\" | \"target\";\n readonly issues: readonly ExperimentHostJsonValue[];\n readonly comparisons: readonly ExperimentHostDryComparison[];\n};\nexport interface ExperimentHostDryPlan {\n readonly policy: {\n readonly name: \"project-target\";\n readonly version: 1;\n };\n readonly slots: readonly ExperimentHostDrySlot[];\n readonly readbacks: readonly CurrentReuseReadbackSnapshot[];\n readonly lockedPairs: readonly string[];\n}\nexport type ExperimentHostInvocationPlanResult = ExperimentHostSelectionProblem | {\n readonly status: \"ready\";\n readonly plan: ExperimentHostInvocationPlan;\n readonly shape: ExperimentHostInvocationShape;\n readonly experimentIds: readonly string[];\n readonly evalIds: readonly string[];\n readonly pluginAudit: {\n readonly occurrences: readonly ExperimentHostJsonValue[];\n };\n readonly dry?: ExperimentHostDryPlan;\n};\nexport interface ExperimentHostInvocationPlanRequest extends ExperimentHostSelectionInput {\n readonly config: Config;\n /** Host path to process coordination state; defaults to cwd/.niceeval. */\n readonly coordinationRoot?: string;\n readonly overrides?: ExperimentHostRunOverrides;\n readonly preview?: boolean;\n}\n/** Lossless Experiment presentation owned by the calling Host surface. */\nexport interface ExperimentHostInvocationFeedback {\n readonly coordinator: FeedbackCoordinator;\n}\nexport interface ExperimentHostInvocationRunRequest {\n readonly plan: ExperimentHostInvocationPlan;\n readonly signal?: AbortSignal;\n readonly feedback?: ExperimentHostInvocationFeedback;\n /** Optional required JUnit reporter target, owned and invoked inside Host. */\n readonly junitPath?: string;\n}\n/**\n * Invocation status is project-local and ephemeral. It is an observation of\n * the coordination directory, not recoverable Record fact data.\n */\nexport interface ExperimentHostInvocationStatusListRequest {\n readonly cwd: string;\n readonly all?: boolean;\n readonly experimentSelector?: string;\n}\nexport interface ExperimentHostInvocationStatusShowRequest {\n readonly cwd: string;\n readonly invocationSelector: string;\n}\nexport type ExperimentHostInvocationStatusList = SessionListDocument;\nexport type ExperimentHostInvocationStatusShow = SessionShowDocument;\nexport interface ExperimentHostInvocationReceipt {\n readonly invocationId: string;\n readonly createdRunIds: readonly string[];\n readonly publicationCutoff: string;\n readonly startedAt: string;\n readonly completedAt?: string;\n readonly completion: \"completed\" | \"interrupted\" | \"failed\";\n}\nexport interface ExperimentHostInvocationSummary {\n readonly total: number;\n readonly passed: number;\n readonly failed: number;\n readonly skipped: number;\n readonly errored: number;\n readonly durationMs: number;\n readonly inputTokens?: number;\n readonly outputTokens?: number;\n readonly estimatedCostUSD?: number;\n readonly setupPrefixes: SetupPrefixPreparationSummary;\n}\nexport interface ExperimentHostInvocationResult {\n readonly status: \"finished\";\n readonly receipt: ExperimentHostInvocationReceipt;\n readonly summary: ExperimentHostInvocationSummary;\n /** Present when the caller supplied the one feedback reducer/presentation. */\n readonly completion?: InvocationCompletion;\n /** Exact CLI exit fold for the supplied presentation. */\n readonly exitCode?: number;\n}\n/** Adopt one exact historical Run into one current Experiment. */\nexport interface ExperimentHostRenameRequest {\n readonly cwd: string;\n readonly sourceRunId: string;\n readonly newId: string;\n readonly config?: Config;\n readonly operatorReason?: string;\n}\nexport type ExperimentHostRenameReason = import(\"../../runner/adoption.ts\").ExplicitAdoptionFailureCode;\nexport interface ExperimentHostRenamePlan {\n readonly status: \"plan\";\n readonly sourceRunId: string;\n readonly oldId: string | null;\n readonly newId: string;\n readonly migrations: readonly {\n readonly evalId: string;\n readonly attempt: number;\n readonly sourceLocator: string;\n readonly targetExperimentId: string;\n readonly fingerprint: string;\n }[];\n readonly blocked?: {\n readonly reason: ExperimentHostRenameReason;\n readonly detail: string;\n };\n}\nexport type ExperimentHostRenameResult = {\n readonly status: \"rejected\";\n readonly sourceRunId: string;\n readonly oldId: string | null;\n readonly newId: string;\n readonly reason: ExperimentHostRenameReason;\n readonly detail: string;\n} | {\n readonly status: \"done\";\n readonly invocationId: string;\n readonly runId: string;\n readonly sourceRunId: string;\n readonly oldId: string;\n readonly newId: string;\n readonly migrated: readonly {\n readonly evalId: string;\n readonly attempt: number;\n readonly sourceLocator: string;\n readonly locator: string;\n readonly fingerprint: string;\n readonly verdict: \"passed\" | \"failed\";\n }[];\n};\nexport interface ExperimentHostAcceptRequest {\n readonly cwd: string;\n readonly locators: readonly string[];\n readonly config?: Config;\n readonly operatorReason?: string;\n}\nexport interface ExperimentHostAcceptedAttempt {\n readonly invocationId: string;\n readonly runId: string;\n readonly slotId: string;\n readonly locator: string;\n readonly sourceLocator: string;\n readonly fingerprint: string;\n}\nexport interface ExperimentHostAcceptRunRequest extends Omit<ExperimentHostAcceptRequest, \"locators\"> {\n readonly runId: string;\n}\nexport interface ExperimentHostAcceptRunPlan {\n readonly sourceRunId: string;\n readonly members: readonly {\n readonly locator: string;\n readonly experimentId: string;\n readonly evalId: string;\n readonly attempt: number;\n readonly fingerprint: string;\n }[];\n}\nexport interface ExperimentHostSharedStateEvidence {\n readonly key: string;\n readonly experimentId: string;\n readonly ownerToken: string;\n readonly host: string;\n readonly pid: number;\n readonly processIdentity: string;\n readonly heartbeatAt: string;\n}\nexport interface ExperimentHostTeardownInspectRequest {\n readonly cwd: string;\n readonly experimentSelector?: string;\n readonly coordinationRoot?: string;\n readonly currentHost: string;\n readonly recoveryKey?: string;\n}\nexport type ExperimentHostTeardownInspection = {\n readonly status: \"no-evidence\";\n readonly key: string;\n} | ExperimentHostSelectionProblem | {\n readonly status: \"selection-not-unique\";\n readonly experimentIds: readonly string[];\n readonly evidence: ExperimentHostSharedStateEvidence;\n} | {\n readonly status: \"experiment-mismatch\";\n readonly selectedExperimentId: string;\n readonly evidence: ExperimentHostSharedStateEvidence;\n} | {\n readonly status: \"teardown-required\";\n readonly experimentId: string;\n readonly evidence: ExperimentHostSharedStateEvidence;\n} | {\n readonly status: \"ready\";\n readonly experimentIds: readonly string[];\n readonly orphanedRegistrations: number;\n readonly evidence?: ExperimentHostSharedStateEvidence;\n};\nexport interface ExperimentHostTeardownRequest extends ExperimentHostTeardownInspectRequest {\n readonly observer?: ExperimentHostTeardownObserver;\n readonly signal?: AbortSignal;\n readonly ownerToken?: string;\n readonly confirmOwnerTerminated?: boolean;\n readonly confirmRemoteQuiesced?: boolean;\n}\nexport type ExperimentHostTeardownEvent = {\n readonly type: \"experiment-progress\";\n readonly experimentId: string;\n readonly detail: string;\n} | {\n readonly type: \"diagnostic\";\n readonly code: string;\n readonly level: \"info\" | \"warning\" | \"error\";\n readonly message: string;\n readonly data?: Readonly<Record<string, ExperimentHostJsonValue>>;\n} | {\n readonly type: \"experiment-hook\";\n readonly experimentId: string;\n readonly hook: \"teardown\";\n readonly status: \"started\" | \"done\" | \"failed\";\n readonly durationMs?: number;\n readonly recovery?: true;\n};\nexport interface ExperimentHostTeardownObserver {\n readonly observe: (event: ExperimentHostTeardownEvent) => void;\n}\nexport type ExperimentHostTeardownResult = ExperimentHostTeardownInspection | {\n readonly status: \"completed\";\n readonly experiments: readonly {\n readonly experimentId: string;\n readonly executions: number;\n readonly outcome: \"succeeded\" | \"failed\" | \"not-configured\";\n readonly error?: string;\n }[];\n} | {\n readonly status: \"recovered\" | \"already-released\";\n readonly key: string;\n readonly experimentId: string;\n readonly ownerToken: string;\n} | {\n readonly status: \"recovery-confirmation-required\";\n readonly evidence: ExperimentHostSharedStateEvidence;\n} | {\n readonly status: \"recovery-teardown-failed\";\n readonly evidence: ExperimentHostSharedStateEvidence;\n readonly error: string;\n};\nexport interface ExperimentHostHighLevelSDK {\n readonly catalog: (input: ExperimentHostSelectionInput) => Effect.Effect<ExperimentHostCatalog, ExperimentHostError>;\n readonly check: (input: ExperimentHostCheckRequest) => Effect.Effect<ExperimentHostCheckResult, ExperimentHostError>;\n readonly invocation: {\n readonly plan: (input: ExperimentHostInvocationPlanRequest) => Effect.Effect<ExperimentHostInvocationPlanResult, ExperimentHostError>;\n readonly run: (input: ExperimentHostInvocationRunRequest) => Effect.Effect<ExperimentHostInvocationResult, ExperimentHostError>;\n };\n readonly invocationStatus: {\n readonly list: (input: ExperimentHostInvocationStatusListRequest) => Effect.Effect<ExperimentHostInvocationStatusList, ExperimentHostError>;\n readonly show: (input: ExperimentHostInvocationStatusShowRequest) => Effect.Effect<ExperimentHostInvocationStatusShow, ExperimentHostError>;\n };\n readonly rename: {\n readonly plan: (input: ExperimentHostRenameRequest) => Effect.Effect<ExperimentHostRenamePlan, ExperimentHostError>;\n readonly apply: (input: ExperimentHostRenameRequest) => Effect.Effect<ExperimentHostRenameResult, ExperimentHostError>;\n };\n readonly teardown: {\n readonly inspect: (input: ExperimentHostTeardownInspectRequest) => Effect.Effect<ExperimentHostTeardownInspection, ExperimentHostError>;\n readonly run: (input: ExperimentHostTeardownRequest) => Effect.Effect<ExperimentHostTeardownResult, ExperimentHostError>;\n };\n readonly accept: (input: ExperimentHostAcceptRequest) => Effect.Effect<readonly ExperimentHostAcceptedAttempt[], ExperimentHostError>;\n readonly acceptRun: {\n readonly plan: (input: ExperimentHostAcceptRunRequest) => Effect.Effect<ExperimentHostAcceptRunPlan, ExperimentHostError>;\n readonly apply: (input: ExperimentHostAcceptRunRequest) => Effect.Effect<readonly ExperimentHostAcceptedAttempt[], ExperimentHostError>;\n };\n}\n"]}
@@ -168,8 +168,6 @@ export type ExperimentHostInvocationPlanResult = ExperimentHostSelectionProblem
168
168
  };
169
169
  export interface ExperimentHostInvocationPlanRequest extends ExperimentHostSelectionInput {
170
170
  readonly config: Config;
171
- /** @deprecated Ordinary Invocations always use cwd/.niceeval/record.sqlite. */
172
- readonly recordRoot?: string;
173
171
  /** Host path to process coordination state; defaults to cwd/.niceeval. */
174
172
  readonly coordinationRoot?: string;
175
173
  readonly overrides?: ExperimentHostRunOverrides;
@@ -282,8 +280,6 @@ export type ExperimentHostRenameResult = {
282
280
  export interface ExperimentHostAcceptRequest {
283
281
  readonly cwd: string;
284
282
  readonly locators: readonly string[];
285
- /** @deprecated Accept is anchored to cwd/.niceeval/record.sqlite. */
286
- readonly recordRoot?: string;
287
283
  readonly config?: Config;
288
284
  readonly operatorReason?: string;
289
285
  }
@@ -168,8 +168,6 @@ export type ExperimentHostInvocationPlanResult = ExperimentHostSelectionProblem
168
168
  };
169
169
  export interface ExperimentHostInvocationPlanRequest extends ExperimentHostSelectionInput {
170
170
  readonly config: Config;
171
- /** @deprecated Ordinary Invocations always use cwd/.niceeval/record.sqlite. */
172
- readonly recordRoot?: string;
173
171
  /** Host path to process coordination state; defaults to cwd/.niceeval. */
174
172
  readonly coordinationRoot?: string;
175
173
  readonly overrides?: ExperimentHostRunOverrides;
@@ -282,8 +280,6 @@ export type ExperimentHostRenameResult = {
282
280
  export interface ExperimentHostAcceptRequest {
283
281
  readonly cwd: string;
284
282
  readonly locators: readonly string[];
285
- /** @deprecated Accept is anchored to cwd/.niceeval/record.sqlite. */
286
- readonly recordRoot?: string;
287
283
  readonly config?: Config;
288
284
  readonly operatorReason?: string;
289
285
  }
@@ -168,8 +168,6 @@ export type ExperimentHostInvocationPlanResult = ExperimentHostSelectionProblem
168
168
  };
169
169
  export interface ExperimentHostInvocationPlanRequest extends ExperimentHostSelectionInput {
170
170
  readonly config: Config;
171
- /** @deprecated Ordinary Invocations always use cwd/.niceeval/record.sqlite. */
172
- readonly recordRoot?: string;
173
171
  /** Host path to process coordination state; defaults to cwd/.niceeval. */
174
172
  readonly coordinationRoot?: string;
175
173
  readonly overrides?: ExperimentHostRunOverrides;
@@ -282,8 +280,6 @@ export type ExperimentHostRenameResult = {
282
280
  export interface ExperimentHostAcceptRequest {
283
281
  readonly cwd: string;
284
282
  readonly locators: readonly string[];
285
- /** @deprecated Accept is anchored to cwd/.niceeval/record.sqlite. */
286
- readonly recordRoot?: string;
287
283
  readonly config?: Config;
288
284
  readonly operatorReason?: string;
289
285
  }
@@ -65,8 +65,8 @@ function acquireFreshImportGeneration(projectRoot = process.cwd()) {
65
65
  });
66
66
  });
67
67
  }
68
- /** Promise ABI facade for callers that cannot retain an Effect Scope. */
68
+ /** Load one fresh entry while retaining the generation gate until import settles. */
69
69
  function freshImportModule(absPath) {
70
- return effect_1.Effect.runPromise(effect_1.Effect.scoped(acquireFreshImportGeneration((0, node_path_1.dirname)(absPath)).pipe(effect_1.Effect.flatMap((fresh) => effect_1.Effect.tryPromise(() => fresh.import(absPath))))));
70
+ return effect_1.Effect.scoped(acquireFreshImportGeneration((0, node_path_1.dirname)(absPath)).pipe(effect_1.Effect.flatMap((fresh) => effect_1.Effect.tryPromise(() => fresh.import(absPath)))));
71
71
  }
72
72
  //# sourceMappingURL=fresh-import.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"fresh-import.js","sourceRoot":"","sources":["fresh-import.ts"],"names":[],"mappings":";;AAwCA,kDAIC;AAsBD,oEAYC;AAED,8CAIC;AApFD,wEAAwE;AACxE,wEAAwE;AACxE,mEAAmE;AACnE,qCAAqC;AACrC,mCAAu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AAE,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5K,CAAC","sourcesContent":["// 用户 TypeScript 装载的唯一 runtime:普通 CLI 调用复用 canonical module graph;View 的\n// rebuild / fresh discovery 在 generation 开始时清理项目内 module cache,随后在这一代内部\n// 保持缓存,使多个入口共享 helper 与 definition identity。依赖包不清理,因此 niceeval/* 与\n// effect 始终指向发布包的 canonical runtime。\nimport { Effect, Semaphore, type Scope } from \"effect\";\nimport { createJiti, type Jiti } from \"jiti\";\nimport { dirname, isAbsolute, resolve, sep } from \"node:path\";\nconst generationGate = Semaphore.makeUnsafe(1);\nconst loaderOptions = Object.freeze({\n interopDefault: false,\n moduleCache: true,\n tsconfigPaths: true,\n});\nconst cachedLoader = createJiti(__niceevalImportMetaUrl, loaderOptions);\nfunction unwrapDefault(imported: unknown): {\n default?: unknown;\n} {\n if (typeof imported !== \"object\" || imported === null)\n return { default: imported };\n const module = imported as {\n default?: unknown;\n __esModule?: unknown;\n };\n const wrapped = module.default;\n if (typeof wrapped === \"object\" && wrapped !== null &&\n Object.hasOwn(wrapped, \"default\") &&\n (wrapped as {\n __esModule?: unknown;\n }).__esModule === true)\n return wrapped as {\n default?: unknown;\n };\n return module;\n}\nasync function importWith(loader: Jiti, absPath: string): Promise<{\n default?: unknown;\n}> {\n return unwrapDefault(await loader.import(absPath));\n}\n/** Load one trusted project module through the process-wide cached project graph. */\nexport function importProjectModule(absPath: string): Promise<{\n default?: unknown;\n}> {\n return importWith(cachedLoader, absPath);\n}\nfunction clearProjectModules(loader: Jiti, projectRoot: string): void {\n const root = resolve(projectRoot);\n const prefix = `${root}${sep}`;\n for (const filename of Object.keys(loader.cache)) {\n if (isAbsolute(filename) && !filename.includes(`${sep}node_modules${sep}`) &&\n (filename === root || filename.startsWith(prefix))) {\n delete loader.cache[filename];\n }\n }\n}\nexport interface FreshImportGeneration {\n /** Import an entry into this generation's one shared project module graph. */\n import(absPath: string): Promise<{\n default?: unknown;\n }>;\n}\n/**\n * Open one fresh project module graph. The gate makes project-cache eviction atomic with all\n * imports in the generation; the caller's Scope releases the gate. Dependencies outside\n * projectRoot retain canonical process identity.\n */\nexport function acquireFreshImportGeneration(projectRoot = process.cwd()): Effect.Effect<FreshImportGeneration, never, Scope.Scope> {\n return Effect.gen(function* () {\n // Register this finalizer before constructing the loader: Jiti setup or cache eviction\n // may throw, but neither may strand the generation permit.\n yield* Effect.acquireRelease(generationGate.take(1), () => generationGate.release(1));\n const loader = createJiti(__niceevalImportMetaUrl, loaderOptions);\n clearProjectModules(loader, projectRoot);\n return Object.freeze({\n // Jiti's dynamic import ABI is Promise-based; adaptation remains at this I/O leaf.\n import: (absPath: string) => importWith(loader, absPath),\n });\n });\n}\n/** Promise ABI facade for callers that cannot retain an Effect Scope. */\nexport function freshImportModule(absPath: string): Promise<{\n default?: unknown;\n}> {\n return Effect.runPromise(Effect.scoped(acquireFreshImportGeneration(dirname(absPath)).pipe(Effect.flatMap((fresh) => Effect.tryPromise(() => fresh.import(absPath))))));\n}\n"]}
1
+ {"version":3,"file":"fresh-import.js","sourceRoot":"","sources":["fresh-import.ts"],"names":[],"mappings":";;AAwCA,kDAIC;AAsBD,oEAYC;AAED,8CAEC;AAlFD,wEAAwE;AACxE,wEAAwE;AACxE,mEAAmE;AACnE,qCAAqC;AACrC,mCAAuD;AACvD,+BAA6C;AAC7C,yCAA8D;AAC9D,MAAM,cAAc,GAAG,kBAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC/C,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IAChC,cAAc,EAAE,KAAK;IACrB,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,IAAI;CACtB,CAAC,CAAC;AACH,MAAM,YAAY,GAAG,IAAA,iBAAU,EAAC,uBAAuB,EAAE,aAAa,CAAC,CAAC;AACxE,SAAS,aAAa,CAAC,QAAiB;IAGpC,IAAI,OAAO,QAAQ,KAAK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AAC,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE;IACpE,OAAO,eAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACvB,uFAAuF;QACvF,2DAA2D;QAC3D,KAAK,CAAC,CAAC,eAAM,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACtF,MAAM,MAAM,GAAG,IAAA,iBAAU,EAAC,uBAAuB,EAAE,aAAa,CAAC,CAAC;QAClE,mBAAmB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACzC,OAAO,MAAM,CAAC,MAAM,CAAC;YACjB,mFAAmF;YACnF,MAAM,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC;SAC3D,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AACD,qFAAqF;AACrF,SAAgB,iBAAiB,CAAC,OAAe;IAC7C,OAAO,eAAM,CAAC,MAAM,CAAC,4BAA4B,CAAC,IAAA,mBAAO,EAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,eAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAM,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACzJ,CAAC","sourcesContent":["// 用户 TypeScript 装载的唯一 runtime:普通 CLI 调用复用 canonical module graph;View 的\n// rebuild / fresh discovery 在 generation 开始时清理项目内 module cache,随后在这一代内部\n// 保持缓存,使多个入口共享 helper 与 definition identity。依赖包不清理,因此 niceeval/* 与\n// effect 始终指向发布包的 canonical runtime。\nimport { Effect, Semaphore, type Scope } from \"effect\";\nimport { createJiti, type Jiti } from \"jiti\";\nimport { dirname, isAbsolute, resolve, sep } from \"node:path\";\nconst generationGate = Semaphore.makeUnsafe(1);\nconst loaderOptions = Object.freeze({\n interopDefault: false,\n moduleCache: true,\n tsconfigPaths: true,\n});\nconst cachedLoader = createJiti(__niceevalImportMetaUrl, loaderOptions);\nfunction unwrapDefault(imported: unknown): {\n default?: unknown;\n} {\n if (typeof imported !== \"object\" || imported === null)\n return { default: imported };\n const module = imported as {\n default?: unknown;\n __esModule?: unknown;\n };\n const wrapped = module.default;\n if (typeof wrapped === \"object\" && wrapped !== null &&\n Object.hasOwn(wrapped, \"default\") &&\n (wrapped as {\n __esModule?: unknown;\n }).__esModule === true)\n return wrapped as {\n default?: unknown;\n };\n return module;\n}\nasync function importWith(loader: Jiti, absPath: string): Promise<{\n default?: unknown;\n}> {\n return unwrapDefault(await loader.import(absPath));\n}\n/** Load one trusted project module through the process-wide cached project graph. */\nexport function importProjectModule(absPath: string): Promise<{\n default?: unknown;\n}> {\n return importWith(cachedLoader, absPath);\n}\nfunction clearProjectModules(loader: Jiti, projectRoot: string): void {\n const root = resolve(projectRoot);\n const prefix = `${root}${sep}`;\n for (const filename of Object.keys(loader.cache)) {\n if (isAbsolute(filename) && !filename.includes(`${sep}node_modules${sep}`) &&\n (filename === root || filename.startsWith(prefix))) {\n delete loader.cache[filename];\n }\n }\n}\nexport interface FreshImportGeneration {\n /** Import an entry into this generation's one shared project module graph. */\n import(absPath: string): Promise<{\n default?: unknown;\n }>;\n}\n/**\n * Open one fresh project module graph. The gate makes project-cache eviction atomic with all\n * imports in the generation; the caller's Scope releases the gate. Dependencies outside\n * projectRoot retain canonical process identity.\n */\nexport function acquireFreshImportGeneration(projectRoot = process.cwd()): Effect.Effect<FreshImportGeneration, never, Scope.Scope> {\n return Effect.gen(function* () {\n // Register this finalizer before constructing the loader: Jiti setup or cache eviction\n // may throw, but neither may strand the generation permit.\n yield* Effect.acquireRelease(generationGate.take(1), () => generationGate.release(1));\n const loader = createJiti(__niceevalImportMetaUrl, loaderOptions);\n clearProjectModules(loader, projectRoot);\n return Object.freeze({\n // Jiti's dynamic import ABI is Promise-based; adaptation remains at this I/O leaf.\n import: (absPath: string) => importWith(loader, absPath),\n });\n });\n}\n/** Load one fresh entry while retaining the generation gate until import settles. */\nexport function freshImportModule(absPath: string) {\n return Effect.scoped(acquireFreshImportGeneration(dirname(absPath)).pipe(Effect.flatMap((fresh) => Effect.tryPromise(() => fresh.import(absPath)))));\n}\n"]}
@@ -15,7 +15,7 @@ export interface FreshImportGeneration {
15
15
  * projectRoot retain canonical process identity.
16
16
  */
17
17
  export declare function acquireFreshImportGeneration(projectRoot?: string): Effect.Effect<FreshImportGeneration, never, Scope.Scope>;
18
- /** Promise ABI facade for callers that cannot retain an Effect Scope. */
19
- export declare function freshImportModule(absPath: string): Promise<{
18
+ /** Load one fresh entry while retaining the generation gate until import settles. */
19
+ export declare function freshImportModule(absPath: string): Effect.Effect<{
20
20
  default?: unknown;
21
- }>;
21
+ }, import("effect/Cause").UnknownError, never>;